Data request processing method and related device, computer readable storage medium

By adding identification to specific data and comparing the identification in the request with the latest identification, the data inconsistency problem in high concurrency scenarios is solved, and efficient and stable data request processing is achieved.

CN111104692BActive Publication Date: 2025-03-25CHINA PING AN LIFE INSURANCE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN201911279434.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-12-12
Publication Date
2025-03-25
Estimated Expiration
2039-12-12

AI Technical Summary

Technical Problem

In high concurrency scenarios, it is difficult for the prior art to realize parallel processing of data requests, resulting in data inconsistency problems, and the locking mechanism leads to waiting and blocking, which consumes a lot of time.

Method used

By adding an identification to a specific data, the identification is updated when the data is updated. When receiving the target data request, the first identifier in the request is read and compared with the latest identifier, and if it is consistent, the request is processed, and if it is inconsistent, the request is updated according to the first identifier and the latest identifier to ensure data consistency.

Benefits of technology

It realizes efficient and stable data request processing in high concurrency scenarios, avoids data inconsistency problems, reduces waiting and blocking, and improves the processing efficiency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111104692B_ABST
    Figure CN111104692B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a data request processing method and related equipment, and a computer-readable storage medium. The method includes: reading a first identifier in a target data request, comparing whether the first identifier is consistent with the latest identifier, processing the target data request if they are consistent, and extracting N data requests before the identifier is the latest identifier if they are inconsistent, until the identifier is the first identifier, and updating the target data request with the first identifier according to the N data requests, so that the specific data of the target data request is consistent with the latest specific data. By adopting the embodiment of the present invention, when there are too many data requests at the same time, as long as the data request is sent to the device, the device will not refuse to process it, and the problem of data inconsistency during data request processing in high-concurrency scenarios is efficiently and stably solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a data request processing method and related equipment, and a computer-readable storage medium. Background Art

[0002] At present, online banking payment and mobile payment are closely related to everyone's life. The security of personal information data is becoming more and more important. As the activities of various e-commerce platforms become more and more popular and more and more consumers participate, the pressure on the server is also increasing, and personal account information problems are more likely to occur.

[0003] At present, many projects solve the problem of ensuring the consistency of the same account data in high-concurrency scenarios by adding locks. Multiple machines compete for locks at the same time, and only one machine can successfully obtain the lock. Only the machine that obtains the lock can operate personal account data. After the machine that obtains the lock completes the processing, other waiting machines compete for the lock again, and the other machines continue to wait.

[0004] This processing method can ensure that only one machine processes personal account data at the same time, but other machines can only wait, which is time-consuming. Therefore, how to truly achieve parallel processing without blocking and waiting for lock release and competition is a problem that technical personnel in this field are studying. Summary of the invention

[0005] The embodiments of the present invention disclose a data request processing method and related equipment, and a computer-readable storage medium, which can efficiently and stably solve the problem of data inconsistency when processing data requests in high-concurrency scenarios.

[0006] In a first aspect, an embodiment of the present invention provides a data request processing method, the method comprising:

[0007] Reading a first identifier in a target data request, wherein the target data request is used to update specific data, the first identifier is an identifier of the specific data, and when the specific data is updated once, the identifier of the specific data is updated once;

[0008] Determining whether the first identifier and the second identifier are consistent, the second identifier including the latest identifier of the specific data;

[0009] If they are consistent, the target data request is processed; if they are inconsistent, the target data request is updated according to the first identifier and the second identifier to make the specific data of the target data request consistent with the specific data of the latest identifier to process the target data request.

[0010] In the above method, an identifier is added to the specific data in the device. When the specific data is called once, the current identifier of the specific data is updated once. After the device receives the target data request, it reads the first identifier in the target data request and compares whether the first identifier is consistent with the latest identifier. If they are consistent, the target data request is processed. If they are inconsistent, the N data requests identified before the latest identifier are extracted until the identifier is the first identifier. The target data request with the first identifier is updated according to the N data requests to make the specific data of the target data request consistent with the latest specific data. If there are too many data requests at the same time, as long as the data request is sent to the device, the device will not refuse to process it. This efficiently and stably solves the problem of data inconsistency when processing data requests in high-concurrency scenarios.

