Data Duplication Method and Device
By asynchronously writing to the gateway routing information cache and database in a distributed system, the problem of low data synchronization efficiency is solved, and efficient data double write and success rate improvement is achieved.
Patent Information
- Application Number
- CN202210211572.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-04
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2042-03-04
AI Technical Summary
In a distributed system, when data is scattered in multiple unit databases according to a certain dimension, the correspondence between customer numbers and account numbers needs to be synchronized, resulting in a large number of distributed things and reducing concurrency and efficiency.
After receiving the write request, the data is written to the unit database and marked as being synchronized, and then written to the gateway routing information cache before writing to the gateway routing information database. The write status is checked through the asynchronous process, and additional writes are added when necessary to avoid waiting for feedback from the gateway routing information database.
Improves the efficiency and success rate of data double writing, reduces the number of distributed things, and ensures data consistency in high concurrency situations.
Smart Images

Figure CN114595237B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data technology, and in particular, to a data dual-writing method and device. Background Art
[0002] In a distributed system, since data is scattered in multiple unit databases according to a certain dimension, inevitably, at the transaction service entry, gateway routing information is required to tell which unit database the transaction data is in. For example, a banking system is usually divided into units centered on the customer number, that is, the customer number and other entities under the same customer number, such as account numbers and card numbers, should be assigned to the same unit. Then, the corresponding relationship between the customer number and the account number, or the customer number and the card number, needs to be maintained in the gateway routing information, so that it can be determined at the entry which unit the account transaction or card transaction should go to.
[0003] This also leads to such a problem: when new account numbers or card numbers are generated, or when account numbers or card numbers are logically deleted, the corresponding relationship between the customer number and the account number, or the customer number and the card number, needs to be synchronized and maintained in the gateway routing. Usually, the gateway routing information is in the full-scale database (cache), while the entity customer numbers, card numbers, and account numbers are in the unit database. In this way, different databases need to be operated simultaneously and both operations need to succeed, which will cause a large number of distributed transactions, thereby reducing concurrency and resulting in low efficiency. Summary of the Invention
[0004] An embodiment of the present invention provides a data dual-writing method to achieve data dual-writing and improve the efficiency and success rate of data dual-writing. The method includes:
[0005] After receiving a write request, write the data into the unit database and mark the status of the written data as to be synchronized;
[0006] After receiving the write success notification feedback from the unit database, write the relationship data of the data into the gateway routing information cache;
[0007] After receiving the write success notification feedback from the gateway routing information cache, write the relationship data of the data into the gateway routing information table in the gateway routing information database without waiting for the feedback from the gateway routing information database;
[0008] Query asynchronously through a process whether the relationship data corresponding to the data with the status of to be synchronized in the unit database is successfully written into the gateway routing information table;
[0009] If the write is successful, update the status of the data in the unit database to updated; <>
[0010] If the write is not successful, supplement and write the relationship data of the data into the gateway routing information table. When the supplementary write is successful, update the status of the data in the unit database to updated.
[0011] An embodiment of the present invention provides a data dual-writing device for implementing data dual-writing and improving the efficiency and success rate of data dual-writing. The device includes:
[0012] A write unit database module, configured to write data into the unit database after receiving a write request and mark the status of the written data as to be synchronized;
[0013] A write cache module, configured to write the relationship data of the data into the gateway routing information cache after receiving a write success notification feedback from the unit database;
[0014] A write gateway routing information database module, configured to write the relationship data of the data into the gateway routing information table in the gateway routing information database after receiving a write success notification feedback from the gateway routing information cache without waiting for a feedback from the gateway routing information database;
[0015] A data write success query module, configured to query asynchronously whether the relationship data corresponding to the data with the status of to be synchronized in the unit database is successfully written into the gateway routing information table; if it is successfully written, update the status of the data in the unit database to updated; if it is not successfully written, supplementarily write the relationship data of the data into the gateway routing information table, and update the status of the data in the unit database to updated when the supplementary write is successful.
[0016] An embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the above data dual-writing method is implemented.
[0017] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the above data dual-writing method is implemented.
[0018] An embodiment of the present invention further provides a computer program product including a computer program, and when the computer program is executed by a processor, the above data dual-writing method is implemented.
[0019] In an embodiment of the present invention, after receiving a write request, data is written into the unit database, and the status of the written data is marked as to be synchronized; after receiving a write success notification feedback from the unit database, the relationship data of the data is written into the gateway routing information cache; after receiving a write success notification feedback from the gateway routing information cache, the relationship data of the data is written into the gateway routing information table in the gateway routing information database without waiting for a feedback from the gateway routing information database; an asynchronous process is used to query whether the relationship data corresponding to the data with the status of to be synchronized in the unit database is successfully written into the gateway routing information table; if the write is successful, the status of the data in the unit database is updated to updated; if the write is not successful, the relationship data of the data is supplemented and written into the gateway routing information table, and when the supplementary write is successful, the status of the data in the unit database is updated to updated. In the above process, while writing the unit database information, the gateway routing information cache is also written, and then the gateway routing information database is written, but without waiting for a feedback from the gateway routing information database. Instead, an asynchronous process is used to query whether the gateway routing information table is successfully written. If the write is successful, no processing is performed. If the write is not successful, the relationship data of the data is supplemented and written into the gateway routing information table, and when the supplementary write is successful, the status of the data in the unit database is updated to updated. In this way, a large number of distributed transactions are avoided, and the efficiency of dual data writing is improved; at the same time, for the low-probability event of unsuccessful writing of the gateway routing information table, compensation is made through the asynchronous process to ensure success, and the success rate of dual data writing is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts. In the drawings:
[0021] Figure 1 is the flowchart of the dual data writing method in an embodiment of the present invention Figure 1 ;
[0022] Figure 2 is the flowchart of the dual data writing method in an embodiment of the present invention Figure 2 ;
[0023] Figure 3 is the processing flowchart of the read request during dual data writing in an embodiment of the present invention;
[0024] Figure 4 is the first processing flowchart of the update request during dual data writing in an embodiment of the present invention; <>
[0025] Figure 5This is the second processing flow of update requests during data dual writing in the embodiments of the present invention;
[0026] Figure 6 This is the flowchart of the asynchronous process in the embodiments of the present invention;
[0027] Figure 7 This is the schematic diagram of the data dual writing device in the embodiments of the present invention Figure 1 ;
[0028] Figure 8 This is the schematic diagram of the data dual writing device in the embodiments of the present invention Figure 2 ;
[0029] Figure 9 This is the schematic diagram of the computer device in the embodiments of the present invention. Detailed implementation manners
[0030] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer and more understandable, the following further elaborates on the embodiments of the present invention with reference to the accompanying drawings. Herein, the illustrative embodiments and descriptions of the present invention are used to explain the present invention, but do not limit the present invention.
[0031] In the description of this specification, the terms "include", "comprise", "have", "contain", etc. are all open-ended terms, meaning including but not limited to. The descriptions referring to terms such as "one embodiment", "one specific embodiment", "some embodiments", "for example", etc. mean that the specific features, structures or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic descriptions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. The step sequences involved in each embodiment are used to schematically illustrate the implementation of the present application, and the step sequences are not limited and can be adjusted appropriately as needed.
[0032] Figure 1 This is the process of the data dual writing method in the embodiments of the present invention Figure 1 , as Figure 1 shown, the method includes:
[0033] Step 101, after receiving a write request, write the data into the unit database and mark the status of the written data as to be synchronized;
[0034] Step 102, after receiving the write success notification feedback from the unit database, write the relationship data of the data into the gateway routing information cache;
[0035] Step 103: After receiving the write success notification from the gateway routing information cache feedback, write the relationship data of the data into the gateway routing information table in the gateway routing information database without waiting for the feedback from the gateway routing information database;
[0036] Step 104: Use the asynchronous process query unit to check whether the relationship data corresponding to the data with the status of to be synchronized in the unit database is successfully written into the gateway routing information table;
[0037] Step 105: If the write is successful, update the status of the data in the unit database to updated;
[0038] Step 106: If the write is not successful, supplementarily write the relationship data of the data into the gateway routing information table. When the supplementary write is successful, update the status of the data in the unit database to updated.
[0039] In the embodiment of the present invention, while writing the unit database information, the gateway routing information cache is also written, and then the gateway routing information database is written. However, it does not wait for the feedback from the gateway routing information database. Instead, an asynchronous process is used to query whether the gateway routing information table is successfully written. If the write is successful, no processing is performed. If the write is not successful, the relationship data of the data is supplementarily written into the gateway routing information table. When the supplementary write is successful, the status of the data in the unit database is updated to updated. This avoids a large number of distributed transactions and improves the efficiency of data dual writing. At the same time, for the small probability event that the write to the gateway routing information table is not successful, compensation is made through the asynchronous process to ensure success, improving the success rate of data dual writing.
[0040] Figure 2 This is the flow of the data dual writing method in the embodiment of the present invention Figure 2 It includes the content of Step 101 and Step 103, and error handling is added on this basis. It involves the processing process after receiving the write request. Among them, when writing the relationship data, the relationship data is first inserted into the gateway routing information cache and then into the gateway routing information table.
[0041] In one embodiment, the method further includes:
[0042] After receiving the deletion request, mark the relationship data corresponding to the data in the deletion request in the gateway routing information table as not in use, and do not perform deletion in the gateway routing information database.
[0043] Under normal circumstances, it should be restricted that the relationship data involving the gateway routing information table such as customers, accounts, cards, etc. only has logical marked deletion and no physical deletion, that is, mark the relationship data corresponding to the data in the deletion request in the gateway routing information table as not in use, and do not perform deletion in the gateway routing information database.
[0044] In one embodiment, the method further includes:
[0045] When a read request is received, read the corresponding relationship data of the data in the read request in the gateway routing information cache. If the corresponding relationship data is not in the gateway routing information cache, read the gateway routing information table and put the corresponding relationship data of the gateway routing information table into the gateway routing information cache;
[0046] When an update request is received, perform an update operation based on the type of the relationship data corresponding to the data in the update request.
[0047] Figure 3 This is the processing flow of the read request during data dual writing in the embodiment of the present invention. Among them, the principle of the read request is to read from the network routing information cache first.
[0048] In one embodiment, performing an update operation based on the type of the relationship data corresponding to the data in the update request includes:
[0049] If the relationship data stored in the gateway routing information cache meets the first condition, update the gateway routing information cache based on the relationship data corresponding to the data in the update request, and then update the gateway routing information table; the first condition is that the relationship data is in the key-value and data-value structure, and the number of read requests received within a preset duration is greater than the first threshold, and the number of update requests received within a preset duration is less than the second threshold:
[0050] If the relationship data stored in the gateway routing information cache meets the second condition, delete the historical data of the relationship data corresponding to the data in the update request in the gateway routing information cache, and update the gateway routing information table based on the relationship data corresponding to the data in the update request; the second condition is that the number of update requests received within a preset duration is greater than the third threshold.
[0051] Figure 4 This is the first processing flow of the update request during data dual writing in the embodiment of the present invention, corresponding to the first condition, Figure 5 This is the second processing flow of the update request during data dual writing in the embodiment of the present invention, corresponding to the second condition. That is, under the first condition, first update the gateway routing information cache, and then update the gateway routing information table in the gateway routing information database. Under the second condition, the lazy loading idea is adopted, that is, only delete the relationship data in the gateway routing information cache first, and then update the gateway routing information table in the gateway routing information database, avoiding the meaningless cost of frequently updating the cache. In the above second condition, the update requests received within a preset duration can be simple data or worthless data. Worthless data is data that is not commonly used but requires complex calculations.
[0052] In one embodiment, the method further includes:
[0053] If the relational data stored in the gateway routing information cache meets the second condition, the received read request and update request are executed serially.
[0054] In the above embodiment, serial execution can ensure the consistency of the relational data in the gateway routing information cache and the gateway routing information database in the case of high concurrency.
[0055] Figure 6 The following is a flowchart of the asynchronous process in the embodiment of the present invention. In one embodiment, it is queried whether the relational data corresponding to the data with the status of to-be-synchronized in the unit database is successfully written in the gateway routing information table through the asynchronous process, including:
[0056] Poll and extract the key values of the data with the status of to-be-synchronized in the unit database;
[0057] Query whether the corresponding relational data is successfully written in the gateway routing information table through the key value.
[0058] To sum up, in the method proposed in the embodiment of the present invention, while writing the unit database information, the gateway routing information cache is also written, and then the gateway routing information database is written. However, instead of waiting for the feedback from the gateway routing information database, an asynchronous process is used to query whether the gateway routing information table is successfully written. If it is successfully written, no processing is performed. If it is not successfully written, the relational data of the data is supplemented and written into the gateway routing information table. When the supplementary writing is successful, the status of the data in the unit database is updated to updated. In this way, a large number of distributed transactions are avoided, and the efficiency of data dual writing is improved; at the same time, for the small probability event that the writing of the gateway routing information table is not successful, compensation is made through the asynchronous process to ensure success, and the success rate of data dual writing is improved. In addition, under the second condition, the lazy loading idea is adopted, that is, only the relational data in the gateway routing information cache is deleted first, and then the gateway routing information table in the gateway routing information database is updated, avoiding the meaningless cost of frequently updating the cache, and the serial execution of the read request and the write request can ensure the consistency of the relational data in the gateway routing information cache and the gateway routing information database in the case of high concurrency.
[0059] In the embodiment of the present invention, a data dual writing device is also provided as described in the following embodiment. Since the principle of the device to solve the problem is similar to that of the data dual writing method, the implementation of the device can refer to the implementation of the data dual writing method, and the repeated parts will not be described again.
[0060] Figure 7 The following is a schematic diagram of the data dual writing device in the embodiment of the present invention Figure 1 , including:
[0061] The unit database writing module 701 is configured to write data into the unit database and mark the status of the written data as to-be-synchronized after receiving a write request;
[0062] A write cache module 702, configured to write the relational data of the data into the gateway routing information cache after receiving a write success notification fed back by the unit database;
[0063] A module 703 for writing into the gateway routing information database, configured to write the relational data of the data into the gateway routing information table in the gateway routing information database after receiving a write success notification fed back by the gateway routing information cache, and without waiting for a feedback from the gateway routing information database;
[0064] A data write success query module 704, configured to asynchronously query whether the relational data corresponding to the data with a status of to-be-synchronized in the unit database is successfully written into the gateway routing information table; if the write is successful, update the status of the data in the unit database to updated; if the write is not successful, supplementarily write the relational data of the data into the gateway routing information table, and update the status of the data in the unit database to updated when the supplementary write is successful.
[0065] In one embodiment, the data write success query module is specifically configured to:
[0066] Poll and extract the key values of the data with a status of to-be-synchronized in the unit database;
[0067] Query whether the corresponding relational data is successfully written into the gateway routing information table through the key values.
[0068] Figure 8 Schematic diagram of the data dual-write device in an embodiment of the present invention Figure 2 In one embodiment, the device further includes a request processing module 801, configured to:
[0069] After receiving a deletion request, mark the relational data corresponding to the data in the deletion request as unused in the gateway routing information table, and do not perform deletion in the gateway routing information database.
[0070] In one embodiment, the request processing module is further configured to:
[0071] When receiving a read request, read the relational data corresponding to the data in the read request in the gateway routing information cache; if the corresponding relational data is not in the gateway routing information cache, read the gateway routing information table, and put the relational data corresponding to the gateway routing information table into the gateway routing information cache;
[0072] When receiving an update request, perform an update operation based on the type of the relational data corresponding to the data in the update request
[0073] In one embodiment, the request processing module is further configured to:
[0074] If the relationship data stored in the gateway routing information cache meets the first condition, update the gateway routing information cache based on the relationship data corresponding to the data in the update request, and then update the gateway routing information table; the first condition is that the relationship data is in the key-value and data-value structure, and the number of read requests received within a preset time period is greater than the first threshold, and the number of update requests received within a preset time period is less than the second threshold:
[0075] If the relationship data stored in the gateway routing information cache meets the second condition, delete the historical data of the relationship data corresponding to the data in the update request in the gateway routing information cache, and update the gateway routing information table based on the relationship data corresponding to the data in the update request; the second condition is that the number of update requests received within a preset time period is greater than the third threshold.
[0076] In summary, in the device proposed in the embodiment of the present invention, while writing the unit database information, the gateway routing information cache is also written, and then the gateway routing information database is written. However, instead of waiting for the feedback from the gateway routing information database, an asynchronous process is used to query whether the writing of the gateway routing information table is successful. If it is successful, no processing is done. If it is not successful, the relationship data of the data is supplemented and written into the gateway routing information table. When the supplementary writing is successful, the status of the data in the unit database is updated to updated. This avoids a large number of distributed transactions and improves the efficiency of data dual writing. At the same time, for the small probability event of unsuccessful writing of the gateway routing information table, compensation is made through the asynchronous process to ensure success, improving the success rate of data dual writing. In addition, under the second condition, the lazy loading idea is adopted, that is, only the relationship data in the gateway routing information cache is deleted first, and then the gateway routing information table in the gateway routing information database is updated, avoiding the meaningless cost of frequent cache updates, and the serial execution of read requests and write requests can ensure the consistency of the relationship data in the gateway routing information cache and the gateway routing information database under high concurrency.
[0077] The embodiment of the present invention also provides a computer device, Figure 9 which is a schematic diagram of the computer device in the embodiment of the present invention. The computer device 900 includes a memory 910, a processor 920, and a computer program 930 stored on the memory 910 and executable on the processor 920. When the processor 920 executes the computer program 930, the above data dual writing method is implemented.
[0078] The embodiment of the present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above data dual writing method is implemented.
[0079] An embodiment of the present invention also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the above data dual-writing method is implemented.
[0080] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program business system. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program business system implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0081] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program business systems according to embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in Figure 1 one or more of the flows Figure 1 or multiple flows and / or blocks
[0082] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions specified in Figure 1 one or more of the flows Figure 1 or multiple flows and / or blocks
[0083] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one or more of the flows Figure 1 or multiple flows and / or blocks
[0084] The specific embodiments described above further elaborate on the object, technical solution, and beneficial effects of the present invention. It should be understood that the above are only specific embodiments of the present invention and are not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A data dual-writing method, characterized in that including: After receiving a write request, write the data into the unit database and mark the status of the written data as to be synchronized; After receiving the write success notification feedback from the unit database, write the relationship data of the data into the gateway routing information cache; After receiving the write success notification feedback from the gateway routing information cache, write the relationship data of the data into the gateway routing information table in the gateway routing information database without waiting for the feedback from the gateway routing information database; Query asynchronously whether the relationship data corresponding to the data with the status of to be synchronized in the unit database is successfully written into the gateway routing information table; If the write is successful, update the status of the data in the unit database to updated; If the write is not successful, supplement and write the relationship data of the data into the gateway routing information table. When the supplementary write is successful, update the status of the data in the unit database to updated; Query asynchronously whether the relationship data corresponding to the data with the status of to be synchronized in the unit database is successfully written into the gateway routing information table, including: Poll and extract the key values of the data with the status of to be synchronized in the unit database; Query whether the corresponding relationship data is successfully written into the gateway routing information table through the key value.
2. The method according to claim 1, characterized in that, also including: After receiving a delete request, mark the relationship data corresponding to the data in the delete request as not in use and do not delete it in the gateway routing information database.
3. The method according to claim 1, wherein also including: When receiving a read request, read the corresponding relationship data of the data in the read request from the gateway routing information cache. If the corresponding relationship data is not in the gateway routing information cache, read the gateway routing information table and put the corresponding relationship data in the gateway routing information table into the gateway routing information cache; When receiving an update request, perform an update operation based on the type of the relationship data corresponding to the data in the update request.
4. The method according to claim 3, characterized in that, Performing an update operation based on the type of the relationship data corresponding to the data in the update request, including: If the relationship data stored in the gateway routing information cache meets the first condition, update the gateway routing information cache based on the relationship data corresponding to the data in the update request, and then update the gateway routing information table; the first condition is that the relationship data is in the key value and data value structure, and the number of read requests received within a preset time period is greater than the first threshold, and the number of update requests received within a preset time period is less than the second threshold; If the relationship data stored in the gateway routing information cache meets the second condition, delete the historical data of the relationship data corresponding to the data in the update request in the gateway routing information cache, and update the gateway routing information table based on the relationship data corresponding to the data in the update request; the second condition is that the number of update requests received within a preset time period is greater than the third threshold.
5. The method according to claim 3, characterized in that, also including: If the relationship data stored in the gateway routing information cache meets the second condition, execute the received read requests and update requests serially.
6. A data dual-writing device, characterized in that, including: A write unit database module, configured to write data into the unit database after receiving a write request, and mark the status of the written data as to be synchronized; A write cache module, configured to write the relationship data of the data into the gateway routing information cache after receiving the write success notification feedback from the unit database; The write gateway routing information database module is used to write the relational data of the data into the gateway routing information table in the gateway routing information database after receiving the write success notification feedback from the gateway routing information cache, without waiting for the feedback from the gateway routing information database; The data write success query module is used to query asynchronously whether the relational data corresponding to the data with the status of to-be-synchronized in the unit database is successfully written in the gateway routing information table through the asynchronous process query unit; if it is successfully written, update the status of the data in the unit database to updated; If it is not successfully written, supplement and write the relational data of the data into the gateway routing information table, and when the supplementary write is successful, update the status of the data in the unit database to updated; The data write success query module is specifically used for: Poll and extract the key values of the data with the status of to-be-synchronized in the unit database; Query whether the corresponding relational data is successfully written in the gateway routing information table through the key value.
7. The device according to claim 6, characterized in that, It further includes a request processing module, which is used for: After receiving a delete request, mark the relational data corresponding to the data in the delete request as not in use, and do not delete it in the gateway routing information database.
8. The device according to claim 7, characterized in that, The request processing module is further used for: When receiving a read request, read the relational data corresponding to the data in the read request in the gateway routing information cache. If there is no such corresponding relational data in the gateway routing information cache, read the gateway routing information table and put the corresponding relational data in the gateway routing information table into the gateway routing information cache; When receiving an update request, perform an update operation based on the type of the relational data corresponding to the data in the update request.
9. The device according to claim 8, characterized in that, The request processing module is further used for: If the relational data stored in the gateway routing information cache meets the first condition, update the gateway routing information cache based on the relational data corresponding to the data in the update request, and then update the gateway routing information table; The first condition is that the relational data is in the key value and data value structure, and the number of read requests received within a preset duration is greater than the first threshold, and the number of update requests received within a preset duration is less than the second threshold: If the relational data stored in the gateway routing information cache meets the second condition, delete the historical data of the relational data corresponding to the data in the update request in the gateway routing information cache, and update the gateway routing information table based on the relational data corresponding to the data in the update request; the second condition is that the number of update requests received within a preset duration is greater than the third threshold.
10. The device according to claim 8, characterized in that, The request processing module is further used for: If the relational data stored in the gateway routing information cache meets the second condition, execute the received read request and update request serially.
11. A computer device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method according to any one of claims 1 to 5.
12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, it implements the method according to any one of claims 1 to 5.
13. A computer program product, characterized in that, The computer program product includes a computer program, and when the computer program is executed by the processor, it implements the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Key-value data distributed caching system and method thereof
CN103078927A
Data query method and device
CN109684358A