CN111966937A - Search response method and device and computer readable storage medium - Google Patents

Search response method and device and computer readable storage medium Download PDF

Info

Publication number
CN111966937A
CN111966937A CN202010920889.0A CN202010920889A CN111966937A CN 111966937 A CN111966937 A CN 111966937A CN 202010920889 A CN202010920889 A CN 202010920889A CN 111966937 A CN111966937 A CN 111966937A
Authority
CN
China
Prior art keywords
resource
offline
search
packet
network connection
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.)
Pending
Application number
CN202010920889.0A
Other languages
Chinese (zh)
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.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent 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 Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN202010920889.0A priority Critical patent/CN111966937A/en
Publication of CN111966937A publication Critical patent/CN111966937A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application provides a search response method, a search response device and a computer readable storage medium, wherein the search response method comprises the following steps: when a resource searching request is received, determining the current network connection state; when the network connection state is the network connection abnormal state, acquiring a local cached offline resource packet; and outputting a search result page corresponding to the resource search request based on the offline resource package. By implementing the scheme of the application, the offline resource packet is cached locally, and if the network connection is abnormal, the resource search request of the user is directly responded according to the offline resource packet, so that the page loading speed is effectively improved, and the page loading success rate is ensured.

Description

Search response method and device and computer readable storage medium
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a search response method and apparatus, and a computer-readable storage medium.
Background
With the rapid development of terminal technologies, electronic devices such as mobile phones and tablet computers are used more and more frequently in work and life of users, and users usually use a browser client installed on the electronic devices to perform resource search.
At present, when a user initiates a resource search request each time, a browser client needs to access a server to obtain corresponding resources, so that the degree of dependence on a network is high, and the problem of slow page loading or loading error occurs if the network environment is poor or the network is disconnected.
Disclosure of Invention
The embodiment of the application provides a search response method, a search response device and a computer-readable storage medium, which can at least solve the problem that in the related art, when a browser client side is in poor network environment or is disconnected from a network, page loading is slow or loading errors are easy to cause.
A first aspect of the embodiments of the present application provides a search response method, which is applied to a browser client, and includes:
when a resource searching request is received, determining the current network connection state;
when the network connection state is a network connection abnormal state, acquiring a local cached offline resource packet;
and outputting a search result page corresponding to the resource search request based on the offline resource package.
A second aspect of the embodiments of the present application provides a search response apparatus, which is applied to a browser client, and includes:
the determining module is used for determining the current network connection state when receiving the resource searching request;
the acquisition module is used for acquiring the locally cached offline resource packet when the network connection state is the network connection abnormal state;
and the output module is used for outputting a search result page corresponding to the resource search request based on the offline resource package.
A third aspect of embodiments of the present application provides an electronic apparatus, including: the search response method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the steps of the search response method provided in the first aspect of the embodiments of the present application.
A fourth aspect of the embodiments of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps in the search response method provided in the first aspect of the embodiments of the present application.
In view of the above, according to the search response method, apparatus, and computer-readable storage medium provided in the present application, when a resource search request is received, a current network connection state is determined; when the network connection state is the network connection abnormal state, acquiring a local cached offline resource packet; and outputting a search result page corresponding to the resource search request based on the offline resource package. By implementing the scheme of the application, the offline resource packet is cached locally, and if the network connection is abnormal, the resource search request of the user is directly responded according to the offline resource packet, so that the page loading speed is effectively improved, and the page loading success rate is ensured.
Drawings
Fig. 1 is a schematic basic flow chart of a search response method according to a first embodiment of the present application;
FIG. 2 is a schematic diagram of a search response interface provided in a first embodiment of the present application;
fig. 3 is a flowchart illustrating an offline resource package updating method according to a first embodiment of the present application;
fig. 4 is a flowchart illustrating another method for updating an offline resource package according to a first embodiment of the present application;
fig. 5 is a detailed flowchart of a search response method according to a second embodiment of the present application;
fig. 6 is a schematic diagram of program modules of a search response apparatus according to a third embodiment of the present application;
fig. 7 is a schematic diagram of program modules of another search response apparatus according to a third embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present application.
Detailed Description
In order to make the objects, features and advantages of the present invention more apparent and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In order to solve the defect that a browser client in the related art is easy to cause slow page loading or loading error when the network environment is poor or the network is disconnected, a first embodiment of the present application provides a search response method, which is applied to the browser client, for example, fig. 1 is a basic flow chart of the search response method provided by the present embodiment, and the search response method includes the following steps:
step 101, when a resource search request is received, determining a current network connection state.
Specifically, the search response method of the embodiment may be applied to a search through scene, that is, when the client detects a character input by the user in the browser search box, the resource search request is generated, and may also be applied to a general search scene, that is, when the user inputs a character in the browser search box, the search control is triggered to generate the resource search request.
It should be noted that the network connection state of the present embodiment may include a network connection normal state and a network connection abnormal state, and further, the network connection abnormal state may include a network connection disconnection state and a low quality network connection state.
And 102, when the network connection state is the network connection abnormal state, acquiring the locally cached offline resource packet.
Specifically, in this embodiment, a resource package of the html5 page is locally cached at the client, and the resource package may include html, css, js, jpg files, and the like. It should be understood that the offline resource package of this embodiment may be a resource package acquired from the server in a normal state of network connection, and the offline resource package is used for the client to load a page in an offline state.
In some embodiments of this embodiment, the obtaining the locally cached offline resource package includes: acquiring a search response requirement of a user inputting a resource search request; and acquiring a corresponding offline resource packet from the plurality of offline resource packets cached locally based on the search response requirement.
In particular, the search response requirement of the present embodiment may be associated with the type of resource in the search result page that the user is expected to respond to. In this embodiment, a plurality of offline resource packages of different versions can be cached locally, and the types of resources included in the offline resource packages of the versions are different, so as to meet the search requirements of different users. For example, in the embodiment, considering that the acceptance degrees of different users for the search results are different, and some users are more pursuing comprehensiveness of the search results, the offline resource package may be a resource package including multiple types of resources such as terms, news, audio, video, and pictures, and some users are more pursuing cleanliness of the search results, and the offline resource package may be a resource package including only terms and news.
And 103, outputting a search result page corresponding to the resource search request based on the offline resource package.
As shown in fig. 2, specifically, after a keyword input by a user in a browser search box is identified (for example, by zhou jilun in fig. 2), the client inputs the keyword into a JavaScript interface in a Webview, and then notifies the Webview, some js scripts in the Webview directly request to call an offline resource package, and html, css, js, resource files and the like (for example, a download card and a news card below the search box in fig. 2) required for page display are obtained from the offline resource package, and then the offline resource package is displayed through the Webview.
Different from the situation that resources need to be requested to a server based on network connection in the related art, the offline resource packet based on local cache in the embodiment can acquire the required resources, so that the page loading speed of the browser can be effectively increased, page loading can still be performed normally when the network connection is abnormal, and the page loading success rate is ensured.
In some embodiments of this embodiment, before outputting the search result page corresponding to the resource search request based on the offline resource package, the method further includes: and when the network connection state is the normal network connection state, carrying out effectiveness analysis on the locally cached offline resource packet.
Specifically, in this embodiment, when the network connection is normal, considering that the speed of requesting resources from the server to perform page loading is slow and consumption of network traffic may be caused, in this scenario, this embodiment may preferentially consider whether the cached offline resource packet is currently valid, and when the offline resource packet is valid, still output a search result page corresponding to the resource search request based on the offline resource packet, so as to improve the page loading speed and save the network traffic.
Further, in some embodiments of this embodiment, the analyzing the validity of the locally cached offline resource package includes: acquiring difference characterization parameters of an online resource packet provided by a server and an offline resource packet cached locally; and analyzing the effectiveness of the offline resource package based on the comparison result of the difference characterization parameters and the preset parameter threshold.
Specifically, in practical application, a validity period may be preset for the offline resource packet cached locally, and the offline resource packet is invalidated when the validity period arrives. In order to improve the accuracy of the validity judgment of the resource package, the difference between the offline resource package and the resource package currently provided by the server can be analyzed, and the validity of the offline resource package is determined according to the difference analysis result. It should be understood that the difference characterizing parameter of this embodiment may be a version difference value obtained based on a version number of the offline resource packet and a version number of the online resource packet, and when the version difference value is lower than a preset value, it indicates that the offline resource packet is a relatively newer or latest version, so that the offline resource packet is valid, and otherwise, the offline resource packet is an older historical version, so that the offline resource packet is invalid.
Further, in some embodiments of this embodiment, when the offline resource package is invalid, the online resource package provided by the server may be obtained, and a search result page corresponding to the resource search request is output based on the online resource package, and the locally cached offline resource package is updated by the online resource package.
Specifically, in this embodiment, if the offline resource package fails, it indicates that the page loaded by the resource package cannot well meet the search requirement of the user, so that the current network connection is used to make a resource request to the service side, and thus, the search result page is normally loaded. In addition, in this embodiment, the resource package that is locally cached is updated through the resource package that is requested to the server this time, so as to repair the function of offline page loading of the browser client.
As shown in fig. 3, which is a schematic flow chart of an offline resource package updating method provided in this embodiment, further, in some embodiments of this embodiment, when updating an offline resource package cached locally by using an online resource package, the method specifically includes the following steps:
301, analyzing the resource attribute of each resource in the online resource package;
step 302, respectively judging whether each resource meets the resource updating condition based on the resource attribute;
and 303, updating the locally cached offline resource packet through the resources meeting the resource updating condition in the online resource packet.
Specifically, in this embodiment, in consideration that all resources in the resource package that is not the new version of the server are resources expected by the user, this embodiment may determine whether to intercept the resources according to the resource attributes of the resources in the online resource package, so as to determine whether each resource has an update requirement, and then update the resources that actually have the update requirement in the offline resource package that is cached originally. Compared with a coarse-grained updating mode of completely replacing a locally cached resource package through a resource package acquired on the on-line, the fine-grained updating mode of only partially updating a specific resource file provided by the embodiment is more flexible and controllable.
Fig. 4 is a schematic flow chart of another offline resource package updating method provided in this embodiment, and in some embodiments of this embodiment, the offline resource package updating method specifically includes the following steps:
step 401, sending a resource packet update request carrying a unique identifier of an offline resource packet to a server;
step 402, receiving a difference updating resource packet fed back by a server;
and step 403, updating the locally cached offline resource packet based on the delta update resource packet.
Specifically, the delta update resource package of this embodiment includes: in the latest online resource package provided by the server, all the delta resources between the history modification node corresponding to the unique identifier and the latest node are uniquely identified, and the unique identifier may be an information digest value calculated by using an information digest algorithm, such as an MD5 value or a version number.
In practical application, a browser client usually requests a full amount of resource packets from a server, which may cause a large load on the server, increase network traffic and power consumption of the client, and reduce the update speed of the resource packets of the client. Based on this consideration, the present embodiment provides a difference update method, that is, when a client needs to update a resource package, the unique identifier of a cached offline resource package is reported to a server, the server locates a corresponding modified node in a latest resource package that can be provided by itself based on the unique identifier of the resource package on the client side, and then generates a difference update resource package based on all modification operation records between the modified node and the latest node, where the difference update resource package is a difference between a resource package of a certain historical version and a resource package of the latest version. It should be understood that the resource package of the server is usually maintained by a special developer, that is, modification operations such as adding, deleting, changing and the like are performed on resources, each modification operation may be regarded as an atomic operation, for each modification operation, a relevant modification operation record is recorded, and meanwhile, a unique identifier of the resource package obtained after each modification operation may also be recorded, so that the unique identifier may be matched with the unique identifier reported by the client, and a modification node where the resource package of the client side is located may be located.
Therefore, the client updates the local resource packet through the difference updating resource packet, the updated data volume is greatly reduced, the load of the server and the network flow/electricity consumption of the client are reduced, and the updating speed of the client is greatly accelerated.
Based on the technical scheme of the embodiment of the application, when a resource searching request is received, the current network connection state is determined; when the network connection state is the network connection abnormal state, acquiring a local cached offline resource packet; and outputting a search result page corresponding to the resource search request based on the offline resource package. By implementing the scheme of the application, the offline resource packet is cached locally, and if the network connection is abnormal, the resource search request of the user is directly responded according to the offline resource packet, so that the page loading speed is effectively improved, and the page loading success rate is ensured.
The method in fig. 5 is a refined search response method provided in a second embodiment of the present application, and is applied to a browser client, where the search response method includes:
step 501, when a resource search request is received, determining a current network connection state.
Specifically, the search response method of the embodiment may be applied to a search through scene, that is, when the client detects a character input by the user in the browser search box, the resource search request is generated, and may also be applied to a general search scene, that is, when the user inputs a character in the browser search box, the search control is triggered to generate the resource search request.
Step 502, when the network connection state is the network connection abnormal state, obtaining the locally cached offline resource packet.
Specifically, in this embodiment, a resource package of html5 page is cached locally at the client, the resource package may include html, css, js, jpg files, and the like, and the offline resource package is used for the client to load the page in an offline state.
Step 503, outputting a search result page corresponding to the resource search request based on the offline resource package.
Specifically, the client inputs a keyword input by a user into a JavaScript interface in Webview, and then notifies Webview below, some js scripts in the Webview directly request to call an offline resource package, and html, css, js, resource files and the like required by page display are obtained from the offline resource package, and then displayed through the Webview.
And step 504, when the network connection state is the normal network connection state, performing validity analysis on the locally cached offline resource packet.
And 505, when the offline resource packet is invalid, sending a resource packet updating request carrying the unique identifier of the offline resource packet to the server.
Specifically, in the embodiment, when the network connection is normal, if it is determined that the previously cached offline resource packet is invalid, the resource packet is requested to be updated from the server through the network connection, so that the offline loading page function can be normally used under the subsequent network connection abnormality. When the client needs to update the resource package, reporting the unique identifier of the cached offline resource package to the server, so that the server can sense the current cached resource package version of the client.
Step 506, receiving the delta update resource packet fed back by the server.
Specifically, the delta update resource package of this embodiment includes: and in the latest online resource package provided by the server, uniquely identifying all the differential resources between the corresponding history modification node and the latest node. The server locates a corresponding modification node in a latest resource packet which can be provided by the server based on the unique identifier of the resource packet at the client side, and then generates a difference quantity updating resource packet based on all modification operation records between the modification node and the latest node, wherein the difference quantity updating resource packet is the difference quantity between a certain historical version of resource packet and the latest version of resource packet.
And step 507, updating the local cached offline resource packet based on the difference updating resource packet.
In this embodiment, the client updates the local resource package through the difference update resource package, so that the updated data volume is greatly reduced, the load of the server and the network traffic/power consumption of the client are reduced, and the update speed of the client is greatly increased.
It should be understood that, the size of the serial number of each step in this embodiment does not mean the execution sequence of the step, and the execution sequence of each step should be determined by its function and inherent logic, and should not be limited uniquely to the implementation process of the embodiment of the present application.
The embodiment of the application discloses a search response method, which comprises the steps of determining the current network connection state when a resource search request is received; when the network connection state is the network connection abnormal state, acquiring a local cached offline resource packet; outputting a search result page corresponding to the resource search request based on the offline resource package; when the network connection state is a normal network connection state, requesting a difference quantity updating resource packet from a server; and updating the locally cached offline resource packets based on the delta update resource packets. By implementing the scheme of the application, the offline resource packet is locally cached, and if the network connection is abnormal, the resource search request of the user is directly responded according to the offline resource packet, so that the page loading speed is effectively improved, and the page loading success rate is ensured; in addition, when the network connection is normal, the local resource packet is updated through the difference updating resource packet, so that the load of the server and the network flow/electric quantity consumption of the client are reduced, and the updating speed of the client is greatly accelerated.
Fig. 6 is a search response apparatus according to a third embodiment of the present application. The search response device can be used to implement the search response method in the foregoing embodiments. As shown in fig. 6, the search response device mainly includes:
a determining module 601, configured to determine a current network connection state when receiving a resource search request;
an obtaining module 602, configured to obtain a locally cached offline resource packet when the network connection status is a network connection abnormal status;
an output module 603, configured to output a search result page corresponding to the resource search request based on the offline resource package.
In some embodiments of this embodiment, the obtaining module 602 is specifically configured to: acquiring a search response requirement of a user inputting a resource search request; and acquiring a corresponding offline resource packet from the plurality of offline resource packets cached locally based on the search response requirement.
As shown in fig. 7, which is a schematic view of functional modules of another search response apparatus provided in this embodiment, in some embodiments of this embodiment, the search response apparatus further includes an updating module 604, configured to: sending a resource packet updating request carrying the unique identifier of the offline resource packet to a server; receiving a delta update resource packet fed back by a server, wherein the delta update resource packet comprises: in a latest online resource packet provided by a server, uniquely identifying all residual quantity resources between a history modification node corresponding to the unique identifier and a latest node; and updating the locally cached offline resource packets based on the delta update resource packets.
Referring to fig. 7 again, in some embodiments of the present embodiment, the search response device further includes an analysis module 605 for: before outputting a search result page corresponding to the resource search request based on the offline resource packet, when the network connection state is a network connection normal state, performing validity analysis on the locally cached offline resource packet. Correspondingly, the output module 603 is specifically configured to: and when the offline resource package is effective, outputting a search result page corresponding to the resource search request based on the offline resource package.
Further, in some embodiments of this embodiment, the analysis module 605 is specifically configured to: acquiring difference characterization parameters of an online resource packet provided by a server and an offline resource packet cached locally; and analyzing the effectiveness of the offline resource package based on the comparison result of the difference characterization parameters and the preset parameter threshold.
Further, in other embodiments of the present embodiment, the obtaining module 602 is further configured to: after effectiveness analysis is carried out on the offline resource package cached locally, when the offline resource package is invalid, the online resource package provided by the server side is obtained; the output module 603 is further configured to: outputting a search result page corresponding to the resource search request based on the online resource package; the update module 604 is further configured to: and updating the locally cached offline resource packet through the online resource packet.
Further, in some embodiments of this embodiment, when the update module 604 executes the function of updating the locally cached offline resource package through the online resource package, it is specifically configured to: analyzing the resource attribute of each resource in the online resource package; respectively judging whether each resource meets the resource updating condition based on the resource attribute; and updating the locally cached offline resource packet through the resources meeting the resource updating condition in the online resource packet.
It should be noted that, the search response methods in the first and second embodiments can be implemented based on the search response device provided in this embodiment, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the search response device described in this embodiment may refer to the corresponding process in the foregoing method embodiment, and details are not described here again.
According to the search response device provided by the embodiment, when a resource search request is received, the current network connection state is determined; when the network connection state is the network connection abnormal state, acquiring a local cached offline resource packet; and outputting a search result page corresponding to the resource search request based on the offline resource package. By implementing the scheme of the application, the offline resource packet is cached locally, and if the network connection is abnormal, the resource search request of the user is directly responded according to the offline resource packet, so that the page loading speed is effectively improved, and the page loading success rate is ensured.
Referring to fig. 8, fig. 8 is an electronic device according to a fourth embodiment of the present disclosure. The electronic device may be used to implement the search response method in the foregoing embodiments. As shown in fig. 8, the electronic device mainly includes:
a memory 801, a processor 802, a bus 803, and computer programs stored on the memory 801 and executable on the processor 802, the memory 801 and the processor 802 being connected by the bus 803. The processor 802, when executing the computer program, implements the search response method in the foregoing embodiments. Wherein the number of processors may be one or more.
The Memory 801 may be a high-speed Random Access Memory (RAM) Memory or a non-volatile Memory (non-volatile Memory), such as a disk Memory. The memory 801 is used to store executable program code, and the processor 802 is coupled to the memory 801.
Further, an embodiment of the present application also provides a computer-readable storage medium, where the computer-readable storage medium may be provided in an electronic device in the foregoing embodiments, and the computer-readable storage medium may be the memory in the foregoing embodiment shown in fig. 8.
The computer-readable storage medium has stored thereon a computer program which, when executed by a processor, implements the search response method in the foregoing embodiments. Further, the computer-readable storage medium may be various media that can store program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a RAM, a magnetic disk, or an optical disk.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of modules is merely a division of logical functions, and an actual implementation may have another division, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
Modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a readable storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method of the embodiments of the present application. And the aforementioned readable storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In view of the above description of the search response method, apparatus, and computer-readable storage medium provided by the present application, those skilled in the art will recognize that the scope of the present application can be varied from that of the detailed description, and that the present application is not limited by the present description.

