WO2021093784A1 - Transaction request processing method and device, electronic device, and medium - Google Patents

Transaction request processing method and device, electronic device, and medium Download PDF

Info

Publication number
WO2021093784A1
WO2021093784A1 PCT/CN2020/128193 CN2020128193W WO2021093784A1 WO 2021093784 A1 WO2021093784 A1 WO 2021093784A1 CN 2020128193 W CN2020128193 W CN 2020128193W WO 2021093784 A1 WO2021093784 A1 WO 2021093784A1
Authority
WO
WIPO (PCT)
Prior art keywords
computer room
transaction
transaction request
request
computer
Prior art date
Application number
PCT/CN2020/128193
Other languages
French (fr)
Chinese (zh)
Inventor
曹冰
张驰
李仲夷
Original Assignee
网联清算有限公司
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 网联清算有限公司 filed Critical 网联清算有限公司
Publication of WO2021093784A1 publication Critical patent/WO2021093784A1/en

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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/389Keeping log of transactions for guaranteeing non-repudiation of a transaction
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • 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

Definitions

  • the present disclosure relates to a transaction request processing method, device, electronic equipment and medium.
  • the related technology requires that the transaction initiator can only send the request to the designated computer room, otherwise it will be rejected to ensure that the transaction with the same serial number is processed in the same computer room.
  • this method not only has a poor user experience, but in some cases directly causes the transaction to be unable to proceed.
  • An aspect of the present disclosure provides a method for processing a transaction request, including obtaining a transaction request, the transaction request including a transaction serial number, the transaction serial number including a computer room identification position, and determining whether there is an indication for the computer room identification position
  • the redirection rule of the first computer room used to process the transaction request. If there is no redirection rule or the redirection rule query fails, it is determined whether the first computer room is the current computer room, and if the first computer room is not the current computer room, Then, the transaction request is forwarded to the first computer room.
  • the method further includes if the first computer room is the current computer room, querying whether there is a corresponding transaction record based on the transaction serial number, and if there is no corresponding transaction record, processing the transaction request, and In the case that the transaction request is a transaction request of a predetermined category, a transaction record of the transaction serial number is generated.
  • the method further includes synchronizing the transaction record to another computer room in the same area as the current computer room.
  • the method further includes if there is a corresponding transaction record, re-determining a second computer room for processing the transaction request based on the transaction record, and if the second computer room is not the current computer room, then The transaction request is forwarded to the second computer room.
  • the method further includes if the second computer room is the current computer room, determining whether the transaction request is a repeated request based on the transaction record, and if the transaction request is not a repeated request, executing the transaction request .
  • the method further includes determining a third computer room after redirection if there is a redirection rule, and if the third computer room is not the current computer room, forwarding the transaction request to the third computer room.
  • the method further includes if the third computer room is the current computer room, querying whether there is a corresponding transaction record based on the transaction serial number, and if there is no corresponding transaction record, processing the transaction request, and In the case that the transaction request is a transaction request of a predetermined category, a transaction record of the transaction serial number is generated.
  • the method further includes if there is a corresponding transaction record, re-determining a fourth computer room for processing the transaction request based on the transaction record, and if the fourth computer room is not the current computer room, then The transaction request is forwarded to the fourth computer room.
  • a transaction request processing device including an obtaining module, a first determining module, a second determining module, and a forwarding module.
  • the obtaining module is configured to obtain a transaction request, the transaction request includes a transaction serial number, and the transaction serial number includes a computer room identification position.
  • the first determining module is configured to determine whether there is a redirection rule for the first computer room indicated by the computer room identification position for processing the transaction request.
  • the second determining module is configured to determine whether the first computer room is the current computer room if there is no redirection rule or the redirection rule query fails.
  • the forwarding module is configured to forward the transaction request to the first computer room if the first computer room is not the current computer room.
  • Another aspect of the present disclosure provides an electronic device including one or more processors; and a memory for storing one or more computer programs, wherein, when the one or more computer programs are used by one or more When the processor is executed, one or more processors are caused to implement the method described above.
  • Another aspect of the present disclosure provides a computer-readable medium having executable instructions stored thereon, and when the instructions are executed by a processor, the processor implements the method as described above.
  • Another aspect of the present disclosure provides a computer program, which includes computer-executable instructions, which are used to implement the method as described above when executed.
  • the method provided by the embodiments of the present disclosure can ensure that when multiple computer rooms process transaction requests, the transaction request of the same transaction serial number is processed in the same computer room through the redirection rule and the forwarding rule of the computer room identification position, so as to avoid the occurrence of transaction requests with the same serial number. Repeated transactions.
  • Fig. 1 schematically shows an exemplary application scenario of a method and device for processing a transaction request according to an embodiment of the present disclosure
  • FIG. 2 schematically shows a flowchart of a method for processing a transaction request according to an embodiment of the present disclosure
  • FIG. 3 schematically shows a flowchart of a method for processing a transaction request according to another embodiment of the present disclosure
  • Fig. 4 schematically shows a block diagram of a transaction request processing device according to an embodiment of the present disclosure.
  • Fig. 5 schematically shows a block diagram of an electronic device suitable for implementing a method and apparatus for processing a transaction request according to an embodiment of the present disclosure.
  • At least one of the “systems” shall include, but is not limited to, systems having A alone, B alone, C alone, A and B, A and C, B and C, and/or systems having A, B, C, etc. ).
  • the method of the embodiment of the present disclosure obtains a transaction request, the transaction request includes a transaction serial number, the transaction serial number includes a computer room identification position, and it is determined whether there is a second instruction for processing the transaction request for the computer room identification position.
  • a redirection rule of a computer room if there is no redirection rule or the redirection rule query fails, it is determined whether the first computer room is the current computer room, and if the first computer room is not the current computer room, the transaction request is forwarded to the The first computer room.
  • FIG. 1 schematically shows an application scenario of a method and device for processing a transaction request according to an embodiment of the present disclosure. It should be noted that FIG. 1 is only an example of the system architecture to which the embodiments of the present disclosure can be applied to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used for other Equipment, system, environment or scenario.
  • the distributed system 100 may include multiple nodes 110 and a network 120.
  • the network 120 is a medium used to provide a communication link between a plurality of nodes 110.
  • the network 120 may include various connection types, such as wired and wireless communication links, and so on.
  • the node 110 may be, for example, a dedicated computing or storage device, such as a terminal device or a server.
  • multiple nodes 110 may be set in different computer rooms, and transaction requests may be processed in each computer room.
  • Different computer rooms can be set up in the same city, or set up in different cities across regions.
  • Transaction request data can be processed in the distributed system 100, and the transaction request processing method of the embodiment of the present disclosure can be applied to the distributed system 100.
  • the number of the network 120 and the number of nodes 110 such as terminal devices and servers in FIG. 1 is merely illustrative. According to implementation needs, there can be any number of terminal devices, networks, and servers.
  • Fig. 2 schematically shows a flowchart of a method for processing a transaction request according to an embodiment of the present disclosure.
  • the method includes operations S210 to S240.
  • This method can be executed by a server in any computer room in a distributed system.
  • a transaction request is obtained, the transaction request includes a transaction serial number, and the transaction serial number includes a computer room identification position.
  • a character at a specific position(s) among the multiple characters of the transaction serial number to indicate the identification position of the computer room.
  • the transaction request may include a non-idempotent request and an idempotent request.
  • non-idempotent requests may be, for example, payment, withdrawal, buying and selling of securities assets, etc. If these requests are repeatedly executed, the account status will change, such as account fund changes.
  • the idempotent request may be, for example, a balance query request, and even repeated execution will not cause the account status to change.
  • operation S220 it is determined whether there is a redirection rule for the first computer room indicated by the computer room identifier for processing the transaction request.
  • the redirection rules may be manually set and stored in the system according to actual needs, or may be generated based on other rules. For example, in the case of a failure in the first computer room, a redirection rule can be set or generated so that transaction requests that should have been processed by the first computer room are handed over to other computer rooms for processing.
  • operation S230 if there is no redirection rule or the redirection rule query fails, it is determined whether the first computer room is the current computer room.
  • the current computer room is the computer room that received the transaction request. If the computer room that received the transaction request is the computer room determined based on the computer room identification position, the request can be processed in the first computer room, otherwise operation S240 should be performed.
  • the transaction request is forwarded to the first computer room. If the computer room that received the transaction request is not the first computer room determined based on the computer room identification position, the transaction request is forwarded to the first computer room through routing, so that the transaction request is processed in the first computer room.
  • This method enables the transaction request of the same transaction serial number to be controllably routed to the designated computer room for processing, avoiding repeated transactions. Compared with the related technology that requires the transaction initiator to only send the request to the designated computer room, otherwise it will be rejected, this solution simplifies the user's learning and operation difficulty, and is more user-friendly.
  • FIG. 3 schematically shows a flowchart of a method for processing a transaction request according to another embodiment of the present disclosure.
  • the method may include operations S301 to S312.
  • a transaction request is obtained, the transaction request includes a transaction serial number, and the transaction serial number includes a computer room identification position.
  • operation S302 it is determined whether there is a redirection rule for the first computer room indicated by the computer room identifier for processing the transaction request. If it exists, perform operation S303 to determine that the third computer room after redirection is the target computer room. If it does not exist, perform operation S304 to determine that the first computer room indicated by the computer room identification position is the target computer room.
  • operation S305 it is determined whether the target computer room is the current computer room. For example, if there is a redirection rule, it is determined whether the third machine room to be redirected is the current machine room, and if there is no redirection rule, it is determined whether the first machine room indicated by the machine room identification position is the current machine room. If the target computer room is not the current computer room, perform operation S306 to forward the transaction request to the target computer room. If the target computer room is the current computer room, perform operation S307.
  • operation S307 it is determined whether there is a transaction record corresponding to the transaction request. If there is a transaction record, it means that the transaction has occurred, then perform operation S308; otherwise, perform operation S312 to execute the transaction request.
  • operation S308 it is determined whether the transaction record points to the current computer room, and if the transaction record points to the current computer room, continue to perform operation S310. If the transaction record points to a computer room other than the current computer room, in order to ensure the security of the system, the transaction request is given priority to the computer room that generated the transaction record for processing, that is, operation S309 is performed, and the computer room re-determined based on the transaction record is taken as the target computer room , And return to operation S305 (or directly go to operation S306) to continue processing.
  • transaction records of non-idempotent requests may be recorded, or all transaction records may be recorded.
  • Transaction records can be stored through a distributed system.
  • transaction records can be stored in a Redis database.
  • operation S310 it is determined whether the transaction request is a repeated transaction request (also can be expressed as a repeated request). If yes, perform operation S311 to refuse to execute the transaction request; otherwise, perform operation S312 to execute the transaction request.
  • the type of the transaction request can be determined. If it is a predetermined type of transaction request, such as a non-idempotent request, repeated operations are not allowed. If there is a transaction record, it is determined that the newly received request is a repeated transaction request. If it is a transaction request of other types, such as an idempotent request, specifically, such as a request to query the detailed information of a certain transaction, it will not be determined as a repeated transaction request.
  • a predetermined type of transaction request such as a non-idempotent request
  • repeated operations are not allowed. If there is a transaction record, it is determined that the newly received request is a repeated transaction request. If it is a transaction request of other types, such as an idempotent request, specifically, such as a request to query the detailed information of a certain transaction, it will not be determined as a repeated transaction request.
  • the method may further include synchronizing the transaction record to another computer room in the same area as the current computer room. For example, for computer room 10 and computer room 20 in the same city, after any computer room generates transaction records, it can be synchronized to another computer room as a backup, so that when one computer room fails, the other computer room can process the transaction of the failed computer room. request.
  • FIG. 3 shows a non-limiting implementation. Those skilled in the art can understand that some of the operations in the above operations S301 to S312 can also be used independently to form a complete technical solution, and it is not necessary to implement all of the above. operating.
  • the method may further include, if the first computer room is the current computer room, query whether there is a corresponding transaction record based on the transaction serial number, and if there is no corresponding Transaction records, the transaction request is processed, and in the case that the transaction request is a transaction request of a predetermined category, a transaction record of the transaction serial number is generated.
  • a transaction record of the transaction serial number is generated.
  • the method may further include, if there is a corresponding transaction record, re-determining a second computer room for processing the transaction request based on the transaction record, and if the second computer room is not In the current computer room, the transaction request is forwarded to the second computer room.
  • the transaction request is forwarded to the second computer room.
  • the method may further include, if the second computer room is the current computer room, determining whether the transaction request is a repeat request based on the transaction record, and if the transaction request is not a repeat request , Then execute the transaction request.
  • the transaction request For example, refer to the situation described in operations S301-S302-S304-S305-S307-S308-S310-S312 described in FIG. 3.
  • the method may further include, if there is a redirection rule, determining a third computer room after redirection, and if the third computer room is not the current computer room , Then forward the transaction request to the third computer room.
  • a redirection rule determining a third computer room after redirection, and if the third computer room is not the current computer room , Then forward the transaction request to the third computer room.
  • the method may further include, if the third computer room is the current computer room, query whether there is a corresponding transaction record based on the transaction serial number, and if there is no corresponding transaction record, The transaction request is processed, and if the transaction request is a transaction request of a predetermined category, a transaction record of the transaction serial number is generated.
  • the method may further include, if there is a corresponding transaction record, re-determining a fourth computer room for processing the transaction request based on the transaction record, if the fourth computer room If it is not the current computer room, forward the transaction request to the fourth computer room.
  • a fourth computer room for processing the transaction request based on the transaction record, if the fourth computer room If it is not the current computer room, forward the transaction request to the fourth computer room.
  • the present disclosure also provides a transaction request processing device.
  • the transaction request processing device of the embodiment of the disclosure will be described below with reference to FIG. 4.
  • FIG. 4 schematically shows a block diagram of a transaction request processing apparatus 400 according to an embodiment of the present disclosure.
  • the device 400 includes an obtaining module 410, a first determining module 420, a second determining module 430, and a forwarding module 440.
  • the device can perform various operations described above with reference to FIG. 2.
  • the obtaining module 410 executes the operation S210 described above with reference to FIG. 2 to obtain a transaction request, the transaction request includes a transaction serial number, and the transaction serial number includes a computer room identification position.
  • the first determining module 420 executes the operation S220 described above with reference to FIG. 2 to determine whether there is a redirection rule for the first computer room indicated by the computer room identifier for processing the transaction request.
  • the second determining module 430 executes the operation S230 described above with reference to FIG. 2 for determining whether the first computer room is the current computer room if there is no redirection rule or the redirection rule query fails.
  • the forwarding module 440 for example, performs the operation S240 described above with reference to FIG. 2, and is configured to forward the transaction request to the first computer room if the first computer room is not the current computer room.
  • any number of the modules, sub-modules, units, and sub-units, or at least part of the functions of any number of them may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be split into multiple modules for implementation.
  • any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be at least partially implemented as hardware circuits, such as Field Programmable Gate Array (FPGA), programmable gate array Logic arrays (Programmable Logic Arrays, abbreviated as PLA), systems on a chip, systems on a substrate, systems on a package, application specific integrated circuits (ASICs), or any other devices that can integrate or package circuits Realized by hardware or firmware in a reasonable manner, or realized by any one of the three realization methods of software, hardware, and firmware, or by an appropriate combination of any of them.
  • FPGA Field Programmable Gate Array
  • PLA programmable gate array Logic arrays
  • PLA programmable gate array Logic arrays
  • PLA programmable gate array Logic arrays
  • ASICs application specific integrated circuits
  • one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be at least partially implemented as a
  • any of the obtaining module 410, the first determining module 420, the second determining module 430, and the forwarding module 440 may be combined into one module for implementation, or any one of the modules may be split into multiple modules. Or, at least part of the functions of one or more of these modules may be combined with at least part of the functions of other modules and implemented in one module.
  • At least one of the obtaining module 410, the first determining module 420, the second determining module 430, and the forwarding module 440 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), Programmable logic array (PLA), system on chip, system on substrate, system on package, application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way to integrate or package the circuit, Or it can be implemented in any one of the three implementation modes of software, hardware and firmware or in an appropriate combination of any of them.
  • FPGA field programmable gate array
  • PLA Programmable logic array
  • ASIC application specific integrated circuit
  • At least one of the obtaining module 410, the first determining module 420, the second determining module 430, and the forwarding module 440 may be at least partially implemented as a computer program module, and when the computer program module is run, it may perform a corresponding function .
  • Fig. 5 schematically shows a block diagram of an electronic device suitable for implementing a method and apparatus for processing a transaction request according to an embodiment of the present disclosure.
  • the electronic device shown in FIG. 5 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present disclosure.
  • the electronic device shown in FIG. 5 may be implemented as a server cluster, including at least one processor (for example, the processor 501) and at least one memory (for example, the storage part 508).
  • an electronic device 500 includes a processor 501, which can be loaded into a random access memory according to a program stored in a read only memory (Read only Memory, ROM) 502 or from a storage part 508 (Random Access Memory, RAM for short) 503 executes various appropriate actions and processing.
  • the processor 501 may include, for example, a general-purpose microprocessor, such as a central processing unit (Central Processing Unit, CPU for short), an instruction set processor and/or a related chipset and/or a special-purpose microprocessor (for example, an application specific integrated circuit (ASIC)). ),and many more.
  • the processor 501 may also include on-board memory for caching purposes.
  • the processor 501 may include a single processing unit or multiple processing units for executing different actions of a method flow according to an embodiment of the present disclosure.
  • the processor 501 executes various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 502 and/or RAM 503. It should be noted that the program can also be stored in one or more memories other than ROM 502 and RAM 503. The processor 501 may also execute various operations of the method flow according to the embodiments of the present disclosure by executing programs stored in the one or more memories.
  • the electronic device 500 may further include an input/output (I/O) interface 505, and the input/output (I/O) interface 505 is also connected to the bus 504.
  • the electronic device 500 may also include one or more of the following components connected to the I/O interface 505: an input part 506 including a keyboard, a mouse, etc.; including a cathode ray tube (Cathode Ray Tube, CRT for short), a liquid crystal display The output part 507 of Liquid Crystal Display (LCD for short) and speakers, etc.; the storage part 508 including hard disks, etc.; and the communication part 509 including network interface cards such as Local Area Network (LAN for short) cards and modems.
  • LAN Local Area Network
  • the communication section 509 performs communication processing via a network such as the Internet.
  • the driver 510 is also connected to the I/O interface 505 as needed.
  • a removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as required, so that the computer program read therefrom is installed into the storage portion 508 as required.
  • the method flow according to the embodiment of the present disclosure may be implemented as a computer software program.
  • the embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart.
  • the computer program may be downloaded and installed from the network through the communication part 509, and/or installed from the removable medium 511.
  • the computer program is executed by the processor 501, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed.
  • the systems, devices, devices, modules, units, etc. described above may be implemented by computer program modules.
  • the present disclosure also provides a computer-readable medium.
  • the computer-readable medium may be included in the device/device/system described in the above embodiment; or it may exist alone without being assembled into the device/device/ In the system.
  • the aforementioned computer-readable medium carries one or more programs, and when the aforementioned one or more programs are executed, the method according to the embodiments of the present disclosure is implemented.
  • the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above.
  • Computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable removable Erasable Programmable ROM (EPROM or flash memory for short), optical fiber, Compact Disc Read-Only Memory (CD-ROM for short), optical storage device, magnetic storage device, or any of the above suitable combination.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in a baseband or as a part of a carrier wave, and a computer-readable program code is carried therein.
  • This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium.
  • the computer-readable medium may send, propagate, or transmit the program for use by or in combination with the instruction execution system, apparatus, or device .
  • the program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wireless, wired, optical cable, radio frequency signals, etc., or any suitable combination of the foregoing.
  • the computer-readable medium may include one or more memories other than the ROM 502 and/or RAM 503 and/or ROM 502 and RAM 503 described above.
  • each block in the flowchart or block diagram may represent a module, program segment, or part of the code, and the above-mentioned module, program segment, or part of the code contains one or more for realizing the specified logic function.
  • Executable instructions may also occur in a different order from the order marked in the drawings. For example, two blocks shown in succession can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by It is realized by a combination of dedicated hardware and computer instructions.

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Theoretical Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • User Interface Of Digital Computer (AREA)
  • Computer And Data Communications (AREA)

