CN110457614B - Data increment updating method and device for reducing data concurrency and computer equipment - Google Patents

Data increment updating method and device for reducing data concurrency and computer equipment Download PDF

Info

Publication number
CN110457614B
CN110457614B CN201910594272.1A CN201910594272A CN110457614B CN 110457614 B CN110457614 B CN 110457614B CN 201910594272 A CN201910594272 A CN 201910594272A CN 110457614 B CN110457614 B CN 110457614B
Authority
CN
China
Prior art keywords
data
identification
loading
identification query
historical cache
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.)
Active
Application number
CN201910594272.1A
Other languages
Chinese (zh)
Other versions
CN110457614A (en
Inventor
杨军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southern Power Grid Digital Grid Research Institute Co Ltd
Original Assignee
Southern Power Grid Digital Grid Research Institute 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 Southern Power Grid Digital Grid Research Institute Co Ltd filed Critical Southern Power Grid Digital Grid Research Institute Co Ltd
Priority to CN201910594272.1A priority Critical patent/CN110457614B/en
Publication of CN110457614A publication Critical patent/CN110457614A/en
Application granted granted Critical
Publication of CN110457614B publication Critical patent/CN110457614B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/953Querying, e.g. by the use of web search engines
    • 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

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 Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application relates to a data increment updating method, a data increment updating device and computer equipment for reducing data concurrency. The method comprises the following steps: receiving a page loading request of a terminal; the page load request includes a data unit identification; acquiring historical cache data according to the data unit identification, and acquiring identification query data of a remote server; matching the identification query data with the historical cache data to determine to load update data; and sending the loading updating data to the terminal so as to enable the terminal to perform data increment updating. By adopting the method, the cache area is newly established so as to update the cache data in real time, local up-to-date resources are provided for loading the page data, and meanwhile, the identification query data fed back by the remote server is updated in real time, so that the data to be processed of the terminal is ensured to be the current required update data, instead of updating all the data, effective incremental update of the data is provided, and the improvement of the data updating efficiency is realized.

Description

Data increment updating method and device for reducing data concurrency and computer equipment
Technical Field
The present application relates to the field of page data loading, and in particular, to a data increment updating method and apparatus, a computer device, and a storage medium for reducing data concurrency.
Background
With the rapid development of increasingly sophisticated technologies, the display resolution of the terminal page is rapidly increasing, and according to the research in the field of ultra-high resolution (more than 4K) display, it can be found that even under the condition of excellent hardware configuration, the page loading with ultra-high resolution still has many performance problems.
For example, because the loading content of the ultrahigh resolution page is several times or even dozens of times of the loading content of the normal resolution (1080P) page, the page loading needs to consume the very large performance of the terminal; moreover, the content is large, the data request amount and the concurrency amount are increased, and the data loading consumes the terminal performance.
Therefore, the data updating method in the prior art has the problem of low data updating efficiency.
Disclosure of Invention
Therefore, it is necessary to provide a data increment updating method, an apparatus, a computer device and a storage medium for reducing the data concurrency amount, which can reasonably solve the technical problem that the data increment updating method for reducing the data concurrency amount has the technical problem of low data updating efficiency.
A data increment updating method for reducing data concurrency comprises the following steps:
receiving a page loading request of a terminal; the page load request includes a data unit identification;
acquiring historical cache data according to the data unit identification, and acquiring identification query data of a remote server;
matching the identification query data with the historical cache data to determine to load update data;
and sending the loading updating data to the terminal so as to enable the terminal to perform data increment updating.
In one embodiment, after the obtaining the historical cache data according to the data unit identifier and obtaining the identification query data of the remote server, the method further includes:
if the historical cache data is returned to be empty, backing up the identification query data to the historical cache data; the historical cache data is stored in a cache region and is used for responding to a subsequent request so as to provide data;
and if the historical cache data returns to be not empty, executing the step of matching the identification query data with the historical cache data.
In one embodiment, the matching the identification query data with the historical cache data to determine to load update data includes:
matching the identification query data with the historical cache data;
if the identification query data is not matched with the historical cache data, replacing the historical cache data with the identification query data;
and determining the identification query data as the loading update data.
In one embodiment, the matching the identification query data with the historical cache data to determine to load the update data further includes:
if the identification query data is matched with the historical cache data, deleting the identification query data;
when the identification query data of the remote server is empty after being deleted, determining that the loading update data is empty;
when the identification query data of the remote server is not empty after being deleted, determining the rest identification query data as the loading update data; the remaining identification query data are identification query data which are not matched with the historical cache data.
In one embodiment, the matching the identification query data with the historical cache data to determine to load update data includes:
and matching the identification query data with the historical cache data through a preset MD5 algorithm to determine loading update data.
A data increment updating method for reducing data concurrency comprises the following steps:
detecting a page loading trigger operation, and generating a page loading request;
sending the page loading request to a local server, obtaining historical cache data and identification query data of a remote server according to a data unit identification in the page loading request after the local server receives the page loading request, and feeding back loading update data after matching the identification query data with the historical cache data to determine loading update data;
receiving loading update data of the local server;
and updating the local data according to the loading updating data.
In one embodiment, the updating the local data according to the loading update data includes a loading update identifier, and the updating the local data according to the loading update data includes:
determining a data unit identification of the local data;
determining a target update identifier; the target update identification is a data unit identification matched with the loading update identification;
and updating the local data of the target update identification into the loading update data.
A data incremental update apparatus that reduces the amount of data concurrency, the apparatus comprising:
the request receiving module is used for receiving a page loading request of the terminal; the page load request includes a data unit identification;
the data acquisition module is used for acquiring historical cache data according to the data unit identifier and acquiring identifier query data of a remote server;
the data matching module is used for matching the identification query data with the historical cache data to determine loading update data;
and the data sending module is used for sending the loading updating data to the terminal so as to enable the terminal to carry out data increment updating.
A data incremental update apparatus that reduces the amount of data concurrency, the apparatus comprising:
the request generation module is used for detecting page loading triggering operation and generating a page loading request;
the request sending module is used for sending the page loading request to a local server, so that after the local server receives the page loading request, historical cache data and identification query data of a remote server are obtained according to a data unit identification in the page loading request, and after the identification query data are matched with the historical cache data to determine loading update data, the loading update data are fed back;
the data receiving module is used for receiving the loading updating data of the local server;
and the data updating module is used for updating the local data according to the loading updating data.
A data incremental update system that reduces data concurrency, the system comprising:
a local server and a terminal;
the terminal is used for detecting page loading triggering operation, generating a page loading request, sending the page loading request to a local server, and updating local data after the local server feeds back and loads updated data;
the local server is used for receiving a page loading request of the terminal, acquiring historical cache data and identification query data of a remote server according to a data unit identification in the page loading request, further matching the identification query data with the historical cache data, determining the loading update data, and then sending the loading update data to the terminal.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
receiving a page loading request of a terminal; the page load request includes a data unit identification;
acquiring historical cache data according to the data unit identification, and acquiring identification query data of a remote server;
matching the identification query data with the historical cache data to determine to load update data;
and sending the loading updating data to the terminal so as to enable the terminal to perform data increment updating.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
receiving a page loading request of a terminal; the page load request includes a data unit identification;
acquiring historical cache data according to the data unit identification, and acquiring identification query data of a remote server;
matching the identification query data with the historical cache data to determine to load update data;
and sending the loading updating data to the terminal so as to enable the terminal to perform data increment updating.
According to the data increment updating method and device for reducing the data concurrency, the computer equipment and the storage medium, after the local server receives the page loading request sent by the terminal, the historical cache data is obtained according to the data unit identification in the page loading request, the identification query data fed back by the remote server is matched with the historical cache data, the loading update data is determined, and finally the loading update data is sent to the terminal, so that the terminal can utilize the loading update data to realize the data increment updating. By adopting the method, the cache area is newly established so as to update the cache data in real time, local up-to-date resources are provided for loading the page data, and meanwhile, the identification query data fed back by the remote server is updated in real time, so that the data to be processed of the terminal is ensured to be the current required update data, instead of updating all the data, effective incremental update of the data is provided, and the improvement of the data updating efficiency is realized.
Drawings
FIG. 1 is a diagram of an application environment of a data incremental update method to reduce concurrency of data in one embodiment;
FIG. 2 is a flowchart illustrating a data incremental update method for reducing data concurrency in one embodiment;
FIG. 3 is a flowchart illustrating a data incremental update method for reducing data concurrency in another embodiment;
FIG. 4 is a block diagram of an embodiment of a data incremental update apparatus to reduce data concurrency;
FIG. 5 is a block diagram of a data incremental update apparatus for reducing data concurrency in another embodiment;
FIG. 6 is a block diagram of a data incremental update system that reduces data concurrency in one embodiment;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It should be noted that, in an application environment of page loading, there are situations of large data request amount and many times within a certain time, and a performance bottleneck of data loading time is that a large amount of concurrent computations cause an excessive pressure on a terminal, so that data request performance is reduced. Therefore, the present application proposes to establish a data buffer zone between the browser and the server, that is, a data buffer area is provided between the local server 104 and the remote server 106, and is used for storing terminal request data and remote server 104 feedback update data, so that the terminal 102 only needs to update and load data different from the data in the buffer area in each request, thereby implementing incremental update of the terminal 102 data, reducing concurrent computation of the terminal 102, and thus improving data loading efficiency.
The data increment updating method for reducing the data concurrency provided by the invention can be applied to the application environment shown in fig. 1. In a data increment updating system for reducing data concurrency, the system may include a terminal 102, a local server 104 and a remote server 106, wherein the local server 104 establishes a communication connection with the terminal 102 and the remote server 106 respectively through a network, the local server 104 or the remote server 106 may be implemented by an independent server or a server cluster composed of a plurality of servers, and the terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices.
In one embodiment, as shown in fig. 2, a data incremental updating method for reducing data concurrency is provided, which is described by taking the method as an example applied to the local server 104 in fig. 1, and includes the following steps:
step S210, receiving a page loading request of a terminal; the page load request includes a data unit identification.
The page loading request is indication information generated and sent by the terminal 102, and indicates the local server 104 to execute a data loading task after receiving the request.
The data unit identifier may be generated by the terminal 102, and may be a coded identifier corresponding to each data unit, and the identifier may be composed of a random string and is globally unique, for example, cewr21, 21423, and the like.
In a specific implementation, after receiving a page loading request sent by the terminal 102, the local server 104 first parses the request to obtain a request data packet, where the request data packet has one or more data units and corresponding data unit identifiers.
For example, the local server 104 receives and parses that the page load request sent by the current terminal 102 includes 4 data units and 4 data unit identifiers, which are abc01, abc02, abc03 and abc04, respectively. It should be noted that, in the present embodiment, the identifiers are sequential numbers, and in other embodiments, the identifiers may be discontinuous random numbers.
Step S220, according to the data unit identification, obtaining historical cache data, and obtaining identification query data of a remote server.
The history cache data may be data cached by a page loading request sent by preamble terminal 102, and the storage form of the history cache data may be any binary number according to the actual application requirement, for example, binary, octal, decimal, or hexadecimal.
The identification query data may be data that is queried and fed back by the remote server 106 according to the data unit identification, and the data may also be any binary data.
In a specific implementation, after the local server 104 parses the data unit identifier in the page load request, the local server obtains data corresponding to the identifier from the cache region and the remote server 106 according to the data unit identifier, that is, first, the data stored in the preamble request is obtained from the cache region, then, for the parsed data unit identifier, whether the same data unit identifier is included in the cache region is queried, if so, it indicates that the preamble request has cached the data corresponding to the identifier, and then, the cached data of the same identifier can be extracted; if not, the data corresponding to the identifier is not cached in the preamble request, and the extraction result is null. Then, the identification query data of the remote server 106 is obtained, which may be that the local server 104 generates a data query request according to the data unit identification, and sends the data query request to the remote server 106, so that the remote server 106 feeds back the data with the identification, that is, the identification query data.
Step S230, matching the identifier query data with the history cache data, and determining to load the update data.
The loading update data may be data for sending to the terminal 102 for the terminal 102 to perform data update, or may be a data processing result obtained by analyzing and processing the identification query data by the local server 104.
In a specific implementation, after the historical cache data and the identification query data are obtained, the local server 104 performs data matching analysis, that is, whether the data unit identifications included in the historical cache data and the identification query data are consistent or not is matched, and whether the data units under the same identification are consistent or not is matched, so as to obtain a matching result, and further implement data processing on the data stored in the cache region according to the matching result, or implement data processing on the identification query data fed back by the remote server 106, and determine to load the updated data according to the processed identification query data.
For example, the identifier query data fed back by the remote server 106 includes a data unit identifier and a data unit corresponding to the data unit identifier, the number of units may be one or more, and the historical cache data obtained from the cache region may be an empty set, that is, the data unit identifier is not stored in the cache region, or one or more identifiers queried according to the data unit identifier and a data unit corresponding to the one or more identifiers, where it should be noted that when at least one data unit identifier exists in the historical cache data, the identifier may be consistent with part or all of the identifiers in the identifier query data.
Thus, matching the identification query data with the historical cache data, there may be three matching results, including: (1) the historical cache data does not have the data unit identification queried currently, namely the cache region does not have the data unit identification and the data unit thereof; (2) the historical cache data stores the identification of the currently inquired data unit, but the data unit corresponding to the identification is not consistent with the data unit corresponding to the same identification in the identification inquiry data; (3) the historical cache data stores the identification of the data unit which is inquired currently, and meanwhile, the data unit corresponding to the identification is completely consistent with the data unit corresponding to the same identification in the identification inquiry data. Thus, different matching results will result in different processing of the identification query data, and the finally determined load update data may be consistent with the identification query data or may be composed of partial data in the identification query data.
Step S240, sending the loading update data to the terminal, so that the terminal performs data increment update.
In a specific implementation, after the local server 104 processes the obtained loading update data, the loading update data is sent to the terminal 102, so that the terminal 102 realizes incremental update of data by using the loading update data.
According to the data increment updating method for reducing the data concurrency, after the local server receives the page loading request sent by the terminal, the historical cache data and the identification query data fed back by the remote server are obtained according to the data unit identification in the page loading request, the identification query data are matched with the historical cache data to determine the loading updating data, and finally the loading updating data are sent to the terminal so that the terminal can realize data increment updating by utilizing the loading updating data. By adopting the method, the cache area is newly established so as to update the cache data in real time, local up-to-date resources are provided for loading the page data, and meanwhile, the identification query data fed back by the remote server is updated in real time, so that the data to be processed of the terminal is ensured to be the current required update data, instead of updating all the data, effective incremental update of the data is provided, and the improvement of the data updating efficiency is realized.
In one embodiment, after the step S220, the method further includes:
if the historical cache data is returned to be empty, backing up the identification query data to the historical cache data; the historical cache data is stored in a cache region and is used for responding to a subsequent request so as to provide data; and if the historical cache data returns to be not empty, executing the step of matching the identification query data with the historical cache data.
In a specific implementation, after the local server 104 obtains the data unit identifier, historical cache data in the cache region and identifier query data fed back by the remote server 106 are further obtained, if the historical cache data is returned to be empty, a condition that the data unit identifier and the data unit thereof are not stored in the cache region exists, that is, the preamble request is not loaded aiming at the data unit request, at this time, data update needs to be performed on the cache region, that is, the latest data unit indicated by the data unit identifier fed back by the remote server 106 is backed up to the cache region; if the historical cache data has specific data, the next data matching step can be executed.
For example, the data unit currently acquired by the local server 104 is identified as "abc 102", and the query data of the remote server 106 according to the identification fed back by the identification includes "abc 102; 0x0F ", wherein" abc102 "is identified as the data unit identifier, and" 0x0F "is identified as the corresponding hexadecimal data unit identifier, further, if the history cache data is returned as a null value," abc102 "; 0x0F "backup to cache; if the historical cache data returns a non-null value, the cache region is indicated to have the same identification data before the request, and the subsequent data processing can be further executed.
In one embodiment, the step S230 includes:
matching the identification query data with the historical cache data; if the identification query data is not matched with the historical cache data, replacing the historical cache data with the identification query data; and determining the identification query data as the loading update data.
In a specific implementation, when the local server 104 obtains that the historical cache data returns a non-null value, the local server 104 further analyzes and processes the non-null historical cache data, that is, matches the identifier query data with the historical cache data, and if the identifier query data and the historical cache data do not match with each other, replaces and updates the historical cache data into the identifier query data, and determines the identifier query data that is not processed as the loading update data.
For example, the data unit currently acquired by the local server 104 is identified as "abc 102", and the query data of the remote server 106 according to the identification fed back by the identification includes "abc 102; 0x0F ", if the history cache data is returned as" abc102 "; 0x11 ", then" abc 102; "0 x 11" in 0x11 "is updated to" 0x0F "to make the buffer newly create data" abc 102; 0x0F ", and determining that the loaded update data is the identification query data" abc102 "; 0x0F ".
In one embodiment, the step S230 further includes:
if the identification query data is matched with the historical cache data, deleting the identification query data; when the identification query data of the remote server is empty after being deleted, determining that the loading update data is empty; when the identification query data of the remote server is not empty after being deleted, determining the rest identification query data as the loading update data; the remaining identification query data are identification query data which are not matched with the historical cache data.
In a specific implementation, on the basis of the above embodiment, if the identifier query data matches the historical cache data, it indicates that the data and the identifier are already stored in the cache area before the current request, and then the data of the terminal 102 does not need to be updated with respect to the cached data and the identifier, that is, the matched identifier query data is deleted. Therefore, if the identification query data subjected to deletion processing is empty, the loading update data is determined to be empty, and if the identification query data subjected to deletion processing is not empty, the identification query data left after deletion is determined to be used as the loading update data.
For example, the data unit currently acquired by the local server 104 is identified as "abc 102", and the query data of the remote server 106 according to the identification fed back by the identification includes "abc 102; 0x0F ", if the historical cache data returns the same" abc102 "; 0x0F ", delete the identified query data" abc 102; 0x0F ", at which point the load update data is determined to be null; if the remote server 106 inquires data according to the identifier fed back by the identifier, the data comprises 'abc 102'; 0x0F "and" abc 101; 0x11 ", delete identification query data" abc 102; after 0x0F ", the load update data may be determined to be" abc 101; 0x11 ".
In one embodiment, the step S230 includes:
and matching the identification query data with the historical cache data through a preset MD5 algorithm to determine loading update data.
In a specific implementation, the verification matching of the data can be implemented through an MD5 Algorithm (MD5Message-Digest Algorithm) to determine to load the update data.
According to the scheme provided by the embodiment of the invention, the local server can update the historical cache data or the identification query data of the cache region by analyzing the difference between the historical cache data and the identification query data, and the loading of the updated data is ensured to be the latest data to be loaded required by the terminal.
In another embodiment, as shown in fig. 3, a data increment updating method for reducing data concurrency is provided, which is described by taking the method as an example applied to the terminal 102 in fig. 1, and includes the following steps:
step S310, detecting a page loading trigger operation, and generating a page loading request;
step S320, sending the page loading request to a local server, so that the local server obtains historical cache data and identification query data of a remote server according to a data unit identification in the page loading request after receiving the page loading request, and feeds back the loading update data after matching the identification query data with the historical cache data to determine the loading update data;
step S330, receiving the loading update data of the local server;
step S340, updating the local data according to the loading update data.
In a specific implementation, the terminal 102 may be a terminal with an interactive interface, and the page loading triggering operation may be an operation triggered by a touch click, a double click, a long press, or the like on the interactive interface, or an operation triggered by an entity button set in the terminal 102. After the terminal 102 detects the page loading trigger operation, it may first generate a page loading request, that is, immediately generate a unique code for each data unit in the request data as a data unit identifier corresponding to a single data unit, and then form a data unit list to obtain a page loading request.
Further, before sending the page loading request to the local server 104, the terminal 102 may merge data units with the same request frequency into the same batch, that is, set a request quantity threshold or a request time threshold, package the request for locking into one request packet after the threshold is met, and then send the request packet to the local server 104 at one time, so as to reduce the data request pressure and improve the performance of concurrent requests.
Further, after the page loading request is sent, the terminal 102 will wait for the local server 104 to feed back the loading update data, so as to implement the incremental update of the local data by using the recorded update data.
For example, the data requested to be loaded by the terminal 102 this time includes "abc 101; 0x11, "abc 102; 0x0F "and" abc 103; 0x01 "if the load update data only includes" abc 102; 0x 00', the terminal 102 performs incremental update on the data with the data unit identifier "abc 102" to obtain the latest data "abc 101 loaded by the current page request; 0x11, "abc 102; 0x00 "and" abc 103; 0x01 ".
According to the data increment updating method for reducing the data concurrency, the terminal can reduce the data concurrency of the terminal by combining the requests with the same frequency, and meanwhile, the local data is updated only aiming at the loaded updated data increment, so that the data updating efficiency is improved.
In one embodiment, the load update data includes a load update identifier, and the step S340 includes:
determining a data unit identification of the local data; determining a target update identifier; the target update identification is a data unit identification matched with the loading update identification; and updating the local data of the target update identification into the loading update data.
In a specific implementation, when the terminal 102 needs to update the local data, it needs to determine part of data to be updated in the local data by identifying and confirming the data unit identifier in the loaded updated data, so as to implement incremental update of the local data.
According to the scheme provided by the embodiment of the invention, the terminal can reduce the concurrency of terminal data by combining the requests with the same frequency, and meanwhile, the local data is updated only aiming at the increment of the loading update data, so that the improvement of the data updating efficiency is realized.
It should be understood that although the various steps in the flow charts of fig. 2-3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-3 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 4, a data increment updating apparatus for reducing data concurrency is provided, which includes a request receiving module 410, a data obtaining module 420, a data matching module 430, and a data sending module 440, wherein:
a request receiving module 410, configured to receive a page loading request of a terminal; the page load request includes a data unit identification;
a data obtaining module 420, configured to obtain historical cache data according to the data unit identifier, and obtain identifier query data of a remote server;
a data matching module 430, configured to match the identifier query data with the historical cache data, and determine to load update data;
a data sending module 440, configured to send the loading update data to the terminal, so that the terminal performs data increment update.
According to the scheme provided by the embodiment of the invention, after the local server receives the page loading request sent by the terminal, the historical cache data and the identification query data fed back by the remote server are obtained according to the data unit identification in the page loading request, the identification query data are further matched with the historical cache data to determine the loading update data, and finally the loading update data are sent to the terminal so that the terminal can realize data increment updating by utilizing the loading update data. By adopting the method, the cache area is newly established so as to update the cache data in real time, local up-to-date resources are provided for loading the page data, and meanwhile, the identification query data fed back by the remote server is updated in real time, so that the data to be processed of the terminal is ensured to be the current required update data, instead of updating all the data, effective incremental update of the data is provided, and the improvement of the data updating efficiency is realized.
In one embodiment, the apparatus further comprises:
the data backup module is used for backing up the identification inquiry data to the historical cache data if the historical cache data is returned to be empty; the historical cache data is stored in a cache region and is used for responding to a subsequent request so as to provide data; and the step execution module is used for executing the step of matching the identification query data with the historical cache data if the historical cache data returns to be non-empty.
In one embodiment, the data matching module 430 includes:
the data matching sub-module is used for matching the identification query data with the historical cache data; the data replacement sub-module is used for replacing the historical cache data with the identification query data if the identification query data is not matched with the historical cache data; and the data determination sub-module is used for determining the identification query data as the loading update data.
In one embodiment, the data matching module 430 further includes:
the data deleting submodule is used for deleting the identification query data if the identification query data is matched with the historical cache data; a null data determination submodule, configured to determine that the loaded update data is null when the identification query data of the remote server is null after being deleted; a residual data determining sub-module, configured to determine residual identification query data as the loading update data when the identification query data of the remote server is not empty after being deleted; the remaining identification query data are identification query data which are not matched with the historical cache data.
In one embodiment, the data matching module 430 includes:
and the algorithm matching submodule is used for matching the identification query data with the historical cache data through a preset MD5 algorithm to determine to load the updated data.
According to the scheme provided by the embodiment of the invention, the local server can update the historical cache data or the identification query data of the cache region by analyzing the difference between the historical cache data and the identification query data, and the loading of the updated data is ensured to be the latest data to be loaded required by the terminal.
In another embodiment, as shown in fig. 5, a data incremental updating apparatus for reducing data concurrency is provided, which includes a request generating module 510, a request sending module 520, a data receiving module 530, and a data updating module 540, wherein:
a request generating module 510, configured to detect a page loading trigger operation, and generate a page loading request;
a request sending module 520, configured to send the page loading request to a local server, so that after receiving the page loading request, the local server obtains historical cache data and identifier query data of a remote server according to a data unit identifier in the page loading request, and feeds back loading update data after matching the identifier query data with the historical cache data to determine loading update data;
a data receiving module 530, configured to receive the loading update data of the local server;
and a data updating module 540, configured to update the local data according to the loading update data.
According to the scheme provided by the embodiment of the invention, the terminal can reduce the concurrency of terminal data by combining the requests with the same frequency, and meanwhile, the local data is updated only aiming at the increment of the loading update data, so that the improvement of the data updating efficiency is realized.
In one embodiment, the load update data includes a load update identifier, and the data update module 540 includes:
the identification determination submodule is used for determining the data unit identification of the local data; the target identification determining submodule is used for determining a target updating identification; the target update identification is a data unit identification matched with the loading update identification; and the local data updating submodule is used for updating the local data of the target updating identification into the loading updating data.
According to the scheme provided by the embodiment of the invention, the terminal can reduce the concurrency of terminal data by combining the requests with the same frequency, and meanwhile, the local data is updated only aiming at the increment of the loading update data, so that the improvement of the data updating efficiency is realized.
For specific limitation of the data increment updating device for reducing the data concurrency amount, reference may be made to the above limitation on the data increment updating method for reducing the data concurrency amount, and details are not described here again. The modules in the data increment updating device for reducing the data concurrency can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, as shown in fig. 6, a data incremental update system for reducing data concurrency is provided, comprising a local server 610 and a terminal 620, wherein:
the terminal 610 is configured to detect a page loading trigger operation, generate a page loading request, send the page loading request to a local server, and update local data after the local server feeds back and loads update data;
the local server 620 is configured to receive a page loading request of the terminal, acquire historical cache data and identifier query data of a remote server according to a data unit identifier in the page loading request, match the identifier query data with the historical cache data, determine the loading update data, and then send the loading update data to the terminal.
According to the scheme provided by the embodiment of the invention, after the local server receives the page loading request sent by the terminal, the historical cache data and the identification query data fed back by the remote server are obtained according to the data unit identification in the page loading request, the identification query data are further matched with the historical cache data to determine the loading update data, and finally the loading update data are sent to the terminal so that the terminal can realize data increment updating by utilizing the loading update data. By adopting the method, the cache area is newly established so as to update the cache data in real time, local up-to-date resources are provided for loading the page data, and meanwhile, the identification query data fed back by the remote server is updated in real time, so that the data to be processed of the terminal is ensured to be the current required update data, instead of updating all the data, effective incremental update of the data is provided, and the improvement of the data updating efficiency is realized.
For specific limitations of the data increment updating system for reducing the data concurrency amount, reference may be made to the above limitations of the data increment updating method for reducing the data concurrency amount, and details are not described here again. Each of the above-mentioned means in the data incremental updating system for reducing data concurrency may be implemented wholly or partially by software, hardware and their combination. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing identification information and device information. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a data incremental update method that reduces the amount of data concurrency.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
receiving a page loading request of a terminal; the page load request includes a data unit identification;
acquiring historical cache data according to the data unit identification, and acquiring identification query data of a remote server;
matching the identification query data with the historical cache data to determine to load update data;
and sending the loading updating data to the terminal so as to enable the terminal to perform data increment updating.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
if the historical cache data is returned to be empty, backing up the identification query data to the historical cache data; the historical cache data is stored in a cache region and is used for responding to a subsequent request so as to provide data; and if the historical cache data returns to be not empty, executing the step of matching the identification query data with the historical cache data.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
matching the identification query data with the historical cache data; if the identification query data is not matched with the historical cache data, replacing the historical cache data with the identification query data; and determining the identification query data as the loading update data.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
if the identification query data is matched with the historical cache data, deleting the identification query data; when the identification query data of the remote server is empty after being deleted, determining that the loading update data is empty; when the identification query data of the remote server is not empty after being deleted, determining the rest identification query data as the loading update data; the remaining identification query data are identification query data which are not matched with the historical cache data.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and matching the identification query data with the historical cache data through a preset MD5 algorithm to determine loading update data.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
detecting a page loading trigger operation, and generating a page loading request; sending the page loading request to a local server, obtaining historical cache data and identification query data of a remote server according to a data unit identification in the page loading request after the local server receives the page loading request, and feeding back loading update data after matching the identification query data with the historical cache data to determine loading update data; receiving loading update data of the local server; and updating the local data according to the loading updating data.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
determining a data unit identification of the local data; determining a target update identifier; the target update identification is a data unit identification matched with the loading update identification; and updating the local data of the target update identification into the loading update data.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
receiving a page loading request of a terminal; the page load request includes a data unit identification;
acquiring historical cache data according to the data unit identification, and acquiring identification query data of a remote server;
matching the identification query data with the historical cache data to determine to load update data;
and sending the loading updating data to the terminal so as to enable the terminal to perform data increment updating.
In one embodiment, the computer program when executed by the processor further performs the steps of:
if the historical cache data is returned to be empty, backing up the identification query data to the historical cache data; the historical cache data is stored in a cache region and is used for responding to a subsequent request so as to provide data; and if the historical cache data returns to be not empty, executing the step of matching the identification query data with the historical cache data.
In one embodiment, the computer program when executed by the processor further performs the steps of:
matching the identification query data with the historical cache data; if the identification query data is not matched with the historical cache data, replacing the historical cache data with the identification query data; and determining the identification query data as the loading update data.
In one embodiment, the computer program when executed by the processor further performs the steps of:
if the identification query data is matched with the historical cache data, deleting the identification query data; when the identification query data of the remote server is empty after being deleted, determining that the loading update data is empty; when the identification query data of the remote server is not empty after being deleted, determining the rest identification query data as the loading update data; the remaining identification query data are identification query data which are not matched with the historical cache data.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and matching the identification query data with the historical cache data through a preset MD5 algorithm to determine loading update data.
In one embodiment, the computer program when executed by the processor further performs the steps of:
detecting a page loading trigger operation, and generating a page loading request; sending the page loading request to a local server, obtaining historical cache data and identification query data of a remote server according to a data unit identification in the page loading request after the local server receives the page loading request, and feeding back loading update data after matching the identification query data with the historical cache data to determine loading update data; receiving loading update data of the local server; and updating the local data according to the loading updating data.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
determining a data unit identification of the local data; determining a target update identifier; the target update identification is a data unit identification matched with the loading update identification; and updating the local data of the target update identification into the loading update data.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A data increment updating method for reducing data concurrency is characterized by comprising the following steps:
receiving a page loading request of a terminal; the page load request includes a data unit identification; the page loading request is a request which is merged by the terminal according to a request quantity threshold or a request time threshold;
acquiring historical cache data according to the data unit identification, and acquiring identification query data of a remote server;
matching the identification query data with the historical cache data;
if the identification query data is not matched with the historical cache data, replacing the historical cache data with the identification query data, and determining the identification query data as loading update data;
if the identification query data is matched with the historical cache data, deleting the identification query data, and determining that the loading update data is empty when the identification query data is empty after being deleted; when the identification query data is not empty after being deleted, determining the rest identification query data as the loading update data; the residual identification query data are identification query data which are not matched with the historical cache data;
and sending the loading updating data to the terminal so as to enable the terminal to perform data increment updating.
2. The method of claim 1, further comprising, after said obtaining historical cache data based on said data unit identification and obtaining identification query data of a remote server:
if the historical cache data is returned to be empty, backing up the identification query data to the historical cache data; the historical cache data is stored in a cache region and is used for responding to a subsequent request so as to provide data;
and if the historical cache data returns to be not empty, executing the step of matching the identification query data with the historical cache data.
3. The method of claim 1, wherein matching the identified query data with the historical cache data to determine to load update data comprises:
and matching the identification query data with the historical cache data through a preset MD5 algorithm to determine loading update data.
4. The method of claim 1, wherein the data format of the historical cache data comprises any one of binary, octal, decimal, or hexadecimal.
5. The method of claim 1, wherein the page load request comprises at least one data unit; the at least one data unit has a corresponding data unit identification.
6. A data incremental update apparatus for reducing data concurrency, the apparatus comprising:
the request receiving module is used for receiving a page loading request of the terminal; the page load request includes a data unit identification; the page loading request is a request which is merged by the terminal according to a request quantity threshold or a request time threshold;
the data acquisition module is used for acquiring historical cache data according to the data unit identifier and acquiring identifier query data of a remote server;
the data matching module is used for matching the identification query data with the historical cache data; if the identification query data is not matched with the historical cache data, replacing the historical cache data with the identification query data, and determining the identification query data as loading update data; if the identification query data is matched with the historical cache data, deleting the identification query data, and determining that the loading update data is empty when the identification query data is empty after being deleted; when the identification query data is not empty after being deleted, determining the rest identification query data as the loading update data; the residual identification query data are identification query data which are not matched with the historical cache data;
and the data sending module is used for sending the loading updating data to the terminal so as to enable the terminal to carry out data increment updating.
7. The apparatus of claim 6, further comprising:
the data backup module is used for backing up the identification inquiry data to the historical cache data if the historical cache data is returned to be empty; the historical cache data is stored in a cache region and is used for responding to a subsequent request so as to provide data;
and the step execution module is used for executing the step of matching the identification query data with the historical cache data if the historical cache data returns to be non-empty.
8. The apparatus according to claim 6, wherein the data matching module comprises an algorithm matching sub-module, configured to match the identification query data with the historical cache data through a preset MD5 algorithm, and determine to load update data.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 5.
CN201910594272.1A 2019-07-03 2019-07-03 Data increment updating method and device for reducing data concurrency and computer equipment Active CN110457614B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910594272.1A CN110457614B (en) 2019-07-03 2019-07-03 Data increment updating method and device for reducing data concurrency and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910594272.1A CN110457614B (en) 2019-07-03 2019-07-03 Data increment updating method and device for reducing data concurrency and computer equipment

Publications (2)

Publication Number Publication Date
CN110457614A CN110457614A (en) 2019-11-15
CN110457614B true CN110457614B (en) 2020-06-16

Family

ID=68481952

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910594272.1A Active CN110457614B (en) 2019-07-03 2019-07-03 Data increment updating method and device for reducing data concurrency and computer equipment

Country Status (1)

Country Link
CN (1) CN110457614B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111506410B (en) * 2020-04-21 2023-05-12 北京思特奇信息技术股份有限公司 Background batch processing business optimization method, system and storage medium
CN117171419B (en) * 2023-10-31 2024-04-30 腾讯科技(深圳)有限公司 Content processing method, device, electronic apparatus, storage medium, and program product

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104657170A (en) * 2013-11-25 2015-05-27 腾讯科技(上海)有限公司 Data updating method, device and system
CN105630902A (en) * 2015-12-21 2016-06-01 明博教育科技股份有限公司 Method for rendering and incrementally updating webpages
CN106209925A (en) * 2015-04-29 2016-12-07 阿里巴巴集团控股有限公司 Page loading method, client and system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101782995B1 (en) * 2011-01-13 2017-09-29 삼성전자주식회사 method and apparatus of Web browsing through code caching and optimization for JavaScript
US20130235044A1 (en) * 2012-03-09 2013-09-12 Apple Inc. Multi-purpose progress bar
CN103596224B (en) * 2012-08-13 2017-12-22 上海无线通信研究中心 Resource regulating method based on multistage-mapping under a kind of high-speed mobile environment
CN103731493B (en) * 2013-12-31 2017-10-24 优视科技有限公司 Page transmission method, apparatus and system
CN104202399A (en) * 2014-09-05 2014-12-10 国家电网公司 Request buffer pool based data service scheduling method
CN105607927A (en) * 2015-12-18 2016-05-25 小米科技有限责任公司 Page display method and apparatus
CN109660602B (en) * 2018-11-28 2022-08-09 天津字节跳动科技有限公司 Data increment transmission method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104657170A (en) * 2013-11-25 2015-05-27 腾讯科技(上海)有限公司 Data updating method, device and system
CN106209925A (en) * 2015-04-29 2016-12-07 阿里巴巴集团控股有限公司 Page loading method, client and system
CN105630902A (en) * 2015-12-21 2016-06-01 明博教育科技股份有限公司 Method for rendering and incrementally updating webpages

Also Published As

Publication number Publication date
CN110457614A (en) 2019-11-15

Similar Documents

Publication Publication Date Title
CN110636130B (en) Delayed message processing method and device, computer equipment and storage medium
CN108924250B (en) Service request processing method and device based on block chain and computer equipment
CN109492019B (en) Service request response method, device, computer equipment and storage medium
CN110866198B (en) Static resource caching method, system, device, computer equipment and storage medium
CN110753099B (en) Distributed cache system and cache data updating method
CN110750267A (en) Service information updating method and device, computer equipment and storage medium
CN109460252B (en) Configuration file processing method and device based on git and computer equipment
CN110457614B (en) Data increment updating method and device for reducing data concurrency and computer equipment
CN110633160A (en) Interface calling method and device, computer equipment and storage medium
CN109361628B (en) Message assembling method and device, computer equipment and storage medium
CN110795171B (en) Service data processing method, device, computer equipment and storage medium
CN111159233B (en) Distributed caching method, system, computer equipment and storage medium
CN110489138B (en) Application updating method, device and storage medium
CN111708586A (en) Application starting configuration item loading method and device, computer equipment and storage medium
CN110908778A (en) Task deployment method, system and storage medium
CN111190609B (en) Service processing method, device, equipment and storage medium
CN110727698A (en) Database access method and device, computer equipment and storage medium
CN111898102A (en) Authority configuration method and device, computer equipment and storage medium
CN108965450B (en) Service request response method, device, computer equipment and storage medium
CN111177121A (en) Order data feedback method and device, computer equipment and storage medium
CN111400578B (en) Cargo data query method, cargo data query device, computer equipment and storage medium
CN108389124B (en) Data processing method, data processing device, computer equipment and storage medium
CN109462661B (en) Data synchronization method and device, computer equipment and storage medium
CN110659272A (en) Data cleaning method and system
CN108920355B (en) Dotting event information acquisition method and device, computer equipment and storage medium

Legal Events

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