CN113515711A - Data acquisition method and device, storage medium and processor - Google Patents

Data acquisition method and device, storage medium and processor Download PDF

Info

Publication number
CN113515711A
CN113515711A CN202010280084.4A CN202010280084A CN113515711A CN 113515711 A CN113515711 A CN 113515711A CN 202010280084 A CN202010280084 A CN 202010280084A CN 113515711 A CN113515711 A CN 113515711A
Authority
CN
China
Prior art keywords
data
browsers
server
index
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
CN202010280084.4A
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN202010280084.4A priority Critical patent/CN113515711A/en
Publication of CN113515711A publication Critical patent/CN113515711A/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
    • 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/951Indexing; Web crawling techniques
    • 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/953Querying, e.g. by the use of web search engines

Landscapes

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

Abstract

The invention discloses a data acquisition method, a data acquisition device, a storage medium and a processor. Wherein, the method comprises the following steps: receiving a data index of a server, wherein the data index is used for indicating storage distribution of data of the server on a plurality of browsers; establishing connection with any one or more of the plurality of browsers according to the data index; and obtaining data of the server stored in the browser with the established connection. The invention solves the technical problem of low utilization rate of the cache data.

Description

Data acquisition method and device, storage medium and processor
Technical Field
The present invention relates to the field of information, and in particular, to a data acquisition method, apparatus, storage medium, and processor.
Background
When a user acquires information through a browser, the situation that data is acquired in a delayed manner due to large data volume, poor network condition, long calculation time of a server and the like exists, and the conventional method generally performs server cache or browser cache, so that the situation of slow response is reduced. The server-side cache solves the delay caused by the server-side calculation, the calculated result is cached and returned to the user, and the browser-side cache reduces the time of request for direct local reading.
However, in the traditional mode of the server-side cache and the browser-side cache, when the server fails, the browser-side cannot directly obtain the content which is not cached locally, and the situation of unavailability occurs. In addition, the browser-side has a limited cache capacity and cannot cache a large amount of data.
Aiming at the problem of low utilization rate of the cache data, an effective solution is not provided at present.
Disclosure of Invention
The embodiment of the invention provides a data acquisition method, a data acquisition device, a storage medium and a processor, which are used for at least solving the technical problem of low utilization rate of cache data.
According to an aspect of an embodiment of the present invention, there is provided a data acquisition method, including: receiving a data index of a server, wherein the data index is used for indicating storage distribution of data of the server on a plurality of browsers; establishing connection with any one or more of the plurality of browsers according to the data index; and obtaining the data of the server stored in the browser with the established connection.
According to another aspect of the embodiments of the present invention, there is also provided a data acquisition method, including: generating a data index, wherein the data index is used for indicating storage distribution of data of a server on a plurality of browsers; distributing the data index to the plurality of browsers to enable one of the plurality of browsers to establish connection with any one or more of the plurality of browsers according to the data index, and obtaining data of the server stored in the browser with the established connection.
According to another aspect of the embodiments of the present invention, there is also provided a data acquisition apparatus, including: the index receiving unit is used for receiving a data index of a server, and the data index is used for indicating the storage distribution of the data of the server on a plurality of browsers; the connection unit is used for establishing connection with any one or more of the plurality of browsers according to the data index; and the first acquisition unit is used for acquiring the data of the server stored in the browser with the established connection.
According to another aspect of the embodiments of the present invention, there is also provided a data acquisition apparatus, including: the generating unit is used for generating a data index, and the data index is used for indicating the storage distribution of the data of the server on a plurality of browsers; a distributing unit, configured to distribute the data index to the multiple browsers, so that one of the multiple browsers establishes a connection with any one or more of the multiple browsers according to the data index, and obtains data of the server stored in the browser with the established connection.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium, where the storage medium includes a stored program, and when the program runs, the apparatus on which the storage medium is located is controlled to execute the data acquisition method described above.
According to another aspect of the embodiments of the present invention, there is also provided a processor, configured to execute a program, where the program executes the data acquisition method described above.
In the embodiment of the invention, the data of the server can be stored in a distributed manner on a plurality of browsers, after the data index of the server is received, the connection relation between the server and any one or more of the plurality of browsers can be established based on the indication of the data index, and the data of the server stored in the browser with the established connection can be obtained, so that the data of the server can be stored in the plurality of browsers in a distributed manner, the aim of caching a large amount of data is fulfilled, the connection of the browsers can be quickly established based on the data index of the server, and the stored data of the server can be obtained from the browser, so that the technical effect of improving the utilization rate of the cached data is realized, and the technical problem of low utilization rate of the cached data is further solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 shows a hardware configuration block diagram of a computer terminal for implementing a data acquisition method;
FIG. 2 is a first flowchart of a data acquisition method according to an embodiment of the present invention;
FIG. 3 is a flow chart of a data acquisition method according to an embodiment of the present invention;
FIG. 4 is a first schematic diagram illustrating a peer-to-peer local area network cache optimization coordination method according to an embodiment of the present invention;
FIG. 5 is a second schematic diagram illustrating a peer-to-peer local area network cache optimization coordination method according to an embodiment of the present invention;
FIG. 6 is a first schematic diagram of a data acquisition device according to an embodiment of the present invention;
FIG. 7 is a second schematic diagram of a data acquisition device according to an embodiment of the present invention;
fig. 8 is a block diagram of a computer terminal according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. 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 invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
First, some terms or terms appearing in the description of the embodiments of the present application are applicable to the following explanations:
point-to-point technology: peer-to-peer (P2P), also known as peer-to-peer technology, is an internet system that does not have a central server and relies on user groups (peers) to exchange information, and it is used to reduce nodes in the past network transmission to reduce the risk of data loss. Different from a central network system with a central server, each user side of the peer-to-peer network is a node and has the function of the server, and any node cannot directly find other nodes and must rely on the user group to exchange information.
Data indexing: the meta information stored in the data is recorded, which can be understood as the address information of the data, and the data form is convenient and quick to retrieve.
Long connection: it means that a plurality of data packets can be continuously transmitted on one connection, and if no data packet is transmitted during the connection holding period, a link detection packet needs to be transmitted by two parties.
Short polling: it refers to that at a specific time interval (e.g. every 1 second), the browser sends out an HTTP request to the server, and then the server returns the latest data to the browser of the client.
B/S mode: browser and server architecture modes.
Example 1
There is also provided, in accordance with an embodiment of the present invention, a data acquisition method embodiment, it should be noted that the steps illustrated in the flowchart of the accompanying drawings may be performed in a computer system such as a set of computer-executable instructions, and that, although a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order different than here.
The method provided by the first embodiment of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Fig. 1 shows a hardware configuration block diagram of a computer terminal (or mobile device) for implementing the data acquisition method. As shown in fig. 1, computer terminal 10 (or mobile device 10) may include one or more (shown in the figures as 102a, 102b, … …, 102 n) processors 102 (processors 102 may include, but are not limited to, processing devices such as Central Processing Units (CPUs), Graphics Processing Units (GPUs), neural Network Processors (NPUs), Microprocessors (MCUs), programmable logic devices (FPGAs), Tensor Processors (TPUs), Artificial Intelligence (AI) type processors, etc.), memory 104 for storing data, and a transmission module 106 for communication functions. Besides, the method can also comprise the following steps: a display, an input/output interface (I/O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of the I/O interface), a network interface, a power source, and/or a camera. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the electronic device. For example, the computer terminal 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
It should be noted that the one or more processors 102 and/or other data processing circuitry described above may be referred to generally herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part in software, hardware, firmware, or any combination thereof. Further, the data processing circuit may be a single stand-alone processing module, or incorporated in whole or in part into any of the other elements in the computer terminal 10 (or mobile device). As referred to in the embodiments of the application, the data processing circuit acts as a processor control (e.g. selection of a variable resistance termination path connected to the interface).
The memory 104 may be used to store software programs and modules of application software, such as program instructions/data storage devices corresponding to the data acquisition method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, so as to implement the data acquisition method. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission module 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission module 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission module 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
The display may be, for example, a touch screen type Liquid Crystal Display (LCD) that may enable a user to interact with a user interface of the computer terminal 10 (or mobile device).
The hardware block diagram shown in fig. 1 may be taken as an exemplary block diagram of not only the computer terminal 10 (or mobile device) described above, but also the server(s) described above, and the computer terminal 10 (or mobile device) may be connected via a data network connection or electronically to one or more servers. In an alternative embodiment, the computer terminal 10 (or mobile device) may be any mobile computing device or the like. The data network connection may be a local area network connection, a wide area network connection, an internet connection, or other type of data network connection. The computer terminal 10 (or mobile device) may execute to connect to a network service executed by a server (e.g., a secure server) or a group of servers. A web server is a network-based user service such as social networking, cloud resources, email, online payment, or other online applications.
Under the operating environment, the application provides a data acquisition method as shown in fig. 2. Fig. 2 is a first flowchart of a data acquisition method according to an embodiment of the present invention, as shown in fig. 2, the method includes the following steps:
step S202, receiving a data index of a server, wherein the data index is used for indicating storage distribution of data of the server on a plurality of browsers;
step S204, establishing connection with any one or more of a plurality of browsers according to the data index;
step S206, data of the server stored in the browser to which the connection has been established is obtained.
In the embodiment of the invention, the data of the server can be stored in a distributed manner on a plurality of browsers, after the data index of the server is received, the connection relation between the server and any one or more of the plurality of browsers can be established based on the indication of the data index, and the data of the server stored in the browser with the established connection can be obtained, so that the data of the server can be stored in the plurality of browsers in a distributed manner, the aim of caching a large amount of data is fulfilled, the connection of the browsers can be quickly established based on the data index of the server, and the stored data of the server can be obtained from the browser, so that the technical effect of improving the utilization rate of the cached data is realized, and the technical problem of low utilization rate of the cached data is further solved.
It should be noted that the data obtaining method shown in fig. 2 may be applied to a terminal, where the terminal may be a computer, a smart phone, a tablet computer, or other devices, and the terminal may access the server and cache data provided by the server, and therefore, the terminal applying the data obtaining method shown in fig. 2 is a data caching carrier.
As an alternative embodiment, the embodiment may further include: obtaining first data from a server; caching part or all of the first data; and sending the cache information to the server so that the server generates a data index by taking the cache information as a data distribution index.
According to the embodiment of the invention, the first data can be obtained from the server, and then part or all of the first data obtained from the server is cached, so that the first data obtained from the server can be stored in a distributed manner on a plurality of browsers, the caching of the first data in the server is realized, and the cache information obtained after the caching of the first data is sent to the server, so that the server can generate the data index based on the returned cache information.
It should be noted that the cache information is used to indicate the storage distribution of the first data of the server on the multiple browsers.
As an alternative embodiment, the embodiment may further include: obtaining the effective duration of the first data; and if the life cycle of the cached first data exceeds the effective duration, clearing the cached first data.
In the above embodiment of the present invention, the first data obtained from the server may be cached according to the effective duration of the first data, and if the life cycle of the cached first data exceeds the effective duration, the cached first data is cleared, so that the occupation of the cache resource is reduced, and the utilization efficiency of the cache resource is improved.
As an alternative embodiment, if the lifetime of the cached first data exceeds the validity duration, the embodiment may further include: and receiving the updating data of the first data sent by the server.
In the above embodiment of the present invention, since the cached first data has validity, after the lifecycle of the first data is ended, the first data exceeding the lifecycle will be cleared, and the cache resource (e.g., browser) occupied by the first data exceeding the lifecycle will store the update data of the first data sent by the server.
As an alternative embodiment, the embodiment may further include: an update request to update the first data is sent to the server.
In the above embodiment of the present invention, after the life cycle of the cached first data is ended, the first data received in the life cycle needs to be updated, and further, when the first data needs to be updated, an update request for updating the first data may be sent to the server, so that the server may send the update data of the first data based on the update request.
As an alternative embodiment, establishing a connection with any one or more of the plurality of browsers according to the data index includes: if the connection with the server fails, searching a browser where second data to be obtained is located according to the data index; and establishing connection with the browser where the second data is located, wherein the number of the browsers where the second data is located is one or more.
It should be noted that, in the data acquisition process, a connection may be established with the server to directly obtain the data transmitted by the server in real time.
In the above embodiment of the present invention, when the connection with the server fails and the data cannot be directly obtained from the server, the browser where the second data to be obtained is located may be searched based on the data index provided by the server, and a connection may be established with one or more browsers where the second data is located to obtain the second data stored by the browser.
Under the operating environment, the application provides a data acquisition method as shown in fig. 3. Fig. 3 is a second flowchart of a data acquisition method according to an embodiment of the present invention, as shown in fig. 3, the method includes the following steps:
step S302, generating a data index, wherein the data index is used for indicating the storage distribution of the data of the server on a plurality of browsers;
step S304, distributing the data index to a plurality of browsers to enable one of the browsers to establish connection with any one or more of the browsers according to the data index, and obtaining data of the server stored in the browser with the connection established.
In the embodiment of the invention, the data of the server can be stored in a distributed manner on a plurality of browsers, after the data index of the server is received, the connection relation between the server and any one or more of the plurality of browsers can be established based on the indication of the data index, and the data of the server stored in the browser with the established connection can be obtained, so that the data of the server can be stored in the plurality of browsers in a distributed manner, the aim of caching a large amount of data is fulfilled, the connection of the browsers can be quickly established based on the data index of the server, and the stored data of the server can be obtained from the browser, so that the technical effect of improving the utilization rate of the cached data is realized, and the technical problem of low utilization rate of the cached data is further solved.
As an alternative embodiment, generating the data index includes: issuing first data to a plurality of browsers; cache information is obtained from a plurality of browsers, and the cache information is obtained by caching part or all of first data by any one or more of the plurality of browsers; and taking the cache information as a data distribution index to generate a data index.
As an alternative embodiment, the embodiment further comprises: setting effective duration of first data for a plurality of browsers; and issuing the effective duration to the multiple browsers so that any one or more of the multiple browsers can clear the cached first data when determining that the life cycle of the cached first data exceeds the effective duration.
As an alternative embodiment, if the lifetime of the cached first data exceeds the validity duration, the embodiment further includes: and issuing the updating data of the first data to any one or more browsers in the plurality of browsers.
As an alternative embodiment, the embodiment further comprises: and receiving an updating request sent by any one or more of the plurality of browsers for updating the first data.
The invention also provides a specific embodiment, which provides a point-to-point local area network cache optimization coordination method.
The browser loading mode is that a request is sent to a far-end server, the server response is obtained, data and display content are received, the cacheable content is cached in the browser, when the requested data is accessed, the cached content of the browser can be read, the time of remote network connection and downloading can be saved, and the browsing efficiency is improved.
The technical scheme provided by the invention can further improve the cache utilization rate on the basis of the original browser cache, and can read the same cache data (which can be shared) cached by other people (namely the browser) in the local area network nearby by adopting the characteristic of point-to-point communication.
Fig. 4 is a first schematic diagram of a peer-to-peer local area network cache optimization and coordination method according to an embodiment of the present invention, and fig. 5 is a second schematic diagram of a peer-to-peer local area network cache optimization and coordination method according to an embodiment of the present invention, as shown in fig. 4 and fig. 5, a server and a browser initially establish a connection, the browser receives data (i.e., first data) sent by the server, and feeds back to the server which data is cached, and a storage location of each data (i.e., feeds back cache information to the server), and the server establishes a data index and information (IP, connection rate, etc.) required by the corresponding browser to establish the connection. The server performs a coordination operation to synchronize the indexes of the latest and optimal shared data (i.e. data indexes) provided by the respective browsers. After the browser obtains the index information (namely data index) of other corresponding browsers (namely at least one browser in the same local area network), point-to-point connection can be established nearby to obtain shared data; and if the situation of acquiring the nearby data fails, returning to a mode of directly acquiring the data from the server.
Optionally, a peer-to-peer connection is generated by using a near online principle through index data (such as a total index and a corresponding data distribution index) of the server, and sharable data are mutually acquired by the browsers.
Optionally, as to a simple method for updating the cache, the expiration time (i.e. the effective duration) may be set for each cached resource by using a cache expiration time policy. When the data fails, the latest data is obtained from the server and cached in the server. If the content needs to be updated immediately, the online browser acquires the data index which is forcibly updated for updating, and a long-connection or short-polling mode or a latest updated index can be considered when the real-time performance is pursued.
According to the technical scheme provided by the invention, the cache utilization of the decentralized nearby browser can be increased on the basis of the original cache, so that the efficiency of loading data is improved, and point-to-point data sharing is carried out.
The technical scheme provided by the invention can be applied to a big data processing and displaying scene, the server performs a large amount of calculation, and returns the calculation result of the big data to the browser, and the cache utilization rate can be improved, the server resource can be saved, and the exit bandwidth can be saved through point-to-point data sharing; and can be applied to SaaS such as a DataWorks big data platform. Of course, the technical scheme provided by the invention does not exclude products in other B/S modes.
The technical scheme provided by the invention can improve the utilization rate of the cache data, improve the availability of the cache data, and distribute and store the processed caches to different browsers by a coordination mode, thereby realizing a distributed cache structure and greatly improving the cache amount and the utilization rate.
The technical scheme provided by the invention can be applied to a mode of using a non-browser, such as data caching and sharing by a carrier of a client (a desktop or a mobile terminal); from the edge network point of view, data sharing between cache nodes using the CDN may also be applied.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. 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 by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
According to the embodiment of the invention, the data acquisition device for implementing the data acquisition method is also provided. Fig. 6 is a schematic diagram of a data acquisition apparatus according to an embodiment of the present invention, as shown in fig. 6, the apparatus includes: an index receiving unit 62, configured to receive a data index of the server, where the data index is used to indicate storage distribution of data of the server on multiple browsers; a connection unit 64, configured to establish a connection with any one or more of the multiple browsers according to the data index; a first obtaining unit 66, configured to obtain data of a server stored in the browser to which the connection has been established.
It should be noted here that the index receiving unit 62, the connecting unit 64, and the first obtaining unit 66 correspond to step S202, step S204, and step S206 in embodiment 1, and the above units are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure in embodiment 1. It should be noted that the above units may be operated in the computer terminal 10 provided in embodiment 1 as a part of the apparatus.
In the embodiment of the invention, the data of the server can be stored in a distributed manner on a plurality of browsers, after the data index of the server is received, the connection relation between the server and any one or more of the plurality of browsers can be established based on the indication of the data index, and the data of the server stored in the browser with the established connection can be obtained, so that the data of the server can be stored in the plurality of browsers in a distributed manner, the aim of caching a large amount of data is fulfilled, the connection of the browsers can be quickly established based on the data index of the server, and the stored data of the server can be obtained from the browser, so that the technical effect of improving the utilization rate of the cached data is realized, and the technical problem of low utilization rate of the cached data is further solved.
As an alternative embodiment, the apparatus further comprises: a second acquisition unit configured to acquire the first data from the server; the cache unit is used for caching part or all of the first data; and the sending unit is used for sending the cache information to the server so that the server generates a data index by taking the cache information as a data distribution index.
As an alternative embodiment, the apparatus further comprises: a third obtaining unit, configured to obtain an effective duration of the first data; and the clearing unit is used for clearing the cached first data if the life cycle of the cached first data exceeds the effective duration.
As an alternative embodiment, if the lifetime of the cached first data exceeds the validity duration, the apparatus further comprises: and the receiving unit is used for receiving the updating data of the first data sent by the server.
As an alternative embodiment, the apparatus further comprises: and the updating unit is used for sending an updating request for updating the first data to the server.
As an alternative embodiment, the connection unit comprises: the searching module is used for searching a browser where the second data to be obtained is located according to the data index if the connection with the server fails; and the connection module is used for establishing connection with the browser where the second data is located, and the number of the browsers where the second data is located is one or more.
According to the embodiment of the invention, the data acquisition device for implementing the data acquisition method is also provided. Fig. 7 is a schematic diagram of a data acquisition apparatus according to an embodiment of the present invention, as shown in fig. 7, a generating unit 72 is configured to generate a data index, where the data index is used to indicate storage distribution of data of a server on multiple browsers; a distributing unit 74, configured to distribute the data index to the multiple browsers, so that one of the multiple browsers establishes a connection with any one or more of the multiple browsers according to the data index, and obtains data of a server stored in the browser with which the connection has been established.
It should be noted here that the generating unit 72 and the distributing unit 74 correspond to step S302 and step S304 in embodiment 1, and the above units are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure in embodiment 1. It should be noted that the above units may be operated in the computer terminal 10 provided in embodiment 1 as a part of the apparatus.
In the embodiment of the invention, the data of the server can be stored in a distributed manner on a plurality of browsers, after the data index of the server is received, the connection relation between the server and any one or more of the plurality of browsers can be established based on the indication of the data index, and the data of the server stored in the browser with the established connection can be obtained, so that the data of the server can be stored in the plurality of browsers in a distributed manner, the aim of caching a large amount of data is fulfilled, the connection of the browsers can be quickly established based on the data index of the server, and the stored data of the server can be obtained from the browser, so that the technical effect of improving the utilization rate of the cached data is realized, and the technical problem of low utilization rate of the cached data is further solved.
As an alternative embodiment, the generating unit includes: the issuing module is used for issuing first data to a plurality of browsers; the acquisition module is used for acquiring cache information from the plurality of browsers, wherein the cache information is obtained by caching part or all of the first data by any one or more of the plurality of browsers; and the generating module is used for generating the data index by taking the cache information as the data distribution index.
As an alternative embodiment, the apparatus further comprises: a setting unit configured to set an effective duration of the first data for the plurality of browsers; the first issuing unit is used for issuing the effective duration to the multiple browsers so that any one or more of the multiple browsers can clear the cached first data when the life cycle of the cached first data exceeds the effective duration.
As an alternative embodiment, if the lifetime of the cached first data exceeds the validity duration, the apparatus further comprises: and the second issuing unit is used for issuing the updating data of the first data to any one or more browsers in the plurality of browsers.
As an alternative embodiment, the apparatus further comprises: the updating receiving unit is used for receiving updating requests for updating the first data sent by any one or more browsers in the plurality of browsers.
Example 3
The embodiment of the invention can provide a computer terminal which can be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal may also be replaced with a terminal device such as a mobile terminal.
Optionally, in this embodiment, the computer terminal may be located in at least one network device of a plurality of network devices of a computer network.
In this embodiment, the computer terminal may execute the program code of the following steps in the data acquisition method: receiving a data index of a server, wherein the data index is used for indicating storage distribution of data of the server on a plurality of browsers; establishing connection with any one or more of the plurality of browsers according to the data index; and obtaining data of the server stored in the browser with the established connection.
In this embodiment, the computer terminal may execute the program code of the following steps in the data acquisition method: generating a data index, wherein the data index is used for indicating the storage distribution of data of a server on a plurality of browsers; and distributing the data index to the plurality of browsers to enable one of the plurality of browsers to establish connection with any one or more of the plurality of browsers according to the data index, and obtaining data of the server stored in the browser with the established connection.
Alternatively, fig. 8 is a block diagram of a computer terminal according to an embodiment of the present invention. As shown in fig. 8, the computer terminal 10 may include: one or more processors (only one of which is shown), memory, and a transmission module.
The memory may be configured to store software programs and modules, such as program instructions/modules corresponding to the data acquisition method and apparatus in the embodiments of the present invention, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory, so as to implement the data acquisition method. The memory may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memories may further include a memory located remotely from the processor, which may be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The processor can call the information and the application program stored in the memory through the transmission module to execute the following steps: receiving a data index of a server, wherein the data index is used for indicating storage distribution of data of the server on a plurality of browsers; establishing connection with any one or more of the plurality of browsers according to the data index; and obtaining data of the server stored in the browser with the established connection.
Optionally, the processor may further execute the program code of the following steps: obtaining first data from a server; caching part or all of the first data; and sending the cache information to the server so that the server generates a data index by taking the cache information as a data distribution index.
Optionally, the processor may further execute the program code of the following steps: obtaining the effective duration of the first data; and if the life cycle of the cached first data exceeds the effective duration, clearing the cached first data.
Optionally, the processor may further execute the program code of the following steps: and receiving the updating data of the first data sent by the server.
Optionally, the processor may further execute the program code of the following steps: an update request to update the first data is sent to the server.
Optionally, the processor may further execute the program code of the following steps: if the connection with the server fails, searching a browser where second data to be obtained is located according to the data index; and establishing connection with the browser where the second data is located, wherein the number of the browsers where the second data is located is one or more.
The embodiment of the invention provides a data sharing scheme. In the embodiment of the invention, the data of the server can be stored in a distributed manner on a plurality of browsers, after the data index of the server is received, the connection relation between the server and any one or more of the plurality of browsers can be established based on the indication of the data index, and the data of the server stored in the browser with the established connection can be obtained, so that the data of the server can be stored in the plurality of browsers in a distributed manner, the aim of caching a large amount of data is fulfilled, the connection of the browsers can be quickly established based on the data index of the server, and the stored data of the server can be obtained from the browser, so that the technical effect of improving the utilization rate of the cached data is realized, and the technical problem of low utilization rate of the cached data is further solved.
The processor can call the information and the application program stored in the memory through the transmission module to execute the following steps: generating a data index, wherein the data index is used for indicating the storage distribution of data of a server on a plurality of browsers; and distributing the data index to the plurality of browsers to enable one of the plurality of browsers to establish connection with any one or more of the plurality of browsers according to the data index, and obtaining data of the server stored in the browser with the established connection.
Optionally, the processor may further execute the program code of the following steps: issuing first data to a plurality of browsers; cache information is obtained from a plurality of browsers, and the cache information is obtained by caching part or all of first data by any one or more of the plurality of browsers; and taking the cache information as a data distribution index to generate a data index.
Optionally, the processor may further execute the program code of the following steps: setting effective duration of first data for a plurality of browsers; and issuing the effective duration to the multiple browsers so that any one or more of the multiple browsers can clear the cached first data when determining that the life cycle of the cached first data exceeds the effective duration.
Optionally, the processor may further execute the program code of the following steps: and issuing the updating data of the first data to any one or more browsers in the plurality of browsers.
Optionally, the processor may further execute the program code of the following steps: and receiving an updating request sent by any one or more of the plurality of browsers for updating the first data.
The embodiment of the invention provides a data acquisition scheme. In the embodiment of the invention, the data of the server can be stored in a distributed manner on a plurality of browsers, after the data index of the server is received, the connection relation between the server and any one or more of the plurality of browsers can be established based on the indication of the data index, and the data of the server stored in the browser with the established connection can be obtained, so that the data of the server can be stored in the plurality of browsers in a distributed manner, the aim of caching a large amount of data is fulfilled, the connection of the browsers can be quickly established based on the data index of the server, and the stored data of the server can be obtained from the browser, so that the technical effect of improving the utilization rate of the cached data is realized, and the technical problem of low utilization rate of the cached data is further solved.
It can be understood by those skilled in the art that the structure shown in fig. 8 is only an illustration, and the computer terminal may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palmtop computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 8 is a diagram illustrating a structure of the electronic device. For example, the computer terminal 10 may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 8, or have a different configuration than shown in FIG. 8.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
Example 4
The embodiment of the invention also provides a storage medium. Optionally, in this embodiment, the storage medium may be configured to store a program code executed by the data acquisition method provided in the first embodiment.
Optionally, in this embodiment, the storage medium may be located in any one of computer terminals in a computer terminal group in a computer network, or in any one of mobile terminals in a mobile terminal group.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: receiving a data index of a server, wherein the data index is used for indicating storage distribution of data of the server on a plurality of browsers; establishing connection with any one or more of the plurality of browsers according to the data index; and obtaining data of the server stored in the browser with the established connection.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: obtaining first data from a server; caching part or all of the first data; and sending the cache information to the server so that the server generates a data index by taking the cache information as a data distribution index.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: obtaining the effective duration of the first data; and if the life cycle of the cached first data exceeds the effective duration, clearing the cached first data.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: and receiving the updating data of the first data sent by the server.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: an update request to update the first data is sent to the server.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: if the connection with the server fails, searching a browser where second data to be obtained is located according to the data index; and establishing connection with the browser where the second data is located, wherein the number of the browsers where the second data is located is one or more.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: generating a data index, wherein the data index is used for indicating the storage distribution of data of a server on a plurality of browsers; and distributing the data index to the plurality of browsers to enable one of the plurality of browsers to establish connection with any one or more of the plurality of browsers according to the data index, and obtaining data of the server stored in the browser with the established connection.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: issuing first data to a plurality of browsers; cache information is obtained from a plurality of browsers, and the cache information is obtained by caching part or all of first data by any one or more of the plurality of browsers; and taking the cache information as a data distribution index to generate a data index.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: setting effective duration of first data for a plurality of browsers; and issuing the effective duration to the multiple browsers so that any one or more of the multiple browsers can clear the cached first data when determining that the life cycle of the cached first data exceeds the effective duration.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: and issuing the updating data of the first data to any one or more browsers in the plurality of browsers.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: and receiving an updating request sent by any one or more of the plurality of browsers for updating the first data.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, 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 the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be 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, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a 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 according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (15)

1. A method of data acquisition, comprising:
receiving a data index of a server, wherein the data index is used for indicating storage distribution of data of the server on a plurality of browsers;
establishing connection with any one or more of the plurality of browsers according to the data index;
and obtaining the data of the server stored in the browser with the established connection.
2. The data acquisition method of claim 1, further comprising:
obtaining first data from the server;
caching part or all of the first data;
and sending the cache information to the server so that the server takes the cache information as a data distribution index to generate the data index.
3. The data acquisition method of claim 2, further comprising:
obtaining the effective duration of the first data;
and if the life cycle of the cached first data exceeds the effective duration, clearing the cached first data.
4. The data acquisition method of claim 3, wherein if the lifetime of the cached first data exceeds the validity period, the method further comprises:
and receiving the updating data of the first data sent by the server.
5. The data acquisition method of claim 4, further comprising:
sending an update request to the server to update the first data.
6. The data acquisition method according to any one of claims 1 to 5, wherein the establishing a connection with any one or more of the plurality of browsers according to the data index comprises:
if the connection with the server fails, searching a browser where second data to be obtained are located according to the data index;
and establishing connection with the browser where the second data is located, wherein the number of the browsers where the second data is located is one or more.
7. A method of data acquisition, comprising:
generating a data index, wherein the data index is used for indicating storage distribution of data of a server on a plurality of browsers;
distributing the data index to the plurality of browsers to enable one of the plurality of browsers to establish connection with any one or more of the plurality of browsers according to the data index, and obtaining data of the server stored in the browser with the established connection.
8. The data acquisition method of claim 7, wherein generating the data index comprises:
issuing first data to the plurality of browsers;
obtaining cache information from the plurality of browsers, wherein the cache information is obtained by caching part or all of the first data by any one or more of the plurality of browsers;
and taking the cache information as a data distribution index to generate the data index.
9. The data acquisition method of claim 8, further comprising:
setting effective time length of the first data for the plurality of browsers;
and issuing the effective duration to the plurality of browsers so that any one or more of the plurality of browsers removes the cached first data when determining that the life cycle of the cached first data exceeds the effective duration.
10. The data acquisition method of claim 9, wherein if the lifetime of the cached first data exceeds the validity period, the method further comprises:
and issuing the updating data of the first data to any one or more browsers in the plurality of browsers.
11. The data acquisition method of claim 10, further comprising:
and receiving an updating request sent by any one or more browsers in the plurality of browsers for updating the first data.
12. A data acquisition apparatus, comprising:
the index receiving unit is used for receiving a data index of a server, and the data index is used for indicating the storage distribution of the data of the server on a plurality of browsers;
the connection unit is used for establishing connection with any one or more of the plurality of browsers according to the data index;
and the first acquisition unit is used for acquiring the data of the server stored in the browser with the established connection.
13. A data acquisition apparatus, comprising:
the generating unit is used for generating a data index, and the data index is used for indicating the storage distribution of the data of the server on a plurality of browsers;
a distributing unit, configured to distribute the data index to the multiple browsers, so that one of the multiple browsers establishes a connection with any one or more of the multiple browsers according to the data index, and obtains data of the server stored in the browser with the established connection.
14. A storage medium, characterized in that the storage medium includes a stored program, wherein when the program runs, a device in which the storage medium is located is controlled to execute the data acquisition method according to any one of claims 1 to 11.
15. A processor, characterized in that the processor is configured to run a program, wherein the program is configured to execute the data acquisition method according to any one of claims 1 to 11 when running.
CN202010280084.4A 2020-04-10 2020-04-10 Data acquisition method and device, storage medium and processor Pending CN113515711A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010280084.4A CN113515711A (en) 2020-04-10 2020-04-10 Data acquisition method and device, storage medium and processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010280084.4A CN113515711A (en) 2020-04-10 2020-04-10 Data acquisition method and device, storage medium and processor

