Method, device, storage medium and electronic equipment for processing target financial message
Patent Information
- Application Number
- CN202310946614.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-28
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2043-07-28
AI Technical Summary
[0004]本发明实施例提供了一种目标金融报文的处理方法、装置、存储介质及电子设备,以至少解决现有技术中在处理金融报文的过程中,存在金融报文的收发报文处理效率低的技术问题
[0015]在本发明实施例中,采用通过配置文件实现报文收报解析与验签字段拼装、报文发报组报与加签字段拼装处理的方式,首先接收报文处理请求,并依据报文处理请求确定目标处理流程,然后确定报文类型对应的目标配置文件,并获取目标配置文件,然后依据目标处理流程和目标配置文件进行报文处理操作,得到处理结果。其中,报文处理请求包括报文类型,报文处理请求为以下之一:报文解析请求,报文生成请求,目标处理流程为以下之一:收报处理流程、发报处理流程,收报处理流程用于解析报文,发报处理流程用于生成报文,目标配置文件用于实现报文解析与验签和/或实现报文生成与加签,处理结果为以下之一:验签后的金融报文数据集合、加签后的金融报文。
Smart Images

Figure CN116800820B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of financial technology, and more specifically, to a method, apparatus, storage medium, and electronic device for processing target financial messages. Background Technology
[0002] Currently, the processing of XML messages in the financial sector primarily relies on XML frameworks such as the Document Object Model (DOM) and the Simple API for XML (SAX) for event-driven XML processing. Each message is processed programmatically; for example, in the receiving process, each message is directly parsed or a simulated XML format is matched and read using an XML template. In the sending process, each message is directly assembled or a simulated XML format is matched and generated using an XML template. This approach requires programmatic parsing or assembly of each message, resulting in low efficiency. Furthermore, during message processing, the key fields required for verifying signatures on received messages or signing sent messages must be extracted and verified through a separate process after all messages have been parsed or generated, which is also inefficient.
[0003] There is currently no effective solution to the above problems. Summary of the Invention
[0004] This invention provides a method, apparatus, storage medium, and electronic device for processing target financial messages, so as to at least solve the technical problem of low processing efficiency of sending and receiving financial messages in the prior art.
[0005] According to one aspect of the present invention, a method for processing a target financial message is provided, comprising: receiving a message processing request and determining a target processing flow based on the message processing request, wherein the message processing request includes a message type, and the message processing request is one of the following: a message parsing request, a message generation request, and the target processing flow is one of the following: a message receiving processing flow, a message sending processing flow, wherein the message receiving processing flow is used to parse the message, and the message sending processing flow is used to generate the message; determining a target configuration file corresponding to the message type and obtaining the target configuration file, wherein the target configuration file is used to implement message parsing and signature verification and / or to implement message generation and signature; performing message processing operations according to the target processing flow and the target configuration file to obtain a processing result, wherein the processing result is one of the following: a set of financial message data after signature verification, or a financial message after signature.
[0006] Furthermore, the target processing flow is determined based on the message processing request, including: if the message processing request is a message parsing request, then the receiving processing flow is taken as the target processing flow; if the message processing request is a message generation request, then the sending processing flow is taken as the target processing flow.
[0007] Further, message processing operations are performed according to the target processing flow and target configuration file to obtain processing results, including: if the target processing flow is a receiving processing flow, the first financial message in the message parsing request is parsed according to the receiving processing flow and target configuration file to obtain the parsed first financial message data set and the string to be verified, and a verified financial message data set is generated according to the parsed first financial message data set and the string to be verified, wherein the string to be verified is used to verify the first financial message; if the target processing flow is a sending processing flow, the target message data in the message generation request is assembled according to the sending processing flow and target configuration file to obtain the assembled second financial message data set and the string to be signed, and a signed financial message is generated according to the assembled second financial message data set and the string to be signed, wherein the string to be signed is used to sign the assembled second financial message.
[0008] Further, based on the receiving and processing flow and the target configuration file, the first financial message in the message parsing request is parsed to obtain the parsed first financial message data set and the string to be verified, including: according to the receiving and processing flow, retrieving the configuration file information of the target configuration file from memory, and reading the message information contained in the first financial message; determining the target path information corresponding to the message information from the configuration file information, and determining the target leaf node in the first financial message based on the target path information, wherein the target leaf node is the node storing data; determining the node type of the target leaf node and the message field to be verified in the first financial message based on the configuration file information; and based on the section... The point type determines the target data retrieval method and target data storage format of the target leaf node. The target data retrieval method is one of the following: a first data retrieval method or a second data retrieval method, where the number of retrievals using the second data retrieval method is greater than the number of retrievals using the first data retrieval method. The target data storage format is one of the following: a first storage format or a second storage format, where the character types corresponding to the first storage format and the second storage format are different. Node data is retrieved from the target leaf node according to the target data retrieval method and stored in the first financial message data set according to the target data storage format, resulting in the parsed first financial message data set. The message fields to be verified are then assembled to obtain the string to be verified.
[0009] Furthermore, based on the message transmission process and the target configuration file, the target message data in the message generation request is processed to obtain the assembled second financial message data set and the string to be signed. This includes: according to the message transmission process, retrieving the configuration file information of the target configuration file from memory and reading the target message data; generating the second financial message data set and multiple leaf nodes based on the configuration file information, and generating the node information of each leaf node based on the configuration file information and the target message data; processing the node information of each leaf node to obtain the assembled second financial message data set; and determining the message fields to be signed in the second financial message based on the configuration file information and the node information of each leaf node, and assembling the message fields to be signed to obtain the string to be signed.
[0010] Further, based on the assembled second financial message data set and the string to be signed, a signed financial message is generated, including: performing a signing process on the string to be signed to obtain a signed string, and storing the signed string into the assembled second financial message data set to obtain a signed second financial message data set; and generating a signed financial message based on the signed second financial message data set.
[0011] Furthermore, before receiving a message processing request, the method also includes: acquiring multiple financial messages, determining the target message standard of the multiple financial messages and the message type of each financial message; configuring the configuration file information of each financial message according to the target message standard and message type, and generating a configuration file corresponding to each message type.
[0012] According to another aspect of the present invention, a processing apparatus for a target financial message is also provided, comprising: a receiving module, configured to receive a message processing request and determine a target processing flow based on the message processing request, wherein the message processing request includes a message type, and the message processing request is one of the following: a message parsing request, a message generation request, and the target processing flow is one of the following: a message receiving processing flow, a message sending processing flow, wherein the message receiving processing flow is used to parse the message, and the message sending processing flow is used to generate the message; a determining module, configured to determine a target configuration file corresponding to the message type and obtain the target configuration file, wherein the target configuration file is used to implement message parsing and signature verification and / or to implement message generation and signature; and a processing module, configured to perform message processing operations based on the target processing flow and the target configuration file to obtain a processing result, wherein the processing result is one of the following: a set of financial message data after signature verification, or a financial message after signature.
[0013] According to another aspect of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, wherein the computer program is configured to execute the above-described method for processing the target financial message when it is run.
[0014] According to another aspect of the present invention, an electronic device is also provided, the electronic device including one or more processors; a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement a method for running the programs, wherein the programs are configured to execute the above-described processing method for the target financial message during runtime.
[0015] In this embodiment of the invention, a method is adopted to implement message reception parsing and signature verification field assembly, and message transmission grouping and signature field assembly through configuration files. First, a message processing request is received, and the target processing flow is determined based on the message processing request. Then, the target configuration file corresponding to the message type is determined and obtained. Finally, message processing operations are performed according to the target processing flow and the target configuration file to obtain the processing result. The message processing request includes a message type, which can be one of the following: a message parsing request or a message generation request. The target processing flow can be one of the following: a message reception processing flow or a message transmission processing flow. The message reception processing flow is used to parse the message, and the message transmission processing flow is used to generate the message. The target configuration file is used to implement message parsing and signature verification and / or message generation and signature. The processing result is one of the following: a set of verified financial message data or a signed financial message.
[0016] In the above process, the received message processing request can accurately determine whether the target processing flow is a message receiving process or a message sending process. The message type contained in the message processing request can accurately determine the corresponding target configuration file. Thus, message processing operations can be performed according to the target processing flow and the target configuration file to obtain the processing results. This realizes message receiving and sending processing by loading the configuration file. Furthermore, message parsing and signature field assembly can be performed simultaneously during message receiving, and message generation and signature field assembly can be performed simultaneously during message sending. This effectively saves time costs and greatly improves the processing efficiency of message receiving and sending.
[0017] Therefore, the technical solution of this invention achieves the goal of simultaneously realizing message parsing and signature field assembly during message reception by loading a configuration file, and simultaneously realizing message generation and signature field assembly during message transmission. This improves the processing efficiency of message reception and transmission, and solves the technical problem of low message reception and transmission processing efficiency in the prior art. Attached Figure Description
[0018] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0019] Figure 1 This is a flowchart of an optional method for processing target financial messages according to an embodiment of the present invention;
[0020] Figure 2 This is a schematic diagram illustrating an optional configurable implementation of XML format financial message parsing and assembly according to an embodiment of the present invention;
[0021] Figure 3 This is a schematic diagram of an optional message parsing and signature verification process according to an embodiment of the present invention;
[0022] Figure 4 This is a schematic diagram of an optional message group reporting and signing process according to an embodiment of the present invention;
[0023] Figure 5 This is a schematic diagram of an optional target financial message processing apparatus according to an embodiment of the present invention;
[0024] Figure 6 This is a schematic diagram of an optional electronic device according to an embodiment of the present invention. Detailed Implementation
[0025] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0027] It should be noted that all relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this invention are information and data authorized by the user or fully authorized by all parties. For example, this system has an interface with the relevant user or organization. Before obtaining relevant information, it needs to send an acquisition request to the aforementioned user or organization through the interface, and obtain the relevant information after receiving consent from the aforementioned user or organization.
[0028] Example 1
[0029] According to an embodiment of the present invention, an embodiment of a method for processing a target financial message is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0030] Figure 1 This is a flowchart of an optional method for processing target financial messages according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:
[0031] Step S101: Receive a message processing request and determine the target processing flow based on the message processing request. The message processing request includes a message type, which is one of the following: message parsing request or message generation request. The target processing flow is one of the following: message receiving process or message sending process. The message receiving process is used to parse messages, and the message sending process is used to generate messages.
[0032] Optionally, message processing requests can be received through application systems, processors, electronic devices, etc., for example, through a system that processes the target financial message. Optionally, the message can be a financial message in XML format. After configuring the message configuration file, the system receives the message processing request and determines whether the target processing flow is a message receiving process or a message sending process based on the message processing request. For example, if the message processing request is a message parsing request, the target processing flow is a message receiving process; if the message processing request is a message generation request, the target processing flow is a message sending process.
[0033] Step S102: Determine the target configuration file corresponding to the message type and obtain the target configuration file. The target configuration file is used to implement message parsing and signature verification and / or message generation and signature.
[0034] Optionally, the target configuration file can be determined by the message type contained in the message processing request. For example, if the message type is a transfer-related message, its corresponding configuration file can be accurately determined. Optionally, obtaining the target configuration file can be achieved by the system loading the target configuration file. By loading the target configuration file, message parsing and signature verification and / or message generation and signature can be realized.
[0035] Figure 2 This is a schematic diagram illustrating an optional configurable implementation of XML format financial message parsing and assembly according to an embodiment of the present invention, such as... Figure 2 As shown, after configuring the message configuration file, the system receives the message processing request and determines whether the target processing flow is a message receiving process or a message sending process based on the message processing request. Then, it obtains the corresponding configuration file in memory through the message type, loads and reads the configuration file information, and performs the corresponding message receiving or sending process.
[0036] Step S103: Perform message processing operations according to the target processing flow and target configuration file to obtain the processing result, which is one of the following: the financial message data set after signature verification, or the financial message after signature addition.
[0037] Optionally, message processing operations can be performed according to the target processing flow and target configuration file to obtain the processing result, such as... Figure 2 As shown, after reading the configuration file information, when the target processing flow is the receiving processing flow, the message parsing and signature verification are performed based on the configuration file information, and the resulting processing result is the map data set of the verified message (i.e., the financial message data set of the verified message); when the target processing flow is the sending processing flow, the matching group message (i.e., matching the map data set corresponding to the input configuration file) and signature processing are performed based on the configuration file information, and the resulting processing result is the signed XML format financial message (i.e., the signed financial message), where the message is used to store business data.
[0038] Based on the scheme defined in steps S101 to S103 above, it can be understood that in this embodiment of the invention, the method of processing message reception parsing and signature verification field assembly, and message transmission grouping and signature field assembly through configuration files is adopted. First, a message processing request is received, and the target processing flow is determined based on the message processing request. Then, the target configuration file corresponding to the message type is determined and obtained. Then, message processing operations are performed according to the target processing flow and the target configuration file to obtain the processing result. The message processing request includes a message type, which is one of the following: a message parsing request or a message generation request. The target processing flow is one of the following: a message reception processing flow or a message transmission processing flow. The message reception processing flow is used to parse the message, and the message transmission processing flow is used to generate the message. The target configuration file is used to implement message parsing and signature verification and / or to implement message generation and signature. The processing result is one of the following: a set of financial message data after signature verification or a financial message after signature.
[0039] It is noteworthy that in the above process, the received message processing request can accurately determine whether the target processing flow is a message receiving process or a message sending process. The message type contained in the message processing request can accurately determine the corresponding target configuration file. Thus, message processing operations can be performed according to the target processing flow and the target configuration file to obtain the processing results. This realizes message receiving and sending processing by loading the configuration file. Furthermore, message parsing and signature field assembly can be performed simultaneously during message receiving, and message generation and signature field assembly can be performed simultaneously during message sending. This effectively saves time costs and greatly improves the processing efficiency of message receiving and sending.
[0040] Therefore, the technical solution of this invention achieves the goal of simultaneously realizing message parsing and signature field assembly during message reception by loading a configuration file, and simultaneously realizing message generation and signature field assembly during message transmission. This improves the processing efficiency of message reception and transmission, and solves the technical problem of low message reception and transmission processing efficiency in the prior art.
[0041] In one optional embodiment, determining the target processing flow based on the message processing request includes: if the message processing request is a message parsing request, then the receiving processing flow is taken as the target processing flow; if the message processing request is a message generation request, then the sending processing flow is taken as the target processing flow.
[0042] Optionally, after configuring the message configuration file, the system receives a message processing request and can determine whether the target processing flow is a message receiving process or a message sending process based on the message processing request. If the message processing request is a message parsing request, the target processing flow is the message receiving process; if the message processing request is a message generation request, the target processing flow is the message sending process.
[0043] It should be noted that the above process accurately determines the target processing flow, providing a data foundation for subsequent message processing.
[0044] In one optional embodiment, message processing operations are performed according to the target processing flow and the target configuration file to obtain processing results, including: if the target processing flow is a receiving processing flow, then the first financial message in the message parsing request is parsed according to the receiving processing flow and the target configuration file to obtain a parsed first financial message data set and a string to be verified, and a verified financial message data set is generated according to the parsed first financial message data set and the string to be verified, wherein the string to be verified is used to verify the signature of the first financial message; if the target processing flow is a sending processing flow, then the target message data in the message generation request is assembled according to the sending processing flow and the target configuration file to obtain an assembled second financial message data set and a string to be signed, and a signed financial message is generated according to the assembled second financial message data set and the string to be signed, wherein the string to be signed is used to sign the assembled second financial message.
[0045] Optionally, during the process of processing messages according to the target processing flow and the target configuration file to obtain the processing result, when the target processing flow is the message receiving processing flow, the system obtains the received financial message (i.e., the first financial message) from the message queue, parses the message field information according to the configuration file information, and performs signature verification field assembly processing to obtain the parsed message map data set (i.e., the first financial message data set) and the signature to be verified string.
[0046] Optionally, based on the parsed first financial message data set and the string to be verified, a verified financial message data set (i.e., a map data set of the verified message) can be generated. For example, by performing verification processing on the string to be verified, a verified string can be obtained. Storing the verified string into the parsed message map data set yields the verified message map data set.
[0047] Optionally, when the target processing flow is a message sending process, the system obtains the group message set data (i.e., the target message data) from the message generation request, assembles the message field information according to the configuration file information, and performs signature field assembly processing to obtain the map data set corresponding to the matched configuration file (i.e., the assembled second financial message data set) and the string to be signed. Optionally, the group message set data can be data obtained by the business system after processing the user terminal's request. For example, the user terminal sends a transfer request containing information such as the payee and the payee's account to the business system. The business system receives the transfer request, obtains the payee and payee's account information, and generates a transfer processing request message based on this information. It then sends a message generation request to the target financial message processing system, which can then obtain the target message data such as the payee and payee's account from the message generation request.
[0048] Optionally, based on the assembled second financial message data set and the string to be signed, a signed financial message (i.e., a signed XML-formatted financial message) can be generated. For example, by signing the string to be signed, a signed string can be obtained. Storing the signed string into the assembled second financial message data set yields the signed second financial message data set, thereby generating a signed XML-formatted financial message.
[0049] It should be noted that in the above process, message sending and receiving is processed by loading configuration files. Furthermore, message parsing and signature field assembly can be performed simultaneously during message receiving, and message generation and signature field assembly can be performed simultaneously during message sending. This effectively saves time and greatly improves the processing efficiency of sending and receiving messages.
[0050] In one optional embodiment, the first financial message in the message parsing request is parsed according to the message receiving and processing flow and the target configuration file to obtain the parsed first financial message data set and the string to be verified. This includes: according to the message receiving and processing flow, obtaining the configuration file information of the target configuration file from memory and reading the message information contained in the first financial message; determining the target path information corresponding to the message information from the configuration file information, and determining the target leaf node in the first financial message based on the target path information, wherein the target leaf node is a node that stores data; and determining the node type of the target leaf node and the message field to be verified in the first financial message based on the configuration file information. Based on the node type, determine the target data retrieval method and target data storage format for the target leaf node. The target data retrieval method is one of the following: a first data retrieval method or a second data retrieval method, where the second data retrieval method has a greater number of retrievals than the first data retrieval method. The target data storage format is one of the following: a first storage format or a second storage format, where the character types corresponding to the first storage format and the second storage format are different. Node data is retrieved from the target leaf node according to the target data retrieval method and stored in the first financial message data set according to the target data storage format, resulting in the parsed first financial message data set. The message fields to be verified are then assembled to obtain the string to be verified.
[0051] Optionally, firstly, according to the receiving and processing flow, the configuration file information of the target configuration file is retrieved from memory, and the message information (i.e., message content) contained in the first financial message is read. Then, the target path information corresponding to the message information is determined from the configuration file information, and the target leaf node for storing data in the first financial message is determined based on the target path information. Optionally, determining the target path information corresponding to the message information from the configuration file information can be done by matching the message content with the configuration file when reading the XML message, which can match the path in the configuration file (i.e., the target path information). The target path information indicates the location from which data is retrieved from the message. For example, when reading the XML message, the Linked Hash Map data set of the configuration file is read synchronously and sequentially in a loop, and the XPath information (path information) of its key values XML paths is matched in a loop to obtain the location from which data is retrieved from the message, that is, the target leaf node for storing data in the first financial message is determined, and data is retrieved from the target leaf node.
[0052] Optionally, the node type includes single node and multiple nodes. The first data retrieval method is the direct data retrieval method corresponding to single nodes, and the second data retrieval method is the loop recursive data retrieval method corresponding to multiple nodes. The first storage format is the String type corresponding to single nodes, and the second storage format is the List type corresponding to multiple nodes.
[0053] Optionally, the node type of the target leaf node can be determined based on the configuration file information. Based on the node type, the target data retrieval method and target data storage format of the target leaf node can be determined. Node data is obtained from the target leaf node according to the target data retrieval method, and the node data is stored in the first financial message data set according to the target data storage format, thus obtaining the parsed first financial message data set. For example, the configuration file specifies that node type 1 corresponds to a single node, and node type n corresponds to a multi-node node. After reading the message information (message content) contained in the first financial message, when the node type recorded in the message content is node type 1, the node type of the target leaf node can be determined to be a single node based on the configuration file information. The corresponding XML node data is then directly obtained based on the XPath path information. The output data is stored in the map collection result data in the form of a string character with the field name configured in the configuration file as the key. When the node type recorded in the message content is node type n, it indicates that there are multiple sets of cyclic child nodes under this node. By recursively looping, the configuration information of the field name of the parent node in the configuration file is obtained, and the data of each set of cyclic child nodes of the child node is stored in a map data collection. Finally, the List collection data of the parent node is assembled, and the output data is stored in the map collection result data in the form of a list with the field name configured in the configuration file as the key.
[0054] Optionally, the message fields to be verified are the signed message fields. The configuration file information determines which message fields need to be signed; that is, it identifies which message fields in the First Financial message are signed and require verification (i.e., the fields to be verified). For example, while parsing message fields, the configuration file can determine whether the node information of the leaf nodes in the message is a signed field, i.e., whether certain fields are signed (i.e., the message fields to be verified). By assembling the signed fields, the verification string required for verification (i.e., the string to be verified) can be obtained.
[0055] Figure 3 This is a schematic diagram of an optional message parsing and signature verification process according to an embodiment of the present invention, such as... Figure 3As shown, when reading XML messages, the Linked Hash Map collection data in the configuration file is read sequentially and iteratively. The XPath information of the key values in the XML is matched, and it is checked whether the XPath exists in the XML. If it does not exist, it is skipped; if it exists, the node type is determined. When the node type is a single node (1), the corresponding XML node data is directly obtained through the XPath path. The output data is stored in the map collection result data with the field name configured in the configuration file as the key, in String format. When the node type is a multi-node type (n), it indicates that there are multiple sets of circular child nodes under this node. The configuration information of the parent node's field name in the configuration file is obtained through a recursive loop. The data of each set of circular child nodes is stored in a map data collection. Finally, the List collection data of the parent node is assembled, and the output data is stored in the map collection result data with the field name configured in the configuration file as the key, in List format. Furthermore, while parsing the message fields, it is checked whether the node information is a signature field. If it is a signature field, it is assembled synchronously to generate the signature string required for verification. This signature string can be used for signature verification.
[0056] It should be noted that in the above process, message reception and processing were implemented by loading configuration files. Furthermore, message parsing and signature field assembly were performed simultaneously during message reception, effectively saving time and greatly improving the efficiency of message reception and processing.
[0057] In one optional embodiment, the target message data in the message generation request is processed by combining the data according to the message transmission process and the target configuration file to obtain an assembled second financial message data set and a string to be signed. This includes: according to the message transmission process, retrieving the configuration file information of the target configuration file from memory and reading the target message data; generating a second financial message data set and multiple leaf nodes based on the configuration file information, and generating node information for each leaf node based on the configuration file information and the target message data; performing combination processing on the node information of each leaf node based on the second financial message data set to obtain an assembled second financial message data set; and determining the message fields to be signed in the second financial message based on the configuration file information and the node information of each leaf node, and assembling the message fields to be signed to obtain a string to be signed.
[0058] Optionally, firstly, according to the message processing flow, the configuration file information of the target configuration file is retrieved from memory, and the target message data (i.e., the group message set data in the message generation request) is read. Then, based on the configuration file information, a second financial message data set (i.e., the set of data required to assemble the XML message) and multiple leaf nodes are generated. Based on the configuration file information and the target message data, the node information for each leaf node is generated, thus assembling the leaf nodes. For example, based on the configuration file information, the group message set data is initialized. For a single node of node type 1, the corresponding data value is set using the field name configured in the configuration file information as the key. For multiple nodes of node type n, their child nodes are treated as loop groups, each loop group is set as a map set, assembled into a List dataset, and merged for aggregation. The corresponding List set is set using the field name of the node in the configuration file information as the key. Further, the Linked Hash Map set data of the configuration file is read synchronously and sequentially in a loop. The group message set data is compared with the configuration information to determine the node type. When the node type is a single node (1), the corresponding value of the initialization group report collection data is obtained, and the XML single node information is assembled using the XPath path corresponding to the XML path. When the node type is a multi-node type (n), it indicates that there are multiple sets of circular child nodes under this node. The configuration information of the field name of the parent node of this node is obtained in the configuration file through a recursive loop, and the corresponding value of the initialization group report collection data is obtained accordingly to assemble the XML multi-node information.
[0059] Optionally, based on the second financial message data set, the node information of each leaf node can be processed to form a group message, resulting in the assembled second financial message data set. For example, after generating the node information of each leaf node, the group message can be formed based on the set of data required to assemble the XML message, that is, the message field information can be assembled to create XML single nodes and XML multi-nodes, resulting in the map data set corresponding to the matched configuration file (i.e., the assembled second financial message data set).
[0060] Optionally, based on the configuration file information and the node information of each leaf node, the message fields to be signed in the second financial message can be determined, and these message fields are assembled to obtain the string to be signed. For example, based on the configuration file information and the node information of each leaf node, it can be determined which message fields need to be signed. While assembling the message fields, the configuration file information can be used to determine whether the node information is a field to be signed. If it is a field to be signed, it is assembled synchronously to obtain the signature string required for signing, which can then be used for signing.
[0061] Figure 4 This is a schematic diagram of an optional message grouping and signing process according to an embodiment of the present invention, such as... Figure 4 As shown, based on the configuration file information, the initialization group report collection data is performed. Specifically, for a single node with node type 1, the corresponding data value is set using the field name configured in the configuration file as the key. For multiple nodes with node type n, its child nodes are treated as loop groups, each loop group is set as a map collection, assembled into a List data collection, and finally summarized into a List collection set with the field name of the node in the configuration file as the key. Simultaneously, the Linked Hash Map collection data in the configuration file is read sequentially to determine the corresponding node type. When it is a single node with node type 1, the corresponding value of the initialization group report collection data is obtained, and the XML single node is assembled using the XPath path corresponding to the XML path. When it is a multiple node with node type n, indicating that there are multiple loop child nodes under this node, the configuration information of the field name of the parent node in the configuration file is obtained through recursion, and the corresponding value of the initialization group report collection data is obtained to assemble the XML multiple node. Furthermore, while processing the group message field, it also determines whether the node information is a signature field. If it is a signature field, it is assembled synchronously to finally assemble the signature string required for signature, and then uses the signature string for signature processing.
[0062] It should be noted that in the above process, message sending is achieved by loading configuration files. Furthermore, message generation and signature field assembly are performed simultaneously during message sending, effectively saving time and greatly improving the efficiency of message sending.
[0063] In one optional embodiment, generating a signed financial message based on the assembled second financial message data set and the string to be signed includes: performing a signing process on the string to be signed to obtain a signed string, and storing the signed string into the assembled second financial message data set to obtain a signed second financial message data set; and generating a signed financial message based on the signed second financial message data set.
[0064] Optionally, in the process of generating a signed financial message based on the assembled second financial message data set and the string to be signed, the string to be signed is first signed to obtain a signed string, and the signed string is stored in the assembled second financial message data set to obtain a signed second financial message data set. Thus, a signed XML format financial message can be generated based on the signed second financial message data set.
[0065] It should be noted that the above process effectively saves time and greatly improves the efficiency of message transmission.
[0066] In one optional embodiment, before receiving a message processing request, multiple financial messages are acquired, and the target message standard and message type of each financial message are determined. Based on the target message standard and message type, the configuration file information of each financial message is configured to generate a configuration file corresponding to each message type.
[0067] Optionally, before receiving a message processing request, a configuration file of a specified format needs to be configured for the message. Optionally, multiple financial messages are first obtained, and the target message standard and message type of each financial message are determined. Then, based on the target message standard and message type, the configuration file information for each financial message is configured to generate a configuration file corresponding to each message type.
[0068] Specifically, the target message standard can be the ISO 20022 standard for communication exchange messages. Based on this standard and the message type, a configuration file of a specified format is configured for the message. Different message types correspond to their own configuration files. During the configuration process, only the leaf nodes in the XML message that store data are configured. That is, for multiple leaf nodes in the XML message that store data, the configuration file information corresponding to each leaf node is configured separately. Each leaf node corresponds to one line of configuration information in the configuration file. The configuration file information includes field names, node types, XML paths, attributes, data types, whether to add signatures, and the parent node.
[0069] Specifically, based on the target message standard, we can determine whether the leaf node is a single node or a multi-node node. When configuring the node type, a single node is configured as 1, which means that the XML path can represent a unique value in XML, corresponding to the message standard attribute field [0..1] or [1..1]. A multi-node is configured as n, which means that its own child nodes are looped multiple times, corresponding to the message standard attribute field [0..n] or [1..n] or [1..specific number].
[0070] Specifically, the field name is a unique field in the configuration file. The value in the parser will be set in this field, and the key value of the corresponding map value when assembling a parser is also configured in this field. For a single node (node type 1), the input is of type String; for a multi-node (node type n), the input is of type List. When retrieving values, the node type is output as List, and the values of its sub-nodes are stored in the form of a map. For example, if there are 10 circular nodes, there are 10 map values under the List, and the key in the map corresponds to the field name of the child node in the configuration file.
[0071] Specifically, configure the XML path corresponding to the field name. The XML path is the absolute path of the field name in the configuration file. The configuration file only configures the leaf nodes (nodes with values) and special extracted parent nodes (node type n).
[0072] Specifically, attributes refer to the node properties of leaf nodes. The configuration principle for leaf node attributes can be "attribute name: attribute variable name: attribute name: attribute variable name...". For example, a monetary amount has an attribute.<Ccy=“CNY”> It can be configured as Ccy:Current. When retrieving the value, you can use the field name of the node it belongs to, followed by an underscore and the name of its attribute variable. For example, if the field name of the amount node is AMT and its attribute variable name is Current, the value variable would be "AMT_Current".
[0073] Specifically, data type refers to the character type attribute, where characters are represented as x and numbers as n.
[0074] Specifically, based on the target message standard, the fields that need to be signed can be determined. If they are fields to be signed, they are configured as Y; otherwise, they are configured as N.
[0075] Specifically, configure the parent node for the leaf node. For a child node of a multi-node, the field name of its parent node should be filled in. For a single node that is not a child node, configure it as N.
[0076] Optionally, after generating the configuration file corresponding to each message type, the configuration file undergoes format conversion processing to obtain the target data set (i.e., a Linked Hash Map collection). Specifically, the system loads the configuration file information and converts it into a Linked Hash Map collection. This collection contains multiple key-value pairs, where the key is the XML path information corresponding to each line in the configuration file (e.g., / Document / FIToFICstmrCdtTrf / GrpHdr / MsgId), and the value is the JavaBean object (a reusable component written in Java) corresponding to each line of configuration information. Object fields include node type, XML path, attributes, data type, whether it is signed, and its parent node. Furthermore, each message configuration file corresponds to a map data set. Using the message type as the key, the configuration file data for each message is placed into the map data set and cached in memory.
[0077] It should be noted that in the above process, a configuration file with a specified format for the message was implemented. Based on the node information and signature field information of the XML message, only the corresponding configuration file needs to be written for each type of message. By loading the configuration file, message parsing and signature field assembly operations can be realized simultaneously when the message is received; message generation and signature field assembly operations can be realized simultaneously when the message is sent, thereby greatly improving the message processing efficiency of financial XML messages.
[0078] Therefore, the technical solution of this invention achieves the goal of simultaneously realizing message parsing and signature field assembly during message reception by loading a configuration file, and simultaneously realizing message generation and signature field assembly during message transmission. This improves the processing efficiency of message reception and transmission, and solves the technical problem of low message reception and transmission processing efficiency in the prior art.
[0079] Example 2
[0080] According to an embodiment of the present invention, an embodiment of a processing apparatus for a target financial message is provided, wherein, Figure 5 This is a schematic diagram of an optional target financial message processing apparatus according to an embodiment of the present invention, such as... Figure 5 As shown, the device includes: a receiving module 501, used to receive a message processing request and determine a target processing flow based on the message processing request, wherein the message processing request includes a message type, and the message processing request is one of the following: a message parsing request, a message generation request, and the target processing flow is one of the following: a message receiving processing flow, a message sending processing flow, wherein the message receiving processing flow is used to parse the message, and the message sending processing flow is used to generate the message; a determining module 502, used to determine the target configuration file corresponding to the message type and obtain the target configuration file, wherein the target configuration file is used to implement message parsing and signature verification and / or to implement message generation and signature; and a processing module 503, used to perform message processing operations based on the target processing flow and the target configuration file to obtain a processing result, wherein the processing result is one of the following: a set of financial message data after signature verification, or a financial message after signature.
[0081] It should be noted that the receiving module 501, determining module 502 and processing module 503 mentioned above correspond to steps S101 to S103 in the above embodiments. The three modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the content disclosed in the above embodiment 1.
[0082] Optionally, the receiving module includes: a first determining module, configured to take the receiving processing flow as the target processing flow if the message processing request is a message parsing request; and a second determining module, configured to take the sending processing flow as the target processing flow if the message processing request is a message generation request.
[0083] Optionally, the processing module includes: a first processing module, configured to, if the target processing flow is a receiving processing flow, parse the first financial message in the message parsing request according to the receiving processing flow and the target configuration file to obtain a parsed first financial message data set and a string to be verified, and generate a verified financial message data set based on the parsed first financial message data set and the string to be verified, wherein the string to be verified is used to verify the signature of the first financial message; and a second processing module, configured to, if the target processing flow is a sending processing flow, perform message assembly processing on the target message data in the message generation request according to the sending processing flow and the target configuration file to obtain an assembled second financial message data set and a string to be signed, and generate a signed financial message based on the assembled second financial message data set and the string to be signed, wherein the string to be signed is used to sign the assembled second financial message.
[0084] Optionally, the first processing module includes: a first acquisition module, used to acquire configuration file information of the target configuration file from memory according to the receiving and processing flow, and read message information contained in the first financial message; a third determination module, used to determine the target path information corresponding to the message information from the configuration file information, and determine the target leaf node in the first financial message based on the target path information, wherein the target leaf node is a node storing data; a fourth determination module, used to determine the node type of the target leaf node and the message field to be verified in the first financial message based on the configuration file information; and a fifth determination module, used to determine the target data retrieval method of the target leaf node and the target data retrieval method based on the node type. The target data storage format includes one of the following: a first data retrieval method and a second data retrieval method, where the second data retrieval method has a greater number of retrievals than the first data retrieval method; and one of the following: a first storage format and a second storage format, where the character types corresponding to the first and second storage formats are different; a first storage module is used to retrieve node data from the target leaf nodes according to the target data retrieval method and store the node data into the first financial message data set according to the target data storage format, thus obtaining the parsed first financial message data set; and a third processing module is used to assemble the message fields to be verified, thus obtaining the string to be verified.
[0085] Optionally, the second processing module includes: a second acquisition module, used to acquire configuration file information of the target configuration file from memory according to the message sending process, and read target message data; a first generation module, used to generate a second financial message data set and multiple leaf nodes according to the configuration file information, and generate node information for each leaf node according to the configuration file information and target message data; a fourth processing module, used to perform grouping processing on the node information of each leaf node according to the second financial message data set to obtain the assembled second financial message data set; and a fifth processing module, used to determine the message fields to be signed in the second financial message according to the configuration file information and the node information of each leaf node, and to assemble the message fields to be signed to obtain the string to be signed.
[0086] Optionally, the second processing module further includes: a second storage module, used to perform signature processing on the string to be signed, to obtain a signed string, and to store the signed string into the assembled second financial message data set, to obtain a signed second financial message data set; and a second generation module, used to generate a signed financial message based on the signed second financial message data set.
[0087] Optionally, the processing device for the target financial message further includes: a third acquisition module, used to acquire multiple financial messages before receiving a message processing request, and determine the target message standard and message type of each financial message; and a third generation module, used to configure the configuration file information of each financial message according to the target message standard and message type, and generate a configuration file corresponding to each message type.
[0088] Example 3
[0089] According to another aspect of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer-readable storage medium, and the computer program is configured to execute the above-described method for processing the target financial message when it is run.
[0090] Example 4
[0091] According to another aspect of the present invention, an electronic device is also provided, wherein, Figure 6 This is a schematic diagram of an optional electronic device according to an embodiment of the present invention, such as... Figure 6As shown, the electronic device includes one or more processors; a memory for storing one or more programs, which, when executed by the one or more processors, enable the one or more processors to run the programs, wherein the programs are configured to execute the aforementioned target financial message processing method during runtime. When the processor executes the program, it performs the following steps: receiving a message processing request and determining a target processing flow based on the message processing request, wherein the message processing request includes a message type, and the message processing request is one of the following: a message parsing request, a message generation request; the target processing flow is one of the following: a message receiving processing flow, a message sending processing flow, wherein the message receiving processing flow is used to parse the message, and the message sending processing flow is used to generate the message; determining the target configuration file corresponding to the message type and obtaining the target configuration file, wherein the target configuration file is used to implement message parsing and signature verification and / or message generation and signature; performing message processing operations based on the target processing flow and the target configuration file to obtain a processing result, wherein the processing result is one of the following: a set of verified financial message data, or a signed financial message.
[0092] Optionally, when the processor executes the program, it also implements the following steps: determining the target processing flow based on the message processing request, including: if the message processing request is a message parsing request, then the receiving processing flow is taken as the target processing flow; if the message processing request is a message generation request, then the sending processing flow is taken as the target processing flow.
[0093] Optionally, the processor, when executing the program, further implements the following steps: performing message processing operations according to the target processing flow and the target configuration file to obtain processing results, including: if the target processing flow is a receiving processing flow, then parsing the first financial message in the message parsing request according to the receiving processing flow and the target configuration file to obtain the parsed first financial message data set and the string to be verified, and generating the verified financial message data set according to the parsed first financial message data set and the string to be verified, wherein the string to be verified is used to verify the first financial message; if the target processing flow is a sending processing flow, then performing message assembly processing on the target message data in the message generation request according to the sending processing flow and the target configuration file to obtain the assembled second financial message data set and the string to be signed, and generating the signed financial message according to the assembled second financial message data set and the string to be signed, wherein the string to be signed is used to sign the assembled second financial message.
[0094] Optionally, the processor, when executing the program, further implements the following steps: parsing the first financial message in the message parsing request according to the message receiving and processing flow and the target configuration file, to obtain the parsed first financial message data set and the string to be verified, including: according to the message receiving and processing flow, retrieving the configuration file information of the target configuration file from memory, and reading the message information contained in the first financial message; determining the target path information corresponding to the message information from the configuration file information, and determining the target leaf node in the first financial message based on the target path information, wherein the target leaf node is a node storing data; and determining the node type of the target leaf node and the string to be verified in the first financial message based on the configuration file information. The message fields are defined as follows: Based on the node type, the target data retrieval method and target data storage format for the target leaf node are determined. The target data retrieval method is one of the following: a first data retrieval method or a second data retrieval method, where the second data retrieval method has a greater number of retrievals than the first data retrieval method. The target data storage format is one of the following: a first storage format or a second storage format, where the character types corresponding to the first and second storage formats are different. Node data is retrieved from the target leaf node according to the target data retrieval method and stored in the first financial message data set according to the target data storage format, resulting in the parsed first financial message data set. The message fields to be verified are then assembled to obtain the string to be verified.
[0095] Optionally, the processor, when executing the program, further implements the following steps: performing packet assembly processing on the target packet data in the packet generation request according to the packet transmission processing flow and the target configuration file to obtain the assembled second financial packet data set and the string to be signed, including: according to the packet transmission processing flow, retrieving the configuration file information of the target configuration file from memory and reading the target packet data; generating the second financial packet data set and multiple leaf nodes according to the configuration file information, and generating the node information of each leaf node according to the configuration file information and the target packet data; performing packet assembly processing on the node information of each leaf node according to the second financial packet data set to obtain the assembled second financial packet data set; determining the packet fields to be signed in the second financial packet according to the configuration file information and the node information of each leaf node, and assembling the packet fields to be signed to obtain the string to be signed.
[0096] Optionally, the processor, when executing the program, further implements the following steps: generating a signed financial message based on the assembled second financial message data set and the string to be signed, including: performing a signature process on the string to be signed to obtain a signed string, and storing the signed string into the assembled second financial message data set to obtain a signed second financial message data set; generating a signed financial message based on the signed second financial message data set.
[0097] Optionally, the processor may also perform the following steps when executing the program: before receiving a message processing request, acquire multiple financial messages and determine the target message standard and message type of each financial message; configure the configuration file information of each financial message according to the target message standard and message type, and generate a configuration file corresponding to each message type.
[0098] The devices mentioned in this article can be servers, PCs, tablets, mobile phones, etc.
[0099] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0100] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0101] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0102] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0103] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0104] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0105] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for processing a target financial message, characterized in that, include: Receive a message processing request and determine a target processing flow based on the message processing request, wherein the message processing request includes a message type and is one of the following: a message parsing request or a message generation request; the target processing flow is one of the following: a message receiving processing flow or a message sending processing flow, wherein the message receiving processing flow is used to parse the message and the message sending processing flow is used to generate the message. The target configuration file corresponding to the message type is determined and obtained. The target configuration file is configured for each data node in the financial message, including at least the path information, node type information and signature identifier information of the data node. The node type information is used to determine the method of extracting data from the data node or storing data in the data node. The signature identifier information is used to determine whether the data of the data node needs to be assembled into a string to be verified or a string to be signed. The target configuration file is used to realize message parsing and verification and / or realize message generation and signing. Message processing operations are performed according to the target processing flow and the target configuration file to obtain a processing result, wherein the processing result is one of the following: a set of financial message data after signature verification, or a financial message after signature addition; The process of processing messages according to the target processing flow and the target configuration file to obtain processing results includes: If the target processing flow is the receiving processing flow, then the first financial message in the message parsing request is parsed according to the receiving processing flow and the target configuration file to obtain the parsed first financial message data set and the signature-to-be-verified string. The verified financial message data set is generated according to the parsed first financial message data set and the signature-to-be-verified string, wherein the signature-to-be-verified string is used to perform signature verification processing on the first financial message. If the target processing flow is the message sending processing flow, then the target message data in the message generation request is processed by grouping according to the message sending processing flow and the target configuration file to obtain the assembled second financial message data set and the string to be signed. The signed financial message is generated according to the assembled second financial message data set and the string to be signed. The string to be signed is used to sign the assembled second financial message. According to the received message processing flow and the target configuration file, the first financial message in the message parsing request is parsed to obtain the parsed first financial message data set and the signature string to be verified, including: According to the aforementioned receiving and processing flow, the configuration file information of the target configuration file is obtained from memory, and the message information contained in the first financial message is read. The target path information corresponding to the message information is determined from the configuration file information, and the target leaf node in the first financial message is determined based on the target path information, wherein the target leaf node is a node that stores data; The node type of the target leaf node and the message field to be verified in the first financial message are determined based on the configuration file information. The target data retrieval method and target data storage format of the target leaf node are determined based on the node type. The target data retrieval method is one of the following: a first data retrieval method and a second data retrieval method, wherein the number of data retrievals in the second data retrieval method is greater than the number of data retrievals in the first data retrieval method. The target data storage format is one of the following: a first storage format and a second storage format, wherein the character types corresponding to the first storage format and the second storage format are different. The node type includes single node and multiple nodes. The first data retrieval method is the direct data retrieval method corresponding to a single node, and the second data retrieval method is the cyclic recursive data retrieval method corresponding to multiple nodes. Node data is obtained from the target leaf node according to the target data retrieval method, and the node data is stored in the first financial message data set according to the target data storage format to obtain the parsed first financial message data set. The message fields to be verified are assembled to obtain the string to be verified.
2. The method according to claim 1, characterized in that, Determining the target processing flow based on the message processing request includes: If the message processing request is the message parsing request, then the message receiving process is taken as the target processing process; If the message processing request is the message generation request, then the message sending process is taken as the target processing process.
3. The method according to claim 1, characterized in that, According to the aforementioned message processing flow and the target configuration file, the target message data in the message generation request is processed to form a second financial message data set and a string to be signed, including: According to the aforementioned message processing flow, the configuration file information of the target configuration file is obtained from memory, and the target message data is read. Based on the configuration file information, a second financial message data set and multiple leaf nodes are generated, and based on the configuration file information and the target message data, node information for each leaf node is generated; Based on the second financial message data set, the node information of each leaf node is processed by grouping to obtain the assembled second financial message data set; Based on the configuration file information and the node information of each leaf node, the message fields to be signed in the second financial message are determined, and the message fields to be signed are assembled to obtain the string to be signed.
4. The method according to claim 1, characterized in that, Based on the assembled second financial message data set and the string to be signed, the signed financial message is generated, including: The string to be signed is processed to obtain a signed string, and the signed string is stored in the assembled second financial message data set to obtain the signed second financial message data set; Based on the second set of signed financial message data, the signed financial message is generated.
5. The method according to claim 1, characterized in that, Before receiving a message processing request, the method further includes: Acquire multiple financial messages and determine the target message standard and message type of each financial message; Based on the target message standard and the message type, configure the configuration file information for each financial message to generate a configuration file corresponding to each message type.
6. A processing apparatus for a target financial message, characterized in that, include: A receiving module is used to receive a message processing request and determine a target processing flow based on the message processing request. The message processing request includes a message type and is one of the following: a message parsing request or a message generation request. The target processing flow is one of the following: a message receiving process or a message sending process. The message receiving process is used to parse messages, and the message sending process is used to generate messages. The determination module is used to determine the target configuration file corresponding to the message type and obtain the target configuration file. The target configuration file is configured for each data node in the financial message, and at least includes the path information, node type information and signature identification information of the data node. The node type information is used to determine the method of extracting data from the data node or storing data in the data node. The signature identification information is used to determine whether the data of the data node needs to be assembled into a string to be verified or a string to be signed. The target configuration file is used to realize message parsing and verification and / or realize message generation and signing. The processing module is used to perform message processing operations according to the target processing flow and the target configuration file to obtain a processing result, wherein the processing result is one of the following: a set of financial message data after signature verification, or a financial message after signature addition; The processing module includes: The first processing module is configured to, if the target processing flow is the receiving processing flow, parse the first financial message in the message parsing request according to the receiving processing flow and the target configuration file, to obtain a parsed first financial message data set and a signature-to-be-verified string, and generate the verified financial message data set according to the parsed first financial message data set and the signature-to-be-verified string, wherein the signature-to-be-verified string is used to perform signature verification processing on the first financial message; The second processing module is configured to, if the target processing flow is the sending processing flow, perform grouping processing on the target message data in the message generation request according to the sending processing flow and the target configuration file to obtain the assembled second financial message data set and the string to be signed, and generate the signed financial message according to the assembled second financial message data set and the string to be signed, wherein the string to be signed is used to sign the assembled second financial message; The first processing module includes: a first acquisition module, used to acquire configuration file information of the target configuration file from memory according to the receiving and processing flow, and read message information contained in the first financial message; a third determination module, used to determine the target path information corresponding to the message information from the configuration file information, and determine the target leaf node in the first financial message based on the target path information, wherein the target leaf node is a node storing data; a fourth determination module, used to determine the node type of the target leaf node and the message field to be verified in the first financial message based on the configuration file information; and a fifth determination module, used to determine the target data retrieval method and target data storage format of the target leaf node based on the node type, wherein the target data retrieval method is one of the following: a first data retrieval method, a second data retrieval method. The second data retrieval method has a greater number of data retrievals than the first data retrieval method. The target data storage format is one of the following: a first storage format or a second storage format. The character types corresponding to the first storage format and the second storage format are different. The node type includes single node and multiple nodes. The first data retrieval method is the direct data retrieval method corresponding to a single node, and the second data retrieval method is the cyclic recursive data retrieval method corresponding to multiple nodes. The first storage module is used to retrieve node data from the target leaf node according to the target data retrieval method and store the node data into the first financial message data set according to the target data storage format to obtain the parsed first financial message data set. The third processing module is used to assemble the message fields to be verified to obtain the string to be verified.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the processing method for the target financial message as described in any one of claims 1 to 5 when it is run.
8. An electronic device, characterized in that, The electronic device includes one or more processors; A memory for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to perform a program for running, wherein the program is configured to execute the method for processing the target financial message as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Data communication processing system and method
CN110009463A
Method and device for message signing and signature verifying
CN111756755A