[0011] Based on the first aspect, in one optional implementation manner, before the first identifier in the target data processing request is read, the method includes:

[0012] receiving a first data request, wherein the first data request is used to obtain specific data;

[0013] Sending the specific data and a first identifier according to the first data request, where the first identifier is a current identifier of the specific data;

[0014] The target data request is received, where the target data request includes the first identifier.

[0015] In this implementation method, before the device reads the first identifier in the target data processing request, it first obtains the first data request sent by other devices, sends specific data and the current identifier of the specific data to the other devices based on the first data request, and then receives the target data request sent by the other devices, thereby achieving the acquisition of the target data request and the first identifier, and making the specific data consistent through the first identifier.

[0016] Based on the first aspect, in one optional implementation manner, if there is inconsistency, updating the target data request according to the first identifier and the second identifier so that the specific data of the target data request is consistent with the specific data of the latest identifier, so as to process the target data request, including:

[0017] If they are inconsistent, extracting N data requests between the second identifier and the first identifier, where N is a positive integer;

[0018] The target data request of the first identifier is updated according to the N data requests so that the specific data of the target data request is consistent with the specific data corresponding to the second identifier, so as to process the target data request.

[0019] This implementation method extracts N data requests between the second identifier and the first identifier and updates the target data request, providing a way to update the target data request so that the specific data of the target data request is consistent with the latest specific data, thereby solving the problem of data inconsistency when processing data requests in high concurrency scenarios.

[0020] Based on the first aspect, in one optional implementation manner, if there is inconsistency, updating the target data request according to the first identifier and the second identifier so that the specific data of the target data request is consistent with the specific data of the latest identifier, so as to process the target data request, including:

[0021] If they are inconsistent, extract N data requests between the second identifier and the first identifier, where N is a positive integer;

[0022] If the data range of the N data requests exceeds a threshold, the target data request is determined to be invalid, and the data range includes a time range or a quantity range.

[0023] This implementation method determines the time range or quantity range of N data requests between the second identifier and the first identifier. If the time range or quantity range of the N data requests exceeds a threshold, the target data request is invalid, thus avoiding the problem of excessive data volume occupying unnecessary resources.

[0024] Based on the first aspect, in one optional implementation manner, after determining that the target data request is invalid, the method further includes:

[0025] A request invalidation instruction is sent to the sender of the target data request, where the request invalidation instruction is used to prompt the sender of the target data request to resend the data request.

[0026] In a second aspect, an embodiment of the present invention provides a data request processing device, including:

[0027] a reading unit, configured to read a first identifier in a target data request, wherein the target data request is used to update specific data, the first identifier being an identifier of the specific data, and when the specific data is updated once, the identifier of the specific data is updated once;

[0028] A judging unit, configured to judge whether the first identifier and the second identifier are consistent, wherein the second identifier includes the latest identifier of the specific data;

[0029] A processing unit is used to process the target data request if they are consistent; if they are inconsistent, update the target data request according to the first identifier and the second identifier to make the specific data of the target data request consistent with the specific data of the latest identifier to process the target data request.

[0030] Based on the second aspect, in one optional implementation manner, the device further includes:

[0031] A receiving unit, configured to receive a first data request before reading the first identifier in the target data processing request, wherein the first data request is used to obtain specific data;

[0032] a sending unit, configured to send the specific data and a first identifier according to the first data request, where the first identifier is a current identifier of the specific data;

[0033] The receiving unit is further configured to receive the target data request, where the target data request includes the first identifier.

[0034] Based on the second aspect, in one optional implementation manner, the processing unit includes:

[0035] an extracting unit, configured to extract N data requests between the second identifier and the first identifier if there is inconsistency, where N is a positive integer;

