CN113395292A - Message processing method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN113395292A
CN113395292A CN202110770267.9A CN202110770267A CN113395292A CN 113395292 A CN113395292 A CN 113395292A CN 202110770267 A CN202110770267 A CN 202110770267A CN 113395292 A CN113395292 A CN 113395292A
Authority
CN
China
Prior art keywords
parameter table
message
field
parameter
column
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.)
Granted
Application number
CN202110770267.9A
Other languages
Chinese (zh)
Other versions
CN113395292B (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 CN202110770267.9A priority Critical patent/CN113395292B/en
Publication of CN113395292A publication Critical patent/CN113395292A/en
Application granted granted Critical
Publication of CN113395292B publication Critical patent/CN113395292B/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/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present disclosure provides a message processing method, which can be applied to the technical field of communication or the technical field of finance, and the method comprises the following steps: analyzing a message to be processed to obtain the field content of each field of the message, creating at least one parameter table, wherein the fields among the at least one parameter table are associated, so that the message is displayed and processed through the at least one parameter table, and the field content of each field is input into the field corresponding to the at least one parameter table. The disclosure also provides a message processing device, equipment and a storage medium. By creating the parameter table, the column content of the message is stored in the parameter table no matter which type of message is, the logic change of the message can be quickly realized by newly adding modification or deletion in the parameter table, and the service efficiency is improved.

Description

Message processing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of communications, and in particular, to a method and an apparatus for processing a packet, an electronic device, and a storage medium.
Background
In the existing bank asset hosting business, after a hosting line receives an investment instruction of a manager or a trustee on an external standard, the hosting line needs to send a transaction instruction and a money transfer instruction to an overseas bank, and after the transaction is completed, the overseas bank returns transaction information such as a transaction result, account details and the like. All of these interactions are implemented by messages defined by the Society for world Wide banking financial Telecommunications (SWIFT). SWIFT networks continue to operate at a rate of over 99.99% per year, which is a very secure and robust approach.
In an actual business scenario, common message types include a transfer type 103, 202 and 210 message, a foreign currency transaction type 300, 320 and 380 message, a securities transaction type 54X message, a 535 and 536 securities reconciliation type message, and a 940 and 950 fund reconciliation type message. In the prior art, for each type of messages, the logic is processed independently, unified planning is lacked, and meanwhile, the message processing efficiency is low along with rapid expansion of service change and growth.
Disclosure of Invention
In view of the foregoing problems, the present disclosure provides a message processing method, an apparatus, an electronic device, and a storage medium.
According to a first aspect of the present disclosure, there is provided a message processing method, including:
analyzing a message to be processed to obtain the field content of each field of the message;
creating at least one parameter table, wherein fields among the at least one parameter table are associated so as to display and process the message through the at least one parameter table;
and inputting the field content of each field into the field corresponding to the at least one parameter table.
In an embodiment of the present disclosure, the at least one parameter table includes a first parameter table, and the entering the field content of each field into the field corresponding to the at least one parameter table includes:
extracting a column and a column value of the message;
and inputting the column and the column value of the message into the first parameter table.
In an embodiment of the present disclosure, the at least one parameter table includes a second parameter table, and the entering the field content of each field into the field corresponding to the at least one parameter table includes:
extracting the message data falling surface of the message and a service processing callback function corresponding to the field of the message data falling surface;
and inputting the message data floor table of the message and the service processing callback function corresponding to the message data floor table into the second parameter table.
In an embodiment of the present disclosure, the at least one parameter table includes a third parameter table, and the entering the field content of each field into the field corresponding to the at least one parameter table includes:
acquiring a corresponding parameter name of a place value in the message;
determining a splitting regular expression formula according to the format information of the message;
and correspondingly inputting the corresponding parameter names and the splitting regular expression into the third parameter table.
In an embodiment of the present disclosure, the at least one parameter table includes a fourth parameter table, and the entering the field content of each field into the field corresponding to the at least one parameter table includes:
acquiring a parameter name corresponding to the corresponding parameter name, and allowing the message data corresponding to the parameter name to fall to the earth surface;
and inputting the parameter names and the message data floor table corresponding to the parameter names into a fourth parameter table.
In an embodiment of the present disclosure, the method further includes:
and inputting the field content of each field into the field corresponding to the at least one parameter table according to the block sequence of the blocks in the message and the field sequence of the fields in the blocks.
In an embodiment of the present disclosure, the at least one parameter table includes a first parameter table, a second parameter table, a third parameter table, and a fourth parameter table;
the fields of the first parameter table comprise a message type, an area code, a column number, an option mark, a column sequence, a qualifier column, an option column, a fixed value and a pop-up and push-down mark;
the fields of the second parameter table comprise a message type, a packet name, a processing step number, a target table, a processing interface, an area code corresponding to the processing times, an English description, an effective starting date and an effective ending date;
the fields of the third parameter table comprise message types, area codes, column position numbers, qualifiers, corresponding parameter names, split regular expression sub-columns, sub-column serial numbers, substitution words, processing SQL, default values and parameter types;
the fields of the fourth parameter table comprise parameter names, corresponding database fields, analysis packets, main key marks, whether the data are null marks, effective starting dates and effective ending dates.
In an embodiment of the present disclosure, the method further includes:
extracting field information related to the service from the at least one parameter table based on the service to be processed;
and generating a service instruction and/or service data corresponding to the service based on the field information.
A second aspect of the present disclosure provides a packet processing apparatus, including:
the analysis module is used for analyzing the message to be processed to obtain the field content of each field of the message;
the creating module is used for creating at least one parameter table, and fields among the at least one parameter table are associated so as to display and process the message through the at least one parameter table;
and the input module is used for inputting the field content of each field into the field corresponding to the at least one parameter table.
In an embodiment of the present disclosure, the at least one parameter table includes a first parameter table, and the input module is specifically configured to extract a field and a field value of the packet, and input the field and the field value of the packet into the first parameter table.
In an embodiment of the present disclosure, the at least one parameter table includes a second parameter table, and the input module is specifically configured to extract a message data falling surface of the message, and a service processing callback function corresponding to a field of the message data falling surface; and inputting the message data floor table of the message and the service processing callback function corresponding to the message data floor table into the second parameter table.
In an embodiment of the present disclosure, the at least one parameter table includes a third parameter table, and the input module is specifically configured to obtain a parameter name corresponding to a place in the packet, determine a splitting regular expression according to format information of the packet, and correspondingly input the corresponding parameter name and the splitting regular expression into the third parameter table.
In an embodiment of the present disclosure, the at least one parameter table includes a fourth parameter table, and the input module is specifically configured to obtain a parameter name corresponding to the corresponding parameter name, and to input the parameter name and a message data floor table corresponding to the parameter name into the fourth parameter table.
In an embodiment of the present disclosure, the input module is specifically configured to input the field content of each field into the field corresponding to the at least one parameter table according to the block sequence of the blocks in the message and the field sequence of the fields in the blocks.
In an embodiment of the present disclosure, the at least one parameter table includes a first parameter table, a second parameter table, a third parameter table, and a fourth parameter table, a field of the first parameter table includes a packet type, an area number, a field number, a selectable item flag, a field sequence, a qualifier column, an option column, a fixed value, and a pop-up flag, a field of the second parameter table includes a packet type, a packet name, a processing step number, a target table, a processing interface, an area number corresponding to a processing time, an english description, an effective start date, and an effective end date, a field of the third parameter table includes a packet type, an area number, a field number, a qualifier, a corresponding parameter name, a regular split expression formula, a subcolumn number, a substitute word, a processing SQL, a default value, and a parameter type, a field of the fourth parameter table includes a parameter name, a corresponding database field, an analysis packet, and a packet type, A primary key flag, a null flag, an effective start date, an effective end date.
In an embodiment of the present disclosure, the packet processing apparatus further includes:
the information extraction module is used for extracting field information related to the service from the at least one parameter table based on the service to be processed;
and the generating module is used for generating a service instruction and/or service data corresponding to the service based on the field information.
A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the message processing method described above.
A fourth aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the above-mentioned message processing method.
A fifth aspect of the present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the message processing method described above.
According to the embodiment of the disclosure, a message to be processed is analyzed, field content of each field of the message is obtained, at least one parameter table is created, fields among the at least one parameter table are associated, the message is displayed and processed through the at least one parameter table, and the field content of each field is input into the field corresponding to the at least one parameter table. By creating the parameter table, the column content of the message is stored in the parameter table no matter which type of message is, the logic change of the message can be quickly realized by newly adding modification or deletion in the parameter table, and the service efficiency is improved.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be apparent from the following description of embodiments of the disclosure, which proceeds with reference to the accompanying drawings, in which:
fig. 1 schematically illustrates an application scenario diagram of a message processing method, apparatus, device, medium, and program product according to embodiments of the present disclosure;
FIG. 2 schematically shows a flow chart of a message processing method according to an embodiment of the present disclosure;
FIG. 3 schematically shows a flow chart of a message processing method according to an embodiment of the present disclosure;
fig. 4 schematically illustrates a message format diagram of an MT536 message according to an embodiment of the present disclosure;
FIG. 5 schematically shows a flow chart of a message processing method according to an embodiment of the present disclosure;
FIG. 6 schematically shows a flow chart of a message processing method according to an embodiment of the present disclosure;
FIG. 7 schematically illustrates a flow chart of a message processing method according to an embodiment of the present disclosure;
fig. 8 schematically shows a block diagram of a structure of a message processing apparatus according to an embodiment of the present disclosure; and
fig. 9 schematically shows a block diagram of an electronic device adapted to implement a message processing method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
It should be noted that the message processing method, the message processing apparatus, the electronic device, and the storage medium of the present disclosure may be used in the financial field, and may also be used in any field other than the financial field.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the personal information of the related user all accord with the regulations of related laws and regulations, necessary security measures are taken, and the customs of the public order is not violated.
The embodiment of the disclosure provides a message processing method, which includes analyzing a message to be processed, obtaining field content of each field of the message, creating at least one parameter table, associating fields among the at least one parameter table, displaying and processing the message through the at least one parameter table, and inputting the field content of each field into the field corresponding to the at least one parameter table. By creating the parameter table, the column content of the message is stored in the parameter table no matter which type of message is, the logic change of the message can be quickly realized by newly adding modification or deletion in the parameter table, and the service efficiency is improved.
Fig. 1 schematically illustrates an exemplary system architecture 100 to which a message processing method may be applied, according to an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of a system architecture to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired and/or wireless communication links, and so forth.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as a shopping-like application, a web browser application, a search-like application, an instant messaging tool, a mailbox client, and/or social platform software, etc. (by way of example only).
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (for example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and perform other processing on the received data such as the user request, and feed back a processing result (e.g., a webpage, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the message processing method provided by the embodiment of the present disclosure may be generally executed by the server 105. Accordingly, the message processing apparatus provided by the embodiment of the present disclosure may be generally disposed in the server 105. The message processing method provided by the embodiment of the present disclosure may also be executed by a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the message processing apparatus provided by the embodiment of the present disclosure may also be disposed in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Alternatively, the message processing method provided by the embodiment of the present disclosure may also be executed by the terminal device 101, 102, or 103, or may also be executed by another terminal device different from the terminal device 101, 102, or 103. Correspondingly, the message processing apparatus provided in the embodiment of the present disclosure may also be disposed in the terminal device 101, 102, or 103, or in another terminal device different from the terminal device 101, 102, or 103.
For example, the message to be processed may be originally stored in any one of the terminal devices 101, 102, or 103 (for example, the terminal device 101, but not limited thereto), or may be stored on an external storage device and may be imported into the terminal device 101. Then, the terminal device 101 may locally execute the message processing method provided by the embodiment of the present disclosure, or send the message to be processed to another terminal device, server, or server cluster, and execute the message processing method provided by the embodiment of the present disclosure by another terminal device, server, or server cluster that receives the message to be processed.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Fig. 2 schematically shows a flow chart of a message processing method according to an embodiment of the present disclosure.
As shown in fig. 2, the method includes operations S201 to S203.
In operation S201, the message to be processed is analyzed to obtain the field content of each field of the message.
In operation S202, at least one parameter table is created, and fields between the at least one parameter table are associated to display and process the message through the at least one parameter table.
In operation S203, the field content of each field is input into the field corresponding to the at least one parameter table.
In the present disclosure, the messages to be processed may be various types of messages in the SWIFT messages, which are generally formed by MT + three numbers, for example, MT536, MT567, MT543, etc., wherein the first number represents a category for describing the basic business functions of the message, the second number represents a packet for describing the message functions in a specific category, and the third number represents a type for describing specific functions.
In the present disclosure, the pending message may be a message file sent from the SWIFTALLIANCE server, where a message file includes many individual messages. Splitting the message into separate messages according to a uniform separator "$", and then landing the message to a system mt _ bs _ text. Wherein, public information such as a receiving and sending mark, a message type, a BIC code received and sent and the like can be obtained according to the message header. When the message is analyzed, each line of the analyzed data represents all the information of one column.
In the present disclosure, the SWIFT message is usually divided into blocks, and one block includes a plurality of fields. The column is a main component element of the message body part and mainly comprises a column label, a qualifier and column content, and the column content has a certain column format.
In the present disclosure, the number of the parameter tables may be one, two, three, or four, and when there are a plurality of parameter tables, at least a part of fields of the plurality of parameter tables are associated, for example, there are three parameter tables, a field of one parameter table includes a message data floor table and a service processing callback function, a field of another parameter table includes a field and a parameter name in the message data floor table, and a field of another parameter table includes a corresponding parameter name and a splitting regular expression form of the message. Through associating fields in the tables, the readability and the maintainability of the message are increased, the original tightly coupled logic is changed into loose coupling, and the modification and the maintenance are easier.
In the present disclosure, fields in the parameter table include, for example, a packet type, an area code, a column number, a selectable item flag, a column order, a qualifier column, an option column, a packet name, a target table, a processing interface, a parameter name, a split regular expression, and the like.
According to the embodiment of the disclosure, a message to be processed is analyzed, field content of each field of the message is obtained, at least one parameter table is created, fields among the at least one parameter table are associated, the message is displayed and processed through the at least one parameter table, and the field content of each field is input into the field corresponding to the at least one parameter table. By creating the parameter table, the column content of the message is stored in the parameter table no matter which type of message is, the logic change of the message can be quickly realized by newly adding modification or deletion in the parameter table, and the service efficiency is improved.
In an embodiment of the present disclosure, the field content of each field is input into the field corresponding to the at least one parameter table according to the block sequence of the block in the message and the field sequence of the fields in the block. Wherein, the column sequence can be customized by the user.
In an embodiment of the present disclosure, the at least one parameter table includes a first parameter table, a second parameter table, a third parameter table, and a fourth parameter table; the fields of the first parameter table comprise a message type, an area code, a column number, an option mark, a column sequence, a qualifier column, an option column, a fixed value and a pop-up mark; the fields of the second parameter table comprise a message type, a packet name, a processing step number, a target table, a processing interface, an area code corresponding to the processing times, an English description, an effective starting date and an effective ending date; the fields of the third parameter table comprise message types, area codes, column position numbers, qualifiers, corresponding parameter names, split regular expression sub-columns, sub-column serial numbers, substitution words, processing SQL, default values and parameter types; the fields of the fourth parameter table comprise parameter names, corresponding database fields, analysis packets, main key marks, whether the data are null marks, effective starting dates and effective ending dates.
Fig. 3 schematically shows a flow chart of a message processing method according to an embodiment of the present disclosure.
As shown in fig. 3, the method includes operations S301 and S302 in addition to operations S201 to S203 shown in fig. 2, and in this embodiment, the at least one parameter table includes a first parameter table.
In operation S301, a field and a field value of the message are extracted.
In operation S302, a field and a field value of the message are input into the first parameter table.
In the present disclosure, the fields of the first parameter table each include a message type, an area number, a field number, a selectable flag, a field sequence, a qualifier column, an option column, a fixed value, and a pop-up flag, and in an example, the message MT536 is taken as an example, as shown in fig. 4, the message includes an area number (sequence), a selectable flag (status), a field number (tag), a field sequence (qualifier), a general field name (generic field name), a detailed field name (failed field name), a content (content)/option (options), and a sequence (No.), and the first parameter table is shown in table 1.
TABLE 1
Figure BDA0003152437790000101
Here, "sequence a" in fig. 4 corresponds to "area code" in table 1. The first two digits of "Tag" of FIG. 4 correspond to the two special entries in Table 1, column numbers 00 and 99, which represent the beginning and end of the field, respectively. "Status" of fig. 4 corresponds to the selectable flag of table 1, M being must and O being select. The column sequence in table 1 represents the display sequence of the column in the message, and can be customized. "Qualifier" of fig. 4 corresponds to the Qualifier column of table 1. The third letter of "Tag" in fig. 4 corresponds to the option column in table 1. "contents/operations" of FIG. 4 corresponds to fixed values of Table 1. The pop-to-stack flag in table 1 represents semantic analysis during message parsing.
Fig. 5 schematically shows a flow chart of a message processing method according to an embodiment of the present disclosure.
As shown in fig. 5, the method includes operations S501 and S502 in addition to operations S201 to S203 shown in fig. 2, and in this embodiment, the at least one parameter table includes a second parameter table.
In operation S501, the message data falling surface of the message and the service processing callback function corresponding to the field of the message data falling surface are extracted.
In operation S502, the message data drop table of the message and the service processing callback function corresponding to the message data drop table are input into the second parameter table.
In the present disclosure, the fields of the second parameter table all include a packet type, a packet name, a processing step number, a destination table, a processing interface, an area code corresponding to the processing times, an english description, an effective start date, and an effective end date, and in an example, taking the packet MT536 shown in fig. 4 as an example, the corresponding second parameter table is shown in table 2.
TABLE 2
Figure BDA0003152437790000111
Figure BDA0003152437790000121
Bag name: corresponding to each message type, one message corresponds to a unique packet name.
The processing step number: one message can be sequentially configured with a plurality of processing logics
Target table: message data falling to the surface
Processing an interface: service processing callback function
Area number corresponding to the processing times: the data of the middle partition of the message supports a plurality of data, so that the record number needs to be judged according to the column and the position needs to be circulated during processing.
Fig. 6 schematically shows a flow chart of a message processing method according to an embodiment of the present disclosure.
As shown in fig. 6, the method includes operations S601 to S603 in addition to operations S201 to S203 shown in fig. 2, and in this embodiment, the at least one parameter table includes a third parameter table.
In operation S601, a parameter name corresponding to the place value in the message is obtained.
In operation S602, a splitting regular expression is determined according to the format information of the packet.
In operation S603, the corresponding parameter name and the split regular expression are correspondingly input into the third parameter table.
In the present disclosure, the fields of the third parameter table all include a packet type, an area code, a column number, a qualifier, a corresponding parameter name, a split regular expression, a sub-column number, a substitute word, a processing SQL, a default value, and a parameter type, and in an example, taking the packet MT536 shown in fig. 4 as an example, the corresponding third parameter table is shown in table 3.
TABLE 3
Figure BDA0003152437790000122
Figure BDA0003152437790000131
Here, "sequence a" in fig. 4 corresponds to "area code" in table 3. The first two digits of "Tag" of fig. 4 correspond to two of the column numbers, 00 and 99 of table 3 as special records, which represent the beginning and end of the area, respectively. "Qualifier" of fig. 4 corresponds to the Qualifier of table 3.
And corresponding parameter names, namely variable names which are used as column values in the stored message, correspond to the parameter names in the fourth parameter table and are applied to the input parameters of the service processing callback function in the second parameter table.
And splitting the regular expression, namely obtaining the regular expression according to the message format.
The number of the sub-column: the method is used together with a 'splitting regular expression formula'. For example: the column values are ": 98A:: PREP// 20170728", and the value assigned to the PREP _ date variable is 20170728.
Replacing character strings: and is temporarily useless. The effect was replaced by "treatment sql".
Processing sql: the priority of the field is higher than the sequence number of the sub-column of the 'splitting regular expression', and the field can be accessed according to the configured select statement
Default values are as follows: a default value of "corresponding parameter name" is set. Parameter types are 0-number and 1-character.
Fig. 7 schematically shows a flow chart of a message processing method according to an embodiment of the present disclosure.
As shown in fig. 7, the method includes operations S701 to S702 in addition to operations S201 to S203 shown in fig. 2, and in this embodiment, the at least one parameter table includes a fourth parameter table.
In operation S701, a parameter name corresponding to the corresponding parameter name is obtained, and the message data corresponding to the parameter name falls to the surface.
In operation S702, the parameter name and the message data floor table corresponding to the parameter name are input into a fourth parameter table.
In the present disclosure, the fields of the fourth parameter table all include a parameter name, a corresponding database field, an analysis packet, a primary key flag, a null flag, an effective start date, and an effective end date, and in an example, taking the message MT536 shown in fig. 4 as an example, the corresponding fourth parameter table is as shown in table 4.
Figure BDA0003152437790000141
Parameter name corresponding to the "corresponding parameter name" in the third parameter table "
Corresponding database field: the corresponding message data falls into the field in the ground
Parsing the package with the package name in the second parameter table "
Main key mark: default is 1-is
Whether it is an empty flag: defaults to 1-can be null
In an embodiment of the present disclosure, after the operation S203, the method may further include: based on the service to be processed, extracting field information related to the service from the at least one parameter table, and based on the field information, generating a service instruction and/or service data corresponding to the service. Specifically, according to the configuration in the third parameter table, a required part, for example, 35B, in each column value is taken, the value obtained in the previous step is "ISIN XS1746281226 GCL NEW ENERGY H7.101/30/21", after the processing is performed according to the regular expression, a part in a second parenthesis of the regular expression, namely, "XS 1746281226", is taken, the variable is assigned to the corresponding parameter, the variable is transmitted to a corresponding processing interface (the processing interface corresponds to a logic processing program) in the second parameter table, and the logic processing program is run.
Based on the message processing method, the disclosure also provides a message processing device. The apparatus will be described in detail below with reference to fig. 8.
Fig. 8 schematically shows a block diagram of a message processing apparatus according to an embodiment of the present disclosure.
As shown in fig. 8, the message processing apparatus 800 of this embodiment includes a parsing module 810, a creating module 820, and an input module 830.
The parsing module 810 is configured to parse the message to be processed to obtain the field content of each field of the message. In an embodiment, the parsing module 810 may be configured to perform the operation S201 described above, which is not described herein again.
The creating module 820 is used for creating at least one parameter table, and fields between the at least one parameter table are associated, so as to display and process the message through the at least one parameter table. In an embodiment, the creating module 820 may be configured to perform the operation S202 described above, and is not described herein again.
The input module 830 is configured to input the field content of each field into the field corresponding to the at least one parameter table. In an embodiment, the input module 830 may be configured to perform the operation S203 described above, and is not described herein again.
According to the embodiment of the disclosure, a message to be processed is analyzed, field content of each field of the message is obtained, at least one parameter table is created, fields among the at least one parameter table are associated, the message is displayed and processed through the at least one parameter table, and the field content of each field is input into the field corresponding to the at least one parameter table. By creating the parameter table, the column content of the message is stored in the parameter table no matter which type of message is, the logic change of the message can be quickly realized by newly adding modification or deletion in the parameter table, and the service efficiency is improved.
In an embodiment of the present disclosure, the at least one parameter table includes a first parameter table, and the input module 830 is specifically configured to extract a field and a field value of the message, and input the field and the field value of the message into the first parameter table.
In an embodiment of the present disclosure, the at least one parameter table includes a second parameter table, and the input module 830 is specifically configured to extract a message data falling-to-the-earth surface of the message, and a service processing callback function corresponding to a field of the message data falling-to-the-earth surface; and inputting the message data floor table of the message and the service processing callback function corresponding to the message data floor table into the second parameter table.
In an embodiment of the present disclosure, the at least one parameter table includes a third parameter table, and the input module 830 is specifically configured to obtain a parameter name corresponding to a column value in the packet, determine a splitting regular expression according to format information of the packet, and correspondingly input the parameter name and the splitting regular expression into the third parameter table.
In an embodiment of the present disclosure, the at least one parameter table includes a fourth parameter table, and the input module 830 is specifically configured to obtain a parameter name corresponding to the corresponding parameter name, and a message data floor table corresponding to the parameter name, and input the parameter name and the message data floor table corresponding to the parameter name into the fourth parameter table.
In an embodiment of the present disclosure, the input module 830 is specifically configured to input the field content of each field into the field corresponding to the at least one parameter table according to the block sequence of the blocks in the message and the field sequence of the fields in the blocks.
In an embodiment of the present disclosure, the at least one parameter table includes a first parameter table, a second parameter table, a third parameter table, and a fourth parameter table, a field of the first parameter table includes a packet type, an area number, a field number, a selectable item flag, a field sequence, a qualifier column, an option column, a fixed value, and a pop-up flag, a field of the second parameter table includes a packet type, a packet name, a processing step number, a destination table, a processing interface, an area number corresponding to a processing time, an english description, an effective start date, and an effective end date, a field of the third parameter table includes a packet type, an area number, a field number, a qualifier, a corresponding parameter name, a regular split expression formula, a subcolumn number, a substitute word, a processing SQL, a default value, and a parameter type, a field of the fourth parameter table includes a parameter name, a corresponding database field, an analysis packet, a primary key flag, a secondary key, a, Whether it is an empty flag, a valid start date, a valid end date.
In an embodiment of the present disclosure, the message processing apparatus 800 further includes:
the information extraction module is used for extracting field information related to the service from the at least one parameter table based on the service to be processed;
and the generating module is used for generating a service instruction and/or service data corresponding to the service based on the column information.
Any of the parsing module 810, the creating module 820, and the inputting module 830 may be combined into one module to be implemented, or any one of them may be split into a plurality of modules according to an embodiment of the present disclosure. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the disclosure, at least one of the parsing module 810, the creating module 820, and the input module 830 may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware. Alternatively, at least one of the parsing module 810, the creating module 820 and the inputting module 830 may be at least partially implemented as a computer program module, which when executed may perform the respective functions.
Fig. 9 schematically shows a block diagram of an electronic device adapted to implement a message processing method according to an embodiment of the present disclosure.
As shown in fig. 9, an electronic apparatus 900 according to an embodiment of the present disclosure includes a processor 901 which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)902 or a program loaded from a storage portion 908 into a Random Access Memory (RAM) 903. Processor 901 may comprise, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 901 may also include on-board memory for caching purposes. The processor 901 may comprise a single processing unit or a plurality of processing units for performing the different actions of the method flows according to embodiments of the present disclosure.
In the RAM 903, various programs and data necessary for the operation of the electronic apparatus 900 are stored. The processor 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. The processor 901 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 902 and/or the RAM 903. Note that the program may also be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 may also perform various operations of the method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
Electronic device 900 may also include input/output (I/O) interface 905, input/output (I/O) interface 905 also connected to bus 904, according to an embodiment of the present disclosure. The electronic device 900 may also include one or more of the following components connected to the I/O interface 905: an input portion 906 including a keyboard, a mouse, and the like; an output section 907 including components such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 908 including a hard disk and the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as necessary. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 910 as necessary, so that a computer program read out therefrom is mounted into the storage section 908 as necessary.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM 902 and/or the RAM 903 described above and/or one or more memories other than the ROM 902 and the RAM 903.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method illustrated in the flow chart. When the computer program product runs in a computer system, the program code is used for causing the computer system to realize the item recommendation method provided by the embodiment of the disclosure.
The computer program performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure when executed by the processor 901. The systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed in the form of a signal on a network medium, and downloaded and installed through the communication section 909 and/or installed from the removable medium 911. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 909, and/or installed from the removable medium 911. The computer program, when executed by the processor 901, performs the above-described functions defined in the system of the embodiment of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (13)

1. A message processing method comprises the following steps:
analyzing a message to be processed to obtain the field content of each field of the message;
creating at least one parameter table, wherein fields among the at least one parameter table are associated so as to display and process the message through the at least one parameter table;
and inputting the field content of each field into the field corresponding to the at least one parameter table.
2. The method of claim 1, wherein the at least one parameter table comprises a first parameter table, and the entering of the field content of each field into the corresponding field of the at least one parameter table comprises:
extracting a column and a column value of the message;
and inputting the column and the column value of the message into the first parameter table.
3. The method of claim 1, wherein the at least one parameter table comprises a second parameter table, and the entering of the field content of each field into the corresponding field of the at least one parameter table comprises:
extracting the message data falling surface of the message and a service processing callback function corresponding to the field of the message data falling surface;
and inputting the message data floor table of the message and the service processing callback function corresponding to the message data floor table into the second parameter table.
4. The method of claim 3, wherein the at least one parameter table comprises a third parameter table, and the entering of the field content of each field into the corresponding field of the at least one parameter table comprises:
acquiring a corresponding parameter name of a place value in the message;
determining a splitting regular expression formula according to the format information of the message;
and correspondingly inputting the corresponding parameter names and the splitting regular expression into the third parameter table.
5. The method of claim 4, wherein the at least one parameter table comprises a fourth parameter table, and the entering of the field content of each field into the corresponding field of the at least one parameter table comprises:
acquiring a parameter name corresponding to the corresponding parameter name, and allowing the message data corresponding to the parameter name to fall to the earth surface;
and inputting the parameter names and the message data floor table corresponding to the parameter names into a fourth parameter table.
6. The method of claim 1, further comprising:
and inputting the field content of each field into the field corresponding to the at least one parameter table according to the block sequence of the blocks in the message and the field sequence of the fields in the blocks.
7. The method of claim 1, wherein the at least one parameter table comprises a first parameter table, a second parameter table, a third parameter table, and a fourth parameter table;
the fields of the first parameter table comprise a message type, an area code, a column number, an option mark, a column sequence, a qualifier column, an option column, a fixed value and a pop-up and push-down mark;
the fields of the second parameter table comprise a message type, a packet name, a processing step number, a target table, a processing interface, an area code corresponding to the processing times, an English description, an effective starting date and an effective ending date;
the fields of the third parameter table comprise message types, area codes, column position numbers, qualifiers, corresponding parameter names, split regular expression sub-columns, sub-column serial numbers, substitution words, processing SQL, default values and parameter types;
the fields of the fourth parameter table comprise parameter names, corresponding database fields, analysis packets, main key marks, whether the data are null marks, effective starting dates and effective ending dates.
8. The method of any of claims 1 to 7, further comprising:
extracting field information related to the service from the at least one parameter table based on the service to be processed;
and generating a service instruction and/or service data corresponding to the service based on the field information.
9. A message processing apparatus comprising:
the analysis module is used for analyzing the message to be processed to obtain the field content of each field of the message;
the creating module is used for creating at least one parameter table, and fields among the at least one parameter table are associated so as to display and process the message through the at least one parameter table;
and the input module is used for inputting the field content of each field into the field corresponding to the at least one parameter table.
10. The apparatus of claim 9, the apparatus further comprising:
the extraction module is used for extracting field information related to the service from the first message table, the second message table, the third message table and the fourth message based on the service to be processed;
and the generating module is used for generating a service instruction and/or service data corresponding to the service based on the field information.
11. The apparatus of claim 9, wherein,
the at least one parameter table comprises a first parameter table, a second parameter table, a third parameter table and a fourth parameter table;
the fields of the first parameter table comprise a message type, an area code, a column number, an option mark, a column sequence, a qualifier column, an option column, a fixed value and a pop-up and push-down mark;
the fields of the second parameter table comprise a message type, a packet name, a processing step number, a target table, a processing interface, an area code corresponding to the processing times, an English description, an effective starting date and an effective ending date;
the fields of the third parameter table comprise message types, area codes, column position numbers, qualifiers, corresponding parameter names, split regular expression sub-columns, sub-column serial numbers, substitution words, processing SQL, default values and parameter types;
the fields of the fourth parameter table comprise parameter names, corresponding database fields, analysis packets, main key marks, whether the data are null marks, effective starting dates and effective ending dates.
12. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-8.
13. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 8.
CN202110770267.9A 2021-07-07 2021-07-07 Message processing method and device, electronic equipment and storage medium Active CN113395292B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110770267.9A CN113395292B (en) 2021-07-07 2021-07-07 Message processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110770267.9A CN113395292B (en) 2021-07-07 2021-07-07 Message processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113395292A true CN113395292A (en) 2021-09-14
CN113395292B CN113395292B (en) 2023-04-18

Family

ID=77625450

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110770267.9A Active CN113395292B (en) 2021-07-07 2021-07-07 Message processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113395292B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114760374A (en) * 2022-03-22 2022-07-15 中国工商银行股份有限公司 Message parsing method and device, electronic equipment and medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101833738A (en) * 2010-05-19 2010-09-15 中国农业银行股份有限公司 Data processing method and system between domestic custodian bank and overseas custodian agent bank
CN101854298A (en) * 2010-05-19 2010-10-06 中国农业银行股份有限公司 Automatic link method of message, account correction method and system
US20140330799A1 (en) * 2013-05-06 2014-11-06 International Business Machines Corporation Automating generation of messages in accordance with a standard
CN105872035A (en) * 2016-03-28 2016-08-17 中国建设银行股份有限公司 System and method for processing multi-channel messages
CN108600148A (en) * 2018-01-04 2018-09-28 中国银行股份有限公司 A kind of transaction message processing method and processing device
US20190147535A1 (en) * 2017-11-10 2019-05-16 Han-Ming Hsieh Trade data processing device and method for financial instruments
CN110351359A (en) * 2019-07-09 2019-10-18 泰康保险集团股份有限公司 Message data processing method, device, electronic equipment and computer-readable medium
CN111222869A (en) * 2019-11-27 2020-06-02 中国银行股份有限公司 Transaction data processing method, device, computer equipment and medium
CN112035488A (en) * 2020-09-17 2020-12-04 中国银行股份有限公司 Matching method and device for transaction confirmation messages

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101833738A (en) * 2010-05-19 2010-09-15 中国农业银行股份有限公司 Data processing method and system between domestic custodian bank and overseas custodian agent bank
CN101854298A (en) * 2010-05-19 2010-10-06 中国农业银行股份有限公司 Automatic link method of message, account correction method and system
US20140330799A1 (en) * 2013-05-06 2014-11-06 International Business Machines Corporation Automating generation of messages in accordance with a standard
CN105872035A (en) * 2016-03-28 2016-08-17 中国建设银行股份有限公司 System and method for processing multi-channel messages
US20190147535A1 (en) * 2017-11-10 2019-05-16 Han-Ming Hsieh Trade data processing device and method for financial instruments
CN108600148A (en) * 2018-01-04 2018-09-28 中国银行股份有限公司 A kind of transaction message processing method and processing device
CN110351359A (en) * 2019-07-09 2019-10-18 泰康保险集团股份有限公司 Message data processing method, device, electronic equipment and computer-readable medium
CN111222869A (en) * 2019-11-27 2020-06-02 中国银行股份有限公司 Transaction data processing method, device, computer equipment and medium
CN112035488A (en) * 2020-09-17 2020-12-04 中国银行股份有限公司 Matching method and device for transaction confirmation messages

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
娄岩等: "《Visual FoxPro程序设计基础教程》", 28 February 2017, pages: 61 - 62 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114760374A (en) * 2022-03-22 2022-07-15 中国工商银行股份有限公司 Message parsing method and device, electronic equipment and medium
CN114760374B (en) * 2022-03-22 2023-12-05 中国工商银行股份有限公司 Message parsing method and device, electronic equipment and medium

Also Published As

Publication number Publication date
CN113395292B (en) 2023-04-18

Similar Documents

Publication Publication Date Title
US8965751B2 (en) Providing multi-lingual translation for third party content feed applications
US8078986B1 (en) Method and system for a browser module
CN108073429B (en) Payment mode configuration method, device, equipment and storage medium
US10592508B2 (en) Organizing datasets for adaptive responses to queries
CN103605502A (en) Form page display method and server
US9639515B2 (en) Transfer of data between applications using intermediate user interface
CN113395292B (en) Message processing method and device, electronic equipment and storage medium
CN113507419A (en) Training method of flow distribution model, and flow distribution method and device
CN117033431A (en) Work order processing method, device, electronic equipment and medium
CN116594683A (en) Code annotation information generation method, device, equipment and storage medium
US20170322777A1 (en) Presentation Oriented Rules-based Technical Architecture Display Framework
CN115689570A (en) Business information risk identification method, device, equipment and medium
CN113448578A (en) Page data processing method, processing system, electronic device and readable storage medium
CN114219601A (en) Information processing method, device, equipment and storage medium
CN113641633A (en) File processing method, file processing device, electronic equipment, medium and computer program
US9342541B1 (en) Presentation oriented rules-based technical architecture display framework (PORTRAY)
CN113515510A (en) Data processing method, data processing system, electronic device and readable storage medium
CN113761415A (en) Page display method and device
CN111199432A (en) Data processing method, device, system and computer readable storage medium
WO2012096681A1 (en) Method and system for providing an sms-based interactive electronic marketing offer search and distribution system
CN114707486A (en) Text processing method, device, equipment, medium and program product
CN115577392A (en) Service data processing method, device, equipment and storage medium
CN115525365A (en) Method, device and equipment for determining target data entity and storage medium
CN113627141A (en) Electronic report generation method, device, equipment, medium and program product
CN116821158A (en) Structured query statement generation method and device, electronic equipment and storage medium

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