CN114584629B - Transaction message processing method and device - Google Patents

Transaction message processing method and device Download PDF

Info

Publication number
CN114584629B
CN114584629B CN202210489430.9A CN202210489430A CN114584629B CN 114584629 B CN114584629 B CN 114584629B CN 202210489430 A CN202210489430 A CN 202210489430A CN 114584629 B CN114584629 B CN 114584629B
Authority
CN
China
Prior art keywords
host
information
transaction
transaction message
service domain
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210489430.9A
Other languages
Chinese (zh)
Other versions
CN114584629A (en
Inventor
罗娜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Everbright Bank Co Ltd
Original Assignee
China Everbright Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Everbright Bank Co Ltd filed Critical China Everbright Bank Co Ltd
Priority to CN202210489430.9A priority Critical patent/CN114584629B/en
Publication of CN114584629A publication Critical patent/CN114584629A/en
Application granted granted Critical
Publication of CN114584629B publication Critical patent/CN114584629B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/302Route determination based on requested QoS
    • H04L45/306Route determination based on the nature of the carried application

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Marketing (AREA)
  • Signal Processing (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a transaction message processing method and a device, which are applied to the field of data processing, and the method comprises the following steps: analyzing the received transaction message to obtain transaction code information; determining business domain information corresponding to the transaction message according to the transaction code information, and matching a corresponding target host according to the business domain information; the transaction message is forwarded to the corresponding application server through the target host, the problem that in the related technology, the transaction message processing increases the operation risk under multiple services and the isolation degree is not enough, and the problem that the deployment mode is complex under a non-micro-service framework can be solved by processing the transaction message through the application server, and the matched host is determined through the transaction code information, so that the transaction message is forwarded, the transaction granularity is minimum, and the optimal effect can be achieved when the services are isolated and disassembled; only the transaction routing path is required to be modified, the service system modification is not required, seamless switching can be performed during modification switching, and the implementation efficiency is high.

Description

Transaction message processing method and device
Technical Field
The invention relates to the field of data processing, in particular to a transaction message processing method and device.
Background
The existing application system adopts middleware (such as tuxedo) connection, the deployment mode is load balancing peer-to-peer deployment, a plurality of application servers are deployed, the service processing logic of each application host is the same, a single application server processes a plurality of services, the operating environment is the same, and system resources are shared.
The transaction processing flow is as follows: the external system transaction request service system is routed to one of the application servers 1-N randomly through the middleware, the internal gateway of the application server identifies the transaction code, and performs service module transaction routing according to the transaction code, and finally distributes different service transactions to different service modules, and the service modules perform corresponding service processing.
The application system has various operation services, transaction attributes of the services are different, and the transaction attributes comprise: high concurrency, high real-time, stable service change, frequent service change and the like; the system runs under the same system environment, the system resources are shared, meanwhile, the system resources are contended and robbed, and the running risk under multiple services is increased; the development of each business is different, and the change rule of the system function is not fixed. If the service A is frequently changed, the normal operation of the service B can be influenced, and the host is isolated according to the module, so that the isolation degree is not enough; under the architecture of non-micro service, how to deploy multiple services in the same system is complicated in deployment mode.
Aiming at the problems that the transaction message processing in the related technology increases the operation risk under multiple services, the isolation is not enough, and the deployment mode is more complicated under a non-micro-service framework, a solution is not provided.
Disclosure of Invention
The embodiment of the invention provides a transaction message processing method and a transaction message processing device, which at least solve the problems that in the related art, transaction message processing increases operation risks under multiple services, isolation is insufficient, and a deployment mode is complex under a non-micro-service framework.
According to an embodiment of the present invention, a transaction message processing method is provided, including:
analyzing the received transaction message to obtain transaction code information of the transaction message;
determining business domain information corresponding to the transaction message according to the transaction code information, and matching a corresponding target host according to the business domain information;
and forwarding the transaction message to a corresponding application server through the target host, wherein the application server is used for processing the transaction message.
Optionally, determining service domain information corresponding to the transaction message according to the transaction code information, and matching a corresponding target host according to the service domain information includes:
matching service domain information and host information in a shared memory according to the transaction code information, wherein the shared memory stores the corresponding relation of the transaction code information, the service domain information and the host information;
and searching a matched target host according to the service domain information and the host information.
Optionally, searching for a matched target host according to the service domain information and the host information includes:
generating a host list according to the host information;
screening one or more hosts which are currently in a survival state from the host list according to the service domain information;
and selecting the matched target host from the one or more hosts.
Optionally, the screening one or more hosts currently in an alive state from the host list according to the service domain information includes:
sequencing all the hosts in the host list according to a sequence;
repeatedly executing the following steps until the last host screens out the one or more hosts which are currently in the survival state:
searching a corresponding host according to a static variable, and increasing the static variable by 1, wherein an initial value of the static variable is preset;
and detecting whether the state of the searched host is healthy or not through the set detection configuration file, and determining that the searched host is in the survival state currently under the condition that the detection result is yes.
Optionally, matching the service domain information and the host information in the shared memory according to the transaction code information includes:
using a showsm tool to query the shared memory;
and acquiring the service domain information and the host information matched with the transaction code information in the shared memory.
Optionally, before analyzing the received transaction message to obtain the transaction code information of the transaction message, the method further includes:
combing out service domain information according to service attributes or service functions;
listing a host list corresponding to service domain information, and writing the corresponding relation between the service domain information and the host list into a file match _ group.cfg;
combing a transaction code list according to the service domain information, and writing the corresponding relation between the service domain information and the transaction code list into a file match _ route.cfg;
and writing the service domain information, the transaction code information and the host information into a shared memory according to the file match _ group.cfg and the file match _ route.cfg.
According to another embodiment of the present invention, there is also provided a transaction message processing apparatus, including:
the analysis module is used for analyzing the received transaction message to obtain the transaction code information of the transaction message;
the determining module is used for determining the business domain information corresponding to the transaction message according to the transaction code information and matching the corresponding target host according to the business domain information;
and the forwarding module is used for forwarding the transaction message to a corresponding application server through the target host, wherein the application server is used for processing the transaction message.
Optionally, the determining module includes:
the matching submodule is used for matching the service domain information with the host information in a shared memory according to the transaction code information, wherein the shared memory stores the corresponding relation among the transaction code information, the service domain information and the host information;
and the searching submodule is used for searching the matched target host according to the service domain information and the host information.
Optionally, the lookup sub-module includes:
the generating unit is used for generating a host list according to the host information;
the screening unit is used for screening one or more hosts which are currently in a survival state from the host list according to the service domain information;
a first obtaining unit, configured to select the matched target host from the one or more hosts.
Optionally, the screening unit is further configured to sort all hosts in the host list according to a sequence; repeatedly executing the following steps until the last host screens out the one or more hosts which are currently in the survival state: the method comprises the steps of searching a corresponding host according to a static variable, increasing the static variable by 1, detecting whether the state of the searched host is healthy or not through a set detection configuration file, and determining that the searched host is in the survival state currently under the condition that the detection result is yes.
Optionally, the matching sub-module includes:
the query unit is used for querying the shared memory by using a showsm tool;
and the second acquisition unit is used for acquiring the service domain information and the host information which are matched with the transaction code information in the shared memory.
Optionally, the apparatus further comprises:
the carding module is used for carding out business domain information according to business attributes or business functions;
the first writing module is used for listing a host list corresponding to the service domain information and writing the corresponding relation between the service domain information and the host list into a file match _ group.cfg;
the second writing module is used for carding out a transaction code list according to the service domain information and writing the corresponding relation between the service domain information and the transaction code list into a file match _ route.cfg;
and a third writing module, configured to write the service domain information, the transaction code information, and the host information into a shared memory according to the file match _ group.cfg and the file match _ route.cfg.
According to a further embodiment of the present invention, a computer-readable storage medium is also provided, in which a computer program is stored, wherein the computer program is configured to perform the steps of any of the above-described method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, comprising a memory in which a computer program is stored and a processor configured to run the computer program to perform the steps of any of the method embodiments described above.
According to the invention, the received transaction message is analyzed to obtain the transaction code information of the transaction message; determining business domain information corresponding to the transaction message according to the transaction code information, and matching a corresponding target host according to the business domain information; the message is forwarded to the corresponding application server through the target host, wherein the application server is used for processing the transaction message, so that the problems that in the related technology, the transaction message processing increases the operation risk under multiple services and the isolation degree is not enough, and the deployment mode is relatively complex under a non-micro-service framework can be solved, and the matched host is determined through the transaction code information, so that the transaction message is forwarded, the transaction granularity is minimum, and the optimal effect can be achieved when the services are isolated and split; only the transaction routing path is required to be modified, the service system modification is not required, seamless switching can be performed during modification switching, and the implementation efficiency is high.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware structure of a mobile terminal of a transaction message processing method according to an embodiment of the present invention;
FIG. 2 is a flow diagram of a transaction message processing method according to an embodiment of the invention;
FIG. 3 is a flow diagram of a transaction message processing method according to an alternative embodiment of the invention;
FIG. 4 is a diagram illustrating a head index memory in a shared memory according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a service domain information memory in a shared memory according to an embodiment of the present invention;
FIG. 6 is a diagram illustrating a host message memory in a shared memory according to an embodiment of the invention;
FIG. 7 is a diagram illustrating a transaction code information memory in a shared memory according to an embodiment of the invention;
FIG. 8 is a flow diagram of matching a host against a transaction code according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of a matching host according to an embodiment of the present invention;
FIG. 10 is a schematic diagram of transaction level based service scoping functionality according to an embodiment of the present invention;
fig. 11 is a transaction message processing device according to an embodiment of the invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Example 1
The method provided by the first embodiment of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking a mobile terminal as an example, fig. 1 is a hardware structure block diagram of a mobile terminal of a transaction message processing method according to an embodiment of the present invention, and as shown in fig. 1, the mobile terminal may include one or more processors 102 (only one is shown in fig. 1) (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), and a memory 104 for storing data, and optionally, the mobile terminal may further include a transmission device 106 for a communication function and an input/output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program and a module of application software, such as a computer program corresponding to the transaction message processing method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet via wireless.
In this embodiment, a transaction message processing method operating in the mobile terminal or the network architecture is provided, and fig. 2 is a flowchart of the transaction message processing method according to the embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
step S202, analyzing the received transaction message to obtain transaction code information of the transaction message;
step S204, determining business domain information corresponding to the transaction message according to the transaction code information, and matching a corresponding target host according to the business domain information;
step S206, the transaction message is forwarded to a corresponding application server through the target host, where the application server is configured to process the transaction message.
Through the steps S202 to S206, the problems that in the related art, transaction message processing increases operation risks under multiple services, isolation is insufficient, and deployment modes are complex under a non-micro-service framework can be solved, and the matched host is determined through transaction code information, so that the transaction message is forwarded, transaction granularity is minimum, and when the services are isolated and split, the optimal effect can be achieved; only the transaction routing path is required to be modified, the service system modification is not required, seamless switching can be performed during modification switching, and the implementation efficiency is high.
Fig. 3 is a flowchart of a transaction message processing method according to an alternative embodiment of the present invention, and as shown in fig. 3, the step S204 may specifically include:
step S302, matching service domain information and host information in a shared memory according to transaction code information, wherein the shared memory stores the corresponding relation of the transaction code information, the service domain information and the host information;
the shared memory in the embodiment of the invention mainly comprises: memory head index, service domain information, host information and transaction code information.
Fig. 4 is a schematic diagram of a memory header index memory in a shared memory according to an embodiment of the present invention, where, as shown in fig. 4, the memory header index memory includes a memory length, a service domain information offset, a host information offset, and transaction code information.
Fig. 5 is a schematic diagram of a service domain information memory in a shared memory according to an embodiment of the present invention, and as shown in fig. 5, the service domain information memory includes the number of service domains, a service domain a, a service domain B, …, and a service domain N.
Fig. 6 is a schematic diagram of a host information memory in a shared memory according to an embodiment of the present invention, where, as shown in fig. 6, the host information memory includes a number of hosts, host information and corresponding states, and the host information includes host information 1 to host information N.
Fig. 7 is a schematic diagram of a transaction code information memory in a shared memory according to an embodiment of the present invention, and as shown in fig. 7, the transaction code information memory includes the number of check code information, transaction codes 1 to N, and corresponding service domains.
In an embodiment of the present invention, the step S302 specifically includes: using a showsm tool to query the shared memory; and acquiring the service domain information and the host information matched with the transaction code information in the shared memory.
In an alternative embodiment, a shared memory technology may be used, an initshm tool is newly added, and the service domain information, the transaction code information, and the host information are written into the shared memory in the following manner: combing out service domain information according to service attributes or service functions; listing a host list corresponding to service domain information, and writing the corresponding relation between the service domain information and the host list into a file match _ group.cfg; combing a transaction code list according to the service domain information, and writing the corresponding relation between the service domain information and the transaction code list into a file match _ route.cfg; and writing the service domain information, the transaction code information and the host information into a shared memory according to the file match _ group.cfg and the file match _ route.cfg.
And combing the serial number of the service domain unit according to the service attribute or the service function. For example: the method comprises the following steps that a service domain-A, a service domain-B and a service domain-C are used, and then machine lists corresponding to the service domains are listed. Writing the supported service domain list and the supported host list into a file match _ group.cfg, wherein the file format is as follows:
[group_list]:
UNIT-A;
UNIT-B;
UNIT-C;
[UNIT-A]:
APP001;
APP002;
APP003;
[UNIT-B]:
APP101;
APP102;
APP103;
[UNIT-B]:
APP201;
APP302;
APP403。
and (3) combing a transaction code list according to a service domain, and writing the transaction code list into match _ route.cfg according to the corresponding relation, wherein the file format is as follows:
###UNIT-A;
# T0001 is the transaction code;
T0001 UNIT-A;
T0002 UNIT-A;
###UNIT-B;
T0011 UNIT-B;
T0012 UNIT-B;
###UNIT-C;
T0021 UNIT-C;
T0032 UNIT-C。
for daily maintenance, a shared memory showsm query tool is newly added, and the memory information can be queried. For the correctness of routing, the host health detection is required to be carried out, and a host detection configuration file, i.e. checkserver.cfg, is set, wherein the format and the parameter content are as follows:
# detection timeout-check _ timeout = 60;
# detection failure retry number-check _ reyty _ num = 3;
# detection service-check _ server _ name = CheckServer.
And acquiring all host lists, calling service to perform service detection, returning up as success, returning the rest as failure, and updating the memory of the host information according to the state of the host.
After receiving the request, obtaining the transaction code, and matching the corresponding host according to the transaction code, fig. 8 is a flowchart of matching the host according to the transaction code according to the embodiment of the present invention, as shown in fig. 8, including:
step S801, acquiring transaction code information;
step S802, acquiring a transaction code information memory;
step S803, match the circulation route;
step S804, judging whether the matching is successful, if so, executing step S805, otherwise, returning to step S803;
step S805, acquiring service domain information;
step S806, screening survival host;
step S807, judging whether the matching is successful, if so, executing step S808, otherwise, returning to step S805;
step S808, the transaction is forwarded.
Fig. 9 is a diagram of a matching host according to an embodiment of the invention, as shown in fig. 9, if there is no surviving host, the transaction route fails. Screening the surviving host, wherein the state of the host and the routing averageness need to be considered; sorting the hosts according to a sequence, 1-N; setting an auto-increment static variable, such as static int offset =1 in C speech; and judging whether the state of the host is healthy or not, if the host is normally forwarded, if the host is asynchronously continuously trained until a conforming host is found.
And step S304, searching a matched target host according to the service domain information and the host information.
In an embodiment of the present invention, the step S304 specifically includes: generating a host list according to the host information; screening one or more hosts which are currently in a survival state from the host list according to the service domain information; selecting the matching target host from the one or more hosts.
Further, the hosts currently in a surviving state may be screened by: sequencing all the hosts in the host list according to a sequence; repeatedly executing the following steps until the last host computer screens out the one or more host computers which are currently in the survival state: the method comprises the steps of searching a corresponding host according to a static variable, increasing the static variable by 1, detecting whether the state of the searched host is healthy or not through a set detection configuration file, and determining that the searched host is in the survival state currently under the condition that the detection result is yes.
Fig. 10 is a schematic diagram of a business domain division function based on transaction level according to an embodiment of the present invention, as shown in fig. 10, the business domain division function is mainly divided into two functions: transaction routing and fault isolation. After receiving the incoming telegrams of other systems, the routing layer analyzes the transaction code, matches the service domain unit number in the shared memory according to the transaction code, searches the existing surviving host according to the service domain number, searches the corresponding host according to the round-robin algorithm, performs transaction forwarding according to the host information, transfers the transaction request to the corresponding application server, performs service processing according to the existing service logic by the application server, and finishes the transaction process.
According to another embodiment of the present invention, there is also provided a transaction message processing apparatus, and fig. 11 is a transaction message processing apparatus according to an embodiment of the present invention, as shown in fig. 11, including:
the analysis module 112 is configured to analyze the received transaction message to obtain transaction code information of the transaction message;
a determining module 114, configured to determine, according to the transaction code information, service domain information corresponding to the transaction packet, and match a corresponding target host according to the service domain information;
a forwarding module 116, configured to forward the transaction packet to a corresponding application server through the target host, where the application server is configured to process the transaction packet.
Optionally, the determining module 114 includes:
the matching submodule is used for matching the service domain information with the host information in a shared memory according to the transaction code information, wherein the shared memory stores the corresponding relation among the transaction code information, the service domain information and the host information;
and the searching submodule is used for searching the matched target host according to the service domain information and the host information.
Optionally, the lookup sub-module includes:
the generating unit is used for generating a host list according to the host information;
the screening unit is used for screening one or more hosts which are currently in a survival state from the host list according to the service domain information;
a first obtaining unit, configured to select the matched target host from the one or more hosts.
Optionally, the screening unit is further configured to sort all hosts in the host list according to a sequence; repeatedly executing the following steps until the last host screens out the one or more hosts which are currently in the survival state: the method comprises the steps of searching a corresponding host according to a static variable, increasing the static variable by 1, detecting whether the state of the searched host is healthy or not through a set detection configuration file, and determining that the searched host is in the survival state currently under the condition that the detection result is yes.
Optionally, the matching sub-module includes:
the query unit is used for querying the shared memory by using a showsm tool;
and the second acquisition unit is used for acquiring the service domain information and the host information which are matched with the transaction code information in the shared memory.
Optionally, the apparatus further comprises:
the carding module is used for carding out business domain information according to business attributes or business functions;
the first writing module is used for listing a host list corresponding to the service domain information and writing the corresponding relation between the service domain information and the host list into a file match _ group.cfg;
the second writing module is used for carding a transaction code list according to the service domain information and writing the corresponding relation between the service domain information and the transaction code list into a file match _ route.cfg;
and a third writing module, configured to write the service domain information, the transaction code information, and the host information into a shared memory according to the file match _ group.cfg and the file match _ route.cfg.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, analyzing the received transaction message to obtain the transaction code information of the transaction message;
s2, determining the business domain information corresponding to the transaction message according to the transaction code information, and matching the corresponding target host according to the business domain information;
and S3, forwarding the transaction message to a corresponding application server through the target host, wherein the application server is used for processing the transaction message.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, analyzing the received transaction message to obtain the transaction code information of the transaction message;
s2, determining the business domain information corresponding to the transaction message according to the transaction code information, and matching the corresponding target host according to the business domain information;
and S3, forwarding the transaction message to a corresponding application server through the target host, wherein the application server is used for processing the transaction message.
Optionally, for a specific example in this embodiment, reference may be made to the examples described in the above embodiment and optional implementation, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (6)

1. A transaction message processing method is characterized by comprising the following steps:
analyzing the received transaction message to obtain transaction code information of the transaction message;
matching the service domain information with the host information in a shared memory according to the transaction code information, wherein the shared memory stores the corresponding relation of the transaction code information, the service domain information and the host information;
generating a host list according to the host information;
screening one or more hosts currently in an alive state from the host list according to the service domain information, comprising: sequencing all the hosts in the host list according to a sequence; repeatedly executing the following steps until the last host screens out the one or more hosts which are currently in the survival state: detecting whether the state of the searched host is healthy or not through a set detection configuration file, and determining that the searched host is currently in the survival state under the condition that the detection result is yes;
selecting a matching target host from the one or more hosts;
and forwarding the transaction message to a corresponding application server through the target host, wherein the application server is used for processing the transaction message.
2. The method of claim 1, wherein matching service domain information to host information in a shared memory based on the transaction code information comprises:
using a showsm tool to query the shared memory;
and acquiring the service domain information and the host information matched with the transaction code information in the shared memory.
3. The method of claim 1, wherein prior to parsing the received transaction message to obtain transaction code information of the transaction message, the method further comprises:
combing out service domain information according to service attributes or service functions;
listing a host list corresponding to service domain information, and writing the corresponding relation between the service domain information and the host list into a file match _ group.cfg;
combing a transaction code list according to the service domain information, and writing the corresponding relation between the service domain information and the transaction code list into a file match _ route.cfg;
and writing the service domain information, the transaction code information and the host information into a shared memory according to the file match _ group.cfg and the file match _ route.cfg.
4. A transaction message processing apparatus, comprising:
the analysis module is used for analyzing the received transaction message to obtain the transaction code information of the transaction message;
the forwarding module is used for forwarding the transaction message to a corresponding application server through the target host, wherein the application server is used for processing the transaction message;
the matching submodule is used for matching the service domain information with the host information in a shared memory according to the transaction code information, wherein the shared memory stores the corresponding relation among the transaction code information, the service domain information and the host information;
the searching submodule is used for searching a matched target host according to the service domain information and the host information;
wherein the lookup submodule comprises:
the generating unit is used for generating a host list according to the host information;
the screening unit is used for screening one or more hosts which are currently in a survival state from the host list according to the service domain information;
the first acquisition unit is used for selecting a matched target host from the one or more hosts;
the screening unit is further configured to sort all hosts in the host list according to a sequence; repeatedly executing the following steps until the last host screens out the one or more hosts which are currently in the survival state: the method comprises the steps of searching a corresponding host according to a static variable, increasing the static variable by 1, detecting whether the state of the searched host is healthy or not through a set detection configuration file, and determining that the searched host is in the survival state currently under the condition that the detection result is yes.
5. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to carry out the method of any one of claims 1 to 3 when executed.
6. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 3.
CN202210489430.9A 2022-05-07 2022-05-07 Transaction message processing method and device Active CN114584629B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210489430.9A CN114584629B (en) 2022-05-07 2022-05-07 Transaction message processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210489430.9A CN114584629B (en) 2022-05-07 2022-05-07 Transaction message processing method and device

Publications (2)

Publication Number Publication Date
CN114584629A CN114584629A (en) 2022-06-03
CN114584629B true CN114584629B (en) 2022-09-30

Family

ID=81768981

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210489430.9A Active CN114584629B (en) 2022-05-07 2022-05-07 Transaction message processing method and device

Country Status (1)

Country Link
CN (1) CN114584629B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115550278A (en) * 2022-08-23 2022-12-30 中银金融科技有限公司 MQ long message processing method and device under decision engine platform

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013186425A1 (en) * 2012-06-15 2013-12-19 Aitico Oy A money transaction system and a method thereto
CN103825830B (en) * 2014-02-24 2017-02-01 北京南天软件有限公司 Method and device for system to achieve flow control based on TUXEDO middleware
CN104243220A (en) * 2014-10-10 2014-12-24 中国农业银行股份有限公司 Method and device for generating inter-system relation graph
CN104574188B (en) * 2015-01-08 2018-07-24 中国农业银行股份有限公司 A kind of transaction service system and transaction processing method
CN109388982A (en) * 2017-08-04 2019-02-26 武汉矽感科技有限公司 The method and and server that a kind of pair of trading activity is traced
CN111371684B (en) * 2020-03-02 2022-08-09 中国邮政储蓄银行股份有限公司 Routing processing method and device and double-activity data center system
CN114217952A (en) * 2021-11-11 2022-03-22 中国建设银行股份有限公司 Service processing method and device and server
CN114092248A (en) * 2021-11-24 2022-02-25 中国银行股份有限公司 Transaction flow processing method and device

Also Published As

Publication number Publication date
CN114584629A (en) 2022-06-03

Similar Documents

Publication Publication Date Title
CN112118565B (en) Multi-tenant service gray level publishing method, device, computer equipment and storage medium
CN109302346B (en) Method and device for transmitting data flow
CN106656650B (en) Method and system for generating service test environment, and method, device and system for service test
CN111193716B (en) Service data calling method and device, computer equipment and storage medium
CN105721535A (en) Parallel processing of service functions in service function chains
CN113296859B (en) Page loading method and device, storage medium and electronic device
CN114584629B (en) Transaction message processing method and device
CN112751931B (en) Network connection method and device, electronic device, and medium
CN110677475A (en) Micro-service processing method, device, equipment and storage medium
CN111858083A (en) Remote service calling method and device, electronic equipment and storage medium
KR20120062174A (en) Apparatus and method for dynamic processing a variety of characteristics packet
US7069321B1 (en) Mechanism for nested expansion of data collection from one computer to multiple computers
CN105049463A (en) Distributed database, method of sharing data, and apparatus for a distributed database
CN116821215A (en) OPC UA server searching method based on port inquiry
US8019776B2 (en) Determining device and determining method for determining processing to be performed based on acquired data
CN115422225A (en) Distributed transaction processing method, transaction manager, middleware and system
CN115277641A (en) Address sharing method and device, electronic equipment and storage medium
US20170366464A1 (en) Information processing method and information processing device
CN108390924A (en) Order fulfillment method and device
US20100138181A1 (en) Testing apparatus
CN110928679B (en) Resource allocation method and device
CN113918215A (en) Micro-service configuration system, equipment and medium
CN112689013A (en) System, method and device for service discovery
CN109451090A (en) A kind of domain name analytic method and device
CN108055305B (en) Storage expansion method and storage expansion device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CB03 Change of inventor or designer information

Inventor after: Zhang Huiyu

Inventor after: Shi Chenyang

Inventor after: Pei Yamin

Inventor after: Xu Changzhi

Inventor after: Chen Hongwei

Inventor after: Zhang Jie

Inventor after: Guan Shizhen

Inventor after: Fu Jiyun

Inventor before: Luo Na

CB03 Change of inventor or designer information