CN115134208A - Message conversion method and device, electronic equipment and storage medium - Google Patents

Message conversion method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115134208A
CN115134208A CN202210813192.2A CN202210813192A CN115134208A CN 115134208 A CN115134208 A CN 115134208A CN 202210813192 A CN202210813192 A CN 202210813192A CN 115134208 A CN115134208 A CN 115134208A
Authority
CN
China
Prior art keywords
message
target
external
request message
conversion rule
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210813192.2A
Other languages
Chinese (zh)
Inventor
李伟民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CITIC Aibank Corp Ltd
Original Assignee
CITIC Aibank Corp 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 CITIC Aibank Corp Ltd filed Critical CITIC Aibank Corp Ltd
Priority to CN202210813192.2A priority Critical patent/CN115134208A/en
Publication of CN115134208A publication Critical patent/CN115134208A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0226Mapping or translating multiple network management protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • H04L49/3009Header conversion, routing tables or routing tags

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure provides a message conversion method, a message conversion device, an electronic device and a storage medium. One embodiment of the method comprises: in response to receiving an external request message sent by a request end, acquiring a target channel identifier from the external request message; finding out a target message conversion rule corresponding to the target channel identifier; converting the external request message into an internal request message according to a target message conversion rule; determining a corresponding internal response message based on the internal request message; and converting the internal response message into an external response message according to the target message conversion rule, and sending the external response message to the request terminal. The implementation mode realizes the capability of uniformly converting external messages of different channels into internal messages for processing, thereby reducing the workload of message adaptation and improving the general capability of an internal interface.

Description

