CN116346961B - Financial message processing method and device, electronic equipment and storage medium - Google Patents

Financial message processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116346961B
CN116346961B CN202310621201.2A CN202310621201A CN116346961B CN 116346961 B CN116346961 B CN 116346961B CN 202310621201 A CN202310621201 A CN 202310621201A CN 116346961 B CN116346961 B CN 116346961B
Authority
CN
China
Prior art keywords
message
class
target
financial
sent
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
CN202310621201.2A
Other languages
Chinese (zh)
Other versions
CN116346961A (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.)
Chengfang Financial Technology Co ltd
Original Assignee
Chengfang Financial Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengfang Financial Technology Co ltd filed Critical Chengfang Financial Technology Co ltd
Priority to CN202310621201.2A priority Critical patent/CN116346961B/en
Publication of CN116346961A publication Critical patent/CN116346961A/en
Application granted granted Critical
Publication of CN116346961B publication Critical patent/CN116346961B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • 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/26Special purpose or proprietary protocols or architectures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

The invention provides a financial message processing method, a device, electronic equipment and a storage medium, and relates to the technical field of digital information transmission, wherein the method comprises the following steps: after receiving a target financial message, determining the message type of the target financial message according to the message header of the target financial message; determining a corresponding target configuration file or target class according to the message type of the target financial message; wherein, the mapping relation between the message structure and the computer data structure of the target financial message is configured in the target configuration file, and the mapping relation between the message structure and the computer data structure of the target financial message is marked in the target class; and analyzing the target financial message based on the target configuration file or the target class. The unified analysis and the validity verification of various financial messages can be realized, a large number of codes with high repetition degree are avoided, and the engineering maintainability and the message processing efficiency are improved.

Description

