Data processing method, system, device and storage medium for distributed system

By using business identifiers to record the initiation time and updating the business link in a distributed system, the reconciliation error problem caused by transaction delay in a distributed system is solved, and the fast, timely and accurate business processing is achieved.

CN114357084BActive Publication Date: 2025-04-29JIQI CHENGDU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210029910.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-12
Publication Date
2025-04-29
Estimated Expiration
2042-01-12

AI Technical Summary

Technical Problem

In distributed systems, due to the delay of transactions, the prior art causes errors in reconciliation during lengthy transactions, and it is difficult to achieve fast, timely and accurate business processing results.

Method used

By introducing service identifiers in the distributed system, recording the initiation time of each service, and updating the service link during the transmission process, ensuring that the transmission path of each service is timely understood, so that the calculation is carried out according to the initiation time when calculating the business results.

Benefits of technology

It improves the efficiency and accuracy of the distributed system in business settlement processing, reduces possible errors during the calculation process, and ensures the rapid and timely service processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114357084B_ABST
    Figure CN114357084B_ABST
Patent Text Reader

Abstract

The present application provides a data processing method, system, device and storage medium for a distributed system, and belongs to the field of distributed environment synchronization technology. The method includes: a first server-side device generates a first business processing request, and sends the first business processing request to at least one second server-side device; if the second server-side device is a non-account-side device, the second server-side device updates and stores the business link of the target business, and sends the first business processing request to the downstream server-side device of the non-account-side device; if the second server-side device is an account-side device, the second server-side device updates and stores the transaction link of the target business, and records the business data of the target business. The present application can avoid errors caused by the delay of the business, and obtain business processing results more quickly, timely and accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of distributed environment synchronization technology, and more specifically, to a data processing method, system, device, and storage medium for a distributed system. Background Technology

[0002] In the process of executing business (such as transactions) in a distributed account, it is usually necessary to reconcile the recorded transactions in order to ensure the accuracy of the transactions.

[0003] In existing technologies, reconciliation is usually performed by the server-side device based on the daily cut-off time. For example, the server-side device obtains all transaction records under a certain daily cut-off time for reconciliation and comparison.

[0004] However, existing transaction recording methods typically record the transaction time of each server device. Since some transactions require the participation of multiple server devices and the transaction duration is too long, there is a delay when reconciling according to the daily cut-off time. Therefore, there will be errors when comparing long transactions according to the daily cut-off time. Summary of the Invention

[0005] The purpose of this application is to provide a data processing method, system, device, and storage medium in a distributed system that can avoid errors caused by business delays and obtain business processing results more quickly, timely, and accurately.

[0006] The embodiments of this application are implemented as follows:

[0007] One aspect of this application provides a data processing method for a distributed system. The method is applied to a distributed system including multiple server devices. Each server device includes a first server device and a second server device. The second server device includes either an account-side device or a non-account-side device. The first server device initiates a first service processing request. The account-side device records the target service requested by the first service request. The non-account-side device transmits the first service processing request. The method includes:

[0008] The first server device generates a first service processing request and sends the first service processing request to at least one second server device. The first service processing request includes: a service identifier of the target service, which is used to characterize the generation time of the first service processing request and the service link of the target service, which is used to indicate the transmission path of the target service in the distributed system.

[0009] If the second server device is a non-account device, the second server device updates and stores the business link of the target business, and sends the first business processing request to the downstream server device of the non-account device. The downstream server device is the next server device of the non-account device in the business link.

[0010] If the second server device is an account-side device, then the second server device updates and stores the transaction link of the target business, and records the business data of the target business, including: the generation time of the first business processing request.

[0011] Optionally, the second server device updates and stores the business link of the target service, including:

[0012] The second server device updates and stores the business link of the target service based on the address identifier of the second server device;

[0013] The second server device will use the updated business link and the generation time of the target business as the new business identifier for the target business.

[0014] Optionally, the second server device updates and stores the service link of the target service based on the address identifier of the second server device, including:

[0015] The second server device obtains the transmission path in the business link of the target service;

[0016] The second server device adds its address identifier to the transmission path to obtain the updated service link and stores the service identifier.

[0017] Optionally, the first service processing request further includes: setting a preset transmission time, and sending the first service processing request to a downstream server device that is not an account-side device, including:

