Transaction data processing method and device, computer equipment and storage medium
By generating and managing transaction permission information in a distributed system, the data inconsistency problem of multiple requesting ends when processing the same data is solved, ensuring the consistency and security of transaction data.
Patent Information
- Application Number
- CN202411028835.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-12-06
AI Technical Summary
In a distributed system, when multiple requesting ends perform different processing of the same data, if the information of each requesting end is not synchronized, it will lead to data inconsistency. For example, when user A and user B conduct transactions on the same user, the user's The amount transaction is chaotic.
By obtaining the financial transaction request sent by the requesting end, generating the corresponding current transaction permission information identified by the requesting end, and performing transaction calculations based on the permission information to ensure the data consistency of the transaction object and delete the permission information to avoid interference from other requesting ends.
The data consistency between the requesting end and the transaction object in the distributed system is achieved, transaction security is improved, and transaction chaos is avoided.
Smart Images

Figure CN119090635A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data technology, and in particular to a transaction data processing method, apparatus, computer equipment, storage medium and computer program product. Background Art
[0002] With the development of computer technology, in order to solve the increasingly large data processing tasks, distributed systems have emerged. Distributed clusters composed of multiple computers can respond to more concurrent access requests. For example, banks can process a large number of business access requests through distributed systems, such as transfer requests.
[0003] However, since the service is deployed in a distributed manner in a cluster, the user's request will only fall on one of the machines. When multiple request ends request different processing of the same data at the same time, if the information of each request end is not synchronized, it will cause data inconsistency problems. For example, two users trade with the same user, user A trades user 1's amount a to obtain amount b, and user B trades user 1's amount a to obtain amount c. This will cause confusion in user 1's amount transaction. Summary of the invention
[0004] Based on this, it is necessary to provide a transaction data processing method, apparatus, computer equipment, computer-readable storage medium and computer program product that can maintain data consistency in response to the above technical problems.
[0005] In a first aspect, the present application provides a transaction data processing method. The method comprises:
[0006] Obtaining a financial transaction request sent by a requesting end, the financial transaction request carrying a transaction object identifier, a requesting end identifier, and financial transaction data;
[0007] Acquire existing financial data corresponding to the transaction object identifier, and when there is no transaction authority information for the existing financial data corresponding to the transaction object identifier, generate current transaction authority information corresponding to the requesting end identifier based on the requesting end identifier and the existing financial data corresponding to the transaction object identifier;
[0008] Based on the current transaction authority information, transaction calculation is performed according to the existing financial data corresponding to the financial transaction data and the requesting end identifier to obtain the target financial data corresponding to the requesting end identifier, and transaction calculation is performed according to the existing financial data and the financial transaction data corresponding to the transaction object identifier to obtain the target financial data corresponding to the transaction object identifier;
[0009] When the financial transaction corresponding to the financial transaction request is completed, the current transaction authority information corresponding to the request end identifier is deleted.
[0010] In a second aspect, the present application also provides a transaction data processing device. The device comprises:
[0011] An acquisition module, used to acquire a financial transaction request sent by a requesting end, wherein the financial transaction request carries a transaction object identifier, a requesting end identifier, and financial transaction data;
[0012] The authority generation module is used to obtain the existing financial data corresponding to the transaction object identifier, and when the existing financial data corresponding to the transaction object identifier does not have transaction authority information, generate the current transaction authority information corresponding to the request end identifier based on the request end identifier and the existing financial data corresponding to the transaction object identifier;
[0013] A transaction module, configured to perform transaction calculation according to the existing financial data corresponding to the financial transaction data and the requesting end identifier based on the current transaction authority information, and obtain the target financial data corresponding to the requesting end identifier; and perform transaction calculation according to the existing financial data and the financial transaction data corresponding to the transaction object identifier, and obtain the target financial data corresponding to the transaction object identifier;
[0014] The authority deletion module is used to delete the current transaction authority information corresponding to the request end identifier when the financial transaction corresponding to the financial transaction request is completed.
[0015] 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:
[0016] Obtaining a financial transaction request sent by a requesting end, the financial transaction request carrying a transaction object identifier, a requesting end identifier, and financial transaction data;
[0017] Acquire existing financial data corresponding to the transaction object identifier, and when there is no transaction authority information for the existing financial data corresponding to the transaction object identifier, generate current transaction authority information corresponding to the requesting end identifier based on the requesting end identifier and the existing financial data corresponding to the transaction object identifier;
[0018] Based on the current transaction authority information, transaction calculation is performed according to the existing financial data corresponding to the financial transaction data and the requesting end identifier to obtain the target financial data corresponding to the requesting end identifier, and transaction calculation is performed according to the existing financial data and the financial transaction data corresponding to the transaction object identifier to obtain the target financial data corresponding to the transaction object identifier;
[0019] When the financial transaction corresponding to the financial transaction request is completed, the current transaction authority information corresponding to the request end identifier is deleted.
[0020] 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:
[0021] Obtaining a financial transaction request sent by a requesting end, the financial transaction request carrying a transaction object identifier, a requesting end identifier, and financial transaction data;
[0022] Acquire existing financial data corresponding to the transaction object identifier, and when there is no transaction authority information for the existing financial data corresponding to the transaction object identifier, generate current transaction authority information corresponding to the requesting end identifier based on the requesting end identifier and the existing financial data corresponding to the transaction object identifier;
[0023] Based on the current transaction authority information, transaction calculation is performed according to the existing financial data corresponding to the financial transaction data and the requesting end identifier to obtain the target financial data corresponding to the requesting end identifier, and transaction calculation is performed according to the existing financial data and the financial transaction data corresponding to the transaction object identifier to obtain the target financial data corresponding to the transaction object identifier;
[0024] When the financial transaction corresponding to the financial transaction request is completed, the current transaction authority information corresponding to the request end identifier is deleted.
[0025] 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:
[0026] Obtaining a financial transaction request sent by a requesting end, the financial transaction request carrying a transaction object identifier, a requesting end identifier, and financial transaction data;
[0027] Acquire existing financial data corresponding to the transaction object identifier, and when there is no transaction authority information for the existing financial data corresponding to the transaction object identifier, generate current transaction authority information corresponding to the requesting end identifier based on the requesting end identifier and the existing financial data corresponding to the transaction object identifier;
[0028] Based on the current transaction authority information, transaction calculation is performed according to the existing financial data corresponding to the financial transaction data and the requesting end identifier to obtain the target financial data corresponding to the requesting end identifier, and transaction calculation is performed according to the existing financial data and the financial transaction data corresponding to the transaction object identifier to obtain the target financial data corresponding to the transaction object identifier;
[0029] When the financial transaction corresponding to the financial transaction request is completed, the current transaction authority information corresponding to the request end identifier is deleted.
[0030] The transaction data processing method, device, computer equipment, storage medium and computer program product ensure the transaction authority of the requesting end by obtaining the financial transaction request sent by the requesting end and generating the current transaction authority information corresponding to the requesting end identifier when the existing financial data corresponding to the transaction object identifier does not have the transaction authority information. Then, the financial transaction corresponding to the requesting end is executed according to the current transaction authority information, avoiding the transaction confusion caused by responding to the financial transaction requests of other requesting ends when executing the financial transaction of the requesting end, thereby ensuring the data consistency of the target financial data of the requesting end and the transaction object, and improving the transaction security of the requesting end and the transaction object. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] FIG1 is an application environment diagram of a transaction data processing method in one embodiment;
[0032] FIG2 is a flow chart of a transaction data processing method in one embodiment;
[0033] FIG3 is a flow chart of transaction data processing steps in one embodiment;
[0034] FIG4 is a schematic diagram of various financial transaction requests in one embodiment;
[0035] FIG5 is a block diagram of a transaction data processing device in one embodiment;
[0036] FIG6 is a diagram showing the internal structure of a computer device in one embodiment;
[0037] FIG. 7 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION
[0038] 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.
[0039] The transaction data processing method provided in the embodiment of the present application can be applied to the application environment shown in FIG. 1. Among them, the request end 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server 104 obtains the financial transaction request sent by the request end 102, and the financial transaction request carries the transaction object identifier, the request end identifier and the financial transaction data; the server 104 obtains the existing financial data corresponding to the transaction object identifier, and when the existing financial data corresponding to the transaction object identifier does not have transaction authority information, the current transaction authority information corresponding to the request end identifier is generated based on the request end identifier and the existing financial data corresponding to the transaction object identifier; the server 104 performs transaction calculation according to the financial transaction data and the existing financial data corresponding to the request end identifier based on the current transaction authority information, obtains the target financial data corresponding to the request end identifier, and performs transaction calculation according to the existing financial data corresponding to the transaction object identifier and the financial transaction data, and obtains the target financial data corresponding to the transaction object identifier; when the financial transaction corresponding to the financial transaction request is completed, the server 104 deletes the current transaction authority information corresponding to the request end identifier. The request end 102 may be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, portable wearable devices, etc. The portable wearable devices may be smart watches, smart bracelets, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0040] In one embodiment, as shown in FIG2 , a transaction data processing method is provided, which is described by taking the method applied to the server in FIG1 as an example, and includes the following steps:
[0041] Step 202: Acquire a financial transaction request sent by a requesting end, where the financial transaction request carries a transaction object identifier, a requesting end identifier, and financial transaction data.
[0042] Step 204, obtaining existing financial data corresponding to the transaction object identifier, and when there is no transaction authority information for the existing financial data corresponding to the transaction object identifier, generating current transaction authority information corresponding to the requesting end identifier based on the requesting end identifier and the existing financial data corresponding to the transaction object identifier.
[0043] Among them, the requesting end refers to the terminal that initiates the transaction request. The financial transaction request refers to the request from the requesting end to the transaction object to conduct a financial transaction. Existing financial data refers to the existing financial data corresponding to the requesting end. Financial data refers to tradable data with financial value, such as amount data, etc. Financial transaction data refers to the transaction information of the requesting end changing the existing financial data of the transaction object. Transaction permission information refers to the permission information that the transaction object allows a certain requesting end to conduct financial transactions. The transaction object refers to the object of the requesting end to conduct financial transactions. The current transaction permission refers to the permission information that the transaction object allows the requesting end to conduct financial transactions.
[0044] Specifically, the server receives a financial transaction request sent by the requesting end, and the financial transaction request includes a transaction object identifier, a requesting end identifier, and financial transaction data. The server obtains existing financial data corresponding to the transaction object identifier, performs authority detection on the existing financial data corresponding to the transaction object identifier, and indicates whether the existing financial data corresponding to the transaction object currently exists. The requesting end uses the corresponding authority to perform a financial transaction on the existing data.
[0045] The server detects that there is no transaction authority information for the existing financial data corresponding to the transaction object, and generates current transaction authority information corresponding to the requesting end based on the requesting end identifier and the existing financial data corresponding to the transaction object identifier. The server locks the existing financial data identified by the transaction object based on the current transaction authority information. At this time, the existing financial data identified by the transaction object is in a locked state, indicating that at the current time the server only accepts the requesting end's authority to conduct financial transactions on the existing financial data identified by the transaction object.
[0046] Step 206, based on the current transaction authority information, transaction calculation is performed according to the financial transaction data and the existing financial data corresponding to the requesting end identifier to obtain the target financial data corresponding to the requesting end identifier, and transaction calculation is performed according to the existing financial data and the financial transaction data corresponding to the transaction object identifier to obtain the target financial data corresponding to the transaction object identifier.
[0047] Specifically, the server identifies that the existing financial data corresponding to the transaction object identifier is in a locked state, obtains the existing financial data corresponding to the request end identifier according to the current transaction authority information, and uses the financial transaction data to perform transaction calculations on the existing financial data corresponding to the request end identifier according to the transaction direction to obtain the target financial data corresponding to the request end identifier. Then, the financial transaction data is used to perform transaction calculations on the existing financial data corresponding to the transaction object identifier according to the transaction direction to obtain the target financial data corresponding to the transaction object identifier. The transaction direction is, for example, the transaction outward transfer direction and the transaction inward transfer direction. For example, when the transaction direction of the request end identifier is the transaction outward transfer direction and the transaction direction corresponding to the transaction object identifier is the transaction inward transfer direction, the data value difference between the existing financial data corresponding to the request end identifier and the financial transaction data is calculated to obtain the target financial data corresponding to the request end identifier; and the sum of the data values of the existing financial data and the financial transaction data corresponding to the transaction object identifier is calculated to obtain the target financial data corresponding to the transaction object identifier.
[0048] Step 208: When the financial transaction corresponding to the financial transaction request is completed, the current transaction authority information corresponding to the requesting end identifier is deleted.
[0049] Specifically, when the server detects that the financial transaction corresponding to the financial transaction request is completed, it deletes the current transaction authority information corresponding to the requesting end identifier, and then the server restores the existing financial data corresponding to the transaction object identifier from a locked state to an unlocked state, indicating that the server allows other requesting ends to conduct financial transactions on the existing financial data corresponding to the transaction object identifier.
[0050] In the above transaction data processing method, the transaction authority of the requesting end is guaranteed by obtaining the financial transaction request sent by the requesting end and generating the current transaction authority information corresponding to the requesting end identifier when the existing financial data corresponding to the transaction object identifier does not have the transaction authority information. Then, the financial transaction corresponding to the requesting end is executed according to the current transaction authority information, avoiding the transaction confusion caused by responding to the financial transaction request of other requesting ends when executing the financial transaction of the requesting end, thereby ensuring the data consistency of the target financial data of the requesting end and the transaction object, and improving the transaction security of the requesting end and the transaction object.
[0051] In one embodiment, step 202, obtaining a financial transaction request sent by a requesting end, includes:
[0052] Send a user feature collection instruction to the requesting end, obtain the user feature information corresponding to the target user returned by the requesting end, and perform identity authentication based on the user feature information;
[0053] When the identity authentication is passed, the transaction object identifier, request end identifier and financial transaction data carried in the financial transaction request are obtained.
[0054] Specifically, the server obtains the financial transaction request sent by the requesting end, authenticates the requesting end, sends a user feature collection instruction to the requesting end, and the requesting end collects the user feature information corresponding to the target user in response to the user feature collection instruction. User feature information refers to information that represents the user's physical features, such as facial features, fingerprint features, voice features, etc. The server can send the corresponding user feature collection instruction based on the financial transaction data in the financial transaction request. For example, when the transaction value corresponding to the financial transaction data does not reach the preset transaction value threshold, the facial features of the target user are collected for identity authentication. When the transaction value corresponding to the financial transaction data exceeds the preset transaction value threshold, the facial features and fingerprint features of the target user are collected for identity authentication.
[0055] The server authenticates the user's characteristic information by obtaining the identity of the target user through the requesting end, and obtaining the identity information of the identity corresponding to the target user in the preset user database; the server then matches the user's characteristic information with the identity information of the identity corresponding to the target user, and determines that the target user's identity authentication is successful when the degree of match exceeds a preset matching degree threshold.
[0056] When the identity authentication of the target user is passed, the server obtains the transaction object identifier, the request end identifier and the financial transaction data in the financial transaction request. The server performs permission verification on the existing financial data corresponding to the transaction object identifier. The existing financial data corresponding to the transaction object identifier can specifically be the tradable amount corresponding to the transaction object identifier.
[0057] In this embodiment, by performing identity authentication on user characteristic information, the accuracy of identity authentication of the target user is improved, thereby improving the security of transaction data.
[0058] In one embodiment, as shown in FIG3 , identity authentication based on user feature information includes:
[0059] Step 302, acquiring facial region video data corresponding to the target user based on the user feature information, and identifying a facial action image set in the facial region video data;
[0060] Step 304, matching the facial action image set with the pre-stored facial action image set to obtain a matching degree corresponding to the facial action image set;
[0061] Step 306: When the matching degree exceeds a preset matching degree threshold, it is determined that the target user identity authentication is passed.
[0062] Specifically, the user feature information can be video data collected by the requesting end for the target user, including the target user's facial area video data, and the server identifies each facial action image set in the facial area video data, such as a mouth opening action image set and a blinking action image set. Then the server obtains each pre-stored facial action image set, matches each facial action image set with each pre-stored facial action image set, and obtains the matching degree corresponding to each facial action image set. When the matching degree corresponding to each facial action image set reaches a preset matching degree threshold, it is determined that the identity authentication of the target user has been passed.
[0063] In a specific embodiment, the server may call a pre-trained action recognition model, input the target user's facial region video data into the action recognition model for action recognition, and obtain a set of facial action images in the facial region video data recognized by the server.
[0064] In a specific embodiment, the server obtains the facial region video data corresponding to the target user, splits the facial region video data frame by frame, and obtains facial region images of each frame. Then the server calculates the similarity between each facial region image frame and the facial region image of the next frame, specifically, the first frame facial region image and the second frame facial region image are calculated to obtain the similarity of the second frame facial region image, and then the second frame facial region image and the third frame facial region image are calculated to obtain the similarity of the third frame facial region image, thereby traversing each frame facial region image to obtain the similarity of each frame facial region image. The server selects each frame target facial region image whose similarity exceeds a preset similarity threshold, and uses each frame target facial region image of a continuous number of frames as a facial action image set to obtain each facial action image set. For example, the target facial region images of the 3rd, 4th, and 5th frames are used as a facial action image set.
[0065] In this embodiment, by matching the target user's facial action image set with the pre-stored facial action image set, the accuracy of the target user's identity authentication is improved, thereby improving the security of transaction data.
[0066] In one embodiment, the transaction data processing method further includes:
[0067] When the existing financial data corresponding to the transaction object identifier has transaction authority information corresponding to the historical requester identifier, generating pending transaction authority information corresponding to the requester identifier based on the requester identifier and the existing financial data corresponding to the transaction object identifier;
[0068] The pending transaction authority information is recorded in a preset transaction queue, and the financial transaction requests corresponding to each request end identifier are executed according to the preset transaction queue.
[0069] Specifically, the server detects that the existing financial data corresponding to the transaction object identifier has the transaction authority information corresponding to the historical request end identifier, indicating that the current time is the financial transaction performed by the historical request end identifier on the existing financial data corresponding to the transaction object identifier, and the request end is not currently allowed to perform financial transactions on the existing financial data corresponding to the transaction object identifier. The server generates the pending transaction authority information corresponding to the request end identifier according to the request end identifier and the existing financial data corresponding to the transaction object identifier. The pending transaction authority information refers to the transaction authority information used when the request end performs financial transactions with the transaction object identifier. Then the server records the pending transaction authority information to the preset transaction queue, and the server can record the pending transaction authority information corresponding to the request end to the preset transaction queue according to the request time of the financial transaction request. After the server detects that the financial transaction of the existing financial data corresponding to the transaction object identifier by the historical request end is completed, the transaction authority information corresponding to the historical request end is deleted from the preset transaction queue, and the next pending transaction authority information is obtained according to the preset transaction queue, and the request end corresponding to the transaction authority information is determined, and the transaction authority information is used to perform financial transactions on the existing financial data of the transaction object identifier according to the financial transaction request of the corresponding request end. The server executes the financial transaction requests corresponding to each transaction authority information in the preset transaction queue.
[0070] In this embodiment, each financial transaction request is managed by using a preset transaction queue to avoid confusion of transaction data caused by responding to each financial transaction request at the same time, thereby ensuring consistency of transaction data and improving security of transaction data.
[0071] In one embodiment, the current transaction authority information also includes the transaction validity period; the transaction data processing method further includes:
[0072] When the transaction time corresponding to the financial transaction request exceeds the transaction validity time, the financial transaction request corresponding to the request end identifier is stopped, and the existing financial data corresponding to the request end identifier is restored;
[0073] The current transaction authority information corresponding to the requesting end identifier is deleted, and transaction failure information is generated and sent to the requesting end.
[0074] Specifically, the server calculates the transaction validity time corresponding to the financial transaction request based on the current time and the preset time threshold, and then generates the current transaction authority information corresponding to the request end identifier based on the existing financial data corresponding to the transaction object identifier and the transaction validity time.
[0075] When executing the financial transaction corresponding to the financial transaction request, the server detects that the current transaction time of the financial transaction request exceeds the transaction validity time, determines that the financial transaction corresponding to the financial transaction request has failed, stops executing the financial transaction request of the requesting end, detects whether the existing financial data corresponding to the requesting end identifier and the existing financial data corresponding to the transaction object identifier have been updated, and restores the data if they have been updated. Then the server deletes the current transaction authority information corresponding to the requesting end identifier, generates transaction failure information, and sends the transaction failure information to the requesting end.
[0076] In this embodiment, by detecting that the transaction time of the financial transaction request corresponding to the request end identifier has timed out, the execution of the financial transaction request corresponding to the request end identifier is stopped in time, thereby ensuring the transaction security of the request end and the transaction object.
[0077] In one embodiment, the transaction data processing method further includes:
[0078] When the target financial data corresponding to the request end identifier is abnormal data, the financial transaction request corresponding to the request end identifier is stopped, and the existing financial data corresponding to the request end identifier is restored;
[0079] The current transaction authority information corresponding to the requesting end identifier is deleted, and transaction failure information is generated and sent to the requesting end.
[0080] Specifically, when the server executes the financial transaction corresponding to the financial transaction request, if it detects that the target financial data corresponding to the request end identifier is abnormal data, for example, the target financial data is a data value less than 0, then the target financial data is determined to be abnormal data, indicating that the transaction value of the existing financial data corresponding to the request end identifier is less than the transaction value of the financial transaction data, then the server determines that the financial transaction corresponding to the financial transaction request has failed. The server can also detect that the transaction direction corresponding to the request end identifier is the transaction outward transfer direction, and compare the transaction value of the existing financial data corresponding to the request end identifier with the transaction value of the financial transaction data. When the transaction value of the existing financial data corresponding to the request end identifier is less than the transaction value of the financial transaction data, the server determines that the financial transaction corresponding to the financial transaction request has failed. Then the server stops executing the financial transaction request of the request end, detects whether the existing financial data corresponding to the request end identifier and the existing financial data corresponding to the transaction object identifier are updated, and restores the data if updated. Then the server deletes the current transaction authority information corresponding to the request end identifier, generates transaction failure information, and sends the transaction failure information to the request end.
[0081] In this embodiment, when it is detected that the target financial data corresponding to the requester identifier is abnormal data, the financial transaction request corresponding to the requester identifier is stopped in time, thereby ensuring the transaction security of the requester and the transaction object.
[0082] In a specific embodiment, the transaction data processing method can be applied to a transaction data processing scenario of a money transfer business. The server obtains a transfer request sent by the requesting end to the transaction object, and the transfer request carries the transaction object identifier, the requesting end identifier and the transfer amount. The server obtains the tradable balance corresponding to the transaction object identifier, and when it is detected that the tradable balance corresponding to the transaction object identifier does not have any transfer authority for the transfer request, the server generates the current transfer authority corresponding to the requesting end identifier according to the requesting end identifier and the tradable balance corresponding to the transaction object identifier. When the server identifies that the transfer authority corresponding to the requesting end identifier is a valid authority, the server performs a transaction calculation on the tradable balance corresponding to the requesting end identifier according to the transfer amount to obtain the post-transaction balance corresponding to the requesting end identifier, and performs a transaction calculation on the tradable balance corresponding to the transaction object identifier according to the transfer amount to obtain the post-transaction balance corresponding to the transaction object identifier. For example, if the transfer amount is 50, the tradable balance corresponding to the requesting end identifier is 100, and the tradable balance corresponding to the transaction object identifier is 30, then after the requesting end transfers money to the transaction object, the post-transaction balance corresponding to the requesting end identifier is 50, and the post-transaction balance corresponding to the transaction object identifier is 80. After the server detects that the financial transaction requested by the requesting end identifier is completed, the server deletes the transfer authority of the requesting end identifier.
[0083] In a specific embodiment, as shown in FIG4 , a schematic diagram of each financial transaction request is provided. The server, as a financial transaction platform, can trade financial data. The financial transaction platform receives financial transaction requests for transferring money to a target transaction object sent by at least two requesting ends (such as requesting end 1, ..., requesting end N, where N is a positive integer), and performs authority detection on the tradable amount of the target transaction object. When the tradable amount of the target transaction object does not have any transaction authority information of the requesting end, the financial transaction platform determines the execution order of each financial transaction request according to the sending time of each financial transaction request, generates corresponding transaction authority information according to the requesting end identifier corresponding to the financial transaction request and the tradable amount of the target transaction object, and obtains the transaction authority information corresponding to each financial transaction request. Then, the financial transaction platform records the corresponding transaction authority information to the preset authority queue according to the execution order of each financial transaction request, and the financial transaction platform determines the current transaction authority information according to the preset authority queue, and determines the current requesting end identifier corresponding to the current transaction authority information. The financial transaction platform uses the tradable amount of the current requesting end identifier to trade the tradable amount of the target object according to the current financial transaction request corresponding to the current requesting end identifier.
[0084] In this embodiment, the transfer request sent by the requesting end is obtained, and when the tradable balance corresponding to the transaction object identifier does not have a transfer authority, the current transfer authority corresponding to the requesting end identifier is generated, thereby ensuring the transfer authority of the requesting end. Then, the transfer from the requesting end to the transaction object is executed according to the current transfer authority, avoiding transaction confusion caused by responding to transfer requests from other requesting ends when the requesting end transfers to the transaction object, thereby ensuring the data consistency of the target financial data of the requesting end and the transaction object, and improving the transaction security of the requesting end and the transaction object.
[0085] 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.
[0086] Based on the same inventive concept, the embodiment of the present application also provides a transaction data processing device for implementing the transaction data processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more transaction data processing device embodiments provided below can refer to the limitations of the transaction data processing method above, and will not be repeated here.
[0087] In one embodiment, as shown in FIG. 5 , a transaction data processing device 500 is provided, comprising: an acquisition module 502 , a permission generation module 504 , a transaction module 506 and a permission deletion module 508 , wherein:
[0088] The acquisition module 502 is used to acquire the financial transaction request sent by the requesting end, where the financial transaction request carries the transaction object identifier, the requesting end identifier and the financial transaction data;
[0089] The authority generation module 504 is used to obtain the existing financial data corresponding to the transaction object identifier, and when the existing financial data corresponding to the transaction object identifier does not have transaction authority information, generate the current transaction authority information corresponding to the requesting end identifier based on the requesting end identifier and the existing financial data corresponding to the transaction object identifier;
[0090] The transaction module 506 is used to perform transaction calculation according to the existing financial data corresponding to the requester identifier and the financial transaction data based on the current transaction authority information to obtain the target financial data corresponding to the requester identifier, and perform transaction calculation according to the existing financial data corresponding to the transaction object identifier and the financial transaction data to obtain the target financial data corresponding to the transaction object identifier;
[0091] The authority deletion module 508 is used to delete the current transaction authority information corresponding to the requesting end identifier when the financial transaction corresponding to the financial transaction request is completed.
[0092] In one embodiment, the acquisition module 502 includes:
[0093] The identity recognition unit is used to send a user feature collection instruction to the requesting end, obtain the user feature information corresponding to the target user returned by the requesting end, and perform identity authentication based on the user feature information; when the identity authentication is passed, the transaction object identifier, requesting end identifier and financial transaction data carried by the financial transaction request are obtained.
[0094] In one embodiment, the acquisition module 502 includes:
[0095] The feature matching unit is used to obtain the facial area video data corresponding to the target user based on the user feature information, identify the facial action image set in the facial area video data; match the facial action image set with the pre-stored facial action image set to obtain the matching degree corresponding to the facial action image set; when the matching degree exceeds the preset matching degree threshold, it is determined that the target user identity authentication has passed.
[0096] In one embodiment, the transaction data processing device 500 further includes:
[0097] The permission queue unit is used to generate pending transaction permission information corresponding to the requesting end identifier based on the existing financial data corresponding to the requesting end identifier and the transaction object identifier when there is transaction permission information corresponding to the historical requesting end identifier in the existing financial data corresponding to the transaction object identifier; record the pending transaction permission information into a preset transaction queue, and execute the financial transaction request corresponding to the requesting end identifier according to the preset transaction queue.
[0098] In one embodiment, the transaction data processing device 500 further includes:
[0099] The transaction timeout unit is used to stop the financial transaction request corresponding to the request end identifier and restore the existing financial data corresponding to the request end identifier when the transaction time corresponding to the financial transaction request exceeds the transaction validity time; delete the current transaction authority information corresponding to the request end identifier, generate transaction failure information, and send the transaction failure information to the request end.
[0100] In one embodiment, the transaction data processing device 500 further includes:
[0101] The transaction exception unit is used to stop executing the financial transaction request corresponding to the request end identifier and restore the existing financial data corresponding to the request end identifier when the target financial data corresponding to the request end identifier is abnormal data; delete the current transaction authority information corresponding to the request end identifier, generate transaction failure information, and send the transaction failure information to the request end.
[0102] Each module in the transaction data processing device 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.
[0103] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG6. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. 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 financial transaction data, existing financial data, etc. 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 transaction data processing method is implemented.
[0104] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG7. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input / output interface. 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 and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. 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 in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a transaction data processing method is implemented. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.
[0105] Those skilled in the art will understand that the structures shown in FIGS. 6-7 are merely block diagrams of partial structures related to the scheme of the present application, and do not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device may include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.
[0106] In one embodiment, a computer device is further 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 method embodiments when executing the computer program.
[0107] 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.
[0108] 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.
[0109] 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 regulations.
[0110] 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 this 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.
[0111] 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.
[0112] 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 understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations 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 transaction data processing method, characterized in that: The method comprises: Acquire a financial transaction request sent by a requesting end, wherein the financial transaction request carries a transaction object identifier, a requesting end identifier, and financial transaction data; Acquire existing financial data corresponding to the transaction object identifier, and when there is no transaction authority information for the existing financial data corresponding to the transaction object identifier, generate current transaction authority information corresponding to the requesting end identifier based on the requesting end identifier and the existing financial data corresponding to the transaction object identifier; Based on the current transaction authority information, a transaction calculation is performed according to the financial transaction data and the existing financial data corresponding to the requesting end identifier to obtain the target financial data corresponding to the requesting end identifier, and a transaction calculation is performed according to the existing financial data corresponding to the transaction object identifier and the financial transaction data to obtain the target financial data corresponding to the transaction object identifier; When the financial transaction corresponding to the financial transaction request is completed, the current transaction authority information corresponding to the request end identifier is deleted.
2. The method according to claim 1, characterized in that The obtaining of the financial transaction request sent by the requesting end includes: Sending a user feature collection instruction to the requesting end, obtaining user feature information corresponding to the target user returned by the requesting end, and performing identity authentication based on the user feature information; When the identity authentication is passed, the transaction object identifier, the requesting end identifier and the financial transaction data carried in the financial transaction request are obtained.
3. The method according to claim 2, characterized in that The performing identity authentication based on the user characteristic information includes: Acquiring facial region video data corresponding to the target user based on the user feature information, and identifying a facial action image set in the facial region video data; Based on matching the facial action image set with a pre-stored facial action image set, obtaining a matching degree corresponding to the facial action image set; When the matching degree exceeds a preset matching degree threshold, it is determined that the target user identity authentication is passed.
4. The method according to claim 1, characterized in that: The method further comprises: When the existing financial data corresponding to the transaction object identifier has transaction authority information corresponding to the historical requester identifier, generating the pending transaction authority information corresponding to the requester identifier based on the requester identifier and the existing financial data corresponding to the transaction object identifier; The pending transaction authority information is recorded in the preset transaction queue, and the financial transaction request corresponding to the request end identifier is executed according to the preset transaction queue.
5. The method according to claim 1, characterized in that The current transaction authority information also includes the transaction validity period; the method further includes: When the transaction time corresponding to the financial transaction request exceeds the transaction validity time, stopping the financial transaction request corresponding to the request end identifier, and restoring the existing financial data corresponding to the request end identifier; The current transaction authority information corresponding to the requesting end identifier is deleted, and transaction failure information is generated and sent to the requesting end.
6. The method according to claim 1, characterized in that The method further comprises: When the target financial data corresponding to the request end identifier is abnormal data, stopping the execution of the financial transaction request corresponding to the request end identifier, and restoring the existing financial data corresponding to the request end identifier; The current transaction authority information corresponding to the requesting end identifier is deleted, and transaction failure information is generated and sent to the requesting end.
7. A transaction data processing device, characterized in that: The device comprises: An acquisition module, used to acquire a financial transaction request sent by a requesting end, wherein the financial transaction request carries a transaction object identifier, a requesting end identifier, and financial transaction data; a permission generation module, configured to obtain existing financial data corresponding to the transaction object identifier, and when the existing financial data corresponding to the transaction object identifier does not have transaction permission information, generate current transaction permission information corresponding to the request end identifier based on the request end identifier and the existing financial data corresponding to the transaction object identifier; a transaction module, configured to perform transaction calculation according to the financial transaction data and the existing financial data corresponding to the requesting end identifier based on the current transaction authority information to obtain target financial data corresponding to the requesting end identifier, and perform transaction calculation according to the existing financial data corresponding to the transaction object identifier and the financial transaction data to obtain target financial data corresponding to the transaction object identifier; The authority deletion module is used to delete the current transaction authority information corresponding to the request end identifier when the financial transaction corresponding to the financial transaction request is completed.
8. 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 6 are implemented.
9. 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 6 are implemented.
10. 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 6 are implemented.