Claims (10)

1. A search response method is applied to a browser client side and is characterized by comprising the following steps:
when a resource searching request is received, determining the current network connection state;
when the network connection state is a network connection abnormal state, acquiring a local cached offline resource packet;
and outputting a search result page corresponding to the resource search request based on the offline resource package.
2. The search response method of claim 1, wherein the obtaining the locally cached offline resource package comprises:
acquiring a search response requirement of a user inputting the resource search request;
and acquiring a corresponding offline resource packet from the plurality of offline resource packets cached locally based on the search response requirement.
3. The search response method of claim 1, further comprising:
sending a resource packet updating request carrying the unique identifier of the offline resource packet to a server;
receiving a difference updating resource packet fed back by the server; wherein the delta update resource packet comprises: in the latest online resource package provided by the server, all the differential resources between the history modification node corresponding to the unique identifier and the latest node;
updating the locally cached offline resource package based on the delta update resource package.
4. The search response method of claim 1, wherein before outputting the search result page corresponding to the resource search request based on the offline resource package, further comprising:
when the network connection state is a network connection normal state, carrying out validity analysis on the locally cached offline resource packet;
and when the offline resource package is effective, executing the step of outputting a search result page corresponding to the resource search request based on the offline resource package.
5. The search response method of claim 4, wherein the analyzing the validity of the locally cached offline resource package comprises:
acquiring difference characterization parameters of an online resource packet provided by a server and an offline resource packet cached locally;
and analyzing the effectiveness of the offline resource package based on the comparison result of the difference characterization parameters and preset parameter thresholds.
6. The search response method of claim 4, wherein after the analyzing the validity of the locally cached offline resource package, further comprising:
when the offline resource packet is invalid, acquiring an online resource packet provided by a server;
and outputting a search result page corresponding to the resource search request based on the online resource packet, and updating the locally cached offline resource packet through the online resource packet.
7. The search response method of claim 6, wherein the updating the locally cached offline resource package with the online resource package comprises:
analyzing the resource attribute of each resource in the online resource package;
respectively judging whether each resource meets a resource updating condition based on the resource attribute;
and updating the offline resource packet locally cached by the resources meeting the resource updating condition in the online resource packet.
8. A search response device applied to a browser client side is characterized by comprising:
the determining module is used for determining the current network connection state when receiving the resource searching request;
the acquisition module is used for acquiring the locally cached offline resource packet when the network connection state is the network connection abnormal state;
and the output module is used for outputting a search result page corresponding to the resource search request based on the offline resource package.
9. An electronic device, comprising: a memory, a processor, and a bus;
the bus is used for realizing connection communication between the memory and the processor;
the processor is configured to execute a computer program stored on the memory;
the processor, when executing the computer program, performs the steps of the method of any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202010920889.0A 2020-09-04 2020-09-04 Search response method and device and computer readable storage medium Pending CN111966937A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010920889.0A CN111966937A (en) 2020-09-04 2020-09-04 Search response method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010920889.0A CN111966937A (en) 2020-09-04 2020-09-04 Search response method and device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN111966937A true CN111966937A (en) 2020-11-20