[0018] If the current time is the preset transmission time, the second server device will send the first service processing request to the downstream server device.

[0019] Optionally, the method further includes:

[0020] The target server device responds to the second business processing request and obtains the business data of each business recorded on the target server device, wherein the target server device is any server device in the distributed system;

[0021] The target server device determines the processing result of the second business processing request based on the business data of each business.

[0022] Optionally, the second service processing request includes: a target date cutoff, and the target server device determining the processing result of the second service processing request based on the service data of each service, including:

[0023] Based on the generation time of the first business processing request corresponding to each business, the target server device selects at least one business to be processed from each business that matches the target date cutoff date.

[0024] The target server device generates the processing result of the second business processing request based on the business data of each business to be processed.

[0025] Optionally, the method further includes:

[0026] If the second server device is in an offline state, when the second server device comes out of the offline state, the upstream server device of the second server device will resend the first service processing request that the second server device did not receive in the offline state to the second server device based on the service identifier. The upstream server device is the server device above the second server device in the service link.

[0027] In another aspect of this application, a distributed system is provided, comprising: multiple server devices connected to each other via links within the distributed system; the server devices include: a first server device and a second server device; the second server device includes: an account-side device or a non-account-side device; the first server device is used to initiate a first service processing request; the account-side device is used to record the target service requested by the first service request; and the non-account-side device is used to transmit the first service processing request.

[0028] In another aspect of this application, a computer device is provided, including: a memory and a processor. The memory stores a computer program that can run on the processor. When the processor executes the computer program, it implements the method steps executed by the first server device or the method steps executed by the second server device in the data processing method of the distributed system described above.

[0029] In another aspect of the embodiments of this application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it implements the method steps executed by the first server device or the method steps executed by the second server device in the data processing method of the distributed system described above.

[0030] The beneficial effects of the embodiments of this application include:

[0031] In the data processing method, system, device, and storage medium of a distributed system provided in this application embodiment, a first service processing request can be generated based on a first server device and sent to at least one second server device. The first service processing request includes: a service identifier of the target service, which is used to characterize the generation time of the first service processing request and the service link of the target service, which is used to indicate the transmission path of the target service in the distributed system; if the second server device is a non-account terminal device, the second server device updates and stores the service link of the target service and sends the first service processing request to the downstream server device of the non-account terminal device, which is the next server device of the non-account terminal device in the service link; if the second server device is an account terminal device, the second server device updates and stores the transaction link of the target service and records the service data of the target service, which includes: the generation time of the first service processing request. The system uses business identifiers to record the initiation time of each business transaction. This allows for calculations based on the initiation time, even for lengthy business transmission processes. Furthermore, the system can update business links during transmission to understand the transmission path of each business, thereby improving the efficiency and accuracy of the distributed system in business settlement processing and reducing potential errors in the calculation process. Attached Figure Description

[0032] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0033] Figure 1 This is a schematic diagram of the structure of a distributed system provided in an embodiment of this application;

[0034] Figure 2 A flowchart illustrating the data processing method for a distributed system provided in this application embodiment. Figure 1 ;

[0035] Figure 3 A flowchart illustrating the data processing method for a distributed system provided in this application embodiment. Figure 2 ;

[0036] Figure 4 A flowchart illustrating the data processing method for a distributed system provided in this application embodiment. Figure 3 ;

[0037] Figure 5A schematic diagram of the transmission link of a distributed system provided in an embodiment of this application;

[0038] Figure 6 A flowchart illustrating the data processing method for a distributed system provided in this application embodiment. Figure 4 ;

[0039] Figure 7 A flowchart illustrating the data processing method for a distributed system provided in this application embodiment. Figure 5 ;

[0040] Figure 8 A schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0041] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0042] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0043] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0044] In the description of this application, it should be noted that the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0045] It should be noted that with the massive increase in online business volume, traditional stand-alone business design systems have limited computing power and cannot meet business performance requirements. They are gradually being replaced by systems based on distributed business designs. However, in a distributed business design, each business process involves multiple service calls and collaborations, and the proportion of asynchronous collaboration is increasing. The processing of the same batch of jobs may take hours to complete. The daily business switching and reconciliation when the business is transactional, which were previously done in the stand-alone mode, become very difficult in a distributed design. When the same batch of business involves accounting for multiple accounts, because the accounts are distributed across different systems, and the time caliber for switching days is different in different systems, the accounting order is also different, making cross-account system reconciliation and achieving balance between debit and credit balances very difficult.

