CN113592655A - Transaction processing method and device, electronic equipment and computer readable medium - Google Patents

Transaction processing method and device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN113592655A
CN113592655A CN202110928522.8A CN202110928522A CN113592655A CN 113592655 A CN113592655 A CN 113592655A CN 202110928522 A CN202110928522 A CN 202110928522A CN 113592655 A CN113592655 A CN 113592655A
Authority
CN
China
Prior art keywords
transaction
request
positive
target
orthogonal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110928522.8A
Other languages
Chinese (zh)
Inventor
张宸源
唐成山
丁陈飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202110928522.8A priority Critical patent/CN113592655A/en
Publication of CN113592655A publication Critical patent/CN113592655A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Abstract

The invention discloses a transaction processing method and device, electronic equipment and a computer readable medium, and relates to the technical field of big data. One embodiment of the method comprises: determining that a target to be stored is transacting; under the condition that a first correcting request which is orthogonal and easy to correspond to the target exists, correcting the target positive transaction according to the first correcting request; after completing the offsetting of the target positive transaction, storing the target positive transaction. The embodiment overcomes the defect that the transaction flow is initiated again by relying on external rushing in the prior art, reduces the occurrence of error information reporting and inconsistent final consistency of the transaction flow, and greatly improves the system stability.

Description

