The method and terminal of a kind of resource-sharingTechnical field
The present invention relates to the method and terminal of Information Sharing Technology, more particularly to a kind of resource-sharing.
Background technology
With the development of Internet technology, a large amount of of intelligent terminal popularize, and the transmission and interaction of information are more and more convenient.MeshIn the preceding APP applications in terminal, for equilibrium development efficiency and from performance perspective, there is by the primary Native pagesThe scene being used in mixed way with WEB page, so that while causing the identical resource to possibly be present at the Native pages, it is also possible toEmbedded WEB page is appeared in, at present due to the limitation of authority, the cache access that can not be effectively realized between same asset is total toEnjoy.It is right using the prior art, it is necessary to realize that the access of local cache is shared by specific form or the specific interface of exploitationIt can not be directly acquired in the resource of local cache, cost and access delay can be increased.However, in correlation technique, for the problem,It there is no effective solution.
The content of the invention
In view of this, an embodiment of the present invention provides the method and terminal of a kind of resource-sharing, it solve at least existing skillArt there are the problem of.
What the technical solution of the embodiment of the present invention was realized in:
A kind of method of resource-sharing of the embodiment of the present invention, is embedded with local Hyper text transfer association in terminal local applicationHTTP service module is discussed, the described method includes:
Start the locally applied rear calling local HTTP service module, be multipage by the local HTTP service moduleOffer resource sharing service is asked in interview;
The resource that loading first page is had access to is cached to the local HTTP service module as shared resourceIn;
When loading second page, the local HTTP service module is accessed by way of local HTTP, from the localThe shared resource is directly acquired in HTTP service module.
In such scheme, start the locally applied rear calling local HTTP service module, pass through the local HTTP and takeBusiness module accesses for multi-page and provides resource sharing service, including:
It is described it is locally applied start the local HTTP service module in a manner of background process, by local HTTP clothesBusiness module is determined as realizing the resource intermediary of resource-sharing between the first page and the second page;
The first page is got and the relevant resource of second page by the local HTTP service module;And/or
The second page is got and the relevant resource of first page by the local HTTP service module.
In such scheme, the multi-page, which accesses, to be included:The locally applied primary page and locally applied embedded web pageBetween access.
In such scheme, if the first page is the locally applied primary page, the second page is locally appliedEmbedded web page, then during the loading second page, access the local HTTP service module by way of local HTTP,The shared resource is directly acquired from the local HTTP service module, including:
HTTP request is initiated by second page;
By HTTP request described in the local HTTP service block intercepts, the spy included in the HTTP request is parsedSign parameter meets the acquisition condition of the shared resource;
The HTTP request is responded by the local HTTP service module, the shared resource is fed back into second pageFace.
In such scheme, the acquisition bar that the characteristic parameter included in the HTTP request meets the shared resource is parsedPart, including:
When the characteristic parameter extracted from the HTTP request is resource path, judge the resource path whether withThe path of the shared resource is consistent, if unanimously, meeting the acquisition condition of the shared resource.
In such scheme, the acquisition bar that the characteristic parameter included in the HTTP request meets the shared resource is parsedPart, including:
When the characteristic parameter extracted from the HTTP request is resource name, judge the resource name whether withThe title of the shared resource is consistent, if unanimously, meeting the acquisition condition of the shared resource.
A kind of terminal of the embodiment of the present invention, local hypertext transfer protocol HTTP service is embedded with terminal local applicationModule, the terminal include:
Call unit, for starting the locally applied rear calling local HTTP service module;
HTTP service module, resource sharing service is provided for being accessed for multi-page;
Buffer unit, for will load the resource that is had access to of first page as shared resource, and is cached to describedIn ground HTTP service module;
Shared processing unit, during for loading second page, the local HTTP is accessed by way of local HTTP and is takenBusiness module, the shared resource is directly acquired from the local HTTP service module.
In such scheme, the call unit, is further used for:
Start the local HTTP service module in a manner of background process, the local HTTP service module is determined asThe resource intermediary of resource-sharing is realized between the first page and the second page;
The HTTP service module, is further used for:
As the resource intermediary of resource-sharing, the first page is supported to get and the relevant resource of second page;With/Or
The second page is supported to get and the relevant resource of first page.
In such scheme, the multi-page, which accesses, to be included:The locally applied primary page and locally applied embedded web pageBetween access.
In such scheme, the shared processing unit, it is locally applied primary page to be further used for the first pageFace, in the case that the second page is locally applied embedded web page, HTTP request is initiated by second page;
The local HTTP service module, is further used for:
The HTTP request is intercepted, the characteristic parameter included in the HTTP request is parsed and meets the shared resourceAcquisition condition;
The HTTP request is responded, the shared resource is fed back into second page.
In such scheme, the local HTTP service module, is further used for:
When the characteristic parameter extracted from the HTTP request is resource path, judge the resource path whether withThe path of the shared resource is consistent, if unanimously, meeting the acquisition condition of the shared resource.
In such scheme, the local HTTP service module, is further used for:
When the characteristic parameter extracted from the HTTP request is resource name, judge the resource name whether withThe title of the shared resource is consistent, if unanimously, meeting the acquisition condition of the shared resource.
The method of resource-sharing of the embodiment of the present invention, local hypertext transfer protocol is embedded with terminal local application(HTTP) service module, the described method includes:Start the locally applied rear calling local HTTP service module, pass through describedGround HTTP service module accesses for multi-page and provides resource sharing service;The resource that loading first page is had access to is as altogetherResource is enjoyed, and is cached in the local HTTP service module;When loading second page, institute is accessed by way of local HTTPLocal HTTP service module is stated, the shared resource is directly acquired from the local HTTP service module.
Using the embodiment of the present invention, local HTTP service module is called, and using the local HTTP service module as multipageThe intermediary for providing resource sharing service is asked in interview, the money to being cached to local HTTP service module before any page in multi-pageSource is shared, and the cache access that have effectively achieved between same asset is shared, and makes other pages in multi-page when accessing,Resource preferentially can be obtained from local by the way of the http of local, i.e., directly acquire resource from local HTTP service module, andWithout realizing that the access of local cache is shared by specific form or the specific interface of exploitation, so as to reduce cost, dropLow access delay.
Brief description of the drawings
Fig. 1 is the one optional hardware architecture diagram of mobile terminal for realizing each embodiment of the present invention;
Fig. 2 is the communication system schematic diagram of mobile terminal as shown in Figure 1;
Fig. 3 is the schematic diagram for each side's hardware entities that information exchange is carried out in the embodiment of the present invention;
Fig. 4 realizes flow diagram for one method of the embodiment of the present invention;
Fig. 5 is the schematic diagram of one system architecture of the embodiment of the present invention;
Fig. 6-7 is to realize the schematic diagram that multi-page resource accesses in the prior art;
Fig. 8 is the schematic diagram accessed using the multi-page resource-sharing of one application scenarios of the embodiment of the present invention.
Embodiment
The implementation to technical solution is described in further detail below in conjunction with the accompanying drawings.
Describe to realize the mobile terminal of each embodiment of the present invention referring now to attached drawing.In follow-up description, useFor represent element such as " module ", " component " or " unit " suffix only for being conducive to the explanation of the embodiment of the present invention,Itself do not have specific meaning.Therefore, " module " can be used mixedly with " component ".
In the following detailed description, numerous details is set forth, thoroughly to understand the present invention.But, forFor those of ordinary skill in the art, it is clear that the present invention can be put into practice in the case of these no details.In other feelingsUnder condition, disclosed known method, process, component, circuit and network are not described in detail, to avoid embodiment is unnecessarily madeVarious aspects are smudgy.
In addition, herein although term " first ", " second " etc. is employed many times describe various elements (or various threshold values orVarious applications or various instructions or various operations) etc., but these elements (or threshold value or application or instruction or operation) should not be byThe limitation of these terms.These terms are only intended to distinguish an element (or threshold value or application or instruction or operation) and anotherElement (or threshold value or application or instruction or operation).For example, the first operation can be referred to as the second operation, the second operation can alsoIt is referred to as the first operation, without departing from the scope of the present invention, the first operation and the second operation are all operations, and simply the two is notIdentical operation.
Step in the embodiment of the present invention is not necessarily handled according to described sequence of steps, can be according to needAsk and step is selectively upset into rearrangement, either delete the step in the step or increase embodiment in embodiment, the present inventionStep description in embodiment is optional sequential combination, does not represent all sequence of steps combination of the embodiment of the present invention,Step order in embodiment is not construed as limiting the invention.
Term "and/or" in the embodiment of the present invention refers to including one or more of associated listed itemsAny and whole possibility combination.It may also be noticed that:Where used in this disclosure, "comprises/comprising" specifies what is statedFeature, integer, step, operation, the presence of element and/or component, but it is not excluded for other one or more features, integer, stepSuddenly, the presence or addition of operation, element and/or component and/or their group.
The intelligent terminal (such as mobile terminal) of the embodiment of the present invention can be implemented in a variety of manners.For example, the present invention is realApply mobile terminal described in example can include such as mobile phone, smart phone, laptop, digit broadcasting receiver,Personal digital assistant (PDA, Personal Digital Assistant), tablet computer (PAD), portable media playerMobile terminal and numeral TV, desktop computer of (PMP, Portable Media Player), guider etc. etc.Deng fixed terminal.Hereinafter it is assumed that terminal is mobile terminal.However, it will be understood by those skilled in the art that except especially usingOutside the element of mobile purpose, construction according to the embodiment of the present invention can also apply to the terminal of fixed type.
Fig. 1 is the one optional hardware architecture diagram of mobile terminal for realizing each embodiment of the present invention.
Mobile terminal 100 can include communication unit 110, audio/video (A/V) input unit 120, user input unit130th, HTTP service module 140, call unit 141, buffer unit 142, shared processing unit 143, output unit 150, displayUnit 151, storage unit 160, interface unit 170, processing unit 180 and power supply unit 190 etc..Fig. 1 is shown with eachThe mobile terminal of kind component, it should be understood that being not required for implementing all components shown.Can alternatively it implement moreOr less component.The element of mobile terminal will be discussed in more detail below.
Communication unit 110 generally includes one or more assemblies, it allows mobile terminal 100 and wireless communication system or netRadio communication between network (if mobile terminal replaced with fixed terminal, it is logical can also to carry out electricity by wired modeLetter).For example, communication unit can include when being specially wireless communication unit broadcast reception unit 111, mobile comm unit 112,At least one in wireless interconnected net unit 113, short-range communication unit 114 and positional information unit 115, these units are optional, can be with additions and deletions according to different demands.
Broadcast reception unit 111 receives broadcast singal and/or broadcast via broadcast channel from external broadcast management serverRelevant information.Broadcast channel can include satellite channel and/or terrestrial channel.Broadcast management server can be generated and sentThe broadcast singal and/or broadcast related information that the server or reception of broadcast singal and/or broadcast related information generate beforeAnd send it to the server of terminal.Broadcast singal can include TV broadcast singals, radio signals, data broadcastingSignal etc..Moreover, broadcast singal may further include the broadcast singal combined with TV or radio signals.Broadcast phaseClosing information can also provide via mobile communications network, and in this case, broadcast related information can be by mobile communication listMember 112 receives.Broadcast singal can exist in a variety of manners, for example, its can with digital multimedia broadcasting (DMB,Digital Multimedia Broadcasting) electronic program guides (EPG, Electronic Program Guide),The electronic service guidebooks of digital video broadcast-handheld (DVB-H, Digital Video Broadcasting-Handheld)The form of (ESG, Electronic Service Guide) etc. and exist.Broadcast reception unit 111 can be by using eachThe broadcast system of type receives signal broadcast.Especially, broadcast reception unit 111 can be by using such as multi-media broadcast- ground (DMB-T, Digital Multimedia Broadcasting-Terrestrial), digital multimedia broadcasting-is broadcast to defendStar (DMB-S, Digital Multimedia Broadcasting-Satellite), digital video broadcast-handheld (DVB-H),Radio Data System, the received terrestrial digital broadcasting synthesis of forward link media (MediaFLO, Media Forward Link Only)The numeral for servicing (ISDB-T, Integrated Services Digital Broadcasting-Terrestrial) etc. is wideBroadcast system receives digital broadcasting.Broadcast reception unit 111 may be constructed such that the various broadcast systems for being adapted to provide for broadcast singalAnd above-mentioned digit broadcasting system.The broadcast singal and/or broadcast related information received via broadcast reception unit 111 can be depositedStorage is in memory 160 (or other types of storage medium).
Mobile comm unit 112 sends radio signals to base station (for example, access point, node B etc.), exterior terminalAnd at least one in server and/or receive from it radio signal.Such radio signal can lead to including voiceTalk about signal, video calling signal or the various types of data for sending and/or receiving according to text and/or Multimedia Message.
Wireless interconnected net unit 113 supports the Wi-Fi (Wireless Internet Access) of mobile terminal.The unit can be internally or externallyIt is couple to terminal.Wi-Fi (Wireless Internet Access) technology involved by the unit can include Wireless LAN (Wi-Fi, WLAN,Wireless Local Area Networks), WiMAX (Wibro), worldwide interoperability for microwave accesses (Wimax), under high speedDownlink packet access (HSDPA, High Speed Downlink Packet Access) etc..
Short-range communication unit 114 is the unit for supporting junction service.Some examples of short-range communication technology include indigo plantTooth, radio frequency identification (RFID, Radio Frequency Identification), Infrared Data Association (IrDA, InfraredData Association), ultra wide band (UWB, Ultra Wideband), purple honeybee etc..
Positional information unit 115 is the unit for checking or obtaining the positional information of mobile terminal.Positional information unitTypical case be global positioning system (GPS, Global Positioning System).It is mono- according to current technology, GPSMember 115 calculates range information from three or more satellites and correct time information and for the Information application three of calculatingAngle, so as to calculate according to longitude, latitude and highly accurately three-dimensional current location information.Currently, for calculation positionThree satellites and the position calculated by using other satellite correction and time are used with the method for temporal informationThe error of information.In addition, GPS unit 115 can be by Continuous plus current location information in real time come calculating speed information.
A/V input units 120 are used to receive audio or video signal.A/V input units 120 can include 121 He of cameraMicrophone 122, camera 121 in video acquisition mode or image capture mode by image capture apparatus obtain static imagesOr the view data of video is handled.Picture frame after processing may be displayed on display unit 151.Handled through camera 121Picture frame afterwards can be stored in storage unit 160 (or other storage mediums) or is transmitted via communication unit 110,Two or more cameras 121 can be provided according to the construction of mobile terminal.Microphone 122 can be in telephone calling model, recordSound (voice data) is received via microphone in pattern, speech recognition mode etc. operational mode, and can be by asAcoustic processing is voice data.Audio (voice) data after processing can be converted in the case of telephone calling model can be throughThe form that mobile communication base station is sent to by mobile comm unit 112 exports.Microphone 122 can implement various types of noises(or suppression) algorithm is eliminated to eliminate the noise or interference that (or suppression) produces during receiving and sending audio signal.
User input unit 130 can generate key input data to control each of mobile terminal according to order input by userKind operation.User input unit 130 allows user to input various types of information, and can include keyboard, mouse, touch pad(for example, sensitive component of detection change of resistance, pressure, capacitance etc. caused by by contact), roller, rocking bar etc.Deng.Especially, when touch pad is superimposed upon on display unit 151 in the form of layer, touch-screen can be formed.
Local hypertext transfer protocol HTTP service module 140 is embedded with terminal local application, for for multipage interviewOffer resource sharing service is provided.The terminal further includes:Call unit 141, for starting the locally applied rear calling localHTTP service module.Buffer unit 142, for will load the resource that is had access to of first page as shared resource, and cachesInto the local HTTP service module.Shared processing unit 143, during for loading second page, passes through the side of local HTTPFormula accesses the local HTTP service module, and the shared resource is directly acquired from the local HTTP service module.
Interface unit 170 is connected the interface that can pass through as at least one external device (ED) with mobile terminal 100.For example,External device (ED) can include wired or wireless head-band earphone port, external power supply (or battery charger) port, wired or nothingLine data port, memory card port, the port for connecting the device with recognition unit, audio input/output (I/O) endMouth, video i/o port, ear port etc..Recognition unit can be that storage is used to verify that user uses each of mobile terminal 100Kind of information and can include user identification unit (UIM, User Identify Module), client's recognition unit (SIM,Subscriber Identity Module), Universal Subscriber recognition unit (USIM, Universal SubscriberIdentity Module) etc..In addition, the device with recognition unit (hereinafter referred to as " identification device ") can take intelligenceThe form of card, therefore, identification device can be connected via port or other attachment devices with mobile terminal 100.Interface unit 170It can be used for receiving the input (for example, data message, electric power etc.) from external device (ED) and transmit the input receivedOne or more elements in mobile terminal 100 can be used for transmitting data between mobile terminal and external device (ED).
In addition, when mobile terminal 100 is connected with external base, interface unit 170 may be used as allowing by it by electricityPower provides to the path of mobile terminal 100 from base or may be used as allowing to pass through it from the various command signals that base inputsIt is transferred to the path of mobile terminal.It may be used as being used to identify that mobile terminal is from the various command signals or electric power of base inputThe no signal being accurately fitted within base.Output unit 150 is configured to provide with vision, audio and/or tactile manner defeatedGo out signal (for example, audio signal, vision signal, vibration signal etc.).Output unit 150 can include display unit 151, soundFrequency output unit 152 etc..
Display unit 151 may be displayed in mobile terminal 100 information handled.For example, mobile terminal 100 can be shownRelevant user interface (UI, User Interface) or graphic user interface (GUI, Graphical User Interface).When mobile terminal 100 is in video calling pattern or image capture mode, display unit 151 can show the image of captureAnd/or image, the UI or GUI etc. that show video or image and correlation function received.
Meanwhile when display unit 151 and touch pad in the form of layer it is superposed on one another to form touch-screen when, display unit151 may be used as input unit and output device.Display unit 151 can include liquid crystal display (LCD, LiquidCrystal Display), thin film transistor (TFT) LCD (TFT-LCD, Thin Film Transistor-LCD), organic light-emitting diodesManage in (OLED, Organic Light-Emitting Diode) display, flexible display, three-dimensional (3D) display etc.It is at least one.Some in these displays may be constructed such that transparence to allow user to be watched from outside, this is properly termed asTransparent display, typical transparent display can be, for example, transparent organic light emitting diode (TOLED) display etc..According toSpecific desired embodiment, mobile terminal 100 can include two or more display units (or other display devices), exampleSuch as, mobile terminal can include outernal display unit (not shown) and inner display unit (not shown).Touch-screen can be used for examiningSurvey touch input pressure and touch input position and touch input area.
Audio output unit 152 can mobile terminal be in call signal reception pattern, call mode, logging mode,Speech recognition mode, broadcast reception mode are receiving or deposit in memory 160 by communication unit 110 when under isotypeThe voice data transducing audio signal of storage and to export be sound.Moreover, audio output unit 152 can provide and mobile terminalThe 100 relevant audio output of specific function performed (for example, call signal receives sound, message sink sound etc.).AudioOutput unit 152 can include loudspeaker, buzzer etc..
Storage unit 160 can store software program of the processing performed by processing unit 180 and control operation etc., orPerson can temporarily store oneself data (for example, telephone directory, message, still image, video etc.) through exporting or will export.Moreover, storage unit 160 can store vibration and the audio letter of the various modes on being exported when touching and being applied to touch-screenNumber data.
Storage unit 160 can include the storage medium of at least one type, the storage medium include flash memory, hard disk,Multimedia card, card-type memory (for example, SD or DX memories etc.), random access storage device (RAM, Random AccessMemory), static random-access memory (SRAM, Static Random Access Memory), read-only storage (ROM,Read Only Memory), electrically erasable programmable read-only memory (EEPROM, Electrically ErasableProgrammable Read Only Memory), programmable read only memory (PROM, Programmable Read OnlyMemory), magnetic storage, disk, CD etc..Moreover, mobile terminal 100 can be with performing storage list by network connectionThe network storage device cooperation of the store function of member 160.
Processing unit 180 usually controls the overall operation of mobile terminal.For example, processing unit 180 perform with voice communication,The relevant control of data communication, video calling etc. and processing.And for example, processing unit 180 can with execution pattern identifying processing, withInput is drawn into the handwriting input performed on the touchscreen or picture and are identified as character or image.
Power supply unit 190 receives external power or internal power under the control of processing unit 180 and provides operation respectivelyAppropriate electric power needed for element and component.
Various embodiments described herein can with using such as computer software, hardware or any combination thereof calculatingMachine computer-readable recording medium is implemented.Implement for hardware, embodiment described herein can be by using application-specific IC(ASIC, Application Specific Integrated Circuit), digital signal processor (DSP, DigitalSignal Processing), digital signal processing device (DSPD, Digital Signal Processing Device), canProgrammed logic device (PLD, Programmable Logic Device), field programmable gate array (FPGA, FieldProgrammable Gate Array), processor, controller, microcontroller, microprocessor, be designed to perform it is described hereinAt least one of the electronic unit of function implement, in some cases, such embodiment can be in controller 180Middle implementation.For software implementation, the embodiment of such as process or function can be with allowing to perform at least one functions or operationsSingle software unit implement.Software code can be by the software application write with any appropriate programming language(or program) is implemented, and software code can be stored in memory 160 and be performed by controller 180.
So far, oneself according to its function through describing mobile terminal.In the following, for the sake of brevity, will description such as folded form,Slide type mobile terminal in various types of mobile terminals of board-type, oscillating-type, slide type mobile terminal etc., which is used as, to be shownExample.Therefore, the present invention can be applied to any kind of mobile terminal, and be not limited to slide type mobile terminal.
Mobile terminal 100 as shown in Figure 1 may be constructed such that using via frame or packet transmission data it is all if anyLine and wireless communication system and satellite-based communication system operate.
The communication system that can be operated referring now to Fig. 2 descriptions mobile terminal wherein according to embodiments of the present invention.
Such communication system can use different air interface and/or physical layer.For example, used by communication systemAir interface includes such as frequency division multiple access (FDMA, Frequency Division Multiple Access), time division multiple acess(TDMA, Time Division Multiple Access), CDMA (CDMA, Code Division MultipleAccess) and Universal Mobile Communication System (UMTS, Universal Mobile Telecommunications System) is (specialNot, Long Term Evolution (LTE, Long Term Evolution)), global system for mobile communications (GSM) etc..As unrestrictedProperty example, following description is related to cdma communication system, but such teaching is equally applicable to other types of system.
With reference to figure 2, cdma wireless communication system can include multiple mobile terminals 100, multiple base station (BS, BaseStation) 270, base station controller (BSC, Base Station Controller) 275 and mobile switching centre (MSC,Mobile Switching Center)280.MSC280 is configured to and Public Switched Telephony Network (PSTN, PublicSwitched Telephone Network) 290 formation interfaces.MSC280 is also structured to can be coupled via back haul linkBSC275 to base station 270 forms interface.Back haul link can be constructed according to any of some known interfaces, describedInterface includes such as E1/T1, ATM, IP, PPP, frame relay, HDSL, ADSL or xDSL.It will be appreciated that as shown in Figure 2System can include multiple BSC275.
Each BS 270 can service one or more subregions (or region), by multidirectional antenna or the day of direction specific directionEach subregion of line covering is radially away from BS 270.Alternatively, each subregion can by two for diversity reception or moreMultiple antennas covers.Each BS 270, which may be constructed such that, supports multiple frequency distribution, and each frequency distribution has specific frequencyCompose (for example, 1.25MHz, 5MHz etc.).
What subregion and frequency were distributed, which intersects, can be referred to as CDMA Channel.BS 270 can also be referred to as base station transceiverSystem (BTS, Base Transceiver Station) or other equivalent terms.In this case, term " base station "It can be used for broadly representing single BSC275 and at least one BS 270.Base station can also be referred to as " cellular station ".It is alternatively, specialMultiple cellular stations can be referred to as by determining each subregion of BS 270.
As shown in Figure 2, broadcast singal is sent to by broadcsting transmitter (BT, Broadcast Transmitter) 295The mobile terminal 100 of operation in system.Broadcast reception unit 111 as shown in Figure 1 is arranged at mobile terminal 100 to connectReceive the broadcast singal sent by BT295.In fig. 2 it is shown that several satellites 300, such as global positioning system can be used(GPS) satellite 300.Satellite 300 helps to position at least one in multiple mobile terminals 100.
In fig. 2, multiple satellites 300 are depicted, it is understood that, any number of satellite can be utilized to obtain usefulLocation information.Positional information unit 115 as shown in Figure 1 is generally configured to coordinate what is to obtain wanted with satellite 300Location information.Substitute GPS tracking techniques or outside GPS tracking techniques, the position that can track mobile terminal can be usedOther technologies.In addition, at least one gps satellite 300 can optionally or additionally handle satellite dmb transmission.
As a typical operation of wireless communication system, BS 270 receives the reverse strand from various mobile terminals 100Road signal.Mobile terminal 100 usually participates in call, information receiving and transmitting and other types of communication.Certain base station 270 receives eachReverse link signal is handled in specific BS 270.The data of acquisition are forwarded to relevant BSC275.BSC provides logicalTalk about resource allocation and the mobile management function of the coordination including the soft switching process between BS 270.BSC275 will also be receivedData are routed to MSC280, it provides the extra route service for being used for that interface to be formed with PSTN290.Similarly, PSTN290 withMSC280 forms interface, and MSC and BSC275 form interface, and BSC275 correspondingly controls BS 270 with by forward link signalsIt is sent to mobile terminal 100.
The mobile comm unit 112 of communication unit 110 is based on the access mobile communication built in mobile terminal in mobile terminalNecessary data (including customer identification information and authentication information) the access movement of network (such as 2G/3G/4G mobile communications networks)It is (including upper that the business such as communication network is the web page browsing of mobile terminal user, network multimedia plays transmit mobile dataCapable mobile data and the mobile data of downlink).
The wireless interconnected net unit 113 of communication unit 110 realizes nothing by running the related protocol function of hotspotThe function of line hot spot, hotspot supports multiple mobile terminal (any mobile terminal outside mobile terminal) accesses, by multipleWeb page browsing, the net of mobile terminal user are connected as with the mobile communication between mobile comm unit 112 and mobile communications networkThe business such as network multimedia transmission mobile data (including the mobile data of uplink and the mobile communication number of downlinkAccording to), since mobile terminal is substantially the mobile communication connection transmission mobile communication between multiplexing mobile terminal and communication networkData, therefore the flow of the mobile data of mobile terminal consumption is included in mobile terminal by the charging entity of communication network sidePost and telecommunication tariff, so as to consume the data traffic for the mobile data that the post and telecommunication tariff that uses of mobile terminal signing includes.
Fig. 3 is the schematic diagram for each side's hardware entities that information exchange is carried out in the embodiment of the present invention, and Fig. 3 includes:TerminalEquipment 1, server 2.Wherein, terminal device 1 is made of terminal device 11-13, and terminal device passes through cable network or wirelessNetwork carries out information exchange with server.Terminal device includes the types such as mobile phone, desktop computer, PC machine, all-in-one machine.Using the present inventionEmbodiment, terminal device 1 is transmitted and interacted into row information with server 2 via network, specifically, terminal device can be by interiorEmbedding local HTTP service module accesses between locally applied multi-page provides resource sharing service, when page access needs to makeDuring with resource, first determine whether locally to whether there is the resource sharing service, if it is, going in the form of local http requestResource is sought, so as to the resource preferentially asked from local HTTP service module, if inquired about in local HTTP service moduleLess than the resource of request, long-range http request is just initiated to the server of opposite end by network, to be asked based on networkResource.By calling local HTTP service module, and the local HTTP service module is accessed as multi-page resource is providedThe intermediary of shared service, shares the resource that local HTTP service module is cached to before any page in multi-page, hasThe cache access realized between same asset to effect is shared, and other pages in multi-page is used local when accessingThe mode of http preferentially obtains resource from local, i.e., resource is directly acquired from local HTTP service module, without by specificForm or exploitation specific interface realize that the access of local cache is shared, so as to reduce cost, reduce access delay.
Specifically, terminal device it is locally applied in be embedded with local HTTP service module, the processing logic 10 of execution is such asShown in Fig. 3, including:S1, start the locally applied rear calling local HTTP service module, passes through the local HTTP service mouldBlock accesses for multi-page and provides resource sharing service;S2, will load the resource that is had access to of first page as shared resource, andIt is cached in the local HTTP service module;When S3, loading second page, the local is accessed by way of local HTTPHTTP service module, the shared resource is directly acquired from the local HTTP service module.
The example of above-mentioned Fig. 3 is a system architecture example for realizing the embodiment of the present invention, and the embodiment of the present invention is notIt is limited to the system structure described in above-mentioned Fig. 3, based on the system architecture described in above-mentioned Fig. 3, proposes each embodiment of the method for the present invention.
The method of a kind of resource-sharing of the embodiment of the present invention, as shown in figure 4, being embedded with local in terminal local applicationHTTP service module, in practical applications, the local HTTP service module can be local HTTP server, it is different from remotelyHTTP server, to be embedded in the local HTTP server of terminal local.The described method includes:Start locally applied rear callingThe local HTTP service module, is accessed for multi-page by the local HTTP service module and provides resource sharing service(101).Here, the multi-page is accessed and included:The locally applied primary page (such as Native pages) and locally applied embeddedWeb page between access.The resource that loading first page is had access to is cached to the local as shared resourceIn HTTP service module (102).When loading second page, the local HTTP service mould is accessed by way of local HTTPBlock, the shared resource (103) is directly acquired from the local HTTP service module.Specifically, for caching resource andFor resource-sharing based on the caching, for multi-page, the money of any one page access in the Native pages or web pageSource, 1) one kind specific implementation:For example first page is the Native pages, second page is web page or Native pages otherFace, then second page can directly access cache to local HTTP service mould resource in the block, that is to say, that pass through local HTTPThe off-line data of mode reading terminals local, without networking and being gone in a manner of long-range HTTP opposite end remote download instituteThe data needed.2) another specific implementation:For example first page is web page, second page is the Native pages, thenTwo pages can directly access cache to local HTTP service mould resource in the block, that is to say, that read by local HTTP modesThe off-line data of terminal local is taken, without networking and going opposite end remote download required in a manner of long-range HTTPData.
Problems of the prior art are:Authority resource can not carry out WEB page and share;Lack scalability and causeBoth ends it is inconvenient for use.It is local by starting in APP client backgrounds in a practical application using the embodiment of the present inventionThe mode of HTTP server, can be first caching resources such as videos into local HTTP server, and then embedded web page leads toThe mode for crossing local HTTP accesses local HTTP server, and finally, web page is directly obtained and made from local HTTP serverWith authority resource, and then realize resource-sharing, reduce access delay.In simple terms, the resource of APP clients passes through bridge serviceDevice (or intermediary server), such as local HTTP server realization is shared with the embedded direct resource of web page, afterwards,Web page can be realized home server (by way of local http) and authority resource file is directly acquired.
A kind of method of resource-sharing of the embodiment of the present invention, local HTTP service mould is embedded with terminal local applicationBlock, in practical applications, the local HTTP service module can be local HTTP server, it is different from long-range HTTP serviceDevice, to be embedded in the local HTTP server of terminal local.The described method includes:It is locally applied to be started in a manner of background processThe local HTTP service module, the local HTTP service module is determined as in the first page and the second pageBetween realize the resource intermediary of resource-sharing.First page is got and the relevant money of second page by local HTTP service moduleSource;And/or second page by local HTTP service module get with the relevant resource of first page so that start it is local shouldWith rear by calling the local HTTP service module, the local HTTP service module is set to support to provide money for multi-page accessSource shared service.In one practical application, when APP client terminal start-ups, start whole application in a manner of background processResource-sharing, using embedded local HTTP server as the Native pages and intermediary's resource sharing service of web pageDevice, the Native pages can obtain web resource by intermediary's resource sharing service device, and likewise, web page can also pass through intermediaryResource sharing service obtains Native resources.
Here, the multi-page is accessed and included:The locally applied primary page (such as Native pages) and locally applied interiorAccess between embedding web page.The resource that loading first page is had access to is cached to the local as shared resourceIn HTTP service module.When loading second page, the local HTTP service module is accessed by way of local HTTP, from instituteState in local HTTP service module and directly acquire the shared resource.Specifically, resource for caching and based on the cachingFor resource-sharing, for multi-page, the resource of any one page access in the Native pages or web page, 1) a kind of toolBody is realized:For example first page is the Native pages, second page is web page or other Native pages, then second pageCan directly access cache to local HTTP service mould resource in the block, that is to say, that pass through local HTTP modes reading terminalsLocal off-line data, without networking and being gone in a manner of long-range HTTP the required data of opposite end remote download.2) another specific implementation:For example first page is web page, second page is the Native pages, then second page can be straightReceiving, which is asked, is cached to local HTTP service mould resource in the block, that is to say, that local by local HTTP modes reading terminalsOff-line data, without networking and being gone in a manner of long-range HTTP the required data of opposite end remote download.
Problems of the prior art are:Authority resource can not carry out WEB page and share;Lack scalability and causeBoth ends it is inconvenient for use.It is local by starting in APP client backgrounds in a practical application using the embodiment of the present inventionThe mode of HTTP server, can be first caching resources such as videos into local HTTP server, and then embedded web page leads toThe mode for crossing local HTTP accesses local HTTP server, and finally, web page is directly obtained and made from local HTTP serverWith authority resource, and then realize resource-sharing, reduce access delay.In simple terms, the resource of APP clients passes through bridge serviceDevice (or intermediary server), such as local HTTP server realization is shared with the embedded direct resource of web page, afterwards,Web page can be realized home server (by way of local http) and authority resource file is directly acquired.
In practical applications, if the first page is the locally applied primary page, the second page is answered to be localWith embedded web page, then during the loading second page, the local HTTP service mould is accessed by way of local HTTPBlock, the shared resource is directly acquired from the local HTTP service module, including:Initiating HTTP by second page pleaseAsk, by HTTP request described in the local HTTP service block intercepts, parse the feature ginseng included in the HTTP requestNumber meets the acquisition condition of the shared resource, the HTTP request is responded by the local HTTP service module, by described inShared resource feeds back to second page, to generate webpage information according to the shared resource, renders to obtain according to the webpage informationSecond page after information updating.
Based on above-mentioned each embodiment, in the method for resource-sharing, the feature included in the HTTP request is parsedParameter meets the acquisition condition of the shared resource, including:
One, when the characteristic parameter extracted from the HTTP request is resource path, judge that the resource path isIt is no consistent with the path of the shared resource, if unanimously, meeting the acquisition condition of the shared resource.Such as Yong HuSome Native page access to static resource (such as picture, video) be cached in the local HTTP server of startup, shouldStatic resource is as caching, in case other Native pages or embedded Web page use.If some money in Web pageSource path is consistent with the static resource path cached, just intercepts and captures the address of the resource path, replaces with home server address, leads toThe resource of home server return cache is crossed to Web page.
Two, when the characteristic parameter extracted from the HTTP request is resource name, judge that the resource name isIt is no consistent with the title of the shared resource, if unanimously, meeting the acquisition condition of the shared resource.Such as Yong HuSome Native page access to static resource (picture, video etc.) be cached in the local HTTP server of startup, this is quietState resource is as caching, in case other Native pages or embedded Web page use.If some resource in Web pageTitle is consistent with the static resource name cached, just intercepts and captures the address in the resource name corresponding resource path, replaces with local clothesBusiness device address, by the resource of home server return cache to Web page.
It is described as follows for the Native pages, Web page:
There are three kinds of forms for mobile application:(primary) applications of Native, Web applications, mixing application, correspond to different respectivelyPage format.1) Native applications refer to the application developed with the specific development language of platform, i.e.,:Based on smart mobile phone sheetGround operating system and the third party application that operation is write using primary formula.2) Web applications are mainly using unified standardHTML (Hyper Text Mark-up Language, hypertext markup language), JavaScript (java script), CSSThe application of web page program language developments such as (Cascading Style Sheet, cascading styles), i.e.,:Web applications are operate in netOn network and standard browser, the application of specific function is realized based on web technologies exploitation, can be accessed by terminal browser shouldClass application, and such application can be cross-platform.3) mixing application refers to merge Native using the application with Web applications.
Using the embodiment of the present invention, the resources of APP clients by local HTTP server be used as bridge server or inJie's server, realization is shared with the direct resources of embedded webview, and Web page avoids this by local HTTP serverThe authority limitation of ground resource, to realize the utilization of local cache resource, maximumlly shares due to realizing local resource, so thatReduce network bandwidth consumption, reduce server stress, reduce network delay, accelerate page open speed.It is and rightWhole Web developer is fully transparent, utilizes follow-up extension.
The system of the resource-sharing of the embodiment of the present invention, as shown in figure 5, including terminal 41 and server 42.Terminal device41 transmit and interact into row information with server 42, specifically, terminal device can pass through embedded local HTTP service moduleAccessed between locally applied multi-page and resource sharing service is provided, when page access needs to use resource, first determine whether thisGround whether there is the resource sharing service, if it is, request resource is gone in the form of local http request, so as to preferentially from thisThe resource asked in ground HTTP service module, if inquiry is just led to less than the resource of request in local HTTP service moduleCross network and initiate long-range http request to the server of opposite end, so as to the resource asked based on network.It is local by callingHTTP service module, and the local HTTP service module is accessed to the intermediary for providing resource sharing service as multi-page, to moreThe resource that local HTTP service module is cached to before any page in the page is shared, and have effectively achieved between same assetCache access share, make other pages in multi-page when accessing, can be by the way of the http of local preferentially from localResource is obtained, i.e., directly acquires resource from local HTTP service module, without specifically being connect by specific form or exploitationMouthful realize that the access of local cache is shared, so as to reduce cost, reduce access delay.Terminal device 41 specifically includes:Local hypertext transfer protocol HTTP service module 411 is embedded with terminal local application, money is provided for being accessed for multi-pageSource shared service;The terminal further includes:Call unit 412, for starting the locally applied rear calling local HTTP serviceModule;Buffer unit 413, for will load the resource that is had access to of first page as shared resource, and is cached to describedIn ground HTTP service module;Shared processing unit 413, during for loading second page, institute is accessed by way of local HTTPLocal HTTP service module is stated, the shared resource is directly acquired from the local HTTP service module.
In practical applications, local HTTP service module is embedded with terminal local application, the local HTTP service mouldBlock can be local HTTP server, it is different from long-range HTTP server, to be embedded in the local HTTP of terminal local clothesBusiness device.Start the locally applied rear calling local HTTP service module, be multi-page by the local HTTP service moduleAccess and resource sharing service is provided.Here, the multi-page is accessed and included:The locally applied primary page (such as Native pages)Access between locally applied embedded web page.The resource that loading first page is had access to is delayed as shared resourceIt is stored in the local HTTP service module.When loading second page, the local HTTP is accessed by way of local HTTPService module, the shared resource is directly acquired from the local HTTP service module.Specifically, for caching resource andFor resource-sharing based on the caching, for multi-page, the money of any one page access in the Native pages or web pageSource, 1) one kind specific implementation:For example first page is the Native pages, second page is web page or Native pages otherFace, then second page can directly access cache to local HTTP service mould resource in the block, that is to say, that pass through local HTTPThe off-line data of mode reading terminals local, without networking and being gone in a manner of long-range HTTP opposite end remote download instituteThe data needed.2) another specific implementation:For example first page is web page, second page is the Native pages, thenTwo pages can directly access cache to local HTTP service mould resource in the block, that is to say, that read by local HTTP modesThe off-line data of terminal local is taken, without networking and going opposite end remote download required in a manner of long-range HTTPData.
In one embodiment of the embodiment of the present invention, the call unit, is further used for:Opened in a manner of background processThe dynamic local HTTP service module, the local HTTP service module is determined as in the first page and the second pageThe resource intermediary of resource-sharing is realized between face.The HTTP service module, is further used for:As in the resource of resource-sharingIt is situated between, supports the first page to get and the relevant resource of second page;And/or the second page is supported to get and theThe relevant resource of one page.
In one embodiment of the embodiment of the present invention, the multi-page, which accesses, to be included:The locally applied primary page and sheetAccess between the embedded web page of ground application.
In one embodiment of the embodiment of the present invention, the shared processing unit, being further used for the first page isThe locally applied primary page, in the case that the second page is locally applied embedded web page, is initiated by second pageHTTP request.The local HTTP service module, is further used for:The HTTP request is intercepted, parses the HTTP requestIn the characteristic parameter that includes meet the acquisition condition of the shared resource;The HTTP request is responded, the shared resource is anti-Feed second page.
In one embodiment of the embodiment of the present invention, the local HTTP service module, is further used for:
When the characteristic parameter extracted from the HTTP request is resource path, judge the resource path whether withThe path of the shared resource is consistent, if unanimously, meeting the acquisition condition of the shared resource.
In one embodiment of the embodiment of the present invention, the local HTTP service module, is further used for:
When the characteristic parameter extracted from the HTTP request is resource name, judge the resource name whether withThe title of the shared resource is consistent, if unanimously, meeting the acquisition condition of the shared resource.
Wherein, for the processor for data processing, when performing processing, microprocessor, center can be usedProcessor (CPU, Central Processing Unit), digital signal processor (DSP, Digital SingnalProcessor) or programmable logic array (FPGA, Field-Programmable Gate Array) is realized;For storageFor medium, comprising operational order, which can be computer-executable code, be realized by the operational orderEach step in embodiments of the present invention information processing method flow.
It need to be noted that be:Above is referred to the description of terminal and server item, be with above method description it is similar,Beneficial effect with method describes, and does not repeat.For the ins and outs not disclosed in terminal and server embodiment of the present invention,It refer to content described by the embodiment of the method for the present invention flow description.
The embodiment of the present invention is described below by taking a practical application scene as an example:
It is that efficient app is provided with web authorities using the embodiment of the present invention in the resource-sharing scene that multi-page accessesSource cache secret sharing.Involved technical terms includes:1) cache:Temporal locality (the Temproral accessed using clientLocality) principle, a copy is stored by the content that client accessed in caching (Cache), when the content is interviewed next timeWhen asking, it is not necessary to be connected to server, but the copy by retaining in Cache provides.2) APP clients:App in mobile applicationsThe carrier of content.3) the Native pages:The page write using client-side technology (such as java or Object-c).4) embedwebview:Web carriers embed browser in moblie applications.5) Web page:Using embedded webview, write by WebWeb page.6) authority resource:Since the authority of web limits, cause cannot to read by web technology local resource (such as regardingFrequently, the resource such as file).
At present in mobile APP applications, in order to which equilibrium development efficiency and performance perspective are set out, a large amount of APP applications are mixedMiscellaneous the primary Native pages and Web page mixing, result in a problem:Identical resource possibly be present at Native pagesIt is also possible to appear in embedded Web page while face, more containers of identical authority resource how is realized by certain mechanismCaching is shared to become problem to be solved.
In view of the above-mentioned problems, in the prior art, the mode that Web page is shared with Native page caches in common APPThere are two kinds, be respectively:1) mode wrapped offline and the mode for 2) caching JSAPI are cached.It is also pin that common information sharing, which utilizes,Both of these case is formulated.For caching the mode wrapped offline, as shown in fig. 6, in the case of normal, Web page pleaseSeeking static resource, -- client interception request -- distorting HTTP request head -- returns to the cache resources in offline bag, passes through this sideFormula, since caching resource is in many hard disks, hit static resource can reduce network request, can improve and show speed.It is just slowFor the mode for depositing JSAPI, as shown in fig. 7, in the case of normal, Web page notifies client by JSAPI -- client is sent outPlay the data that request of data -- buffer network data to memory -- Web calling interfaces obtain memory.
Traditional Web page and Native page cache data interactions, primarily directed to two kinds of above-mentioned scenes, still,Deposit problem both ways, first aspect:For the authority resource (such as video file etc.) in Web page, due to WebView'sSecurity restriction, can not use local resource by primary mode, cause this kind of resource that repeats to be obtained by network request.Second aspect:Since two ways is using be required for just can be real by specified form or the corresponding client-side interface of exploitationExisting resource is shared, so as to cause the difficulty of extension.
In view of the above-mentioned problems, using the embodiment of the present invention, the http protocol based on home server, devise efficiently, intoRipe, general this programme, specifically, being the mode for starting home server in APP client backgrounds, APP clients can first handleThen the caching resources such as video embed web page and home server are accessed by way of HTTP, finally in fact to home serverExisting WebView is obtained and access right resource, and then realizes resource-sharing, reduces access delay.
In the resource-sharing scene that multi-page accesses, using the embodiment of the present invention, for the shortcoming of existing scheme:Shared 1. authority resource can not carry out WEB page;2. lacking scalability causes the inconvenient for use of both ends, in client terminal start-upWhen, start the resource-sharing entirely applied in a manner of background process, using local HTTP server as the Native pages withAnd intermediary's resource sharing service device of the WebView pages, the Native pages can obtain Web moneys by intermediary's resource sharing service deviceSource, and likewise, Web page can also obtain Native resources by intermediary's resource sharing service, as shown in Figure 8.
Using the embodiment of the present invention, in a practical application, in APP start-up courses, backstage starts embedded localHTTP server is as intermediary server.The static resource (picture, video etc.) that user arrives in some Native page access is slowIt is stored in the HTTP server of startup, as caching in case other Native pages or embedded Web page use.If WebSome resource path and title in the page is consistent with the static resource path cached, and APP public modules can intercept and capture the address,Home server address 127.0.0.1 is replaced with, passes through the resource of home server return cache.Web page passes through localHTTP server avoids local resource authority from limiting the utilization for realizing local cache resource, and complete to whole Web developerIt is transparent, so as to solve the problems, such as autgmentability.
In several embodiments provided herein, it should be understood that disclosed apparatus and method, can pass through itIts mode is realized.Apparatus embodiments described above are only schematical, for example, the division of the unit, is onlyA kind of division of logic function, can have other dividing mode, such as when actually realizing:Multiple units or component can combine, orAnother system is desirably integrated into, or some features can be ignored, or do not perform.In addition, shown or discussed each composition portionPoint mutual coupling or direct-coupling or communication connection can be the INDIRECT COUPLINGs by some interfaces, equipment or unitOr communication connection, can be electrical, mechanical or other forms.
The above-mentioned unit illustrated as separating component can be or may not be physically separate, be shown as unitThe component shown can be or may not be physical location, you can positioned at a place, can also be distributed to multiple network listsIn member;Partly or entirely unit therein can be selected to realize the purpose of this embodiment scheme according to the actual needs.
In addition, each functional unit in various embodiments of the present invention can be fully integrated into a processing unit, also may be usedTo be each unit individually as a unit, can also two or more units integrate in a unit;It is above-mentionedIntegrated unit can both be realized in the form of hardware, can also be realized in the form of hardware adds SFU software functional unit.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above method embodiment can pass throughThe relevant hardware of programmed instruction is completed, and foregoing program can be stored in a computer read/write memory medium, the programUpon execution, the step of execution includes above method embodiment;And foregoing storage medium includes:It is movable storage device, read-onlyMemory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc orPerson's CD etc. is various can be with the medium of store program codes.
If alternatively, the above-mentioned integrated unit of the present invention is realized in the form of SFU software functional unit and is used as independent productSale in use, can also be stored in a computer read/write memory medium.Based on such understanding, the present invention is implementedThe part that the technical solution of example substantially in other words contributes the prior art can be embodied in the form of software product,The computer software product is stored in a storage medium, including some instructions are used so that computer equipment (can be withIt is personal computer, server or network equipment etc.) perform all or part of each embodiment the method for the present invention.And foregoing storage medium includes:Movable storage device, ROM, RAM, magnetic disc or CD etc. are various can be with store program codesMedium.
The above description is merely a specific embodiment, but protection scope of the present invention is not limited thereto, anyThose familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, should all be containedCover within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.