Message multi-level analysis method and device, electronic equipment and storage medium
By identifying the message headers and bodies of financial messages, and using pre-configured domain analysis methods for multi-level analysis and consistency processing, the problems of low efficiency and low accuracy of financial messages are solved, and fast and accurate entity extraction and data support are achieved.
Patent Information
- Application Number
- CN202510706622.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-08-05
AI Technical Summary
In the prior art, the analysis method of financial packets lacks universality, resulting in low parsing efficiency and low accuracy, and the inability to effectively correlate external information of financial packets for processing.
By identifying the message header and message style of the financial message, obtaining the message type and version number, using the pre-configured domain analysis method for multi-level analysis, performing consistency processing and semantic analysis, and storing it in combination with the data verification setting label.
It realizes rapid analysis and accurate extraction of financial messages, improves analysis efficiency and accuracy, and provides accurate data support for subsequent analysis and processing.
Smart Images

Figure CN120434318A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a message multi-level parsing method, device, electronic device and storage medium. Background Art
[0002] With the rapid development of the economy, financial messages play an important role in the process of electronic data exchange. The International Organization for Standardization and the Society for International Financial Telecommunications jointly developed and launched ISO20022 messages to support the efficient operation of financial services.
[0003] In the existing technology, financial messages are parsed based on the message data and domains related to the message content. The same parsing method only parses one type of financial message, and cannot achieve multi-level parsing of financial messages. There are problems of low parsing efficiency and low accuracy. Summary of the Invention
[0004] The present invention provides a message multi-level parsing method, device, electronic device and storage medium to improve the parsing speed and accuracy of financial messages.
[0005] According to one aspect of the present invention, a method for multi-level parsing of messages is provided, the method comprising:
[0006] Obtain financial messages, identify the message header and message body in the financial messages, and identify the message type and version number in the message header;
[0007] Among the pre-configured multiple domain resolution methods, the target domain resolution method corresponding to the financial message is determined based on the message type and version number in the message header. The message body is domain resolved using the target domain resolution method to obtain multiple domain information of the financial message.
[0008] Perform consistency processing on multiple domain information of financial messages and perform semantic analysis on the domain information after consistency processing to obtain entities in the financial messages;
[0009] Perform data verification on the domain information in the financial message, set the label of each domain based on the data verification result, and store the entities and labels corresponding to each domain.
[0010] According to another aspect of the present invention, a multi-level message parsing device is provided, the device comprising:
[0011] A message type and version number acquisition module is used to: acquire financial messages, identify the message header and message body in the financial messages, and identify the message type and version number in the message header;
[0012] a domain information determination module for determining, from among a plurality of preconfigured domain resolution methods, a target domain resolution method corresponding to the financial message based on the message type and version number in the message header, and performing domain resolution on the message body using the target domain resolution method to obtain multiple domain information of the financial message;
[0013] The entity acquisition module is used to: perform consistency processing on multiple domain information of the financial message and perform semantic analysis on the domain information after consistency processing to obtain the entities in the financial message;
[0014] The entity and label storage module is used to perform data verification on the domain information in the financial message, set the label of each domain based on the data verification result, and store the entities and labels corresponding to each domain.
[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0016] at least one processor; and
[0017] a memory communicatively connected to at least one processor; wherein,
[0018] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by at least one processor so that the at least one processor can execute the multi-level message parsing method of any embodiment of the present invention.
[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for enabling a processor to implement the multi-level message parsing method according to any embodiment of the present invention when executed.
[0020] The technical solution of the embodiment of the present invention obtains the financial message, identifies the message header and message body in the financial message, identifies the message type and version number in the message header, thereby obtaining the message type and version number in the financial message, and performing subsequent analysis based on the obtained message type and version number; among the pre-configured multiple domain resolution methods, the target domain resolution method corresponding to the financial message is determined based on the message type and version number in the message header, and the message body is domain resolved by the target domain resolution method to obtain multiple domain information of the financial message, thereby achieving rapid resolution of the message body, and thus facilitating improved resolution speed of the financial message; and Multiple domain information is processed for consistency, and semantic analysis is performed on the domain information after consistency processing to obtain entities in financial messages, thereby achieving accurate extraction of entities in financial messages and providing accurate data support for subsequent analysis and processing; data verification is performed on domain information in financial messages, and labels for each domain are set based on the data verification results, and entities and labels corresponding to each domain are stored, thereby achieving multi-level parsing of financial messages, providing a basis for subsequent analysis and processing, solving the problems of slow parsing speed and low parsing accuracy of financial messages in the existing technology, and improving the parsing efficiency and accuracy of financial messages.
[0021] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 This is a flowchart of a multi-level message parsing method provided by Example 1 of the present invention;
[0024] Figure 2 Schematic diagram of the structure of a streaming parsing model provided by an embodiment of the present invention;
[0025] Figure 3 This is a flowchart of a multi-level message parsing method provided by Embodiment 2 of the present invention;
[0026] Figure 4 This is a schematic diagram of the structure of a multi-level message parsing device provided by Embodiment 3 of the present invention;
[0027] Figure 5This is a structural diagram of an electronic device provided in Example 4 of the present invention. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0029] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] Existing financial message parsing methods are tailored to the specific circumstances of the financial message. Different types of financial messages require different parsing methods, and the same parsing method is inappropriate for different types of financial messages. This results in a lack of versatility and low parsing efficiency. Furthermore, financial message processing methods typically capture data within the financial message and the corresponding fields within the message content, failing to integrate external information into the parsing and processing of the message, resulting in low parsing accuracy.
[0031] In order to solve the above problems, the present invention proposes a multi-level message parsing method, which improves the parsing efficiency and accuracy of financial messages by performing multi-level parsing on financial messages and processing the financial messages based on the external content of the financial messages.
[0032] Example 1
[0033] Figure 1This is a flowchart of a message multi-level parsing method provided by the first embodiment of the present invention. This embodiment is applicable to the case of multi-level parsing of financial messages. The method can be executed by a message multi-level parsing device. The message multi-level parsing device can be implemented in the form of hardware and / or software. The message multi-level parsing device can be configured in the electronic device provided by the embodiment of the present invention. The electronic device can be a server, a computer or a mobile terminal, for example, a mobile terminal can be a mobile phone, a tablet computer, etc. Figure 1 As shown, the method includes:
[0034] S110: Acquire a financial message, identify a message header and a message body in the financial message, and identify a message type and a version number in the message header.
[0035] Financial messages are electronic data transmitted between different financial institutions over standardized networks, used to record and transmit various financial transactions, instructions, status updates, and other data. The financial message management system stores financial messages from financial institutions and retrieves them by matching them within the financial message management system based on their identification codes. Financial messages vary in format, business scenarios, and transmission networks, depending on the message standard. Financial messages include, but are not limited to, ISO20022 messages. Financial messages consist of a message header and a message body. The message header is located at the beginning of a financial message and identifies basic information about the financial message, including, but not limited to, the message type, version number, sender and receiver, and the time the message was generated. Message types include, but are not limited to, payment and clearing, cash management, securities business, and foreign exchange transactions. The version number ensures that the sender and receiver of a financial message use the same format to parse the message. Optionally, the version number includes a major version number and a minor version number. The message header and message body in a financial message can be identified using a recognition model. For example, a financial message can be input into a pre-trained recognition model and then recognized using the pre-trained recognition model to obtain the message header and message body. The message type and version number in the message header can be obtained by extracting data corresponding to preset fields in the message header and comparing the data with a message type comparison table.
[0036] Specifically, financial messages are obtained through a financial message management system, the financial messages are input into a pre-trained recognition model, the financial messages are recognized through the pre-trained recognition model, and the message header and message body in the financial message are obtained. By extracting data corresponding to preset fields in the message header, the data corresponding to the preset fields are compared with the message type comparison table to obtain the message type and version number in the message header, thereby realizing the acquisition of the message type and version number in the financial message, and performing subsequent analysis based on the acquired message type and version number.
[0037] S120. Determine a target domain resolution method corresponding to the financial message based on the message type and version number in the message header among the preconfigured multiple domain resolution methods, perform domain resolution on the message body using the target domain resolution method, and obtain multiple domain information of the financial message.
[0038] The domain resolution method is a method for parsing information in financial messages. Different types of financial messages correspond to different domain resolution methods. Domain resolution methods include, but are not limited to, neural network models and can be configured as needed, without limitation here. Based on a pre-configured parsing rule mapping table, the corresponding domain resolution method is determined based on the message type and version number in the message header. This determined domain resolution method is then used as the target domain resolution method. Optionally, the target domain resolution method is a streaming parsing model. Domain resolution is performed on the message body using the target domain resolution method to obtain multiple domain information for the financial message. Domain information carries transaction business data. Different types of financial messages correspond to different domain information. For example, a payment and settlement financial message includes basic fields, combined fields, and repeated fields. The basic field includes the specific transaction amount and transaction date. The combined field is composed of multiple basic fields. The combined field includes account information, consisting of the basic field corresponding to the account number and the basic field corresponding to the account type. The repeated field includes transaction remarks.
[0039] Specifically, according to the pre-configured parsing rule mapping table, the corresponding domain parsing method is determined according to the message type and version number in the message header, the determined domain parsing method is used as the target domain parsing method, and the message body is domain parsed according to the target domain parsing method to obtain multiple domain information of the financial message, thereby realizing rapid parsing of the message body, which is conducive to improving the parsing speed of the financial message.
[0040] When analyzing multiple domain information of a financial message, there may be inconsistencies in the formats of the domain information. To ensure the consistency of the domain information, consistency processing may be performed on the multiple domain information of the financial message before analyzing the multiple domain information of the financial message.
[0041] S130: Perform consistency processing on multiple domain information of the financial message, and perform semantic analysis on the domain information after consistency processing to obtain entities in the financial message.
[0042] Consistency processing includes one or more of data format conversion and normalization. Entities are the subjects and objects involved in financial transactions within financial messages. Entities include, but are not limited to, payees, remitters, receiving accounts, and remittance accounts. Semantic analysis of the domain information after consistency processing can be performed using natural language processing to extract entities from multiple domain information.
[0043] Specifically, by converting the data formats and normalizing the multiple domain information of the financial message to ensure the consistency of the multiple domain information, the natural language processing method is used to perform semantic analysis on the domain information after consistency processing, and the entities in the multiple domain information are extracted to obtain the entities in the financial message. This realizes the accurate extraction of the entities in the financial message and provides accurate data support for subsequent analysis and processing.
[0044] Among the multiple domain information, there is domain information that needs to be processed for consistency. The domain information that needs to be processed for consistency is filtered to ensure the consistency of the domain information.
[0045] Optionally, S130 further includes: filtering the set domain information among the multiple domain information, and converting the data format of the set domain information according to the domain type of the set domain information.
[0046] The domain information is set as domain information that requires consistency processing. For example, domain information with a time type can be used as the set domain information. Data format conversion is performed on the set domain information with a time type to ensure accurate transmission of financial blog posts between different financial institutions. Filtering processing includes one or more of data format conversion and data content normalization. For example, time information in the set domain information of the time type can be converted into corresponding string information according to the same conversion standard.
[0047] Specifically, the set domain information in the plurality of domain information is filtered, and the set domain information of different domain types is converted into the set domain information with the same data format, thereby achieving consistent processing of the set domain information.
[0048] Optionally, S130 further includes: filtering the set domain information among the multiple domain information, and normalizing the data content of the set domain information according to the domain type of the set domain information.
[0049] If there is inconsistent data content in the multiple domain information, the domain information with inconsistent data content is used as the set domain information. The data content of the set domain information is normalized to ensure data consistency. For example, the normalization process can be performed on the payee or payer information, which may include but is not limited to address information and time information.
[0050] Specifically, the set domain information in the plurality of domain information is filtered, and different types of data contents are normalized to ensure consistency of data contents of the set domain information.
[0051] Optionally, S130 further includes: filtering the set domain information in the multiple domain information, and performing data format conversion and data content normalization on the set domain information according to the domain type of the set domain information.
[0052] Specifically, the set domain information among multiple domain information is filtered, the data format of domain information of different time types is converted, and the data content of domain information of different currency types is normalized, which ensures the consistency of domain information and is conducive to improving the accuracy of financial message parsing.
[0053] Optionally, S130 also includes: obtaining semantic mapping parameters, data field parameters and entity relationship parameters, wherein the semantic mapping parameters include the mapping relationship between message information and semantic information; the data field parameters include the constraint parameters of the entity in the message; the entity relationship parameters include the association rules between different entities in the message; based on the semantic mapping parameters, semantic mapping is performed on the domain information after consistency processing to obtain the initial entity; based on the data field parameters, the constraint parameters of the initial entity are verified, and based on the entity relationship parameters, the association relationship of the initial entity is verified to obtain a successfully verified entity.
[0054] Semantic mapping parameters are data that characterize the correspondence between message information and business semantics in financial messages, facilitating understanding of the message information within financial messages. Message information includes, but is not limited to, the codes corresponding to financial transactions. Semantic mapping parameters include the mapping relationship between message information and semantic information. The semantic mapping parameter database stores mappings between different message information and semantic information. A match is performed against the semantic mapping parameter database based on the message information of the financial message. If a match is successful, the matched semantic mapping parameters are used as the semantic mapping parameters corresponding to the financial message. The initial entity is the entity obtained by semantically mapping the domain information after consistency processing using the semantic mapping parameters.
[0055] The data field parameters are data corresponding to the constraint rules for different data fields in each domain information in the financial message, and are used to standardize the format and logic of each data field in each domain information. The data field parameters include the constraint parameters of the entity in the message, and the constraint parameters of different entities constitute the data field parameters. The data field parameters are used to verify the constraint parameters of the initial entity. The data field parameters can be determined based on the domain type of the domain information. Different domain types and corresponding data field parameters are stored in the database. A match is performed in the database based on the domain type in the financial message. When the match is successful, the data field parameters corresponding to the matched domain type are used as the data field parameters. The data field of the initial entity is verified based on the data field parameters. When the data field of the initial entity meets the constraint parameters of the entity in the message in the data field parameters, it means that the constraint parameters of the entity in the financial message have been successfully verified.
[0056] Entity relationship parameters are data that characterize the logical relationships, dependency conditions, and business rules between different entities. Entity relationship parameters include association rules between different entities in a message. For example, association rules include, but are not limited to, the simultaneous existence of a payee and a remitter. Entity relationship parameters can be determined based on the entity type of the initial entity. Different entity types and corresponding entity relationship parameters are stored in the database. Matching is performed in the database based on the entity type of the initial entity. When a match is successful, the entity relationship parameters corresponding to the matched entity type are used as the entity relationship parameters corresponding to the financial message. The entity relationship parameters of the initial entity are verified based on the entity relationship parameters. When the entity relationship parameters of the initial entity meet the association rules between different entities in the entity relationship parameters, the entity relationship parameters of the initial entity are successfully verified.
[0057] In order to ensure the accuracy of the entity, the initial entity can be checked twice, namely, the constraint parameters of the initial entity are checked according to the data field parameters, and the association relationship of the initial entity is checked according to the entity relationship parameters. When the above two checks are successful, the initial entity that has passed both checks will be used as the entity in the financial message.
[0058] Specifically, the semantic mapping parameters corresponding to the financial message are determined according to the message information of the financial message, the data field parameters are determined according to the domain type of the domain information, the entity relationship parameters are determined according to the entity type of the initial entity, and the domain information after consistency processing is semantically mapped through the semantic mapping parameters to obtain the initial entity. The constraint parameters of the initial entity are verified through the data field parameters, and the association relationship of the initial entity is verified through the entity relationship parameters. When the verification of the constraint parameters and the verification of the association relationship are successful, it means that the initial entity meets the data field parameters and the entity relationship parameters, that is, the initial entity verification is successful. The successfully verified initial entity is used as the entity of the financial message, which realizes the accurate determination of the entity of the financial message and provides accurate data support for subsequent analysis and processing.
[0059] Optionally, entities in financial messages can also be obtained in the following way: obtain a pre-built financial knowledge graph, which includes entity nodes and the relationships between entity nodes, wherein the attributes of the entity nodes and the relationships between entity nodes represent the semantic information of the entities; match the domain information after consistency processing with the entity nodes in the financial knowledge graph to obtain the entities in the financial message.
[0060] Optionally, entities in financial messages can be obtained by using a preset entity recognition model to extract entities from the consistent domain information, thereby obtaining the entities in the financial message. Entity recognition models include, but are not limited to, neural network models and transformer models, and can be configured as needed, without limitation here. For example, the consistent domain information can be input into a preset entity recognition model for improved entity extraction, thereby obtaining the entities in the financial message. This achieves accurate extraction of the entities in the financial message, allowing subsequent analysis and processing based on the entities in the financial message.
[0061] In order to ensure that financial transactions comply with regulatory requirements and to enable tracking of financial transactions, data verification can be performed on the information in each field of the financial message.
[0062] S140: Perform data verification on the domain information in the financial message, set a label for each domain based on the data verification result, and store the entity and label corresponding to each domain.
[0063] The data verification result is data used to characterize whether the domain information in the financial message complies with the preset rules. Domain information of different domain types corresponds to different data verification results. Labels are used to classify and identify the domain information based on the data verification results. Labels include but are not limited to text labels, color labels, and status code labels. Taking the status code label as an example, when the domain information is normal, the status code label can be set to a number, such as 1; when the domain information is abnormal, the status code label can be set to another different number, such as 0. The type of label can be set according to needs and is not limited here. Data verification can be performed manually to verify the domain information in the financial message; a neural network model can also be used to verify the domain information in the financial message. It can be set according to needs and is not limited here.
[0064] Specifically, the domain information in the financial message is input into the pre-trained verification model for data verification to obtain the data verification results of each domain information. The labels of each domain are set according to the data verification results, and the entities and corresponding labels in the domain information after data verification are stored, providing a basis for subsequent analysis and processing.
[0065] Optionally, S140 also includes: obtaining a data verification method corresponding to each domain information, and performing data verification on the corresponding domain information through the data verification method; when any domain information verification is successful, setting a first label for the domain that has successfully been verified, and the first label indicates that there is no abnormality in the domain; when any domain information verification fails, setting a second label for the domain that has failed the verification, and the second label indicates that there is an abnormality in the domain.
[0066] Different domain types utilize different data verification methods. A pre-established table of domain types and data verification methods is used to match the domain type of the financial message's domain information against the table. If a match is successful, the data verification method corresponding to the matched domain type is used as the data verification method for the financial message's domain information. Data verification methods include, but are not limited to, customer verification, blacklist screening, and fund flow tracking. The first tag indicates successful domain information verification, while the second tag indicates failed domain information verification.
[0067] Specifically, through a pre-established comparison table of domain types and data verification methods, matching is performed in the above comparison table according to the domain type of the domain information in the financial message. When the matching is successful, the data verification method corresponding to the matched domain type is used as the data verification method for the domain information in the financial message, and data verification is performed on the domain information according to the data verification method. When the domain information verification is successful, the label corresponding to the domain is the first label, otherwise it is the second label, thereby realizing data verification of the domain information and providing a basis for subsequent analysis and processing.
[0068] In order to ensure the compliance of financial messages and the continuity of financial transactions, exception processing can be performed on the domain with the second label set.
[0069] Optionally, S140 further includes: performing exception processing on the financial message according to an exception processing method corresponding to the domain in which the second tag is set.
[0070] Among them, the second label includes the exception type corresponding to the domain information, and the exception type includes but is not limited to the domain information exception corresponding to the customer and the entity being on the blacklist. The exception handling method includes but is not limited to the correction of the domain information with the exception, and determining the corresponding handling method according to the risk level in the blacklist. Different exception types correspond to different exception handling methods, and the exception handling method corresponding to the exception type is determined according to the exception type in the second label. For example, a comparison table of exception types and exception handling methods is pre-set, and a match is performed in the above comparison table according to the exception type in the second label, and the exception handling method corresponding to the matched exception type is used as the exception handling method corresponding to the domain of the second label.
[0071] Specifically, a comparison table of exception types and exception handling methods is set in advance, and matching is performed in the above comparison table according to the exception type in the second label. The exception handling method corresponding to the matched exception type is used as the exception handling method corresponding to the domain of the second label. The financial message is handled according to the exception handling method corresponding to the domain of the second label, which is conducive to improving the compliance of the financial message.
[0072] Optionally, the method also includes: parsing the financial message through a streaming parsing model, wherein the streaming parsing model includes a preprocessing layer, a filtering and conversion layer, a semantic extraction layer and a data storage layer; there are multiple preprocessing layers, each preprocessing layer corresponds to an information group formed by a message type and a version number; wherein the preprocessing layer performs domain parsing on the message body to obtain multiple domain information of the financial message; the filtering and conversion layer performs consistency processing on the multiple domain information of the financial message; the semantic extraction layer performs semantic analysis on the domain information after consistency processing to obtain entities in the financial message; the data storage layer performs data verification on the domain information in the financial message, and sets labels for each domain based on the data verification results, and stores the entities and labels corresponding to each domain.
[0073] The preprocessing layer is the component in the streaming parsing model that performs domain parsing on the message body. To ensure that the streaming parsing model can perform multi-level parsing on different types of financial messages, multiple preprocessing layers can be set up in the streaming parsing model. Different preprocessing layers can perform domain parsing on the message body of different types of financial messages. The corresponding preprocessing layer is determined based on the information group formed by the message type and version number. The information group can be input into a trained preprocessing layer determination model, and the trained preprocessing layer determination model analyzes the information group to obtain the corresponding preprocessing layer. The preprocessing layer performs domain parsing on the message body, obtaining multiple domain information of the financial message, and transmits this multiple domain information of the financial message to the filtering and conversion layer.
[0074] The filtering and conversion layer is a component within the streaming parsing model that performs consistency processing on multiple domain information within financial messages. This process involves filtering specific domain information within the multiple domain information, performing at least one of data format conversion and / or data content normalization on the specific domain information based on its domain type, obtaining consistent domain information, and transmitting this consistent domain information to the semantic extraction layer.
[0075] The semantic extraction layer is the component in the streaming parsing model that performs semantic mapping on the consistent domain information. The semantic mapping process for consistent domain information is as follows: obtaining semantic mapping parameters, data field parameters, and entity relationship parameters; performing semantic mapping on the consistent domain information based on the semantic mapping parameters to obtain initial entities; validating the constraint parameters of the initial entities based on the data field parameters, and validating the relationships of the initial entities based on the entity relationship parameters, obtaining successfully validated entities, and transferring these successfully validated entities to the data storage layer.
[0076] The data storage layer is the component within the streaming parsing model that verifies and stores domain information within financial messages. The data storage layer performs the following verification and storage process: obtaining the data verification method corresponding to each domain, verifying the corresponding domain using the data verification method, assigning a first label to any domain that succeeds verification, and assigning a second label to any domain that fails verification. Finally, the entity and label corresponding to each domain are stored.
[0077] Specifically, the preprocessing layer performs domain parsing on the message body to obtain multiple domain information of the financial message; the filtering and conversion layer performs consistency processing on the multiple domain information of the financial message; the semantic extraction layer performs semantic analysis on the domain information after consistency processing to obtain the entities in the financial message, and the data storage layer performs data verification on the domain information in the financial message, and sets labels for each domain based on the data verification results, and stores the entities and labels corresponding to each domain, realizing multi-level parsing of the financial message, providing a basis for subsequent analysis and processing, and improving the parsing efficiency and accuracy of the financial message.
[0078] For example, see Figure 2 , Figure 2 This is a schematic diagram of the structure of a streaming parsing model provided by an embodiment of the present invention. The streaming parsing model includes a preprocessing layer, a filtering and conversion layer, a semantic extraction layer, and a data storage layer. The preprocessing layer includes multiple sub-preprocessing layers, each of which can perform domain parsing on the message body of different types of financial messages.
[0079] The technical solution of this embodiment obtains the financial message, identifies the message header and message body in the financial message, and identifies the message type and version number in the message header, thereby obtaining the message type and version number in the financial message, and performing subsequent analysis based on the obtained message type and version number; among the pre-configured multiple domain resolution methods, the target domain resolution method corresponding to the financial message is determined based on the message type and version number in the message header, and the message body is domain resolved using the target domain resolution method to obtain multiple domain information of the financial message, thereby achieving rapid resolution of the message body, which is conducive to improving the accuracy of financial messages. The method improves the parsing speed of financial messages; performs consistency processing on multiple domain information of financial messages, and performs semantic analysis on the domain information after consistency processing to obtain entities in the financial messages, thereby realizing accurate extraction of entities in the financial messages and providing accurate data support for subsequent analysis and processing; performs data verification on the domain information in the financial messages, and sets labels for each domain based on the data verification results, and stores the entities and labels corresponding to each domain, thereby realizing multi-level parsing of financial messages, providing a basis for subsequent analysis and processing, and improving the parsing efficiency and accuracy of financial messages.
[0080] Example 2
[0081] Figure 3 This is a flow chart of a multi-level message parsing method provided by the second embodiment of the present invention. This embodiment is an optimization of the above embodiment. Figure 3 As shown, the method includes:
[0082] S210: Acquire a financial message, identify a message header and a message body in the financial message, and identify a message type and a version number in the message header.
[0083] S220. Determine a target domain resolution method corresponding to the financial message based on the message type and version number in the message header among the pre-configured multiple domain resolution methods, perform domain resolution on the message body using the target domain resolution method, and obtain multiple domain information of the financial message.
[0084] S230: Perform consistency processing on multiple domain information of the financial message, and perform semantic analysis on the domain information after consistency processing to obtain entities in the financial message.
[0085] S240: Perform data verification on the domain information in the financial message, set a label for each domain based on the data verification result, and store the entity and label corresponding to each domain.
[0086] S250 , obtaining externally input processing content, determining an associated domain of the processing content, and associating and storing the processing content with entities in the associated domain.
[0087] The processing content is used to perform business processing on financial messages to ensure that they meet business requirements and compliance. Externally input processing content can be obtained through an application programming interface (API) or manually entered. Optionally, the processing content includes at least one of the following: completion information, compliance mapping rules, business restructuring logic, and derivative indicator calculation methods. The completion information includes but is not limited to financial institution attributes and user information. To ensure that financial messages comply with regulatory requirements, domain information in financial messages can be adjusted according to compliance mapping rules. Compliance mapping rules include but are not limited to currency code conversion and sensitive area risk markers. Business restructuring logic is used to adjust the structure of financial messages. Business restructuring logic includes but is not limited to splitting transactions and non-merging transactions. The derivative indicator calculation method is a method for generating derivative indicators based on the data in the financial messages. The derivative indicator calculation method includes but is not limited to mathematical operations, logical combinations, and business rules.
[0088] The associated domain is the domain in the financial message that corresponds to the processed content. The associated domain can be determined based on the externally input processed content. For example, a keyword-associated domain comparison table is pre-set, keywords are extracted from the processed content, the extracted keywords are matched against the keyword-associated domain comparison table, and the associated domain corresponding to the matched keywords is used as the associated domain of the processed content. Alternatively, the externally input processed content and financial message can be input into a trained associated domain determination model, and the trained associated domain determination model can be used to process the externally input processed content and financial message to determine the associated domain of the processed content. The associated domain determination model includes, but is not limited to, a neural network model.
[0089] Specifically, the processing content of external input is obtained through the API, and the processing content and financial messages are input into the trained association domain determination model. The trained association domain determination model is used to process the external input processing content and financial messages, determine the association domain of the processing content, and associate the processing content with the entities of the association domain and store them, thereby achieving accurate determination of the association domain and providing data support for subsequent analysis.
[0090] S260: Form a processed message based on the processed content and the entity of the associated domain.
[0091] Specifically, financial messages can be processed based on message processing templates. For example, a corresponding message processing template is determined based on the processing content and the financial message, and the processed content and entities in the associated domain are added to the corresponding positions in the message processing template to obtain a processed message. Financial messages can also be processed based on message processing models. For example, the processed content and financial messages are input into a trained message processing model to obtain a processed message. A processed message is generated based on the processed content and entities in the associated domain, and subsequent business analysis and processing are performed based on the processed message.
[0092] The technical solution of this embodiment obtains the financial message, identifies the message header and message body in the financial message, identifies the message type and version number in the message header, thereby obtaining the message type and version number in the financial message, and performing subsequent analysis based on the obtained message type and version number; among the pre-configured multiple domain resolution methods, the target domain resolution method corresponding to the financial message is determined based on the message type and version number in the message header, and the message body is domain resolved by the target domain resolution method to obtain multiple domain information of the financial message, thereby achieving rapid resolution of the message body, which is conducive to improving the resolution speed of the financial message; multiple domain information of the financial message is processed for consistency, and the domain information after consistency processing is semantically analyzed to obtain entities in the financial message, and the entities in the financial message are analyzed. It realizes the accurate extraction of entities in financial messages, providing accurate data support for subsequent analysis and processing; performs data verification on domain information in financial messages, sets labels for each domain based on the data verification results, and stores entities and labels corresponding to each domain, realizing multi-level parsing of financial messages, providing a basis for subsequent analysis and processing, and improving the parsing efficiency and accuracy of financial messages; obtains processing content from external input, determines the associated domain of the processing content, associates and stores the processed content with the entities in the associated domain, realizes the accurate determination of the associated domain, and provides data support for subsequent analysis; forms processed messages based on the processed content and the entities in the associated domain, and performs subsequent business analysis and business processing based on the processed messages.
[0093] Example 3
[0094] Figure 4 This is a schematic diagram of the structure of a multi-level message parsing device provided by the third embodiment of the present invention. Figure 4 As shown, the device includes:
[0095] The message type and version number acquisition module 310 is used to: acquire a financial message, identify the message header and message body in the financial message, and identify the message type and version number in the message header;
[0096] A domain information determination module 320 is configured to determine a target domain resolution method corresponding to the financial message based on the message type and version number in the message header from among multiple preconfigured domain resolution methods, and to perform domain resolution on the message body using the target domain resolution method to obtain multiple domain information of the financial message;
[0097] The entity acquisition module 330 is used to perform consistency processing on multiple domain information of the financial message and perform semantic analysis on the domain information after consistency processing to obtain entities in the financial message;
[0098] The entity and label storage module 340 is used to perform data verification on the domain information in the financial message, set labels for each domain based on the data verification results, and store the entities and labels corresponding to each domain.
[0099] The technical solution of this embodiment obtains the financial message, identifies the message header and message body in the financial message, and identifies the message type and version number in the message header, thereby obtaining the message type and version number in the financial message, and performing subsequent analysis based on the obtained message type and version number; among the pre-configured multiple domain resolution methods, the target domain resolution method corresponding to the financial message is determined based on the message type and version number in the message header, and the message body is domain resolved using the target domain resolution method to obtain multiple domain information of the financial message, thereby achieving rapid resolution of the message body, which is conducive to improving the accuracy of financial messages. The method improves the parsing speed of financial messages; performs consistency processing on multiple domain information of financial messages, and performs semantic analysis on the domain information after consistency processing to obtain entities in the financial messages, thereby realizing accurate extraction of entities in the financial messages and providing accurate data support for subsequent analysis and processing; performs data verification on the domain information in the financial messages, and sets labels for each domain based on the data verification results, and stores the entities and labels corresponding to each domain, thereby realizing multi-level parsing of financial messages, providing a basis for subsequent analysis and processing, and improving the parsing efficiency and accuracy of financial messages.
[0100] Based on the above embodiment, optionally, the device also includes a streaming parsing model module, which is used to: parse and process financial messages through a streaming parsing model, wherein the streaming parsing model includes a preprocessing layer, a filtering and conversion layer, a semantic extraction layer and a data storage layer; there are multiple preprocessing layers, and each preprocessing layer corresponds to an information group formed by a message type and version number.
[0101] Optionally, the streaming parsing model module is also used for: the preprocessing layer to perform domain parsing on the message body to obtain multiple domain information of the financial message; the filtering and conversion layer to perform consistency processing on the multiple domain information of the financial message; the semantic extraction layer to perform semantic analysis on the domain information after consistency processing to obtain entities in the financial message; the data storage layer to perform data verification on the domain information in the financial message, and set labels for each domain based on the data verification results, and store the entities and labels corresponding to each domain.
[0102] Optionally, the entity acquisition module 330 is further configured to filter the set domain information among the multiple domain information, and perform data format conversion and / or data content normalization on the set domain information according to the domain type of the set domain information.
[0103] Optionally, the entity acquisition module 330 is also used to: obtain semantic mapping parameters, data field parameters and entity relationship parameters, wherein the semantic mapping parameters include the mapping relationship between message information and semantic information; the data field parameters include the constraint parameters of the entity in the message; the entity relationship parameters include the association rules between different entities in the message; based on the semantic mapping parameters, semantic mapping is performed on the domain information after consistency processing to obtain the initial entity; based on the data field parameters, the constraint parameters of the initial entity are verified, and based on the entity relationship parameters, the association relationship of the initial entity is verified to obtain a successfully verified entity.
[0104] Optionally, the entity and label storage module 340 is also used to: obtain the data verification method corresponding to each domain information, and perform data verification on the corresponding domain information through the data verification method; when the verification of any domain information is successful, set a first label for the domain that has successfully been verified, and the first label indicates that there is no abnormality in the domain; when the verification of any domain information fails, set a second label for the domain that has failed the verification, and the second label indicates that there is an abnormality in the domain.
[0105] Optionally, the entity and label storage module 340 is further configured to perform exception processing on the financial message according to an exception processing method corresponding to the domain where the second label is set.
[0106] Optionally, the device also includes a message processing module, which is used to: obtain processing content input externally, determine the associated domain of the processing content, associate and store the processed content with entities in the associated domain; and form a processed message based on the processed content and entities in the associated domain.
[0107] Optionally, the processing content includes at least one of the following: completion information, compliance mapping rules, business restructuring logic, and derivative indicator calculation method.
[0108] The multi-level message parsing device provided in the embodiment of the present invention can execute the multi-level message parsing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0109] Example 4
[0110] Figure 51 is a structural diagram of an electronic device provided in Embodiment 4 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0111] like Figure 5 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the random access memory (RAM) 13. The processor 11, the read-only memory (ROM) 12, and the random access memory (RAM) 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0112] Various components in the electronic device 10 are connected to an input / output (I / O) interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0113] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the multi-level message parsing method.
[0114] In some embodiments, the message multi-level parsing method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the read-only memory (ROM) 12 and / or the communication unit 19. When the computer program is loaded into the random access memory (RAM) 13 and executed by the processor 11, one or more steps of the message multi-level parsing method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the message multi-level parsing method in any other appropriate manner (for example, by means of firmware).
[0115] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0116] The computer programs for implementing the multi-level message parsing method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0117] An embodiment of the present invention further provides a computer-readable storage medium storing computer instructions, the computer instructions being used to cause a processor to execute a multi-level message parsing method, the method comprising:
[0118] Obtain a financial message, identify the message header and message body in the financial message, and identify the message type and version number in the message header; among the pre-configured multiple domain resolution methods, determine the target domain resolution method corresponding to the financial message based on the message type and version number in the message header, perform domain resolution on the message body using the target domain resolution method, and obtain multiple domain information of the financial message; perform consistency processing on the multiple domain information of the financial message, and perform semantic analysis on the domain information after consistency processing to obtain entities in the financial message; perform data verification on the domain information in the financial message, and set labels for each domain based on the data verification results, and store the entities and labels corresponding to each domain.
[0119] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0120] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0121] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0122] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0123] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0124] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A multi-level message parsing method, characterized in that: include: Acquire a financial message, identify a message header and a message body in the financial message, and identify a message type and a version number in the message header; Determining a target domain resolution method corresponding to the financial message based on the message type and version number in the message header among the preconfigured multiple domain resolution methods, performing domain resolution on the message body using the target domain resolution method to obtain multiple domain information of the financial message; Performing consistency processing on multiple domain information of the financial message, and performing semantic analysis on the domain information after consistency processing to obtain entities in the financial message; Data verification is performed on the domain information in the financial message, and labels of each domain are set based on the data verification result, and entities and labels corresponding to each domain are stored.
2. The method according to claim 1, characterized in that The method further includes: parsing the financial message using a streaming parsing model, wherein the streaming parsing model includes a preprocessing layer, a filtering and conversion layer, a semantic extraction layer, and a data storage layer; the preprocessing layers are multiple, each corresponding to an information group consisting of a message type and a version number; The pre-processing layer performs domain parsing on the message body to obtain multiple domain information of the financial message; The filtering and conversion layer performs consistency processing on multiple domain information of the financial message; The semantic extraction layer performs semantic analysis on the domain information after consistency processing to obtain entities in the financial message; The data storage layer performs data verification on the domain information in the financial message, sets a label for each domain based on the data verification result, and stores the entity and label corresponding to each domain.
3. The method according to claim 1 or 2, characterized in that Performing consistency processing on multiple domain information of the financial message, including: The set domain information in the plurality of domain information is filtered, and data format conversion and / or data content normalization are performed on the set domain information according to the domain type of the set domain information.
4. The method according to claim 1, wherein Perform semantic analysis on the domain information after consistency processing to obtain entities in the financial message, including: Acquire semantic mapping parameters, data field parameters, and entity relationship parameters, wherein the semantic mapping parameters include a mapping relationship between message information and semantic information; the data field parameters include constraint parameters of entities in the message; and the entity relationship parameters include association rules between different entities in the message; Performing semantic mapping on the domain information after consistency processing based on the semantic mapping parameters to obtain an initial entity; The constraint parameters of the initial entity are verified based on the data field parameters, and the association relationship of the initial entity is verified based on the entity relationship parameters to obtain an entity that has successfully been verified.
5. The method according to claim 1, wherein Performing data verification on the domain information in the financial message and setting labels for each domain based on the data verification results, including: Obtaining a data verification method corresponding to each domain information, and performing data verification on the corresponding domain information using the data verification method; When any of the domain information verification succeeds, a first label is set for the successfully verified domain, the first label indicating that the successfully verified domain has no abnormalities; when any of the domain information verification fails, a second label is set for the failed domain, the second label indicating that the failed domain has an abnormality; The method further comprises: Exception processing is performed on the financial message according to the exception processing method corresponding to the domain where the second tag is set.
6. The method according to claim 1, characterized in that The method comprises: Acquire externally input processing content, determine an associated domain of the processing content, and associate and store the processing content with entities in the associated domain; A processed message is formed based on the processed content and the entity of the associated domain.
7. The method according to claim 6, characterized in that The processing content includes at least one of the following: completion information, compliance mapping rules, business restructuring logic and derivative indicator calculation method.
8. A multi-level message parsing device, characterized in that: include: A message type and version number acquisition module, configured to: acquire a financial message, identify a message header and a message body in the financial message, and identify a message type and a version number in the message header; a domain information determination module configured to determine, from among a plurality of preconfigured domain resolution modes, a target domain resolution mode corresponding to the financial message based on the message type and version number in the message header, and perform domain resolution on the message body using the target domain resolution mode to obtain multiple domain information of the financial message; An entity acquisition module, configured to perform consistency processing on multiple domain information of the financial message and perform semantic analysis on the domain information after consistency processing to obtain entities in the financial message; The entity and label storage module is used to perform data verification on the domain information in the financial message, set labels for each domain based on the data verification results, and store the entities and labels corresponding to each domain.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the multi-level message parsing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the message multi-level parsing method according to any one of claims 1 to 7 when executed.
Citation Information
Cited By
Harbor entry information interaction method and system based on interconnection and intercommunication platform
CN121000793A
An interconnection platform-based port entry information interaction method and system
CN121000793B