Transaction processing method and device, electronic equipment and computer readable medium
Technical Field
The invention relates to the technical field of big data, in particular to a transaction processing method, a transaction processing device, electronic equipment and a computer readable medium.
Background
In a distributed banking system, external reviving is a reviving initiated autonomously by a caller from outside the system, and most often occurs in the case of, for example, a forward error account or an error transaction, an operation requiring the withdrawal of a previously issued orthogonal easiest is intended to roll back the orthogonal easiest to a pre-execution state. When processing the external impulse, if the current transaction is being executed, the system directly returns the external impulse to the error report with the purpose of preferentially ensuring the transaction. This is highly dependent on the re-initiation of the subsequent external impulse, which, if not initiated any more, may result in inconsistent final consistency of the transaction flow record. The existing correcting method depends on the re-initiation of external correcting, if the subsequent initiating is not performed, the transaction is lost, the final consistency of the transaction flow is possibly inconsistent, and unnecessary error reporting is performed in the transaction process, so that the subsequent manual processing and the manual correcting are required, and resources and manpower are wasted.
Disclosure of Invention
In view of this, embodiments of the present invention provide a transaction processing method, an apparatus, an electronic device, and a computer-readable medium, which can solve the problem in the prior art that it depends on external transactions to be initiated again, and the problem that final consistency is inconsistent when the transactions are not initiated, reduce the occurrence of error information reporting and the occurrence of inconsistent final consistency of transaction streams, and greatly improve system stability; the interaction times with the database are reduced, and the interaction with the database for many times is not needed, so that the performance utilization rate of the system is improved; the situations that manual confirmation is needed and manual alignment is initiated are reduced, and the stability of the system is improved.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a transaction processing method including:
determining that a target to be stored is transacting;
under the condition that a first correcting request which is orthogonal and easy to correspond to the target exists, correcting the target positive transaction according to the first correcting request;
after completing the offsetting of the target positive transaction, storing the target positive transaction.
Optionally, determining the target orthogonality to be stored comprises: receiving an orthogonal cover request, the orthogonal cover request including an orthogonal cover to be executed; executing the orthogonal easy to be executed according to the orthogonal easy request; in the event that the orthogonal reward is determined to be successfully executed, the orthogonal reward to be executed is traded as the target to be stored.
Optionally, the method further comprises: initiating a second positive flushing request if it is determined that the orthogonal easy execution fails; according to the second correction request, correcting the positive transaction which fails to be executed; storing the positive transaction after completing the positive processing of the positive transaction whose execution failed.
Optionally, in the process of executing the orthogonal variable to be executed, the method further includes: and receiving the first correcting request and storing the first correcting request.
Optionally, receiving the first request for correcting and storing the first request for correcting includes:
receiving the first positive making request, and storing the first positive making request in a preset positive making record table to generate a first positive making request record;
determining that there is a first positive request corresponding to the target orthogonal hot spot comprises:
inquiring the transaction record table according to the transaction information of the target transaction;
and if a first alignment request record corresponding to the target orthogonal cover exists in the alignment record table, determining that a first alignment request corresponding to the target orthogonal cover exists.
Optionally, receiving the first positive making request, and storing the first positive making request in a preset positive making record table includes: receiving the first positive request; acquiring the transaction state of the target transaction; and if the transaction state of the target forward transaction is in execution, storing the first forward transaction request in a preset forward transaction record table.
Optionally, after saving the first positive making request in the preset positive making record table, the method further includes:
if the target transaction state of the transaction is found to be successful or failed in execution within the preset query times, feeding back the transaction state of successful or failed execution;
and if the transaction state of the target transaction is inquired to be in execution within the preset inquiry times, feeding back execution abnormal information.
Optionally, the method further comprises: in an instance in which it is determined that there is no first hedge request corresponding to the target orthogonal transaction, directly storing the target positive transaction.
Optionally, the first positive request includes at least a transaction serial number and a transaction code.
To achieve the above object, according to another aspect of an embodiment of the present invention, there is provided a transaction processing method including:
the determining module is used for determining that the target to be stored is trading;
the first correcting module is used for correcting the target positive transaction according to a first correcting request under the condition that the first correcting request which is orthogonal and easy to correspond to the target exists;
and the storage module is used for storing the target positive transaction after finishing the correction of the target positive transaction.
Optionally, the determining module is further configured to: receiving an orthogonal cover request, the orthogonal cover request including an orthogonal cover to be executed; executing the orthogonal easy to be executed according to the orthogonal easy request; in the event that the orthogonal reward is determined to be successfully executed, the orthogonal reward to be executed is traded as the target to be stored.
Optionally, the apparatus further comprises a second centering module, configured to: initiating a second positive flushing request if it is determined that the orthogonal easy execution fails; according to the second correction request, correcting the positive transaction which fails to be executed; the storage module is further configured to: storing the positive transaction after completing the positive processing of the positive transaction whose execution failed.
Optionally, the apparatus further comprises: and receiving the first correcting request and storing the first correcting request.
Optionally, the receiving module is further configured to: receiving the first positive making request, and storing the first positive making request in a preset positive making record table to generate a first positive making request record;
the first straightening module is further configured to: inquiring the transaction record table according to the transaction information of the target transaction; and if a first alignment request record corresponding to the target orthogonal cover exists in the alignment record table, determining that a first alignment request corresponding to the target orthogonal cover exists.
Optionally, the receiving module is further configured to: receiving the first positive request; acquiring the transaction state of the target transaction; and if the transaction state of the target forward transaction is in execution, storing the first forward transaction request in a preset forward transaction record table.
Optionally, the apparatus further comprises a feedback module configured to: if the target transaction state of the transaction is found to be successful or failed in execution within the preset query times, feeding back the transaction state of successful or failed execution; and if the transaction state of the target transaction is inquired to be in execution within the preset inquiry times, feeding back execution abnormal information.
Optionally, the storage module is further configured to: in an instance in which it is determined that there is no first hedge request corresponding to the target orthogonal transaction, directly storing the target positive transaction.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided an electronic apparatus including: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the transaction processing method of an embodiment of the present invention.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a computer-readable medium on which a computer program is stored, the program implementing a transaction processing method of an embodiment of the present invention when executed by a processor.
One embodiment of the above invention has the following advantages or benefits: under the condition that a first correction request corresponding to a target positive transaction to be stored exists, correcting the target positive transaction according to the first correction request; after the target positive transaction is corrected, the technical means of the target positive transaction is stored, so that the problems that the target positive transaction is initiated again by relying on external correction and final consistency is inconsistent when the target positive transaction is not initiated in the prior art are solved, error information is reduced, the final consistency of the transaction flow is inconsistent, and the system stability is greatly improved; the interaction times with the database are reduced, the interaction with the database for many times is not needed, and the system performance utilization rate is improved; the situations that manual confirmation is needed and manual alignment is initiated are reduced, and the stability of the system is improved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main flow of a transaction processing method of an embodiment of the invention;
FIG. 2 is a schematic diagram of the main flow of a transaction processing method of an embodiment of the invention;
FIG. 3 is a schematic illustration of a sub-flow of a transaction processing method of an embodiment of the invention;
FIG. 4 is a schematic diagram of the major modules of a transaction processing device of an embodiment of the present invention;
FIG. 5 is a flow diagram of processing a transaction by a transaction processing arrangement of an embodiment of the invention;
FIG. 6 is a flow diagram of processing a transaction by a transaction processing device of an embodiment of the invention;
FIG. 7 is a flow diagram of processing a transaction by a transaction processing device of an embodiment of the invention;
FIG. 8 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 9 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Technical terms related to the embodiments of the present invention are explained below.
Positive transaction: representing a positive transaction logic, is a type of transaction developed to achieve a business effect.
The punching orthogonal is easy: the trading method is a type of trading which is orthogonal and easy to have reverse logic, and the reverse trading logic is developed for removing the business effect achieved by a positive trading exchange.
External breathing is towards positive: which may also be referred to as external hedge, is a hedge transaction initiated externally by the caller.
Consistency: in a distributed environment, consistency refers to the ability of data to remain consistent across multiple copies. After a system performs an update operation in a data consistent state, it should be ensured that the data of the system is still in a consistent state. In a distributed system, a data item is considered to have strong consistency if all users can read its latest value after an update operation for the data item has been successfully performed.
Final consistency: it emphasizes that all data copies in the system eventually reach a consistent state after a period of synchronization. This is a concept that results from strong agreement with respect to real time.
Fig. 1 is a schematic diagram of a main flow of a transaction processing method according to an embodiment of the present invention, as shown in fig. 1, the method includes:
step S101: determining that a target to be stored is transacting;
step S102: determining whether there is a first positive request corresponding to the target orthogonal hot spot;
step S103: under the condition that a first correcting request which is orthogonal and easy to correspond to the target exists, correcting the target positive transaction according to the first correcting request;
step S104: after completing the revival of the target positive transaction, storing the target positive transaction;
step S105: in the event that it is determined that there is no first positive request corresponding to the target orthogonal transaction, directly storing the target positive transaction to be stored.
In step S101, the target positive transaction to be stored refers to a positive transaction that has been executed and has not been stored yet. After the target transaction is completed, the method of the embodiment is executed before the target transaction is recorded in the database.
For step S102, the forward processing may be understood as a rollback operation on the target forward transaction. The first request for flushing is an outbound request for flushing (which may also be referred to as an outbound request). Opposite the outbound rushing request is the inbound rushing request (i.e., the second rushing request below). An outbound flushings request is a flushings initiated autonomously by the caller from outside the system. The internal call is the self-initiated call within the system. The first alignment request may be received in a target orthogonal facile process. When a first correction request is received, the first correction request is recorded first, since the target positive transaction is being executed and an accurate return state of the orthogonal transaction has not yet been obtained. After the orthogonal easy execution is finished and before the database is recorded, whether a first correction request exists in the orthogonal easy execution process is judged, if yes, correction processing is carried out, and the orthogonal easy is recorded in the database after the correction processing is finished. If there is no first positive request, the orthogonal easy is directly recorded in the database.
In an optional embodiment, if the first correcting request is received after the target forward transaction is successfully executed and before the target forward transaction is stored, the target forward transaction is directly corrected according to the first external correcting request, and the orthogonal code is recorded in the database after the correcting process is completed. And if the first correcting request is received after the target positive transaction fails to be executed and before the target positive transaction is stored, ignoring the first correcting request and feeding back information of orthogonal easy execution failure to an initiator initiating the first correcting request.
According to the transaction processing method, under the condition that a first correction request corresponding to a target positive transaction to be stored exists, correction processing is carried out on the target positive transaction according to the first correction request; after the target positive transaction is corrected, the technical means of the target positive transaction is stored, so that the problems that the target positive transaction is initiated again by relying on external correction and final consistency is inconsistent when the target positive transaction is not initiated in the prior art are solved, error information is reduced, the final consistency of the transaction flow is inconsistent, and the system stability is greatly improved; the interaction times with the database are reduced, the interaction with the database for many times is not needed, and the system performance utilization rate is improved; the situations that manual confirmation is needed and manual alignment is initiated are reduced, and the stability of the system is improved.
Fig. 2 is a schematic diagram of a main flow of a transaction processing method according to another embodiment of the present invention, as shown in fig. 2, the method includes:
step S201: receiving an orthogonal cover request, the orthogonal cover request including an orthogonal cover to be executed;
step S202: executing the orthogonal easy to be executed according to the orthogonal easy request;
step S203: determining an execution status of the transaction;
step S204: in the case that the orthogonal exchange is determined to be successfully executed, taking the orthogonal exchange to be executed as the target positive transaction to be stored;
step S205: determining whether there is a first positive request corresponding to the target orthogonal hot spot;
step S206: under the condition that a first correcting request which is orthogonal and easy to correspond to the target exists, correcting the target positive transaction according to the first correcting request;
step S207: after completing the revival of the target positive transaction, storing the target positive transaction;
step S208: in the event that it is determined that there is no first positive request corresponding to the target orthogonal transaction, directly storing the target positive transaction to be stored.
Step S209: initiating a second positive flushing request if it is determined that the orthogonal easy execution fails;
step S210: according to the second correction request, correcting the positive transaction which fails to be executed;
step S211: storing the positive transaction after completing the positive processing of the positive transaction whose execution failed.
For a positive transaction, the execution result includes both execution success and execution failure. In this embodiment, before the executed successful forward transaction is saved, it is determined whether there is a first forward request corresponding to the successful forward transaction in the execution process, and if so, the forward transaction is first processed. The orthogonal transaction is saved after completion of the transaction processing for the positive transaction. For an orthogonal transaction that fails to execute, a second positive request for the positive transaction (i.e., an internal call positive request) is automatically initiated after the orthogonal transaction fails to execute. Then, the positive processing is carried out according to the second positive processing request, and the orthogonal cover is saved after the positive processing of the positive transaction is completed. Therefore, the transaction processing method of the embodiment of the invention solves the problems that the prior art is very dependent on external conflict to initiate again and the final consistency is not consistent when the transaction is not initiated, reduces the occurrence of error information reporting and the final consistency of the transaction flow is not consistent, and greatly improves the system stability; the interaction times with the database are reduced, the interaction with the database for many times is not needed, and the system performance utilization rate is improved; the situations that manual confirmation is needed and manual alignment is initiated are reduced, and the stability of the system is improved.
Fig. 3 is a schematic diagram of a sub-flow of a transaction processing method according to an embodiment of the invention. Fig. 3 depicts the processing of an embodiment of the invention after receiving a first request for positive acknowledgement. As shown in fig. 3, the process includes:
step S301: receiving a first correction request, analyzing the first correction request, and determining an orthogonality tendency to be corrected corresponding to the first correction request;
step S302: acquiring the transaction state of the orthogonal exchange to be corrected;
step S303: if the transaction state of the positive transaction to be flushed is in execution, storing the first flushing request in a preset flushing record table;
step S304: if the transaction state of the positive transaction to be flushed is successful, flushing processing is carried out according to a first flushing request;
step S305: and if the transaction state of the positive transaction to be hedged is execution failure, feeding back transaction failure information to an initiator initiating the first hedge request.
In this embodiment, the first positive request may include the transaction serial number and the transaction code of the positive transaction to be positively charged. Wherein, the transaction code is used for ensuring the orthogonality and the easy security. And if a first correcting request is received, determining the transaction serial number of the orthogonal exchange to be corrected. Determining the transaction state of the orthogonal exchange to be corrected based on the transaction serial number:
and if the transaction state of the positive transaction to be hedged is determined to be in execution, storing the first hedged request in a preset hedged record table. And then, waiting for the completion of the orthogonal ready for forward flushing, if the orthogonal ready for forward flushing is successfully executed, judging whether a corresponding first forward flushing request exists in a preset forward flushing record table, and if so, performing forward flushing on the orthogonal ready for forward flushing. After the transaction processing of the positive transaction to be processed is finished, the transaction information of the orthogonal transaction to be processed is stored in a database;
if the transaction state of the positive transaction to be hedged is determined to be successful, conducting positive processing on the orthogonal transaction to be hedged according to a first positive processing request;
and if the transaction state of the positive transaction to be hedged is determined to be execution failure, feeding back transaction failure information to an initiator initiating the first hedged request.
The following exemplifies the transaction processing method of the above embodiment. Assume that there are currently 3 transactions, positive transaction A, orthogonal transaction B, and orthogonal transaction C.
And if a first correction request corresponding to the orthogonal transaction A is received, acquiring the transaction state of the positive transaction A. And if the transaction state of the positive transaction A is acquired as being executed, storing the first positive request in a preset positive request record table. While the first positive request is saved, positive transaction A continues to execute. After the execution of the positive transaction A is finished, if the execution result of the positive transaction A is that the execution is successful, whether a corresponding first positive request exists in a preset positive request record table or not is judged, and if the first positive request exists, positive processing is carried out on the positive transaction A. After completion of the correction process for transaction a, the transaction information for orthogonal transaction a is saved in the database.
And if a first correction request corresponding to the orthogonal transaction B is received, acquiring the transaction state of the positive transaction B. And if the acquired transaction state of the positive transaction B is successful, performing positive processing on the positive transaction B according to the first positive processing request.
And if a first correction request corresponding to the orthogonal transaction C is received, acquiring the transaction state of the positive transaction C. And if the transaction state of the positive transaction C is acquired as execution failure, feeding back transaction failure information to an initiator initiating the first positive making request.
According to the transaction processing method provided by the embodiment of the invention, the first correction request received in the orthogonal easy execution process is recorded, after the orthogonal easy execution is successful and before the orthogonal easy execution is stored, whether the corresponding first correction request exists is judged, and if the corresponding first correction request exists, the correction processing is carried out on the positive transaction. After the transaction is corrected, the orthogonal transaction information is stored in the database, so that the problems that the transaction depends on external correction for re-initiation and final consistency is inconsistent when the transaction is not initiated in the prior art are solved, the occurrence of wrong information report and inconsistent final consistency of transaction flow is reduced, and the system stability is greatly improved; the interaction times with the database are reduced, the interaction with the database for many times is not needed, and the system performance utilization rate is improved; the situations that manual confirmation is needed and manual alignment is initiated are reduced, and the stability of the system is improved.
In an optional embodiment, after determining that the transaction state of the transaction is in execution, the method may further query the transaction state of the orthogonal exchange in a cycle, and if the transaction state of the target transaction is queried to be successful in execution or failed in execution within a preset number of query times, feed back the transaction state of the successful in execution or the failed in execution; and if the transaction state of the target transaction is inquired to be in execution within the preset inquiry times, feeding back execution abnormal information.
Fig. 4 is a schematic diagram of main modules of a transaction processing device 400 according to an embodiment of the present invention, and as shown in fig. 4, the transaction processing device 400 includes:
a determining module 401, configured to determine that a target to be stored is transacting;
a first correcting module 402, configured to, when it is determined that a first correcting request orthogonal to the target exists, correct the target positive transaction according to the first correcting request;
a storage module 403, configured to store the target positive transaction after completing the correction of the target positive transaction.
Optionally, the determining module is further configured to: receiving an orthogonal cover request, the orthogonal cover request including an orthogonal cover to be executed; executing the orthogonal easy to be executed according to the orthogonal easy request; in the event that the orthogonal reward is determined to be successfully executed, the orthogonal reward to be executed is traded as the target to be stored.
Optionally, the apparatus further comprises a second centering module, configured to: initiating a second positive flushing request if it is determined that the orthogonal easy execution fails; according to the second correction request, correcting the positive transaction which fails to be executed; the storage module is further configured to: storing the positive transaction after completing the positive processing of the positive transaction whose execution failed.
Optionally, the apparatus further comprises: and receiving the first correcting request and storing the first correcting request.
Optionally, the receiving module is further configured to: receiving the first positive making request, and storing the first positive making request in a preset positive making record table to generate a first positive making request record;
the first straightening module is further configured to: inquiring the transaction record table according to the transaction information of the target transaction; and if a first alignment request record corresponding to the target orthogonal cover exists in the alignment record table, determining that a first alignment request corresponding to the target orthogonal cover exists.
Optionally, the receiving module is further configured to: receiving the first positive request; determining a transaction status of the target trading; and if the transaction state of the target forward transaction is determined to be in execution, storing the first forward transaction request in a preset forward transaction record table.
Optionally, the apparatus further comprises a feedback module configured to: if the target transaction state of the transaction is found to be successful or failed in execution within the preset query times, feeding back the transaction state of successful or failed execution; and if the transaction state of the target transaction is inquired to be in execution within the preset inquiry times, feeding back execution abnormal information.
Optionally, the storage module is further configured to: in an instance in which it is determined that there is no first hedge request corresponding to the target orthogonal transaction, directly storing the target positive transaction.
The transaction processing device provided by the embodiment of the invention carries out correction processing on the target positive transaction according to a first correction request under the condition that the first correction request corresponding to the target positive transaction to be stored exists; after the target positive transaction is corrected, the technical means of the target positive transaction is stored, so that the problems that the target positive transaction is initiated again by relying on external correction and final consistency is inconsistent when the target positive transaction is not initiated in the prior art are solved, error information is reduced, the final consistency of the transaction flow is inconsistent, and the system stability is greatly improved; the interaction times with the database are reduced, the interaction with the database for many times is not needed, and the system performance utilization rate is improved; the situations that manual confirmation is needed and manual alignment is initiated are reduced, and the stability of the system is improved.
The device can execute the method provided by the embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiment of the present invention.
Fig. 5 is a flow chart of processing a transaction by a transaction processing device of an embodiment of the present invention. As shown in fig. 5, when a positive transaction is initiated by a calling party to the transaction processing device, the transaction processing device will parse the positive transaction, send the transaction to each component or microservice deployment unit through outbound/inbound calls, and wait for the execution and return of the positive transaction. If the calling party initiates an external transaction in the process of executing the orthogonal transaction, the transaction processing device does not obtain an accurate return state of the transaction in the process of executing the transaction, and therefore the external transaction is recorded first. After the orthogonal easy execution is finished and before the pipeline table is recorded, whether external correction (namely a first correction request) exists in the orthogonal easy execution process is judged, if the external correction (namely the first correction request) exists, correction processing is carried out, and after the correction processing is finished, the orthogonal easy is recorded in a database. If there is no external violation, the orthogonal violation is directly recorded in the pipeline table.
Fig. 6 is a flow chart of processing a transaction by a transaction processing device of an embodiment of the present invention. As shown in fig. 6, in the process of external transaction, the calling party initiates an external transaction to the transaction processing device, and after receiving the external transaction, the transaction processing device analyzes the transaction first, and after analyzing that the external transaction is an external transaction, obtains the transaction state corresponding to the transaction, and if the transaction is executed, performs the external transaction. Otherwise, if the orthogonal easy is being executed, the external correction of the orthogonal easy is recorded, then the orthogonal easy state is circularly inquired, if the transaction state which is clear in the orthogonal easy is inquired, if the execution is successful or the execution is failed, the transaction state of the transaction is returned to the calling party, and if the orthogonal easy state is not inquired after the maximum circularly inquiring frequency is reached, the error reporting information is returned. In the subsequent positive transaction processing, before the orthogonal easy flow water falling action is implemented (the flow water meter is updated), whether external rushing is performed or not is inquired and judged once, if the external rushing is performed, the orthogonal easy flow water falling action is performed after the external rushing is completed, and if the external rushing is not performed in the orthogonal easy flow water falling process, the orthogonal easy flow water falling action is performed directly, so that the final consistency of the transaction flow water can be ensured.
Fig. 7 is a flow chart of processing a transaction by a transaction processing device of an embodiment of the present invention. As shown in fig. 7, in the processing of the positive transaction, the orthogonal transaction is sent to the transaction processing device by the calling party, after the message is analyzed, the message is sent to the corresponding microservice or component to execute the transaction through an internal call and an external call, after the transaction is executed, the transaction processing device returns to the transaction processing device, the transaction processing device can judge the positive transaction before the final warehouse falling action, if the orthogonal transaction fails, the subsequent transaction processing device can automatically initiate the positive transaction without initiating the external positive transaction, so that the positive transaction directly performs the warehouse falling at this time. If the orthogonality is easy to execute successfully, whether external conflict initiation exists in the executing process is judged, if so, conflict processing is carried out, and after the orthogonality is easy to rollback, the database dropping operation is carried out. Therefore, under the condition that no external conflict is initiated again, the final consistency of positive transactions can be ensured to be consistent, unnecessary error reporting and time and efficiency of subsequent manual processing are avoided, and the system autonomy is greatly improved.
Fig. 8 shows an exemplary system architecture 800 to which the information processing method or the information processing apparatus of the embodiment of the present invention can be applied.
As shown in fig. 8, the system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. The network 804 serves to provide a medium for communication links between the terminal devices 801, 802, 803 and the server 805. Network 804 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 801, 802, 803 to interact with a server 805 over a network 804 to receive or send messages or the like. The terminal devices 801, 802, 803 may have installed thereon various communication client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, social platform software, and the like.
The terminal devices 801, 802, 803 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 805 may be a server that provides various services, such as a background management server that supports shopping websites browsed by users using the terminal devices 801, 802, 803. The background management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (e.g., target push information and product information) to the terminal device.
It should be noted that the information processing method provided by the embodiment of the present invention is generally executed by the server 805, and accordingly, the information processing apparatus is generally disposed in the server 805.
It should be understood that the number of terminal devices, networks, and servers in fig. 8 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 9, shown is a block diagram of a computer system 900 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 9 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 9, the computer system 900 includes a Central Processing Unit (CPU)901 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)902 or a program loaded from a storage section 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data necessary for the operation of the system 900 are also stored. The CPU 901, ROM 902, and RAM 903 are connected to each other via a bus 904. An input/output (I/O) interface 905 is also connected to bus 904.
The following components are connected to the I/O interface 905: an input portion 906 including a keyboard, a mouse, and the like; an output section 907 including components such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 908 including a hard disk and the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as necessary. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 910 as necessary, so that a computer program read out therefrom is mounted into the storage section 908 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 909, and/or installed from the removable medium 911. The above-described functions defined in the system of the present invention are executed when the computer program is executed by a Central Processing Unit (CPU) 901.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a sending module, an obtaining module, a determining module, and a first processing module. The names of these modules do not in some cases constitute a limitation on the unit itself, and for example, the sending module may also be described as a "module that sends a picture acquisition request to a connected server".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:
determining that a target to be stored is transacting;
under the condition that a first correcting request which is orthogonal and easy to correspond to the target exists, correcting the target positive transaction according to the first correcting request;
after completing the offsetting of the target positive transaction, storing the target positive transaction.
The technical scheme of the embodiment of the invention solves the problems that the prior art is very dependent on external rushing to initiate again and the final consistency is inconsistent when the initiating is not performed, reduces the occurrence of wrong information reporting and the final consistency inconsistency of the transaction flow, and greatly improves the system stability; the interaction times with the database are reduced, the interaction with the database for many times is not needed, and the system performance utilization rate is improved; the situations that manual confirmation is needed and manual alignment is initiated are reduced, and the stability of the system is improved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (14)