Family

ID=73392153

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010920889.0A Pending CN111966937A (en) 2020-09-04 2020-09-04 Search response method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111966937A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105681380A (en) * 2014-11-20 2016-06-15 阿里巴巴集团控股有限公司 Client offline method and system thereof
US20170017672A1 (en) * 2015-07-14 2017-01-19 Microsoft Technology Licensing, Llc Accessing search results in offline mode
CN107784086A (en) * 2017-10-09 2018-03-09 中国平安人寿保险股份有限公司 A kind of loading method of webpage, terminal device and computer-readable recording medium
CN108132814A (en) * 2017-12-22 2018-06-08 平安养老保险股份有限公司 Page loading method, device, computer equipment and the storage medium of application program
CN111314426A (en) * 2020-01-17 2020-06-19 北京达佳互联信息技术有限公司 Webpage resource obtaining method and device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105681380A (en) * 2014-11-20 2016-06-15 阿里巴巴集团控股有限公司 Client offline method and system thereof
US20170017672A1 (en) * 2015-07-14 2017-01-19 Microsoft Technology Licensing, Llc Accessing search results in offline mode
CN107784086A (en) * 2017-10-09 2018-03-09 中国平安人寿保险股份有限公司 A kind of loading method of webpage, terminal device and computer-readable recording medium
CN108132814A (en) * 2017-12-22 2018-06-08 平安养老保险股份有限公司 Page loading method, device, computer equipment and the storage medium of application program
CN111314426A (en) * 2020-01-17 2020-06-19 北京达佳互联信息技术有限公司 Webpage resource obtaining method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US10325009B2 (en) Method and apparatus for using custom component parsing engine to parse tag of custom component
CN107122379B (en) Collecting transaction data associated with a locally stored data file
CN107832100B (en) APK plug-in loading method and terminal thereof
US9183072B1 (en) Error troubleshooting using a correlated knowledge base
WO2018049888A1 (en) Application data migration method and device
US8126859B2 (en) Updating a local version of a file based on a rule
CN105740330B (en) Method and device for displaying data in paging mode
CN110858172A (en) Automatic test code generation method and device
CN109522500B (en) Webpage display method, device, terminal and storage medium
CN111064626B (en) Configuration updating method, device, server and readable storage medium
CN107644075B (en) Method and device for collecting page information
CN113157480A (en) Error information processing method, device, storage medium and terminal
CN110347659B (en) Data processing method and device and transaction data processing method and device
CN112118352A (en) Method and device for processing notification trigger message
CN111782999A (en) Page display method, device, equipment and system
CN113536168B (en) Component processing method and device
CN111966937A (en) Search response method and device and computer readable storage medium
CN114117280A (en) Page static resource using method and device, terminal equipment and storage medium
CN106547485B (en) Data migration method and device
CN113761433A (en) Service processing method and device
US11017032B1 (en) Document recovery utilizing serialized data
CN112149016A (en) Page processing method, device, equipment and storage medium
CN112615918B (en) Network management system and information synchronization method thereof
CN111104251B (en) Method, apparatus and computer readable medium for restoring files
CN113064669A (en) Loading control method and device

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