CN110333912A - A kind of method, apparatus and computer readable storage medium of small routine data pre-fetching - Google Patents

A kind of method, apparatus and computer readable storage medium of small routine data pre-fetching Download PDF

Info

Publication number
CN110333912A
CN110333912A CN201910625169.9A CN201910625169A CN110333912A CN 110333912 A CN110333912 A CN 110333912A CN 201910625169 A CN201910625169 A CN 201910625169A CN 110333912 A CN110333912 A CN 110333912A
Authority
CN
China
Prior art keywords
small routine
server
request
prefetched
card
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910625169.9A
Other languages
Chinese (zh)
Other versions
CN110333912B (en
Inventor
陈都
付嘉兴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201910625169.9A priority Critical patent/CN110333912B/en
Publication of CN110333912A publication Critical patent/CN110333912A/en
Application granted granted Critical
Publication of CN110333912B publication Critical patent/CN110333912B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • G06F9/4484Executing subprograms

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the present invention proposes the method, apparatus and computer readable storage medium of a kind of small routine data pre-fetching, and wherein method includes: to receive the address for prefetching material of the small routine from first server;Request is prefetched to second server corresponding with address transmission;It receives the described of second server return and prefetches material;Load the frame of the small routine;Material is prefetched described in load during calling the life cycle function of the small routine.It is obtained in advance before small routine starting and prefetches material, when small routine is accessed, transferred from client-cache and prefetch material.In addition, the step of transferring is parallel the step of can be with the frame of the load small routine, to improve the opening speed of small routine.

Description

A kind of method, apparatus and computer readable storage medium of small routine data pre-fetching
Technical field
The present invention relates to field of computer technology more particularly to a kind of method, apparatus and calculating of small routine data pre-fetching Machine readable storage medium storing program for executing.
Background technique
Small routine may include not needing the i.e. workable application of downloading installation.It can be in the installed application of equipment It is embedded in small routine.
It is generally comprised in the process of small routine starting, first loads the frame of small routine, call the life cycle of small routine, Material is obtained after one life cycle.The material may include the first screen rendering data after small routine is turned on.That is, small routine Service request data is encapsulated in small routine interior business logic.And the material prefetched is small routine host's applied customization , do not support the customized of developer to prefetch.Small routine host application can be the application for showing small routine entrance, by small Program host clicks small routine entrance, triggering small routine starting.Due to can not broken shell obtain to small routine service request, nothing Method accomplishes to prefetch small routine material.The related life cycle events for needing small routine developer to open small routine in user return It can be called in tune, opportunity, relatively late user's perception was obvious.
Therefore, the start-up course of small routine is serial process, causes small routine starting speed slow, user experience is bad.
Summary of the invention
The embodiment of the present invention provides the method, apparatus and computer readable storage medium of a kind of small routine data pre-fetching, with Solve one or more technical problems in the prior art.
In a first aspect, the embodiment of the invention provides a kind of methods of small routine data pre-fetching, comprising:
Receive the address for prefetching material of the small routine from first server;
Request is prefetched to second server corresponding with address transmission;
It receives the described of second server return and prefetches material;
Load the frame of the small routine;
Material is prefetched described in load during calling the life cycle function of the small routine.
In one embodiment, further includes:
The configuration parameter for prefetching material of the small routine from first server is received, the configuration parameter be for delimiting Prefetch need to download in the address of material prefetch material;
It sends and is prefetched in request including the configuration parameter for prefetching material to second server corresponding with the address;
It receives the corresponding with the configuration parameter for prefetching material of second server return and prefetches material.
In one embodiment, further includes:
Receive the card data of the small routine from the first server;
The card of the small routine is shown according to the card data of the small routine.
It is in one embodiment, described to prefetch request to second server corresponding with address transmission, comprising:
In response to the clicking operation of the card to the small routine, request is prefetched described in the transmission of Xiang Suoshu second server.
It is in one embodiment, described to prefetch request to second server corresponding with address transmission, comprising:
In the case where showing the card of the small routine, request is prefetched described in the transmission of Xiang Suoshu second server.
In one embodiment, the frame of the small routine is loaded, comprising:
In response to the clicking operation of the card to the small routine, access instruction is generated;
The frame of the small routine is loaded in response to the access instruction.
In one embodiment, further includes:
In the database, according to the identification information of each small routine, the small routine is prefetched into material using sandbox The mode of isolation is stored to database.
Second aspect, the embodiment of the invention provides a kind of devices of small routine data pre-fetching, comprising:
Address receiving module, for receiving the address for prefetching material of the small routine from first server;
Request sending module is prefetched, for prefetching request to second server corresponding with address transmission;
Material receiving module is prefetched, prefetches material described in the second server return for receiving;
Frame loading module, for loading the frame of the small routine;
Material loading module is prefetched, it is described pre- for being loaded during calling the life cycle function of the small routine Take material.
In one embodiment, further includes:
Configuration parameter receiving module, for receiving the configuration parameter for prefetching material of the small routine from first server, The configuration parameter be used for delimit need to download in the address for prefetching material prefetch material;
The request sending module that prefetches prefetches in request to second server corresponding with address transmission including institute State the configuration parameter for prefetching material;
It is described prefetch that material receiving module receives that the second server returns it is described prefetch in material include with it is described The configuration parameter for prefetching material corresponding prefetches material.
In one embodiment, further includes:
Card data receiving module, for receiving the card data of the small routine from the first server;
Card display module, for showing the card of the small routine according to the card data of the small routine.
It is in one embodiment, described to prefetch request sending module, comprising:
The first sending submodule of request is prefetched, for the clicking operation in response to the card to the small routine, Xiang Suoshu Second server prefetches request described in sending.
It is in one embodiment, described to prefetch request sending module, comprising:
The second sending submodule of request is prefetched, in the case where showing the card of the small routine, Xiang Suoshu second Server prefetches request described in sending.
In one embodiment, the frame loading module, comprising:
Access instruction generates submodule, for the clicking operation in response to the card to the small routine, generates access and refers to It enables;
Load and execution submodule, for loading the frame of the small routine in response to the access instruction.
In one embodiment, further includes:
Memory module is used in the database, according to the identification information of each small routine, by prefetching for the small routine Material is stored by the way of sandbox isolation to database.
The third aspect, the embodiment of the invention provides a kind of devices of small routine data pre-fetching, and the function of described device can Corresponding software realization can also be executed by hardware by hardware realization.The hardware or software include one or more Module corresponding with above-mentioned function.
It include processor and memory in the structure of described device in a possible design, the memory is used for Storage supports described device to execute the program of the method for above-mentioned small routine data pre-fetching, the processor is configured to for executing The program stored in the memory.Described device can also include communication interface, for logical with other equipment or communication network Letter.
Fourth aspect, the embodiment of the invention provides a kind of computer readable storage mediums, for storing small routine data Computer software instructions used in the device prefetched comprising for executing involved in the method for above-mentioned small routine data pre-fetching Program.
A technical solution in above-mentioned technical proposal has the following advantages that or the utility model has the advantages that prefetches before small routine starting Material is transferred from client-cache when small routine is accessed and prefetches material.In addition, the step of transferring can be with load institute The step of stating the frame of small routine is parallel, to improve the opening speed of small routine.
Another technical solution in above-mentioned technical proposal has the following advantages that or the utility model has the advantages that by prefetching matching for material Parameter is set to constrain the material prefetched, it, can be according to the intention of developer from all can be pre- to realize when prefetching material Free configuration is carried out in the material taken, so that developer be supported to prefetch material according to scene flexible configuration is launched.
Above-mentioned general introduction is merely to illustrate that the purpose of book, it is not intended to be limited in any way.Except foregoing description Schematical aspect, except embodiment and feature, by reference to attached drawing and the following detailed description, the present invention is further Aspect, embodiment and feature, which will be, to be readily apparent that.
Detailed description of the invention
In the accompanying drawings, unless specified otherwise herein, otherwise indicate the same or similar through the identical appended drawing reference of multiple attached drawings Component or element.What these attached drawings were not necessarily to scale.It should be understood that these attached drawings depict only according to the present invention Disclosed some embodiments, and should not serve to limit the scope of the present invention.
Fig. 1 shows the flow chart of the method for small routine data pre-fetching according to an embodiment of the present invention.
Fig. 2 shows the flow charts of the method for small routine data pre-fetching according to an embodiment of the present invention.
Fig. 3 shows the flow chart of the method for small routine data pre-fetching according to an embodiment of the present invention.
Fig. 4 shows the flow chart of the method for small routine data pre-fetching according to an embodiment of the present invention.
Fig. 5 shows the flow chart of the method for small routine data pre-fetching according to an embodiment of the present invention.
Fig. 6 shows the flow chart of the method for small routine data pre-fetching according to an embodiment of the present invention.
Fig. 7 shows the structural block diagram of the device of small routine data pre-fetching according to an embodiment of the present invention.
Fig. 8 shows the structural block diagram of the device of small routine data pre-fetching according to an embodiment of the present invention.
Fig. 9 shows the structural block diagram of the device of small routine data pre-fetching according to an embodiment of the present invention.
Figure 10 shows the structural block diagram of the device of small routine data pre-fetching according to an embodiment of the present invention.
Specific embodiment
Hereinafter, certain exemplary embodiments are simply just described.As one skilled in the art will recognize that Like that, without departing from the spirit or scope of the present invention, described embodiment can be modified by various different modes. Therefore, attached drawing and description are considered essentially illustrative rather than restrictive.
Fig. 1 shows the flow chart of the method for small routine data pre-fetching according to an embodiment of the present invention.As shown in Figure 1, the party Method the following steps are included:
S101: the address for prefetching material of the small routine from first server is received.
The developer of small routine can be in the address for prefetching material of developer's platform configuration small routine.Prefetch the ground of material Location can be uniform resource locator (URL, Uniform Resource Locator), as the download link for prefetching material. The address for prefetching material of small routine can be uploaded to first server by developer's platform.
S102: request is prefetched to second server corresponding with address transmission.
Client prefetches request to second server initiation based on the address for prefetching material.Second server can be exploitation Person's server or third-party server etc..
S103: it receives the described of second server return and prefetches material.
Second server customer in response end prefetches request, will prefetch material and is handed down to client.It is only wrapped prefetching request In the case where the address for prefetching material for including small routine, second server all prefetches material for what this prefetched in the address of material It is handed down to client.Prefetching material may include the first screen rendering data after small routine is turned on.Head screen rendering data can be First screen rendering data including text information, image data or video data is also possible to the first screen rendering number of plain textual information According to.
S104: the frame of the small routine is loaded.
For small routine after receiving access instruction, start-up course includes the frame for loading small routine.After loading is complete The life cycle function for calling small routine will prefetch material during life cycle function executes and be loaded onto the small routine The page.The frame of small routine can be the framework of small routine life cycle function, i.e. small routine is to operate in small routine frame On, the life cycle function of small routine triggers after the frame loaded of small routine.The life cycle function of small routine can To include the life cycles function such as onLaunch, onShow, onHide.For example, life cycle function onLaunch is for monitoring Small routine initialization can trigger life cycle function onLaunch when small routine, which initializes, to be completed.Life cycle function OnShow is shown for monitoring small routine, when small routine starts, or enters foreground display from backstage, can trigger life cycle Function onShow.Life cycle function onHide for monitor small routine hide, when small routine from foreground enter backstage, can trigger Life cycle function onHide.
S105: material is prefetched described in load during calling the life cycle function of the small routine
Above embodiment can prefetch material before small routine starting, when small routine is accessed, from client-cache In transfer the material prefetched.In addition, the step of transferring is parallel the step of can be with the frame of the load small routine, to improve The opening speed of small routine.
As shown in Fig. 2, in one embodiment, this method further include:
S201: the configuration parameter for prefetching material of the small routine from first server is received.
The configuration parameter that prefetches material of the developer of small routine in developer's platform configuration small routine.Prefetch matching for material Set parameter for delimit need to download in the address for prefetching material prefetch material.Prefetch material configuration parameter can be it is quiet State data description, using extensible markup language (xml) or the data interchange format (json) of lightweight.Developer can be based on Different scenes adjust the configuration parameter for prefetching material, need that downloads to prefetch material to be adjusted flexibly.Such as XX small routine quilt When opening, show that in page may include that text, several width pictures and one section of video etc. prefetch material.It is adjusted based on different scenes The configuration parameter of material is prefetched, different material is prefetched with realizing.It can be with prefabricated more set configuration parameters, to be adapted to difference respectively Scene.Such as the first set configuration parameter of small routine is used under 4G scene, the first screen rendering data of plain textual information is only obtained, Second set of configuration parameter that small routine is used under WiFi scene, obtaining includes text information, image data or video data Head screen rendering data.
S202: it sends and is prefetched in request including the configuration for prefetching material to second server corresponding with the address Parameter.
Prefetch request include small routine the address for prefetching material and prefetch material configuration parameter in the case where, second Server can select the corresponding material that prefetches to be handed down to client according to the configuration parameter for prefetching material.
S203: it receives the corresponding with the configuration parameter for prefetching material of second server return and prefetches material.
Above embodiment constrains the material prefetched by prefetching the configuration parameter of material, is prefetching object to realize When material, free configuration can be carried out from the material that can all prefetch according to the intention of developer, thus support developer according to It launches scene flexible configuration and prefetches material.Getting rid of and prefetching material can only be the customization of small routine host platform, not support developer The customized defect prefetched, while avoiding the wasting of resources.
As shown in figure 3, in one embodiment, this method further include:
S301: the card data of the small routine from the first server is received.
Card data of the developer of small routine in developer's platform configuration small routine.Client receives the card of small routine After sheet data, small routine content can be shown by way of card in the flow field the Feed scape of client or search scene. Feed stream may include continuous updating and the information flow for being presented to the user content.
S302: the card of the small routine is shown according to the card data of the small routine.
Dynamic (or static) information such as schematic diagram and text summary of small routine can be shown in the card of small routine.Separately Outside, the card of small routine is also used as the access entrance of small routine.For example, can be triggered small if the card of small routine is clicked The starting of program.In one embodiment, the entrance of small routine can also be the form of information bar pop-up form or barrage Deng.
Entrance of the above embodiment by the card of small routine as small routine.Since the card of small routine can be shown Dynamic (or static) information such as schematic diagram and text summary of small routine content, compared to the side such as information bar pop-up or barrage Formula more can intuitively show the content of small routine.
In one embodiment, can by card data, prefetch the address of material and prefetch the configuration parameter one of material It rises and is sent to client.Client can also be sent to according to certain order.For example, first sending card data, client is waited After acquisition request is sent at end, then the address of material is prefetched to client transmission and prefetches the configuration parameter etc. of material.It can also be only The address for prefetching material is sent, or only sends card data and prefetches the set etc. of the address of material.
After the card that client shows small routine, the mode example for carrying out data pre-fetching is as follows:
Mode one: it clicks card triggering and prefetches
In this approach, step S102 includes: the clicking operation in response to the card to the small routine, Xiang Suoshu second Server prefetches request described in sending.
After the card that user clicks small routine, small routine is accessed.It can be produced in response to the operation that small routine is clicked Raw triggering command loads the frame of accessed small routine, and prefetches request to described in second server transmission.In the frame of small routine After the completion of frame load, the life cycle function of small routine can be called, the page for material will be prefetched being loaded onto small routine.
The step of executing parallel with the frame for loading accessed small routine may include prefetching material based on small routine Address prefetches request to second server initiation.Receive the second server return described in prefetch material after, adjusting Material is prefetched described in load during the life cycle function of the small routine.
Mode two: it is prefetched automatically after display card
In this approach, step S102 includes: the Xiang Suoshu second service in the case where showing the card of the small routine Device prefetches request described in sending.
Client receives the card data of the small routine of the transmission of first server, prefetches the address of material and prefetches object The configuration parameter of material.The card of small routine is shown in the flow field the Feed scape of client or search scene.With the card of small routine It is shown as triggering command, request is prefetched to second server initiation based on the address for prefetching material.Receiving described second After what server returned prefetches material, cached.It waits user to click the card of small routine, clicks the card of small routine in user In the case where piece, the frame of accessed small routine is loaded.Include with the step of frame for being accessed small routine executes parallel is loaded That reads caching prefetches material.Load prefetches material during calling the life cycle function of the small routine.
Include multiple small routines in the case where prefetching material in the object of caching, can use the small routine of user's click Identification information, matching inquiry is carried out in material in the prefetching for multiple small routines of caching.Identification information can be small routine Card prefetches identical information possessed by material.Such as small routine id information or prefetch the address information etc. of material.
Above-mentioned two mode the difference is that the opportunity for initiating to prefetch request to second server it is different.Not based on opportunity Together, it will cause the difference of hit rate and small routine opening speed.
Such as client illustrates small routine A and small routine B in the flow field Feed scape or search scene.In small routine A quilt Before click, is prefetched to second server initiation and request and got to prefetch material.And small routine B before being clicked not Request is prefetched to second server initiation.End user clicks small routine B, and small routine A is just in miss state at this time.By It is not prefetched before click in small routine B, then small routine B is triggered to prefetch to second server initiation based on click action and be asked It asks.If small routine prefetches request to second server initiation before being clicked, when small routine is clicked, open That opens is fastest.Otherwise request is prefetched to second server initiation when small routine is clicked, then the hit rate of small routine is most It is high.
Obtain small routine prefetch material after, the frame of small routine can also be loaded by way of clicking card. As shown in figure 4, in one embodiment, step S104 includes:
S401: in response to the clicking operation of the card to the small routine, access instruction is generated.
S402: the frame of the small routine is loaded in response to the access instruction.
In one embodiment, in order to realize that the material that prefetches of different small routines is stored in different memory spaces, It does not interfere with each other, this method further include:
In the database, according to the identification information of each small routine, the small routine is prefetched into material using sandbox The mode of isolation is stored to database.
The mode of sandbox isolation may include: by the space for prefetching material and being respectively stored in an isolation of each small routine It is interior, it only carries out read operation using the material that prefetches of sandbox isolated storage and is not available for write operation, to avoid small with other Program prefetches the cross influence of material.
As shown in Figure 5, Figure 6, in one embodiment, the method for small routine data pre-fetching can also include to flow down Journey:
S501: small routine developer by developer's platform be arranged small routine card data, prefetch material address and The configuration parameter for prefetching material uploads to first server, such as the server in cloud.
S502: first server by the card data of small routine, prefetch the address of material and prefetch the configuration parameter of material It is issued to client.
S503: client shows the card of small routine in the search scene of Feed stream or client, and it is pre- to transfer small routine Take working device.Transferring small routine and prefetching may include the configuration ginseng for prefetching the address of material and prefetching material in the information of working device Number.
For example, being flowed the example for showing the card of small routine in Fig. 6 in Feed for client by the content in circle.
S504: small routine prefetches working device acquisition and prefetches the address of material and prefetch the configuration parameter of material.
S505: small routine prefetches working device and prefetches request to second server initiation according to the address for prefetching material.This is pre- Taking request can be includes that the configuration parameter of small routine prefetches request.
S506: receive second server return prefetches material.
S507: sandbox isolation is carried out to material is prefetched according to the unique identification of small routine.Guarantee prefetching for different small routines Material is stored in different memory spaces, is not interfere with each other.
S508: it after small routine starting, is preferentially obtained from memory space and prefetches material, load prefetches in the event of a hit Material.
Fig. 7 shows the structural block diagram of the device of small routine data pre-fetching according to an embodiment of the present invention.As shown in fig. 7, should Device includes:
Address receiving module 701, for receiving the address for prefetching material of the small routine from first server.
Request sending module 702 is prefetched, for prefetching request to second server corresponding with address transmission.
Material receiving module 703 is prefetched, prefetches material described in the second server return for receiving.
Frame loading module 704, for loading the frame of the small routine.
Material loading module 705 is prefetched, for loading institute during calling the life cycle function of the small routine It states and prefetches material.
In one embodiment, the device further include:
Configuration parameter receiving module, for receiving the configuration parameter for prefetching material of the small routine from first server, The configuration parameter be used for delimit need to download in the address for prefetching material prefetch material.
It is described prefetch request sending module 702 to second server corresponding with the address transmission prefetch request in include The configuration parameter for prefetching material.
It is described prefetch material receiving module 703 and receive described prefetch in material that the second server returns include and institute It states and prefetches the configuration parameter of material and corresponding prefetch material.
As shown in figure 8, in one embodiment, the device further include:
Card data receiving module 801, for receiving the number of cards of the small routine from the first server According to.
Card display module 802, for showing the card of the small routine according to the card data of the small routine.
In one embodiment, the request sending module 702 that prefetches includes:
The first sending submodule of request is prefetched, for the clicking operation in response to the card to the small routine, Xiang Suoshu Second server prefetches request described in sending.
In one embodiment, the request sending module 702 that prefetches includes:
The second sending submodule of request is prefetched, in the case where showing the card of the small routine, Xiang Suoshu second Server prefetches request described in sending.
As shown in figure 9, in one embodiment, the frame loading module 704 includes:
Access instruction generates submodule 7041, for the clicking operation in response to the card to the small routine, generates visit Ask instruction;
Load and execution submodule 7042, for loading the frame of the small routine in response to the access instruction.
In one embodiment, which further includes memory module, is used in the database, according to each small routine Identification information, by the small routine prefetch material using sandbox isolation by the way of store to database.
Figure 10 shows the structural block diagram of the device of small routine data pre-fetching according to an embodiment of the present invention.As shown in Figure 10, The device includes: memory 1010 and processor 1020, and the meter that can be run on processor 1020 is stored in memory 1010 Calculation machine program.The processor 1020 realizes the small routine data pre-fetching in above-described embodiment when executing the computer program Method.The quantity of the memory 1010 and processor 1020 can be one or more.
The device further include:
Communication interface 1030 carries out data interaction for being communicated with external device.
Memory 1010 may include high speed RAM memory, it is also possible to further include nonvolatile memory (non- Volatile memory), a for example, at least magnetic disk storage.
If memory 1010, processor 1020 and the independent realization of communication interface 1030, memory 1010, processor 1020 and communication interface 1030 can be connected with each other by bus and complete mutual communication.The bus can be industrial mark Quasi- architecture (ISA, Industry Standard Architecture) bus, external equipment interconnection (PCI, Peripheral Component Interconnect) bus or extended industry-standard architecture (EISA, Extended Industry Standard Architecture) bus etc..The bus can be divided into address bus, data/address bus, control Bus etc..Only to be indicated with a thick line in Figure 10 convenient for indicating, it is not intended that an only bus or a type of total Line.
Optionally, in specific implementation, if memory 1010, processor 1020 and communication interface 1030 are integrated in one piece On chip, then memory 1010, processor 1020 and communication interface 1030 can complete mutual communication by internal interface.
The embodiment of the invention provides a kind of computer readable storage mediums, are stored with computer program, the program quilt Processor realizes any method in above-described embodiment when executing.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example Point is included at least one embodiment or example of the invention.Moreover, particular features, structures, materials, or characteristics described It may be combined in any suitable manner in any one or more of the embodiments or examples.In addition, without conflicting with each other, this The technical staff in field can be by the spy of different embodiments or examples described in this specification and different embodiments or examples Sign is combined.
In addition, term " first ", " second " are used for descriptive purposes only and cannot be understood as indicating or suggesting relative importance Or implicitly indicate the quantity of indicated technical characteristic." first " is defined as a result, the feature of " second " can be expressed or hidden It include at least one this feature containing ground.In the description of the present invention, the meaning of " plurality " is two or more, unless otherwise Clear specific restriction.
Any process described otherwise above or method description are construed as in flow chart or herein, and expression includes It is one or more for realizing specific logical function or process the step of executable instruction code module, segment or portion Point, and the range of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discussed suitable Sequence, including according to related function by it is basic simultaneously in the way of or in the opposite order, Lai Zhihang function, this should be of the invention Embodiment person of ordinary skill in the field understood.
Expression or logic and/or step described otherwise above herein in flow charts, for example, being considered use In the order list for the executable instruction for realizing logic function, may be embodied in any computer-readable medium, for Instruction execution system, device or equipment (such as computer based system, including the system of processor or other can be held from instruction The instruction fetch of row system, device or equipment and the system executed instruction) it uses, or combine these instruction execution systems, device or set It is standby and use.For the purpose of this specification, " computer-readable medium ", which can be, any may include, stores, communicates, propagates or pass Defeated program is for instruction execution system, device or equipment or the dress used in conjunction with these instruction execution systems, device or equipment It sets.The more specific example (non-exhaustive list) of computer-readable medium include the following: there is the electricity of one or more wirings Interconnecting piece (electronic device), portable computer diskette box (magnetic device), random access memory (RAM), read-only memory (ROM), erasable edit read-only storage (EPROM or flash memory), fiber device and portable read-only memory (CDROM).In addition, computer-readable medium can even is that the paper that can print described program on it or other suitable Jie Matter, because can then be edited, be interpreted or when necessary with other for example by carrying out optical scanner to paper or other media Suitable method is handled electronically to obtain described program, is then stored in computer storage.
It should be appreciated that each section of the invention can be realized with hardware, software, firmware or their combination.Above-mentioned In embodiment, software that multiple steps or method can be executed in memory and by suitable instruction execution system with storage Or firmware is realized.It, and in another embodiment, can be under well known in the art for example, if realized with hardware Any one of column technology or their combination are realized: having a logic gates for realizing logic function to data-signal Discrete logic, with suitable combinational logic gate circuit specific integrated circuit, programmable gate array (PGA), scene Programmable gate array (FPGA) etc..
Those skilled in the art are understood that realize all or part of step that above-described embodiment method carries It suddenly is that relevant hardware can be instructed to complete by program, the program can store in a kind of computer-readable storage medium In matter, which when being executed, includes the steps that one or a combination set of embodiment of the method.
It, can also be in addition, each functional unit in each embodiment of the present invention can integrate in a processing module It is that each unit physically exists alone, can also be integrated in two or more units in a module.Above-mentioned integrated mould Block both can take the form of hardware realization, can also be realized in the form of software function module.The integrated module is such as Fruit is realized and when sold or used as an independent product in the form of software function module, also can store in a computer In readable storage medium storing program for executing.The storage medium can be read-only memory, disk or CD etc..
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in its various change or replacement, These should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with the guarantor of the claim It protects subject to range.

Claims (16)

1. a kind of method of small routine data pre-fetching characterized by comprising
Receive the address for prefetching material of the small routine from first server;
Request is prefetched to second server corresponding with address transmission;
It receives the described of second server return and prefetches material;
Load the frame of the small routine;
Material is prefetched described in load during calling the life cycle function of the small routine.
2. the method according to claim 1, wherein further include:
The configuration parameter for prefetching material of the small routine from first server is received, the configuration parameter is being prefetched for delimiting Need to download in the address of material prefetches material;
It sends and is prefetched in request including the configuration parameter for prefetching material to second server corresponding with the address;
It receives the corresponding with the configuration parameter for prefetching material of second server return and prefetches material.
3. the method according to claim 1, wherein further include:
Receive the card data of the small routine from the first server;
The card of the small routine is shown according to the card data of the small routine.
4. according to the method described in claim 3, it is characterized in that, described send to second server corresponding with the address Prefetch request, comprising:
In response to the clicking operation of the card to the small routine, request is prefetched described in the transmission of Xiang Suoshu second server.
5. according to the method described in claim 3, it is characterized in that, described send to second server corresponding with the address Prefetch request, comprising:
In the case where showing the card of the small routine, request is prefetched described in the transmission of Xiang Suoshu second server.
6. according to the method described in claim 3, it is characterized in that, loading the frame of the small routine, comprising:
In response to the clicking operation of the card to the small routine, access instruction is generated;
The frame of the small routine is loaded in response to the access instruction.
7. the method according to claim 1, wherein further include:
In the database, according to the identification information of each small routine, the material that prefetches of the small routine is isolated using sandbox Mode store to database.
8. a kind of device of small routine data pre-fetching characterized by comprising
Address receiving module, for receiving the address for prefetching material of the small routine from first server;
Request sending module is prefetched, for prefetching request to second server corresponding with address transmission;
Material receiving module is prefetched, prefetches material described in the second server return for receiving;
Frame loading module, for loading the frame of the small routine;
Material loading module is prefetched, for prefetching object described in load during calling the life cycle function of the small routine Material.
9. device according to claim 8, which is characterized in that further include:
Configuration parameter receiving module, it is described for receiving the configuration parameter for prefetching material of the small routine from first server Configuration parameter be used for delimit need to download in the address for prefetching material prefetch material;
The request sending module that prefetches prefetches in request to second server corresponding with address transmission including described pre- Take the configuration parameter of material;
It is described that prefetch material receiving module to receive described prefetch in material that the second server returns include prefetching with described The configuration parameter of material is corresponding to prefetch material.
10. device according to claim 8, which is characterized in that further include:
Card data receiving module, for receiving the card data of the small routine from the first server;
Card display module, for showing the card of the small routine according to the card data of the small routine.
11. device according to claim 10, which is characterized in that described to prefetch request sending module, comprising:
The first sending submodule of request is prefetched, for the clicking operation in response to the card to the small routine, Xiang Suoshu second Server prefetches request described in sending.
12. device according to claim 10, which is characterized in that described to prefetch request sending module, comprising:
The second sending submodule of request is prefetched, in the case where showing the card of the small routine, Xiang Suoshu second service Device prefetches request described in sending.
13. device according to claim 10, which is characterized in that the frame loading module, comprising:
Access instruction generates submodule, for the clicking operation in response to the card to the small routine, generates access instruction;
Load and execution submodule, for loading the frame of the small routine in response to the access instruction.
14. device according to claim 8, which is characterized in that further include:
Memory module, in the database, according to the identification information of each small routine, the small routine being prefetched material It is stored by the way of sandbox isolation to database.
15. a kind of device of small routine data pre-fetching characterized by comprising
One or more processors;
Storage device, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors Realize the method as described in any one of claims 1 to 7.
16. a kind of computer readable storage medium, is stored with computer program, which is characterized in that the program is held by processor The method as described in any one of claims 1 to 7 is realized when row.
CN201910625169.9A 2019-07-11 2019-07-11 Method and device for prefetching applet data and computer readable storage medium Active CN110333912B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910625169.9A CN110333912B (en) 2019-07-11 2019-07-11 Method and device for prefetching applet data and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910625169.9A CN110333912B (en) 2019-07-11 2019-07-11 Method and device for prefetching applet data and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110333912A true CN110333912A (en) 2019-10-15
CN110333912B CN110333912B (en) 2023-04-18

Family

ID=68146374

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910625169.9A Active CN110333912B (en) 2019-07-11 2019-07-11 Method and device for prefetching applet data and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110333912B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110879728A (en) * 2019-11-18 2020-03-13 口碑(上海)信息技术有限公司 Method and device for starting small program
CN111031376A (en) * 2019-11-25 2020-04-17 上海哔哩哔哩科技有限公司 Bullet screen processing method and system based on WeChat applet
CN111078324A (en) * 2019-12-16 2020-04-28 百度在线网络技术(北京)有限公司 Method and apparatus for prefetching page data
CN111158799A (en) * 2019-12-31 2020-05-15 北京百度网讯科技有限公司 Page rendering method and device, electronic equipment and storage medium
CN111258586A (en) * 2020-01-10 2020-06-09 北京小米移动软件有限公司 Fast application running and compiling method and device, electronic equipment and storage medium
CN111338714A (en) * 2020-02-19 2020-06-26 北京百度网讯科技有限公司 Applet material processing method, device, electronic equipment and medium
CN112000394A (en) * 2020-08-27 2020-11-27 北京百度网讯科技有限公司 Method, apparatus, device and storage medium for accessing an applet
CN112784200A (en) * 2021-01-28 2021-05-11 百度在线网络技术(北京)有限公司 Page data processing method, device, equipment, medium and computer program product
CN112783543A (en) * 2019-11-11 2021-05-11 百度在线网络技术(北京)有限公司 Generation method, device, equipment and medium for small program distribution materials
CN114398094A (en) * 2021-12-21 2022-04-26 ***股份有限公司 Applet starting method, device, equipment and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010051927A1 (en) * 2000-06-08 2001-12-13 Blinkspeed, Inc. Increasing web page browsing efficiency by periodically physically distributing memory media on which web page data are cached
CN109408150A (en) * 2018-10-30 2019-03-01 维沃移动通信有限公司 It is a kind of to apply loading method and mobile terminal fastly
CN109726076A (en) * 2018-12-03 2019-05-07 百度在线网络技术(北京)有限公司 A kind of small routine life cycle management method and system
CN109829077A (en) * 2017-08-29 2019-05-31 阿里巴巴集团控股有限公司 A kind of page display method, device and equipment
CN109857486A (en) * 2019-02-02 2019-06-07 北京字节跳动网络技术有限公司 A kind of processing method, device, equipment and the medium of program page data
CN109976973A (en) * 2019-02-19 2019-07-05 深圳点猫科技有限公司 Abnormality monitoring method and electronic equipment on a kind of small routine line

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010051927A1 (en) * 2000-06-08 2001-12-13 Blinkspeed, Inc. Increasing web page browsing efficiency by periodically physically distributing memory media on which web page data are cached
CN109829077A (en) * 2017-08-29 2019-05-31 阿里巴巴集团控股有限公司 A kind of page display method, device and equipment
CN109408150A (en) * 2018-10-30 2019-03-01 维沃移动通信有限公司 It is a kind of to apply loading method and mobile terminal fastly
CN109726076A (en) * 2018-12-03 2019-05-07 百度在线网络技术(北京)有限公司 A kind of small routine life cycle management method and system
CN109857486A (en) * 2019-02-02 2019-06-07 北京字节跳动网络技术有限公司 A kind of processing method, device, equipment and the medium of program page data
CN109976973A (en) * 2019-02-19 2019-07-05 深圳点猫科技有限公司 Abnormality monitoring method and electronic equipment on a kind of small routine line

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112783543A (en) * 2019-11-11 2021-05-11 百度在线网络技术(北京)有限公司 Generation method, device, equipment and medium for small program distribution materials
CN112783543B (en) * 2019-11-11 2023-10-03 百度在线网络技术(北京)有限公司 Method, device, equipment and medium for generating small program distribution materials
CN110879728A (en) * 2019-11-18 2020-03-13 口碑(上海)信息技术有限公司 Method and device for starting small program
CN111031376A (en) * 2019-11-25 2020-04-17 上海哔哩哔哩科技有限公司 Bullet screen processing method and system based on WeChat applet
US12022150B2 (en) 2019-11-25 2024-06-25 Shanghai Bilibili Technology Co., Ltd. Bullet comment processing method and system based on WeChat mini-program
CN111031376B (en) * 2019-11-25 2020-09-25 上海哔哩哔哩科技有限公司 Bullet screen processing method and system based on WeChat applet
CN111078324A (en) * 2019-12-16 2020-04-28 百度在线网络技术(北京)有限公司 Method and apparatus for prefetching page data
CN111158799A (en) * 2019-12-31 2020-05-15 北京百度网讯科技有限公司 Page rendering method and device, electronic equipment and storage medium
CN111258586B (en) * 2020-01-10 2023-04-18 北京小米移动软件有限公司 Fast application running and compiling method and device, electronic equipment and storage medium
CN111258586A (en) * 2020-01-10 2020-06-09 北京小米移动软件有限公司 Fast application running and compiling method and device, electronic equipment and storage medium
WO2021164193A1 (en) * 2020-02-19 2021-08-26 北京百度网讯科技有限公司 Mini program material processing method and apparatus, electronic device, and medium
CN111338714A (en) * 2020-02-19 2020-06-26 北京百度网讯科技有限公司 Applet material processing method, device, electronic equipment and medium
CN111338714B (en) * 2020-02-19 2024-05-17 北京百度网讯科技有限公司 Method and device for processing small program material, electronic equipment and medium
CN112000394A (en) * 2020-08-27 2020-11-27 北京百度网讯科技有限公司 Method, apparatus, device and storage medium for accessing an applet
CN112000394B (en) * 2020-08-27 2024-01-09 北京百度网讯科技有限公司 Method, apparatus, device and storage medium for accessing applet
CN112784200A (en) * 2021-01-28 2021-05-11 百度在线网络技术(北京)有限公司 Page data processing method, device, equipment, medium and computer program product
CN114398094A (en) * 2021-12-21 2022-04-26 ***股份有限公司 Applet starting method, device, equipment and computer readable storage medium
CN114398094B (en) * 2021-12-21 2023-08-18 ***股份有限公司 Applet starting method, device, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN110333912B (en) 2023-04-18

Similar Documents

Publication Publication Date Title
CN110333912A (en) A kind of method, apparatus and computer readable storage medium of small routine data pre-fetching
CN106484383B (en) Page rendering method, device and equipment
EP2732380B1 (en) Mobile web browser for pre-loading web pages
KR102294326B1 (en) Prefetching application data for periods of disconnectivity
CN110187931A (en) The operation method and device of small routine
CN110162726B (en) Page resource loading method and device and storage medium
US10901764B2 (en) Layered machine images
US20080082509A1 (en) System and Method for Active Browing
US10157130B1 (en) Differential storage and eviction for information resources from a browser cache
CN110287433A (en) Network information processing method and device and electronic equipment
CN109582899A (en) Page loading method, device, computer equipment and storage medium
CN108419089A (en) Module data processing method, device, equipment and storage medium
CN108287836A (en) A kind of resource caching method and device
CN107957837B (en) Method and device for generating shortcut of webpage application program and terminal equipment
US20140365861A1 (en) Prefetching binary data for use by a browser plugin
CN111666497A (en) Application program loading method and device, electronic equipment and readable storage medium
CN107798064B (en) Page processing method, electronic device and computer readable storage medium
CN109670126B (en) Cross-border access acceleration method and device
CN111079048B (en) Page loading method and device
CN105183890B (en) Webpage loading method based on browser and browser device
CN108228816A (en) A kind of loading method and device of waterfall flow graph piece
CN110609714A (en) Data prefetching method, device and equipment and storage medium
CN108595698A (en) picture loading method, terminal device and medium
JP5315128B2 (en) Process request destination management apparatus, process request destination management program, and process request destination management method
EP3407284A1 (en) Method and system for offline rendering ads from cached resources

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant