Transaction serial number generation method, device and system and storage medium

By obtaining and utilizing the previous transaction serial number and global serial number in the transaction request in the trading system, the transaction serial number of the current trading system is determined, which solves the problem of confusing transaction serial number generation when multiple trading systems process the same transaction request. The uniqueness of the transaction serial number is achieved.

CN118628236APending Publication Date: 2024-09-10吉林亿联银行股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310218328.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-08
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

In the existing technology, when multiple trading systems process the same transaction request, transaction serial numbers are easily generated in confusion, and uniqueness cannot be guaranteed, resulting in the same serial number appearing in different transactions.

Method used

By obtaining the transaction request sent by the previous trading system in the current trading system, carrying the previous transaction serial number and global serial number, the transaction serial number of the current trading system is determined based on this information, and returned to the main server to ensure that each Each trading system generates a unique transaction serial number.

Benefits of technology

It realizes the generation of unique transaction serial numbers for multiple trading systems that process the same transaction request, avoiding confusion in the generation of transaction serial numbers and ensuring the uniqueness of transaction serial numbers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628236A
    Figure CN118628236A
Patent Text Reader

Abstract

The invention discloses a transaction serial number generation method, device and system and a storage medium. The method comprises: in a current transaction system, a transaction request sent by a previous transaction system in a transaction processing flow is obtained, the transaction request carries a previous transaction serial number corresponding to the previous transaction system and a global serial number corresponding to the transaction request, and a transaction processing node in the transaction processing flow comprises a plurality of transaction systems; determining a current transaction serial number corresponding to the current transaction system based on the previous transaction serial number and the global serial number; and returning the current transaction serial number carrying the global serial number to the main server. According to the invention, the technical problem that the generation of transaction serial numbers is disordered easily when a plurality of transaction systems are adopted to process the same transaction request in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, system and storage medium for generating a transaction serial number. Background Art

[0002] The rapid development of the Internet has completely changed the model of traditional business and transaction operations. Online transactions have become the main transaction model of emerging Internet banks. With the expansion of the scope of transactions, the demand for transaction serial numbers has continued to increase, and each transaction system needs to bear more transaction request impacts. In addition, in the relevant technology, when generating transaction serial numbers, different transactions are distinguished only by a unique global serial number. For example, a 29-byte global serial number is generated for a transaction request (including 2-digit sourSPN+3-digit system code+8-digit date (yyyyMMdd)+6-digit machine time (hhMMss)+10-digit sequence number). The global serial number is generated by the original transaction trigger end system until the transaction is completed, identifying the only transaction in a certain scenario. All systems passed through during the transaction must keep the global serial number of the transaction consistent. It can be seen that the existing technology has a uniqueness risk: when there is high concurrency among multiple merchants or a single merchant, there is a possibility of duplication of merchant transactions, which in turn leads to the same transactions in different transactions, and the generation of transaction serial numbers is chaotic, and the uniqueness of the transaction serial numbers cannot be guaranteed.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] The embodiments of the present invention provide a method, device, system and storage medium for generating a transaction serial number, so as to at least solve the technical problem that confusion in generating a transaction serial number is likely to occur when multiple transaction systems are used to process the same transaction request in the related art.

[0005] According to one aspect of an embodiment of the present invention, a method for generating a transaction serial number is provided, comprising: in a current transaction system, obtaining a transaction request sent by a previous transaction system in a transaction processing flow, wherein the transaction request carries a previous transaction serial number corresponding to the previous transaction system and a global serial number corresponding to the transaction request, and the transaction processing nodes in the transaction processing flow include multiple transaction systems; based on the previous transaction serial number and the global serial number, determining a current transaction serial number corresponding to the current transaction system; and returning the current transaction serial number carrying the global serial number to a main server.

[0006] According to one aspect of an embodiment of the present invention, another method for generating a transaction serial number is provided, comprising: in response to a transaction request, generating a global serial number corresponding to the transaction request; determining a transaction processing flow corresponding to the transaction request, and a plurality of transaction systems included in transaction processing nodes in the transaction processing flow; sending the global serial number to the plurality of transaction systems in accordance with the transaction processing flow, so that the plurality of transaction systems respectively determine the transaction serial numbers corresponding to the plurality of transaction systems based on a previous transaction serial number sent by a corresponding previous transaction system and the global serial number; and receiving transaction serial numbers carrying the global serial number returned by the plurality of transaction systems.

[0007] According to one aspect of an embodiment of the present invention, another method for generating a transaction serial number is provided, comprising: a main server generates a global serial number corresponding to a transaction request in response to a transaction request; the main server determines a transaction processing flow corresponding to the transaction request, and a plurality of transaction systems included in transaction processing nodes in the transaction processing flow; the main server sends the global serial number to the plurality of transaction systems in accordance with the transaction processing flow; the plurality of transaction systems determine the transaction serial numbers corresponding to the plurality of transaction systems respectively based on a previous transaction serial number sent by a corresponding previous transaction system and the global serial number; the main server receives transaction serial numbers carrying the global serial number returned by the plurality of transaction systems.

[0008] According to one aspect of an embodiment of the present invention, a system for generating a transaction serial number is provided, comprising: a main server, configured to generate a global serial number corresponding to a transaction request in response to the transaction request; determine a transaction processing flow corresponding to the transaction request, and a plurality of transaction systems included in transaction processing nodes in the transaction processing flow; send the global serial number to the plurality of transaction systems in accordance with the transaction processing flow; the plurality of transaction systems are connected to the main server, and are respectively configured to determine transaction serial numbers corresponding to the plurality of transaction systems based on a previous transaction serial number sent by a corresponding previous transaction system and the global serial number; the main server is also configured to receive transaction serial numbers carrying the global serial number returned by the plurality of transaction systems.

[0009] According to another aspect of an embodiment of the present invention, a device for generating a transaction serial number is also provided, including: an acquisition module, used to acquire, in a current transaction system, a transaction request sent by a previous transaction system in a transaction processing flow, wherein the transaction request carries a previous transaction serial number corresponding to the previous transaction system and a global serial number corresponding to the transaction request, and the transaction processing nodes in the transaction processing flow include multiple transaction systems; a determination module, used to determine a current transaction serial number corresponding to the current transaction system based on the previous transaction serial number and the global serial number; and a return module, used to return the current transaction serial number carrying the global serial number to the main server.

[0010] According to another aspect of an embodiment of the present invention, a non-volatile storage medium is further provided, wherein the non-volatile storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing any one of the above-mentioned methods for generating a transaction serial number.

[0011] In an embodiment of the present invention, by obtaining, in the current transaction system, a transaction request sent by a previous transaction system in a transaction processing flow, wherein the transaction request carries a previous transaction serial number corresponding to the previous transaction system and a global serial number corresponding to the transaction request, and the transaction processing nodes in the transaction processing flow include multiple transaction systems; based on the previous transaction serial number and the global serial number, the current transaction serial number corresponding to the current transaction system is determined; and the current transaction serial number carrying the global serial number is returned to the main server, thereby achieving the purpose of generating unique transaction serial numbers for multiple transaction systems that process the same transaction request, thereby achieving the technical effect of avoiding confusion in generating transaction serial numbers and ensuring the uniqueness of transaction serial numbers, and further solving the technical problem that confusion in generating transaction serial numbers is prone to occur when multiple transaction systems are used to process the same transaction request in the related technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0013] Figure 1 is a schematic diagram of a method for generating a transaction serial number according to an embodiment of the present invention;

[0014] Figure 2 is a schematic diagram of an optional transaction processing flow according to an embodiment of the present invention;

[0015] Figure 3 is a schematic diagram of an optional method for generating a transaction serial number according to an embodiment of the present invention;

[0016] Figure 4 is a schematic diagram of an optional method for generating a transaction serial number according to an embodiment of the present invention;

[0017] Figure 5 is a schematic diagram of a system for generating a transaction serial number according to an embodiment of the present invention;

[0018] Figure 6 It is a schematic diagram of a device for generating a transaction serial number according to an embodiment of the present invention. DETAILED DESCRIPTION

[0019] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0020] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0021] According to an embodiment of the present invention, a method embodiment for generating a transaction serial number is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0022] Figure 1 : is a flow chart of a method for generating a transaction serial number according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0023] Step S102: in the current transaction system, obtaining the transaction request sent by the previous transaction system in the transaction processing flow.

[0024] Optionally, the transaction request carries a previous transaction serial number corresponding to the previous transaction system and a global serial number corresponding to the transaction request, and the transaction processing node in the transaction processing flow includes multiple transaction systems.

[0025] It can be understood that the global serial number is a unique identifier corresponding to the transaction request, carrying the transaction information corresponding to the transaction request. The global serial number is a unique identifier corresponding to the transaction request generated by the main server (such as a sharing platform) after receiving the transaction request sent by the target terminal (such as the terminal corresponding to the merchant), and is used to track the transaction request in various transaction systems.

[0026] Optionally, the global serial number includes: the third digit of the region code, the fourth digit of the system code, the fifth digit of the date code, the sixth digit of the machine time, and the seventh digit of the serial number. For example, the global serial number may include: 2 digits of sourSPN (region code) + 3 digits of sourSystemId (system code) + 8 digits of date (yyyyMMdd) + 9 digits of machine time (hhMMssSSS) + 7 digits of serial number. In the related art, 6 digits of machine time are generally used, with an accuracy of seconds, and a high probability of duplication; the embodiment of the present invention expands the 6-digit machine time to 9 digits, with an accuracy of milliseconds, to reduce the probability of duplication. It should be noted that the global serial number is generated by the original transaction trigger end system (i.e., the main server) until all transaction requests are completed, identifying the only transaction in a certain scenario. All transaction systems passed through during the transaction process must keep the global serial number of the transaction consistent.

[0027] It should be noted that in the related art, the global serial number is mainly generated by the target terminal, that is, when the target terminal initiates a transaction request, it immediately generates a global serial number corresponding to the transaction request, and the transaction serial number runs through the entire transaction processing flow. Different from the related art, in the embodiment of the present invention, the global serial number corresponding to the transaction request is generated by the main server, and the global serial number only flows within the system (such as it can exist in the main server and multiple internal transaction systems), and is not output to the outside.

[0028] Step S104, based on the previous transaction serial number and the global serial number, determine the current transaction serial number corresponding to the current transaction system.

[0029] Optionally, the global serial number carries the transaction information corresponding to the transaction request, and based on the global serial number, the current transaction processing type corresponding to the current transaction system can be determined. In the above manner, the current transaction serial number is obtained based on the previous transaction serial number and the global serial number, and a unique current transaction serial number corresponding to the current transaction system can be generated, ensuring that the current transaction serial number does not conflict with the shirt transaction serial number.

[0030] In an optional embodiment, the current transaction serial number corresponding to the current transaction system is determined based on the previous transaction serial number and the global serial number, including: based on the transaction processing flow, judging whether the current transaction system is the first system to process the transaction request; when the judgment result indicates that the current transaction system is not the first system to process the transaction request, determining the current transaction serial number corresponding to the current transaction system based on the previous transaction serial number and the global serial number.

[0031] It should be noted that multiple transaction systems process transaction requests in sequence according to the transaction processing flow corresponding to the transaction requests. If the current transaction system is the first system among multiple transaction systems to process the transaction request, it indicates that the previous transaction system does not exist in the current transaction system. At this time, it is impossible to determine the current transaction serial number corresponding to the current transaction system based on the previous transaction serial number and the global serial number. Only when the current transaction system is not the first system to process the transaction request can the previous transaction serial number be obtained, and on this basis, the current transaction serial number corresponding to the current transaction system can be determined based on the previous transaction serial number and the global serial number.

[0032] In an optional embodiment, the previous transaction serial number includes the system code corresponding to the previous transaction system and a second-digit serial number. Different transaction systems correspond to different system codes. Each digit of the second-digit serial number corresponds to a transaction processing node in the transaction processing flow.

[0033] Optionally, the global serial number is used to identify a main transaction corresponding to the transaction request; multiple transaction systems are used to issue sub-transactions included in the main transaction, and the current transaction serial number is used to identify a sub-transaction in a main transaction. The global serial number plus the current transaction serial number corresponding to the current transaction system can uniquely identify the transaction made by the current transaction system for the transaction request, that is, the global serial number (identifying a unique transaction) plus the transaction serial number can truly identify a unique transaction. The global serial number + sub-transaction serial number is globally unique, and the transaction serial number is used according to the transaction situation of each transaction system and is passed backward.

[0034] Optionally, the system code corresponding to the previous transaction system may be, but not limited to, a 3-digit system code, and the second digit of the serial number may be, but not limited to, an 18-digit number or letter. For example, the previous transaction serial number may be a 3-digit system number + 18-digit numbers or letters. The system codes corresponding to different transaction systems are different, that is, each time a transaction system is passed, the system code in the corresponding transaction serial number needs to be changed accordingly. The 18-bit characters are numbers (0...9) + letters (a...z, A...Z), case-sensitive, and the starting value is 1000000000000000000. Each time a transaction system is passed, the transaction system needs to find the first 0 position from left to right on the transaction serial number sent by the requester (or the previous transaction system), and then use 1, 2, 3...Z to replace the position according to the situation of splitting the transaction, and then continue to pass it to the next system through the message header until the transaction is completed. Each independent transaction system can only use one bit.

[0035] In an optional embodiment, the current transaction serial number corresponding to the current transaction system is determined based on the previous transaction serial number and the global serial number, including: obtaining the system code corresponding to the current transaction system; determining the current transaction processing node corresponding to the current transaction system and the current transaction processing type corresponding to the current transaction system based on the global serial number; determining the current serial number position corresponding to the current transaction processing node and the serial number value corresponding to the current transaction processing type; replacing the system code corresponding to the previous transaction system in the previous transaction serial number with the system code of the current transaction system, and replacing the default serial number value corresponding to the current serial number position in the second digit of the serial number with the serial number value corresponding to the current transaction processing type, to obtain the current transaction serial number.

[0036] It can be understood that the above-mentioned current transaction serial number is obtained on the basis of the above-mentioned previous transaction serial number, that is, on the basis of the previous transaction serial number, the system code corresponding to the previous transaction system in the previous transaction serial number is replaced by the system code of the above-mentioned current transaction system, and the default value (such as 0) in the serial number position corresponding to the current transaction processing node is replaced by the serial number value corresponding to the current transaction processing type, thereby ensuring the uniqueness of the current transaction serial number.

[0037] Optionally, the above-mentioned multiple transaction systems may include but are not limited to target applications (such as e-account), payment systems, image platforms, core systems, and general ledger systems as an example. Figure 2 is a schematic diagram of an optional transaction processing flow according to an embodiment of the present invention, such as Figure 2As shown, a transaction request is initiated from the main server (such as a shared platform) to the target application (such as e-Account), and the target application splits the transaction and sends it to the payment system and the image platform respectively. The payment system and the image platform then send the transaction to the core system respectively, and the core system sends the transaction to the general ledger system respectively. Then in this scenario: the sub-serial number from the shared platform to the target application is PLS1000000000000000000, the sub-serial number from the target application to the payment system is EAS1100000000000000000, the sub-serial number from the target application to the imaging platform is EAS1200000000000000000, the sub-serial number from the payment system to the core is UPP1110000000000000000, the sub-serial number from the imaging platform to the core is UIP12100000000000000000, and the sub-serial numbers from the core to the general ledger are CBS1111000000000000000 and CBS121100000000000000.

[0038] In an optional embodiment, the method further includes: when the judgment result indicates that the current transaction system is the first system to process the transaction request, obtaining the global serial number corresponding to the transaction request; based on the global serial number, determining the current transaction serial number corresponding to the current transaction system.

[0039] In the above manner, when the current transaction system is the first system to process the transaction request, the current transaction serial number corresponding to the current transaction system is directly determined based on the global serial number. The specific manner may be: obtaining the system code corresponding to the current transaction system; determining the current transaction processing type corresponding to the current transaction system based on the global serial number; determining the current transaction serial number based on the system code corresponding to the current transaction system and the current transaction processing type.

[0040] It can be understood that the global serial number carries the transaction information corresponding to the transaction request. Based on the global serial number, the current transaction processing type corresponding to the current transaction system can be determined. Based on the system code corresponding to the current transaction system and the current transaction processing type, the current transaction serial number can be uniquely determined. Figure 2 As shown, the system code corresponding to the target application is PLS, and the serial number value corresponding to the current transaction processing type is 1. At this time, the sub-serial number from the shared platform to the target application is determined to be PLS10000000000000000000.

[0041] Step S106, returning the current transaction serial number carrying the global serial number to the main server.

[0042] Through the above method, after obtaining the current transaction serial number, the current transaction system returns the global serial number and the current transaction serial number to the main server together. That is, for the same transaction, from the initiator to the final transaction terminator, the same global serial number must be transmitted for each transaction system interaction to prevent the occurrence of transaction tracking errors.

[0043] The executor of the above steps S102 to S106 is the current transaction system among the multiple transaction systems (i.e., any one of the multiple transaction systems). Through the above steps S102 to S106, the purpose of generating unique transaction serial numbers for the multiple transaction systems that process the same transaction request can be achieved, thereby achieving the technical effect of avoiding confusion in the generation of transaction serial numbers and ensuring the uniqueness of the transaction serial numbers, thereby solving the technical problem of confusion in the generation of transaction serial numbers that is prone to occur when multiple transaction systems are used to process the same transaction request in the related technology.