Message conversion method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for message conversion, an electronic device, and a storage medium.
Background
With the development of information services, various application systems have requests for accessing external channels, which causes the requirement that the system is compatible with requests and response messages of external systems, thus generating a large amount of redundant codes, and being not beneficial to the maintenance of the system and the production requirement of quickly accessing a partner.
At present, there are two methods for uniformly converting messages from different external channels into internal messages. The first one is based on MapStruct (Java comment processor, used for generating type-safe bean mapping class), which can implement conversion of message content, but has a problem that the conversion action must be completed at a code level, and cannot implement non-inductive online (i.e. an accessed client does not need to make code adjustment). The second is the realization based on the template, and the method is consistent with the problems of MapStruct, and also has the problems of difficult maintenance of the template, huge number of templates and low performance.
Therefore, a new technical solution is needed to solve at least one of the above technical problems.
Disclosure of Invention
The disclosure provides a message conversion method, a message conversion device, an electronic device and a storage medium.
In a first aspect, the present disclosure provides a method for packet conversion, where the method includes:
in response to receiving an external request message sent by a request end, acquiring a target channel identifier from the external request message, wherein the channel identifier is used for identifying a channel party;
finding out a target message conversion rule corresponding to the target channel identifier;
converting the external request message into an internal request message according to the target message conversion rule;
determining a corresponding internal response message based on the internal request message;
and converting the internal response message into an external response message according to the target message conversion rule, and sending the external response message to the request terminal.
In some optional embodiments, the external request message includes at least one target transaction identifier, and the target message conversion rule includes a correspondence between the transaction identifier and the transaction message conversion rule.
In some optional embodiments, before the obtaining the target channel identifier from the external request message in response to receiving the external request message sent by the requesting end, the method further includes:
pre-storing a corresponding relation between a channel identifier and a message conversion rule; and the finding out the target message conversion rule corresponding to the target channel identifier comprises:
and searching out a target message conversion rule corresponding to the target channel identifier according to the corresponding relation between the channel identifier and the message conversion rule.
In some optional embodiments, the obtaining a target channel identifier from an external request message sent by a request end in response to receiving the external request message includes:
responding to an external request message sent by a request end, and acquiring the target channel identifier and at least one target transaction identifier from the external request message; and
the converting the external request message into an internal request message according to the target message conversion rule includes:
for each target transaction identifier, searching out a transaction message conversion rule corresponding to the target transaction identifier from the target message conversion rules;
and converting the external request message into the internal request message according to at least one transaction message conversion rule corresponding to the target transaction identifier.
In some optional embodiments, the converting the internal response packet into an external response packet according to the target packet conversion rule includes:
and converting the internal response message into the external response message according to at least one transaction message conversion rule corresponding to the target transaction identifier.
In a second aspect, the present disclosure provides a packet converting apparatus, including:
the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is configured to respond to an external request message sent by a request end and acquire a target channel identifier from the external request message, and the channel identifier is used for identifying a channel party;
a searching unit configured to search for a target message conversion rule corresponding to the target channel identifier;
a first conversion unit configured to convert the external request message into an internal request message according to the target message conversion rule;
a determining unit configured to determine a corresponding internal response message based on the internal request message;
and the second conversion unit is configured to convert the internal response message into an external response message and send the external response message to the request end according to the target message conversion rule.
In some optional embodiments, before the obtaining, in response to receiving an external request packet sent by a requesting end, a target channel identifier from the external request packet, the apparatus further includes:
the storage unit is configured to pre-store the corresponding relation between the channel identification and the message conversion rule; and
the lookup unit, further configured to: and searching out a target message conversion rule corresponding to the target channel identifier according to the corresponding relation between the channel identifier and the message conversion rule.
In some optional embodiments, the obtaining unit is further configured to: responding to an external request message sent by a request end, and acquiring the target channel identifier and at least one target transaction identifier from the external request message; and
the first conversion unit further configured to: for each target transaction identifier, searching out a transaction message conversion rule corresponding to the target transaction identifier from the target message conversion rules; converting the external request message into the internal request message according to at least one transaction message conversion rule corresponding to the target transaction identifier; and
the second conversion unit further configured to: and converting the internal response message into the external response message according to at least one transaction message conversion rule corresponding to the target transaction identifier.
In a third aspect, the present disclosure provides an electronic device, comprising: one or more processors; a storage device, on which one or more programs are stored, which, when executed by the one or more processors, cause the one or more processors to implement the method as described in any implementation manner of the first aspect.
In a fourth aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by one or more processors, implements the method as described in any implementation form of the first aspect.
The disclosure provides a message conversion method, a message conversion device, an electronic device and a storage medium. One embodiment of the method comprises: in response to receiving an external request message sent by a request end, acquiring a target channel identifier from the external request message; searching out a target message conversion rule corresponding to the target channel identifier; converting the external request message into an internal request message according to a target message conversion rule; determining a corresponding internal response message based on the internal request message; and converting the internal response message into an external response message according to the target message conversion rule, and sending the external response message to the request terminal. The implementation mode realizes the capability of uniformly converting external messages of different channels into internal messages for processing, thereby reducing the workload of message adaptation and improving the general capability of an internal interface.
Drawings
Other features, objects and advantages of the disclosure will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present disclosure may be applied;
FIG. 2 is a flow diagram of one embodiment of a message conversion method according to the present disclosure;
FIG. 3A is a flow diagram of yet another embodiment of a message conversion method according to the present disclosure;
FIG. 3B is a business flow diagram of one embodiment of a message conversion method according to the present disclosure;
FIG. 4 is a data flow diagram of one embodiment of a message conversion method according to the present disclosure;
FIG. 5 is a schematic block diagram of one embodiment of a message conversion apparatus according to the present disclosure;
FIG. 6 is a schematic block diagram of a computer system suitable for use in implementing the electronic device of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary system architecture 100 to which embodiments of the message conversion method or device of the present disclosure may be applied.
As shown in fig. 1, system architecture 100 may include terminal device 101, network 102, and server 103. Network 102 is the medium used to provide communication links between terminal devices 101 and server 103. Network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal device 101 to interact with server 103 over network 102 to receive or send messages and the like. Various communication client applications, such as a message processing application, a message conversion application, a web browser application, etc., may be installed on the terminal device 101.
The terminal apparatus 101 may be hardware or software. When the terminal device 101 is hardware, it may be various electronic devices having a display screen and supporting text input, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like. When the terminal device 101 is software, it can be installed in the electronic devices listed above. It may be implemented as multiple software or software modules (e.g., to provide message conversion services) or as a single software or software module. And is not particularly limited herein.
The server 103 may be a server that provides various services, such as a background server for a message conversion service transmitted to the terminal device 101. The background server may analyze and otherwise process the received external request packet, and feed back a processing result (e.g., an external response packet) to the terminal device.
In some cases, the message conversion method provided by the present disclosure may be performed by both the terminal device 101 and the server 103, for example, the step of "obtaining the target channel identifier" may be performed by the terminal device 101, and the rest of the steps may be performed by the server 103. The present disclosure is not limited thereto. Accordingly, the message conversion device may be disposed in the terminal device 101 and the server 103, respectively.
In some cases, the message conversion method provided by the present disclosure may be executed by the server 103, and accordingly, the message conversion apparatus may also be disposed in the server 103, and in this case, the system architecture 100 may also not include the terminal device 101.
In some cases, the message conversion method provided by the present disclosure may be executed by the terminal device 101, and accordingly, the message conversion apparatus may also be disposed in the terminal device 101, and in this case, the system architecture 100 may also not include the server 103.
The server 103 may be hardware or software. When the server 103 is hardware, it may be implemented as a distributed server cluster composed of a plurality of servers, or may be implemented as a single server. When the server 103 is software, it may be implemented as a plurality of software or software modules (for example, for providing a message conversion service), or may be implemented as a single software or software module. And is not particularly limited herein.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to fig. 2, a flow 200 of one embodiment of a message conversion method according to the present disclosure is shown. The message conversion method comprises the following steps:
step 201, in response to receiving an external request message sent by a request end, obtaining a target channel identifier from the external request message.
Here, the channel identification may be used to identify the channel party. The channeling party may be a third party collaborating with the open platform. The open platform may be a development platform that provides products or/and services required by the channel partner. The channel identification may be presented in the form of, for example, "channel party agency name", or the like.
In this embodiment, a user may send an external request message to the open platform through a request end, and when an execution main body (for example, a server shown in fig. 1) of the message conversion method responds to receiving the external request message, the execution main body analyzes the external request message by using various implementation manners to obtain a target channel identifier.
Further, the external request message may include at least one target transaction identification. The executing body can simultaneously acquire the target channel identifier and at least one target transaction identifier from the external request message.
Step 202, find out the target message conversion rule corresponding to the target channel identification.
Here, the target message conversion rule may include a correspondence between the transaction identification and the transaction message conversion rule.
In this embodiment, the executing body may first find the target message conversion rule corresponding to the target channel identifier, and then respectively find the transaction message conversion rules corresponding to the target transaction identifiers from the target message conversion rules.
In one implementation, the correspondence between the channel identifier and the message conversion rule may be stored in advance. Each message conversion rule may include a correspondence between at least one transaction identification and a transaction message conversion rule. For example, the first channel identifier corresponds to the first message conversion rule association. The first message conversion rule comprises a corresponding relation between a first transaction identifier and the first transaction message conversion rule, a corresponding relation between a second transaction identifier and the second transaction message conversion rule, and a corresponding relation between a third transaction identifier and the third transaction message conversion rule.
In one scenario, the external request message includes a first channel identifier, a first transaction identifier, and a third transaction identifier, and the execution subject finds a first message conversion rule corresponding to the first channel identifier, and then finds a first transaction message conversion rule corresponding to the first transaction identifier and a third transaction message conversion rule corresponding to the third transaction identifier in the first message conversion rule.
Step 203, according to the target message conversion rule, converting the external request message into the internal request message.
In this embodiment, the execution body may convert the external request message into the internal request message according to the transaction message conversion rule corresponding to the target transaction identifier found in step 202. The internal request message may refer to a message format that can be read by an internal service (a service provided by the execution subject described above).
In one scenario, after a first transaction message conversion rule corresponding to a first transaction identifier and a third transaction message conversion rule corresponding to a third transaction identifier are found in the first message conversion rule, an external request message is converted into an internal request message according to the first transaction message conversion rule and the third transaction message conversion rule.
In particular, the transaction message conversion rules may include at least one field conversion rule. Further, the field conversion rules may include a general field conversion rule and a special field conversion rule. An applicable object of a common field transformation rule may be a field that does not require transformation. An applicable object of a particular field transformation rule may be a field that requires transformation. For example, the field "man" in the external request message corresponds to the field "man" in the internal request message, that is, the field "man" in the external request message is a field to be converted.
In one implementation, special field transformation rules may include, for example, type transformations, value transformations, calculation transformations, date transformations, external call acquisition variables, iterative transformations, and the like. Specifically, as shown in the following table:
Figure BDA0003740073310000071
Figure BDA0003740073310000081
in one scenario, the fields in the external request message are converted according to the field conversion rules included in the first transaction message conversion rule and the field conversion rules included in the third transaction message conversion rule.
Step 204, based on the internal request message, determining a corresponding internal response message.
In this embodiment, according to the internal request message converted in step 203, the internal service corresponding to the target transaction identifier is called, and then an internal response message is generated according to the data queried by the internal service. The internal service here may be, for example, a transaction routing service. The transaction routing service may refer to that the payment platform or the gateway system requests an available channel from the service, and the service makes a decision according to channel information configuration and rule priority and returns an optimal payment channel scheme to the payment platform or the gateway.
Step 205, according to the target message conversion rule, converting the internal response message into an external response message and sending the external response message to the request end.
In this embodiment, the executing entity may convert the internal response message into an external response message according to a transaction message conversion rule corresponding to the target transaction identifier, and send the external response message to the requesting end, so that the requesting end presents the external response message to the user (e.g., a channel side).
Specifically, the execution agent converts the internal response packet into the external response packet by using a field conversion rule included in the transaction packet conversion rule.
Referring to fig. 3A, the execution main body may further determine whether the packet is a list set type in a process of converting an external request packet into an internal request packet or converting an internal response packet into an external response packet, and perform general processing when the packet is determined not to be a set type. When the type of the set is judged, all elements in the set are extracted, then all elements are converted, and finally the converted elements are arranged according to the sequence positions between the previous elements.
In one scenario, when the external request message includes list set type data, conversion for the list set type data may also be supported.
Further, in one scenario, customized conversion rule processing is also supported (more than 20 rules such as a calculation rule, a list node rule, a date conversion rule, an amount conversion rule, and an enumeration conversion rule are supported at present, and expansion capability is provided).
Referring to fig. 3B, the transaction service identified by the transaction identifier may be, for example, a standard credit, a standard staging plan query, a standard repayment, a standard callback, a standard billing query, a standard billing statement query, a standard billing repayment, and the like.
Referring to fig. 4, an example code for creating a correspondence table between channel identifiers and message conversion rules and a correspondence table between transaction identifiers and transaction message conversion rules is shown.
In the above, with reference to fig. 2 to fig. 4, the present disclosure provides a message conversion method, and the beneficial effects obtained include but are not limited to:
first, a message conversion rule is set in advance for each partner (channelizer), so that different partners (channelizers) can be adapted.
Secondly, the configuration online is realized, code development or micro-code development is not needed, the workload of adaptation with a partner (channel partner) is reduced, and the reusability of internal codes is improved.
Third, fail in near real time, i.e., change to use.
Fourthly, the processing performance is high, the JsonPath (powerful message field processing function) and a cache mechanism are adopted, the system processing performance is effectively improved by 300 percent on the same scale, and the rapid repair capability is provided for solving the problem of online configuration errors.
And fifthly, iterative processing of the queues is supported, and the existing scheme cannot effectively process the list nested list.
Sixth, the special field transformation rules provide high extensibility.
With further reference to fig. 5, as an implementation of the methods shown in the above-mentioned figures, the present disclosure provides an embodiment of a message conversion apparatus, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 5, the message converting apparatus 500 of the present embodiment includes: an acquisition unit 501, a lookup unit 502, a first conversion unit 503, a determination unit 504, and a second conversion unit 505. The obtaining unit 501 is configured to, in response to receiving an external request message sent by a requesting end, obtain a target channel identifier from the external request message, where the channel identifier is used to identify a channel party. The searching unit 502 is configured to search for a target message conversion rule corresponding to the target channel identifier. A first conversion unit 503 configured to convert the external request message into the internal request message according to the target message conversion rule. A determining unit 504 configured to determine a corresponding internal response message based on the internal request message. And a second conversion unit 505 configured to convert the internal response message into an external response message and send the external response message to the request end according to the target message conversion rule.
In this embodiment, the specific processing of the obtaining unit 501, the searching unit 502, the first converting unit 503, the determining unit 504, and the second converting unit 505 of the message converting apparatus 500 and the technical effects thereof may refer to the relevant descriptions of step 201, step 202, step 203, step 204, and step 205 in the corresponding embodiment of fig. 2, which are not repeated herein.
In some optional embodiments, the apparatus may further comprise: a storage unit (not shown in the figure) which can be configured to store the corresponding relationship between the channel identifier and the message conversion rule in advance; and a lookup unit 502, which may be further configured to: and searching out a target message conversion rule corresponding to the target channel identifier according to the corresponding relation between the channel identifier and the message conversion rule.
In some optional embodiments, the obtaining unit 501 may be further configured to: in response to receiving an external request message sent by a request end, acquiring a target channel identifier and at least one target transaction identifier from the external request message; and a first conversion unit 503, which may be further configured to: for each target transaction identifier, searching out a transaction message conversion rule corresponding to the target transaction identifier from the target message conversion rules; converting the external request message into an internal request message according to at least one transaction message conversion rule corresponding to the target transaction identifier; and a second conversion unit 505, further configured to: and converting the internal response message into an external response message according to at least one transaction message conversion rule corresponding to the target transaction identifier.
It should be noted that details of implementation and technical effects of each unit in the message conversion apparatus provided in the present disclosure may refer to descriptions of other embodiments in the present disclosure, and are not described herein again.
Referring now to FIG. 6, there is illustrated a schematic block diagram of a computer system 600 suitable for use in implementing the electronic devices of the present disclosure. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the present disclosure.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An Input/Output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input section 606 including a touch screen, a tablet, a keyboard, a mouse, or the like; an output section 607 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 608 including a hard disk and the like; and a communication section 609 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication section 609. The above-described functions defined in the method of the present disclosure are performed when the computer program is executed by a Central Processing Unit (CPU) 601. It should be noted that the computer readable medium in the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer-readable signal medium may include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, Python, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in this disclosure may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes an acquisition unit, a lookup unit, a first conversion unit, a determination unit, and a second conversion unit. The names of these units do not form a limitation to the unit itself in some cases, for example, the acquiring unit may also be described as a "unit for acquiring a target channel identifier".
As another aspect, the present disclosure also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be present separately and not assembled into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to: in response to receiving an external request message sent by a request end, acquiring a target channel identifier from the external request message; finding out a target message conversion rule corresponding to the target channel identifier; converting the external request message into an internal request message according to a target message conversion rule; determining a corresponding internal response message based on the internal request message; and converting the internal response message into an external response message according to the target message conversion rule, and sending the external response message to the request terminal.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is possible without departing from the inventive concept as defined above. For example, the above features and the technical features disclosed in the present disclosure (but not limited to) having similar functions are replaced with each other to form the technical solution.

Claims (10)

1. A message conversion method comprises the following steps:
in response to receiving an external request message sent by a request end, acquiring a target channel identifier from the external request message, wherein the channel identifier is used for identifying a channel party;
finding out a target message conversion rule corresponding to the target channel identifier;
converting the external request message into an internal request message according to the target message conversion rule;
determining a corresponding internal response message based on the internal request message;
and converting the internal response message into an external response message according to the target message conversion rule, and sending the external response message to the request terminal.
2. The method according to claim 1, wherein the external request message comprises at least one target transaction identity, and the target message conversion rule comprises a correspondence between transaction identities and transaction message conversion rules.
3. The method according to claim 2, wherein before said obtaining the target channel identifier from the external request message in response to receiving the external request message sent by the requesting end, the method further comprises:
pre-storing a corresponding relation between a channel identifier and a message conversion rule; and
the finding of the target message conversion rule corresponding to the target channel identifier includes:
and searching out a target message conversion rule corresponding to the target channel identifier according to the corresponding relation between the channel identifier and the message conversion rule.
4. The method of claim 3, wherein the obtaining a target channel identifier from an external request message sent by a requesting end in response to receiving the external request message comprises:
responding to an external request message sent by a request end, and acquiring the target channel identifier and at least one target transaction identifier from the external request message; and
the converting the external request message into an internal request message according to the target message conversion rule includes:
for each target transaction identifier, searching out a transaction message conversion rule corresponding to the target transaction identifier from the target message conversion rules;
and converting the external request message into the internal request message according to at least one transaction message conversion rule corresponding to the target transaction identifier.
5. The method of claim 4, wherein said converting said internal response packet to an external response packet according to said target packet conversion rules comprises:
and converting the internal response message into the external response message according to at least one transaction message conversion rule corresponding to the target transaction identifier.
6. A message conversion device, comprising:
the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is configured to respond to the reception of an external request message sent by a request end and acquire a target channel identification from the external request message, and the channel identification is used for identifying a channel party;
a searching unit configured to search for a target message conversion rule corresponding to the target channel identifier;
a first conversion unit configured to convert the external request message into an internal request message according to the target message conversion rule;
a determining unit configured to determine a corresponding internal response message based on the internal request message;
and the second conversion unit is configured to convert the internal response message into an external response message and send the external response message to the request end according to the target message conversion rule.
7. The apparatus according to claim 6, wherein before said obtaining a target channel identifier from an external request message sent by a requesting end in response to receiving the external request message, the apparatus further comprises:
the storage unit is configured to pre-store the corresponding relation between the channel identification and the message conversion rule; and
the lookup unit, further configured to: and searching out a target message conversion rule corresponding to the target channel identifier according to the corresponding relation between the channel identifier and the message conversion rule.
8. The apparatus of claim 7, wherein the obtaining unit is further configured to: responding to an external request message sent by a request end, and acquiring the target channel identifier and at least one target transaction identifier from the external request message; and
the first conversion unit further configured to: for each target transaction identifier, searching out a transaction message conversion rule corresponding to the target transaction identifier from the target message conversion rules; converting the external request message into the internal request message according to at least one transaction message conversion rule corresponding to the target transaction identifier; and
the second conversion unit further configured to: and converting the internal response message into the external response message according to at least one transaction message conversion rule corresponding to the target transaction identifier.
9. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method recited in any of claims 1-5.
10. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-5.
CN202210813192.2A 2022-07-11 2022-07-11 Message conversion method and device, electronic equipment and storage medium Pending CN115134208A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210813192.2A CN115134208A (en) 2022-07-11 2022-07-11 Message conversion method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210813192.2A CN115134208A (en) 2022-07-11 2022-07-11 Message conversion method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115134208A true CN115134208A (en) 2022-09-30

Family

ID=83383479

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210813192.2A Pending CN115134208A (en) 2022-07-11 2022-07-11 Message conversion method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115134208A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1987925A (en) * 2006-12-29 2007-06-27 中国建设银行股份有限公司 Complex front platform of financial system and transfering method transaction data
CN108121918A (en) * 2017-12-29 2018-06-05 福建省农村信用社联合社 A kind of bank inside and outside services two-way cooperative system and method
CN110070437A (en) * 2019-04-12 2019-07-30 中国工商银行股份有限公司 Prop up pay road selection method and device
CN110264648A (en) * 2019-05-10 2019-09-20 杭州米雅信息科技有限公司 Data processing method and device, automatic teller machine and data processing system
WO2021023149A1 (en) * 2019-08-05 2021-02-11 中国建设银行股份有限公司 Method and apparatus for dynamically returning message
CN112995155A (en) * 2021-02-09 2021-06-18 中国工商银行股份有限公司 Financial abnormal message identification method and device
CN113158650A (en) * 2021-05-12 2021-07-23 中国建设银行股份有限公司 Message processing method, device, equipment and storage medium
CN113781202A (en) * 2021-08-24 2021-12-10 上海数禾信息科技有限公司 Data processing method, data processing device, computer equipment and storage medium
CN113992761A (en) * 2021-10-28 2022-01-28 中国建设银行股份有限公司 Transaction processing method, apparatus, electronic device, medium, and program product
CN114584631A (en) * 2022-03-01 2022-06-03 中国农业银行股份有限公司 Message processing method and device, electronic equipment and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1987925A (en) * 2006-12-29 2007-06-27 中国建设银行股份有限公司 Complex front platform of financial system and transfering method transaction data
CN108121918A (en) * 2017-12-29 2018-06-05 福建省农村信用社联合社 A kind of bank inside and outside services two-way cooperative system and method
CN110070437A (en) * 2019-04-12 2019-07-30 中国工商银行股份有限公司 Prop up pay road selection method and device
CN110264648A (en) * 2019-05-10 2019-09-20 杭州米雅信息科技有限公司 Data processing method and device, automatic teller machine and data processing system
WO2021023149A1 (en) * 2019-08-05 2021-02-11 中国建设银行股份有限公司 Method and apparatus for dynamically returning message
CN112995155A (en) * 2021-02-09 2021-06-18 中国工商银行股份有限公司 Financial abnormal message identification method and device
CN113158650A (en) * 2021-05-12 2021-07-23 中国建设银行股份有限公司 Message processing method, device, equipment and storage medium
CN113781202A (en) * 2021-08-24 2021-12-10 上海数禾信息科技有限公司 Data processing method, data processing device, computer equipment and storage medium
CN113992761A (en) * 2021-10-28 2022-01-28 中国建设银行股份有限公司 Transaction processing method, apparatus, electronic device, medium, and program product
CN114584631A (en) * 2022-03-01 2022-06-03 中国农业银行股份有限公司 Message processing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110019350B (en) Data query method and device based on configuration information
US10635735B2 (en) Method and apparatus for displaying information
CN110008045B (en) Method, device and equipment for aggregating microservices and storage medium
CN110263277B (en) Page data display method, page data updating device, page data equipment and storage medium
CN109815107B (en) Method and device for automatic testing
CN108933695B (en) Method and apparatus for processing information
CN111460129A (en) Method and device for generating identification, electronic equipment and storage medium
CN113076153B (en) Interface calling method and device
CN113010405A (en) Application program testing method and device
CN111881329A (en) Account balance management method and system
CN114513552A (en) Data processing method, device, equipment and storage medium
CN112559024A (en) Method and device for generating transaction code change list
CN111581098A (en) Interface data transfer storage method, device, server and storage medium
CN111787041A (en) Method and apparatus for processing data
CN115374207A (en) Service processing method and device, electronic equipment and computer readable storage medium
CN111460020B (en) Method, device, electronic equipment and medium for resolving message
CN115134208A (en) Message conversion method and device, electronic equipment and storage medium
CN109889402B (en) Method and apparatus for generating information
CN116185806A (en) Digital currency system testing method and device
CN113779018A (en) Data processing method and device
CN111400623A (en) Method and apparatus for searching information
CN111273970A (en) Calling method, device, system, medium and electronic equipment of intelligent contract
CN109376023B (en) Method and equipment for generating calling information and issuing return code group
CN113242306B (en) Block chain consensus method and device
CN110046171B (en) System, method and apparatus for obtaining information

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