[0046] The industry has also provided some collaborative methods for daily cut-off and reconciliation based on distributed systems. For example, during daily cut-off, a unified daily cut-off information is transmitted to individual account systems through a daily cut-off controller. However, the transmission process may fail, which means that the system's accounting needs to wait for the daily cut-off to be completed. If the daily cut-off fails, it may cause user operation failure. The daily cut-off time of an account is still determined by which cut-off day the account's current crediting time is assigned to.

[0047] Meanwhile, the daily-switching collaborative approach in reconciliation cannot prevent the daily-switched data between the two reconciliation systems from falling within the same statistical caliber. This can lead to discrepancies during reconciliation, requiring the discrepancies to be held up for reconciliation the following day. This is especially true for some popular accounts that are asynchronously recorded, which increases the probability of cross-day switching registrations and results in more outstanding accounts.

[0048] To avoid the above problems, this application proposes a distributed system. The specific structure and contents of the distributed system provided in the embodiments of this application will be explained in detail below.

[0049] Figure 1 Please refer to the schematic diagram of the distributed system provided in the embodiments of this application. Figure 1 The distributed system includes multiple server devices, which are connected by links within the distributed system. The server devices include a first server device 110 and a second server device. The second server device includes an account-side device 130 or a non-account-side device 120. The first server device 110 is used to initiate a first business processing request, the account-side device 130 is used to record the target business requested by the first business request, and the non-account-side device 120 is used to transmit the first business processing request.

[0050] Optionally, the server-side device may be a computer device or server deployed in the distributed system, without limitation. These server-side devices can be connected via links in the distributed system, specifically through network connections or any other communication method, without limitation.

[0051] The first server device 110 can be a device for initiating the target service, specifically a device that issues a first service processing request; the non-account device 120 can be a device for transmitting the first service processing request; and the account device 130 can be the endpoint device for transmitting the target service, that is, a device for receiving the first service processing request, determining the target service for the request, and recording the target service.

[0052] The above definition of server-side equipment is based on a single business. For different businesses, since the devices initiating the requests may be different, the same physical device may belong to different server-side equipment for different businesses.

[0053] For example, for the same device A, when executing service a, it is the initiator of the request, that is, the first server device; while when executing service b, it is the transmitter of the request, that is, the non-account device.

[0054] Optionally, the aforementioned business can specifically be a task implemented based on a distributed system, such as a transaction business. The first business processing request can specifically execute a transaction business request, and based on this processing request, the transaction business can be transmitted. For example, after the first server device 110 sends the first business request to the non-account device 120, the specific content of the transaction business can be transmitted from the first server device 110 to the non-account device 120. Correspondingly, when the non-account device 120 transmits the first business request to the account device 130, the specific content of the transaction business can be transmitted from the non-account device 120 to the account device 130.

[0055] The specific content of this transaction could be, for example, a transfer of a certain amount of money from one virtual account to another corresponding virtual account in the account terminal device 130.

[0056] It should be noted that the above example only uses transaction business as an example. In the actual process of handling business, other types of business can also be involved, and this is not the only limitation.

[0057] The following explains the specific implementation process of the data processing method of the distributed system provided in the embodiments of this application, based on the specific structure of the distributed system described above.

[0058] Figure 2 A flowchart illustrating the data processing method for a distributed system provided in this application embodiment. Figure 1 Please refer to Figure 2 The method includes:

[0059] S210: The first server device generates a first service processing request and sends the first service processing request to at least one second server device.

[0060] The first service processing request includes: a service identifier of the target service, which is used to characterize the generation time of the first service processing request and the service link of the target service, which is used to indicate the transmission path of the target service in the distributed system.

[0061] Optionally, the execution entity of this method can be the aforementioned distributed system. The first server device can respond to the user's operation or generate a first business processing request based on pre-configured content. The first business processing request can be a request for conducting transaction business.

[0062] After generating the request, the first server device can send the first business processing request to any one or more second server devices.

[0063] The target service identifier can be transmitted as a character field during transmission, for example, it can be represented as "DMX.Y..N", where D can represent the time when the target service was initiated, such as a certain year, month and day; M can be used as the identifier field of the target service, such as a preset character field; XY.N can represent the service link of the target service, where each letter of XY.N can represent a server device passed through in the transmission path.

[0064] S220: If the second server device is a non-account device, the second server device updates and stores the business link of the target business, and sends the first business processing request to the downstream server device of the non-account device.

[0065] Downstream server-side equipment refers to the next server-side equipment after the non-account-side equipment in the business chain.

[0066] Optionally, if the second server device is a non-account device, it can be determined that the second server device is used to transmit the first business processing request. The business link of the target business can be updated and stored based on the second server device. After updating and storing, the first business processing request can be sent to the downstream server device of the non-account device.

[0067] It should be noted that the target second server device for the first business processing request can be pre-configured, and can be transmitted to different second server devices based on different business needs, without any restrictions here.

[0068] Specifically, the downstream server device can be the next server device after the current server device in the transmission path of a certain service. For example, if a non-account device transmits the first service processing request to an account device, then the account device is the downstream server device. Correspondingly, if a non-account device transmits the first service processing request to another non-account device, then the account device is the downstream server device.

[0069] Optionally, downstream server devices are relative terms. For example, if a transaction request is transmitted from device a to device c via device b, then device b is the downstream server device of device a, and device c is the downstream server device of device b. Correspondingly, there are also upstream server devices. An upstream server device is the device that sends the first service processing request to the current server device in the transmission path of a certain service. Continuing with the above example, device a is the upstream server device of device b, and device b is the upstream server device of device c.

[0070] S230: If the second server device is an account device, the second server device updates and stores the transaction link of the target business and records the business data of the target business.

[0071] The business data of the target business includes: the generation time of the first business processing request.

[0072] Optionally, if the second server device is an account-side device, it can be determined that the second server device is used to record and process the first business processing request. The business link of the target business can be updated and stored based on the second server device. After updating and storing, the business data of the target business can be recorded.

[0073] In a data processing method for a distributed system provided in this application embodiment, a first service processing request can be generated based on a first server device and sent to at least one second server device. The first service processing request includes: a service identifier of the target service, which is used to characterize the generation time of the first service processing request and the service link of the target service, which is used to indicate the transmission path of the target service in the distributed system; if the second server device is a non-account device, the second server device updates and stores the service link of the target service and sends the first service processing request to the downstream server device of the non-account device, which is the next server device after the non-account device in the service link; if the second server device is an account device, the second server device updates and stores the transaction link of the target service and records the service data of the target service, which includes: the generation time of the first service processing request. The system uses business identifiers to record the initiation time of each business transaction. This allows for calculations based on the initiation time, even for lengthy business transmission processes. Furthermore, the system can update business links during transmission to understand the transmission path of each business, thereby improving the efficiency and accuracy of the distributed system in business settlement processing and reducing potential errors in the calculation process.

[0074] The following explains another specific implementation process of the data processing method for the distributed system provided in the embodiments of this application.

[0075] Figure 3 A flowchart illustrating the data processing method for a distributed system provided in this application embodiment. Figure 2 Please refer to Figure 3 The second server device updates and stores the business links of the target service, including:

[0076] S310: The second server device updates and stores the business link of the target service based on the address identifier of the second server device.

[0077] Optionally, the address identifier of the server device can be used as the identification character field of the server device. For example, if the second server device is device a, then the address identifier of the device can be a. The address identifier can be used to update the business link of the target business. For example, when the first business processing request of a certain business is transmitted from device a to device b, ab can be recorded in the business link, which is also a representation of "XY.N" in the aforementioned example.

[0078] Each server device can store the first business request of the business passing through the device, as well as the relevant content of the target business.

[0079] S320: The second server device will use the updated service link and the generation time of the target service as the new service identifier for the target service.

[0080] Optionally, after updating the business link of the target service, the updated business link and the generation time of the target service can be used as the new business identifier of the target service. The generation time of the target service is the initial generation time and will not change; the changed content is the updated business link of the target service.

[0081] The following explains another specific implementation process of the data processing method for the distributed system provided in the embodiments of this application.

[0082] Figure 4 A flowchart illustrating the data processing method for a distributed system provided in this application embodiment. Figure 3 Please refer to Figure 4 The second server device updates and stores the service link of the target service based on the address identifier of the second server device, including:

[0083] S410: The second server device obtains the transmission path in the service link of the target service.

[0084] Optionally, after the second server device obtains the first service processing request, it can obtain the transmission path in the service link of the target service in the service identifier of the request. The transmission path can be in the form of "XY.N" mentioned above. For example, if the current transmission path is from device a to device b, then "ab" can be obtained.

[0085] S420: The second server device adds its address identifier to the transmission path to obtain the updated service link and stores the service identifier.

[0086] Optionally, after obtaining the transmission path, the second server device can add its address identifier to the transmission path. For example, if the current second server device is device c, that is, the address identifier is c, then the above "ab" can be changed to "abc" to update the transmission path. After the update is completed, the updated service link can be obtained. After obtaining the service link, the corresponding service identifier can also be stored.

[0087] Optionally, the first service processing request further includes: a preset transmission time. Sending the first service processing request to a downstream server device that is not an account-side device includes: if the current time is the preset transmission time, then the second server device sends the first service processing request to the downstream server device.

[0088] Optionally, for special types of services, such as those that need to be forwarded through a message server, the message server can be a non-account-side device. After receiving the first service processing request, it will not directly transmit the service request. Instead, based on the preset transmission time in the request, if the current time meets the preset transmission time, it can transmit the first service processing request to the downstream server.

[0089] The following diagram illustrates the transmission relationship of the distributed system provided in this application embodiment using a specific transmission link.

[0090] Figure 5 Please refer to the schematic diagram of the transmission link of the distributed system provided in the embodiments of this application. Figure 5 In this context, device a is the first server device 110; devices b, c, and i are non-account devices 120; and devices d, e, f, and g are all account devices, with device i being the aforementioned message server.

[0091] The requests transmitted between devices include a service identifier, which is in... Figure 5 The text contains annotations, such as "DMa.b", which indicates the service identifier transmitted by device a to device b. The "D" and "M" have been explained above and will not be repeated here. It should be noted that the above representation of the service identifier is only an example. In actual transmission, it can be implemented based on any order or form and is not limited to the above example.

[0092] The following explains another specific implementation process of the data processing method for the distributed system provided in the embodiments of this application.

[0093] Figure 6 A flowchart illustrating the data processing method for a distributed system provided in this application embodiment. Figure 4 Please refer to Figure 6 The method also includes:

[0094] S610: The target server device responds to the second service processing request and obtains the service data of each service recorded on the target server device.

[0095] The target server device can be any server device in the distributed system.

[0096] Optionally, a user can initiate a second business processing request based on any target server in the distributed system. After the user initiates the second business processing request based on the target server device, the user can obtain the business data of each business recorded on the target server device. The business data can be the aforementioned business data for business recording, and the data can include the aforementioned business identifier.

[0097] Specifically, the second business processing request can be a request for reconciliation processing, which can be a processing request to verify income and expenditure invoices when the target business is a transaction business.

[0098] Optionally, the above example of generating a second business processing request through interaction between the user and the target server device can be used as an example. In practice, the second business processing request can also be generated based on pre-set rules, such as timed events or when certain environmental conditions are met. In addition, the data obtained by the target server device can be the business data of the target server itself or the business data of any server device in the distributed system, and is not limited to these.

[0099] S620: The target server device determines the processing result of the second service processing request based on the service data of each service.

[0100] Optionally, after determining the business data of each of the above-mentioned services, the processing result of the second service processing request can be determined.

[0101] The processing result of the second business processing request can be a reconciliation result, specifically based on a business identifier, for example:

[0102] Based on the business identifier, the daily cut-off time of the target server device can be obtained from the records. The daily cut-off time is also the time when the business was initiated. This time has been confirmed and no longer depends on the time when the account was credited. In this way, under various asynchronous or delayed account registrations, the registered transaction time strictly corresponds to a specific transaction. Based on this method, account balance balancing reconciliation can be performed. Assume there are multiple businesses T = (T1, T2, ..., Tn).

[0103] Where T∈P, P represents a number of transactions that occur on the same day and at the same time. Therefore, the account operations involved in transaction T will be recorded on the same day and at the same time, regardless of when they occur.

[0104] You can select any device for reconciliation (specifically, any target server device corresponding to an account). Taking two transactions as an example, you can calculate the income and expenditure of the two transactions separately to determine the balance of the account and thus reconcile the accounts.