Financial message processing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of digital information transmission technologies, and in particular, to a financial message processing method, a device, an electronic apparatus, and a storage medium.
Background
The financial message specification is also simply referred to as "message standard", various financial message specifications are internationally passed, and financial messages are defined in various specifications. The financial message is a data unit with a certain format and is used as an information carrier to realize the information transfer function of different organizations and individuals on different systems and platforms.
When processing a message in a computer system, a large number of similar parsing and packaging logics are realized for different financial message types, so that a large number of codes with high repetition degree appear in engineering, the engineering maintainability is poor, and the message processing efficiency is low.
Disclosure of Invention
Aiming at the problems existing in the prior art, the invention provides a financial message processing method, a financial message processing device, electronic equipment and a storage medium.
In a first aspect, the present invention provides a financial message processing method, including:
after receiving a target financial message, determining the message type of the target financial message according to the message header of the target financial message;
determining a corresponding target configuration file or target class according to the message type of the target financial message; wherein, the mapping relation between the message structure and the computer data structure of the target financial message is configured in the target configuration file, and the mapping relation between the message structure and the computer data structure of the target financial message is marked in the target class;
and analyzing the target financial message based on the target configuration file or the target class.
Optionally, the target class includes a class of dynamic language or a Java class, and the target class includes annotations of corresponding programming language, where the annotations are used to mark the structured information of the header and the body of the message on the class header and the class attribute of the target class respectively.
Optionally, in the case that the target class is a class of a dynamic language, the parsing the target financial packet based on the target class includes:
constructing an instance of a corresponding class of the dynamic language;
and assigning the numerical values in the corresponding message structures of the target financial messages to class attributes in the instances of the corresponding classes of the dynamic language according to the dynamic language annotation contained in the corresponding classes of the dynamic language, so as to realize the analysis of the target financial messages.
Optionally, in the case that the target class is a Java class, the parsing the target financial packet based on the target class includes:
dynamically constructing an instance of the Java class through a Java reflection mechanism;
and according to Java notes contained in the Java classes, assigning values in the corresponding message structures of the target financial messages to class attributes in the Java class examples through a Java reflection mechanism, and analyzing the target financial messages.
Optionally, the annotation is further used for labeling the service verification condition of the message on the class attribute of the target class;
after the target financial message is parsed, the method further includes:
and carrying out service validity verification on the message content obtained by analysis according to the service verification conditions of the target financial message marked by the annotation.
Optionally, the method further comprises:
when a message is required to be sent, determining a message structure of the message to be sent, values in the corresponding message structure and service verification conditions according to class attribute values and notes in class examples corresponding to the message to be sent;
after the validity of the message to be sent is checked according to the service check condition, constructing a message body of the message to be sent according to the message structure of the message to be sent and the numerical value in the corresponding message structure, and constructing a message header according to the annotation on the class head in the class instance corresponding to the message to be sent.
Optionally, the Java class is a Java bean class.
In a second aspect, the present invention further provides a financial message processing apparatus, including:
the first determining module is used for determining the message type of the target financial message according to the message header of the target financial message after receiving the target financial message;
the second determining module is used for determining a corresponding target configuration file or target class according to the message type of the target financial message; wherein, the mapping relation between the message structure and the computer data structure of the target financial message is configured in the target configuration file, and the mapping relation between the message structure and the computer data structure of the target financial message is marked in the target class;
and the analysis module is used for analyzing the target financial message based on the target configuration file or the target class.
In a third aspect, the present invention also provides an electronic device, including a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the financial message processing method according to the first aspect as described above when executing the program.
In a fourth aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the financial message processing method according to the first aspect as described above.
According to the financial message processing method, the device, the electronic equipment and the storage medium, the corresponding target configuration file or target class is found according to the message type of the target financial message, the target financial message is analyzed according to the mapping relation between the message structure and the computer data structure in the target configuration file or the target class, unified analysis of various financial messages can be achieved, a large number of codes with high repetition are avoided, and engineering maintainability and message processing efficiency are improved.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a financial message processing method provided by the invention;
FIG. 2 is a schematic diagram of a message receiving and parsing flow provided by the present invention;
FIG. 3 is a schematic diagram of a packet sending flow provided in the present invention;
FIG. 4 is a schematic diagram of a financial message processing apparatus according to the present invention;
fig. 5 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 is a flow chart of a financial message processing method provided by the invention, as shown in fig. 1, the method comprises the following steps:
step 100, after receiving the target financial message, determining the message type of the target financial message according to the message header of the target financial message.
Specifically, the financial message structure is generally divided into a message header and a message body, wherein the message header fills in information such as the type, the initiator, the receiver and the like of the message in a fixed format, and the message body is different according to different message types.
The execution subject of the financial message processing method provided by the invention can be a device, equipment, a system and the like for processing financial messages, and the invention is not particularly limited, and is hereinafter simply referred to as a message processing system for convenience of discussion.
The target financial message may refer to any financial message to be processed, and the present invention is not particularly limited. For example, after receiving a certain financial message, the message processing system may first determine the message type of the financial message according to the information filled in the header of the financial message. For example, the common message types are 111 message, 112 message, etc.
Step 101, determining a corresponding target configuration file or target class according to the message type of the target financial message; the mapping relation between the message structure of the target financial message and the computer data structure is configured in the target configuration file, and the mapping relation between the message structure of the target financial message and the computer data structure is marked in the target class.
Specifically, the message processing system may pre-configure configuration files associated with different message types, where the configuration files are configured with mapping relationships between message structures (including message header and structured information of message information items) of corresponding types of messages and computer data structures (i.e., computer data structures corresponding to data formats of financial messages), so that the message processing system may find a corresponding configuration file (i.e., a target configuration file) according to a message type after determining the message type of a target financial message, and obtain a mapping relationship between the message structure of the target financial message and the computer data structures according to the configuration file.
The message processing system may also define classes associated with different message types in advance, where the classes refer to classes in a computer programming language, and the classes may be labeled with a mapping relationship between a message structure of a target financial message and a computer data structure, so that the message processing system may find a corresponding target class according to the message type after determining the message type of the target financial message, and obtain a mapping relationship between the message structure of the target financial message and the computer data structure according to the target class.
Alternatively, the target class may comprise a class of dynamic language (e.g., object-C, C #, javaScript, PHP, python, etc.) or a Java class (e.g., javaBean class), and the target class contains annotations of the corresponding programming language for marking the structured information of the header and the body of the message on the class header and class attributes of the target class, respectively. Note that, the annotation in the present invention refers to an annotation that can be recognized by a program, and is not an annotation in the program.
Taking a specific JavaBean class as an example, only the JavaBean class of a specific message is needed to be realized in computer engineering, and the structural information of a message header and a message information item is marked on the attribute of the related class and class in a Java annotation mode according to the related message standard when the JavaBean class is defined. For a clearer understanding, specific example program code is provided below.
Example 1: the message, the code is as follows:
example 2: the message structure information is marked in the JavaBean class in the form of annotation, and the code is as follows:
and 102, analyzing the target financial message based on the target configuration file or the target class.
Specifically, after the target configuration file or the target class is found according to the message type, the message processing system can analyze the message according to the mapping relationship between the message structure and the computer data structure in the target configuration file or the target class.
For example, after the message processing system finds the corresponding configuration file according to the message type, the numerical values in the message can be mapped to the corresponding message information items one by one according to the mapping relation between the message structure in the configuration file and the computer data structure, so as to realize message analysis.
According to the message processing method provided by the invention, the corresponding target configuration file or target class is found according to the message type of the target financial message, and the target financial message is analyzed according to the mapping relation between the message structure and the computer data structure in the target configuration file or the target class, so that unified analysis of various financial messages can be realized, a large number of codes with high repetition are avoided, and engineering maintainability and message processing efficiency are improved.
Optionally, in the case that the target class is a class of a dynamic language, parsing the target financial packet based on the target class includes:
constructing an instance of a corresponding class of the dynamic language;
and according to the dynamic language annotation contained in the corresponding class of the dynamic language, assigning the numerical value in the corresponding message structure of the target financial message to the class attribute in the instance of the corresponding class of the dynamic language, so as to realize the analysis of the target financial message.
In particular, in some embodiments, the structure of different financial messages may be identified based on annotations in the class of dynamic language (i.e., dynamic language annotations).
After the message processing system determines the class of the dynamic language corresponding to the target financial message, an instance of the corresponding class of the dynamic language (namely, the class used for the target financial message) can be constructed first, and then values in the corresponding message structure are assigned to class attributes in the instance one by one according to the annotation predefined in the class, so that the analysis work of the target financial message is completed.
By constructing class examples and assigning values in corresponding message structures to class attributes according to annotations, the method can realize automatic serialization operation of the message contents and is convenient for subsequent service systems to process.
Optionally, in the case that the target class is a Java class, parsing the target financial packet based on the target class includes:
dynamically constructing an instance of a Java class through a Java reflection mechanism;
and according to Java notes contained in the Java classes, assigning values in the corresponding message structures of the target financial messages to class attributes in the examples of the Java classes through a Java reflection mechanism, and analyzing the target financial messages.
Specifically, java annotations, also known as Java annotations, are a new feature introduced at JDK5, which provide a secure annotation-like mechanism for associating any information or metadata (metadata) with program elements (classes, methods, member variables, etc.). Java notes are meta-information added in codes, are used for analyzing and using tools in compiling and running, and play roles of explanation and configuration.
Java is not a dynamic language, but Java may be referred to as a "quasi-dynamic language". The Reflection mechanism is a key that Java is regarded as "quasi-dynamic language", and allows a program to obtain any kind of internal information by means of Reflection npi during execution and directly operate on internal properties and methods of any object.
Thus, in some embodiments, parsing of financial messages may be accomplished based on annotations and reflection mechanisms in Java classes.
Fig. 2 is a schematic diagram of a message receiving and analyzing flow provided in the present invention, as shown in fig. 2, when a Java bean class is defined, structural information of a message header and a message information item may be marked on the attribute of the relevant class and class in a Java annotation manner according to the relevant message standard. When the message processing system receives the financial message to analyze the message, the specific type of the message can be determined according to the message header, then the corresponding JavaBean class is found according to the message type, then the instance is dynamically constructed through a Java reflection mechanism, and the numerical value in the corresponding message structure is assigned to the attribute of the instance through the reflection mechanism according to the related Java annotation, so that the analysis work of the message is dynamically completed through the Java annotation and the reflection mechanism, and the subsequent service system is convenient to process.
Optionally, the annotation is further used for marking the service verification condition of the message on the class attribute of the target class;
after analyzing the target financial message, the method further comprises the following steps:
and carrying out service validity verification on the message content obtained by analysis according to the service verification conditions of the target financial message marked by the annotation.
Specifically, in some embodiments, the service verification condition of the message may be marked on the class attribute of the target class through annotation, for example, the service verification condition may include a service verification condition of the message reception, a service verification condition of the message transmission, or other conditions of service validity verification, which may be set according to actual needs, and the invention is not limited in particular. The service check condition of the message receiving may include whether the message can be processed in the current time period or other conditions.
Under the condition that the annotation of the target class marks the service verification condition of the message, after the message processing system analyzes the target financial message, the message processing system can further perform preliminary validity check on the message according to the relevant marked check annotation. After the inspection fails, the inspection can be processed by the unified business process flow.
The method for obtaining the marked business check condition through annotation can directly obtain the marked business check condition through annotation for the case that the target class is the class of the dynamic language; for the case that the target class is a Java class, the marked service check condition can be obtained through a reflection mechanism.
By annotating the service verification conditions in the target class, the inspection method and the class definition can be prevented from being realized separately, and the maintainability of engineering is improved.
Optionally, the method further comprises:
when a message needs to be sent, determining a message structure of the message to be sent, numerical values in the corresponding message structure and service verification conditions according to class attribute values and notes in class examples corresponding to the message to be sent;
after the validity of the message to be sent is checked according to the service check condition, a message body of the message to be sent is constructed according to the message structure of the message to be sent and the numerical value in the corresponding message structure, and a message header is constructed according to the annotation on the class header in the class instance corresponding to the message to be sent.
Specifically, based on the method for analyzing the message provided by the invention, when the message is required to be sent, the message processing system can firstly acquire the class instance corresponding to the message to be sent, and because the annotation of the class instance is marked with the mapping relation between the message structure and the computer data structure, the message structure of the message to be sent and the numerical value in the corresponding message structure can be determined according to the attribute value and the corresponding annotation in the class instance, so that the message body of the message to be sent can be constructed.
In the case that the annotation of the instance is marked with a service check condition, the service check condition for sending the message can be determined according to the corresponding annotation, for example: the date of the received message is consistent with the current working day. And then, after the validity check of the message to be sent is passed according to the service check condition, constructing a message body of the message to be sent according to the message structure of the message to be sent and the numerical value in the corresponding message structure.
For the message header, the information of the message header can be obtained according to the annotation on the class header in the class instance corresponding to the message to be sent, so as to construct the message header.
For the case that the class instance corresponding to the message to be sent is the class instance of the dynamic language, the message structure of the message to be sent and the numerical value in the corresponding message structure can be directly determined through annotation; for the case that the class instance corresponding to the message to be sent is a Java class instance, the message structure of the message to be sent and the numerical value in the corresponding message structure can be determined through a reflection mechanism.
Fig. 3 is a schematic diagram of a packet sending flow provided in the present invention, as shown in fig. 3, when a packet needs to be sent, a packet processing system may first construct a packet, then extract an annotation and an attribute value of an attribute in a java bean instance, and then determine a packet structure and a value in a corresponding packet structure according to the attribute value and the attribute annotation of the java bean instance, so as to construct a specific packet body. And constructing a message header according to the annotation defined on the class instance header, and performing a message sending operation after the construction is completed. Therefore, the message content to be sent is dynamically packaged through the annotation on the JavaBean class, and the processing of a subsequent service system is facilitated.
The financial message processing device provided by the invention is described below, and the financial message processing device described below and the financial message processing method described above can be correspondingly referred to each other.
Fig. 4 is a schematic structural diagram of a financial message processing apparatus provided in the present invention, as shown in fig. 4, the apparatus includes:
the first determining module 400 is configured to determine a message type of the target financial message according to a message header of the target financial message after receiving the target financial message;
a second determining module 410, configured to determine a corresponding target configuration file or target class according to a message type of the target financial message; wherein, the mapping relation between the message structure of the target financial message and the computer data structure is configured in the target configuration file, and the mapping relation between the message structure of the target financial message and the computer data structure is marked in the target class;
the parsing module 420 is configured to parse the target financial message based on the target configuration file or the target class.
Optionally, the target class includes a class of dynamic language or a Java class, and the target class includes annotations of a corresponding programming language, where the annotations are used to mark the structured information of the header and the body of the message on the class header and the class attribute of the target class, respectively.
Optionally, in the case that the target class is a class of a dynamic language, parsing the target financial packet based on the target class includes:
constructing an instance of a corresponding class of the dynamic language;
and according to the dynamic language annotation contained in the corresponding class of the dynamic language, assigning the numerical value in the corresponding message structure of the target financial message to the class attribute in the instance of the corresponding class of the dynamic language, so as to realize the analysis of the target financial message.
Optionally, in the case that the target class is a Java class, parsing the target financial packet based on the target class includes:
dynamically constructing an instance of a Java class through a Java reflection mechanism;
and according to Java notes contained in the Java classes, assigning values in the corresponding message structures of the target financial messages to class attributes in the examples of the Java classes through a Java reflection mechanism, and analyzing the target financial messages.
Optionally, the annotation is further used for marking the service verification condition of the message on the class attribute of the target class;
the apparatus further comprises:
and the verification module is used for carrying out business validity verification on the message content obtained by analysis according to the business verification conditions of the target financial message marked by the annotation after analyzing the target financial message.
Optionally, the apparatus further comprises a sending module, configured to:
when a message needs to be sent, determining a message structure of the message to be sent, numerical values in the corresponding message structure and service verification conditions according to class attribute values and notes in class examples corresponding to the message to be sent;
after the validity of the message to be sent is checked according to the service check condition, a message body of the message to be sent is constructed according to the message structure of the message to be sent and the numerical value in the corresponding message structure, and a message header is constructed according to the annotation on the class header in the class instance corresponding to the message to be sent.
Optionally, the Java class is a Java bean class.
It should be noted that, the device provided by the present invention can implement all the method steps implemented by the method embodiment and achieve the same technical effects, and the parts and beneficial effects that are the same as those of the method embodiment in the present embodiment are not described in detail herein.
Fig. 5 is a schematic structural diagram of an electronic device according to the present invention, as shown in fig. 5, the electronic device may include: processor 510, communication interface (Communications Interface) 520, memory 530, and communication bus 540, wherein processor 510, communication interface 520, memory 530 complete communication with each other through communication bus 540. Processor 510 may invoke logic instructions in memory 530 to perform any of the financial message processing methods provided in the various embodiments described above.
Further, the logic instructions in the memory 530 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
It should be noted that, the electronic device provided by the present invention can implement all the method steps implemented by the method embodiments and achieve the same technical effects, and the details and beneficial effects of the same parts and advantages as those of the method embodiments in the present embodiment are not described in detail.
In another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform any of the financial message processing methods provided in the above embodiments.
It should be noted that, the non-transitory computer readable storage medium provided by the present invention can implement all the method steps implemented by the method embodiments and achieve the same technical effects, and detailed descriptions of the same parts and beneficial effects as those of the method embodiments in this embodiment are omitted.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (7)

1. A financial message processing method, comprising:
after receiving a target financial message, determining the message type of the target financial message according to the message header of the target financial message;
determining a corresponding target class according to the message type of the target financial message; wherein, the mapping relation between the message structure and the computer data structure of the target financial message is marked in the target class;
analyzing the target financial message based on the target class;
the target class comprises a class of dynamic language or Java class, the target class comprises notes of corresponding programming language, and the notes are used for respectively marking the structured information of the message header and the message body on the class header and the class attribute of the target class;
the annotation is also used for marking the service verification condition of the message on the class attribute of the target class;
after the target financial message is parsed, the method further includes:
according to the business verification conditions of the target financial message marked by the annotation, carrying out business validity verification on the message content obtained by analysis;
the method further comprises the steps of:
when a message is required to be sent, determining a message structure of the message to be sent, values in the corresponding message structure and service verification conditions according to class attribute values and notes in class examples corresponding to the message to be sent;
after the validity of the message to be sent is checked according to the service check condition, constructing a message body of the message to be sent according to the message structure of the message to be sent and the numerical value in the corresponding message structure, and constructing a message header according to the annotation on the class head in the class instance corresponding to the message to be sent.
2. The method according to claim 1, wherein, in the case that the target class is a class of a dynamic language, the parsing the target financial message based on the target class includes:
constructing an instance of a corresponding class of the dynamic language;
and assigning the numerical values in the corresponding message structures of the target financial messages to class attributes in the instances of the corresponding classes of the dynamic language according to the dynamic language annotation contained in the corresponding classes of the dynamic language, so as to realize the analysis of the target financial messages.
3. The method according to claim 1, wherein, in the case that the target class is a Java class, the parsing the target financial message based on the target class includes:
dynamically constructing an instance of the Java class through a Java reflection mechanism;
and according to Java notes contained in the Java classes, assigning values in the corresponding message structures of the target financial messages to class attributes in the Java class examples through a Java reflection mechanism, and analyzing the target financial messages.
4. The financial message processing method of claim 1, wherein the Java class is a Java bean class.
5. A financial message processing apparatus, comprising:
the first determining module is used for determining the message type of the target financial message according to the message header of the target financial message after receiving the target financial message;
the second determining module is used for determining a corresponding target class according to the message type of the target financial message; wherein, the mapping relation between the message structure and the computer data structure of the target financial message is marked in the target class;
the analysis module is used for analyzing the target financial message based on the target class;
the target class comprises a class of dynamic language or Java class, the target class comprises notes of corresponding programming language, and the notes are used for respectively marking the structured information of the message header and the message body on the class header and the class attribute of the target class;
the annotation is also used for marking the service verification condition of the message on the class attribute of the target class;
the apparatus further comprises:
the verification module is used for carrying out business validity verification on the message content obtained by analysis according to the business verification condition of the target financial message marked by the annotation after analyzing the target financial message;
the apparatus further comprises a sending module configured to:
when a message is required to be sent, determining a message structure of the message to be sent, values in the corresponding message structure and service verification conditions according to class attribute values and notes in class examples corresponding to the message to be sent;
after the validity of the message to be sent is checked according to the service check condition, constructing a message body of the message to be sent according to the message structure of the message to be sent and the numerical value in the corresponding message structure, and constructing a message header according to the annotation on the class head in the class instance corresponding to the message to be sent.
6. 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 financial message processing method of any one of claims 1 to 4 when the program is executed by the processor.
7. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the financial message processing method of any of claims 1 to 4.
CN202310621201.2A 2023-05-30 2023-05-30 Financial message processing method and device, electronic equipment and storage medium Active CN116346961B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310621201.2A CN116346961B (en) 2023-05-30 2023-05-30 Financial message processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310621201.2A CN116346961B (en) 2023-05-30 2023-05-30 Financial message processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116346961A CN116346961A (en) 2023-06-27
CN116346961B true CN116346961B (en) 2023-09-05

Family

ID=86876335

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310621201.2A Active CN116346961B (en) 2023-05-30 2023-05-30 Financial message processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116346961B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116719871B (en) * 2023-06-29 2024-03-19 上海中汇亿达金融信息技术有限公司 Data interaction method, device and system of transaction management system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109889375A (en) * 2019-01-23 2019-06-14 中国银行股份有限公司 Service message method of calibration, device and computer storage medium
WO2019192085A1 (en) * 2018-04-02 2019-10-10 平安科技(深圳)有限公司 Method, apparatus and device for direct-connected communication between bank and enterprise, and computer-readable storage medium
CN113761588A (en) * 2021-01-29 2021-12-07 北京京东拓先科技有限公司 Data verification method and device, terminal equipment and storage medium
CN114584631A (en) * 2022-03-01 2022-06-03 中国农业银行股份有限公司 Message processing method and device, electronic equipment and storage medium
CN114979264A (en) * 2022-05-16 2022-08-30 中国银行股份有限公司 Financial level message processing method and device
CN115174375A (en) * 2022-07-08 2022-10-11 中国银行股份有限公司 Message unpacking method, device, equipment and medium
CN115314573A (en) * 2022-08-05 2022-11-08 中国银行股份有限公司 Dynamic loading method and device for message body, electronic equipment and storage medium
CN115334145A (en) * 2022-08-09 2022-11-11 中国建设银行股份有限公司 Business processing method and device, electronic equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019192085A1 (en) * 2018-04-02 2019-10-10 平安科技(深圳)有限公司 Method, apparatus and device for direct-connected communication between bank and enterprise, and computer-readable storage medium
CN109889375A (en) * 2019-01-23 2019-06-14 中国银行股份有限公司 Service message method of calibration, device and computer storage medium
CN113761588A (en) * 2021-01-29 2021-12-07 北京京东拓先科技有限公司 Data verification method and device, terminal equipment and storage medium
CN114584631A (en) * 2022-03-01 2022-06-03 中国农业银行股份有限公司 Message processing method and device, electronic equipment and storage medium
CN114979264A (en) * 2022-05-16 2022-08-30 中国银行股份有限公司 Financial level message processing method and device
CN115174375A (en) * 2022-07-08 2022-10-11 中国银行股份有限公司 Message unpacking method, device, equipment and medium
CN115314573A (en) * 2022-08-05 2022-11-08 中国银行股份有限公司 Dynamic loading method and device for message body, electronic equipment and storage medium
CN115334145A (en) * 2022-08-09 2022-11-11 中国建设银行股份有限公司 Business processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN116346961A (en) 2023-06-27

Similar Documents

Publication Publication Date Title
CN110287109B (en) Protocol interface testing method and device, computer equipment and storage medium thereof
CN111274157B (en) Test data simulation method and device, computer equipment and storage medium
CN114500690B (en) Interface data processing method and device, electronic equipment and storage medium
US20190196811A1 (en) Api specification generation
EP1605374A1 (en) Techniques for serializing events
CN107015948B (en) Log information formatting method and system
CN116346961B (en) Financial message processing method and device, electronic equipment and storage medium
CN109995643B (en) Business mail pushing method and device
CN111240688B (en) excel file analysis method and device, computer equipment and storage medium
CN114650163B (en) Fuzzy test method and system for stateful network protocol
CN109388417A (en) A kind of update method of communication protocol, system and terminal device
US20080313291A1 (en) Method and apparatus for encoding data
CN113783860B (en) Message processing method, device, equipment and storage medium based on visual configuration
CN111767161A (en) Remote calling depth recognition method and device, computer equipment and readable storage medium
CN114492324A (en) Component data statistical method and device
CN113536762A (en) JSON text comparison method and device
CN110647416B (en) Message queue tracking and recording method and system
US20130232108A1 (en) Enhanced Messaging Transaction Performance With Auto-Selected Dual-Tag Fields
CN113704486A (en) Map data construction method and device and map data query method and device
CN111931184B (en) Anti-serialization vulnerability detection method and device
CN114827309B (en) Equipment fingerprint generation method, device, equipment and readable storage medium
US20230222294A1 (en) Anaphoric reference resolution using natural language processing and machine learning
CN116069579A (en) Log-based data synchronization method, device, electronic equipment and program product
CN116662152A (en) Object attribute error correction method, device, equipment and storage medium
CN117251384A (en) Interface automation test case generation method and system

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