[0044] It should be noted that, when generating the transaction serial number of a transaction request, the embodiment of the present invention not only considers the global serial number corresponding to the main transaction of the transaction request, but also uses the transaction serial number to further distinguish the transaction serial numbers corresponding to each sub-transaction when performing sub-transactions in multiple transaction requests for the transaction request. That is, the global serial number is generated by the first initiator system (i.e., the main server). Throughout the entire life cycle of a transaction, it is used as the element that uniquely identifies a complete transaction request throughout the entire process, and it is also used as a key element to identify the transaction path, that is, for the same transaction, from the initiator to the final transaction end party, each transaction system interaction must pass the same global serial number. The transaction serial number is generated by each transaction system and is an identifier for identifying the interactive system when a single transaction system interacts with other transaction systems. In a transaction, a new transaction serial number must be generated each time a single transaction system interacts with different transaction systems. When interacting with the same system multiple times, multiple transaction serial numbers need to be generated, that is, a new transaction serial number must be generated for each interaction. Each system as the initiator or returner of the transaction needs to generate and pass a new transaction serial number to the transaction system. If a transaction triggers multiple combined sub-transactions, each sub-transaction has its own transaction serial number, but each sub-transaction must pass the same global serial number at the same time.

[0045] According to an embodiment of the present invention, another method for generating a transaction serial number is also provided. Figure 3 : is a flow chart of a method for generating a transaction serial number according to an embodiment of the present invention. Figure 3 As shown, the method comprises the following steps:

[0046] Step S302, in response to the transaction request, generating a global serial number corresponding to the transaction request;

[0047] Step S304, determining the transaction processing flow corresponding to the transaction request, and multiple transaction systems included in the transaction processing nodes in the transaction processing flow;

[0048] Step S306, sending the global serial number to the multiple trading systems according to the transaction processing flow, so that the multiple trading systems can determine the transaction serial numbers corresponding to the multiple trading systems based on the previous transaction serial number sent by the previous corresponding trading system and the global serial number;

[0049] Step S308, receiving the transaction serial numbers carrying the global serial number returned by the multiple transaction systems respectively.

[0050] The execution entity of the above steps S302 to S308 is the main server. Through the above steps S302 to S308, the purpose of generating unique transaction serial numbers for multiple transaction systems that process the same transaction request can be achieved, thereby achieving the technical effect of avoiding confusion in generating transaction serial numbers and ensuring the uniqueness of transaction serial numbers, thereby solving the technical problem of confusion in generating transaction serial numbers when multiple transaction systems are used to process the same transaction request in related technologies.

[0051] According to an embodiment of the present invention, another method for generating a transaction serial number is also provided. Figure 4 : is a flow chart of a method for generating a transaction serial number according to an embodiment of the present invention. Figure 4 As shown, the method comprises the following steps:

[0052] Step S402, the main server generates a global serial number corresponding to the transaction request in response to the transaction request;

[0053] Step S404, the main server determines the transaction processing flow corresponding to the transaction request, and multiple transaction systems included in the transaction processing nodes in the transaction processing flow;

[0054] Step S406, the main server sends the global serial number to the multiple transaction systems according to the transaction processing flow;

[0055] Step S408, the plurality of trading systems respectively determine the transaction serial numbers corresponding to the plurality of trading systems based on the previous transaction serial number sent by the corresponding previous trading system and the global serial number;

[0056] Step S410: the main server receives the transaction serial numbers carrying the global serial number returned by the multiple transaction systems respectively.

[0057] The execution entities of the above steps S402 to S410 are the main server and multiple transaction systems. Through the above steps S402 to S410, the purpose of generating unique transaction serial numbers for multiple transaction systems that process the same transaction request can be achieved, thereby achieving the technical effect of avoiding confusion in the generation of transaction serial numbers and ensuring the uniqueness of the transaction serial numbers, thereby solving the technical problem of confusion in the generation of transaction serial numbers that is prone to occur when multiple transaction systems are used to process the same transaction request in the related technology.

[0058] According to an embodiment of the present invention, a system embodiment for implementing the above-mentioned method for generating a transaction serial number is also provided. Figure 5 is a structural diagram of a system for generating a transaction serial number according to an embodiment of the present invention. Figure 5 As shown, the system for generating the transaction serial number includes: a main server 50, a plurality of transaction systems 52, wherein:

[0059] The main server 50 is used to generate a global serial number corresponding to the transaction request in response to the transaction request; determine the transaction processing flow corresponding to the transaction request and the multiple transaction systems included in the transaction processing nodes in the transaction processing flow; and send the global serial number to the multiple transaction systems according to the transaction processing flow;

[0060] The plurality of trading systems 52 are connected to the main server 50 and are respectively used to determine the transaction serial numbers corresponding to the plurality of trading systems based on the previous transaction serial number sent by the corresponding previous trading system and the global serial number;

[0061] The main server 50 is further configured to receive transaction serial numbers carrying the global serial number returned by the multiple transaction systems respectively.

[0062] In an embodiment of the present invention, the main server 50 is set up to generate a global serial number corresponding to the transaction request in response to the transaction request; determine the transaction processing flow corresponding to the transaction request and the multiple transaction systems included in the transaction processing nodes in the transaction processing flow; send the global serial number to the multiple transaction systems according to the transaction processing flow; the multiple transaction systems 52 are connected to the main server 50, and are respectively used to determine the transaction serial numbers corresponding to the multiple transaction systems based on the previous transaction serial number sent by the corresponding previous transaction system and the global serial number; the main server 50 is also used to receive the transaction serial numbers carrying the global serial number returned by the multiple transaction systems, thereby achieving the purpose of generating unique transaction serial numbers for multiple transaction systems processing the same transaction request, thereby achieving the technical effect of avoiding confusion in the generation of transaction serial numbers and ensuring the uniqueness of the transaction serial numbers, and further solving the technical problem that confusion in the generation of transaction serial numbers is prone to occur when multiple transaction systems are used to process the same transaction request in the related art.

[0063] It should be noted that in this application Figure 5 The specific structure of the transaction serial number generation system shown in the figure is only for illustration. In specific applications, the transaction serial number generation system in this application can be compared to Figure 5 The main server 50 and multiple trading systems 52 shown have more or less structures.

[0064] It should be noted that any optional or preferred method for generating a transaction serial number in the above method embodiments can be executed or implemented in the main server 50 and multiple transaction systems 52 provided in this embodiment.

[0065] In addition, it is still necessary to explain that the optional or preferred implementation modes of this embodiment can refer to the relevant descriptions in the method embodiments, which will not be repeated here.

[0066] In this embodiment, a device for generating a transaction serial number is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the terms "module" and "device" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0067] According to an embodiment of the present invention, there is also provided an embodiment of a device for implementing the above-mentioned method for generating a transaction serial number. Figure 6 is a schematic diagram of the structure of a device for generating a transaction serial number according to an embodiment of the present invention. Figure 6As shown, the above-mentioned transaction serial number generation device includes: an acquisition module 600, a determination module 602, and a return module 604, wherein:

[0068] The acquisition module 600 is used to acquire, in the current transaction system, a transaction request sent by a previous transaction system in the transaction processing flow, wherein the transaction request carries a previous transaction serial number corresponding to the previous transaction system and a global serial number corresponding to the transaction request, and the transaction processing node in the transaction processing flow includes multiple transaction systems;

[0069] The determination module 602 is connected to the acquisition module 600 and is used to determine the current transaction serial number corresponding to the current transaction system based on the previous transaction serial number and the global serial number;

[0070] The return module 604 is connected to the determination module 602 and is used to return the current transaction serial number carrying the global serial number to the main server.

[0071] In an embodiment of the present invention, the acquisition module 600 is provided to acquire, in the current transaction system, a transaction request sent by a previous transaction system in a transaction processing flow, wherein the transaction request carries a previous transaction serial number corresponding to the previous transaction system and a global serial number corresponding to the transaction request, and the transaction processing nodes in the transaction processing flow include multiple transaction systems; the determination module 602 is connected to the acquisition module 600 and is used to determine the current transaction serial number corresponding to the current transaction system based on the previous transaction serial number and the global serial number; the return module 604 is connected to the determination module 602 and is used to return the current transaction serial number carrying the global serial number to the main server, thereby achieving the purpose of generating unique transaction serial numbers for multiple transaction systems processing the same transaction request, thereby achieving the technical effect of avoiding confusion in the generation of transaction serial numbers and ensuring the uniqueness of transaction serial numbers, and further solving the technical problem that confusion in the generation of transaction serial numbers is prone to occur when multiple transaction systems are used to process the same transaction request in the related art.