[0036] The processing unit is further used to update the target data request of the first identifier according to the N data requests, so that the specific data of the target data request is consistent with the specific data corresponding to the second identifier, so as to process the target data request.

[0037] Based on the second aspect, in one optional implementation manner, the processing unit includes:

[0038] The extraction unit is further configured to extract N data requests between the second identifier and the first identifier if there is inconsistency, where N is a positive integer;

[0039] The judgment unit is further configured to judge that the target data request is invalid if a data range of the N data requests exceeds a threshold, and the data range includes a time range or a quantity range.

[0040] Based on the second aspect, in one optional implementation manner, the device further includes:

[0041] The sending unit is further configured to send a request invalidation instruction to the sender of the target data request after determining that the target data request is invalid, wherein the request invalidation instruction is configured to prompt the sender of the target data request to resend the data request.

[0042] It should be noted that the implementation method and corresponding beneficial effects of the second aspect can refer to the description of the first aspect and the corresponding implementation method, and will not be repeated here.

[0043] In a third aspect, an embodiment of the present invention provides a data request processing device, characterized in that it includes a processor, a memory and a communication device, and the processor, the memory and the communication device are interconnected, wherein the memory is used to store computer programs, and the communication device is used to interact with external devices for information; the processor is configured to call the computer program to execute the method described in the first aspect.

[0044] It should be noted that the implementation method and corresponding beneficial effects of the third aspect can refer to the description of the first aspect and the corresponding implementation method, and will not be repeated here.

[0045] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer storage medium stores program instructions, and when the program instructions are executed by a processor, the processor executes the method described in the first aspect.

[0046] It should be noted that the implementation method and corresponding beneficial effects of the fourth aspect can refer to the description of the first aspect and the corresponding implementation method, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required to be used in the embodiments of the present invention or the background technology are briefly introduced below.

[0048] Figure 1 is a system architecture diagram of a data request processing method provided by an embodiment of the present invention;

[0049] Figure 2 It is a flowchart of a data request processing method provided by an embodiment of the present invention;

[0050] Figure 3 is a structural schematic diagram of a data request processing device provided by an embodiment of the present invention;

[0051] Figure 4 It is a structural diagram of a data request processing device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0052] The technical solutions in the embodiments of the present invention will be described below with reference to the accompanying drawings.

[0053] It should be understood that the terms used in this specification of the application are only for the purpose of describing specific embodiments and are not intended to limit the application. Mentioning "embodiment" in the specification of the application means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present application. The phrase appears in various positions in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments. The terms "device", "unit", "system" and the like used in this specification are used to represent computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a device can be, but is not limited to, a processor, a data processing platform, a computing device, a computer, 2 or more computers, etc.

[0054] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0055] In order to better understand a data request processing method and related devices provided by an embodiment of the present invention, the system architecture of the data request processing method of an embodiment of the present invention is described below. Figure 1 As shown, it is a schematic diagram of the system architecture of a data request processing method provided by an embodiment of the present invention. The system may include one or more servers (multiple servers may constitute a server cluster), and one or more terminals (or devices), wherein:

[0056] The server may include but is not limited to a backend server, a component server, a data processing server, etc. The server can communicate with multiple terminals through the Internet. The server provides data request processing services for the terminals. The server needs to run a corresponding server-side program to provide corresponding data request processing services, such as database services, data calculation, decision execution, etc.

[0057] The terminal can install and run related applications. An application refers to a program that corresponds to a server and provides local services to customers. Here, the local service may include but is not limited to: sending information to the server (such as attribute data information) and receiving information sent by the server (such as data request processing information) and sharing information, etc. The terminal in the embodiment of this scheme may include but is not limited to any electronic product based on an intelligent operating system, which can interact with the user through input devices such as keyboards, virtual keyboards, touch pads, touch screens, and voice control devices for human-computer interaction, such as smart phones, tablet computers, personal computers, etc. Among them, the intelligent operating system includes but is not limited to any operating system that enriches the device functions by providing various mobile applications to mobile devices, such as Android (Android TM ), iOS TM 、Windows Phone TM wait.

