CN110177150A - Data acquisition method and device, electronic equipment and readable storage medium - Google Patents

Data acquisition method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN110177150A
CN110177150A CN201910491661.1A CN201910491661A CN110177150A CN 110177150 A CN110177150 A CN 110177150A CN 201910491661 A CN201910491661 A CN 201910491661A CN 110177150 A CN110177150 A CN 110177150A
Authority
CN
China
Prior art keywords
data
electronic equipment
informative abstract
abstract value
access request
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
CN201910491661.1A
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.)
Beijing Kingsoft Internet Security Software Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Internet Security Software Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201910491661.1A priority Critical patent/CN110177150A/en
Publication of CN110177150A publication Critical patent/CN110177150A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • H04L67/5683Storage of data provided by user terminals, i.e. reverse caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a data acquisition method, a data acquisition device, electronic equipment and a readable storage medium. The method is applied to the electronic equipment and comprises the following steps: when a data access request is received, first data are obtained from a server; the first data is data located at a preset position in second data requested to be accessed by the data access request; calculating an information abstract value of the first data by using a preset information abstract algorithm; searching an information abstract value in an application program cache of the electronic equipment; and when the information abstract value is found, acquiring second data which is stored in the application program cache and has a mapping relation with the information abstract value. Therefore, the second data can be acquired from the application program cache of the electronic equipment, and the data acquisition speed is improved.

Description

A kind of data capture method, device, electronic equipment and readable storage medium storing program for executing
Technical field
The present invention relates to Internet technical field, more particularly to a kind of data capture method, device, electronic equipment and can Read storage medium.
Background technique
Currently, in order to improve the speed for obtaining data, Chang Liyong CDN (Content Delivery Network, content point Hairnet network) it is next data cached.For example, utilizing CDN node caching data A acquired in the server.In this way, with the CDN node The electronic equipment being closer can obtain data A from the CDN node, without obtaining the data from the server of distant place A improves the speed for obtaining data A.
Inventor has found that the speed that this kind obtains the mode of data is still relatively slow in the implementation of the present invention, can not Meets the needs of growing ground quick obtaining data.
Summary of the invention
The embodiment of the present invention is designed to provide a kind of data capture method, device, electronic equipment and readable storage medium Matter, the second data can be obtained from the application cache of electronic equipment, to improve the speed for obtaining data.Specific skill Art scheme is as follows:
In a first aspect, being applied to electronic equipment the embodiment of the invention provides a kind of data capture method, may include:
When receiving data access request, the first data are obtained from server;Wherein, the first data are data access Request the data for being located at predeterminated position in the second requested access to data;
Using preset message digest algorithm, the informative abstract value of the first data is calculated;
Informative abstract value is searched in the application cache of electronic equipment;
When finding informative abstract value, obtaining the foundation of store in application cache and informative abstract value has mapping Second data of relationship.
Optionally, in embodiments of the present invention, this method can also include:
When not finding informative abstract value, the second data are obtained from server.
Optionally, in embodiments of the present invention, when receiving data access request, the first data are obtained from server The step of, may include:
When receiving data access request, the byte long for the second data that data access request is requested access to is determined Degree;
Based on byte length, division obtains the first preset quantity data interval corresponding to the second data;
From the byte data for obtaining predeterminated position in the second data, each data intervals in server;
The byte data obtained from each data interval is combined, the first data are obtained.
Optionally, in embodiments of the present invention, predeterminated position may include: preceding second preset quantity of each data interval Position corresponding to a byte data, or, position corresponding to the rear third preset quantity byte data of each data interval.
Optionally, in embodiments of the present invention, message digest algorithm may include: that hash algorithm, MD5 algorithm or MD4 are calculated Method.
Second aspect, the embodiment of the invention also provides a kind of data acquisition facilities, are applied to electronic equipment, can wrap It includes:
First obtains module, for obtaining the first data from server when receiving data access request;Wherein, It is located at the data of predeterminated position in the second data that first data are requested access to by data access request;
Computing module calculates the informative abstract value of the first data for utilizing preset message digest algorithm;
Searching module, for searching informative abstract value in the application cache of electronic equipment;
Second obtains module, for obtaining store in application cache and information when finding informative abstract value Digest value establishes the second data for having mapping relations.
Optionally, in embodiments of the present invention, which can also include:
Third obtains module, for obtaining the second data from server when not finding informative abstract value.
Optionally, in embodiments of the present invention, the first acquisition module specifically can be used for:
When receiving data access request, the byte long for the second data that data access request is requested access to is determined Degree;
Based on byte length, division obtains the first preset quantity data interval corresponding to the second data;
From the byte data for obtaining predeterminated position in the second data, each data intervals in server;
The byte data obtained from each data interval is combined, the first data are obtained.
Optionally, in embodiments of the present invention, predeterminated position may include: preceding second preset quantity of each data interval Position corresponding to a byte data, or, position corresponding to the rear third preset quantity byte data of each data interval.
Optionally, in embodiments of the present invention, message digest algorithm may include: that hash algorithm, MD5 algorithm or MD4 are calculated Method.
The third aspect, the embodiment of the invention also provides a kind of electronic equipment, may include processor, communication interface, deposit Reservoir and communication bus, wherein processor, communication interface, memory complete mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes the described in any item method steps of first aspect Suddenly.
Fourth aspect is stored with meter the embodiment of the invention also provides a kind of readable storage medium storing program for executing in readable storage medium storing program for executing Calculation machine program realizes first aspect described in any item method and steps when computer program is executed by processor.
5th aspect, the embodiment of the invention also provides a kind of computer program products comprising instruction, when it is in electronics When being run in equipment, so that electronic equipment executes the described in any item method and steps of first aspect.
In embodiments of the present invention, electronic equipment can obtain when receiving data access request from server One data.Wherein, the data of predeterminated position are located in the second data which is requested access to by data access request. It is then possible to calculate the informative abstract value of the first data using preset message digest algorithm.Later, it can be set in the electronics The informative abstract value is searched in standby application cache.When finding the informative abstract value, the available application program The second data being stored in caching, having mapping relations with informative abstract value foundation.In this way, can be from the application of electronic equipment The second data are obtained in program cache, without obtaining second data from server, improve the speed for obtaining data.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of flow chart of data capture method provided in an embodiment of the present invention;
Fig. 2 is a kind of flow chart of method for obtaining the first data provided in an embodiment of the present invention;
Fig. 3 is a kind of structural schematic diagram of data acquisition facility provided in an embodiment of the present invention;
Fig. 4 is the structural schematic diagram of a kind of electronic equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
The technical issues of in order to solve in the presence of the prior art, the embodiment of the invention provides a kind of data recipients Method, device, electronic equipment and readable storage medium storing program for executing.
Data capture method provided in an embodiment of the present invention is illustrated first below.
Data capture method provided in an embodiment of the present invention can be applied to electronic equipment.The electronic equipment includes but not It is confined to computer, mobile phone and intelligent wearable device.Referring to Fig. 1, data capture method provided in an embodiment of the present invention be can wrap Include following steps:
S101: when receiving data access request, the first data are obtained from server;Wherein, the first data are number It is located at the data of predeterminated position in the second data requested access to according to access request;
It is understood that the data access request can be picture access request, video access request, JS (Java Script, Java script) nets such as access request and CSS (Cascading Style Sheets, cascading style sheets) access request Any one in page static resource, naturally it is also possible to be the webpage static resource access request for a webpage, certainly simultaneously It is not limited to this.
Electronic equipment, can be from first obtaining in requested access to data after receiving data access request in server A part of data.That is, first from obtained in server it is in the second data that the data access request is requested access to, be located at it is default First data of position.Due to only obtaining a part of data from server, acquired data volume is less, thus can be quickly Acquire the partial data.
Wherein, first data and the second data can be to be one or more in picture, video, JS and CSS, certainly simultaneously It is not limited to this.In addition, the server can be the corresponding source server of application program of the sending data access request, It can be CDN (Content Delivery Network, content distributing network) node, this is all reasonable.In addition, this is default Position can refer to a position, be also possible to multiple positions, this is all reasonable.
Referring to fig. 2, electronic equipment specifically can obtain as follows the first data:
S1011: when receiving data access request, the word for the second data that data access request is requested access to is determined Save length;
For example, after electronic equipment receives data access request, it can determine that data access request is requested access to The second data byte length be 100 bytes.
S1012: being based on byte length, and division obtains the first preset quantity data interval corresponding to the second data;
For example, electronic equipment can be based on 100 byte of byte length, and it is 3 corresponding that division obtains the second data Data interval is [1,30), [30,60) and [60,100].In this way, it is right that the second data institute can be obtained with the byte length of the second data 3 data intervals answered.Wherein, 3 data intervals divided are not limited to above-mentioned cited division mode.
It is understood that the first preset quantity is specifically as follows 4,3 or 2, it is not limited thereto certainly.Its In, when the corresponding number of the first preset quantity is bigger, then the data interval number divided is more, in this way, can be with Extract the byte data in multiple data intervals.
S1013: from the byte data for obtaining predeterminated position in the second data, each data intervals in server;
For example, electronic equipment can be obtained from server: it is in the second data and be located at data interval [1,30) Interior preceding 5 bytes;It is in second data and be located at data interval [30,60) preceding 5 bytes in;In second data and position In preceding 5 bytes in data interval [60,100].In this way, the available byte number to predeterminated position in each data interval According to.
Specifically, server can determine correspond in the second data data interval [1,30) in the first subdata, the In two data correspond to data interval [30,60) in the second subdata, and determine the second data in correspond to data interval [60,100] the third subdata in.Then, server can determine the first subdata, the second subdata and third subnumber respectively It is located at the byte data of predeterminated position (such as first 5) in, it can determine pre- in each data interval in the second data If the byte data of position.To which electronic equipment can be from each data interval obtained in the second data in server First five byte data.
It is understood that predeterminated position may include: the preceding second preset quantity byte data of each data interval Corresponding position, or, position corresponding to the rear third preset quantity byte data of each data interval.Certain not office It is limited to this.
Also, the first preset quantity, the second preset quantity are a and third preset quantity can be by those skilled in the art It is set, is not limited thereto certainly as the case may be.
Further it will be understood that there may be following situations: the second data are K1 before first time point, first After time point, the second data K1 is modified to the second data K2.So, this kind extracts the byte data in multiple data intervals Mode, it is ensured that after the second data are modified, the byte data extracted from multiple byte sections is different from the The byte data that two data are extracted before modification.
S1014: the byte data obtained from each data interval is combined, and obtains the first data.
Assuming that from the data interval in the second data, [1,30) byte data obtained is abcde, from data interval [30,60) byte data obtained be cdefg, and from data interval [60,100] byte data obtained be hijkm.That , byte data obtained can be combined according to span order from left to right, obtain the first data abcdecdefghijkm.It is of course also possible to byte data obtained is combined according to span order from right to left, This is all reasonable.Certainly it is not limited thereto.
S102: utilizing preset message digest algorithm, calculates the informative abstract value of the first data;
After obtaining the first data, electronic equipment can use preset message digest algorithm and calculate first data Informative abstract value.Wherein, which can be with unique identification first data.
Preset message digest algorithm includes but is not limited to: (Cyclic Redundancy Check is recycled superfluous CRC Remaining verification) algorithm, SHA (Secure Hash Algorithm, secure hash algorithm) algorithm, RIPEMD (RACE Integrity Primitives Evaluation Message Digest, RACE raw integrity verification message abstract) algorithm, MD4 (Message-Digest Algorithm 4, message digest algorithm edition 4) algorithm and MD5 (Message-Digest Algorithm 5, message digest algorithm version 5) algorithm.
S103: informative abstract value is searched in the application cache of electronic equipment;
S104: when finding informative abstract value, obtain application cache in store, with informative abstract value establish have Second data of mapping relations.
Wherein, after the informative abstract value of the first data is calculated, electronic equipment can answering in the electronic equipment With searching the informative abstract value in program cache.When the informative abstract value can be found, show the electronic equipment in history On second data were downloaded from server.At this point, stored in the available application cache of electronic equipment and information Digest value establishes the second data for having mapping relations.In this way, the second number can be obtained from the application cache of electronic equipment According to, without obtaining second data from server, improve obtain data speed.Moreover, reducing electronic equipment Flow consumption and bandwidth occupancy.
When not finding informative abstract value, show the electronic equipment do not downloaded from server in history this second Data.At this point it is possible to obtain the second data from server.And it is possible to obtain the first of the second data in the manner described above Then data calculate the informative abstract value of the first data.Then, the mapping relations of first data and the informative abstract value are deposited Storage into application cache, in order to it is subsequent can be with quick obtaining second data.
Wherein, it above by using the byte data of specific position in multiple data intervals to be merged into the first data, and counts The mode for calculating the informative abstract value of first data, can extract the byte data of various pieces in the second data.In this way, subtracting Having lacked partial data modification in the second data, still the still identical situation of obtained informative abstract value occurs.It is thus possible to Avoid the second data that mistake is found based on informative abstract value.
In embodiments of the present invention, electronic equipment can obtain when receiving data access request from server One data.Wherein, the data of predeterminated position are located in the second data which is requested access to by data access request. It is then possible to calculate the informative abstract value of the first data using preset message digest algorithm.Later, it can be set in the electronics The informative abstract value is searched in standby application cache.When finding the informative abstract value, the available application program The second data being stored in caching, having mapping relations with informative abstract value foundation.In this way, can be from the application of electronic equipment The second data are obtained in program cache, without obtaining second data from server, improve the speed for obtaining data.
Below with reference to specific example, data capture method provided in an embodiment of the present invention is illustrated again.
Assuming that user needs to access webpage https by the first browser installed in electronic equipment: // www.baidu.com.Wherein, electronic equipment shows that the webpage needs to use JQuery frame, that is, needs to use JQuery JQuery.js file corresponding to frame.Wherein, JQuery frame is the library JS of lightweight.
When electronic equipment receives webpage https: after the data access request of //www.baidu.com, electronic equipment It can be from a part of data in Baidu's server pull JQuery.js file as the first data.Wherein, which can Think preceding 10 byte datas, intermediate 10 byte datas and rear 10 byte datas of JQuery.js file.Then, electric Sub- equipment can be based on HASH (hash) algorithm, calculate the informative abstract value of the first data.And, it is assumed that the information being calculated Digest value is 28A2D8.
Then, electronic equipment can search informative abstract value 28A2D8 in local browser rs cache.When search not When to informative abstract value 28A2D8, then show that electronic equipment did not downloaded the JQuery.js file from server.At this point, electric Sub- equipment can pull the JQuery.js file from Baidu's server, and by the informative abstract value 28A2D8 and be somebody's turn to do JQuery.js file correspondence is stored in the first browser rs cache.
In addition, when user accesses webpage https by the second browser installed in electronic equipment: // When www.baidu.com, then, electronic equipment is receiving webpage https: the data access request of //www.baidu.com Later, electronic equipment can be from a part of data in Baidu's server pull JQuery.js file as the first data.And And the informative abstract value for the first data being calculated is 28A2D8.
Then, electronic equipment can search informative abstract value 28A2D8 in the first browser rs cache, at this point, showing One browser downloaded the JQuery.js file in history.In that case, electronic equipment can be directly from the first browsing The JQuery.js file established with the informative abstract value 28A2D8 and there are mapping relations is pulled in device caching.In this way, can be from local JQuery.js file is obtained, to accelerate the speed of access webpage, and reduces the flow consumption and bandwidth of electronic equipment It occupies.
Wherein, when user accesses webpage https by the second browser installed in electronic equipment: // When www.baidu.com, informative abstract value of the electronic equipment from the first data in Baidu's server pull JQuery.js file It is not 28A2D8 and is 28B2D8, then shows JQuery.js file and modified.Also, in local browser rs cache Middle lookup is less than informative abstract value 28B2D8.So.This in that case, electronic equipment can be pulled from Baidu's server The JQuery.js file modified, and the informative abstract value 28B2D8 and JQuery.js modified is literary Part correspondence is stored in the first browser rs cache.
It to sum up, can be from the application cache of electronic equipment using data acquisition scheme provided in an embodiment of the present invention The second data of middle acquisition improve the speed for obtaining data.To accelerate the speed of access webpage, and reduce electronics The flow of equipment consumes and bandwidth occupancy.
Corresponding to above method embodiment, the embodiment of the invention also provides a kind of data acquisition facilities, are applied to electronics Equipment, referring to Fig. 3, the apparatus may include:
First obtains module 301, for obtaining the first data from server when receiving data access request;Its In, the data of predeterminated position are located in the second data that the first data are requested access to by data access request;
Computing module 302 calculates the informative abstract value of the first data for utilizing preset message digest algorithm;
Searching module 303, for searching informative abstract value in the application cache of electronic equipment;
Second obtains module 304, for when finding informative abstract value, obtain it is being stored in application cache, with Informative abstract value establishes the second data for having mapping relations.
In embodiments of the present invention, electronic equipment can obtain when receiving data access request from server One data.Wherein, the data of predeterminated position are located in the second data which is requested access to by data access request. It is then possible to calculate the informative abstract value of the first data using preset message digest algorithm.Later, it can be set in the electronics The informative abstract value is searched in standby application cache.When finding the informative abstract value, the available application program The second data being stored in caching, having mapping relations with informative abstract value foundation.In this way, can be from the application of electronic equipment The second data are obtained in program cache, without obtaining second data from server, improve the speed for obtaining data.
Optionally, in embodiments of the present invention, which can also include:
Third obtains module, for obtaining the second data from server when not finding informative abstract value.
Optionally, in embodiments of the present invention, the first acquisition module 301 is specifically used for:
When receiving data access request, the byte long for the second data that data access request is requested access to is determined Degree;
Based on byte length, division obtains the first preset quantity data interval corresponding to the second data;
From the byte data for obtaining predeterminated position in the second data, each data intervals in server;
The byte data obtained from each data interval is combined, the first data are obtained.
Optionally, in embodiments of the present invention, predeterminated position includes: the preceding second preset quantity word of each data interval Joint number is according to corresponding position, or, position corresponding to the rear third preset quantity byte data of each data interval.
Optionally, in embodiments of the present invention, message digest algorithm includes: hash algorithm, MD5 algorithm or MD4 algorithm.
Corresponding to above method embodiment, the embodiment of the invention also provides a kind of electronic equipment, as shown in figure 4, including Processor 401, communication interface 402, memory 403 and communication bus 404, wherein processor 401, communication interface 402, storage Device 403 completes mutual communication by communication bus 404,
Memory 403, for storing computer program;
Processor 401 when for executing the program stored on memory 403, realizes any of the above-described data recipient The method and step of method.
In embodiments of the present invention, electronic equipment can obtain when receiving data access request from server One data.Wherein, the data of predeterminated position are located in the second data which is requested access to by data access request. It is then possible to calculate the informative abstract value of the first data using preset message digest algorithm.Later, it can be set in the electronics The informative abstract value is searched in standby application cache.When finding the informative abstract value, the available application program The second data being stored in caching, having mapping relations with informative abstract value foundation.In this way, can be from the application of electronic equipment The second data are obtained in program cache, without obtaining second data from server, improve the speed for obtaining data.
Corresponding to above method embodiment, the embodiment of the invention also provides a kind of computer readable storage medium, the meters It is stored with instruction in calculation machine readable storage medium storing program for executing, when it runs on an electronic device, so that electronic equipment execution is any of the above-described The method and step of item data acquisition methods.
The computer program stored in computer readable storage medium provided in an embodiment of the present invention is by the place of electronic equipment After managing device execution, electronic equipment can obtain the first data when receiving data access request from server.Wherein, should It is located at the data of predeterminated position in the second data that first data are requested access to by data access request.It is then possible to utilize Preset message digest algorithm calculates the informative abstract value of the first data.It later, can be slow in the application program of the electronic equipment Deposit middle lookup informative abstract value.When finding the informative abstract value, it is being stored in the available application cache, with The informative abstract value establishes the second data for having mapping relations.In this way, can be obtained from the application cache of electronic equipment Second data improve the speed for obtaining data without obtaining second data from server.
Corresponding to above method embodiment, the embodiment of the invention also provides a kind of, and the computer program comprising instruction is produced Product, when it runs on an electronic device, so that electronic equipment executes the method and step of any of the above-described data capture method.
After computer program provided in an embodiment of the present invention is executed by the processor of electronic equipment, in the embodiment of the present invention In, electronic equipment can obtain the first data when receiving data access request from server.Wherein, first data It is located at the data of predeterminated position in the second data requested access to by data access request.It is then possible to utilize preset letter Digest algorithm is ceased, the informative abstract value of the first data is calculated.Later, it can be searched in the application cache of the electronic equipment The informative abstract value.It is being stored in the available application cache, plucked with the information when finding the informative abstract value It is worth the second data established and there are mapping relations.In this way, the second data can be obtained from the application cache of electronic equipment, Without obtaining second data from server, the speed for obtaining data is improved.
The communication bus that above-mentioned electronic equipment is mentioned can be Peripheral Component Interconnect standard (Peripheral Component Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control bus etc..For just It is only indicated with a thick line in expression, figure, it is not intended that an only bus or a type of bus.
Communication interface is for the communication between above-mentioned electronic equipment and other equipment.
Memory may include random access memory (Random Access Memory, RAM), also may include non-easy The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also To be storage device that at least one is located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processing, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete Door or transistor logic, discrete hardware components.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.The computer program Product includes one or more computer instructions.When loading on computers and executing the computer program instructions, all or It partly generates according to process or function described in the embodiment of the present invention.The computer can be general purpose computer, dedicated meter Calculation machine, computer network or other programmable devices.The computer instruction can store in computer readable storage medium In, or from a computer readable storage medium to the transmission of another computer readable storage medium, for example, the computer Instruction can pass through wired (such as coaxial cable, optical fiber, number from a web-site, computer, server or data center User's line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server or Data center is transmitted.The computer readable storage medium can be any usable medium that computer can access or It is comprising data storage devices such as one or more usable mediums integrated server, data centers.The usable medium can be with It is magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state hard disk Solid State Disk (SSD)) etc..
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device, For electronic equipment, readable storage medium storing program for executing and computer program product embodiments, since it is substantially similar to the method embodiment, institute To be described relatively simple, the relevent part can refer to the partial explaination of embodiments of method.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention It is interior.

Claims (10)

1. a kind of data capture method, which is characterized in that be applied to electronic equipment, comprising:
When receiving data access request, the first data are obtained from server;Wherein, first data are the data It is located at the data of predeterminated position in the second data that access request is requested access to;
Using preset message digest algorithm, the informative abstract value of first data is calculated;
The informative abstract value is searched in the application cache of the electronic equipment;
When finding the informative abstract value, obtain it is being stored in the application cache, built with the informative abstract value Vertical second data for having mapping relations.
2. the method according to claim 1, wherein the method also includes:
When not finding the informative abstract value, second data are obtained from the server.
3. the method according to claim 1, wherein described when receiving data access request, from server The step of the first data of middle acquisition, comprising:
When receiving data access request, the byte long for the second data that the data access request is requested access to is determined Degree;
Based on the byte length, division obtains the first preset quantity data interval corresponding to second data;
From the byte data for obtaining predeterminated position in second data, each data intervals in server;
The byte data obtained from each data interval is combined, the first data are obtained.
4. according to the method described in claim 3, it is characterized in that, the predeterminated position includes: each data interval Position corresponding to preceding second preset quantity byte data, or, the rear third preset quantity word of each data interval Joint number is according to corresponding position.
5. method according to any of claims 1-4, which is characterized in that the message digest algorithm includes: Hash Algorithm, informative abstract MD5 algorithm or informative abstract MD4 algorithm.
6. a kind of data acquisition facility, which is characterized in that be applied to electronic equipment, comprising:
First obtains module, for obtaining the first data from server when receiving data access request;Wherein, described It is located at the data of predeterminated position in the second data that first data are requested access to by the data access request;
Computing module calculates the informative abstract value of first data for utilizing preset message digest algorithm;
Searching module, for searching the informative abstract value in the application cache of the electronic equipment;
Second obtain module, for when finding the informative abstract value, obtain it is being stored in the application cache, with The informative abstract value establishes second data for having mapping relations.
7. device according to claim 6, which is characterized in that described device further include:
Third obtains module, for when not finding the informative abstract value, obtaining second number from the server According to.
8. device according to claim 6, which is characterized in that the first acquisition module is specifically used for:
When receiving data access request, the byte long for the second data that the data access request is requested access to is determined Degree;
Based on the byte length, division obtains the first preset quantity data interval corresponding to second data;
From the byte data for obtaining predeterminated position in second data, each data intervals in server;
The byte data obtained from each data interval is combined, the first data are obtained.
9. a kind of electronic equipment, which is characterized in that including processor, communication interface, memory and communication bus, wherein processing Device, communication interface, memory complete mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes method step as claimed in any one of claims 1 to 5 Suddenly.
10. a kind of readable storage medium storing program for executing, which is characterized in that be stored with computer program, the meter in the readable storage medium storing program for executing Calculation machine program realizes method and step as claimed in any one of claims 1 to 5 when being executed by processor.
CN201910491661.1A 2019-06-06 2019-06-06 Data acquisition method and device, electronic equipment and readable storage medium Pending CN110177150A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910491661.1A CN110177150A (en) 2019-06-06 2019-06-06 Data acquisition method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910491661.1A CN110177150A (en) 2019-06-06 2019-06-06 Data acquisition method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN110177150A true CN110177150A (en) 2019-08-27

Family

ID=67698073

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910491661.1A Pending CN110177150A (en) 2019-06-06 2019-06-06 Data acquisition method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN110177150A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110826697A (en) * 2019-10-31 2020-02-21 深圳市商汤科技有限公司 Method and device for obtaining sample, electronic equipment and storage medium
CN114449089A (en) * 2021-12-17 2022-05-06 厦门市美亚柏科信息股份有限公司 Mobile phone application accessory automatic association method, terminal equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101179347A (en) * 2007-12-21 2008-05-14 深圳市迅雷网络技术有限公司 Method, system and service terminal of providing text file information
CN109492436A (en) * 2018-11-29 2019-03-19 深圳市网心科技有限公司 A kind of file verification method and relevant apparatus

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101179347A (en) * 2007-12-21 2008-05-14 深圳市迅雷网络技术有限公司 Method, system and service terminal of providing text file information
CN109492436A (en) * 2018-11-29 2019-03-19 深圳市网心科技有限公司 A kind of file verification method and relevant apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110826697A (en) * 2019-10-31 2020-02-21 深圳市商汤科技有限公司 Method and device for obtaining sample, electronic equipment and storage medium
CN114449089A (en) * 2021-12-17 2022-05-06 厦门市美亚柏科信息股份有限公司 Mobile phone application accessory automatic association method, terminal equipment and storage medium

Similar Documents

Publication Publication Date Title
US11017152B2 (en) Optimizing loading of web page based on aggregated user preferences for web page elements of web page
RU2608668C2 (en) System and method for control and organisation of web-browser cache for offline browsing
US9426200B2 (en) Updating dynamic content in cached resources
US9479519B1 (en) Web content fingerprint analysis to detect web page issues
US20130080868A1 (en) System and method thereof for dynamically associating a link to an information resource with a multimedia content displayed in a web-page
US10567525B2 (en) Method and system for mapping, tracking, and transporting of content data on a webpage
CN102799372B (en) A kind of method for uploading of pictorial information and upload device
US20130219255A1 (en) Authorized Syndicated Descriptions of Linked Web Content Displayed With Links in User-Generated Content
CN103051706A (en) Dynamic webpage request processing system and method for dynamic website
US20120005017A1 (en) Method and system for providing advertisements
CN108540508B (en) Method, device and equipment for pushing information
CN104077310A (en) Method, equipment and system for loading resource file
CN105528416A (en) Method and system for monitoring update contents of website
CN104899236A (en) Comment information display method, comment information display device and comment information display system
CN110177150A (en) Data acquisition method and device, electronic equipment and readable storage medium
US9646102B2 (en) Intelligent categorization of bookmarks
CN112650804B (en) Big data access method, device, system and storage medium
US20130073944A1 (en) Method and system for dynamically providing contextually relevant posts on an article
CN111783010B (en) Webpage blank page monitoring method, device, terminal and storage medium
CN104281581B (en) The monitoring method and system of the recommendation position content exposure amount of webpage
US10452727B2 (en) Method and system for dynamically providing contextually relevant news based on an article displayed on a web page
CN107480269B (en) Object display method and system, medium and computing equipment
CN113590985B (en) Page jump configuration method and device, electronic equipment and computer readable medium
US9858250B2 (en) Optimized read/write access to a document object model
US9251125B2 (en) Managing text in documents based on a log of research corresponding to the text

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190827