CN112187829B - Online transaction message processing method, device and system - Google Patents

Online transaction message processing method, device and system Download PDF

Info

Publication number
CN112187829B
CN112187829B CN202011132303.0A CN202011132303A CN112187829B CN 112187829 B CN112187829 B CN 112187829B CN 202011132303 A CN202011132303 A CN 202011132303A CN 112187829 B CN112187829 B CN 112187829B
Authority
CN
China
Prior art keywords
message
file
internal
transaction
class file
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
CN202011132303.0A
Other languages
Chinese (zh)
Other versions
CN112187829A (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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202011132303.0A priority Critical patent/CN112187829B/en
Publication of CN112187829A publication Critical patent/CN112187829A/en
Application granted granted Critical
Publication of CN112187829B publication Critical patent/CN112187829B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • 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/02Banking, e.g. interest calculation or account maintenance
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Computer Security & Cryptography (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Development Economics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method, a device and a system for processing an online transaction message, wherein the method comprises the following steps: extracting a configuration file package according to a preset configuration file, analyzing an internal class file in the configuration file package through a preset identification annotation and storing the internal class file in a memory; acquiring a transaction request message, extracting a corresponding internal class file in a memory according to a transaction number of the transaction request message and the configuration file, and calling a corresponding request field in the transaction request message according to the internal class file to generate a standard message; and storing the un-called request field in the transaction request message into a memory, and performing predetermined service logic processing on the standard message.

Description

Online transaction message processing method, device and system
Technical Field
The present invention relates to the field of financial security, and in particular, to a method, an apparatus, and a system for processing an online transaction message.
Background
On-line transaction of financial institutions such as banks and the like and partners is mainly realized by JSON or XML message communication, and message analysis is generally completed by means of FastJson (aiming at JSON messages) and XStream (aiming at XML messages) of industry open sources. However, for a complex scenario when a financial institution such as a bank communicates with a partner, the following disadvantages exist:
when different partners access, in order to shield the differences of messages of different partners and maintain the stability and compatibility of service codes, message model standardization (such as account number bit complementing, money format conversion, dictionary item conversion and the like) needs to be completed when the messages access. The existing open source tools such as FastJson or XStream only support direct mapping conversion from messages to entity classes, secondary processing needs to be carried out in service codes, and service codes are coupled with message processing, so that the service codes are frequently modified when different partners are accessed.
When returning to the partner message, the message differentiation processing needs to be performed for different partners, and the open source processing tool in the current industry can only support direct mapping from the Java entity class to the message. Meanwhile, the current open source tool (such as FastJson) directly discards message fields which are not configured, and when the service requirement slightly changes, the message processing module and the service module code need to be modified at the same time, so that the workload is large.
Disclosure of Invention
The invention aims to provide an online transaction message processing method, device and system, which can shield the difference of messages of different partners when the different partners access, and keep the stability and compatibility of service codes; secondly, when returning to the partner message, adapting the difference of different partners through configuration; and the completeness of data in data bus data is ensured while the extraction of service fields as required is supported.
To achieve the above object, the present invention provides a method for processing an online transaction message, the method comprising: extracting a configuration file package according to a preset configuration file, analyzing an internal class file in the configuration file package through a preset identification annotation and storing the internal class file in a memory; acquiring a transaction request message, extracting a corresponding internal class file in a memory according to a transaction number of the transaction request message and the configuration file, and calling a corresponding request field in the transaction request message according to the internal class file to generate a standard message; and storing the un-called request field in the transaction request message into a memory, and performing predetermined service logic processing on the standard message.
In the above method for processing an online transaction message, preferably, the method further includes: acquiring feedback information after service logic processing, and extracting a corresponding internal class file in a memory according to a transaction number of the feedback information and the configuration file; generating a feedback message according to the internal class file corresponding to the feedback information and the un-called request field stored in the memory; and feeding back the feedback message to a transaction request party corresponding to the transaction request message.
In the above method for processing an online transaction message, preferably, the obtaining of the transaction request message further includes: receiving a transaction message initiated by a transaction party, and identifying the parameter type of a corresponding parameter in the transaction message through a preset identifier; and comparing the parameter type with a preset type, and converting the corresponding parameter in the transaction message through the preset type to obtain a transaction request message when the comparison result is inconsistent.
In the above method for processing an online transaction message, preferably, the step of feeding back the feedback message to the transaction requester corresponding to the transaction request message includes: and after converting the corresponding parameters in the feedback message through the parameter types, feeding back the parameters to a transaction request party corresponding to the transaction request message.
In the above method for processing an online transaction message, preferably, before extracting a corresponding internal class file from a memory according to the transaction number of the transaction request message and the configuration file, the method further includes: identifying the file format of the transaction request message, and comparing the file format with a preset format; and when the comparison result is inconsistent, converting the transaction request message into a preset format.
In the above method for processing an online transaction message, preferably, the extracting a configuration file package according to a preset configuration file, parsing an internal class file in the configuration file package through a predetermined identification annotation, and storing the internal class file in a memory includes: obtaining a storage path of the configuration file package according to a preset configuration file; extracting a pre-stored configuration file package through the storage path; analyzing the internal class files in the configuration class file package through the preset identification annotation to obtain an internal class file of the entry, an internal class file of the exit and an abnormal internal class file; and caching the internal participating class file, the internal participating class file and the abnormal internal class file into a memory.
In the above method for processing an online transaction message, preferably, the step of generating a standard message by calling a corresponding request field in the transaction request message according to the internal class file includes: instantiating an enlisted one of the inner class files by reflection; and converting the corresponding request field in the transaction request message by using the built-in function on the configuration class attribute annotation in the instantiated internal class file and writing the converted request field into the original attribute to obtain the standard message corresponding to the transaction request message.
In the method for processing an online transaction message, preferably, the generating a feedback message according to the internal class file corresponding to the feedback information and the un-called request field stored in the memory includes: and converting the corresponding request field in the feedback information through an internal function on a configuration class attribute note in the internal class file or the abnormal internal class file, and writing the converted request field and the un-called request field stored in the memory into the original attribute to obtain the feedback message corresponding to the feedback information.
In the above method for processing online transaction messages, preferably, the parsing the internal class files in the configuration class file package through the predetermined identification annotation to obtain the internal entry class files, the internal exit class files and the abnormal internal class files includes: analyzing and processing the attributes with the input reference identification annotation, the output reference identification annotation and the abnormal identification annotation in the internal class file respectively to obtain parameter information of each attribute value and annotation on the attribute; and generating an internal input class file, an internal output class file and an abnormal internal class file according to the attribute values and the parameter information annotated on the attributes.
In the above method for processing an online transaction message, preferably, caching the internal participating internal class file, the internal participating external class file, and the abnormal internal class file in a memory comprises: caching the internal participating file, the internal participating file and the abnormal internal file to a memory in a key value pair mode; wherein the key is a class name of the configuration class, and the value is the referred internal class file, the referred internal class file or the abnormal internal class file.
The invention also provides an online transaction message processing device, which comprises a standardization module and a cache module; the cache module is used for extracting a configuration file package according to a preset configuration file, analyzing an inner class file in the configuration file package through a preset identification annotation and storing the inner class file in a memory; the standardization module is used for acquiring a transaction request message, extracting a corresponding internal file in a memory according to a transaction number of the transaction request message and the configuration file, and calling a corresponding request field in the transaction request message according to the internal file to generate a standard message; and storing the request field which is not called in the transaction request message into a memory, and performing predetermined service logic processing on the standard message.
In the above online transaction message processing apparatus, preferably, the apparatus further includes a receipt module, where the receipt module is configured to obtain feedback information after service logic processing, and extract a corresponding internal class file in a memory according to a transaction number of the feedback information and the configuration file; generating a feedback message according to the internal class file corresponding to the feedback information and the un-called request field stored in the memory; and feeding back the feedback message to a transaction request party corresponding to the transaction request message.
In the above apparatus for processing online transaction messages, preferably, the apparatus further comprises a format conversion module, where the format conversion module is configured to receive a transaction message initiated by a transaction party, and identify a parameter type of a corresponding parameter in the transaction message through a preset identifier; comparing the parameter type with a preset type, and converting the corresponding parameter in the transaction message through the preset type to obtain a transaction request message when the comparison result is inconsistent; and after converting the corresponding parameters in the feedback message through the parameter types, feeding back the feedback message to a transaction request party corresponding to the transaction request message.
In the above online transaction message processing apparatus, preferably, the cache module includes: obtaining a storage path of the configuration file package according to a preset configuration file; extracting a pre-stored configuration file package through the storage path; analyzing the internal class files in the configuration class file package through the preset identification annotation to obtain an internal class file of the input parameter, an internal class file of the output parameter and an abnormal internal class file; and caching the internal participating class file, the internal participating class file and the abnormal internal class file into a memory.
In the above online transaction message processing apparatus, preferably, the standardization module includes a message splicing unit, and the message splicing unit is configured to instantiate an internal class file of the internal class file by reflection; and converting the corresponding request field in the transaction request message by using the built-in function on the configuration class attribute annotation in the instantiated internal class file and writing the converted request field into the original attribute to obtain the standard message corresponding to the transaction request message.
In the above online transaction message processing apparatus, preferably, the receipt module includes a feedback concatenation unit, and the feedback concatenation unit is configured to convert a corresponding request field in the feedback information by using an internal function on a configuration class attribute annotation in a reference internal class file or an abnormal internal class file, write the converted request field and an un-called request field stored in a memory into an original attribute, and obtain the feedback message corresponding to the feedback information.
In the above online transaction message processing apparatus, preferably, the cache module includes an analysis unit and a storage unit; the analysis unit is used for respectively analyzing and processing the attributes with the input reference identification annotation, the output reference identification annotation and the abnormal identification annotation in the internal class file to obtain each attribute value and parameter information of the annotation on the attribute; generating an internal class file of the input parameter, an internal class file of the output parameter and an abnormal internal class file according to the attribute value and the parameter information annotated on the attribute; the storage unit is used for caching the internal file of the entry parameter, the internal file of the exit parameter and the internal file of the abnormal parameter to a memory in a key value pair mode; wherein the key is a class name of the configuration class, and the value is the referred internal class file, the referred internal class file or the abnormal internal class file.
The invention also provides a message processing system comprising the online transaction message processing device, and the system also comprises a service logic processing device; the online transaction message processing device acquires a transaction request message initiated by a transaction requester, converts the transaction request message into a standard message and then provides the standard message to the service logic processing device for processing; receiving feedback information fed back by the business logic processing device, converting the feedback information according to the format of the transaction request message, generating a feedback message and providing the feedback message to a transaction requester; and the service logic processing device is used for processing the standard message according to a preset service logic.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method when executing the computer program.
The present invention also provides a computer-readable storage medium storing a computer program for executing the above method.
The beneficial technical effects of the invention are as follows: when processing the request of the partner, completing the difference adaptation of messages of different partners through configuration; after the service processing is finished, when a receipt message is sent to the cooperative party, the invasion of the communication message processing to the service code is reduced by configuring and adapting the differences of different cooperative parties; the communication message processing realizes the configuration, and developers concentrate on the service logic development; when message fields are extracted as required, redundant fields are stored in the memory in a key value pair mode, and data are not discarded.
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 principles of the invention. In the drawings:
fig. 1A is a schematic flow chart illustrating an online transaction message processing method according to an embodiment of the present invention;
fig. 1B is a logic diagram of an online transaction message processing method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of message preprocessing according to an embodiment of the present invention;
FIG. 3A is a flowchart illustrating internal class file acquisition according to an embodiment of the present invention;
FIG. 3B is a logic diagram illustrating parsing and obtaining of internal class files according to an embodiment of the present invention;
fig. 4A is a schematic diagram of a generation flow of a standard packet according to an embodiment of the present invention;
fig. 4B is a schematic diagram of a standard packet generation logic according to an embodiment of the present invention;
fig. 5A is a schematic diagram of a feedback process of a differential packet according to an embodiment of the present invention;
fig. 5B is a schematic diagram of differential packet feedback logic according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an online transaction message processing apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a message processing system according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following detailed description of the embodiments of the present invention will be provided with reference to the drawings and examples, so that how to apply the technical means to solve the technical problems and achieve the technical effects can be fully understood and implemented. It should be noted that, as long as there is no conflict, the embodiments and the features of the embodiments of the present invention may be combined with each other, and the technical solutions formed are within the scope of the present invention.
Additionally, the steps illustrated in the flow charts of the figures may be performed in a computer system such as a set of computer-executable instructions and, although a logical order is illustrated in the flow charts, in some cases, the steps illustrated or described may be performed in an order different than here.
Referring to fig. 1A, the method for processing an online transaction message provided by the present invention includes:
s101, extracting a configuration file package according to a preset configuration file, analyzing an internal file in the configuration file package through a preset identification annotation, and storing the internal file in a memory;
s102, acquiring a transaction request message, extracting a corresponding internal file in a memory according to a transaction number of the transaction request message and the configuration file, and calling a corresponding request field in the transaction request message according to the internal file to generate a standard message;
s103, storing the un-called request field in the transaction request message to a memory, and performing predetermined service logic processing on the standard message.
Further, the method further comprises:
s104, acquiring feedback information after service logic processing, and extracting a corresponding internal class file in a memory according to a transaction number of the feedback information and the configuration file;
s105, generating a feedback message according to the internal class file corresponding to the feedback information and the un-called request field stored in the memory;
s106, the feedback message is fed back to the transaction request party corresponding to the transaction request message.
The overall principle can be shown in fig. 1B, and the implementation process is specifically as follows:
1. the partner initiates a transaction and calls a data bus for preprocessing;
2. judging whether a preset tool class exists or not, if so, executing the preset tool class, and after the preset tool class is executed, executing data bus assembly;
3. entering service logic processing;
4. analyzing the return message;
5. and judging whether a preset tool class exists or not, if so, executing the preset tool class, and if not, directly assembling a return message.
The preset tool class mainly comprises a function of judging whether a specific parameter in the message is a service logic processing unit processing object, for example, the service logic processing unit is a serial code with 10 digits, and the transaction message is only 6 digits, and at this time, bit complementing processing needs to be carried out on the transaction message; or, the business logic processing unit processes the money A, and the transaction message is the money B, at this moment, conversion processing is needed; to this end, referring to fig. 2, in an embodiment of the present invention, the acquiring transaction request message further includes:
s201, receiving a transaction message initiated by a transaction party, and identifying the parameter type of a corresponding parameter in the transaction message through a preset identifier;
s202, comparing the parameter type with a preset type, and converting the corresponding parameter in the transaction message through the preset type to obtain a transaction request message when the comparison result is inconsistent.
Further, corresponding changes may also be performed in subsequent feedback messages, that is, feeding the feedback messages back to the transaction requesting party corresponding to the transaction request message includes: and after converting the corresponding parameters in the feedback message through the parameter types, feeding back the parameters to a transaction request party corresponding to the transaction request message.
In practical work, the corresponding adjustment can be performed by using a preset tool type manner, which can be implemented by using the prior art and will not be described in detail herein.
In an embodiment of the present invention, before extracting the corresponding internal class file from the memory according to the transaction number of the transaction request message and the configuration file, the method further includes: identifying the file format of the transaction request message, and comparing the file format with a preset format; and when the comparison result is inconsistent, converting the transaction request message into a preset format. When the transaction message is in an XML format and the business logic processing unit is a JSON object, judging whether the transaction message is the JSON message or not, and executing conversion into the JSON object, namely converting the XML message into the JSON object through a tool class; the specific process will be described in detail in the following examples, and will not be described in detail herein.
Referring to fig. 3A, in an embodiment of the present invention, extracting a configuration class file package according to a preset configuration file, parsing an internal class file in the configuration class file package through a predetermined identifier annotation and storing the internal class file in a memory includes:
s301, acquiring a storage path of the configuration file package according to a preset configuration file;
s302, extracting a pre-stored configuration file package through the storage path;
s303, analyzing the internal class files in the configuration class file package through the preset identification annotation to obtain an internal class file to be referred to, an internal class file to be referred to and an abnormal internal class file to be referred to;
s304, caching the internal participating internal class file, the internal participating external class file and the abnormal internal class file into a memory.
Specifically, as shown in fig. 3B, in actual work, the application of spring boot can be seamlessly docked, so as to achieve "out-of-box and ready use";
1. starting a starting process through automatic assembly when the Springboot application is started;
2. reading the configuration file, reading out the package path where the configuration class is located, and obtaining a corresponding configuration class file package;
3. and analyzing the inner classes in the configuration class file package, and caching the internal class to be entered, the internal class to be entered and the abnormal inner class into the memory.
Thus, referring to fig. 4A, in another embodiment of the present invention, invoking the corresponding request field in the transaction request message according to the internal class file to generate a standard message includes:
s401 instantiates an enrolled one of the internal class files by reflection;
s402, converting the corresponding request field in the transaction request message and writing the converted request field into the original attribute by using the built-in function on the configuration class attribute annotation in the instantiated internal class file, so as to obtain the standard message corresponding to the transaction request message.
Specifically, referring to fig. 4B, the conversion process of the standard packet in the actual work is as follows:
1. acquiring a corresponding data bus configuration class according to the transaction number and the configuration file;
2. judging whether the XML message is a JSON message or not, converting the JSON message into a JSON object, and converting the XML message into the JSON object through a tool class;
3. obtaining a context class from a cache according to the full class name of the configuration class;
4. instantiating a requesting inner class in the configuration class by reflection;
5. calling a built-in function on the configuration class attribute note to complete the request field conversion and write the request field conversion into the original attribute;
6. for unconfigured fields, they are stored in memory in the form of key-value pairs.
Similarly, referring to fig. 5A, in an embodiment of the present invention, generating a feedback message according to the internal class file corresponding to the feedback information and the un-called request field stored in the memory includes:
s501, converting the corresponding request field in the feedback information through the built-in function on the configuration class attribute annotation in the reference internal class file or the abnormal internal class file;
s502, writing the converted request field and the un-called request field stored in the memory into the original attribute;
s503 obtains the feedback packet corresponding to the feedback information.
Specifically, referring to fig. 5B, the differentiation process of returning the packet in the actual work is as follows:
1. acquiring a corresponding data bus configuration class according to the transaction number and the configuration file;
2. obtaining a context class from a cache according to the full class name of the configuration class;
3. judging whether the abnormal return is performed, acquiring a normal return internal class, and acquiring an abnormal return internal class;
4. calling a built-in function on the configuration class attribute note to complete the request field conversion and write the request field conversion into the original attribute;
5. and generating a return message.
In an embodiment of the present invention, a specific manner of analyzing the internal class file in the configuration class file package includes:
analyzing and processing the attributes with the input reference identification annotation, the output reference identification annotation and the abnormal identification annotation in the internal class file respectively to obtain parameter information of each attribute value and annotation on the attribute; and generating an internal input class file, an internal output class file and an abnormal internal class file according to the attribute values and the parameter information annotated on the attributes. Further, caching the internal participating file, the internal participating file and the abnormal internal file to a memory in a key value pair mode; wherein the key is the class name of the configuration class, and the value is the referred internal class file, the referred internal class file or the abnormal internal class file.
Specifically, in actual work, all configuration classes in a package can be traversed circularly, internal classes with @ InDatas, @ OutDatas and @ DTOException annotations in each configuration class are obtained respectively, and the three internal classes are analyzed one by one:
(1) Analyzing an internal class with the @ InDatas annotation, processing the attribute with the @ Input annotation in the internal class, and obtaining each attribute value and each parameter annotated on the attribute: message source field, class attribute field, field of whether to input or not, and field of name of preprocessing function;
(2) Analyzing an internal class with @ OutDatas annotation, processing the attribute with @ Output annotation in the internal class, and acquiring each attribute value and each parameter annotated on the attribute: target message field, attribute field, field whether to input or not, and field for returning message processing function name;
(3) Analyzing an internal class with @ DtoException annotation, processing the attributes with @ Output annotation in the internal class, and acquiring each attribute and each parameter of the attribute annotation: a return code field in the return message and a return message field in the return message.
And storing the analysis result obtained in the links into a Map memory in a key-value pair form, wherein the key is the class name of the configuration class, and the value is the analyzed result, thereby completing the analysis work of the configuration class.
Referring to fig. 6, the present invention further provides an online transaction message processing apparatus, which includes a standardization module and a cache module; the cache module is used for extracting a configuration file package according to a preset configuration file, analyzing an inner class file in the configuration file package through a preset identification annotation and storing the inner class file in a memory; the standardization module is used for acquiring a transaction request message, extracting a corresponding internal file in a memory according to a transaction number of the transaction request message and the configuration file, and calling a corresponding request field in the transaction request message according to the internal file to generate a standard message; and storing the request field which is not called in the transaction request message into a memory, and performing predetermined service logic processing on the standard message.
Referring to fig. 6 again, in the above embodiment, the apparatus further includes a receipt module, where the receipt module is configured to obtain feedback information after the service logic processing, and extract a corresponding internal class file in the memory according to the transaction number of the feedback information and the configuration file; generating a feedback message according to the internal class file corresponding to the feedback information and the un-called request field stored in the memory; and feeding back the feedback message to a transaction request party corresponding to the transaction request message. Further, the device may further comprise a format conversion module, wherein the format conversion module is configured to receive a transaction message initiated by a transaction party, and identify a parameter type of a corresponding parameter in the transaction message through a preset identifier; comparing the parameter type with a preset type, and converting the corresponding parameter in the transaction message through the preset type to obtain a transaction request message when the comparison result is inconsistent; and after converting the corresponding parameters in the feedback message through the parameter types, feeding back the parameters to a transaction request party corresponding to the transaction request message.
In an embodiment of the present invention, the cache module includes: obtaining a storage path of the configuration type file package according to a preset configuration file; extracting a pre-stored configuration file package through the storage path; analyzing the internal class files in the configuration class file package through the preset identification annotation to obtain an internal class file of the entry, an internal class file of the exit and an abnormal internal class file; and caching the internal participating class file, the internal participating class file and the abnormal internal class file into a memory.
In an embodiment of the present invention, the normalization module includes a message splicing unit, and the message splicing unit is configured to instantiate an enrolled internal class file in the internal class file by reflection; and converting and writing the corresponding request field in the transaction request message into the original attribute by using the built-in function on the configuration class attribute note in the instantiated internal class file to obtain the standard message corresponding to the transaction request message.
In an embodiment of the present invention, the response piece module includes a feedback splicing unit, and the feedback splicing unit is configured to convert a corresponding request field in the feedback information by using a built-in function on a configuration class attribute annotation in a reference internal class file or an abnormal internal class file, write the converted request field and an un-called request field stored in a memory into an original attribute, and obtain the feedback packet corresponding to the feedback information.
In an embodiment of the present invention, the cache module includes an analysis unit and a storage unit; the analysis unit is used for respectively analyzing and processing the attributes with the input reference identification annotation, the output reference identification annotation and the abnormal identification annotation in the internal class file to obtain each attribute value and parameter information of the annotation on the attribute; generating an internal class file of the input parameter, an internal class file of the output parameter and an abnormal internal class file according to the attribute value and the parameter information annotated on the attribute; the storage unit is used for caching the internal participating internal class file, the internal participating external class file and the abnormal internal class file into a memory in a key value pair mode; wherein the key is a class name of the configuration class, and the value is the referred internal class file, the referred internal class file or the abnormal internal class file.
In practice, the detailed implementation of the online transaction message processing apparatus and its components is described in detail in the foregoing embodiments, and thus, detailed descriptions thereof are omitted.
Referring to fig. 7, the present invention further provides a message processing system including the online transaction message processing apparatus, and the system further includes a service logic processing apparatus; the online transaction message processing device acquires a transaction request message initiated by a transaction requester, converts the transaction request message into a standard message and then provides the standard message to the service logic processing device for processing; receiving feedback information fed back by the business logic processing device, converting the feedback information according to the format of the transaction request message, generating a feedback message and providing the feedback message to a transaction requester; and the service logic processing device is used for processing the standard message according to preset service logic.
The beneficial technical effects of the invention are as follows: when processing the request of the partner, completing the difference adaptation of messages of different partners through configuration; after the service processing is finished, when the receipt message is sent to the partner, the intrusion of the communication message processing to the service code is reduced by configuring and adapting the difference of different partners; the communication message processing realizes the configuration, and developers concentrate on the service logic development; when message fields are extracted as required, redundant fields are stored in the memory in a key value pair mode, and data are not discarded.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method when executing the computer program.
The present invention also provides a computer-readable storage medium storing a computer program for executing the above method.
As shown in fig. 8, the electronic device 600 may further include: communication module 110, input unit 120, audio processing unit 130, display 160, power supply 170. It is noted that the electronic device 600 does not necessarily include all of the components shown in FIG. 8; in addition, the electronic device 600 may also include components not shown in fig. 8, which may be referred to in the prior art.
As shown in fig. 8, the central processor 100, sometimes referred to as a controller or operational control, may include a microprocessor or other processor device and/or logic device, the central processor 100 receiving input and controlling the operation of the various components of the electronic device 600.
The memory 140 may be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable devices. The information relating to the failure may be stored, and a program for executing the information may be stored. And the central processing unit 100 may execute the program stored in the memory 140 to realize information storage or processing, etc.
The input unit 120 provides input to the cpu 100. The input unit 120 is, for example, a key or a touch input device. The power supply 170 is used to provide power to the electronic device 600. The display 160 is used for displaying display objects such as images and characters. The display may be, for example, an LCD display, but is not limited thereto.
The memory 140 may be a solid state memory such as Read Only Memory (ROM), random Access Memory (RAM), a SIM card, or the like. There may also be a memory that holds information even when power is off, can be selectively erased, and is provided with more data, an example of which is sometimes referred to as an EPROM or the like. The memory 140 may also be some other type of device. Memory 140 includes buffer memory 141 (sometimes referred to as a buffer). The memory 140 may include an application/function storage section 142 for storing application programs and function programs or a flow for executing the operation of the electronic device 600 by the central processing unit 100.
The memory 140 may also include a data store 143, the data store 143 for storing data, such as contacts, digital data, pictures, sounds, and/or any other data used by the electronic device. The driver storage portion 144 of the memory 140 may include various drivers of the electronic device for a communication function and/or for performing other functions of the electronic device (e.g., a messaging application, a directory application, etc.).
The communication module 110 is a transmitter/receiver 110 that transmits and receives signals via an antenna 111. The communication module (transmitter/receiver) 110 is coupled to the central processor 100 to provide an input signal and receive an output signal, which may be the same as in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality of communication modules 110, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, may be provided in the same electronic device. The communication module (transmitter/receiver) 110 is also coupled to a speaker 131 and a microphone 132 via an audio processor 130 to provide audio output via the speaker 131 and receive audio input from the microphone 132 to implement general telecommunications functions. Audio processor 130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, an audio processor 130 is also coupled to the central processor 100, so that recording on the local can be enabled through a microphone 132, and so that sound stored on the local can be played through a speaker 131.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (18)

1. An online transaction message processing method, the method comprising:
extracting a configuration file package according to a preset configuration file, analyzing an internal class file in the configuration file package through a preset identification annotation and storing the internal class file in a memory;
acquiring a transaction request message, extracting a corresponding internal file in a memory according to a transaction number of the transaction request message and the configuration file, and calling a corresponding request field in the transaction request message according to the internal file to generate a standard message;
storing the un-called request field in the transaction request message to a memory, and performing predetermined service logic processing on the standard message;
acquiring feedback information after service logic processing, and extracting a corresponding internal class file in a memory according to a transaction number of the feedback information and the configuration file;
generating a feedback message according to the internal class file corresponding to the feedback information and the un-called request field stored in the memory;
and feeding back the feedback message to a transaction request party corresponding to the transaction request message.
2. The method of claim 1, wherein obtaining a transaction request message further comprises:
receiving a transaction message initiated by a transaction party, and identifying the parameter type of a corresponding parameter in the transaction message through a preset identifier;
and comparing the parameter type with a preset type, and converting the corresponding parameter in the transaction message through the preset type to obtain a transaction request message when the comparison result is inconsistent.
3. The method of claim 2, wherein feeding the feedback message back to the transaction requester corresponding to the transaction request message comprises: and after converting the corresponding parameters in the feedback message through the parameter types, feeding back the parameters to a transaction request party corresponding to the transaction request message.
4. The method of claim 1, wherein before retrieving the corresponding internal class file from the memory according to the transaction number of the transaction request message and the configuration file, the method further comprises:
identifying the file format of the transaction request message, and comparing the file format with a preset format;
and when the comparison result is inconsistent, converting the transaction request message into a preset format.
5. The method of claim 1 wherein extracting a configuration class file package according to a predetermined configuration file, parsing internal class files in the configuration class file package through a predetermined identification annotation and storing the internal class files in a memory comprises:
obtaining a storage path of the configuration type file package according to a preset configuration file;
extracting a pre-stored configuration file package through the storage path;
analyzing the internal class files in the configuration class file package through the preset identification annotation to obtain an internal class file of the entry, an internal class file of the exit and an abnormal internal class file;
and caching the internal participating class file, the internal participating class file and the abnormal internal class file into a memory.
6. The method of claim 5, wherein invoking a corresponding request field in the transaction request message according to the internal class file to generate a standard message comprises:
instantiating an enlisted one of the inner class files by reflection;
and converting the corresponding request field in the transaction request message by using the built-in function on the configuration class attribute annotation in the instantiated internal class file and writing the converted request field into the original attribute to obtain the standard message corresponding to the transaction request message.
7. The method of claim 5 wherein generating a feedback message based on the internal class file corresponding to the feedback information and the un-invoked request field stored in the memory comprises:
and converting the corresponding request field in the feedback information through a built-in function on the configuration class attribute annotation in the internal class file or the abnormal internal class file, writing the converted request field and the un-called request field stored in the memory into the original attribute, and obtaining the feedback message corresponding to the feedback information.
8. The method of claim 5 wherein parsing the internal class files in the configuration class file package with a predetermined tag annotation to obtain an inbound internal class file, an outbound internal class file, and an abnormal internal class file comprises:
analyzing and processing the attributes with the input reference identification annotation, the output reference identification annotation and the abnormal identification annotation in the internal class file respectively to obtain parameter information of each attribute value and annotation on the attribute;
and respectively generating an internal reference class file, an internal reference class file and an abnormal internal class file according to the attribute values and the parameter information annotated on the attributes.
9. The method of claim 5 wherein caching the participating inner class files, and the anomalous inner class files into a memory comprises:
caching the internal file of the entry parameter, the internal file of the exit parameter and the internal file of the abnormal parameter to a memory in a key value pair mode;
wherein the key is the class name of the configuration class, and the value is the referred internal class file, the referred internal class file or the abnormal internal class file.
10. An online transaction message processing device is characterized by comprising a standardization module, a receipt module and a cache module;
the cache module is used for extracting a configuration file package according to a preset configuration file, analyzing an inner class file in the configuration file package through a preset identification annotation and storing the inner class file in a memory;
the standardization module is used for acquiring a transaction request message, extracting a corresponding internal file in a memory according to a transaction number of the transaction request message and the configuration file, and calling a corresponding request field in the transaction request message according to the internal file to generate a standard message; storing the un-called request field in the transaction request message to a memory, and performing predetermined service logic processing on the standard message;
the receipt module is used for acquiring feedback information after service logic processing, and extracting a corresponding internal class file in a memory according to a transaction number of the feedback information and the configuration file; generating a feedback message according to the internal class file corresponding to the feedback information and the un-called request field stored in the memory; and feeding back the feedback message to a transaction request party corresponding to the transaction request message.
11. The apparatus according to claim 10, further comprising a format conversion module, wherein the format conversion module is configured to receive a transaction message initiated by a transaction party, and identify a parameter type of a corresponding parameter in the transaction message by a preset identifier; comparing the parameter type with a preset type, and converting the corresponding parameter in the transaction message through the preset type to obtain a transaction request message when the comparison result is inconsistent; and after converting the corresponding parameters in the feedback message through the parameter types, feeding back the feedback message to a transaction request party corresponding to the transaction request message.
12. The online transaction message processing apparatus of claim 10, wherein the cache module comprises:
obtaining a storage path of the configuration file package according to a preset configuration file;
extracting a pre-stored configuration file package through the storage path;
analyzing the internal class files in the configuration class file package through the preset identification annotation to obtain an internal class file of the entry, an internal class file of the exit and an abnormal internal class file;
and caching the internal participating class file, the internal participating class file and the abnormal internal class file into a memory.
13. The online transaction message processing apparatus of claim 12, wherein the normalization module comprises a message concatenation unit configured to instantiate an enlisted one of the internal class files by reflection; and converting the corresponding request field in the transaction request message by using the built-in function on the configuration class attribute annotation in the instantiated internal class file and writing the converted request field into the original attribute to obtain the standard message corresponding to the transaction request message.
14. The apparatus according to claim 13, wherein the response piece module comprises a feedback concatenation unit, the feedback concatenation unit is configured to transform a corresponding request field in the feedback information through a built-in function on a configuration class attribute annotation in a reference internal class file or an abnormal internal class file, and write the transformed request field and an un-invoked request field stored in a memory into an original attribute to obtain the feedback message corresponding to the feedback information.
15. The online transaction message processing device of claim 12, wherein the cache module comprises a parsing unit and a storage unit;
the analysis unit is used for respectively analyzing and processing the attributes with the input reference identification annotation, the output reference identification annotation and the abnormal identification annotation in the internal class file to obtain each attribute value and parameter information of the annotation on the attribute; generating an internal file of the input parameter, an internal file of the output parameter and an abnormal internal file of the output parameter according to the attribute value and the parameter information annotated on the attribute;
the storage unit is used for caching the internal file of the entry parameter, the internal file of the exit parameter and the internal file of the abnormal parameter to a memory in a key value pair mode; wherein the key is a class name of the configuration class, and the value is the referred internal class file, the referred internal class file or the abnormal internal class file.
16. A message processing system including an online transaction message processing means according to any of claims 10 to 15, the system further including business logic processing means;
the online transaction message processing device acquires a transaction request message initiated by a transaction request party, converts the transaction request message into a standard message and then provides the standard message to the service logic processing device for processing; receiving feedback information fed back by the business logic processing device, converting the feedback information according to the format of the transaction request message, generating a feedback message and providing the feedback message to a transaction requester;
and the service logic processing device is used for processing the standard message according to preset service logic.
17. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1 to 9 when executing the computer program.
18. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the method of any one of claims 1 to 9.
CN202011132303.0A 2020-10-21 2020-10-21 Online transaction message processing method, device and system Active CN112187829B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011132303.0A CN112187829B (en) 2020-10-21 2020-10-21 Online transaction message processing method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011132303.0A CN112187829B (en) 2020-10-21 2020-10-21 Online transaction message processing method, device and system

Publications (2)

Publication Number Publication Date
CN112187829A CN112187829A (en) 2021-01-05
CN112187829B true CN112187829B (en) 2022-10-11

Family

ID=73922576

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011132303.0A Active CN112187829B (en) 2020-10-21 2020-10-21 Online transaction message processing method, device and system

Country Status (1)

Country Link
CN (1) CN112187829B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112785421A (en) * 2021-01-27 2021-05-11 广州广电运通金融电子股份有限公司 Real-time configurable online transaction processing method and processing system
CN113055494B (en) * 2021-03-30 2022-11-29 中国工商银行股份有限公司 Communication method and communication device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107026821A (en) * 2016-02-01 2017-08-08 阿里巴巴集团控股有限公司 The processing method and processing device of message
CN108933787A (en) * 2018-07-02 2018-12-04 深圳市风云实业有限公司 Message forming method and device
WO2019196304A1 (en) * 2018-04-09 2019-10-17 平安科技(深圳)有限公司 Electronic apparatus, credit feedback message parsing method, and storage medium
CN111464608A (en) * 2020-03-30 2020-07-28 山东浪潮通软信息科技有限公司 Message processing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10120916B2 (en) * 2012-06-11 2018-11-06 International Business Machines Corporation In-querying data cleansing with semantic standardization

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107026821A (en) * 2016-02-01 2017-08-08 阿里巴巴集团控股有限公司 The processing method and processing device of message
WO2019196304A1 (en) * 2018-04-09 2019-10-17 平安科技(深圳)有限公司 Electronic apparatus, credit feedback message parsing method, and storage medium
CN108933787A (en) * 2018-07-02 2018-12-04 深圳市风云实业有限公司 Message forming method and device
CN111464608A (en) * 2020-03-30 2020-07-28 山东浪潮通软信息科技有限公司 Message processing method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"基于数字证书识别及校验的物联网固件";穆超等;《山东科学》;20200814;第33卷(第4期);第131-135、144页 *
信息交换报文动态解析器的设计与实现;樊燕红等;《信息技术与信息化》;20131015(第05期);第104-107页 *

Also Published As

Publication number Publication date
CN112187829A (en) 2021-01-05

Similar Documents

Publication Publication Date Title
CN110603554B (en) Method and system for offline data transfer via machine-readable code
CN110390525B (en) Direct access method for block chain world state and block chain node
CN111819589B (en) System and method for establishing common request processing
CN112187829B (en) Online transaction message processing method, device and system
CN111047430B (en) Accounting information processing method and device
CN112163946A (en) Accounting processing method and device based on distributed transaction system
CN114138372B (en) Front-end component loading method and device
CN110599330B (en) Bank universal anti-transaction device, method and system
CN111949522B (en) Automatic testing method and device for user interface
CN112784112B (en) Message verification method and device
CN113537819A (en) Automatic service message checking method and device
CN110675159A (en) Financial market transaction advance risk control method and system and electronic equipment
CN112667415B (en) Data calling method and device, readable storage medium and electronic equipment
EP4213037A1 (en) Data storage and reconciliation method and system
CN112149419B (en) Method, device and system for normalized automatic naming of fields
CN111222869A (en) Transaction data processing method, device, computer equipment and medium
US11379458B2 (en) Electronic device and data management method thereof
CN112800063A (en) Automatic label passing method and device based on data structure
CN112040067B (en) Method, electronic device, and medium for audio playing of messages
CN112866268B (en) Message processing method and system
CN112905464B (en) Application running environment data processing method and device
KR20200107058A (en) Method for processing plans having multiple end points and electronic device applying the same method
CN113434251B (en) Cross-platform deployment method, device and equipment for service modules
KR20190099852A (en) Electronic device and method for recognizing character
CN114490402A (en) Method and device for checking validity of message field

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