[0058] Combine the following Figure 2 The data request processing method of this application is described as follows: Figure 2 As shown, it is a flow chart of a data request processing method provided in an embodiment of the present application. The method can be based on Figure 1 The system architecture shown or other architectures are implemented, and the method may include but is not limited to the following steps:

[0059] Step S201: Read the first identifier in the target data request.

[0060] Specifically, the terminal sends a target data request to the device. After receiving the target data request, the device reads a first identifier in the target data request, wherein the target data request is used to update specific data, and the first identifier is an identifier of the specific data. When the specific data is updated once, the identifier of the specific data is updated once.

[0061] In one embodiment, before the device reads the first identifier in the target data processing request, it first receives a first data request sent by the terminal, and the first data request is used to obtain specific data; after the device obtains the first data request, it sends the specific data and the first identifier according to the first data request, wherein the first identifier is the current identifier of the specific data; after the terminal receives the specific data and the first identifier sent by the device, it sends a target data request to the device to update the specific data, wherein the target data request includes the first identifier, the device receives the target data request, and reads the first identifier in the target data request; for example, in the scenario of online banking payment, when the user When the terminal confirms the order payment link with the merchant, it can first send a first data request to request the merchant's bank account data (i.e., specific data). The device provides the merchant's bank account data and the current identifier of the bank account data (i.e., the first identifier) ​​to the user terminal, where the current identifier can be 08. The order amount is 100 yuan, and the user terminal sends a target data request to the device. The update method is addition, that is, the target data request can be "merchant's bank account data, 08, +100", which means adding one hundred to the balance data in the merchant's bank account data. The device receives the target data request and reads the first identifier as 08.

[0062] Step S202: Determine whether the first identifier and the second identifier are consistent.