[0072] It should be noted that the above modules can be implemented by software or hardware. For example, for the latter, it can be implemented in the following ways: the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0073] It should be noted that the acquisition module 600, the determination module 602, and the return module 604 correspond to steps S102 to S106 in the embodiment, and the examples and application scenarios implemented by the modules and the corresponding steps are the same, but are not limited to the contents disclosed in the embodiment. It should be noted that the modules as part of the device can be run in a computer terminal.

[0074] It should be noted that the optional or preferred implementation of this embodiment can refer to the relevant description in the embodiment, which will not be repeated here.

[0075] The above-mentioned transaction serial number generation device may also include a processor and a memory. The above-mentioned acquisition module 600, determination module 602, return module 604, etc. are all stored in the memory as program modules, and the processor executes the above-mentioned program modules stored in the memory to realize corresponding functions.

[0076] The processor includes a kernel, which retrieves the corresponding program module from the memory. The kernel may be one or more. The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. The memory includes at least one memory chip.

[0077] According to an embodiment of the present application, an embodiment of a non-volatile storage medium is also provided. Optionally, in this embodiment, the non-volatile storage medium includes a stored program, wherein when the program is executed, the device where the non-volatile storage medium is located is controlled to execute any of the above transaction serial number generation methods.

[0078] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group, and the non-volatile storage medium includes a stored program.

[0079] Optionally, when the program is running, the device where the non-volatile storage medium is located is controlled to perform the following functions: in the current transaction system, obtaining a transaction request sent by a previous transaction system in the transaction processing flow, wherein the transaction request carries a previous transaction serial number corresponding to the previous transaction system and a global serial number corresponding to the transaction request, and the transaction processing nodes in the transaction processing flow include multiple transaction systems; based on the previous transaction serial number and the global serial number, determining the current transaction serial number corresponding to the current transaction system; and returning the current transaction serial number carrying the global serial number to the main server.

[0080] According to an embodiment of the present application, an embodiment of a processor is also provided. Optionally, in this embodiment, the processor is used to run a program, wherein when the program is run, any of the above methods for generating a transaction serial number is executed.

[0081] According to an embodiment of the present application, an embodiment of a computer program product is also provided. When executed on a data processing device, the program is suitable for executing the steps of initializing the method for generating a transaction serial number according to any one of the above-mentioned steps.

[0082] Optionally, the above-mentioned computer program product, when executed on a data processing device, is suitable for executing a program initialized with the following method steps: in the current transaction system, obtaining a transaction request sent by a previous transaction system in the transaction processing flow, wherein the above-mentioned transaction request carries a previous transaction serial number corresponding to the above-mentioned previous transaction system, and a global serial number corresponding to the above-mentioned transaction request, and the transaction processing nodes in the above-mentioned transaction processing flow include multiple transaction systems; based on the above-mentioned previous transaction serial number and the above-mentioned global serial number, determining the current transaction serial number corresponding to the above-mentioned current transaction system; and returning the above-mentioned current transaction serial number carrying the above-mentioned global serial number to the main server.

[0083] An embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented: in a current transaction system, a transaction request sent by a previous transaction system in a transaction processing flow is obtained, wherein the transaction request carries a previous transaction serial number corresponding to the previous transaction system and a global serial number corresponding to the transaction request, and the transaction processing nodes in the transaction processing flow include multiple transaction systems; based on the previous transaction serial number and the global serial number, a current transaction serial number corresponding to the current transaction system is determined; and the current transaction serial number carrying the global serial number is returned to the main server.

[0084] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0085] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0086] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the above modules can be a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, modules or indirect coupling or communication connection of modules, which can be electrical or other forms.

[0087] The modules described above as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0088] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of software functional modules.

[0089] If the above-mentioned integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable non-volatile storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a non-volatile storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the various embodiments of the present invention. The aforementioned non-volatile storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0090] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for generating a transaction serial number, It is characterized in that include: In the current transaction system, a transaction request sent by a previous transaction system in the transaction processing flow is obtained, wherein the transaction request carries a previous transaction serial number corresponding to the previous transaction system and a global serial number corresponding to the transaction request, and the transaction processing nodes in the transaction processing flow include multiple transaction systems; Based on the previous transaction serial number and the global serial number, determine the current transaction serial number corresponding to the current transaction system; The current transaction serial number carrying the global serial number is returned to the main server.

