Transaction processing method, apparatus, device, medium, and program product
By analyzing the initiator's historical transaction records and thread server resource usage, and using control algorithms to determine the execution strategy for transaction instructions, the problems of low efficiency and transaction interruptions in online banking batch transaction processing are solved, and transaction details are returned faster, improving the user experience.
Patent Information
- Application Number
- CN202411704940.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-11-26
AI Technical Summary
In online banking batch transaction processing, due to the increase in users and transaction volume, the processing efficiency of fixed time periods is low, and an error in one transaction will cause the interruption of all transactions, affecting the user experience.
By determining the initiator's historical transaction records and the resource usage of the thread server, and utilizing the proportional and integral terms of the control algorithm, the execution instructions of the transaction instructions are determined, and the real-time or batch processing mode is selected. The matching processing instruction interface is called to return the transaction details.
While reducing the pressure on the thread server, transaction instructions can be processed as early as possible, which improves the user experience and solves the problems of low transaction processing efficiency and transaction interruption.
Smart Images

Figure CN119599794B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of financial technology, and specifically to a transaction processing method, apparatus, device, medium and program product. Background Art
[0002] With the rapid development of the Internet, more and more individual customers are conducting banking and financial services online. For batch transactions of online banking, transaction applications need to perform background processing at fixed time periods. Each batch can only process a fixed number of transactions at a fixed time period.
[0003] During the implementation of the disclosed embodiments, it was found that due to the increase in users and the increase in transaction volume, the background processing efficiency of batch transactions in a fixed period was low, and an error in one transaction during the background processing would cause all transactions to be interrupted. Summary of the Invention
[0004] In view of the above problems, the present disclosure provides a transaction processing method, apparatus, device, medium and program product.
[0005] According to a first aspect of the present disclosure, a transaction processing method is provided, comprising: upon determining that a transaction instruction submitted by an initiator at a current moment satisfies transaction rules, determining the number of times the initiator has submitted the transaction instruction before the current moment based on historical transaction record information of the initiator; determining an execution instruction for the transaction instruction based on the number of times, resource usage of a thread server at the current moment, and a predetermined instruction processing moment, wherein the thread server is configured to scan the transaction instructions submitted before the predetermined instruction processing moment, integrate the transaction instructions into a first preset format file, and then send the integrated transaction instructions to a processing instruction interface to complete processing of the first preset format file, wherein the execution instruction is configured to indicate whether to process the transaction instruction in real time; and based on the execution instruction, calling a processing instruction interface that matches the execution instruction to complete processing of the transaction instruction and return transaction details.
[0006] According to an embodiment of the present disclosure, an execution instruction for a transaction instruction is determined based on the number of times, the resource usage of the thread server at the current moment, and the scheduled instruction processing time, including: when the number of times is determined to be zero, using the proportional term of the control algorithm, based on the resource usage and the scheduled instruction processing time, determining the execution index value; and determining the execution instruction for the transaction instruction based on the execution index value and the threshold.
[0007] According to an embodiment of the present disclosure, resource usage includes memory usage rate; when the number of times is determined to be zero, the proportional term of the control algorithm is used to determine the execution index value based on the resource usage and the scheduled instruction processing time, including: determining the memory idle rate according to the memory usage rate; determining the memory idle rate as the proportional coefficient of the proportional term; determining the difference between the scheduled instruction processing time and the current time as the proportional error of the proportional term; and obtaining the execution index value according to the product of the proportional coefficient and the proportional error.
[0008] According to an embodiment of the present disclosure, an execution instruction for a transaction instruction is determined based on the number of times, the resource usage of the thread server at the current moment, and the scheduled instruction processing time, including: when it is determined that the number of times is not zero, using the integral term of the control algorithm to determine the execution index value based on the transaction instruction and the scheduled instruction processing time; and determining the execution instruction for the transaction instruction based on the execution index value and the threshold value.
[0009] According to an embodiment of the present disclosure, a transaction instruction is used to indicate an instruction for a batch transaction; when it is determined that the number of times is not zero, the execution index value is determined based on the transaction instruction and the scheduled instruction processing time using the integral term of the control algorithm, including: determining the ratio of the number of batch transactions to the scheduled number of times according to the transaction instruction, and determining the integral coefficient of the integral term; integrating the difference between the scheduled instruction processing time and the current time to obtain the integral error of the integral term; and obtaining the execution index value based on the product of the integral coefficient and the integral error.
[0010] According to an embodiment of the present disclosure, the processing instruction interface includes a real-time processing instruction interface; based on the execution instruction, calling the processing instruction interface that matches the execution instruction so as to complete the processing of the transaction instruction and return the transaction details, including: when it is determined that the execution instruction indicates real-time processing of the transaction instruction, sending the transaction instruction to the preprocessing interface so as to convert the transaction instruction into a second preset format file and then send it to the real-time processing instruction interface, wherein the formats of the first preset format file and the second preset format file are different; and receiving the transaction details returned after the real-time processing instruction interface processes the second preset format file.
[0011] According to an embodiment of the present disclosure, the processing instruction interface includes a batch processing instruction interface; based on the execution instruction, the processing instruction interface matching the execution instruction is called to complete the processing of the transaction instruction and return the transaction details, including: when it is determined that the execution instruction indicates batch processing of the transaction instruction, the transaction instruction is sent to the thread server so that the thread server sends the first preset format file to the batch processing instruction interface; and the transaction details returned after the batch processing instruction interface processes the first preset format file.
[0012] A second aspect of the present disclosure provides a transaction processing device, including: a submission count determination module, which is used to determine the number of times the initiator has submitted the transaction instruction before the current moment based on the initiator's historical transaction record information when it is determined that the transaction instruction submitted by the initiator at the current moment meets the transaction rules; an execution instruction determination module, which is used to determine the execution instruction for the transaction instruction based on the number of times, the resource usage of the thread server at the current moment and the scheduled instruction processing moment, wherein the thread server is used to scan the transaction instructions submitted before the scheduled instruction processing moment, and integrate the transaction instructions into a first preset format file and then send it to the processing instruction interface to complete the processing of the first preset format file, and the execution instruction is used to indicate whether to process the transaction instruction in real time; and a calling module, which is used to call the processing instruction interface that matches the execution instruction based on the execution instruction, so as to return the transaction details after completing the processing of the transaction instruction.
[0013] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0014] The fourth aspect of the present disclosure further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the computer program or instructions are executed by a processor.
[0015] The fifth aspect of the present disclosure further provides a computer program product, comprising a computer program or instructions, which implement the steps of the above method when executed by a processor.
[0016] According to the embodiments of the present disclosure, by determining whether transaction rules are met, it is possible to ensure that the transaction submitted by the initiator is a normal transaction. Based on the normal transaction, the determination of whether the transaction instruction is processed in real time is based on the number of transaction instructions submitted by the initiator, the scheduled instruction processing time, and the resource usage of the thread server. This allows the transaction instruction to be processed as soon as possible while minimizing the high pressure on the thread server, returning transaction details to the user, and enhancing the user experience. This at least partially addresses the problem of low backend processing efficiency for batch transactions in fixed time periods due to the increase in users and transaction volume, as well as the problem of a single transaction error during backend processing causing the entire transaction to be interrupted. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0018] Figure 1Schematically illustrates an application scenario diagram of a transaction processing method, apparatus, device, medium, and program product according to an embodiment of the present disclosure;
[0019] Figure 2 The flowchart of the transaction processing method according to the embodiment of the present disclosure is schematically shown;
[0020] Figure 3 A flowchart of determining an execution instruction for a transaction instruction according to an embodiment of the present disclosure is schematically shown;
[0021] Figure 4 The following schematically illustrates a real-time processing diagram of an execution instruction for a transaction instruction according to an embodiment of the present disclosure;
[0022] Figure 5 Schematically illustrates a schematic diagram of batch processing of execution instructions for transaction instructions according to an embodiment of the present disclosure;
[0023] Figure 6 Schematically shows a structural block diagram of a transaction processing device according to an embodiment of the present disclosure; and
[0024] Figure 7 A block diagram of an electronic device suitable for implementing a transaction processing method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0025] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0026] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise," "include," etc. used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0027] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0028] When expressions such as "at least one of A, B, and C, etc." are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0029] The transaction processing method and device disclosed herein can be used in the field of financial technology, and can also be used in any field other than the field of financial technology, such as the field of data processing, etc. The present disclosure does not limit the application field of the transaction processing method and device.
[0030] In the technical solutions disclosed herein, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0031] In scenarios where personal information is used for automated decision-making, the methods, devices, and systems provided by the embodiments of the present disclosure all provide users with corresponding operation portals for them to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered. The expression "automated decision-making" here refers to the activity of automatically analyzing and evaluating an individual's behavioral habits, interests and hobbies, or economic, health, credit status, etc. through computer programs and making decisions. The expression "expert decision-making" here refers to the activity of making decisions by people who specialize in a certain field, have specialized experience, knowledge, and skills, and have reached a certain level of professionalism.
[0032] During the implementation of the disclosed embodiments, it was discovered that online banking transactions involving multiple people require the upload, scanning, and batch processing of transaction instructions. In practice, individual users often have to wait 30 minutes to 9 hours to see transaction details and results. During this waiting period, bank customer service inquiries are numerous, reducing user satisfaction with customer service.
[0033] Furthermore, for online banking batch transactions submitted via upload, online editing, or group submission, a unique identifier, such as an HQQ number, is generated upon submission. This HQQ number can consist of the transaction location, time, initiator's account information, and recipient's account information. Each HQQ number undergoes review. If it fails, a failure result is returned. If it succeeds, each HQQ number is split into six text files, such as HQQX (X is a constant) - 1, HQQX (X is a constant) - 2, HQQX (X is a constant) - 3... HQQX+1 (X is a constant) - 1, HQQX+1 (X is a constant) - 2, HQQX+1 (X is a constant) - 3..., and so on, and distributed across six text files. These text files are then stored in the data fragment file. The thread server processes a directory file containing the data fragment files generated in the first 10 minutes of each fixed-time session. Once the directory file matches the text file, it uploads all files to the staging area. The processing interface then executes the transaction and, upon successful execution, returns transaction details. However, in actual production, force majeure during these backend processes can interrupt batch transactions, causing them to become stuck in an intermediate state, preventing users from receiving transaction details. Furthermore, due to the increasing number of users and transaction volume, the backend processing efficiency of batch transactions during fixed periods is low.
[0034] Based on this, embodiments of the present disclosure provide a transaction processing method, apparatus, device, medium, and program product. The transaction processing method includes: upon determining that a transaction instruction submitted by an initiator at a current moment satisfies transaction rules, determining the number of times the initiator has submitted the transaction instruction before the current moment based on the initiator's historical transaction record information; determining an execution instruction for the transaction instruction based on the number of times, the resource usage of the thread server at the current moment, and the scheduled instruction processing moment, wherein the thread server is used to scan the transaction instructions submitted before the scheduled instruction processing moment, integrate the transaction instructions into a first preset format file, and then send it to a processing instruction interface to complete the processing of the first preset format file, and the execution instruction is used to indicate whether to process the transaction instruction in real time; and based on the execution instruction, calling a processing instruction interface that matches the execution instruction to complete the processing of the transaction instruction and return transaction details.
[0035] Figure 1 The application scenario diagram of the transaction processing method, apparatus, device, medium and program product according to the embodiments of the present disclosure is schematically shown.
[0036] like Figure 1As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links or optical fiber cables.
[0037] A user may use a first terminal device 101, a second terminal device 102, or a third terminal device 103 to interact with a server 105 via a network 104 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, or the third terminal device 103, such as transaction applications, shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (for example only).
[0038] The first terminal device 101 , the second terminal device 102 , and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0039] The server 105 may be a server that provides various services, such as a background management server (for example only) that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process received data such as user requests, and feed back processing results (e.g., web pages, information, or data obtained or generated based on user requests) to the terminal devices.
[0040] It should be noted that the transaction processing method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the transaction processing device provided in the embodiment of the present disclosure can generally be set in the server 105. The transaction processing method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the transaction processing device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.
[0041] It should be understood that Figure 1The number of terminal devices, networks and servers in the figure is only illustrative. According to the implementation needs, there can be any number of terminal devices, networks and servers.
[0042] The following will be based on Figure 1 The described scenario, by Figures 2 to 5 The transaction processing method of the disclosed embodiment is described in detail.
[0043] Figure 2 The flowchart of the transaction processing method according to the embodiment of the disclosure is schematically shown.
[0044] As Figure 2 The transaction processing method of the embodiment includes operation S210~operation S230, which can be executed by the transaction application server.
[0045] In operation S210, in the case where it is determined that the transaction instruction submitted by the initiator at the current time meets the transaction rule, the number of times that the initiator has submitted transaction instructions before the current time is determined according to the historical transaction record information of the initiator.
[0046] In operation S220, based on the number of times, the resource usage of the thread server at the current time, and the predetermined instruction processing time, the execution instruction for the transaction instruction is determined.
[0047] In operation S230, based on the execution instruction, the processing instruction interface matched with the execution instruction is called so as to return the transaction details after completing the processing of the transaction instruction.
[0048] According to the embodiment of the disclosure, the transaction instruction can be used to indicate the instruction for batch transactions. The batch transaction can be understood as the transaction initiated by the same initiator to multiple recipients. The transaction instruction can include a symbol instruction with a unique identifier generated after the initiator interacts.
[0049] The symbol instruction can include the transaction information of the initiator and the receiving information of the multiple recipients. The transaction information of the initiator may, for example, include but is not limited to the transaction account information of the initiator, the transaction value, etc. The receiving information of the multiple recipients may, for example, include but is not limited to the receiving account information of each of the multiple recipients, the receiving value of each of the multiple recipients, etc.
[0050] According to embodiments of the present disclosure, transaction rules can be used to indicate that transaction instructions conform to normal transaction logic. Normal transaction logic may, for example, include the initiator's transaction account information being correct, the multiple recipients' respective receiving account information being correct, the account balance in the initiator's transaction account information or the card balance in the account-bound card being greater than or equal to the transaction value, and the sum of the multiple recipients' respective receiving values being equal to the transaction value. Before obtaining the initiator's transaction account information, historical transaction record information, and the multiple recipients' respective receiving account information, consent or authorization may be obtained from the initiator and the multiple recipients. For example, before operation S210, a request may be issued to the initiator to obtain transaction account information and historical transaction record information, and requests may be issued to the multiple recipients to obtain their respective receiving account information. If the initiator and recipients agree or authorize the acquisition of information, operation S210 is performed.
[0051] After receiving a transaction instruction submitted by the initiator, the transaction instruction can be parsed to obtain the initiator's transaction information and the receipt information of multiple recipients. Based on the initiator's transaction information and the receipt information of multiple recipients, it is determined whether the transaction instruction meets the transaction rules. If it is determined that the transaction instruction conforms to normal transaction logic, the transaction instruction is determined to meet the transaction rules.
[0052] According to an embodiment of the present disclosure, historical transaction record information may include transaction instructions submitted by the initiator prior to the current time. For example, if the initiator has not submitted a transaction instruction prior to the current time, the number of transaction instructions submitted by the initiator is zero. If the initiator has submitted a transaction instruction prior to the current time, the number of transaction instructions submitted by the initiator is determined based on the number of transaction instructions submitted.
[0053] According to an embodiment of the present disclosure, the thread server can be used to scan transaction instructions submitted before the scheduled instruction processing time, and integrate the transaction instructions into a first preset format file and send it to the instruction processing interface to complete the processing of the first preset format file.
[0054] According to an embodiment of the present disclosure, resource usage can be used to characterize thread server pressure conditions.
[0055] According to an embodiment of the present disclosure, the scheduled instruction processing time may be the time at which the thread server centrally processes batches of transaction instructions. For example, the thread server may process a batch of transaction instructions at predetermined intervals. The first preset format file may include a data segment file. This may be accomplished by scanning transaction instructions submitted before the scheduled instruction processing time, generating text documents corresponding to the transaction instructions submitted before the scheduled instruction processing time based on information representing the transaction instructions, and integrating these text documents into the data segment files.
[0056] According to an embodiment of the present disclosure, an execution instruction can be used to indicate whether to process a transaction instruction in real time. For example, if the initiator has submitted a small number of transaction instructions, the thread server's resource usage at the current moment indicates low pressure on the thread server, and the current moment is far from the scheduled instruction processing time, the transaction instruction can be processed in real time. Conversely, even if the initiator has submitted a small number of transaction instructions, but the thread server's resource usage at the current moment indicates high pressure on the thread server, and the current moment is far from the scheduled instruction processing time, the transaction instructions can be processed in batches at the scheduled instruction processing time.
[0057] According to embodiments of the present disclosure, the processing instruction interface can be used to complete transaction operations for execution instructions. For example, for a batch transfer transaction instruction, if the execution instruction indicates real-time processing of the transaction instruction, the transfer operation will be executed after the processing instruction interface receives the execution instruction. Transaction details can be used to display all transaction records after the transaction instruction is submitted to the initiator.
[0058] According to the embodiments of the present disclosure, by determining whether transaction rules are met, it is possible to ensure that the transaction submitted by the initiator is a normal transaction. Based on the normal transaction, the determination of whether the transaction instruction is processed in real time is based on the number of transaction instructions submitted by the initiator, the scheduled instruction processing time, and the resource usage of the thread server. This allows the transaction instruction to be processed as soon as possible while minimizing the high pressure on the thread server, returning transaction details to the user, and enhancing the user experience. This at least partially addresses the problem of low backend processing efficiency for batch transactions in fixed time periods due to the increase in users and transaction volume, as well as the problem of a single transaction error during backend processing causing the entire transaction to be interrupted.
[0059] According to an embodiment of the present disclosure, when it is determined that the transaction instruction submitted by the initiator at the current moment does not meet the transaction rules, a prompt result indicating that the transaction failed may be returned to the initiator.
[0060] Figure 3 The flowchart of determining the execution instruction for the transaction instruction according to the embodiment of the present disclosure is schematically shown.
[0061] In the process of implementing the embodiments of the present disclosure, it was found that for batch transactions, such as transactions in which personal online banking transfers to multiple people, thousands of transactions are executed every day. There are many users and a large transaction volume. The background processing method for processing batch transactions in a fixed time period has low processing efficiency. However, due to the large volume, rashly modifying the background processing method may also cause user dissatisfaction. For example, for old users, if the background processing method for processing batch transactions in a fixed time period is used, there is time to modify the submitted transaction instructions before executing the transfer operation. However, if the background processing method is modified to process batch transactions in real time, the time to modify the submitted transaction instructions after submission is shortened.
[0062] Based on this, Figure 3 As shown, the method for determining an execution instruction for a transaction instruction may include operations S321 to S324.
[0063] In operation S321 , it is determined whether the initiator submits a transaction instruction for the first time.
[0064] According to an embodiment of the present disclosure, if it is determined that the number of times the initiator has submitted a transaction instruction is zero, it is determined that this is the first time the initiator has submitted a transaction instruction, and operation S322 is executed. If it is determined that the number of times the initiator has submitted a transaction instruction is not zero, it is determined that this is not the first time the initiator has submitted a transaction instruction, and operation S323 is executed.
[0065] In operation S322 , an execution index value is determined based on resource usage and a scheduled instruction processing time using a proportional term of a control algorithm.
[0066] In operation S323, an execution index value is determined based on the transaction instruction and the scheduled instruction processing time using the integral term of the control algorithm.
[0067] In operation S324 , an execution instruction for the transaction instruction is determined based on the execution indicator value and the threshold value.
[0068] According to an embodiment of the present disclosure, when it is determined that the initiator submits a transaction instruction for the first time, the proportion of the scheduled instruction processing time can be adjusted according to resource usage with the help of the proportional term of the control algorithm to obtain the execution index value.
[0069] According to the embodiments of the present disclosure, for transaction instructions submitted for the first time, the proportion of scheduled instruction processing time is adjusted according to resource usage, and real-time transaction control is performed as much as possible to ensure that the transaction instructions are processed in real time and the transaction details are returned when the user uses it for the first time and the resource usage allows, thereby enhancing the user experience.
[0070] According to an embodiment of the present disclosure, when it is determined that the initiator is not submitting a transaction instruction for the first time, the integral item of the control algorithm can be used to adjust the integral of the scheduled instruction processing time based on the transaction instruction to determine the execution index value.
[0071] According to an embodiment of the present disclosure, for transaction instructions that are not submitted for the first time, by adjusting the points of the scheduled instruction processing time, the original processing method is retained as much as possible for transaction control, the original processing time is retained, and the user's perception of the new link is reduced. Especially for old users, time can be provided for old users to modify instructions, providing users with a personalized experience.
[0072] According to an embodiment of the present disclosure, the threshold value can be determined according to a large number of historical transaction record information, or can be defined according to expert experience. When it is determined that the execution index value is greater than or equal to the threshold value, it can be determined that the execution instruction indicates real-time processing of the transaction instruction. When it is determined that the execution index value is less than the threshold value, it can be determined that the execution instruction indicates batch processing of the transaction instruction.
[0073] According to an embodiment of the present disclosure, the resource usage can include a memory usage rate. When it is determined that the number of times is zero, the operation of determining the execution index value based on the resource usage and the predetermined instruction processing time can include an operation of determining a memory idle rate according to the memory usage rate, determining the memory idle rate as a proportional coefficient of the proportional term, determining a difference between the predetermined instruction processing time and the current time as a proportional error of the proportional term, and obtaining the execution index value according to a product of the proportional coefficient and the proportional error. Figure 3
[0074] According to an embodiment of the present disclosure, when it is determined that the number of times is zero, the calculation formula of the execution index value can be as shown in the following formula (1):
[0075] (1)
[0076] wherein M represents the execution index value, L represents the memory usage rate, K represents the proportional coefficient of the proportional term, H represents the difference between the predetermined instruction processing time and the current time, and e(H) represents the proportional error of the proportional term. 1-L
[0077] According to an embodiment of the present disclosure, the predetermined instruction processing time can include a time at which the thread server set processes batch transaction instructions closest to the current time.
[0078] For example, the difference H between the predetermined instruction processing time and the current time is 2, and the memory usage rate L, such as the CPU usage rate, is 50%, so that M can be 1. It should be noted that this example is only illustrative of the calculation process of the above formula.
[0079] According to an embodiment of the present disclosure, using the proportional term of the control algorithm to control whether to process the transaction instruction in real time can quantize the execution index based on the memory usage rate and the predetermined instruction processing time, so as to process the transaction instruction as early as possible when the current time is far away from the predetermined instruction processing time, improve the processing rate of the transaction instruction, and enhance the user experience while reducing the high pressure on the server as much as possible.
[0080] According to an embodiment of the present disclosure, the transaction instruction can be used to indicate an instruction for batch transactions. When it is determined that the number of times is not zero, the operation of determining the execution index value based on the resource usage and the predetermined instruction processing time can include an operation of determining a memory usage rate according to the resource usage, determining the memory usage rate as a proportional coefficient of the proportional term, determining a difference between the predetermined instruction processing time and the current time as a proportional error of the proportional term, and obtaining the execution index value according to a product of the proportional coefficient and the proportional error. Figure 3 The operation S323 shown utilizes the integral term of the control algorithm to determine the execution index value based on the transaction instructions and the scheduled instruction processing time, and may include the following operations: determining the number of batch transactions according to the transaction instructions; determining the integral coefficient of the integral term according to the ratio of the number of batch transactions to the scheduled number of times; integrating the difference between the scheduled instruction processing time and the current time to obtain the integral error of the integral term; and obtaining the execution index value according to the product of the integral coefficient and the integral error.
[0081] According to an embodiment of the present disclosure, the number of batch transactions targeted by the transaction instruction may be determined as the quantity of batch transactions.
[0082] According to an embodiment of the present disclosure, the predetermined number of times may be determined based on a large amount of historical transaction record information, or may be customized based on expert experience.
[0083] According to an embodiment of the present disclosure, when the number of determinations is not zero, the calculation formula of the execution index value can be shown as the following formula (2):
[0084] (2)
[0085] Where P represents the number of batch transactions; Q represents the scheduled number of times; represents the integral coefficient of the integral term; Represents the integral error of the integral term.
[0086] According to the embodiments of the present disclosure, the integral item of the control algorithm is used to control whether the transaction instructions are processed in real time. The execution indicators can be quantified based on the number of batch transactions and the predetermined instruction processing time, so that the original processing time can be retained as much as possible for the initiator who submits more transaction instructions, thereby providing a personalized experience.
[0087] Figure 4 The figure schematically shows a real-time processing diagram of execution instructions for trading instructions according to an embodiment of the present disclosure.
[0088] According to an embodiment of the present disclosure, the processing instruction interface may include a real-time processing instruction interface. Figure 2 The operation S230 shown in FIG. 2 is to call the processing instruction interface that matches the execution instruction based on the execution instruction so as to complete the processing of the transaction instruction and return the transaction details, which may include the following steps: Figure 4 Operations S431 to S437 are shown.
[0089] In operation S431, the transaction application server may send a transaction instruction to the pre-processing interface.
[0090] In operation S432, after receiving the transaction instruction, the pre-processing interface converts the transaction instruction into a second preset format file.
[0091] In operation S433, the pre-processing interface sends the second preset format file to the real-time processing instruction interface.
[0092] In operation S434, after receiving the second preset format file, the real-time processing instruction interface processes the second preset format file in real time to generate transaction records for each individual transaction in the batch transaction.
[0093] In operation S435 , the real-time processing instruction interface sends the transaction records of each transaction in the batch transaction to the management detail interface.
[0094] In operation S436, after receiving the transaction records of all batch transactions, the management details interface integrates the transaction records of each individual transaction in the batch transaction into batch transaction details.
[0095] In operation S437 , the management detail interface sends the batch transaction details to the transaction application server so that the batch transaction details are visually displayed to the initiator in the transaction application.
[0096] According to an embodiment of the present disclosure, the first preset format file and the second preset format file have different formats. The second preset format file may be a real-time processing format file for transaction instructions.
[0097] According to the embodiments of the present disclosure, for real-time transaction instructions, the instructions are processed into a real-time processing format file, and the real-time processing instruction interface is called for real-time processing. Because the instructions are processed into a real-time processing format file, they can be accurately sent to the real-time processing instruction interface, processed in real time, and transaction details are returned, saving thread server resources.
[0098] Figure 5 A schematic diagram of batch processing of execution instructions for transaction instructions according to an embodiment of the present disclosure is shown schematically.
[0099] According to an embodiment of the present disclosure, the processing instruction interface may include a batch processing instruction interface. Figure 2 The operation S230 shown in FIG. 2 is to call the processing instruction interface that matches the execution instruction based on the execution instruction so as to complete the processing of the transaction instruction and return the transaction details, which may include the following steps: Figure 5 Operations S531 to S537 are shown.
[0100] In operation S531 , the transaction application server may send a transaction instruction to the thread server.
[0101] At operation S532, the thread server continuously scans the plurality of transaction instructions submitted before the predetermined instruction processing time after receiving the transaction instruction, and integrates the plurality of transaction instructions into a first preset format file.
[0102] At operation S533, the thread server sends the first preset format file to the batch processing instruction interface.
[0103] At operation S534, the batch processing instruction interface receives the first preset format file, and processes the first preset format file line by line to generate a batch transaction record.
[0104] At operation S535, the batch processing instruction interface sends the batch transaction record to the management detail interface.
[0105] At operation S536, the management detail interface receives the batch transaction record and converts it into a batch transaction detail.
[0106] At operation S537, the management detail interface sends the batch transaction detail to the transaction application server, so as to visualize the batch transaction detail in the transaction application.
[0107] According to an embodiment of the present disclosure, for the transaction instruction of batch processing, a thread server is called, and the transaction instruction processed by the thread server is handed over to a batch processing interface, and the transaction detail is processed and returned in time.
[0108] Based on the above transaction processing method, the present disclosure further provides a transaction processing device. The following will be described in detail Figure 6 The device.
[0109] Figure 6 The structure block diagram of the transaction processing device according to an embodiment of the present disclosure is schematically shown.
[0110] As Figure 6 shown, the transaction processing device 600 of the embodiment includes a submission frequency determination module 610, an execution instruction determination module 620, and a calling module 630.
[0111] The submission frequency determination module 610 is configured to, in a case where it is determined that the transaction instruction submitted by the initiator at the current time meets the transaction rule, determine, according to the historical transaction record information of the initiator, the number of times the initiator has submitted the transaction instruction before the current time. In an embodiment, the submission frequency determination module 610 can be configured to perform the operation S210 described above, and details are not repeated here.
[0112] The execution instruction determination module 620 is configured to determine an execution instruction for the transaction instruction based on the number of times, the current resource usage of the thread server, and the scheduled instruction processing time. The thread server is configured to scan transaction instructions submitted before the scheduled instruction processing time, integrate the transaction instructions into a first preset format file, and then send it to the instruction processing interface to complete processing of the first preset format file. The execution instruction indicates whether to process the transaction instruction in real time. In one embodiment, the execution instruction determination module 620 can be configured to perform operation S220 described above, and will not be further described here.
[0113] The calling module 630 is used to call the processing instruction interface that matches the execution instruction based on the execution instruction, so as to return the transaction details after completing the processing of the transaction instruction. In one embodiment, the calling module 630 can be used to perform the operation S230 described above, which will not be repeated here.
[0114] According to an embodiment of the present disclosure, an execution instruction for a transaction instruction is determined based on the number of times, the resource usage of the thread server at the current moment, and the scheduled instruction processing time, including: when the number of times is determined to be zero, using the proportional term of the control algorithm, based on the resource usage and the scheduled instruction processing time, determining the execution index value; and determining the execution instruction for the transaction instruction based on the execution index value and the threshold.
[0115] According to an embodiment of the present disclosure, resource usage includes memory usage rate; when the number of times is determined to be zero, the proportional term of the control algorithm is used to determine the execution index value based on the resource usage and the scheduled instruction processing time, including: determining the memory idle rate according to the memory usage rate; determining the memory idle rate as the proportional coefficient of the proportional term; determining the difference between the scheduled instruction processing time and the current time as the proportional error of the proportional term; and obtaining the execution index value according to the product of the proportional coefficient and the proportional error.
[0116] According to an embodiment of the present disclosure, an execution instruction for a transaction instruction is determined based on the number of times, the resource usage of the thread server at the current moment, and the scheduled instruction processing time, including: when it is determined that the number of times is not zero, using the integral term of the control algorithm to determine the execution index value based on the transaction instruction and the scheduled instruction processing time; and determining the execution instruction for the transaction instruction based on the execution index value and the threshold value.
[0117] According to an embodiment of the present disclosure, a transaction instruction is used to indicate an instruction for a batch transaction; when it is determined that the number of times is not zero, the execution index value is determined based on the transaction instruction and the scheduled instruction processing time using the integral term of the control algorithm, including: determining the ratio of the number of batch transactions to the scheduled number of times according to the transaction instruction, and determining the integral coefficient of the integral term; integrating the difference between the scheduled instruction processing time and the current time to obtain the integral error of the integral term; and obtaining the execution index value based on the product of the integral coefficient and the integral error.
[0118] According to an embodiment of the present disclosure, the processing instruction interface includes a real-time processing instruction interface; based on the execution instruction, calling the processing instruction interface that matches the execution instruction so as to complete the processing of the transaction instruction and return the transaction details, including: when it is determined that the execution instruction indicates real-time processing of the transaction instruction, sending the transaction instruction to the preprocessing interface so as to convert the transaction instruction into a second preset format file and then send it to the real-time processing instruction interface, wherein the formats of the first preset format file and the second preset format file are different; and receiving the transaction details returned after the real-time processing instruction interface processes the second preset format file.
[0119] According to an embodiment of the present disclosure, the processing instruction interface includes a batch processing instruction interface; based on the execution instruction, the processing instruction interface matching the execution instruction is called to complete the processing of the transaction instruction and return the transaction details, including: when it is determined that the execution instruction indicates batch processing of the transaction instruction, the transaction instruction is sent to the thread server so that the thread server sends the first preset format file to the batch processing instruction interface; and the transaction details returned after the batch processing instruction interface processes the first preset format file.
[0120] According to embodiments of the present disclosure, any multiple of the submission count determination module 610, the execution instruction determination module 620, and the call module 630 can be combined into a single module, or any one of these modules can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules can be combined with at least part of the functionality of other modules and implemented in a single module. According to embodiments of the present disclosure, at least one of the submission count determination module 610, the execution instruction determination module 620, and the call module 630 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented in hardware or firmware through any other reasonable means of circuit integration or packaging, or can be implemented in any one of the three implementation methods of software, hardware, and firmware, or any appropriate combination of any of these. Alternatively, at least one of the submission count determination module 610, the execution instruction determination module 620, and the call module 630 can be at least partially implemented as a computer program module that, when executed, can perform the corresponding functionality.
[0121] Figure 7 A block diagram of an electronic device suitable for implementing a transaction processing method according to an embodiment of the present disclosure is schematically shown.
[0122] like Figure 7 As shown, the electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage portion 708 into a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present disclosure.
[0123] Various programs and data required for the operation of the electronic device 700 are stored in the RAM 703. The processor 701, ROM 702, and RAM 703 are connected to each other via a bus 704. The processor 701 performs various operations of the method flow according to the embodiment of the present disclosure by executing the programs in the ROM 702 and / or RAM 703. It should be noted that the programs may also be stored in one or more memories other than the ROM 702 and RAM 703. The processor 701 may also perform various operations of the method flow according to the embodiment of the present disclosure by executing the programs stored in one or more memories.
[0124] According to an embodiment of the present disclosure, electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to bus 704. Electronic device 700 may also include one or more of the following components connected to I / O interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including devices such as a cathode ray tube (CRT), liquid crystal display (LCD), and speakers; a storage section 708 including a hard disk; and a communication section 709 including a network interface card such as a LAN card or modem. Communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to I / O interface 705 as needed. Removable media 711, such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed in drive 710 as needed, so that computer programs read from the removable media can be installed into storage section 708 as needed.
[0125] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when executed, implements the method according to the embodiments of the present disclosure.
[0126] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, and may include, for example, but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 702 and / or RAM 703 described above, and / or one or more memories other than ROM 702 and RAM 703.
[0127] The embodiments of the present disclosure also include a computer program product, which includes a computer program containing program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method provided by the embodiments of the present disclosure.
[0128] The computer program executes the above functions defined in the system / device of the embodiment of the present disclosure when the processor 701 executes the computer program. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0129] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 709, and / or installed from a removable medium 711. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.
[0130] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 709, and / or installed from a removable medium 711. When the computer program is executed by the processor 701, the above-described functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the systems, devices, means, modules, units, etc. described above can be implemented by computer program modules.
[0131] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).
[0132] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0133] Those skilled in the art will appreciate that the features described in the various embodiments of the present disclosure may be combined and / or coupled in various ways, even if such combinations or couplings are not explicitly described in the present disclosure. In particular, the features described in the various embodiments of the present disclosure may be combined and / or coupled in various ways without departing from the spirit and teachings of the present disclosure. All such combinations and / or couplings fall within the scope of the present disclosure.
[0134] The above describes the embodiments of the present disclosure. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be advantageously used in combination. Without departing from the scope of the present disclosure, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A transaction processing method, characterized in that: The method comprises: If it is determined that the transaction instruction submitted by the initiator at the current moment satisfies the transaction rules, determining the number of times the initiator has submitted the transaction instruction before the current moment based on the historical transaction record information of the initiator; Determining an execution instruction for the transaction instruction based on the number of times, resource usage of the thread server at the current moment, and a scheduled instruction processing time, wherein the thread server is configured to scan the transaction instructions submitted before the scheduled instruction processing time, integrate the transaction instructions into a first preset format file, and then send the file to the instruction processing interface to complete processing of the first preset format file, and the execution instruction is configured to indicate whether to process the transaction instruction in real time; and Based on the execution instruction, calling the processing instruction interface that matches the execution instruction, so as to complete the processing of the transaction instruction and return the transaction details; The determining of an execution instruction for the transaction instruction based on the number of times, resource usage of the thread server at the current moment, and a scheduled instruction processing time includes: When it is determined that the number is zero, determining an execution index value based on the resource usage and the scheduled instruction processing time using a proportional term of a control algorithm; and determining the execution instruction for the transaction instruction based on the execution indicator value and the threshold; The resource usage includes memory usage; When it is determined that the number is zero, determining the execution index value based on the resource usage and the scheduled instruction processing time by using a proportional term of a control algorithm includes: Determining a memory idle rate based on the memory usage rate; Determining the memory idle rate as a proportional coefficient of the proportional term; Determine the difference between the scheduled instruction processing time and the current time as the proportional error of the proportional term; and Obtaining the execution index value according to the product of the proportional coefficient and the proportional error; The determining of an execution instruction for the transaction instruction based on the number of times, resource usage of the thread server at the current moment, and a scheduled instruction processing time includes: If it is determined that the number is not zero, using an integral term of a control algorithm, based on the transaction instruction and the scheduled instruction processing time, determining an execution index value; and The execution instruction for the transaction instruction is determined based on the execution indicator value and a threshold value.
2. The method according to claim 1, characterized in that The transaction instruction is used to indicate an instruction for batch transaction; The step of determining an execution index value based on the transaction instruction and the predetermined instruction processing time by utilizing an integral term of a control algorithm when the number of times is not zero includes: Determining the quantity of the batch transaction according to the transaction instruction; determining an integral coefficient of the integral item according to a ratio of the number of batch transactions to a predetermined number of times; Integrating the difference between the predetermined instruction processing time and the current time to obtain an integral error of the integral term; and The execution index value is obtained according to the product of the integral coefficient and the integral error.
3. The method according to claim 1, characterized in that The processing instruction interface includes a real-time processing instruction interface; The calling of the processing instruction interface matching the execution instruction based on the execution instruction so as to complete the processing of the transaction instruction and return the transaction details includes: If it is determined that the execution instruction instructs real-time processing of the transaction instruction, sending the transaction instruction to a pre-processing interface so as to convert the transaction instruction into a second preset format file and then send the converted file to the real-time instruction processing interface, wherein the first preset format file and the second preset format file have different formats; and The transaction details returned after the real-time processing instruction interface processes the second preset format file are received.
4. The method according to any one of claims 1 to 3, characterized in that The processing instruction interface includes a batch processing instruction interface; The calling of the processing instruction interface matching the execution instruction based on the execution instruction so as to complete the processing of the transaction instruction and return the transaction details includes: If it is determined that the execution instruction instructs batch processing of the transaction instructions, sending the transaction instruction to the thread server, so that the thread server sends the first preset format file to the batch processing instruction interface; The transaction details returned after the batch processing instruction interface processes the first preset format file are received.
5. A transaction processing device for executing the method according to any one of claims 1 to 4, characterized in that: The device comprises: a submission count determination module, configured to, upon determining that a transaction instruction submitted by an initiator at a current moment satisfies the transaction rules, determine, based on the historical transaction record information of the initiator, the number of times the initiator has submitted the transaction instruction before the current moment; an execution instruction determination module, configured to determine an execution instruction for the transaction instruction based on the number of times, resource usage of the thread server at the current moment, and a scheduled instruction processing time, wherein the thread server is configured to scan the transaction instructions submitted before the scheduled instruction processing time, integrate the transaction instructions into a first preset format file, and then send the result to the instruction processing interface to complete processing of the first preset format file, and the execution instruction is configured to indicate whether to process the transaction instruction in real time; and The calling module is used to call the processing instruction interface that matches the execution instruction based on the execution instruction, so as to return the transaction details after completing the processing of the transaction instruction.
6. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
8. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Timing transaction task processing method and device, computer equipment and storage medium
CN109584060A
Transaction plan management
US10825307B1