[0063] Specifically, after the device reads the first identifier in the target data request, it determines whether the first identifier and the second identifier are consistent, where the second identifier is the latest identifier of the specific data. Since the specific data is updated once, the identifier of the specific data will be updated once. In the same data processing request link, multiple terminals can call the same specific data at the same time (that is, the current identifier of the specific data, that is, the first identifier, will be read at the same time). Between the time when the device sends the first identifier to the terminal and the time when the device receives the first identifier of the terminal, other terminals may have completed the acquisition and update of the specific data, resulting in the update of the identifier of the specific data, so the first identifier and the latest identifier of the specific data (the second identifier) ​​may be different; for example, the device reads the target data request (the merchant's bank account data, 08, +100), where the first identifier read is 08, and at the same time the device obtains the latest identifier of the merchant's bank account data (that is, the second identifier), and determines whether the latest identifier of the merchant's bank account data is consistent with 08.

[0064] Step S203: If they are consistent, the target data request is processed.

[0065] Specifically, if the device determines that the first identifier and the second identifier are consistent, it means that the specific data read by the terminal is valid, and the device processes the target data request. For example, the device reads the target data request (bank account data of the merchant, 08, +100), where the first identifier read is 08, and the latest identifier of the merchant's bank account data is obtained. If the latest identifier is 08, which is consistent with the first identifier 08, the device adds 100 to the balance data in the merchant's bank account data according to the target data request.

[0066] Step S204: If they are inconsistent, the target data request is updated according to the first identifier and the second identifier to process the target data request.

[0067] Specifically, if the device determines that the first identifier and the second identifier are inconsistent, it means that the specific data read by the terminal is invalid, that is, another terminal has already updated (modified, added, etc.) the specific data, and the specific data needs to be updated to the modified data of other terminals (the updated terminal with the latest identifier) ​​to avoid data modification conflicts, and extract the N data requests before the identifier of the specific data is the second identifier until it is identified as the first identifier, and update the data processing request of the first identifier according to the N data requests to make the specific data of the data processing request consistent with the latest specific data, that is, update the target data request according to the first identifier and the second identifier to make the specific data of the target data request consistent with the specific data of the latest identifier to process the target data request.

[0068] For example, the device reads the target data request (the merchant's bank account data, 08, +100), where the first identifier read is 08, and at the same time obtains the latest identifier of the merchant's bank account data. If the latest identifier is 10, which is inconsistent with the first identifier 08, the device then extracts the data processing request for the identifier before 10 of the specific data until the identifier is 08, that is, the identifier before 10 is 09, and the data processing request is (the merchant's bank account data, 09, +50). The identifier before 09 is 08, and the data processing request is (the merchant's bank account data, 08, +50). At this time, the extraction is stopped, indicating that when the identifier is 08, another terminal has already processed the merchant's bank account. The balance data in the account data is added with 50. When the identifier is 09, another terminal has added 50 to the balance data in the merchant's bank account data. At this time, the identifier is 10. Based on the two historical data processing requests, the current first data processing request with the identifier 08 is updated to (merchant's bank account data, 08, +200). That is, based on the data processing request, the balance data in the merchant's bank account data is added with 200 (50+50+100) when it is identified as 08. The 50+50 is used to make the specific data of the target data request consistent with the specific data of the latest identifier, so as to ensure that the balance data in the merchant's bank account data is not wrong when the device processes the data request.

[0069] In one embodiment, if the device determines that the first identifier and the second identifier are inconsistent, the N data requests before the identifier of the second identifier are extracted until the identifier of the first identifier is obtained. If the data range of the extracted N data requests exceeds the threshold and no data processing request identified by the first identifier is found, the data processing request is determined to be invalid and the processing of the target data request is abandoned. The above-mentioned data range exceeding the threshold may be exceeding the time threshold or exceeding the quantity threshold. For example, if the time threshold is 15 minutes, if the first identifier of the data processing request is not the latest identifier of the specific data, and the occurrence time of the first identifier is 15 minutes before the generation of the latest identifier, the target data request is determined to be invalid due to timeout; if the quantity threshold is 500,000, if the first identifier of the data processing request is not the latest identifier of the specific data, and the number of data processing requests between the first identifier and the second identifier exceeds 500,000, the target data request is determined to be invalid.

[0070] In one of the embodiments, after determining that the target data request is invalid, the device sends a request invalid instruction to the sender of the target data request (i.e., the terminal), wherein the request invalid instruction is used to prompt the sender of the target data request that the target data request is invalid and the data request can be resent to the device.

[0071] In order to explain in more detail how to solve the problem of data inconsistency during data request processing in a high-concurrency scenario, that is, the situation where multiple terminals send first data requests at the same time and multiple target requests arrive, the following takes three terminals sending first data requests at the same time as an example; for example, first, the device simultaneously receives first data requests sent by three terminals (hereinafter explained in detail with terminal one, terminal two and terminal three), respectively, and the first data requests are used to obtain specific data; after the device obtains the three first data requests, it sends specific data and a first identifier according to the first data request, wherein the first identifier is the current identifier of the specific data; wherein the current identifier can be 08, that is, the terminal 1. Terminal 2 and Terminal 3 both obtain the same identifier 08. When the device receives the first target data request (08, +50) with the identifier 08, it extracts the latest identifier 08, which is consistent with the latest identifier. Then, the device adds 100 to the specific data according to the target data request and updates the identifier of the specific data to 09. When the device receives the second target data request (08, +100) with the identifier 08, it extracts the latest identifier 09. Since 08 is inconsistent with the latest identifier, the device extracts the data processing request of the identifier of the specific data before 09 until the identifier is 08, that is, the first target data request ( 08, +50), then the second target data request is updated to (08, +150), that is, according to the updated second target data request, when the specific data is identified as 08, 150 (50+100) is added, and the identification of the specific data is updated to 10, where 50 is to make the specific data of the target data request consistent with the specific data of the latest identification, so as to ensure that the specific data is not wrong when the device processes the second target data request; when the device receives the third target data request (08, +100) with the third identification of 08, the latest identification is extracted as 10, and 08 is inconsistent with the latest identification, then the device extracts the identification of the specific data before 10 The data processing request with the identifier is processed until the identifier is 08, that is, the second target data request (08, +100) when the identifier is 09 and the first target data request (08, +50) when the identifier is 08 are extracted, then the third target data request is updated to (08, +250), that is, according to the updated third target data request, for the specific data when the identifier is 08, 250 (50+100+100) is added, wherein 50+100 is to make the specific data of the target data request consistent with the specific data of the latest identifier, so as to ensure that the specific data is not wrong when the device processes the third target data request, and the identifier of the specific data is updated to 11.

[0072] In implementing the embodiment of the present application, an identifier is added to the specific data in the device. When the specific data is called once, the current identifier of the specific data is updated once. After the device receives the target data request, it reads the first identifier in the target data request and compares whether the first identifier is consistent with the latest identifier. If they are consistent, the target data request is executed. If they are inconsistent, the N data requests before the identifier of the latest identifier are extracted until the identifier is the first identifier. The target data request of the first identifier is updated according to the N data requests to make the specific data of the target data request consistent with the latest specific data. If there are too many data requests at the same time, as long as the data request is sent to the device, the device will not refuse to process it. This solves the problem of data inconsistency when processing data requests in high-concurrency scenarios efficiently and stably.

[0073] In order to better implement the above solution of the embodiment of the present application, the present application also provides a data request processing device, which is described in detail below with reference to the accompanying drawings:

[0074] like Figure 3 As shown, the present embodiment provides a structural diagram of a data request processing device 30, and the data request processing device 30 may include: a reading unit 301, a judgment unit 302 and a processing unit 303, wherein:

[0075] A reading unit 301 is used to read a first identifier in a target data request, where the target data request is used to update specific data, and the first identifier is an identifier of the specific data. When the specific data is updated once, the identifier of the specific data is updated once;

[0076] A judging unit 302, configured to judge whether the first identifier and the second identifier are consistent, wherein the second identifier includes the latest identifier of the specific data;

[0077] The processing unit 303 is used to process the target data request if they are consistent; if they are inconsistent, update the target data request according to the first identifier and the second identifier to make the specific data of the target data request consistent with the specific data of the latest identifier to process the target data request.

[0078] In one implementation, the device further includes:

[0079] The receiving unit 304 is configured to receive a first data request before reading the first identifier in the target data processing request, wherein the first data request is used to obtain specific data;

[0080] A sending unit 305 is configured to send the specific data and a first identifier according to the first data request, where the first identifier is a current identifier of the specific data;

[0081] The receiving unit 304 is further configured to receive the target data request, where the target data request includes the first identifier.

[0082] In one implementation, the processing unit 303 includes:

[0083] An extracting unit 306 is configured to extract N data requests between the second identifier and the first identifier if they are inconsistent, where N is a positive integer;

[0084] The processing unit 303 is further configured to update the target data request of the first identifier according to the N data requests, so that the specific data of the target data request is consistent with the specific data corresponding to the second identifier, so as to process the target data request.

[0085] In one implementation, the processing unit 303 includes:

[0086] The extraction unit 306 is further configured to extract N data requests between the second identifier and the first identifier if there is no inconsistency, where N is a positive integer;

[0087] The judging unit 302 is further configured to judge that the target data request is invalid if a data range of the N data requests exceeds a threshold, wherein the data range includes a time range or a quantity range.

[0088] In one implementation, the device further includes:

[0089] The sending unit 305 is further configured to send a request invalidation instruction to the sender of the target data request after determining that the target data request is invalid, wherein the request invalidation instruction is configured to prompt the sender of the target data request to resend the data request.

[0090] It should be noted that in the embodiments of this application Figure 3 The functions of each functional unit in the described device can be found in the above Figure 2 The relevant descriptions of steps S201 to S203 in the method embodiment are not repeated here.

[0091] Please refer to the device diagram for the above data request. Figure 4 , Figure 4 This is a simplified schematic diagram of a data request processing device structure provided by an embodiment of the present application. For ease of understanding and illustration, Figure 4 The data request processing device 40 may include one or more of the following components: a memory 401 , a processor 402 , a communication device 403 , and an input / output device 404 .

[0092] The memory 401 may include one or more storage units, each of which may include one or more memories, which may be used to store programs and various data, and may automatically access programs or data at high speed during the operation of the data request processing device 40. Figure 4 The data request processing device 40 shown executes Figure 2 When performing the method, the memory can be used to store data requests, data request processing program codes and other related data.

[0093] The communication device 403 may also be referred to as a transceiver, or a transceiver, etc., which may include units for wireless, wired or other communication methods. Optionally, the device used to implement the receiving function in part 403 may be regarded as a receiving unit, and the device used to implement the sending function may be regarded as a sending unit, that is, part 403 includes a receiving unit and a sending unit.

[0094] Processor 402, the processor may also be called a processing unit, a processing board, a processing module, a processing device, etc. The processor may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and a NP. Figure 4 The data request processing device 40 shown executes Figure 2 In the method, the processor 402 calls the data request processing program of the memory 401 and performs the following steps:

[0095] Reading a first identifier in a target data request, wherein the target data request is used to update specific data, the first identifier is an identifier of the specific data, and when the specific data is updated once, the identifier of the specific data is updated once;

[0096] Determining whether the first identifier and the second identifier are consistent, the second identifier including the latest identifier of the specific data;

[0097] If they are consistent, the target data request is processed; if they are inconsistent, the target data request is updated according to the first identifier and the second identifier to make the specific data of the target data request consistent with the specific data of the latest identifier to process the target data request.

[0098] In one implementation manner, before the processor 402 reads the first identifier in the target data processing request, the processor 402 includes:

[0099] receiving a first data request through the communication device 403, where the first data request is used to obtain specific data;

[0100] Sending the specific data and a first identifier according to the first data request, where the first identifier is a current identifier of the specific data;

[0101] The target data request is received through the communication device 403, where the target data request includes the first identifier.

[0102] In one implementation manner, if they are inconsistent, the processor 402 updates the target data request according to the first identifier and the second identifier so that the specific data of the target data request is consistent with the specific data of the latest identifier, so as to process the target data request, including:

[0103] If they are inconsistent, extracting N data requests between the second identifier and the first identifier, where N is a positive integer;

[0104] The target data request of the first identifier is updated according to the N data requests so that the specific data of the target data request is consistent with the specific data corresponding to the second identifier, so as to process the target data request.

[0105] In one implementation manner, if they are inconsistent, the processor 402 updates the target data request according to the first identifier and the second identifier so that the specific data of the target data request is consistent with the specific data of the latest identifier, so as to process the target data request, including:

[0106] If they are inconsistent, extract N data requests between the second identifier and the first identifier, where N is a positive integer;

[0107] If the data range of the N data requests exceeds a threshold, the target data request is determined to be invalid, and the data range includes a time range or a quantity range.

[0108] In one implementation manner, after the processor 402 determines that the target data request is invalid, the processor 402 includes:

[0109] A request invalidation instruction is sent to the sender of the target data request through the communication device 403, and the request invalidation instruction is used to prompt the sender of the target data request to resend the data request.

[0110] It should be noted that the execution steps of the processor 402 in the data request processing device 40 in the embodiment of the present application can refer to the above-mentioned method embodiments. Figure 2 The specific implementation method in the embodiment will not be repeated here.

[0111] The input / output device 404 can provide an interface between the peripheral components of the data request processing device 40, and the peripheral components can be a keyboard, a mouse, a display, buttons, similar devices, etc. These buttons can include but are not limited to: a start / stop button, a lock button, and a reset button.

[0112] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The aforementioned storage medium includes: a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0113] In the present application, the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present application.

[0114] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0115] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

[0116] It should be understood that in various embodiments of the present application, the size of the sequence number of each process does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. Although the present application is described herein in conjunction with various embodiments, however, in the process of the present application claimed for protection by the embodiments, those skilled in the art can understand and implement other changes of the disclosed embodiments.

Claims

1. A data request processing method, characterized in that: include: Reading a first identifier in a target data request, wherein the target data request is used to update specific data, the first identifier is an identifier of the specific data, and when the specific data is updated once, the identifier of the specific data is updated once; Determining whether the first identifier and the second identifier are consistent, the second identifier including the latest identifier of the specific data; If they are consistent, processing the target data request; If they are inconsistent, updating the target data request according to the first identifier and the second identifier so that the specific data of the target data request is consistent with the specific data of the latest identifier, so as to process the target data request; Before the first identifier in the request to read the target data, the method includes: receiving a first data request sent by a terminal, wherein the first data request is used to obtain specific data, the application installed in the terminal is a program for providing local services to customers, and the specific data includes bank account data; Send the specific data and a first identifier according to the first data request, where the first identifier is a current identifier of the specific data, so that after the terminal receives the specific data and the first identifier sent by the device, it sends a target data request to the device; The target data request is received, where the target data request includes the first identifier.

2. The method according to claim 1, characterized in that If they are inconsistent, updating the target data request according to the first identifier and the second identifier so that the specific data of the target data request is consistent with the specific data of the latest identifier, so as to process the target data request, including: If they are inconsistent, extracting N data requests between the second identifier and the first identifier, where N is a positive integer; The target data request of the first identifier is updated according to the N data requests so that the specific data of the target data request is consistent with the specific data corresponding to the second identifier, so as to process the target data request.

3. The method according to claim 1, characterized in that If they are inconsistent, updating the target data request according to the first identifier and the second identifier so that the specific data of the target data request is consistent with the specific data of the latest identifier, so as to process the target data request, including: If they are inconsistent, extract N data requests between the second identifier and the first identifier, where N is a positive integer; If the data range of the N data requests exceeds a threshold, the target data request is determined to be invalid, and the data range includes a time range or a quantity range.

4. The method according to claim 3, characterized in that: After determining that the target data request is invalid, the method further comprises: A request invalidation instruction is sent to the sender of the target data request, where the request invalidation instruction is used to prompt the sender of the target data request to resend the data request.

5. A data request processing device, the device being used to execute the method according to any one of claims 1 to 4, characterized in that: include: A receiving unit, configured to receive a first data request sent by a terminal before reading a first identifier in a target data processing request, wherein the first data request is used to obtain specific data, the application installed in the terminal is a program for providing local services to customers, and the specific data includes bank account data; a sending unit, configured to send the specific data and a first identifier according to the first data request, where the first identifier is a current identifier of the specific data, so that after the terminal receives the specific data and the first identifier sent by the device, it sends a target data request to the device; The receiving unit is further configured to receive the target data request, wherein the target data request includes the first identifier; a reading unit, configured to read a first identifier in a target data request, wherein the target data request is used to update specific data, the first identifier being an identifier of the specific data, and when the specific data is updated once, the identifier of the specific data is updated once; A judging unit, configured to judge whether the first identifier and the second identifier are consistent, wherein the second identifier includes the latest identifier of the specific data; A processing unit is used to process the target data request if they are consistent; if they are inconsistent, update the target data request according to the first identifier and the second identifier to make the specific data of the target data request consistent with the specific data of the latest identifier to process the target data request.

6. The device according to claim 5, characterized in that The processing unit comprises: an extracting unit, configured to extract N data requests between the second identifier and the first identifier if there is inconsistency, where N is a positive integer; The processing unit is further used to update the target data request of the first identifier according to the N data requests, so that the specific data of the target data request is consistent with the specific data corresponding to the second identifier, so as to process the target data request.

7. A data request processing device, characterized in that: The method comprises a processor, a memory and a communication device, wherein the processor, the memory and the communication device are interconnected, wherein the memory is used to store computer programs, and the communication device is used to exchange information with external devices; the processor is configured to call the computer program and execute the method according to any one of claims 1 to 4.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program instructions, which, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Metadata updating method, device, equipment and readable storage medium

    CN108874319A