2. The method according to claim 1, It is characterized in that The determining, based on the previous transaction serial number and the global serial number, the current transaction serial number corresponding to the current transaction system includes: Based on the transaction processing flow, determining whether the current transaction system is the first system to process the transaction request; When the judgment result indicates that the current transaction system is not the first system to process the transaction request, the current transaction serial number corresponding to the current transaction system is determined based on the previous transaction serial number and the global serial number.

3. The method according to claim 2, It is characterized in that The method further comprises: When the judgment result indicates that the current transaction system is the first system to process the transaction request, obtaining the global serial number corresponding to the transaction request; Based on the global serial number, the current transaction serial number corresponding to the current transaction system is determined.

4. The method according to claim 3, It is characterized in that The determining, based on the global serial number, the current transaction serial number corresponding to the current transaction system includes: Obtaining the system code corresponding to the current trading system; Based on the global serial number, determining a current transaction processing type corresponding to the current transaction system; The current transaction serial number is determined based on the system code corresponding to the current transaction system and the current transaction processing type.

5. The method according to claim 1, It is characterized in that The previous transaction serial number includes the system code corresponding to the previous transaction system and a second-digit serial number. Different transaction systems correspond to different system codes. Each digit in the second-digit serial number corresponds to a transaction processing node in the transaction processing flow.

6. The method according to claim 5, It is characterized in that The determining, based on the previous transaction serial number and the global serial number, the current transaction serial number corresponding to the current transaction system includes: Obtaining the system code corresponding to the current trading system; Based on the global serial number, determine the current transaction processing node corresponding to the current transaction system and the current transaction processing type corresponding to the current transaction system; Determine the current sequence number corresponding to the current transaction processing node and the sequence number value corresponding to the current transaction processing type; The system code corresponding to the previous transaction system in the previous transaction serial number is replaced with the system code of the current transaction system, and the default serial number value corresponding to the current serial number position in the second-digit serial number is replaced with the serial number value corresponding to the current transaction processing type, to obtain the current transaction serial number.

7. A method for generating a transaction serial number, It is characterized in that include: In response to a transaction request, generating a global serial number corresponding to the transaction request; Determine a transaction processing flow corresponding to the transaction request, and a plurality of transaction systems included in a transaction processing node in the transaction processing flow; Sending the global serial number to the multiple transaction systems according to the transaction processing flow, so that the multiple transaction systems can determine the transaction serial numbers corresponding to the multiple transaction systems respectively based on the previous transaction serial number sent by the corresponding previous transaction system and the global serial number; Receive transaction serial numbers carrying the global serial number returned by the multiple transaction systems respectively.

8. A method for generating a transaction serial number, It is characterized in that include: The main server generates a global serial number corresponding to the transaction request in response to the transaction request; The main server determines a transaction processing flow corresponding to the transaction request and a plurality of transaction systems included in a transaction processing node in the transaction processing flow; The main server sends the global serial number to the multiple transaction systems according to the transaction processing flow; The multiple transaction systems determine the transaction serial numbers corresponding to the multiple transaction systems respectively based on the previous transaction serial number sent by the corresponding previous transaction system and the global serial number; The main server receives the transaction serial numbers carrying the global serial number returned by the multiple transaction systems respectively.

9. A system for generating transaction serial numbers. It is characterized in that include: The main server is used to generate a global serial number corresponding to the transaction request in response to the transaction request; Determine a transaction processing flow corresponding to the transaction request and a plurality of transaction systems included in the transaction processing nodes in the transaction processing flow; send the global serial number to the plurality of transaction systems according to the transaction processing flow; The multiple transaction systems are connected to the main server and are respectively used to determine the transaction serial numbers corresponding to the multiple transaction systems based on the previous transaction serial number sent by the corresponding previous transaction system and the global serial number; The main server is further used to receive transaction serial numbers carrying the global serial number returned by the multiple transaction systems respectively.

10. A device for generating a transaction serial number, It is characterized in that include: An acquisition module, configured to acquire, in the current transaction system, a transaction request sent by a previous transaction system in a transaction processing flow, wherein the transaction request carries a previous transaction serial number corresponding to the previous transaction system and a global serial number corresponding to the transaction request, and the transaction processing nodes in the transaction processing flow include multiple transaction systems; A determination module, configured to determine a current transaction serial number corresponding to the current transaction system based on the previous transaction serial number and the global serial number; The return module is used to return the current transaction serial number carrying the global serial number to the main server.

11. A non-volatile storage medium, It is characterized in that The non-volatile storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method for generating a transaction serial number as described in any one of claims 1 to 8.