[0105] The following explains another specific implementation process of the data processing method for the distributed system provided in the embodiments of this application.

[0106] Figure 7 A flowchart illustrating the data processing method for a distributed system provided in this application embodiment. Figure 5 Please refer to Figure 7The second business processing request includes: target date cutoff. Based on the business data of each business, the target server device determines the processing result of the second business processing request, including:

[0107] S710: The target server device selects at least one pending service that matches the target date cutoff date from each service based on the generation time of the first service processing request corresponding to each service.

[0108] Optionally, the target server device can store the business data of each business in the form of a table.

[0109] After receiving the second business processing request, at least one pending business that matches the target date cut-off date can be selected from the various businesses, that is, the business initiation time of the pending business is consistent with the target date cut-off time.

[0110] S720: The target server device generates the processing result of the second business processing request based on the business data of each business to be processed.

[0111] Optionally, the following explanation uses a specific table as an example:

[0112] Table 1:

[0113] Account Trading Day (D) trade TM Amount (debit) Balance (yuan) A1 D1 T1 M1-x.1 10 10 A1 D2 T2 M2-x.1 20 30

[0114] Table 2:

[0115] Account Trading Day (D) trade TM Amount (debit) Balance (yuan) B1 D2 T2 M2-x.2 20 20 B1 D1 T1 M1-x.2 10 30

[0116] Table 1 can be the business data stored in account A1, and Table 2 can be the business data stored in account B1. Both account A1 and account B1 can be accounts corresponding to any server-side device.

[0117] Among them, the transaction date is the time when the transaction is initiated, the transaction is the content of the executed transaction, TM is the identifier of the transaction, which is also the business identifier mentioned above, the amount (debit) can be the amount of income, and the balance can be the remaining amount.

[0118] Based on the data stored in Tables 1 and 2 above, a balance balancing calculation can be performed. That is, based on the transaction process, whether the amount of income and the change in balance are equal. Taking Table 2 above as an example, when transaction T2 is executed, the balance is 20 yuan. After executing T1, the income increases by 10 yuan, so the balance should be 30 yuan. Based on this calculation result, it is determined whether the actual balance is 30 yuan, thereby achieving balance balancing reconciliation.

[0119] Based on the records, the order in which T1 and T2 are registered in the account does not affect the balance and reconciliation of accounts on the same trading day.

[0120] It should be noted that the above balance calculation is only one way of reconciliation. In the actual reconciliation process, there are many other ways to achieve this.

[0121] During reconciliation, data is retrieved based on the transaction initiation time in the business identifier. The data range retrieved is designed to be the same related transaction, preventing reconciliation data from falling into a different reconciliation time range due to transaction registration delays. At the same time, the business identifier registered by this method carries upstream and downstream call link relationships, i.e., the aforementioned transmission path, allowing direct completion of business link transaction reconciliation through the business identifier. Furthermore, in multi-account reconciliation, since the transaction identifiers of the parent nodes registered by a batch of accounts are completely consistent (i.e., the same server-side device simultaneously transmits the first business processing request to multiple downstream server-side devices), multi-account chain reconciliation can be completed.

[0122] Optionally, the method further includes: if the second server device is in an offline state, when the second server device is out of the offline state, the upstream server device of the second server device resends the first service processing request that the second server device did not receive in the offline state to the second server device based on the service identifier.

[0123] Among them, the upstream server device is the server device preceding the second server device in the business link.

[0124] Optionally, when any second server device goes offline or malfunctions for unknown reasons, it can be determined that the second server device is in an offline state. After the second server device is out of the offline state, the upstream server device of the second server device resends the first service processing request that the second server device did not receive in the offline state to the second server device based on the service identifier. That is, the upstream server device of the second server device resends the request based on the transmission path in the service identifier.

[0125] It should be noted that after the transmission path of the current server device is updated, it can return the transmission path to the upstream server device so that the upstream server device can record the transmission path, thereby enabling the aforementioned offline retransmission.

[0126] The following describes the devices and storage media corresponding to the data processing method of the distributed system provided in this application, which are used to execute the application. The specific implementation process and technical effects are described above and will not be repeated below.

[0127] Figure 8 Please refer to the schematic diagram of the computer device provided in the embodiments of this application. Figure 8The computer device includes: a memory 810 and a processor 820. The memory 810 stores a computer program that can run on the processor 820. When the processor 820 executes the computer program, it implements the method steps executed by the first server device or the method steps executed by the second server device in the data processing method of the above-mentioned distributed system.

[0128] Optionally, the computer device can be either the first server device or the second server device. When the computer device is the first server device, the steps S210 and above can be executed. When the computer device is the second server device, the steps S220-S230, S310-S320, S410-S420 and above can be executed.

[0129] In another aspect of the embodiments of this application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it implements the method steps executed by the first server device or the method steps executed by the second server device in the data processing method of the distributed system described above.

[0130] In the several embodiments provided by this invention, it should be understood that the disclosed methods can be implemented in other ways. For example, the embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0131] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0132] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional units.

[0133] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute partial steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0134] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0135] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A data processing method for a distributed system, characterized in that: The method is applied to a distributed system, wherein the distributed system includes a plurality of server-side devices, wherein the server-side devices include: a first server-side device and a second server-side device, wherein the second server-side device includes: an account-side device or a non-account-side device, wherein the first server-side device is used to initiate a first service processing request, wherein the account-side device is used to record a target service requested by the first service request, and wherein the non-account-side device is used to transmit the first service processing request. The method includes: The first server device generates a first service processing request, and sends the first service processing request to at least one second server device, wherein the first service processing request includes: a service identifier of the target service, the service identifier is used to characterize the generation time of the first service processing request and the service link of the target service, and the service link is used to indicate a transmission path of the target service in the distributed system; If the second server device is a non-account device, the second server device updates and stores the service link of the target service, and sends the first service processing request to a downstream server device of the non-account device, where the downstream server device is the next server device of the non-account device in the service link; If the second server-side device is an account-side device, the second server-side device updates and stores the transaction link of the target business, and records the business data of the target business, where the business data of the target business includes: the generation time of the first business processing request.

2. The method according to claim 1, characterized in that The second server device updates and stores the service link of the target service, including: The second server device updates and stores the service link of the target service based on the address identifier of the second server device; The second server device uses the updated service link and the generation time of the target service as a new service identifier of the target service.

3. The method according to claim 2, characterized in that The second server device updates and stores the service link of the target service based on the address identifier of the second server device, including: The second server device obtains a transmission path in a service link of the target service; The second server device adds the address identifier of the second server device to the transmission path, obtains an updated service link and stores the service identifier.

4. The method according to claim 1, characterized in that The first service processing request further includes: a preset transmission time, and the sending of the first service processing request to the downstream service-end device of the non-account-end device includes: If the current time is the preset transmission time, the second server device sends the first service processing request to the downstream server device.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: The target server device responds to the second service processing request and obtains service data of each service recorded on the target server device, wherein the target server device is any server device in the distributed system; The target server device determines a processing result of the second service processing request based on the service data of each service.

6. The method according to claim 5, characterized in that The second service processing request includes: a target date cut-off date, and the target server device determines a processing result of the second service processing request based on the service data of each service, including: The target server device selects at least one to-be-processed business matching the target date from among the businesses based on the generation time of the first business processing request corresponding to each business; The target server device generates a processing result of the second service processing request according to the service data of each of the services to be processed.

7. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: If the second server device is in an offline state, when the second server device leaves the offline state, the upstream server device of the second server device resends the first service processing request that was not received by the second server device in the offline state to the second server device based on the service identifier, and the upstream server device is the previous server device of the second server device in the service link.

8. A distributed system, characterized in that: The distributed system includes: multiple server-side devices, and the multiple server-side devices are connected based on the links in the distributed system. The server-side devices include: a first server-side device and a second server-side device. The second server-side device includes: an account-side device or a non-account-side device. The first server-side device is used to initiate a first business processing request, and the account-side device is used to record the target business requested by the first business request; the non-account-side device is used to transmit the first business processing request. The distributed system is used to execute the steps of the data processing method of the distributed system described in any one of claims 1 to 7 above.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the steps of the data processing method of the distributed system described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, implements the steps of the data processing method of the distributed system described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Distributed reconciliation processing method, system and terminal device

    CN108961029A

  • Log storage method and system based on data center

    CN110086790A