Account data association method, system and device, storage medium and program product
By using transaction mechanisms to associate account data between social applications, the problem of data consistency between multiple applications is solved, and efficient and reliable association of account data is achieved.
Patent Information
- Application Number
- CN202310512138.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-08
- Publication Date
- 2024-11-08
AI Technical Summary
When implementing the correlation of account data between multiple social applications, how to ensure data consistency between the two is an urgent problem.
By using a transaction mechanism between the first application server and the second application server, it is ensured that the employed transaction and the main transaction during the account association request and response are either executed successfully or all failed, thereby maintaining the consistency of data between the two. sex. The specific steps include the first application server requesting to the first application transaction center to execute the employed transaction, the second application server requesting to the second application transaction center to execute the main transaction, and notifying the other party on success, ensuring that the data is synchronized between the two servers. storage.
The data consistency is achieved when the account data is associated between different applications, avoiding data inconsistency caused by service restart or network fluctuations, and ensuring the integrity and accuracy of the account association process.
Smart Images

Figure CN118921348A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer network technology, and in particular to an account data association method, system, device, storage medium and program product. Background Art
[0002] With the development of computer technology and Internet technology, enterprises can communicate and exchange information on enterprise matters through different social applications. For example, each enterprise can create accounts belonging to the enterprise in multiple different social applications and communicate and exchange information with users on enterprise matters in different social applications.
[0003] In order to realize the functional linkage of multiple different applications of the same enterprise, it is usually necessary to associate (or bind) the account of one application with the account of another application to obtain the account data of the other party in both directions. However, since the two applications belong to independent and different systems, how to ensure the consistency of the associated data stored by each of them during the account association process is an urgent problem to be solved. Summary of the invention
[0004] Based on this, it is necessary to provide an account data association method, system, device, storage medium and program product that can associate account data between two different applications and ensure the consistency of the associated data on both sides to address the above technical problems.
[0005] In a first aspect, the present application provides a method for associating account data, the method comprising:
[0006] The first application server, in response to the account association request of the first application, requests the first application transaction center to execute a slave transaction of the account association transaction; the account association request is used to request to associate the account data of the first application user account with the account data of the second application user account; after receiving the start execution notification fed back by the first application transaction center, the slave transaction is executed, and the slave transaction is used to send an account association instruction to the second application server according to the account data;
[0007] The second application server requests the second application transaction center to execute the main transaction of the account association transaction in response to the account association instruction; executes the main transaction after receiving the start execution notification fed back by the second application transaction center, wherein the main transaction is used to associate the account data of the first application user account with the account data of the second application user account; notifies the second application transaction center when the association is successful, and sends the account association data to the first application server after receiving the execution completion notification fed back by the second application transaction center;
[0008] After receiving the account association data, the first application server continues to execute the slave transaction, which is used to store the account association data; when the storage is successful, it notifies the first application transaction center, and after receiving the execution end notification fed back by the first application transaction center, it feeds back to the first application that the account data has been associated.
[0009] In one embodiment, after the first application server feeds back to the first application that the account data has been associated, the method further includes:
[0010] When the account data of the first application user account changes, the first application server updates the locally stored account-associated data and sends the updated account-associated data to the second application server to instruct the second application server to update the locally stored account-associated data.
[0011] In one embodiment, after the first application server feeds back to the first application that the account data has been associated, the method further includes:
[0012] When the account data of the second application user account changes, the second application server updates the locally stored account-associated data and sends the updated account-associated data to the first application server to instruct the first application server to update the locally stored account-associated data.
[0013] In one embodiment, after the first application server feeds back to the first application that the account data has been associated, the method further includes:
[0014] The second application server records the last update time of the account-related data, and determines the next update time of the account-related data with the last update time as the starting point and a preset time as the interval;
[0015] The second application server requests the latest account data of the first application user account stored by the first application server at the next update time;
[0016] The second application server updates the account-related data stored in the second application server based on the latest account data.
[0017] In one of the embodiments, the account data of the first application user account includes an account identifier of the first application user account and an icon of the first application user account; the account identifier is used to be displayed in the external information page of all or part of the users of the organization to which the second application user account belongs.
[0018] In one of the embodiments, the account data of the second application user account includes an account identifier of an organization to which the second application user account belongs and a contact person of the organization to which the second application user account belongs; the contact person is used to be displayed on the homepage of the first application user account.
[0019] In a second aspect, the present application also provides an account data association system. The system includes: a first application server, a first application transaction center, a second application server and a second application transaction center;
[0020] The first application server is used to request the first application transaction center to execute a slave transaction of the account association transaction in response to the account association request of the first application; the account association request is used to request to associate the account data of the first application user account with the account data of the second application user account;
[0021] The first application transaction center is used to feed back a start execution notification to the first application server;
[0022] The first application server is further configured to execute the slave transaction after receiving a start execution notification fed back by the first application transaction center, wherein the slave transaction is configured to send an account association instruction to the second application server according to the account data;
[0023] The second application server is used to request the second application transaction center to execute the main transaction of the account association transaction in response to the account association instruction;
[0024] The second application transaction center is used to feed back a start execution notification to the second application server;
[0025] The second application server is further configured to execute the main transaction after receiving the start execution notification fed back by the second application transaction center, wherein the main transaction is used to associate the account data of the first application user account with the account data of the second application user account;
[0026] The second application server is further configured to notify the second application transaction center when the association is successful, and send the account association data to the first application server after receiving the execution completion notification from the second application transaction center;
[0027] The first application server is further configured to continue executing the slave transaction after receiving the account association data, and the slave transaction is configured to store the account association data; notify the first application transaction center when storage is successful, and after receiving the execution completion notification fed back by the first application transaction center, feed back to the first application that the account data has been associated.
[0028] In one embodiment, the first application server is further configured to: in response to the account association request of the first application, before requesting the first application transaction center to execute a slave transaction of the account association transaction, the method further comprises:
[0029] The first application server receives an account association request sent by the first application; the first application account association request is generated based on the account data of the first application user account and the account data of the second application user account extracted from the association code when the first application logged in with the first application user account scans the association code; the association code is generated by the second application logged in with the second application user account.
[0030] In one of the embodiments, the second application server is further used to: obtain the account identifier of the input first application user account in the second application logged in with the second application user account; and generate an association code based on the account identifier of the input first application user account and the second application user account and the organization identifier to which the second application user account belongs.
[0031] In one embodiment, the first application server is further used to: in response to the account association request, send a pre-check instruction to the second application server, wherein the pre-check instruction is used to check connectivity between the first application server and the second application server;
[0032] In the case where the connectivity verification between the first application server and the second application server is passed, the step of requesting the first application transaction center to execute the slave transaction of the account association transaction is performed.
[0033] In one embodiment, the second application server is further used to: notify the second application transaction center when an association exception occurs, and send the exception information to the first application server after receiving the transaction status update notification fed back by the second application transaction center;
[0034] The first application server is further configured to: upon receiving the exception information and the exception information indicating an association failure, feedback the account data association failure to the first application.
[0035] In one of the embodiments, the first application server is further used to: continue executing the slave transaction when the exception information is received and the exception information indicates that the association has not failed, the slave transaction is used to notify the first application transaction center of the exception information, and poll the account association data from the second application server after receiving the transaction status update notification fed back by the first application transaction center, and locally store the obtained account association data when the account association data is polled.
[0036] In one of the embodiments, the first application server is further used to: in response to a slave transaction query request from the first application transaction center, poll the second application server for an execution result of the master transaction;
[0037] When the polled execution result indicates that the main transaction is successfully executed, the first application server obtains the account-related data from the second application server and stores the account-related data locally.
[0038] In one embodiment, the second application server is further used to: in response to the main transaction query request initiated by the second application transaction center, the second application server feeds back to the second application transaction center that the main transaction has not been completed, and receives the main transaction execution instruction sent by the second application transaction center;
[0039] The second application server re-executes the main transaction in response to the execute main transaction instruction.
[0040] In one embodiment, the main transaction includes a first subtransaction and a plurality of second subtransactions, and the second application server is further configured to: execute each of the second subtransactions in sequence when it is found that the first subtransaction has been successfully executed;
[0041] When the second application server finds that the first sub-transaction is not successfully executed, it sends a main transaction execution end notification to the second application transaction center; the main transaction execution end notification is used to instruct the second application transaction center to end the main transaction.
[0042] In one embodiment, the second application server is further configured to: the second application server queries the local execution progress of the main transaction, determines the unexecuted second sub-transaction according to the execution progress, and then re-executes the unexecuted second sub-transaction.
[0043] In one of the embodiments, the first application server is further used to: when the account data of the first application user account changes, the first application server updates the account-associated data stored locally, and sends the updated account-associated data to the second application server to instruct the second application server to update the account-associated data stored locally.
[0044] In one of the embodiments, the second application server is further used to: when the account data of the second application user account changes, the second application server updates the account-associated data stored locally, and sends the updated account-associated data to the first application server to instruct the first application server to update the account-associated data stored locally.
[0045] In one embodiment, the second application server is further used to: the second application server records the last update time of the account-related data, and determines the next update time of the account-related data with the last update time as the starting point and the preset time as the interval;
[0046] The second application server requests the latest account data of the first application user account stored by the first application server at the next update time;
[0047] The second application server updates the account-related data stored in the second application server based on the latest account data.
[0048] In one of the embodiments, the account data of the first application user account includes an account identifier of the first application user account and an icon of the first application user account; the account identifier is used to be displayed in the external information page of all or part of the users of the organization to which the second application user account belongs.
[0049] In one of the embodiments, the account data of the second application user account includes an account identifier of an organization to which the second application user account belongs and a contact person of the organization to which the second application user account belongs; the contact person is used to be displayed on the homepage of the first application user account.
[0050] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0051] The first application server, in response to the account association request of the first application, requests the first application transaction center to execute a slave transaction of the account association transaction; the account association request is used to request to associate the account data of the first application user account with the account data of the second application user account; after receiving the start execution notification fed back by the first application transaction center, the slave transaction is executed, and the slave transaction is used to send an account association instruction to the second application server according to the account data;
[0052] The second application server requests the second application transaction center to execute the main transaction of the account association transaction in response to the account association instruction; executes the main transaction after receiving the start execution notification fed back by the second application transaction center, wherein the main transaction is used to associate the account data of the first application user account with the account data of the second application user account; notifies the second application transaction center when the association is successful, and sends the account association data to the first application server after receiving the execution completion notification fed back by the second application transaction center;
[0053] After receiving the account association data, the first application server continues to execute the slave transaction, which is used to store the account association data; when the storage is successful, it notifies the first application transaction center, and after receiving the execution end notification fed back by the first application transaction center, it feeds back to the first application that the account data has been associated.
[0054] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0055] The first application server, in response to the account association request of the first application, requests the first application transaction center to execute a slave transaction of the account association transaction; the account association request is used to request to associate the account data of the first application user account with the account data of the second application user account; after receiving the start execution notification fed back by the first application transaction center, the slave transaction is executed, and the slave transaction is used to send an account association instruction to the second application server according to the account data;
[0056] The second application server requests the second application transaction center to execute the main transaction of the account association transaction in response to the account association instruction; executes the main transaction after receiving the start execution notification fed back by the second application transaction center, wherein the main transaction is used to associate the account data of the first application user account with the account data of the second application user account; notifies the second application transaction center when the association is successful, and sends the account association data to the first application server after receiving the execution completion notification fed back by the second application transaction center;
[0057] After receiving the account association data, the first application server continues to execute the slave transaction, which is used to store the account association data; when the storage is successful, it notifies the first application transaction center, and after receiving the execution end notification fed back by the first application transaction center, it feeds back to the first application that the account data has been associated.
[0058] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0059] The first application server, in response to the account association request of the first application, requests the first application transaction center to execute a slave transaction of the account association transaction; the account association request is used to request to associate the account data of the first application user account with the account data of the second application user account; after receiving the start execution notification fed back by the first application transaction center, the slave transaction is executed, and the slave transaction is used to send an account association instruction to the second application server according to the account data;
[0060] The second application server requests the second application transaction center to execute the main transaction of the account association transaction in response to the account association instruction; executes the main transaction after receiving the start execution notification fed back by the second application transaction center, wherein the main transaction is used to associate the account data of the first application user account with the account data of the second application user account; notifies the second application transaction center when the association is successful, and sends the account association data to the first application server after receiving the execution completion notification fed back by the second application transaction center;
[0061] After receiving the account association data, the first application server continues to execute the slave transaction, which is used to store the account association data; when the storage is successful, it notifies the first application transaction center, and after receiving the execution end notification fed back by the first application transaction center, it feeds back to the first application that the account data has been associated.
[0062] The above-mentioned account data association method, system, device, storage medium and program product provide slave transactions for the first application server that provides services for the first application through the first application transaction center, and provide master transactions for the second application server that provides services for the second application through the second application center, wherein the master transaction is used to associate the account data of the first application user account with the account data of the second application user account; when the association is successful, the second application transaction center is notified to instruct the second application transaction center to end the scheduling of the master transaction; after receiving the execution end notification fed back by the second application transaction center, the second application server ends the master transaction on the second application server and sends the account association data to the first application server; after receiving the account association data, the first application server stores the account association data and notifies the first application transaction center when the storage is successful to instruct the first application transaction center to end the scheduling of the slave transaction; after receiving the execution end notification fed back by the first application transaction center, the first application server ends the slave transaction on the first application server and feeds back to the first application that the account data has been associated. In the above process, the slave transaction will only be executed after the main transaction is executed successfully, and only when both the main transaction and the slave transaction are executed successfully, the account data of the first application user account and the account data of the second application user account will be successfully associated. At this time, the account association data stored on the first application server and the second application server are the same, which can ensure data consistency. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 A diagram of an application environment of a method for associating account data in an embodiment;
[0064] Figure 2 A schematic diagram of a flow chart of a method for associating account data in one embodiment;
[0065] Figure 3 is a flowchart of a method for associating account data in a detailed embodiment;
[0066] Figure 4 A schematic diagram of an association display page corresponding to a first application user account after the first application user account is associated with a second application user account in an embodiment;
[0067] Figure 5 A schematic diagram of an association display page corresponding to a second application user account after a first application user account is associated with a second application user account in an embodiment;
[0068] Figure 6 A schematic diagram of display information of a first application after the first application scans an associated code in an embodiment;
[0069] Figure 7 A flowchart of a method for associating account data in another detailed embodiment;
[0070] Figure 8 A schematic diagram of updating associated data in one embodiment;
[0071] Fig. 9 A schematic diagram of a flow chart of a mechanism for periodically checking and updating associated data in one embodiment;
[0072] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0073] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0074] The method for associating account data provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the first application server 102 responds to the account association request of the first application 104 and requests the first application transaction center 106 to execute the slave transaction of the account association transaction; the account association request is used to request to associate the account data of the first application user account with the account data of the second application user account; the first application server 102 executes the slave transaction after receiving the start execution notification fed back by the first application transaction center 106, and the slave transaction is used to send the account association instruction to the second application server 108 according to the account data; the second application server 108 responds to the account association instruction and requests the second application transaction center 110 to execute the master transaction of the account association transaction; the second application server 108 receives the second application transaction in the second application transaction The first application server 102 executes the main transaction after receiving the start execution notification from the second application transaction center 110, and the main transaction is used to associate the account data of the first application user account with the account data of the second application user account; the second application server 108 notifies the second application transaction center 110 when the association is successful, and sends the account association data to the first application server 102 after receiving the execution end notification from the second application transaction center 110; the first application server 102 continues to execute the slave transaction after receiving the account association data, and the slave transaction is used to store the account association data; notifies the first application transaction center 106 when the storage is successful, and after receiving the execution end notification from the first application transaction center 106, feedback to the first application 102 that the account data has been associated. Among them, the first application server 102, the first application transaction center 106, the second application server 108 and the second application transaction center 110 can all be implemented by independent servers or a server cluster composed of multiple servers. The first application 104 and the second application 112 refer to two different applications running on the terminal respectively. Optionally, the first application 104 can be a social application used by individual users, and the second application 112 can be a social application used by corporate users. The terminal may be, but is not limited to, various desktop computers, laptops, smart phones, tablet computers, IoT devices and portable wearable devices. IoT devices may be smart TVs, smart car devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc.
[0075] In one embodiment, Figure 2 As shown, a method for associating account data is provided, and the method is applied to Figure 1 The first application server and the second application server in the example are used as an example to illustrate, including the following steps:
[0076] Step 202, the first application server responds to the account association request of the first application and requests the first application transaction center to execute a slave transaction of the account association transaction; the account association request is used to request to associate the account data of the first application user account with the account data of the second application user account; after receiving the start execution notification fed back by the first application transaction center, the slave transaction is executed, and the slave transaction is used to send an account association instruction to the second application server according to the account data.
[0077] The first application server is used to provide application services for the first application and provide access to business logic for the first application. The first application server can convert data into dynamic content according to the request of the first application. For example, to open the first application, the first application server needs to execute a program to find the user's latest login information of the first application from the database, and then convert the login information into an HTML web page to display it in front of the customer.
[0078] In the related art, during the association process of the account data of the first application user account and the account data of the second application user account, due to service restart and network fluctuation, a service call may fail to return, resulting in data inconsistency, which may be manifested in two aspects. On the one hand, the first application or the second application is inconsistent, for example, the account association of the second application is divided into multiple steps. If only some of the steps are completed and the remaining steps are not completed, it will cause internal data abnormality. On the other hand, the first application and the second application are inconsistent, for example, the second application completes the association, and the first application server restarts, resulting in the unprocessed account association of the first application, resulting in the inconsistency between the first application and the second application. Therefore, in order to solve the above problem, the embodiment of the present application adopts a transaction mechanism to solve the above problem. The transaction mechanism ensures that the multiple steps inside the association request are either all executed or not processed. According to the principle of the transaction mechanism, in the first aspect, if a step fails in the account association of the second application, the previously completed steps are invalidated, thereby avoiding the problem of inconsistency of the second application; in the second aspect, if the first application server restarts, resulting in the failure of the first application association due to the unprocessed account association of the first application, the result of the completed association of the second application is invalidated, thereby avoiding the problem of inconsistency between the first application and the second application.
[0079] The first application transaction center refers to a server used to support transactions. Among them, a transaction is a program execution unit, and all operations in it are either all executed successfully or all executed failed. The first application transaction center is used to generate slave transactions for the first application server and schedule slave transactions. The first application and the second application refer to two different social applications running on terminals (which can be the same terminal or two different terminals). For example, the first application can be WeChat's video account, and the second application can be WeChat for Business. In some scenarios, the first application and the second application need to interact with each other. For example, in the process of operating the video account of an enterprise, customers will contact the enterprise on the video account to obtain pre-sales and after-sales services. At this time, WeChat for Business needs to interact with the video account and WeChat for Business in order to efficiently serve the customers in the video account. Since the first application and the second application are in different systems, in order to realize the functional linkage between the first application and the second application of two different systems, it is necessary to associate the account data of the user account of the first application with the account data of the user account of the second application.
[0080] The account data of the first application user account includes the account identifier of the first application user account and the icon of the first application user account. The account identifier of the first application user account includes basic information such as the ID and name of the first application user account, and the icon of the first application user account includes the avatar and authentication status of the first application user account, etc. The authentication status is used to identify the type of organization to which the first application user account belongs. For example, the organization to which the first application user account belongs can be an individual or an enterprise.
[0081] The account data of the second application user account includes the account identifier of the organization to which the second application user account belongs and the contact person of the organization to which the second application user account belongs. Among them, the organization to which the second application user account belongs can be an individual or an enterprise. The account identifier of the organization to which the second application user account belongs includes basic information such as the ID and name of the organization to which the second application user account belongs. The contact person of the organization to which the second application user account belongs is the contact person for communication between the organization to which the second application user account belongs and the first application user account.
[0082] The association between the account data of the first application user account and the account data of the second application user account refers to binding the account data of the first application user account and the account data of the second application user account. When the association is successful, account association data is generated. The account association data includes the account data of the first application user account and the account data of the second application user account, and the corresponding relationship between the two.
[0083] A slave transaction refers to a transaction in a first application server for associating account data of a first application user account stored in the first application server with account data of a second application user account stored in a second application server, and specifically includes the following functions:
[0084] Function 1: When the association is successful, the second application server receives the account association data sent by the second application server and stores the obtained account association data locally;
[0085] Function 2: when the association is abnormal and the abnormal information indicates that the association has not failed, the second application server polls the account association data from the second application server, and stores the obtained account association data locally when the account association data is polled;
[0086] Function three: When the association is abnormal and the abnormal information indicates that the association fails, the second application server feeds back the account data association failure to the first application.
[0087] When the account association starts, the slave transaction is also used to send an account association instruction to the second application server based on the account data, wherein the account association instruction is used to instruct the first application server to establish a connection with the second application server, and to associate the account data of the first application user account with the account data of the second application user account; the account association instruction includes the account data of the first application user account.
[0088] Specifically, Figure 3 As shown, Figure 3 The present invention is a flowchart of an account association method when the second application server is successfully associated. The first application initiates an account association request to the first application server. After receiving the account association request, the first application server responds to the account association request of the first application and requests the first application transaction center to execute a slave transaction of the account association transaction; the first application transaction center generates a slave transaction in response to the request of the first application server, provides the slave transaction to the first application server, and feeds back a start execution notification to the first application server to instruct the first application server to start executing the slave transaction; the first application server executes the slave transaction after receiving the start execution notification fed back by the first application transaction center, and sends an account association instruction to the second application server, the account association instruction including the account data of the first application user account to instruct the first application server to establish a connection with the second application server, and associates the account data of the first application user account with the account data of the second application user account.
[0089] Step 204, the second application server requests the second application transaction center to execute the main transaction of the account association transaction in response to the account association instruction; executes the main transaction after receiving the start execution notification fed back by the second application transaction center, and the main transaction is used to associate the account data of the first application user account with the account data of the second application user account; notifies the second application transaction center when the association is successful, and sends the account association data to the first application server after receiving the execution completion notification from the second application transaction center.
[0090] The second application server is used to provide application services for the second application and provide access to business logic for the second application. The second application server can convert data into dynamic content according to the request of the second application. For example, to open the second application, the second application server needs to execute the program, find the user's latest login information for the second application from the database, and then convert the login information into an HTML web page to display in front of the customer. The second application transaction center refers to a server used to support transactions. A transaction is a program execution unit, and all operations in it are either successfully executed or failed. The second application transaction center is used to generate a main transaction for the second application server and schedule the main transaction.
[0091] The main transaction refers to a transaction in the second application server used to associate the account data of the first application user account stored in the first application server with the account data of the second application user account stored in the second application server. The main transaction includes a first sub-transaction and multiple second sub-transactions. The first sub-transaction is used to set a unique mapping binding between the account data of the first application user account and the account data of the second application user account. Each second sub-transaction is used to perform different association tasks, including operations such as modifying storage. The main transaction specifically includes the following functions:
[0092] Function 1: Ensure that all subtransactions in the main transaction are either executed or not executed;
[0093] Function 2: Set the main transaction to align the first subtransaction internally, that is, if the first subtransaction is completed, the remaining multiple second subtransactions will be completed; if the first subtransaction is not completed, the remaining multiple second subtransactions do not need to be processed.
[0094] When the account association starts, the main transaction is also used to associate the account data of the first application user account with the account data of the second application user account. The execution sequence of the main transaction starts when the second application server receives the start execution notification fed back by the second application transaction center, and ends when the second application server receives the execution end notification fed back by the second application transaction center.
[0095] "Association success" means that all sub-transactions of the main transaction are successfully executed, specifically, the second application server successfully binds the account data of the first application user account with the account data of the second application user account, obtains the account association data and stores the account association data in the second application server. The account association data includes the account data of the first application user account and the account data of the second application user account, and the association relationship between the two. The account association data of the second application server is stored locally in the second application server.
[0096] Specifically, Figure 3 As shown, after receiving the account association instruction, the second application server requests the second application transaction center to execute the main transaction of the account association transaction in response to the account association instruction; the second application transaction center generates the main transaction in response to the request of the second application server, provides the main transaction to the second application server, and feeds back a start execution notification to the second application server to instruct the second application server to start executing the main transaction; the second application server executes the main transaction after receiving the start execution notification fed back by the second application transaction center, obtains the account data of the first application user account after parsing the account association instruction, and associates the account data of the first application user account with the account data of the second application user account locally stored on the second application server; notifies the second application transaction center when the association is successful, and sends the account association data to the first application server after receiving the execution end notification from the second application transaction center.
[0097] Step 206, after receiving the account association data, the first application server continues to execute the slave transaction, which is used to store the account association data; when the storage is successful, it notifies the first application transaction center, and after receiving the execution end notification feedback from the first application transaction center, it feedbacks to the first application that the account data has been associated.
[0098] Among them, if the account-associated data is only stored in the first application server or the second application server, that is, there is only one copy of the account-associated data, the following problems will exist: Taking the account-associated data as an example, in the scenario where both the first application and the second application have a high frequency of reading the account-associated data, the second application will incur additional time consumption when querying the account-associated data from the first application, and the first application server will also increase more query requests. In addition, the query of the account-associated data in the second application needs to be queried in the first application server. This process depends on the stability of the first application server. If the first application server is down, the query request of the second application will also be abnormal; since the first application and the second application are in different systems, the service stability of the second application is not under the control of the second application server. Therefore, in order to solve the above problems, the embodiment of the present application stores one copy of the account-associated data in both the first application server and the second application server, that is, there are two copies of the account-associated data, which are stored in the first application server and the second application server respectively.
[0099] The first application server notifies the first application transaction center when the storage is successful in order to instruct the first application transaction center to end the scheduling of the slave transaction. To ensure the consistency of the transaction, after receiving the notification sent by the first application server when the storage is successful, the first application transaction center feeds back the execution end notification to the first application server. At the same time, the slave transaction ends. Only when both the master transaction and the slave transaction are successfully executed, the account data of the first application user account and the account data of the second application user account are considered to be successfully associated. At this time, the account association data stored on the first application server and the second application server are the same, which can ensure data consistency.
[0100] After the account data of the first application user account is successfully associated with the account data of the second application user account, the contacts of the organization to which the second application user account belongs can be displayed in the first application logged in by the first application user account, and the account identification of the first application user account can be displayed on the external information page of all or part of the users of the organization to which the second application user account belongs. Taking the first application as WeChat Video Account and the second application as Enterprise WeChat as an example, the account data of WeChat Video Account includes the video account id, name, avatar and authentication status, wherein the account identification of the first application user account includes the video account id and name; the authentication status is used to identify the type of organization to which the first application user account belongs, for example, the organization to which the first application user account belongs can be an individual or a company. The account data of Enterprise WeChat includes the company id, name, customer service and reception staff, wherein the contacts of the organization to which the second application user account belongs include customer service and reception staff; customer service refers to the contact person set by the Enterprise WeChat organization to connect with the video account user online; reception staff refers to the contact person set by the Enterprise WeChat organization to connect with the video account user through the Enterprise WeChat of a designated person. Figure 4As shown, after the first application user account is associated with the second application user account, a schematic diagram of the associated display page corresponding to the first application user account is shown, referring to Figure 4 The WeChat video account ID can be displayed on the WeChat Enterprise member external information page, and the WeChat customer service external information page in the WeChat video account can also display the WeChat video account ID and name. Figure 5 As shown, after the first application user account is associated with the second application user account, the associated display page corresponding to the second application user account is displayed. Figure 5 You can display the "Add Enterprise WeChat" control in the WeChat Video Account. After triggering the "Add Enterprise WeChat" control, you can display the receptionist's enterprise WeChat, and you can add the receptionist's enterprise WeChat. You can also display the "WeChat Customer Service" control in the WeChat Video Account. After triggering the "WeChat Customer Service" control, you can display a platform for online communication with members of Enterprise WeChat.
[0101] Specifically, Figure 3 As shown, after receiving the account association data, the first application server stores the account association data locally on the first application server; when the storage is successful, the first application transaction center is notified, and the first application transaction center is instructed to end the scheduling of the slave transaction; the first application transaction center ends the scheduling of the slave transaction according to the notification, and feeds back the execution end notification to the first application server. After receiving the execution end notification fed back by the first application transaction center, the first application server feeds back to the first application that the account data has been associated.
[0102] In the above-mentioned account data association method, a first application server that provides services for a first application through a first application transaction center provides a slave transaction, and a second application server that provides services for a second application through a second application center provides a master transaction, wherein the master transaction is used to associate the account data of the first application user account with the account data of the second application user account; when the association is successful, the second application transaction center is notified to instruct the second application transaction center to end the scheduling of the master transaction; after receiving the execution end notification fed back by the second application transaction center, the second application server ends the master transaction on the second application server and sends the account association data to the first application server, and after receiving the account association data, the first application server stores the account association data and notifies the first application transaction center when the storage is successful to instruct the first application transaction center to end the scheduling of the slave transaction; after receiving the execution end notification fed back by the first application transaction center, the first application server ends the slave transaction on the first application server and feeds back to the first application that the account data has been associated. In the above process, the slave transaction will only be executed after the main transaction is executed successfully, and only when both the main transaction and the slave transaction are executed successfully, the account data of the first application user account and the account data of the second application user account will be successfully associated. At this time, the account association data stored on the first application server and the second application server are the same, which can ensure data consistency.
[0103] In one embodiment, before the first application server, in response to the account association request of the first application, requests the first application transaction center to execute a slave transaction of the account association transaction, the method further includes:
[0104] The first application server receives an account association request sent by the first application; the first application account association request is generated based on the account data of the first application user account and the account data of the second application user account extracted from the association code when the first application logged in with the first application user account scans the association code; the association code is generated by the second application logged in with the second application user account.
[0105] In one embodiment, the step of the second application generating an association code includes: in the second application logged in with the second application user account, obtaining the account identifier of the input first application user account; generating an association code based on the account identifier of the input first application user account and the second application user account and the organization identifier to which the second application user account belongs.
[0106] The organization identifier to which the second application user account belongs may refer to information such as the name and code of the organization to which the second application user account belongs.
[0107] The association code is generated by the second application based on the account identifier of the first application user account, the second application user account, and the organization identifier to which the second application user account belongs, after the account identifier of the first application user account is entered in the second application logged in by the second application user account. That is, the association code includes the account identifier of the first application user account, the second application user account, and the organization identifier to which the second application user account belongs. The association code can be a QR code.
[0108] Specifically, to improve security, before associating the accounts, in this embodiment, the account identifier of the first application user account is input into the second application logged in by the second application user account, and the second application generates an association code based on the account identifier of the first application user account input and the second application user account and the organization identifier to which the second application user account belongs; the second application sends the association code to the first application logged in by the first application user account, and the first application scans the association code. After the first application scans the association code, the display information of the first application is as follows: Figure 6 As shown, Figure 6 The identities of the first application user account and the second application user account are displayed, as well as a brief introduction to the functions that the first application can obtain after the accounts are associated. When the user of the first application determines that the identity authentication of the first application user account and the second application user account has passed and the accounts can be associated, the user of the first application triggers Figure 6 In the "binding" control, the first application logged in by the first application user account generates an account association request based on the account data of the first application user account and the account data of the second application user account extracted from the association code.
[0109] In this embodiment, before associating the accounts, an association code is generated in the second application logged in with the second application user account based on the account identifier of the input first application user account and the second application user account and the organization identifier to which the second application user account belongs, and the association code is sent to the first application. The first application scans the association code to verify the identities of the first application user account and the second application user account, and only generates an account association request after the identity authentication is passed. This can avoid information leakage caused by malicious connections and improve security.
[0110] In one embodiment, during the account association process, there are factors that may cause logic failure, thereby generating invalid transaction logic. For example, a service anomaly between the first application server and the second application server causes the transaction logic to fail. To avoid the generation of invalid transaction logic, this embodiment checks the part that may cause logic failure before the transaction logic is executed, before the first application server requests the first application transaction center to execute the sub-transaction of the account association transaction, to avoid invalid transaction logic. Specifically, before the first application server requests the first application transaction center to execute the sub-transaction of the account association transaction, the method also includes:
[0111] In response to the account association request, the first application server sends a pre-check instruction to the second application server, where the pre-check instruction is used to check the connectivity between the first application server and the second application server; when the connectivity verification between the first application server and the second application server is passed, the step of requesting the first application transaction center to execute the account association transaction as a slave transaction is executed.
[0112] Among them, connectivity includes normal network, normal service, normal response logic, etc.
[0113] Specifically, Figure 3 As shown, after receiving the account association request, the first application server sends a pre-check instruction to the second application server in response to the account association request. The pre-check instruction is used to check the connectivity between the first application server and the second application server; after receiving the pre-check instruction, the second application server starts to check the network, service, etc., and feeds back the pre-check result to the first application server; when the pre-check result indicates that the connectivity verification between the first application server and the second application server has passed, the first application server starts to check whether the first application server can be associated, and when the first application server can be associated, it requests the first application transaction center to execute the slave transaction of the account association transaction. When the pre-check result indicates that the connectivity verification between the first application server and the second application server has not passed, or when the first application server cannot be associated, it feeds back to the first application that the account data association failed.
[0114] In this embodiment, before the transaction logic is executed, the part that may cause the logic failure will be checked in advance before the first application server requests the first application transaction center to execute the account-related transaction, so as to avoid unnecessary attempts and reduce the probability of transaction execution.
[0115] In one embodiment, during the execution of the main transaction, the main transaction may fail to execute, resulting in a failure in account association. To improve the execution efficiency of account association, this embodiment further includes the following steps:
[0116] The second application server notifies the second application transaction center when an association exception occurs, and after receiving the transaction status update notification fed back by the second application transaction center, sends the exception information to the first application server; when the first application server receives the exception information and the exception information indicates an association failure, it feeds back the account data association failure to the first application.
[0117] When the second application transaction center receives a notification from the second application server when an associated exception occurs, the second application transaction center switches the status of the main transaction from executing to execution failure, and after updating the status of the main transaction, feeds back a transaction status update notification to the second application server.
[0118] The exception information is used to indicate the type of association exception of the second application server, including association failure and association not yet failed. Among them, association not yet failed indicates that the association exception is a network, service or response problem, and the association exception can be eliminated by waiting or re-execution. Association failure refers to a clear logic failure. When the association fails, the entire account association process does not need to be executed again; the scenarios of clear logic failure include: one of the two applications associated with the account involves illegal content; the two applications associated with the account have a whitelist or blacklist set, that is, only applications in the list or applications outside the list can associate the account, but the two applications associated with the account do not belong to the above two situations; the first application server sets the number of account associations. During the pre-check, the number of associations of the second application associated with the first application has not reached the upper limit, but in the process of account association, it is preempted by other applications, resulting in the number of associations of the first application reaching the upper limit, and the second application cannot associate the account.
[0119] Specifically, Figure 7 As shown, it is a flow chart of the account association method when the second application server is associated with an abnormality. When the second application server executes the main transaction, the sub-transaction X fails, resulting in an abnormal association of the second application server. The second application server records the progress of the main transaction, that is, records the sub-transaction that failed to execute in the main transaction. At the same time, the second application server notifies the second application transaction center. When the second application transaction center receives the notification of the second application server when the association is abnormal, the second application transaction center switches the status of the main transaction from being executed to failed execution. After updating the status of the main transaction, the transaction status update notification is fed back to the second application server; after receiving the transaction status update notification fed back by the second application transaction center, the second application server sends the abnormal information to the first application server; when the first application server receives the abnormal information and the abnormal information indicates the association failure, it feeds back the account data association failure to the first application.
[0120] In this embodiment, when an association exception occurs, the second application server uses the exception information to clearly indicate the cause of the association exception. When the exception information clearly indicates an association failure, it directly feeds back the account data association failure to the first application without having to execute the master transaction and the slave transaction again, thereby avoiding unnecessary attempts and improving the execution efficiency of account association.
[0121] In one embodiment, this embodiment also includes the following steps: the first application server continues to execute the slave transaction when it receives exception information and the exception information indicates that the association has not failed, the slave transaction is used to notify the first application transaction center of the exception information, and polls the account association data from the second application server after receiving the transaction status update notification fed back by the first application transaction center, and stores the obtained account association data locally when the account association data is polled.
[0122] When the first application server receives the exception information sent by the second application server and the exception information indicates that the association has not failed, the first application server sends the notification of the association exception to the first application transaction center. The first application transaction center records the exception information and switches the status of the slave transaction from being executed to being executed in a polling manner. After updating the status of the slave transaction, the transaction status update notification is fed back to the first application server. After receiving the transaction status update notification fed back by the first application transaction center, the first application server polls the account association data from the second application server. In the process of the first application server polling the account association data from the second application server, the main transaction is also re-executed.
[0123] Specifically, Figure 7 As shown, when the first application server receives exception information and the exception information indicates that the association has not failed, the first application server notifies the first application transaction center of the exception information, the first application transaction center records the exception information, and switches the status of the slave transaction from execution to polling execution. After updating the status of the slave transaction, the transaction status update notification is fed back to the first application server. After receiving the transaction status update notification fed back by the first application transaction center, the first application server polls the account association data. If the account association data is not obtained after multiple pollings, the account data association failure is fed back to the first application; if the account association data is obtained after multiple pollings, the obtained account association data is stored locally.
[0124] In this embodiment, when an association exception occurs, the second application server uses the exception information to clearly indicate the cause of the association exception. When the exception information indicates that the association has not failed, the first application server polls the account association data from the second application server. If the account association data is not obtained after multiple pollings, the account data association failure is fed back to the first application, thereby avoiding unnecessary attempts and improving the execution efficiency of account association.
[0125] In one embodiment, if the second application server adopts the method of directly feeding back the execution result of the main transaction to the first application server, the following problems will occur: According to the characteristics of the transaction mechanism, when the first application transaction center receives the transaction status update notification fed back by the first application server, or the first application transaction center does not receive the transaction status update notification or execution end notification fed back by the first application server for more than a preset time, the first application transaction center will actively query the first application server for the association result. At this time, the first application server needs to query the association result from the second application server. If the second application server has successfully associated and sent the account association data to the first application server before the second application server feeds back the association result, the first application server executes the slave transaction; after the first application server receives the account association data, the second application server responds to the query request of the first application server and feeds back the account association data to the first application server. At this time, the first application server needs to execute the slave transaction again, resulting in multiple executions of the slave transaction, which reduces the efficiency of account association. Therefore, in order to solve the above problems, the first application server in this embodiment obtains the account association data by polling. The first application server polls the account association data from the second application server, and stores the obtained account association data locally when the account association data is polled, which specifically includes:
[0126] In response to the query request of the slave transaction of the first application transaction center, the second application server is polled for the execution result of the master transaction; when the polled execution result indicates that the master transaction is successfully executed, the first application server obtains the account-related data from the second application server and stores the account-related data locally.
[0127] The query request from the transaction is used to query the association result between the account data of the first application user account and the account data of the second application user account in the second application server. The execution result of the main transaction includes the successful execution of the main transaction and the failure of the main transaction; if the execution result of the main transaction is the failure of the main transaction, the first application server will feedback the information of the failure of the main transaction to the first application transaction center, and feedback the failure of the account data association to the first application; if the execution result of the main transaction is the successful execution of the main transaction, the first application server obtains the account association data from the second application server and stores the account association data locally.
[0128] Specifically, Figure 7As shown, the first application server receives a slave transaction query request sent by the first application transaction center, and in response to the slave transaction query request, polls the second application server for the execution result of the main transaction; when the polled execution result indicates that the main transaction is successfully executed, the first application server obtains the account-related data from the second application server and stores the account-related data locally; when the polled execution result indicates that the main transaction fails to execute, the first application server feeds back the information of the failure of the main transaction execution to the first application transaction center, and feeds back the account data association failure to the first application.
[0129] In this embodiment, compared with the method in which the second application server directly feeds back the execution result of the main transaction to the first application server, by having the first application server poll the second application server for the execution result of the main transaction, it is possible to avoid the problem of repeated execution of the slave transaction in the first application server, thereby reducing the efficiency of account association, avoiding the execution of invalid transactions, and improving the efficiency of account association.
[0130] In one embodiment, after the second application server sends the exception information to the first application server, the method further includes:
[0131] The second application server responds to the main transaction query request initiated by the second application transaction center, feeds back to the second application transaction center that the main transaction has not been completed, and receives an execution main transaction instruction sent by the second application transaction center; the second application server responds to the execution main transaction instruction and re-executes the main transaction.
[0132] The main transaction query request is used to query whether the main transaction has been completed. When the second application server is associated with an exception, the second application server responds to the main transaction query request and feeds back to the second application transaction center that the main transaction has not been completed.
[0133] Specifically, Figure 7 As shown, after the second application server sends the exception information to the first application server, the second application transaction center initiates a main transaction query request to the second application server. The second application server responds to the main transaction query request initiated by the second application transaction center and feeds back to the second application transaction center that the main transaction has not been completed. When the second application transaction center receives the result that the main transaction has not been completed, it schedules the main transaction to be executed again and sends an execute main transaction instruction to the second application server. The second application server responds to the execute main transaction instruction and re-executes the main transaction.
[0134] In this embodiment, when the first application server receives the exception information and the exception information indicates that the association has not failed, the main transaction is re-executed to improve the success rate of the main transaction and the execution efficiency of the account association.
[0135] In one embodiment, the main transaction includes a first subtransaction and multiple second subtransactions. The first subtransaction is used to set a unique mapping binding between the account data of the first application user account and the account data of the second application user account. Each second subtransaction is used to perform a different associated task, specifically including operations such as modifying storage. In this embodiment, re-executing the main transaction includes:
[0136] When the second application server finds that the first subtransaction has been successfully executed, it executes each second subtransaction in sequence; when the second application server finds that the first subtransaction has not been successfully executed, it sends a main transaction execution end notification to the second application transaction center; the main transaction execution end notification is used to instruct the second application transaction center to end the main transaction.
[0137] Among them, this embodiment sets the subtransactions within the main transaction to align with the first subtransaction, that is, if the first subtransaction is executed, the remaining multiple second subtransactions will be executed; if the first subtransaction is not executed, the remaining multiple second subtransactions do not need to be processed. Therefore, the key condition for judging whether the main transaction needs to be executed is that the first subtransaction of the main transaction has been successfully executed during the previous execution of the main transaction. If the first subtransaction of the main transaction has not been successfully executed during the previous execution of the main transaction, the remaining second subtransactions do not need to be processed.
[0138] Specifically, Figure 7 As shown, when the first application server receives exception information and the exception information indicates that the association has not failed, the second application server queries the local record. When the second application server finds that the first subtransaction has been successfully executed, it executes each second subtransaction in sequence; when the second application server finds that the first subtransaction has not been successfully executed, it sends a main transaction execution end notification to the second application transaction center; after receiving the main transaction execution end notification, the second application transaction center ends the main transaction.
[0139] In this embodiment, the first subtransaction is used to set a unique mapping binding between the account data of the first application user account and the account data of the second application user account, and align the subtransactions within the main transaction with the first subtransaction, that is, if the first subtransaction is executed, the remaining multiple second subtransactions will all be executed; if the first subtransaction is not executed, the remaining multiple second subtransactions do not need to be processed. The most important step in the account association process is set in the first subtransaction, and whether the remaining second subtransactions are executed is determined based on the execution status of the first subtransaction, which can improve the execution efficiency of the main transaction and the execution efficiency of account association.
[0140] In one embodiment, in order to further improve the execution efficiency of the main transaction, in this embodiment, the second application server sequentially executes each second sub-transaction, including:
[0141] The second application server queries the execution progress of the local main transaction, determines the second sub-transaction that has not been executed according to the execution progress, and then re-executes the second sub-transaction that has not been executed.
[0142] The execution progress of the main transaction includes the execution status of each sub-transaction in the main transaction. For example, the second sub-transaction 1 is successfully executed at time t1, and the second sub-transaction 2 fails to execute at time t2, and the second sub-transactions after the second sub-transaction 2 do not need to be processed. When one of the second sub-transactions fails to execute, the remaining second sub-transactions do not need to be processed.
[0143] In this embodiment, according to the transaction mechanism, a transaction has only two results: successful execution and failed execution. A transaction that has been successfully executed is called a committed transaction. A committed transaction cannot be rolled back. The programmer must manually execute a compensating transaction to undo the impact of the committed transaction on the database. In this embodiment, when re-executing the main transaction, the committed transaction is not rolled back, that is, the committed transaction is retained. That is, when the main transaction is executed again, the second sub-transaction that has been successfully executed in the previous main transaction can be directly skipped, and the second sub-transaction that has not been successfully executed can be directly executed.
[0144] Specifically, the second application server queries the execution progress of the local main transaction, determines the second sub-transactions that have not been successfully executed in the second application server according to the execution progress, and re-executes the unexecuted second sub-transactions according to the processing order of the unexecuted second sub-transactions.
[0145] In this embodiment, when executing the main transaction again, the second sub-transaction that has been successfully executed in the previous main transaction can be directly skipped, and the second sub-transaction that has not been successfully executed can be directly executed, which can shorten the execution time of the main transaction and further improve the execution efficiency of the main transaction.
[0146] In one embodiment, since the account data of the first application user account and the account data of the second application user account may change, in order to ensure that the account association data stored by the first application server and the second application server are the latest account association data, this embodiment actively notifies the other party when the account data of the first application user account and / or the account data of the second application user account are updated. Specifically, after the first application server feeds back to the first application that the account data has been associated, the method further includes:
[0147] When the account data of the first application user account changes, the first application server updates the locally stored account-related data and sends the updated account-related data to the second application server to instruct the second application server to update the locally stored account-related data;
[0148] When the account data of the second application user account changes, the second application server updates the locally stored account-related data and sends the updated account-related data to the first application server to instruct the first application server to update the locally stored account-related data.
[0149] The account data change of the first application user account specifically includes the account identifier of the first application user account and / or the icon of the first application user account. The account data change of the second application user account specifically includes the account identifier of the organization to which the second application user account belongs and / or the contact person of the organization to which the second application user account belongs. For example, if the first application is WeChat Video Account and the second application is WeChat for Enterprise, Figure 8 As shown, Figure 8 For a diagram of updating associated data, refer to Figure 8 , the account data corresponding to the WeChat video account includes the video account id, name, avatar, and authentication status, etc. The account data changes of the WeChat video account specifically include: at least one of the video account id, name, avatar, authentication status, and the usage status of the WeChat video account has changed. The account data of enterprise WeChat includes the enterprise id, name, customer service, and reception staff, etc. The account data changes of enterprise WeChat specifically include: at least one of the enterprise id, name, customer service, and reception staff has changed. When the account data corresponding to the WeChat video account changes, the enterprise WeChat is notified through an asynchronous task to update the account-related data stored on the enterprise WeChat side; when the account data corresponding to the enterprise WeChat changes, the WeChat video account is notified through an asynchronous task to update the account-related data stored on the WeChat video account.
[0150] The first application server updates the locally stored account-associated data specifically including: the first application server obtains the changed account data of the first application and the locally stored account-associated data, wherein the account-associated data includes the account data of the first application user account and the account data of the second application user account, and the association relationship between the two, and according to the association relationship, replaces the account data of the first application user account in the original account-associated data with the changed account data to obtain updated account-associated data, and replaces the original account-associated data stored locally by the first application server with the updated account-associated data. The second application server updates the locally stored account-associated data specifically including: after receiving the updated account-associated data sent by the first application, the second application server replaces the account-associated data stored by the second application server with the updated account-associated data, and completes the step of the second application server updating the locally stored account-associated data.
[0151] The second application server updates the locally stored account-associated data specifically including: the second application server obtains the changed account data of the second application and the locally stored account-associated data, wherein the account-associated data includes the account data of the first application user account and the account data of the second application user account, and the association relationship between the two, and according to the association relationship, the changed account data is used to replace the account data of the second application user account in the original account-associated data to obtain updated account-associated data, and the updated account-associated data is used to replace the original account-associated data stored locally by the second application server. The first application server updates the locally stored account-associated data specifically including: after the first application server receives the updated account-associated data sent by the second application, the updated account-associated data is used to replace the account-associated data stored by the first application server, thereby completing the step of the first application server updating the locally stored account-associated data.
[0152] Specifically, when the account data of the first application user account changes, the first application server obtains the changed account data of the first application and the account-related data stored locally, and the first application server replaces the account data of the first application user account in the original account-related data with the changed account data to obtain updated account-related data, and uses the updated account-related data to replace the original account-related data stored locally by the first application server, and sends the updated account-related data to the second application server through an asynchronous task. After the second application server receives the updated account-related data sent by the first application, it uses the updated account-related data to replace the account-related data stored by the second application server;
[0153] When the account data of the second application user account changes, the second application server obtains the changed account data of the second application and the account-associated data stored locally, and the second application server uses the changed account data to replace the account data of the second application user account in the original account-associated data to obtain updated account-associated data, and uses the updated account-associated data to replace the original account-associated data stored locally by the second application server, and sends the updated account-associated data to the first application server through an asynchronous task. After the first application server receives the updated account-associated data sent by the second application, it uses the updated account-associated data to replace the account-associated data stored by the first application server.
[0154] In this embodiment, when the account data of the first application user account and / or the account data of the second application user account changes, the other party is actively notified to update the stored account-related data, the change event is synchronized to the other party in a timely manner, and the change event is ensured not to be lost as much as possible, thereby ensuring real-time synchronization between the first application and the second application.
[0155] In one embodiment, since the first application and the second application are in different systems, it is impossible to guarantee that the change notification event of one party can be delivered to the other party; even if the change event is delivered to one party, there may be an internal abnormality (such as a module hang, etc.), resulting in multiple retries and processing failures leading to loss. Therefore, in order to solve the above problem, in this embodiment, after the first application server feeds back to the first application that the account data has been associated, the method further includes:
[0156] The second application server records the last update time of the account-associated data, and determines the next update time of the account-associated data with the previous update time as the starting point and a preset time interval; at the next update time, the second application server requests the latest account data of the first application user account stored by the first application server; the second application server updates the account-associated data stored on the second application server based on the latest account data.
[0157] After successfully associating the account data of the first application user account with the account data of the second application user account, the second application server stores the account-associated data in the local storage of the second application server and records the storage time of the account-associated data. When the account data of the first application user account and / or the account data of the second application user account change, the second application server updates the account-associated data stored in the local storage and records the update time. In this embodiment, the last update time of the account-associated data recorded by the second application server refers to the latest storage time of the account-associated data in the second application server.
[0158] The preset duration can be 24 hours, wherein the preset duration represents the period of the scheduled update of the second application server. Since the notification time loss is always very rare, the period does not need to be too long. For example, the second application server records the last update time of the account-related data as t1, and the preset duration is 24 hours, then the next update time of the account-related data stored by the second application server is t2, t2 = t1 + 24h; at this time, the second application server checks whether the current time has reached the next update time of the account-related data stored by the second application server. If the next update time of the account-related data stored by the second application server has been reached, then the second application server asynchronously requests the latest account data of the first application user account stored by the first application server at the next update time.
[0159] In this embodiment, the latest account data of the first application user account stored in the first application server can be used to directly replace the original account data of the first application user account in the account association data stored in the local memory of the second application server, thereby updating the account association data stored in the second application server. The account association data stored in the second application server can also be updated by differential update, that is, the latest account data of the first application user account stored in the first application server is compared with the account association data stored in the local memory of the second application server at the last update time, and the differential data between the latest account data of the first application user account and the account data of the first application user account in the account association data stored in the local memory of the second application server at the last update time is determined, and the second application server updates the account association data stored in the second application server according to the differential data.
[0160] Specifically, Fig. 9 As shown, Fig. 9 For a flow chart of the mechanism for periodically checking and updating associated data, refer to Fig. 9 It can be known that the second application server obtains the account-associated data stored locally on the second application server and the latest storage time of the account-associated data, takes the latest storage time of the account-associated data in the second application server as the previous update time of the account-associated data, takes the previous update time as the starting point, and determines the next update time of the account-associated data with a preset time interval; the second application server checks whether the current time has reached the next update time of the account-associated data stored on the second application server, and if it has not reached the next update time of the account-associated data stored on the second application server, the account-associated data stored locally on the second application server is read; if the next update time of the account-associated data stored on the second application server has been reached, the second application server requests the latest account data of the first application user account stored on the first application server through an asynchronous task at the next update time; compares the latest account data of the first application user account stored on the first application server with the account-associated data stored at the previous update time in the local storage of the second application server, determines the difference data between the latest account data of the first application user account and the account data of the first application user account in the account-associated data stored at the previous update time in the local storage of the second application server, and the second application server updates the account-associated data stored on the second application server according to the difference data.
[0161] In this embodiment, the second application server adopts a timed check and update mechanism, and determines the next update time of the account-associated data in the second application server based on the last update time of the account-associated data recorded by the second application server and a preset duration. At the next update time, the second application server requests the latest account data of the first application user account stored in the first application server, and updates the account-associated data stored in the second application server based on the latest account data, to ensure that in the event that the account data change event of the first application user account is lost, the account data of the first application user account is actively obtained by the second application server through the method of regularly checking and updating, to ensure that the account-associated data stored in the second application server can be updated, to avoid the problem of inconsistency between the account data of the first application user account and the account data of the second application user account.
[0162] In one embodiment, this embodiment provides a method for associating account data, which specifically includes the following steps:
[0163] 1. In the second application logged in with the second application user account, obtain the account identifier of the input first application user account; generate an association code based on the account identifier of the input first application user account and the second application user account and the organization identifier to which the second application user account belongs, and feed the association code back to the first application.
[0164] 2. When the first application logged in with the first application user account scans the association code, an account association request is generated based on the account data of the first application user account and the account data of the second application user account extracted from the association code, and the first application feeds back the account association request to the first application server; the account association request is used to request to associate the account data of the first application user account with the account data of the second application user account.
[0165] 3. The first application server receives the account association request sent by the first application, and in response to the account association request, sends a pre-check instruction to the second application server, where the pre-check instruction is used to check connectivity between the first application server and the second application server;
[0166] 4. When the connectivity verification between the first application server and the second application server passes, request the first application transaction center to execute a slave transaction of the account association transaction; after receiving the start execution notification fed back by the first application transaction center, execute the slave transaction, which is used to send an account association instruction to the second application server according to the account data;
[0167] 5. The second application server requests the second application transaction center to execute the main transaction of the account association transaction in response to the account association instruction; after receiving the start execution notification fed back by the second application transaction center, the main transaction is executed, and the main transaction is used to associate the account data of the first application user account with the account data of the second application user account;
[0168] 6. The second application server notifies the second application transaction center when the association is successful, and sends the account association data to the first application server after receiving the execution completion notification fed back by the second application transaction center; the first application server continues to execute the slave transaction after receiving the account association data, and the slave transaction is used to store the account association data; it notifies the first application transaction center when the storage is successful, and after receiving the execution completion notification fed back by the first application transaction center, it feeds back to the first application that the account data has been associated, and executes steps 14-16.
[0169] 7. The second application server notifies the second application transaction center when an association exception occurs, and after receiving a transaction status update notification fed back by the second application transaction center, sends the exception information to the first application server;
[0170] 8. When the first application server receives the exception information and the exception information indicates that the association fails, it feeds back the account data association failure to the first application, and the process ends.
[0171] 9. When the first application server receives the exception information and the exception information indicates that the association has not failed, the slave transaction continues to execute the slave transaction. The slave transaction is used to notify the first application transaction center of the exception information, and after receiving the transaction status update notification fed back by the first application transaction center, responds to the slave transaction query request of the first application transaction center, polls the second application server for the execution result of the master transaction, and executes step 10.
[0172] 10. The second application server responds to the main transaction query request initiated by the second application transaction center, feeds back to the second application transaction center that the main transaction has not been completed, and receives an execution instruction of the main transaction sent by the second application transaction center; the main transaction includes a first sub-transaction and multiple second sub-transactions;
[0173] 11. In response to the instruction to execute the main transaction, the second application server queries the execution progress of the local main transaction when it finds that the first sub-transaction has been successfully executed, determines the second sub-transaction that has not been executed according to the execution progress, and then re-executes the second sub-transaction that has not been executed.
[0174] 12. When the second application server finds that the first sub-transaction is not successfully executed, it sends a main transaction execution completion notification to the second application transaction center; the main transaction execution completion notification is used to instruct the second application transaction center to terminate the main transaction.
[0175] 13. When the execution result polled by the first application server indicates that the main transaction is successfully executed, the first application server obtains the account association data from the second application server, stores the account association data locally, and feeds back to the first application that the account data has been associated.
[0176] 14. When the account data of the first application user account changes, the first application server updates the locally stored account-related data and sends the updated account-related data to the second application server to instruct the second application server to update the locally stored account-related data.
[0177] 15. When the account data of the second application user account changes, the second application server updates the locally stored account-related data and sends the updated account-related data to the first application server to instruct the first application server to update the locally stored account-related data.
[0178] 16. The second application server records the last update time of the account-associated data, and determines the next update time of the account-associated data with the last update time as the starting point and a preset time interval; the second application server requests the latest account data of the first application user account stored by the first application server at the next update time; the second application server updates the account-associated data stored by the second application server based on the latest account data.
[0179] In this embodiment, the slave transaction will be executed only after the main transaction is executed successfully, and only when both the main transaction and the slave transaction are executed successfully, the account data of the first application user account and the account data of the second application user account are successfully associated. At this time, the account association data stored in the first application server and the second application server are the same, which can ensure data consistency. Before the transaction logic is executed, the part that may cause the logic failure will be checked in advance before the first application server requests the first application transaction center to execute the slave transaction of the account association transaction, so as to avoid unnecessary attempts and reduce the probability of transaction execution.
[0180] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0181] Based on the same inventive concept, the embodiment of the present application also provides an account data association system for implementing the account data association method involved above. The implementation scheme for solving the problem provided by the system is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more account data association system embodiments provided below can refer to the limitations of the account data association method above, and will not be repeated here.
[0182] In one embodiment, Figure 1 As shown, a system for associating account data is provided, including: a first application server 102, a first application transaction center 106, a second application server 108, and a second application transaction center 110, wherein:
[0183] The first application server 102 is used to request the first application transaction center 106 to execute a slave transaction of the account association transaction in response to the account association request of the first application 104; the account association request is used to request to associate the account data of the first application user account with the account data of the second application user account;
[0184] The first application transaction center 106 is used to feed back a start execution notification to the first application server 102;
[0185] The first application server 102 is further configured to execute a slave transaction after receiving a start execution notification fed back by the first application transaction center 106, and the slave transaction is configured to send an account association instruction to the second application server 108 according to the account data;
[0186] The second application server 108 is used to request the second application transaction center 110 to execute the main transaction of the account association transaction in response to the account association instruction;
[0187] The second application transaction center 110 is used to feed back a start execution notification to the second application server 108;
[0188] The second application server 108 is further used to execute the main transaction after receiving the start execution notification fed back by the second application transaction center 110, and the main transaction is used to associate the account data of the first application user account with the account data of the second application user account;
[0189] The second application server 108 is further used to notify the second application transaction center 110 when the association is successful, and send the account association data to the first application server 102 after receiving the execution completion notification from the second application transaction center 110;
[0190] The first application server 102 is also used to continue executing the slave transaction after receiving the account association data, and the slave transaction is used to store the account association data; when the storage is successful, it notifies the first application transaction center 106, and after receiving the execution end notification feedback from the first application transaction center 106, it feedbacks to the first application that the account data has been associated.
[0191] In one embodiment, the first application server 102 is also used to: receive an account association request sent by the first application; the first application account association request is generated based on the account data of the first application user account and the account data of the second application user account extracted from the association code when the first application logged in with the first application user account scans the association code; the association code is generated by the second application logged in with the second application user account.
[0192] In one embodiment, the second application server 108 is also used to: obtain the account identifier of the input first application user account in the second application logged in with the second application user account; generate an association code based on the account identifier of the input first application user account and the second application user account and the organization identifier to which the second application user account belongs.
[0193] In one embodiment, the first application server 102 is also used to: send a pre-check instruction to the second application server 108 in response to the account association request, the pre-check instruction is used to check the connectivity between the first application server 102 and the second application server 108; when the connectivity verification between the first application server 102 and the second application server 108 is passed, execute the step of requesting the first application transaction center 106 to execute the account association transaction.
[0194] In one embodiment, the second application server 108 is further used to: notify the second application transaction center 110 when an association exception occurs, and after receiving a transaction status update notification fed back by the second application transaction center 110, send the exception information to the first application server 102;
[0195] The first application server 102 is further configured to: when receiving abnormal information and the abnormal information indicates an association failure, feedback the account data association failure to the first application.
[0196] In one embodiment, the first application server 102 is also used to: continue executing the slave transaction when exception information is received and the exception information indicates that the association has not failed, the slave transaction is used to notify the first application transaction center 106 of the exception information, and poll the account association data from the second application server 108 after receiving the transaction status update notification fed back by the first application transaction center 106, and store the obtained account association data locally when the account association data is polled.
[0197] In one embodiment, the first application server 102 is further configured to: in response to a slave transaction query request from the first application transaction center 106, poll the second application server 108 for the execution result of the master transaction;
[0198] When the polled execution result indicates that the main transaction is successfully executed, the first application server 102 obtains the account-related data from the second application server 108 and stores the account-related data locally.
[0199] In one embodiment, the second application server 108 is further used to: respond to a main transaction query request initiated by the second application transaction center 110, feedback to the second application transaction center 110 that the main transaction has not been completed, and receive an execute main transaction instruction sent by the second application transaction center 110; the second application server 108 re-executes the main transaction in response to the execute main transaction instruction.
[0200] In one embodiment, the main transaction includes a first subtransaction and multiple second subtransactions, and the second application server 108 is further configured to: when the second application server 108 finds that the first subtransaction has been successfully executed, execute each second subtransaction in sequence;
[0201] When the second application server 108 finds that the first sub-transaction is not successfully executed, the second application server 108 sends a main transaction execution completion notification to the second application transaction center 110; the main transaction execution completion notification is used to instruct the second application transaction center 110 to terminate the main transaction.
[0202] In one embodiment, the second application server 108 is further configured to: the second application server 108 queries the execution progress of the local main transaction, determines the unexecuted second sub-transaction according to the execution progress, and then re-executes the unexecuted second sub-transaction.
[0203] In one embodiment, after the first application server 102 feeds back to the first application that the account data has been associated, the first application server 102 is further used to: when the account data of the first application user account changes, the first application server 102 updates the locally stored account association data, and sends the updated account association data to the second application server 108, to instruct the second application server 108 to update the locally stored account association data.
[0204] In one embodiment, after the first application server 102 feeds back to the first application that the account data has been associated, the second application server 108 is further used to: when the account data of the second application user account changes, the second application server 108 updates the locally stored account association data, and sends the updated account association data to the first application server 102, to instruct the first application server 102 to update the locally stored account association data.
[0205] In one embodiment, after the first application server 102 feeds back to the first application that the account data has been associated, the second application server 108 is further configured to: record the last update time of the account associated data, and determine the next update time of the account associated data with the last update time as the starting point and the preset time as the interval;
[0206] The second application server 108 requests the latest account data of the first application user account stored by the first application server 102 at the next update time;
[0207] The second application server 108 updates the account-related data stored in the second application server 108 based on the latest account data.
[0208] In one embodiment, the account data of the first application user account includes an account identifier of the first application user account and an icon of the first application user account; the account identifier is used to be displayed in the external information page of all or part of the users of the organization to which the second application user account belongs.
[0209] In one embodiment, the account data of the second application user account includes an account identifier of an organization to which the second application user account belongs and a contact person of the organization to which the second application user account belongs; the contact person is used to be displayed on the homepage of the first application user account.
[0210] Each module in the above account data association system can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0211] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.10 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store account association data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for associating account data is implemented.
[0212] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0213] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0214] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0215] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0216] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0217] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0218] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0219] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for associating account data, characterized in that: The method comprises: The first application server, in response to the account association request of the first application, requests the first application transaction center to execute a slave transaction of the account association transaction; the account association request is used to request to associate the account data of the first application user account with the account data of the second application user account; after receiving the start execution notification fed back by the first application transaction center, the slave transaction is executed, and the slave transaction is used to send an account association instruction to the second application server according to the account data; The second application server requests the second application transaction center to execute the main transaction of the account association transaction in response to the account association instruction; executes the main transaction after receiving the start execution notification fed back by the second application transaction center, wherein the main transaction is used to associate the account data of the first application user account with the account data of the second application user account; notifies the second application transaction center when the association is successful, and sends the account association data to the first application server after receiving the execution completion notification fed back by the second application transaction center; After receiving the account association data, the first application server continues to execute the slave transaction, which is used to store the account association data; when the storage is successful, it notifies the first application transaction center, and after receiving the execution end notification fed back by the first application transaction center, it feeds back to the first application that the account data has been associated.
2. The method according to claim 1, characterized in that Before the first application server, in response to the account association request of the first application, requests the first application transaction center to execute a slave transaction of the account association transaction, the method further includes: The first application server receives an account association request sent by the first application; the first application account association request is generated based on the account data of the first application user account and the account data of the second application user account extracted from the association code when the first application logged in with the first application user account scans the association code; the association code is generated by the second application logged in with the second application user account.
3. The method according to claim 2, characterized in that The step of generating an association code by the second application includes: In the second application logged in with the second application user account, the account identifier of the input first application user account is obtained; and an association code is generated based on the account identifier of the input first application user account and the second application user account and the organization identifier to which the second application user account belongs.
4. The method according to claim 1, characterized in that: Before requesting the first application transaction center to execute the slave transaction of the account association transaction, the method further includes: The first application server sends a pre-check instruction to the second application server in response to the account association request, wherein the pre-check instruction is used to check connectivity between the first application server and the second application server; In the case where the connectivity verification between the first application server and the second application server is passed, the step of requesting the first application transaction center to execute the slave transaction of the account association transaction is performed.
5. The method according to claim 1, characterized in that The method further comprises: The second application server notifies the second application transaction center when an association exception occurs, and after receiving a transaction status update notification fed back by the second application transaction center, sends the exception information to the first application server; When the first application server receives the exception information and the exception information indicates that the association fails, it feeds back the account data association failure to the first application.
6. The method according to claim 5, characterized in that The method further comprises: The first application server continues to execute the slave transaction when receiving the exception information and the exception information indicates that the association has not failed. The slave transaction is used to notify the first application transaction center of the exception information, and poll the account association data from the second application server after receiving the transaction status update notification fed back by the first application transaction center, and locally store the obtained account association data when the account association data is polled.
7. The method according to claim 6, characterized in that The step of polling the account-associated data from the second application server and locally storing the obtained account-associated data when the account-associated data is polled includes: In response to the slave transaction query request of the first application transaction center, polling the second application server for the execution result of the master transaction; When the polled execution result indicates that the main transaction is successfully executed, the first application server obtains the account-related data from the second application server and stores the account-related data locally.
8. The method according to claim 5, characterized in that After the second application server sends the abnormal information to the first application server, the method further includes: The second application server responds to the main transaction query request initiated by the second application transaction center, feeds back to the second application transaction center that the main transaction has not been completed, and receives the main transaction execution instruction sent by the second application transaction center; The second application server re-executes the main transaction in response to the execute main transaction instruction.
9. The method according to claim 8, characterized in that The main transaction includes a first subtransaction and a plurality of second subtransactions, and the re-executing the main transaction includes: When the second application server finds that the first sub-transaction has been successfully executed, the second application server executes each of the second sub-transactions in sequence; When the second application server finds that the first sub-transaction is not successfully executed, it sends a main transaction execution completion notification to the second application transaction center; the main transaction execution completion notification is used to instruct the second application transaction center to terminate the main transaction.
10. The method according to claim 9, characterized in that The second application server executes each of the second sub-transactions in sequence, including: The second application server queries the local execution progress of the main transaction, determines the unexecuted second sub-transaction according to the execution progress, and then re-executes the unexecuted second sub-transaction.
11. The method according to claim 1, characterized in that: After the first application server feeds back to the first application that the account data has been associated, the method further includes: The second application server records the last update time of the account-related data, and determines the next update time of the account-related data with the last update time as the starting point and a preset time as the interval; The second application server requests the latest account data of the first application user account stored by the first application server at the next update time; The second application server updates the account-related data stored in the second application server based on the latest account data.
12. A system for associating account data, characterized in that: The system comprises: a first application server, a first application transaction center, a second application server and a second application transaction center; The first application server is used to request the first application transaction center to execute a slave transaction of the account association transaction in response to the account association request of the first application; the account association request is used to request to associate the account data of the first application user account with the account data of the second application user account; The first application transaction center is used to feed back a start execution notification to the first application server; The first application server is further configured to execute the slave transaction after receiving a start execution notification fed back by the first application transaction center, wherein the slave transaction is configured to send an account association instruction to the second application server according to the account data; The second application server is used to request the second application transaction center to execute the main transaction of the account association transaction in response to the account association instruction; The second application transaction center is used to feed back a start execution notification to the second application server; The second application server is further configured to execute the main transaction after receiving the start execution notification fed back by the second application transaction center, wherein the main transaction is used to associate the account data of the first application user account with the account data of the second application user account; The second application server is further configured to notify the second application transaction center when the association is successful, and send the account association data to the first application server after receiving the execution completion notification from the second application transaction center; The first application server is further configured to continue executing the slave transaction after receiving the account association data, and the slave transaction is configured to store the account association data; notify the first application transaction center when storage is successful, and after receiving the execution completion notification fed back by the first application transaction center, feed back to the first application that the account data has been associated.
13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 11 are implemented.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