1. A transaction processing method, comprising:
determining that a target to be stored is transacting;
under the condition that a first correcting request which is orthogonal and easy to correspond to the target exists, correcting the target positive transaction according to the first correcting request;
after completing the offsetting of the target positive transaction, storing the target positive transaction.
2. The method of claim 1, wherein determining a target orthogonal property to be stored comprises:
receiving an orthogonal cover request, the orthogonal cover request including an orthogonal cover to be executed;
executing the orthogonal easy to be executed according to the orthogonal easy request;
in the event that the orthogonal reward is determined to be successfully executed, the orthogonal reward to be executed is traded as the target to be stored.
3. The method of claim 2, further comprising:
initiating a second positive flushing request if it is determined that the orthogonal easy execution fails;
according to the second correction request, correcting the positive transaction which fails to be executed;
storing the positive transaction after completing the positive processing of the positive transaction whose execution failed.
4. The method of claim 3, wherein in performing the orthogonal function to be performed, the method further comprises:
and receiving the first correcting request and storing the first correcting request.
5. The method of claim 4, wherein receiving the first hedge request and saving the first hedge request comprises:
receiving the first positive making request, and storing the first positive making request in a preset positive making record table to generate a first positive making request record;
determining that there is a first positive request corresponding to the target orthogonal hot spot comprises:
inquiring the transaction record table according to the transaction information of the target transaction;
and if a first alignment request record corresponding to the target orthogonal cover exists in the alignment record table, determining that a first alignment request corresponding to the target orthogonal cover exists.
6. The method of claim 5, wherein receiving the first positive request, and wherein storing the first positive request in a preset positive record table comprises:
receiving the first positive request;
acquiring the transaction state of the target transaction;
and if the transaction state of the target forward transaction is in execution, storing the first forward transaction request in a preset forward transaction record table.
7. The method of claim 6, wherein after saving the first positive going request in the preset positive going log table, the method further comprises:
if the target transaction state of the transaction is found to be successful or failed in execution within the preset query times, feeding back the transaction state of successful or failed execution;
and if the transaction state of the target transaction is inquired to be in execution within the preset inquiry times, feeding back execution abnormal information.
8. The method according to any one of claims 1-7, further comprising: in an instance in which it is determined that there is no first hedge request corresponding to the target orthogonal transaction, directly storing the target positive transaction.
9. The method of claim 1, wherein the first positive request includes at least a transaction serial number and a transaction code.
10. A transaction processing device, comprising:
the determining module is used for determining that the target to be stored is trading;
the first correcting module is used for correcting the target positive transaction according to a first correcting request under the condition that the first correcting request which is orthogonal and easy to correspond to the target exists;
and the storage module is used for storing the target positive transaction after finishing the correction of the target positive transaction.
11. The apparatus of claim 10, wherein the determining module is further configured to:
receiving an orthogonal cover request, the orthogonal cover request including an orthogonal cover to be executed;
executing the orthogonal easy to be executed according to the orthogonal easy request;
in the event that the orthogonal reward is determined to be successfully executed, the orthogonal reward to be executed is traded as the target to be stored.
12. The apparatus of claim 11, further comprising a second centering module to:
initiating a second positive flushing request if it is determined that the orthogonal easy execution fails;
according to the second correction request, correcting the positive transaction which fails to be executed;
the storage module is further configured to: storing the positive transaction after completing the positive processing of the positive transaction whose execution failed.
13. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-9.
14. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-9.
CN202110928522.8A 2021-08-13 2021-08-13 Transaction processing method and device, electronic equipment and computer readable medium Pending CN113592655A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110928522.8A CN113592655A (en) 2021-08-13 2021-08-13 Transaction processing method and device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110928522.8A CN113592655A (en) 2021-08-13 2021-08-13 Transaction processing method and device, electronic equipment and computer readable medium