Abstract

The present disclosure provides a transaction request processing method, including obtaining a transaction request, wherein the transaction request includes a transaction serial number, the transaction serial number includes a machine room identification position, determining whether there is a redirection rule for a first computer room for processing the transaction request indicated by the computer room identification position, if there is no redirection rule or the redirection rule query fails, then determining whether the first computer room is the current computer room, and if the first computer room is not the current computer room, then forwarding the transaction request to the first computer room. The present disclosure further provides a transaction request processing device, an electronic device, and a computer readable medium.

Description

交易请求处理方法、装置、电子设备以及介质Transaction request processing method, device, electronic equipment and medium
相关申请的交叉引用Cross-references to related applications
本申请要求网联清算有限公司于2019年11月11日提交的、发明名称为“交易请求处理方法、装置、电子设备以及介质”的、中国专利申请号“201911098793.4”的优先权。This application requires the priority of the Chinese patent application number "201911098793.4" submitted by Net Union Clearing Co., Ltd. on November 11, 2019 with the title of "Transaction Request Processing Method, Apparatus, Electronic Equipment, and Medium".
技术领域Technical field
本公开涉及一种交易请求处理方法、装置、电子设备以及介质。The present disclosure relates to a transaction request processing method, device, electronic equipment and medium.
背景技术Background technique
为保证跨机房交易请求的多机房幂等性控制,相关技术要求交易发起方只能发送请求到指定的机房,否则予以拒绝,以保证相同一笔流水号的交易在同一个机房进行处理。然而,本发明人发现,这种方式不仅用户体验较差,而且在一些情况下会直接导致交易无法进行。In order to ensure the idempotent control of multi-room transaction requests, the related technology requires that the transaction initiator can only send the request to the designated computer room, otherwise it will be rejected to ensure that the transaction with the same serial number is processed in the same computer room. However, the inventor found that this method not only has a poor user experience, but in some cases directly causes the transaction to be unable to proceed.
发明内容Summary of the invention
本公开的一个方面提供了一种交易请求处理方法,包括获得交易请求,所述交易请求包括交易流水号,所述交易流水号中包括机房标识位,确定是否存在针对所述机房标识位指示的用于处理所述交易请求的第一机房的重定向规则,若不存在重定向规则或者重定向规则查询失败,则确定第一机房是否为当前机房,以及若所述第一机房不是当前机房,则将所述交易请求转发至所述第一机房。An aspect of the present disclosure provides a method for processing a transaction request, including obtaining a transaction request, the transaction request including a transaction serial number, the transaction serial number including a computer room identification position, and determining whether there is an indication for the computer room identification position The redirection rule of the first computer room used to process the transaction request. If there is no redirection rule or the redirection rule query fails, it is determined whether the first computer room is the current computer room, and if the first computer room is not the current computer room, Then, the transaction request is forwarded to the first computer room.
可选地,所述方法还包括若所述第一机房是当前机房,则基于所述交易流水号查询是否存在相应的交易记录,若不存在相应的交易记录,则处理所述交易请求,并且在所述交易请求为预定类别的交易请求的情况下,生成所述交易 流水号的交易记录。Optionally, the method further includes if the first computer room is the current computer room, querying whether there is a corresponding transaction record based on the transaction serial number, and if there is no corresponding transaction record, processing the transaction request, and In the case that the transaction request is a transaction request of a predetermined category, a transaction record of the transaction serial number is generated.
可选地,所述方法还包括将所述交易记录同步到与所述当前机房处于同一地区的另一机房。Optionally, the method further includes synchronizing the transaction record to another computer room in the same area as the current computer room.
可选地,所述方法还包括若存在相应的交易记录,则基于所述交易记录重新确定用于处理所述交易请求的第二机房,若所述第二机房不是当前机房,则将所述交易请求转发至所述第二机房。Optionally, the method further includes if there is a corresponding transaction record, re-determining a second computer room for processing the transaction request based on the transaction record, and if the second computer room is not the current computer room, then The transaction request is forwarded to the second computer room.
可选地,所述方法还包括若所述第二机房是当前机房,则基于所述交易记录确定所述交易请求是否为重复请求,如果所述交易请求不是重复请求,则执行所述交易请求。Optionally, the method further includes if the second computer room is the current computer room, determining whether the transaction request is a repeated request based on the transaction record, and if the transaction request is not a repeated request, executing the transaction request .
可选地,所述方法还包括若存在重定向规则,则确定重定向后的第三机房,若所述第三机房不是当前机房,则将所述交易请求转发至所述第三机房。Optionally, the method further includes determining a third computer room after redirection if there is a redirection rule, and if the third computer room is not the current computer room, forwarding the transaction request to the third computer room.
可选地,所述方法还包括若所述第三机房是当前机房,则基于所述交易流水号查询是否存在相应的交易记录,若不存在相应的交易记录,则处理所述交易请求,并且在所述交易请求为预定类别的交易请求的情况下,生成所述交易流水号的交易记录。Optionally, the method further includes if the third computer room is the current computer room, querying whether there is a corresponding transaction record based on the transaction serial number, and if there is no corresponding transaction record, processing the transaction request, and In the case that the transaction request is a transaction request of a predetermined category, a transaction record of the transaction serial number is generated.
可选地,所述方法还包括若存在相应的交易记录,则基于所述交易记录重新确定用于处理所述交易请求的第四机房,若所述第四机房不是当前机房,则将所述交易请求转发至所述第四机房。Optionally, the method further includes if there is a corresponding transaction record, re-determining a fourth computer room for processing the transaction request based on the transaction record, and if the fourth computer room is not the current computer room, then The transaction request is forwarded to the fourth computer room.
本公开的另一个方面提供了一种交易请求处理装置,包括获得模块、第一确定模块、第二确定模块以及转发模块。获得模块,用于获得交易请求,所述交易请求包括交易流水号,所述交易流水号中包括机房标识位。第一确定模块,用于确定是否存在针对所述机房标识位指示的用于处理所述交易请求的第一机房的重定向规则。第二确定模块,用于若不存在重定向规则或者重定向规则查询失败,则确定第一机房是否为当前机房。转发模块,用于若所述第一机房不是当前机房,则将所述交易请求转发至所述第一机房。Another aspect of the present disclosure provides a transaction request processing device, including an obtaining module, a first determining module, a second determining module, and a forwarding module. The obtaining module is configured to obtain a transaction request, the transaction request includes a transaction serial number, and the transaction serial number includes a computer room identification position. The first determining module is configured to determine whether there is a redirection rule for the first computer room indicated by the computer room identification position for processing the transaction request. The second determining module is configured to determine whether the first computer room is the current computer room if there is no redirection rule or the redirection rule query fails. The forwarding module is configured to forward the transaction request to the first computer room if the first computer room is not the current computer room.
本公开的另一个方面提供了一种电子设备,包括一个或多个处理器;以及 存储器,用于存储一个或多个计算机程序,其中,当所述一个或多个计算机程序被一个或多个处理器执行时,使得一个或多个处理器实现如上所述的方法。Another aspect of the present disclosure provides an electronic device including one or more processors; and a memory for storing one or more computer programs, wherein, when the one or more computer programs are used by one or more When the processor is executed, one or more processors are caused to implement the method described above.
本公开的另一个方面提供了一种计算机可读介质,其上存储有可执行指令,该指令被处理器执行时使处理器实现如上所述的方法。Another aspect of the present disclosure provides a computer-readable medium having executable instructions stored thereon, and when the instructions are executed by a processor, the processor implements the method as described above.
本公开的另一方面提供了一种计算机程序,所述计算机程序包括计算机可执行指令,所述指令在被执行时用于实现如上所述的方法。Another aspect of the present disclosure provides a computer program, which includes computer-executable instructions, which are used to implement the method as described above when executed.
本公开实施例提供的方法通过重定向规则以及机房标识位的转发规则,可以保证多个机房在处理交易请求时,同一交易流水号的交易请求在同一机房处理,避免相同流水号的交易请求出现重复交易的情况。The method provided by the embodiments of the present disclosure can ensure that when multiple computer rooms process transaction requests, the transaction request of the same transaction serial number is processed in the same computer room through the redirection rule and the forwarding rule of the computer room identification position, so as to avoid the occurrence of transaction requests with the same serial number. Repeated transactions.
附图说明Description of the drawings
通过以下参照附图对本公开实施例的描述,本公开的上述以及其他目的、特征和优点将更为清楚,在附图中:Through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, the above and other objectives, features, and advantages of the present disclosure will be clearer. In the accompanying drawings:
图1示意性示出了根据本公开实施例的交易请求处理方法和装置的示例性应用场景;Fig. 1 schematically shows an exemplary application scenario of a method and device for processing a transaction request according to an embodiment of the present disclosure;
图2示意性示出了根据本公开实施例的交易请求处理方法的流程图;Fig. 2 schematically shows a flowchart of a method for processing a transaction request according to an embodiment of the present disclosure;
图3示意性示出了根据本公开另一实施例的交易请求处理方法的流程图;Fig. 3 schematically shows a flowchart of a method for processing a transaction request according to another embodiment of the present disclosure;
图4示意性示出了根据本公开实施例的交易请求处理装置的框图;以及Fig. 4 schematically shows a block diagram of a transaction request processing device according to an embodiment of the present disclosure; and
图5示意性示出了根据本公开实施例的适于实现交易请求处理方法和装置的电子设备的方框图。Fig. 5 schematically shows a block diagram of an electronic device suitable for implementing a method and apparatus for processing a transaction request according to an embodiment of the present disclosure.
具体实施方式Detailed ways
以下,将参照附图来描述本公开的实施例。但是应该理解,这些描述只是示例性的,而并非要限制本公开的范围。在下面的详细描述中,为便于解释,阐述了许多具体的细节以提供对本公开实施例的全面理解。然而,明显地,一个或多个实施例在没有这些具体细节的情况下也可以被实施。此外,在以下说 明中,省略了对公知结构和技术的描述,以避免不必要地混淆本公开的概念。Hereinafter, embodiments of the present disclosure will be described with reference to the drawings. However, it should be understood that these descriptions are only exemplary, and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is obvious that one or more embodiments can also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily obscuring the concepts of the present disclosure.
在此使用的术语仅仅是为了描述具体实施例,而并非意在限制本公开。在此使用的术语“包括”、“包含”等表明了所述特征、步骤、操作和/或部件的存在,但是并不排除存在或添加一个或多个其他特征、步骤、操作或部件。The terminology used here is only for describing specific embodiments, and is not intended to limit the present disclosure. The terms "including", "including", etc. used herein indicate the existence of the described features, steps, operations and/or components, but do not exclude the presence or addition of one or more other features, steps, operations or components.
在此使用的所有术语(包括技术和科学术语)具有本领域技术人员通常所理解的含义,除非另外定义。应注意,这里使用的术语应解释为具有与本说明书的上下文相一致的含义,而不应以理想化或过于刻板的方式来解释。All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having meanings consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.
在使用类似于“A、B和C等中至少一个”这样的表述的情况下,一般来说应该按照本领域技术人员通常理解该表述的含义来予以解释(例如,“具有A、B和C中至少一个的系统”应包括但不限于单独具有A、单独具有B、单独具有C、具有A和B、具有A和C、具有B和C、和/或具有A、B、C的系统等)。在使用类似于“A、B或C等中至少一个”这样的表述的情况下,一般来说应该按照本领域技术人员通常理解该表述的含义来予以解释(例如,“具有A、B或C中至少一个的系统”应包括但不限于单独具有A、单独具有B、单独具有C、具有A和B、具有A和C、具有B和C、和/或具有A、B、C的系统等)。本领域技术人员还应理解,实质上任意表示两个或更多可选项目的转折连词和/或短语,无论是在说明书、权利要求书还是附图中,都应被理解为给出了包括这些项目之一、这些项目任一方、或两个项目的可能性。例如,短语“A或B”应当被理解为包括“A”或“B”、或“A和B”的可能性。In the case of using an expression similar to "at least one of A, B and C, etc.", generally speaking, it should be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "having A, B and C" At least one of the "systems" shall include, but is not limited to, systems having A alone, B alone, C alone, A and B, A and C, B and C, and/or systems having A, B, C, etc. ). In the case of using an expression similar to "at least one of A, B or C, etc.", generally speaking, it should be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "having A, B or C" At least one of the "systems" shall include, but is not limited to, systems having A alone, B alone, C alone, A and B, A and C, B and C, and/or systems having A, B, C, etc. ). Those skilled in the art should also understand that substantially any transitional conjunctions and/or phrases representing two or more optional items, whether in the description, claims or drawings, should be understood to include these The possibility of one of the projects, one of these projects, or two projects. For example, the phrase "A or B" should be understood to include the possibilities of "A" or "B", or "A and B."
本公开实施例的方法获得交易请求,所述交易请求包括交易流水号,所述交易流水号中包括机房标识位,确定是否存在针对所述机房标识位指示的用于处理所述交易请求的第一机房的重定向规则,若不存在重定向规则或者重定向规则查询失败,则确定第一机房是否为当前机房,以及若所述第一机房不是当前机房,则将所述交易请求转发至所述第一机房。The method of the embodiment of the present disclosure obtains a transaction request, the transaction request includes a transaction serial number, the transaction serial number includes a computer room identification position, and it is determined whether there is a second instruction for processing the transaction request for the computer room identification position. A redirection rule of a computer room, if there is no redirection rule or the redirection rule query fails, it is determined whether the first computer room is the current computer room, and if the first computer room is not the current computer room, the transaction request is forwarded to the The first computer room.
图1示意性示出了根据本公开实施例的交易请求处理方法和装置的应用场景。需要注意的是,图1所示仅为可以应用本公开实施例的系统架构的示例, 以帮助本领域技术人员理解本公开的技术内容,但并不意味着本公开实施例不可以用于其他设备、系统、环境或场景。Fig. 1 schematically shows an application scenario of a method and device for processing a transaction request according to an embodiment of the present disclosure. It should be noted that FIG. 1 is only an example of the system architecture to which the embodiments of the present disclosure can be applied to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used for other Equipment, system, environment or scenario.
如图1所示,该分布式系统100可以包括多个节点110以及网络120。网络120是用以在多个节点110之间提供通信链路的介质。网络120可以包括各种连接类型,例如有线、无线通信链路等等。节点110例如可以是专用的计算或存储设备,比如终端设备或服务器等。As shown in FIG. 1, the distributed system 100 may include multiple nodes 110 and a network 120. The network 120 is a medium used to provide a communication link between a plurality of nodes 110. The network 120 may include various connection types, such as wired and wireless communication links, and so on. The node 110 may be, for example, a dedicated computing or storage device, such as a terminal device or a server.
根据本公开实施例,多个节点110可以设置在不同的机房中,交易请求可以在各个机房中进行处理。不同的机房可以设置在同一城市内,也可以跨地域地设置在不同城市中。交易请求数据可以在该分布式系统100中得以处理,本公开实施例的交易请求处理方法可以应用于该分布式系统100。According to the embodiment of the present disclosure, multiple nodes 110 may be set in different computer rooms, and transaction requests may be processed in each computer room. Different computer rooms can be set up in the same city, or set up in different cities across regions. Transaction request data can be processed in the distributed system 100, and the transaction request processing method of the embodiment of the present disclosure can be applied to the distributed system 100.
应该理解,图1中的网络120,以及终端设备、服务器等节点110的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the number of the network 120 and the number of nodes 110 such as terminal devices and servers in FIG. 1 is merely illustrative. According to implementation needs, there can be any number of terminal devices, networks, and servers.
图2示意性示出了根据本公开实施例的交易请求处理方法的流程图。Fig. 2 schematically shows a flowchart of a method for processing a transaction request according to an embodiment of the present disclosure.
如图2所示,该方法包括操作S210~S240。该方法可以由分布式系统中的任意一个机房的服务器执行。As shown in FIG. 2, the method includes operations S210 to S240. This method can be executed by a server in any computer room in a distributed system.
在操作S210,获得交易请求,所述交易请求包括交易流水号,所述交易流水号中包括机房标识位。In operation S210, a transaction request is obtained, the transaction request includes a transaction serial number, and the transaction serial number includes a computer room identification position.
例如,可以设定在交易流水号的多位字符中的某个(些)特定位置的字符表示机房标识位。可以定义不同的标识所表示的机房,例如,10表示在第一城市的第一机房,11表示在第一城市的第二机房,20表示在第二城市的第三机房,21表示在第二城市的第四机房等等。For example, it is possible to set a character at a specific position(s) among the multiple characters of the transaction serial number to indicate the identification position of the computer room. You can define the computer room represented by different identifiers. For example, 10 means the first computer room in the first city, 11 means the second computer room in the first city, 20 means the third computer room in the second city, and 21 means the second computer room in the second city. The fourth computer room of the city and so on.
根据本公开实施例,该交易请求可以包括非幂等请求和幂等请求。其中,非幂等请求例如可以是支付、提现、买入卖出证券资产等,该些请求如果重复执行会导致账户状态变化,例如账户资金变化。幂等请求例如可以是余额查询请求,即使重复执行也不会导致账户状态变化。According to an embodiment of the present disclosure, the transaction request may include a non-idempotent request and an idempotent request. Among them, non-idempotent requests may be, for example, payment, withdrawal, buying and selling of securities assets, etc. If these requests are repeatedly executed, the account status will change, such as account fund changes. The idempotent request may be, for example, a balance query request, and even repeated execution will not cause the account status to change.
在操作S220,确定是否存在针对所述机房标识位指示的用于处理所述交易请求的第一机房的重定向规则。In operation S220, it is determined whether there is a redirection rule for the first computer room indicated by the computer room identifier for processing the transaction request.
根据本公开实施例,重定向规则可以是根据实际需要人为设置并存储在系统中的,也可以是基于另外一些规则而产生的。例如,在第一机房发生故障的情况下,可以设置或产生重定向规则,使得原本应当由第一机房处理的交易请求交由其他机房进行处理。According to the embodiments of the present disclosure, the redirection rules may be manually set and stored in the system according to actual needs, or may be generated based on other rules. For example, in the case of a failure in the first computer room, a redirection rule can be set or generated so that transaction requests that should have been processed by the first computer room are handed over to other computer rooms for processing.
在操作S230,若不存在重定向规则或者重定向规则查询失败,则确定第一机房是否为当前机房。其中,当前机房为接收到交易请求的机房,如果接收到交易请求的机房正是基于机房标识位确定的机房,则可以在该第一机房中处理该请求,否则应当执行操作S240。In operation S230, if there is no redirection rule or the redirection rule query fails, it is determined whether the first computer room is the current computer room. The current computer room is the computer room that received the transaction request. If the computer room that received the transaction request is the computer room determined based on the computer room identification position, the request can be processed in the first computer room, otherwise operation S240 should be performed.
在操作S240,若所述第一机房不是当前机房,则将所述交易请求转发至所述第一机房。如果,接收到交易请求的机房不是基于机房标识位确定的第一机房,则通过路由将交易请求转发到该第一机房,以便使得交易请求在第一机房进行处理。In operation S240, if the first computer room is not the current computer room, the transaction request is forwarded to the first computer room. If the computer room that received the transaction request is not the first computer room determined based on the computer room identification position, the transaction request is forwarded to the first computer room through routing, so that the transaction request is processed in the first computer room.
该方法使得同一交易流水号的交易请求可控地路由到指定的机房处理,避免出现重复交易的情况。相对于要求交易发起方只能发送请求到指定的机房,否则予以拒绝的相关技术,本方案简化用户的学习和操作难度,对用户更加友好。This method enables the transaction request of the same transaction serial number to be controllably routed to the designated computer room for processing, avoiding repeated transactions. Compared with the related technology that requires the transaction initiator to only send the request to the designated computer room, otherwise it will be rejected, this solution simplifies the user's learning and operation difficulty, and is more user-friendly.
图3示意性示出了根据本公开另一实施例的交易请求处理方法的流程图。Fig. 3 schematically shows a flowchart of a method for processing a transaction request according to another embodiment of the present disclosure.
如图3所示,该方法可以包括操作S301~S312。As shown in FIG. 3, the method may include operations S301 to S312.
在操作S301,获得交易请求,所述交易请求包括交易流水号,所述交易流水号中包括机房标识位。In operation S301, a transaction request is obtained, the transaction request includes a transaction serial number, and the transaction serial number includes a computer room identification position.
在操作S302,确定是否存在针对所述机房标识位指示的用于处理所述交易请求的第一机房的重定向规则。如果存在,则执行操作S303,确定重定向后的第三机房为目标机房。如果不存在,则执行操作S304,确定机房标识位指示的第一机房为目标机房。In operation S302, it is determined whether there is a redirection rule for the first computer room indicated by the computer room identifier for processing the transaction request. If it exists, perform operation S303 to determine that the third computer room after redirection is the target computer room. If it does not exist, perform operation S304 to determine that the first computer room indicated by the computer room identification position is the target computer room.
在操作S305,确定目标机房是否为当前机房。例如,若存在重定向规则,则确定重定向的第三机房是否为当前机房,若不存在重定向规则,则确定机房标识位指示的第一机房是否为当前机房。如果目标机房不是当前机房,则执行操作S306,将交易请求转发到目标机房。如果目标机房是当前机房,则执行操作S307。In operation S305, it is determined whether the target computer room is the current computer room. For example, if there is a redirection rule, it is determined whether the third machine room to be redirected is the current machine room, and if there is no redirection rule, it is determined whether the first machine room indicated by the machine room identification position is the current machine room. If the target computer room is not the current computer room, perform operation S306 to forward the transaction request to the target computer room. If the target computer room is the current computer room, perform operation S307.
在操作S307,确定是否存在与该交易请求对应的交易记录。如果存在交易记录,说明该交易已经发生过,则执行操作S308,否则,执行操作S312,执行该交易请求。In operation S307, it is determined whether there is a transaction record corresponding to the transaction request. If there is a transaction record, it means that the transaction has occurred, then perform operation S308; otherwise, perform operation S312 to execute the transaction request.
在操作S308,确定交易记录是否指向当前机房,如果交易记录指向当前机房,则继续执行操作S310。如果交易记录指向了非当前机房的其他机房,为了保证系统的安全性,优先将该交易请求交由产生交易记录的机房进行处理,即,执行操作S309,基于交易记录重新确定的机房作为目标机房,并返回操作S305(也可以直接转到操作S306)继续处理。In operation S308, it is determined whether the transaction record points to the current computer room, and if the transaction record points to the current computer room, continue to perform operation S310. If the transaction record points to a computer room other than the current computer room, in order to ensure the security of the system, the transaction request is given priority to the computer room that generated the transaction record for processing, that is, operation S309 is performed, and the computer room re-determined based on the transaction record is taken as the target computer room , And return to operation S305 (or directly go to operation S306) to continue processing.
根据本公开实施例,可以仅记录非幂等请求的交易记录,也可以记录全部的交易记录。交易记录可以通过分布式系统进行存储。例如,交易记录可以通过Redis数据库进行存储。According to the embodiments of the present disclosure, only transaction records of non-idempotent requests may be recorded, or all transaction records may be recorded. Transaction records can be stored through a distributed system. For example, transaction records can be stored in a Redis database.
在操作S310,确定交易请求是否为重复交易请求(也可表述为重复请求)。若是,则执行操作S311,拒绝执行该交易请求,否则执行操作S312,执行该交易请求。In operation S310, it is determined whether the transaction request is a repeated transaction request (also can be expressed as a repeated request). If yes, perform operation S311 to refuse to execute the transaction request; otherwise, perform operation S312 to execute the transaction request.
根据本公开实施例,可以判断交易请求的类别,若为预定类别的交易请求,例如非幂等请求,则不允许重复操作,如果存在交易记录则判定新收到的请求为重复交易请求。若为其他类别的交易请求,例如幂等请求,具体地,例如查询某一笔交易的详细信息的请求,则不将其判定为重复交易请求。According to the embodiments of the present disclosure, the type of the transaction request can be determined. If it is a predetermined type of transaction request, such as a non-idempotent request, repeated operations are not allowed. If there is a transaction record, it is determined that the newly received request is a repeated transaction request. If it is a transaction request of other types, such as an idempotent request, specifically, such as a request to query the detailed information of a certain transaction, it will not be determined as a repeated transaction request.
根据本公开实施例,在操作S312,执行交易请求之后,所述方法还可以包括,将所述交易记录同步到与所述当前机房处于同一地区的另一机房。例如,对于处于同一城市的机房10和机房20,任意一个机房产生交易记录之后,可 以将其同步到另一个机房,作为备份,以备在一个机房故障时另一个机房可以处理该故障机房的交易请求。According to an embodiment of the present disclosure, after the transaction request is executed in operation S312, the method may further include synchronizing the transaction record to another computer room in the same area as the current computer room. For example, for computer room 10 and computer room 20 in the same city, after any computer room generates transaction records, it can be synchronized to another computer room as a backup, so that when one computer room fails, the other computer room can process the transaction of the failed computer room. request.
需要说明的是,图3所示意的是非限定性的实施方式,本领域技术人员可以理解,上述操作S301~S312中的部分操作独立使用也可构成完整的技术方案,并不一定需要实现以上所有操作。It should be noted that FIG. 3 shows a non-limiting implementation. Those skilled in the art can understand that some of the operations in the above operations S301 to S312 can also be used independently to form a complete technical solution, and it is not necessary to implement all of the above. operating.
例如,所述方法在图2所示意的实施例的基础上还可以包括,若所述第一机房是当前机房,则基于所述交易流水号查询是否存在相应的交易记录,若不存在相应的交易记录,则处理所述交易请求,并且在所述交易请求为预定类别的交易请求的情况下,生成所述交易流水号的交易记录。例如参考图3描述的操作S301—S302—S304—S305—S307—S312描述的情况。For example, on the basis of the embodiment shown in FIG. 2, the method may further include, if the first computer room is the current computer room, query whether there is a corresponding transaction record based on the transaction serial number, and if there is no corresponding Transaction records, the transaction request is processed, and in the case that the transaction request is a transaction request of a predetermined category, a transaction record of the transaction serial number is generated. For example, refer to the case described in operations S301-S302-S304-S305-S307-S312 described in FIG. 3.
例如,所述方法在前述实施例的基础上还可以包括,若存在相应的交易记录,则基于所述交易记录重新确定用于处理所述交易请求的第二机房,若所述第二机房不是当前机房,则将所述交易请求转发至所述第二机房。例如参考图3描述的操作S301—S302—S304—S305—S307—S308—S309—(S305)—S306描述的情况。For example, on the basis of the foregoing embodiment, the method may further include, if there is a corresponding transaction record, re-determining a second computer room for processing the transaction request based on the transaction record, and if the second computer room is not In the current computer room, the transaction request is forwarded to the second computer room. For example, refer to the situation described in operations S301-S302-S304-S305-S307-S308-S309-(S305)-S306 described in FIG.
例如,所述方法在前述实施例的基础上还可以包括,若所述第二机房是当前机房,则基于所述交易记录确定所述交易请求是否为重复请求,如果所述交易请求不是重复请求,则执行所述交易请求。例如参考图3描述的操作S301—S302—S304—S305—S307—S308—S310—S312描述的情况。For example, on the basis of the foregoing embodiment, the method may further include, if the second computer room is the current computer room, determining whether the transaction request is a repeat request based on the transaction record, and if the transaction request is not a repeat request , Then execute the transaction request. For example, refer to the situation described in operations S301-S302-S304-S305-S307-S308-S310-S312 described in FIG. 3.
例如,所述方法在图2所示意的实施例的基础上还可以包括,所述方法还包括若存在重定向规则,则确定重定向后的第三机房,若所述第三机房不是当前机房,则将所述交易请求转发至所述第三机房。例如参考图3描述的操作S301—S302—S303—S305—S306描述的情况。For example, on the basis of the embodiment shown in FIG. 2, the method may further include, if there is a redirection rule, determining a third computer room after redirection, and if the third computer room is not the current computer room , Then forward the transaction request to the third computer room. For example, refer to the situation described in operations S301-S302-S303-S305-S306 described in FIG. 3.
又如,所述方法在前述实施例的基础上还可以包括,若所述第三机房是当前机房,则基于所述交易流水号查询是否存在相应的交易记录,若不存在相应的交易记录,则处理所述交易请求,并且在所述交易请求为预定类别的交易请 求的情况下,生成所述交易流水号的交易记录。例如参考图3描述的操作S301—S302—S303—S305—S307—S312描述的情况。For another example, on the basis of the foregoing embodiment, the method may further include, if the third computer room is the current computer room, query whether there is a corresponding transaction record based on the transaction serial number, and if there is no corresponding transaction record, The transaction request is processed, and if the transaction request is a transaction request of a predetermined category, a transaction record of the transaction serial number is generated. For example, the situation described with reference to operations S301-S302-S303-S305-S307-S312 described in FIG. 3.
再如,所述方法在前述实施例的基础上还可以包括,若存在相应的交易记录,则基于所述交易记录重新确定用于处理所述交易请求的第四机房,若所述第四机房不是当前机房,则将所述交易请求转发至所述第四机房。例如参考图3描述的操作S301—S302—S303—S305—S307—S308—S309—(S305)—S306描述的情况。For another example, on the basis of the foregoing embodiment, the method may further include, if there is a corresponding transaction record, re-determining a fourth computer room for processing the transaction request based on the transaction record, if the fourth computer room If it is not the current computer room, forward the transaction request to the fourth computer room. For example, refer to the situation described in operations S301-S302-S303-S305-S307-S308-S309-(S305)-S306 described in FIG.
基于同一发明构思,本公开还提供了一种交易请求处理装置,下面参照图4对本公开实施例的交易请求处理装置进行说明。Based on the same inventive concept, the present disclosure also provides a transaction request processing device. The transaction request processing device of the embodiment of the disclosure will be described below with reference to FIG. 4.
图4示意性示出了根据本公开实施例的交易请求处理装置400的框图。FIG. 4 schematically shows a block diagram of a transaction request processing apparatus 400 according to an embodiment of the present disclosure.
如图4所示,该装置400包括获得模块410、第一确定模块420、第二确定模块430以及转发模块440。该装置可以执行上文参考图2描述的各种操作。As shown in FIG. 4, the device 400 includes an obtaining module 410, a first determining module 420, a second determining module 430, and a forwarding module 440. The device can perform various operations described above with reference to FIG. 2.
获得模块410,例如执行上文参考图2描述的操作S210,用于获得交易请求,所述交易请求包括交易流水号,所述交易流水号中包括机房标识位。The obtaining module 410, for example, executes the operation S210 described above with reference to FIG. 2 to obtain a transaction request, the transaction request includes a transaction serial number, and the transaction serial number includes a computer room identification position.
第一确定模块420,例如执行上文参考图2描述的操作S220,用于确定是否存在针对所述机房标识位指示的用于处理所述交易请求的第一机房的重定向规则。The first determining module 420, for example, executes the operation S220 described above with reference to FIG. 2 to determine whether there is a redirection rule for the first computer room indicated by the computer room identifier for processing the transaction request.
第二确定模块430,例如执行上文参考图2描述的操作S230,用于若不存在重定向规则或者重定向规则查询失败,则确定第一机房是否为当前机房。The second determining module 430, for example, executes the operation S230 described above with reference to FIG. 2 for determining whether the first computer room is the current computer room if there is no redirection rule or the redirection rule query fails.
转发模块440,例如执行上文参考图2描述的操作S240,用于若所述第一机房不是当前机房,则将所述交易请求转发至所述第一机房。The forwarding module 440, for example, performs the operation S240 described above with reference to FIG. 2, and is configured to forward the transaction request to the first computer room if the first computer room is not the current computer room.
根据本公开的实施例的模块、子模块、单元、子单元中的任意多个、或其中任意多个的至少部分功能可以在一个模块中实现。根据本公开实施例的模块、子模块、单元、子单元中的任意一个或多个可以被拆分成多个模块来实现。根据本公开实施例的模块、子模块、单元、子单元中的任意一个或多个可以至少被部分地实现为硬件电路,例如现场可编程门阵列(Field Programmable Gate  Array,简称FPGA)、可编程逻辑阵列(Programmable Logic Arrays,简称PLA)、片上系统、基板上的系统、封装上的系统、专用集成电路(Application Specific Integrated Circuits,简称ASIC),或可以通过对电路进行集成或封装的任何其他的合理方式的硬件或固件来实现,或以软件、硬件以及固件三种实现方式中任意一种或以其中任意几种的适当组合来实现。或者,根据本公开实施例的模块、子模块、单元、子单元中的一个或多个可以至少被部分地实现为计算机程序模块,当该计算机程序模块被运行时,可以执行相应的功能。According to the embodiments of the present disclosure, any number of the modules, sub-modules, units, and sub-units, or at least part of the functions of any number of them, may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be split into multiple modules for implementation. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be at least partially implemented as hardware circuits, such as Field Programmable Gate Array (FPGA), programmable gate array Logic arrays (Programmable Logic Arrays, abbreviated as PLA), systems on a chip, systems on a substrate, systems on a package, application specific integrated circuits (ASICs), or any other devices that can integrate or package circuits Realized by hardware or firmware in a reasonable manner, or realized by any one of the three realization methods of software, hardware, and firmware, or by an appropriate combination of any of them. Alternatively, one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function may be performed.
例如,获得模块410、第一确定模块420、第二确定模块430以及转发模块440中的任意多个可以合并在一个模块中实现,或者其中的任意一个模块可以被拆分成多个模块。或者,这些模块中的一个或多个模块的至少部分功能可以与其他模块的至少部分功能相结合,并在一个模块中实现。根据本公开的实施例,获得模块410、第一确定模块420、第二确定模块430以及转发模块440中的至少一个可以至少被部分地实现为硬件电路,例如现场可编程门阵列(FPGA)、可编程逻辑阵列(PLA)、片上系统、基板上的系统、封装上的系统、专用集成电路(ASIC),或可以通过对电路进行集成或封装的任何其他的合理方式等硬件或固件来实现,或以软件、硬件以及固件三种实现方式中任意一种或以其中任意几种的适当组合来实现。或者,获得模块410、第一确定模块420、第二确定模块430以及转发模块440中的至少一个可以至少被部分地实现为计算机程序模块,当该计算机程序模块被运行时,可以执行相应的功能。For example, any of the obtaining module 410, the first determining module 420, the second determining module 430, and the forwarding module 440 may be combined into one module for implementation, or any one of the modules may be split into multiple modules. Or, at least part of the functions of one or more of these modules may be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the obtaining module 410, the first determining module 420, the second determining module 430, and the forwarding module 440 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), Programmable logic array (PLA), system on chip, system on substrate, system on package, application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way to integrate or package the circuit, Or it can be implemented in any one of the three implementation modes of software, hardware and firmware or in an appropriate combination of any of them. Alternatively, at least one of the obtaining module 410, the first determining module 420, the second determining module 430, and the forwarding module 440 may be at least partially implemented as a computer program module, and when the computer program module is run, it may perform a corresponding function .
图5示意性示出了根据本公开实施例的适于实现交易请求处理方法和装置的电子设备的方框图。图5示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。图5示出的电子设备可以实现为服务器集群,包括至少一个处理器(例如处理器501)以及至少一个存储器(例如存储部分508)。Fig. 5 schematically shows a block diagram of an electronic device suitable for implementing a method and apparatus for processing a transaction request according to an embodiment of the present disclosure. The electronic device shown in FIG. 5 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present disclosure. The electronic device shown in FIG. 5 may be implemented as a server cluster, including at least one processor (for example, the processor 501) and at least one memory (for example, the storage part 508).
如图5所示,根据本公开实施例的电子设备500包括处理器501,其可以根据存储在只读存储器(Read only Memory,简称ROM)502中的程序或者从 存储部分508加载到随机访问存储器(Random Access Memory,简称RAM)503中的程序而执行各种适当的动作和处理。处理器501例如可以包括通用微处理器,例如中央处理器(Central Processing Unit,简称CPU)、指令集处理器和/或相关芯片组和/或专用微处理器(例如,专用集成电路(ASIC)),等等。处理器501还可以包括用于缓存用途的板载存储器。处理器501可以包括用于执行根据本公开实施例的方法流程的不同动作的单一处理单元或者是多个处理单元。As shown in FIG. 5, an electronic device 500 according to an embodiment of the present disclosure includes a processor 501, which can be loaded into a random access memory according to a program stored in a read only memory (Read only Memory, ROM) 502 or from a storage part 508 (Random Access Memory, RAM for short) 503 executes various appropriate actions and processing. The processor 501 may include, for example, a general-purpose microprocessor, such as a central processing unit (Central Processing Unit, CPU for short), an instruction set processor and/or a related chipset and/or a special-purpose microprocessor (for example, an application specific integrated circuit (ASIC)). ),and many more. The processor 501 may also include on-board memory for caching purposes. The processor 501 may include a single processing unit or multiple processing units for executing different actions of a method flow according to an embodiment of the present disclosure.
在RAM 503中,存储有电子设备500操作所需的各种程序和数据。处理器501、ROM 502以及RAM 503通过总线504彼此相连。处理器501通过执行ROM 502和/或RAM 503中的程序来执行根据本公开实施例的方法流程的各种操作。需要注意,所述程序也可以存储在除ROM 502和RAM 503以外的一个或多个存储器中。处理器501也可以通过执行存储在所述一个或多个存储器中的程序来执行根据本公开实施例的方法流程的各种操作。In the RAM 503, various programs and data required for the operation of the electronic device 500 are stored. The processor 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. The processor 501 executes various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 502 and/or RAM 503. It should be noted that the program can also be stored in one or more memories other than ROM 502 and RAM 503. The processor 501 may also execute various operations of the method flow according to the embodiments of the present disclosure by executing programs stored in the one or more memories.
根据本公开的实施例,电子设备500还可以包括输入/输出(I/O)接口505,输入/输出(I/O)接口505也连接至总线504。电子设备500还可以包括连接至I/O接口505的以下部件中的一项或多项:包括键盘、鼠标等的输入部分506;包括诸如阴极射线管(Cathode Ray Tube,简称CRT)、液晶显示器(Liquid Crystal Display,简称LCD)等以及扬声器等的输出部分507;包括硬盘等的存储部分508;以及包括诸如局域网(Local Area Network,简称LAN)卡、调制解调器等的网络接口卡的通信部分509。通信部分509经由诸如因特网的网络执行通信处理。驱动器510也根据需要连接至I/O接口505。可拆卸介质511,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器510上,以便于从其上读出的计算机程序根据需要被安装入存储部分508。According to an embodiment of the present disclosure, the electronic device 500 may further include an input/output (I/O) interface 505, and the input/output (I/O) interface 505 is also connected to the bus 504. The electronic device 500 may also include one or more of the following components connected to the I/O interface 505: an input part 506 including a keyboard, a mouse, etc.; including a cathode ray tube (Cathode Ray Tube, CRT for short), a liquid crystal display The output part 507 of Liquid Crystal Display (LCD for short) and speakers, etc.; the storage part 508 including hard disks, etc.; and the communication part 509 including network interface cards such as Local Area Network (LAN for short) cards and modems. The communication section 509 performs communication processing via a network such as the Internet. The driver 510 is also connected to the I/O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as required, so that the computer program read therefrom is installed into the storage portion 508 as required.
根据本公开的实施例,根据本公开实施例的方法流程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法 的程序代码。在这样的实施例中,该计算机程序可以通过通信部分509从网络上被下载和安装,和/或从可拆卸介质511被安装。在该计算机程序被处理器501执行时,执行本公开实施例的系统中限定的上述功能。根据本公开的实施例,上文描述的系统、设备、装置、模块、单元等可以通过计算机程序模块来实现。According to the embodiment of the present disclosure, the method flow according to the embodiment of the present disclosure may be implemented as a computer software program. For example, the embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network through the communication part 509, and/or installed from the removable medium 511. When the computer program is executed by the processor 501, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to the embodiments of the present disclosure, the systems, devices, devices, modules, units, etc. described above may be implemented by computer program modules.
本公开还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的设备/装置/系统中所包含的;也可以是单独存在,而未装配入该设备/装置/系统中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被执行时,实现根据本公开实施例的方法。The present disclosure also provides a computer-readable medium. The computer-readable medium may be included in the device/device/system described in the above embodiment; or it may exist alone without being assembled into the device/device/ In the system. The aforementioned computer-readable medium carries one or more programs, and when the aforementioned one or more programs are executed, the method according to the embodiments of the present disclosure is implemented.
根据本公开的实施例,计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(Erasable ProgrammableROM,简称EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(Compact Disc Read-Only Memory,简称CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、有线、光缆、射频信号等等,或者上述的任意合适的组合。According to an embodiment of the present disclosure, the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable removable Erasable Programmable ROM (EPROM or flash memory for short), optical fiber, Compact Disc Read-Only Memory (CD-ROM for short), optical storage device, magnetic storage device, or any of the above suitable combination. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as a part of a carrier wave, and a computer-readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium. The computer-readable medium may send, propagate, or transmit the program for use by or in combination with the instruction execution system, apparatus, or device . The program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wireless, wired, optical cable, radio frequency signals, etc., or any suitable combination of the foregoing.
例如,根据本公开的实施例,计算机可读介质可以包括上文描述的ROM 502和/或RAM 503和/或ROM 502和RAM 503以外的一个或多个存储器。For example, according to an embodiment of the present disclosure, the computer-readable medium may include one or more memories other than the ROM 502 and/or RAM 503 and/or ROM 502 and RAM 503 described above.
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions, and operations of the system, method, and computer program product according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, program segment, or part of the code, and the above-mentioned module, program segment, or part of the code contains one or more for realizing the specified logic function. Executable instructions. It should also be noted that, in some alternative implementations, the functions marked in the block may also occur in a different order from the order marked in the drawings. For example, two blocks shown in succession can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by It is realized by a combination of dedicated hardware and computer instructions.
本领域技术人员可以理解,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合或/或结合,即使这样的组合或结合没有明确记载于本公开中。特别地,在不脱离本公开精神和教导的情况下,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合和/或结合。所有这些组合和/或结合均落入本公开的范围。Those skilled in the art can understand that the features described in the various embodiments of the present disclosure and/or the claims can be combined or/or combined in various ways, even if such combinations or combinations are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the various embodiments of the present disclosure and/or the features described in the claims can be combined and/or combined in various ways. All these combinations and/or combinations fall within the scope of the present disclosure.
以上对本公开的实施例进行了描述。但是,这些实施例仅仅是为了说明的目的,而并非为了限制本公开的范围。尽管在以上分别描述了各实施例,但是这并不意味着各个实施例中的措施不能有利地结合使用。本公开的范围由所附权利要求及其等同物限定。不脱离本公开的范围,本领域技术人员可以做出多种替代和修改,这些替代和修改都应落在本公开的范围之内。The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only, and are not intended to limit the scope of the present disclosure. Although the respective embodiments are described above, this does not mean that the measures in the respective embodiments cannot be advantageously used in combination. The scope of the present disclosure is defined by the appended claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art can make various substitutions and modifications, and these substitutions and modifications should fall within the scope of the present disclosure.

Claims (11)

  1. 一种交易请求处理方法,包括:A method for processing transaction requests, including:
    获得交易请求,所述交易请求包括交易流水号,所述交易流水号中包括机房标识位;Obtaining a transaction request, where the transaction request includes a transaction serial number, and the transaction serial number includes a computer room identification position;
    确定是否存在针对所述机房标识位指示的用于处理所述交易请求的第一机房的重定向规则;Determining whether there is a redirection rule for the first computer room indicated by the computer room identification position for processing the transaction request;
    若不存在重定向规则或者重定向规则查询失败,则确定第一机房是否为当前机房;以及If there is no redirection rule or the redirection rule query fails, it is determined whether the first computer room is the current computer room; and
    若所述第一机房不是当前机房,则将所述交易请求转发至所述第一机房。If the first computer room is not the current computer room, forward the transaction request to the first computer room.
  2. 根据权利要求1所述的方法,还包括:The method according to claim 1, further comprising:
    若所述第一机房是当前机房,则基于所述交易流水号查询是否存在相应的交易记录;If the first computer room is the current computer room, query whether there is a corresponding transaction record based on the transaction serial number;
    若不存在相应的交易记录,则处理所述交易请求,并且在所述交易请求为预定类别的交易请求的情况下,生成所述交易流水号的交易记录。If there is no corresponding transaction record, the transaction request is processed, and if the transaction request is a transaction request of a predetermined type, a transaction record of the transaction serial number is generated.
  3. 根据权利要求2所述的方法,还包括:The method according to claim 2, further comprising:
    将所述交易记录同步到与所述当前机房处于同一地区的另一机房。Synchronize the transaction record to another computer room in the same area as the current computer room.
  4. 根据权利要求2或3所述的方法,还包括:The method according to claim 2 or 3, further comprising:
    若存在相应的交易记录,则基于所述交易记录重新确定用于处理所述交易请求的第二机房;If there is a corresponding transaction record, re-determine the second computer room for processing the transaction request based on the transaction record;
    若所述第二机房不是当前机房,则将所述交易请求转发至所述第二机房。If the second computer room is not the current computer room, forward the transaction request to the second computer room.
  5. 根据权利要求4所述的方法,还包括:The method according to claim 4, further comprising:
    若所述第二机房是当前机房,则基于所述交易记录确定所述交易请求是否为重复请求;If the second computer room is the current computer room, determining whether the transaction request is a repeated request based on the transaction record;
    如果所述交易请求不是重复请求,则执行所述交易请求。If the transaction request is not a repeated request, the transaction request is executed.
  6. 根据权利要求1-5任一项所述的方法,还包括:The method according to any one of claims 1-5, further comprising:
    若存在重定向规则,则确定重定向后的第三机房;If there is a redirection rule, determine the third computer room after redirection;
    若所述第三机房不是当前机房,则将所述交易请求转发至所述第三机房。If the third computer room is not the current computer room, forward the transaction request to the third computer room.
  7. 根据权利要求6所述的方法,还包括:The method according to claim 6, further comprising:
    若所述第三机房是当前机房,则基于所述交易流水号查询是否存在相应的交易记录;If the third computer room is the current computer room, query whether there is a corresponding transaction record based on the transaction serial number;
    若不存在相应的交易记录,则处理所述交易请求,并且在所述交易请求为所述预定类别的交易请求的情况下,生成所述交易流水号的交易记录。If there is no corresponding transaction record, the transaction request is processed, and if the transaction request is a transaction request of the predetermined type, a transaction record of the transaction serial number is generated.
  8. 根据权利要求7所述的方法,还包括:The method according to claim 7, further comprising:
    若存在相应的交易记录,则基于所述交易记录重新确定用于处理所述交易请求的第四机房;If there is a corresponding transaction record, re-determine the fourth computer room for processing the transaction request based on the transaction record;
    若所述第四机房不是当前机房,则将所述交易请求转发至所述第四机房。If the fourth computer room is not the current computer room, forward the transaction request to the fourth computer room.
  9. 一种交易请求处理装置,包括:A transaction request processing device, including:
    获得模块,用于获得交易请求,所述交易请求包括交易流水号,所述交易流水号中包括机房标识位;The obtaining module is configured to obtain a transaction request, the transaction request includes a transaction serial number, and the transaction serial number includes a computer room identification position;
    第一确定模块,用于确定是否存在针对所述机房标识位指示的用于处理所述交易请求的第一机房的重定向规则;The first determining module is configured to determine whether there is a redirection rule for the first computer room indicated by the computer room identification position for processing the transaction request;
    第二确定模块,用于若不存在重定向规则或者重定向规则查询失败,则确定第一机房是否为当前机房;以及The second determining module is configured to determine whether the first computer room is the current computer room if there is no redirection rule or the redirection rule query fails; and
    转发模块,用于若所述第一机房不是当前机房,则将所述交易请求转发至所述第一机房。The forwarding module is configured to forward the transaction request to the first computer room if the first computer room is not the current computer room.
  10. 一种电子设备,包括:An electronic device including:
    一个或多个处理器;One or more processors;
    存储器,用于存储一个或多个计算机程序,Memory, used to store one or more computer programs,
    其中,当一个或多个计算机程序被一个或多个处理器执行时,使得一个或多个处理器实现权利要求1至8中任一项的方法。Wherein, when one or more computer programs are executed by one or more processors, one or more processors are caused to implement the method of any one of claims 1 to 8.
  11. 一种计算机可读介质,其上存储有可执行指令,该指令被处理器执行时使处理器实现权利要求1至8中任一项的方法。A computer-readable medium having executable instructions stored thereon, which when executed by a processor enables the processor to implement the method of any one of claims 1 to 8.
PCT/CN2020/128193 2019-11-11 2020-11-11 Transaction request processing method and device, electronic device, and medium WO2021093784A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911098793.4 2019-11-11
CN201911098793.4A CN112785300A (en) 2019-11-11 2019-11-11 Transaction request processing method and device, electronic equipment and medium

Publications (1)

Publication Number Publication Date
WO2021093784A1 true WO2021093784A1 (en) 2021-05-20

Family

ID=75749860

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/128193 WO2021093784A1 (en) 2019-11-11 2020-11-11 Transaction request processing method and device, electronic device, and medium

Country Status (2)

Country Link
CN (1) CN112785300A (en)
WO (1) WO2021093784A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150310188A1 (en) * 2014-04-23 2015-10-29 Intralinks, Inc. Systems and methods of secure data exchange
CN108415792A (en) * 2018-01-15 2018-08-17 阿里巴巴集团控股有限公司 Disaster tolerance system, method, apparatus and equipment
CN109727036A (en) * 2018-05-14 2019-05-07 网联清算有限公司 Transaction processing method and its device
CN110213365A (en) * 2019-05-30 2019-09-06 掌阅科技股份有限公司 User access request processing method and electronic equipment based on user partition
CN110443593A (en) * 2019-08-07 2019-11-12 网联清算有限公司 Transaction processing method and device, transaction processing system and computer system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109508912B (en) * 2018-12-29 2021-05-28 广州虎牙信息科技有限公司 Service scheduling method, device, equipment and storage medium
CN110266747B (en) * 2019-04-12 2022-04-08 创新先进技术有限公司 Method and device for switching machine room of service request

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150310188A1 (en) * 2014-04-23 2015-10-29 Intralinks, Inc. Systems and methods of secure data exchange
CN108415792A (en) * 2018-01-15 2018-08-17 阿里巴巴集团控股有限公司 Disaster tolerance system, method, apparatus and equipment
CN109727036A (en) * 2018-05-14 2019-05-07 网联清算有限公司 Transaction processing method and its device
CN110213365A (en) * 2019-05-30 2019-09-06 掌阅科技股份有限公司 User access request processing method and electronic equipment based on user partition
CN110443593A (en) * 2019-08-07 2019-11-12 网联清算有限公司 Transaction processing method and device, transaction processing system and computer system

Also Published As

Publication number Publication date
CN112785300A (en) 2021-05-11

Similar Documents

Publication Publication Date Title
US10679210B2 (en) Blockchain transaction commitment ordering
US11189293B1 (en) Cooperative delegation for digital assistants
US10657526B2 (en) System and method to dynamically setup a private sub-blockchain based on agility of transaction processing
US20220239496A1 (en) Blockchain consensus method, device and system
US10212108B2 (en) Method and system for expanding function of message in communication session
JP2020088857A (en) Method for constructing sub block-chain in block-chain system constructed of distributed network of plurality of nodes, and block-chain system program
CN110401630B (en) Transaction certificate verification method, device, electronic equipment and medium
CN109408214A (en) A kind of method for parallel processing of data, device, electronic equipment and readable medium
KR20200132518A (en) System for supporting transaction interoperation between blockchain networks and method thereof
CN109951546A (en) Transactions requests processing method, device, equipment and medium based on intelligent contract
US20190238456A1 (en) Multi-tenant routing management
US9684711B2 (en) System and method for providing agent service to user terminal
CN110673959A (en) System, method and apparatus for processing tasks
CA3217578A1 (en) Payment processing method, device, medium and electronic device
JP2022539283A (en) A method and system for validating blockchain data stored in a storage format different from the blockchain
WO2022142504A1 (en) Meeting group merging method and device
KR102553877B1 (en) A method and system for efficiently processing the high transaction throughput required by DApps in the blockchain
WO2021093784A1 (en) Transaction request processing method and device, electronic device, and medium
US10628342B1 (en) System and method for accelerating performance of non-volatile memory RAID stacks
US20220351076A1 (en) Personalized node ranking method and system using random walk
CN109976902B (en) Task processing method, system, electronic device and computer readable medium
CN113014650B (en) Processing method and device for data request, computing equipment and medium
WO2022063157A1 (en) Parameter configuration method and related system
CN112764897B (en) Task request processing method, device and system and computer readable storage medium
US10467156B1 (en) System and method of improving efficiency in parallel data processing of a RAID array

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20888544

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20888544

Country of ref document: EP

Kind code of ref document: A1