Publications (1)

Publication Number Publication Date
CN113515711A true CN113515711A (en) 2021-10-19

Family

ID=78060600

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010280084.4A Pending CN113515711A (en) 2020-04-10 2020-04-10 Data acquisition method and device, storage medium and processor

Country Status (1)

Country Link
CN (1) CN113515711A (en)

Similar Documents

Publication Publication Date Title
CN110290217B (en) Data request processing method and device, storage medium and electronic device
CN107682397B (en) Customer resources acquisition methods, device, terminal device and storage medium
US9282141B2 (en) Method and system for loading file in webgame
US20120096116A1 (en) Content distribution network using a web browser and locally stored content to directly exchange content between users
WO2017107463A1 (en) Method and apparatus for delivering cdn addresses
US10120872B2 (en) Data caching based on requestor identity
CN101917488A (en) BT download method, device and system
CN110703980A (en) File transmission method and device
CN104468852A (en) Method, device and system for client to select IP link address
US20140143339A1 (en) Method, apparatus, and system for resource sharing
CN110839049A (en) Data scheduling method and system based on domain name system
CN111935306B (en) Node scheduling method and device
CN110856044A (en) Video image quality enhancement transmission method and related device
Fan et al. Web resource cacheable edge device in fog computing
CN103685496A (en) Transmission method and device of file data
CN109873855A (en) A kind of resource acquiring method and system based on block chain network
CN113037888A (en) Method and device for accelerating configuration of domain name, storage medium and electronic equipment
CN110048906B (en) Method, system, device and server for judging node transmission quality
CN110401553B (en) Server configuration method and device
CN112243038B (en) Downloading method, terminal and computer storage medium
US20170013056A1 (en) Data processing method and system based on asymmetric p2p network
CN110545453B (en) Content distribution method, device and system of content distribution network
CN113515711A (en) Data acquisition method and device, storage medium and processor
CN110784534A (en) Data service method, device and system and electronic equipment
CN105847396A (en) Data transmission 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