Publications (1)

Publication Number Publication Date
CN113592655A true CN113592655A (en) 2021-11-02

Family

ID=78257624

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110928522.8A Pending CN113592655A (en) 2021-08-13 2021-08-13 Transaction processing method and device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN113592655A (en)

Similar Documents

Publication Publication Date Title
CN111277639B (en) Method and device for maintaining data consistency
EP2620872A1 (en) Method and device for callback processing in telecommunication capacity opening
CN109873863B (en) Asynchronous calling method and device of service
CN112905930A (en) Interface request retransmission method and device
CN113282589A (en) Data acquisition method and device
CN113760924A (en) Distributed transaction processing method and device
CN112948138A (en) Method and device for processing message
CN113592655A (en) Transaction processing method and device, electronic equipment and computer readable medium
CN113760487B (en) Service processing method and device
CN113486033A (en) Method, apparatus, device and computer readable medium for controlling transaction consistency
CN114900379A (en) Message notification method and device, electronic equipment and storage medium
CN109087097B (en) Method and device for updating same identifier of chain code
CN113778631A (en) Distributed transaction compensation method and device, electronic equipment and readable storage medium
CN112732728A (en) Data synchronization method and system
CN113157911A (en) Service verification method and device
CN111210349A (en) Virtual asset transfer hosting method and device, electronic equipment and storage medium
CN110909269B (en) Log reporting method and device
CN113766437B (en) Short message sending method and device
CN112950380B (en) Block chain-based transaction consistency processing method and device
CN110728009A (en) Simulation method, device and system
CN115981828B (en) Service message processing method and device
CN112306791B (en) Performance monitoring method and device
CN112988408A (en) Multi-terminal interaction method and device
CN112783665A (en) Method and device for interface compensation
CN116167835A (en) Service processing method, device, electronic equipment and computer readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination