Message processing method, device, equipment, storage medium and program product

By determining the message field path and structure identifier through the correspondence in the configuration file, the problem of parsing difficulties caused by changes in message structure in the existing technology is solved, and flexible message parsing and convenient processing flow are realized.

CN116192999BActive Publication Date: 2025-11-21CHINA CONSTRUCTION BANK +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310199305.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-28
Publication Date
2025-11-21
Estimated Expiration
2043-02-28

AI Technical Summary

Technical Problem

In existing technologies, message parsing methods can only parse fixed message structures, which means that when the message structure changes, Java objects need to be modified and tested, resulting in a long development process.

Method used

By identifying the correspondence between message identifiers and field paths in the first configuration file, the field paths of the message to be parsed are determined. Combined with the correspondence between structure identifiers and sub-field paths, attribute data is extracted from the message to achieve flexible message parsing.

Benefits of technology

It improves the flexibility of message parsing, enabling it to handle different message structures and enhancing the convenience and efficiency of message processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116192999B_ABST
    Figure CN116192999B_ABST
Patent Text Reader

Abstract

The application discloses a message processing method, device and equipment, a storage medium and a program product. The application relates to the technical field of communication. The method comprises the following steps: determining a field path corresponding to a to-be-analyzed message according to a corresponding relationship between a message identifier and the field path in a first configuration file; determining a structure identifier corresponding to the field path according to a corresponding relationship between the field path and the structure identifier in the first configuration file; extracting a corresponding code paragraph from the to-be-analyzed message according to the field path, so as to obtain target code; determining at least one sub-field path corresponding to the structure identifier according to a second configuration file, the second configuration file being configured with a corresponding relationship between the structure identifier and the sub-field path; and taking attribute data extracted from the target code based on the at least one sub-field path as a field analysis result of a to-be-analyzed field corresponding to the field path. The technical scheme of the application can realize analysis and processing of messages with different message structures.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of communication technology, and in particular to a message processing method, apparatus, device, storage medium and program product. Background Technology

[0002] Existing technology creates a corresponding Java object based on the message format and then uses JAXB (Java Architecture for XML binding) tools to parse the message. This message parsing method is hard-coded. When the message structure changes, the Java object needs to be modified according to the new message structure, and then the Java object needs to be tested. Only after the test passes can it be deployed, resulting in a lengthy development process.

[0003] In summary, existing message parsing methods have at least one limitation: they can only parse messages with a fixed message structure. Summary of the Invention

[0004] This invention provides a message processing method, apparatus, device, storage medium, and program product to solve the technical problem of being able to parse messages with only a fixed message structure.

[0005] In a first aspect, embodiments of the present invention provide a message processing method, including:

[0006] The field path corresponding to the message to be parsed is determined according to the correspondence between the message identifier and the field path in the first configuration file; the structure identifier corresponding to the field path is determined according to the correspondence between the field path and the structure identifier in the first configuration file.

[0007] Extract the corresponding code segment from the message to be parsed based on the field path to obtain the target code;

[0008] The at least one sub-field path corresponding to the structure identifier is determined according to the second configuration file, wherein the second configuration file is configured with the correspondence between the structure identifier and the sub-field path;

[0009] The attribute data extracted from the target code based on the at least one sub-field path is used as the field parsing result of the field to be parsed corresponding to the field path.

[0010] Secondly, embodiments of the present invention also provide a message processing apparatus, the apparatus comprising:

[0011] The field path determination module is used to determine the field path corresponding to the message to be parsed based on the correspondence between the message identifier and the field path in the first configuration file; and to determine the structure identifier corresponding to the field path based on the correspondence between the field path and the structure identifier in the first configuration file.

[0012] The target code determination module is used to extract the corresponding code segment from the message to be parsed according to the field path to obtain the target code;

[0013] The sub-field path determination module is used to determine at least one sub-field path corresponding to the structure identifier according to the second configuration file, wherein the second configuration file is configured with the correspondence between the structure identifier and the sub-field path;

[0014] The parsing result determination module is used to take the attribute data extracted from the target code based on the at least one sub-field path as the field parsing result of the field to be parsed corresponding to the field path.

[0015] Thirdly, embodiments of the present invention also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the message processing method as described in any of the embodiments of the present invention.

[0016] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the message processing method as described in any of the embodiments of the present invention.

[0017] Fifthly, embodiments of the present invention also provide a computer program product, including a computer program that, when executed by a processor, implements the message processing method as described in any of the embodiments of the present invention.

[0018] The technical solution of this invention, through the correspondence between message identifiers and field paths, and the correspondence between field paths and structure identifiers in the first configuration file, can locate and extract the target code of the field to be parsed in the message to be parsed; through the correspondence between structure identifiers and sub-field paths in the second configuration file, at least one sub-field path corresponding to the structure identifier of the field to be parsed is determined, and all attribute data of the field to be parsed can be extracted from the target code based on the at least one sub-field path to obtain the field parsing result; the configuration information improves the flexibility of message parsing, enabling the parsing and processing of messages with different message structures, and improving the convenience of message processing. Attached Figure Description

[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 A flowchart of a message processing method provided in an embodiment of the present invention;

[0021] Figure 2 A flowchart of a message processing method provided in an embodiment of the present invention;

[0022] Figure 3 A flowchart of a message processing method provided in an embodiment of the present invention;

[0023] Figure 4 A flowchart of a message processing method provided in an embodiment of the present invention;

[0024] Figure 5 This is a schematic diagram of the structure of a message processing device provided in an embodiment of the present invention;

[0025] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0026] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0027] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this invention, terms such as "first," "second," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance. The acquisition, storage, use, and processing of data in the technical solutions of this application all comply with the relevant provisions of national laws and regulations.

[0028] Figure 1 This is a flowchart illustrating a message processing method provided by an embodiment of the present invention. This embodiment is applicable to scenarios involving message processing, particularly for processing messages with different message structures. The method can be executed by a message processing device, which can be implemented in software and / or hardware and integrated into a computer device with application development capabilities.

[0029] like Figure 1 As shown, the message processing method of this embodiment includes the following steps:

[0030] S110. Determine the field path corresponding to the message to be parsed based on the correspondence between the message identifier and the field path in the first configuration file.

[0031] In this context, the message to be parsed can be understood as a message that requires parsing processing. The data in the message to be parsed can be one or more. When there are multiple messages to be parsed, the message structures of different messages can be the same or different. A message to be parsed may include one or more fields. In practical applications, a message to be parsed typically includes multiple fields. Field paths can be used to extract the code segment corresponding to the field in the message, where the code segment can be used to store the content of the corresponding field. Message identifiers can be used to distinguish different messages. The first configuration file can be understood as a file that pre-configures the correspondence between message identifiers and field paths, allowing for relatively flexible configuration of this correspondence. The first configuration file may include one or more message identifiers.

[0032] Specifically, the message to be parsed is obtained, and its message identifier is determined. Then, the message identifier of the message to be parsed is matched with the message identifiers in the first configuration file. This determines the matched message identifier. Then, based on the correspondence between message identifiers and field paths in the first configuration file, the field path corresponding to the matched message identifier is determined. For example, the first configuration file can be as shown in Table 1, where message identifier 01 corresponds to field path A, message identifier 02 corresponds to field path B, and message identifier 03 corresponds to field path C. When the message identifier of the message to be parsed is message identifier 02, the matched message identifier can be determined to be message identifier 02. Therefore, based on the correspondence between message identifiers and field paths in the first configuration file (message identifier 02 corresponds to field path B), the field path corresponding to the matched message identifier can be determined to be field path B. After determining the field path corresponding to the matched message identifier, this field path can be used as the field path corresponding to the message to be parsed.

[0033] Table 1 First Configuration File

[0034] Configuration Number Message Identifier Field Path Structural identifier Number 1 Message Identifier 01 Field Path A Structure 001 Number 2 Message Identifier 02 Field Path B Structure 001 Number 3 Message Identifier 03 Field path C Structure 002

[0035] S120. Determine the structure identifier corresponding to the field path based on the correspondence between the field path and the structure identifier in the first configuration file.

[0036] The structure identifier distinguishes different structures. The structure can be predefined. Structures are used to construct the information required by a message. It should be noted that in this embodiment, a structure can be understood as a message component; that is, a message component is defined as a structure. Optionally, a structure identifier can be configured to correspond to at least two field paths. That is, one field path can correspond to one structure identifier, and one structure identifier can correspond to multiple field paths. In other words, different field paths can correspond to the same structure identifier. In this embodiment, the first configuration file can configure not only the correspondence between message identifiers and field paths, but also the correspondence between field paths and structure identifiers. This allows for more flexible adjustment of the correspondence between message identifiers and field paths, or the correspondence between field paths and structure identifiers.

[0037] Specifically, the field paths of the message to be parsed are matched with the field paths in the first configuration file. This determines the matched field paths. Then, based on the correspondence between field paths and structure identifiers in the first configuration file, the structure identifier corresponding to the matched field path is determined, that is, the structure identifier corresponding to the message to be parsed is determined.

[0038] In one embodiment, the first configuration file is shown in Table 2. Continuing with the previous example, the correspondence between field paths and structure identifiers is as follows: field path A corresponds to structure identifier 001, field path B corresponds to structure identifier 001, and field path C corresponds to structure identifier 002. Therefore, when the field path of the message to be parsed is field path B, it can be determined that the matched structure identifier is 001.

[0039] The first configuration file also includes the structure name, structure version number, and structure description corresponding to each structure identifier, as detailed in Table 2.

[0040] Table 2 First Configuration File

[0041]

[0042]

[0043] S130. Extract the corresponding code segment from the message to be parsed according to the field path to obtain the target code.

[0044] In this context, a code segment can be understood as a portion of the code in the message to be parsed. Target code can be understood as the code segment corresponding to the field path extracted from the message to be parsed.

[0045] Specifically, based on the field path corresponding to the message to be parsed, the code segment in the message corresponding to the field path is determined. This code segment can then be extracted to obtain the target code.

[0046] In this embodiment of the invention, determining the code segment in the message to be parsed corresponding to the field path may include: presetting a correspondence between the field path and the code start identifier. Then, based on the correspondence between the field path and the code start identifier, the code start identifier corresponding to the field path in the message to be parsed can be determined; thereby, based on the code start identifier, the code segment in the message to be parsed corresponding to the field path can be determined.

[0047] The code start identifier can be used to distinguish code segments corresponding to different field paths. The code start identifier can include a code beginning identifier and a code end identifier. The code beginning identifier can be understood as the start mark of the code segment corresponding to the field path. The code end identifier can be understood as the end mark of the code segment corresponding to the field path. In this embodiment of the invention, determining the code segment in the message to be parsed corresponding to the field path based on the code start identifier can specifically involve taking the code between the code start identifier and the code end identifier as the code segment in the message to be parsed corresponding to the field path.

[0048] S140. Determine at least one sub-field path corresponding to the structure identifier according to the second configuration file, wherein the second configuration file is configured with the correspondence between the structure identifier and the sub-field path.

[0049] The sub-field paths can be used to extract attribute data from the target code. For example, in financial messages, the attribute data could be business type, transaction amount, or payment method. The second configuration file can be understood as a file that pre-configures the mapping between structure identifiers and sub-field paths. The mapping between structure identifiers and sub-field paths can be one-to-one or one-to-many.

[0050] Specifically, the structure identifier corresponding to the message to be parsed can be matched with the structure identifier in the second configuration file to determine the matched structure identifier. Based on the correspondence between structure identifiers and sub-field paths in the second configuration file, the sub-field path corresponding to the matched structure identifier is determined. For example, as shown in Table 3, the second configuration file for structure identifier 001 includes sub-field paths A1 and B1. The second configuration file also includes sub-field names; for instance, structure identifier 002 corresponds to sub-field C, and the path to sub-field C is sub-field path C1.

[0051] Table 3 Second Configuration File

[0052] Configuration Number Structural identifier Sub-field name Sub-column path Number 1 Structure 001 Sub-column A Sub-column path A1 Number 2 Structure 001 Sub-column B Sub-column path B1 Number 3 Structure 002 Sub-column C Sub-column path C1

[0053] S150. The attribute data extracted from the target code based on the at least one sub-field path is used as the field parsing result of the field to be parsed corresponding to the field path.

[0054] The field parsing result can be understood as the result obtained after extracting attribute data from the target code based on the sub-field path. The field to be parsed can be understood as the field in the message that needs to be parsed.

[0055] Specifically, for each sub-field path, the attribute data corresponding to that sub-field path in the target code can be determined. Then, data extraction processing can be performed on this attribute data. After the attribute data extraction is completed, at least one attribute data can be obtained. This obtained attribute data serves as the field parsing result for the field to be parsed corresponding to the field path.

[0056] Based on the above embodiments, after taking the attribute data extracted from the target code based on the at least one sub-field path as the field parsing result of the field to be parsed corresponding to the field path, the method may further include: when the message to be parsed corresponds to at least two field paths, concatenating the field parsing results corresponding to the at least two field paths to obtain the message parsing result of the message to be parsed.

[0057] Specifically, when the message to be parsed corresponds to at least two field paths, the field parsing results corresponding to the at least two field paths can be concatenated. This concatenated result is then obtained, which is the message parsing result of the message to be parsed.

[0058] Optionally, concatenating the parsing results corresponding to the at least two field paths can include: concatenating the parsing results corresponding to the at least two field paths based on a preset field concatenation method. The preset field concatenation method can be used to set the concatenation order of multiple field parsing results and the concatenation characters required (e.g., "+", "-", or ".").

[0059] The technical solution of this invention, through the correspondence between message identifiers and field paths, and the correspondence between field paths and structure identifiers in the first configuration file, can locate and extract the target code of the field to be parsed in the message to be parsed; through the correspondence between structure identifiers and sub-field paths in the second configuration file, at least one sub-field path corresponding to the structure identifier of the field to be parsed is determined, and all attribute data of the field to be parsed can be extracted from the target code based on the at least one sub-field path to obtain the field parsing result; the configuration information improves the flexibility of message parsing, enabling the parsing and processing of messages with different message structures, and improving the convenience of message processing.

[0060] Figure 2 This is a flowchart illustrating a message processing method provided in an embodiment of the present invention. This embodiment belongs to the same inventive concept as the message processing methods in the above embodiments, and further refines how to determine the field path corresponding to the message to be parsed. Technical terms that are the same as or corresponding to those in the above embodiments will not be repeated here.

[0061] like Figure 2 As shown, the message processing method of this embodiment includes the following steps:

[0062] S210. Obtain the message identifier of the message to be parsed.

[0063] In this embodiment of the invention, there are multiple ways to obtain the message identifier of the message to be parsed, and no specific limitation is made here. As an optional implementation of this embodiment, obtaining the message identifier of the message to be parsed may include: obtaining the message to be parsed. Then, the message to be parsed can be parsed. Thus, the message identifier of the message to be parsed can be obtained.

[0064] As another optional implementation of this invention, obtaining the message identifier of the message to be parsed may include: obtaining the message to be parsed; and then performing a hash calculation on the message content of the message to be parsed. This yields a hash value for the message to be parsed. The message identifier of the message to be parsed can then be generated based on the hash value.

[0065] S220. Based on the correspondence between message identifiers and field identifiers configured in the first configuration file, determine the field identifier of at least one field to be parsed corresponding to the message to be parsed.

[0066] Specifically, for each message identifier configured in the first configuration file, a consistency comparison can be performed between the message identifier in the first configuration file and the message identifier of the message to be parsed. This yields a comparison result. If the comparison result is consistent, the field identifier corresponding to the message identifier of the message to be parsed can be determined based on the correspondence between message identifiers and field identifiers in the first configuration file; that is, the field identifier corresponding to the message to be parsed can be determined. Furthermore, based on the field identifier corresponding to the message to be parsed, the field identifier of at least one field to be parsed corresponding to the message to be parsed can be determined.

[0067] In an embodiment of the invention, determining the field identifier of at least one field to be parsed corresponding to the message to be parsed, based on the field identifier corresponding to the message to be parsed, may include: determining at least one field to be parsed in the message to be parsed; and for each field to be parsed, determining the field identifier corresponding to the field to be parsed based on the correspondence between each field and the field identifier in the message to be parsed. Thus, the field identifier of at least one field to be parsed corresponding to the message to be parsed can be determined.

[0068] S230. Based on the correspondence between field identifiers and field paths configured in the first configuration file, determine the field paths corresponding to each field identifier, and use all the field paths as the field paths corresponding to the message to be parsed.

[0069] Specifically, for each field identifier corresponding to the message to be parsed, the field identifier can be compared with the field identifiers in the first configuration file. This yields a comparison result. If the comparison result is consistent, the field path corresponding to the consistent field identifier can be determined based on the correspondence between field identifiers and field paths configured in the first configuration file. This allows the determination of the field paths corresponding to each field identifier, thus obtaining all field paths. After obtaining all field paths, these paths can be used as the field paths corresponding to the message to be parsed.

[0070] Optionally, after obtaining all field paths, the corresponding field paths can be sorted and / or concatenated in the order of the fields in the message to be parsed, so as to improve the readability of the field paths corresponding to the message to be parsed.

[0071] S240. Determine the structure identifier corresponding to the field path based on the correspondence between the field path and the structure identifier in the first configuration file.

[0072] S250. Extract the corresponding code segment from the message to be parsed according to the field path to obtain the target code.

[0073] S260. Determine at least one sub-field path corresponding to the structure identifier according to the second configuration file, wherein the second configuration file is configured with the correspondence between the structure identifier and the sub-field path.

[0074] S270. The attribute data extracted from the target code based on the at least one sub-field path is used as the field parsing result of the field to be parsed corresponding to the field path.

[0075] The technical solution of this embodiment obtains the message identifier of the message to be parsed; determines the field identifier of at least one field to be parsed corresponding to the message to be parsed based on the correspondence between message identifiers and field identifiers in the first configuration file; determines the field path corresponding to each field identifier based on the correspondence between field identifiers and field paths in the first configuration file, and uses all the field paths as the field path corresponding to the message to be parsed. The technical solution of this embodiment achieves a relatively convenient and effective determination of the field path corresponding to the message to be parsed.

[0076] Figure 3 This is a flowchart illustrating a message processing method provided in an embodiment of the present invention. This embodiment belongs to the same inventive concept as the message processing methods in the above embodiments, and further refines how to determine the field path corresponding to the message to be parsed. Technical terms that are the same as or corresponding to those in the above embodiments will not be repeated here.

[0077] like Figure 3 As shown, the message processing method of this embodiment includes the following steps:

[0078] S310. Upon detecting a message parsing request, determine the message identifier of the message to be parsed corresponding to the message parsing request and the field identifier of at least one field to be parsed corresponding to the message identifier, and obtain the first configuration file.

[0079] A message parsing request can be understood as a request used to parse a message. A message parsing request may include the message identifier of the message to be parsed and the field identifiers of the corresponding fields to be parsed. Furthermore, a message parsing request may also include timestamp information to determine whether the message parsing request is valid.

[0080] Specifically, upon detecting a message parsing request, a first configuration file can be obtained, and the message request to be parsed can be parsed. This allows the acquisition of the message identifier of the message to be parsed and the field identifiers of at least one field to be parsed corresponding to the message identifier.

[0081] In this embodiment of the invention, obtaining the first configuration file may include: loading the first configuration file. After the first configuration file is loaded, it can be read, thereby obtaining the first configuration file.

[0082] In this embodiment of the invention, the method for obtaining a message parsing request can specifically be as follows: receiving a message parsing instruction input by a user; and then generating a message parsing request based on the message parsing instruction. This allows the message parsing request to be obtained. The message parsing instruction can be a piece of code used for message parsing.

[0083] S320. When it is detected that the first configuration file includes a field identifier of at least one field to be parsed corresponding to the message identifier, the field path corresponding to the field identifier of the at least one field to be parsed is determined according to the correspondence between the field identifier and the field path, and all the field paths are used as the field paths corresponding to the message to be parsed.

[0084] Specifically, when the first configuration file is detected to include at least one field identifier corresponding to the message identifier to be parsed, the field path corresponding to the field identifier of each field to be parsed can be determined based on the correspondence between field identifiers and field paths configured in the first configuration file. This allows the determination of the field paths corresponding to all field identifiers to be parsed, i.e., determining all field paths. After determining all field paths, these paths can be used as the field paths corresponding to the file to be parsed.

[0085] In this embodiment of the invention, the first configuration file contains configuration information for multiple field identifiers, which can be used to indicate that the field identifiers are available. The method may further include: determining whether the first configuration file includes field identifiers for at least one field to be parsed corresponding to the message identifier. Specifically, for each field to be parsed in the message parsing request, the field identifier for the field to be parsed can be determined. Then, the field identifiers for the fields to be parsed can be matched with multiple field identifiers in the first configuration file. If a field identifier for a field to be parsed is matched in the first configuration file, it can be determined whether the first configuration file contains configuration information for the field identifiers for the fields to be parsed. If it exists, it can be determined that the first configuration file includes field identifiers for at least one field to be parsed corresponding to the message identifier. If it does not exist, it can be determined that the first configuration file does not include field identifiers for at least one field to be parsed corresponding to the message identifier.

[0086] Optionally, the method further includes: when the first configuration file is found to lack one or more of the field identifiers of the at least one field to be parsed field of the message to be parsed, outputting a prompt message indicating that configuration information for the missing field identifier of the corresponding field to be parsed field is missing.

[0087] The prompt message can be used to indicate that the configuration information for the missing field identifiers of the corresponding fields to be parsed in the first configuration file is missing. There can be one or more prompt messages. In this embodiment of the invention, when there are multiple missing field identifiers corresponding to the fields to be parsed, the number of output prompt messages can be one or more.

[0088] If the first configuration file is missing one or more of the field identifiers of at least one field to be parsed in the message to be parsed, it can be understood that the configuration information for the field identifiers of one or more fields to be parsed is not configured in the first configuration file.

[0089] Specifically, if the first configuration file is found to be missing one or more of the field identifiers of at least one field to be parsed in the message to be parsed, the field identifier of the corresponding field to be parsed for the missing configuration information in the first configuration file can be determined. Then, based on the missing field identifier of the corresponding field to be parsed, a prompt message indicating the absence of the corresponding field identifier is generated. The prompt message can then be output.

[0090] In one embodiment, if there are multiple field identifiers for fields lacking configuration information in the first configuration file, a prompt message can be generated based on all the field identifiers lacking configuration information to indicate the absence of configuration information for the corresponding field identifiers for each field to be parsed.

[0091] In one embodiment, if there are multiple field identifiers for fields lacking configuration information in the first configuration file, a prompt message can be generated for each field identifier lacking configuration information, based on the field identifier, to indicate the lack of configuration information for that field identifier.

[0092] S330. Determine the structure identifier corresponding to the field path based on the correspondence between the field path and the structure identifier in the first configuration file.

[0093] S340. Extract the corresponding code segment from the message to be parsed according to the field path to obtain the target code.

[0094] S350. Determine at least one sub-field path corresponding to the structure identifier according to the second configuration file, wherein the second configuration file is configured with the correspondence between the structure identifier and the sub-field path.

[0095] S360. The attribute data extracted from the target code based on the at least one sub-field path is used as the field parsing result of the field to be parsed corresponding to the field path.

[0096] The technical solution of this embodiment, upon detecting a message parsing request, determines the message identifier of the message to be parsed corresponding to the message parsing request and the field identifier of at least one field to be parsed corresponding to the message identifier; upon detecting that the first configuration file includes the field identifier of at least one field to be parsed corresponding to the message identifier, it determines the field path corresponding to each of the at least one field to be parsed based on the correspondence between the field identifier and the field path; and it uses all the field paths as the field paths corresponding to the message to be parsed. The technical solution of this embodiment enables a more effective determination of the field paths corresponding to the message to be parsed.

[0097] Figure 4 This is a flowchart illustrating a message processing method provided in an embodiment of the present invention. This embodiment belongs to the same inventive concept as the message processing methods in the above embodiments, but adds a method for filtering the field parsing results to obtain field screening results. Technical terms that are the same as or corresponding to those in the above embodiments will not be repeated here.

[0098] like Figure 4 As shown, the message processing method of this embodiment includes the following steps:

[0099] S410. Determine the field path corresponding to the message to be parsed based on the correspondence between the message identifier and the field path in the first configuration file.

[0100] S420. Determine the structure identifier corresponding to the field path based on the correspondence between the field path and the structure identifier in the first configuration file.

[0101] S430. Extract the corresponding code segment from the message to be parsed according to the field path to obtain the target code.

[0102] S440. Determine at least one sub-field path corresponding to the structure identifier according to the second configuration file, wherein the second configuration file is configured with the correspondence between the structure identifier and the sub-field path.

[0103] S450. The attribute data extracted from the target code based on the at least one sub-field path is used as the field parsing result of the field to be parsed corresponding to the field path.

[0104] S460. Based on the pre-created correspondence between structure identifiers and screening model identifiers, determine the screening model identifier corresponding to the structure identifier.

[0105] The screening model identifier is used to distinguish different screening models. Screening models are used to filter the attribute data in the field parsing results. In practice, there are usually multiple screening models. The correspondence between the structure identifier and the screening model identifier can be one-to-one.

[0106] Specifically, the third configuration file pre-creates a correspondence between structure identifiers and screening model identifiers. After determining the structure identifier corresponding to the message to be parsed, a matching screening model identifier can be found from the pre-created correspondence between structure identifiers and screening model identifiers. For example, as shown in Table 4, when the structure identifier is 01, the corresponding screening model is the first screening model; when the structure identifier is 02, the corresponding screening model is the second screening model. In one embodiment, the third configuration file, as shown in Table 4, also includes model descriptions, such as the description content of the first screening model corresponding to the first screening model and the description content of the second screening model corresponding to the second screening model.

[0107] Table 4 Third Configuration File

[0108] Structural identifier Model Name Model Description Structure 01 First screening model Description of the first screening model Structure 02 Second screening model Description of the second screening model

[0109] S470. Assign each attribute data in the field parsing result to each attribute item of the screening model corresponding to the screening model identifier, so that the screening model completes the attribute screening operation of the field parsing result to obtain the field screening result.

[0110] The screening model can include multiple attribute items. These attribute items can be pre-configured. This allows for more flexible selection of the attribute data to be screened, enabling the extraction of necessary attribute data from the parsed message and yielding more complete information. The attribute items of the screening model can be used to screen attribute data in the field parsing results. The field screening result can be the result obtained after screening the attribute data of the field parsing results based on the screening model. Optionally, the field parsing result can include subject data, address data corresponding to the subject data, and country data, where the address data belongs to the country corresponding to the country data. For example, the subject data can be user identity information. The address data corresponding to the subject data can be the user's home address. The country data corresponding to the subject information can be the user's nationality.

[0111] Specifically, for each attribute data in the field parsing result, the attribute item corresponding to the attribute data in each attribute item of the screening model corresponding to the screening model identifier can be determined. Then, the attribute data can be assigned to the corresponding attribute item. Thus, the attribute screening operation of the field parsing result can be completed based on this screening model, thereby obtaining the field screening result.

[0112] In one embodiment, according to the fourth configuration file shown in Table 5, if the screening model is identified as model 01, and the field parsing result includes attribute A data, attribute B data, and attribute C data, then attribute A data is stored in attribute path A, attribute B data is stored in attribute path B, and attribute C data is stored in attribute path C.

[0113] Table 5 Fourth Configuration File

[0114] Model attribute item number Model Identifier Attribute Name Attribute path Model 01_001 Model 01 Attribute A Attribute path A Model 01_002 Model 01 Attribute B Attribute path B Model 01_003 Model 01 Attribute C Attribute path C Model 02_001 Model 02 Attribute D Attribute path D Model 02_002 Model 02 Attribute A Attribute path A Model 02_003 Model 02 Attribute B Attribute path B

[0115] In this embodiment of the invention, the screening model completes the screening operation of the field parsing results through the following steps, which may include: when the field parsing results include a subject identifier, performing subject matching between the subject identifier and at least two subject identifiers to be matched in the candidate matching list to obtain a first score for each subject identifier to be matched; deleting subject identifiers to be matched whose first score is lower than a first set threshold from the candidate matching list to obtain a first matching list.

[0116] The main data may include subject identifiers. Subject identifiers are used to distinguish different subjects. The candidate matching list may be a pre-configured data table for storing subject identifiers to be matched. In practical applications, the candidate matching list typically includes multiple subject identifiers to be matched. The first score may be the score obtained by matching the subject identifiers in the field parsing results with the subject identifiers to be matched in the candidate matching list. The first set threshold may be a pre-set score threshold based on actual needs. The first matching list may be a matching list obtained by deleting subject identifiers to be matched whose first score is lower than the first set threshold from the candidate matching list.

[0117] Specifically, when the field parsing result includes a subject identifier, the subject identifier can be matched with at least two subject identifiers in the candidate matching list. This yields multiple subject matching degree results. Then, based on a preset correspondence between subject matching degree results and scores, the score of each subject identifier to be matched can be determined, i.e., a first score for each subject identifier to be matched can be determined. For each first score, the first score can be compared with a first preset threshold. If the first score is lower than the first preset threshold, the subject identifier corresponding to the first score is deleted from the candidate matching list. This yields a first matching list.

[0118] Based on the above embodiments, the field screening result may further include at least one non-subject identifier data. That is, the field screening result may include a subject identifier and at least one non-subject identifier data. The step of deleting subject identifiers with scores lower than a first preset threshold from the candidate matching list to obtain a first matching list may include: deleting subject identifiers with scores lower than the first preset threshold and all attribute data corresponding to those subject identifiers from the candidate matching list, thereby obtaining the first matching list.

[0119] Based on the above embodiments, after obtaining the first matching list, the method may further include: matching the at least one non-subject identifier data with the at least one non-subject identifier data of each subject to be matched in the first matching list to obtain a second score for each subject to be matched; determining the total score of each subject to be matched based on the first score and the second score; and using the subject identifiers in the first matching list whose total score is higher than a second preset threshold as the second matching list.

[0120] The second score can be obtained by matching the non-subject identifier data in the field screening results with the corresponding non-subject identifier data of each subject to be matched in the first matching list. The second set threshold can be a preset score threshold. The second matching list can be a matching list obtained based on the subject identifiers in the first matching list whose total score is higher than the second set threshold.

[0121] In this embodiment of the invention, the at least one non-subject identifier data is matched with the at least one non-subject identifier data of each subject to be matched in the first matching list to obtain a second score for each subject to be matched. Specifically, for each subject to be matched in the first matching list, at least one non-subject identifier data of the subject to be matched can be determined; the at least one non-subject identifier data in the field screening result is matched with the at least one non-subject identifier data of the subject to be matched to obtain the matching result of each non-subject identifier data. Then, based on the matching result of each non-subject identifier data, the second score of the subject to be matched can be obtained.

[0122] In this embodiment of the invention, the total score of each subject to be matched is determined based on its first score and second score. The identifiers of subjects in the first matching list whose total scores are higher than a second preset threshold are used as the identifiers of subjects to be matched to a second matching list. Specifically, for each subject to be matched, the total score can be determined based on its first score and second score. Further, the total score and the second preset threshold can be compared. If the total score is higher than the second preset threshold, the second matching list can then be obtained based on the identifiers of subjects in the first matching list whose total scores are higher than the second preset threshold.

[0123] Optionally, a second matching list is obtained based on the identifiers of entities to be matched whose total score is higher than a second preset threshold in the first matching list, which may include:

[0124] The system identifies the remaining entity identifiers in the first matching list, excluding those with a total score higher than a second preset threshold, and designates them as entity identifiers to be deleted. These entity identifiers are then deleted. Here, "entity identifiers to be deleted" can be understood as any entity identifiers in the first matching list excluding those with a total score higher than the second preset threshold. The number of entity identifiers to be deleted can be one or more.

[0125] Based on the above embodiments, after obtaining the field screening result, the process may further include: when the message to be parsed corresponds to two fields to be parsed, the message screening result can be determined based on the field screening results of the at least two fields to be parsed. Specifically, when the message to be parsed corresponds to at least two fields to be parsed, the field screening results of each field to be parsed can be concatenated. This concatenated result is then obtained as the message screening result.

[0126] The technical solution of this embodiment determines the screening model identifier corresponding to the structure identifier based on the pre-created correspondence between structure identifiers and screening model identifiers; it then assigns the attribute data from the field parsing result to the attribute items of the screening model corresponding to the screening model identifier, so that the screening model completes the attribute screening operation of the field parsing result to obtain the field screening result. This embodiment achieves a more flexible and effective screening process for the attribute data in the field parsing result.

[0127] Figure 5 This is a schematic diagram of a message processing device provided in an embodiment of the present invention. Figure 5 As shown, the message processing device includes: a field path determination module 510, a target code determination module 520, a sub-field path determination module 530, and a parsing result determination module 540.

[0128] The system includes: a field path determination module 510, used to determine the field path corresponding to the message to be parsed based on the correspondence between message identifiers and field paths in a first configuration file; and to determine the structure identifier corresponding to the field path based on the correspondence between field paths and structure identifiers in the first configuration file; a target code determination module 520, used to extract corresponding code segments from the message to be parsed based on the field path to obtain target code; a sub-field path determination module 530, used to determine at least one sub-field path corresponding to the structure identifier based on a second configuration file, wherein the second configuration file is configured with the correspondence between structure identifiers and sub-field paths; and a parsing result determination module 540, used to take the attribute data extracted from the target code based on the at least one sub-field path as the field parsing result of the field to be parsed corresponding to the field path.

[0129] The technical solution of this invention, through the correspondence between message identifiers and field paths, and the correspondence between field paths and structure identifiers in the first configuration file, can locate and extract the target code of the field to be parsed in the message to be parsed; through the correspondence between structure identifiers and sub-field paths in the second configuration file, at least one sub-field path corresponding to the structure identifier of the field to be parsed is determined, and all attribute data of the field to be parsed can be extracted from the target code based on the at least one sub-field path to obtain the field parsing result; the configuration information improves the flexibility of message parsing, enabling the parsing and processing of messages with different message structures, and improving the convenience of message processing.

[0130] In some embodiments, the apparatus further includes a field parsing result splicing module, which is used to splice the field parsing results corresponding to at least two field paths when the attribute data extracted from the target code based on the at least one sub-field path is used as the field parsing result of the field to be parsed corresponding to the field path, so as to obtain the message parsing result of the message to be parsed.

[0131] In some embodiments, the first configuration file further configures the correspondence between message identifiers and field identifiers, and the correspondence between field identifiers and field paths; the field path determination module 510 is specifically used for: obtaining the message identifier of the message to be parsed; determining the field identifier of at least one field to be parsed corresponding to the message to be parsed according to the correspondence between the message identifier and the field identifier; determining the field path corresponding to each field identifier according to the correspondence between the field identifier and the field path, and using all the field paths as the field path corresponding to the message to be parsed.

[0132] In some embodiments, the first configuration file is configured with a correspondence between message identifiers and field identifiers, and a correspondence between field identifiers and field paths; the field path determination module 510 is specifically used for: when a message parsing request is detected, determining the message identifier of the message to be parsed corresponding to the message parsing request and the field identifier of at least one field to be parsed corresponding to the message identifier; when the first configuration file is detected to include the field identifier of at least one field to be parsed corresponding to the message identifier, determining the field paths corresponding to the field identifiers of the at least one field to be parsed according to the correspondence between the field identifiers and field paths; and using all the field paths as the field paths corresponding to the message to be parsed.

[0133] In some embodiments, the device further includes: a prompt information output module, configured to output a prompt information indicating that configuration information corresponding to the missing field identifier of the missing field is missing when the first configuration file is detected to be missing one or more of the field identifiers of the at least one field to be parsed field of the message to be parsed.

[0134] In some embodiments, the structure identifier is configured to correspond to at least two field paths.

[0135] In some embodiments, the device further includes a model determination module and a screening module; wherein the model determination module is used to determine the screening model identifier corresponding to the structure identifier based on the pre-created correspondence between the structure identifier and the screening model identifier; the screening module is used to assign each attribute data in the field parsing result to each attribute item of the screening model corresponding to the screening model identifier, so that the screening model completes the attribute screening operation of the field parsing result to obtain the field screening result.

[0136] In some embodiments, the field parsing result includes main data, address data corresponding to the main data, and country data, wherein the address corresponding to the address data belongs to the country corresponding to the country data.

[0137] In some embodiments, the screening module is specifically used to perform subject matching with at least two subject identifiers to be matched in the candidate matching list when the field parsing result includes a subject identifier, so as to obtain a first score for each subject identifier to be matched; and to delete subject identifiers to be matched whose first score is lower than a first set threshold from the candidate matching list to obtain a first matching list.

[0138] In some embodiments, the field screening result further includes at least one non-subject identifier data. The screening module is configured to delete subject identifiers to be matched whose first score is lower than a first preset threshold and all attribute data corresponding to the subject identifiers to be matched from the candidate matching list to obtain a first matching list; match the at least one non-subject identifier data with the at least one non-subject identifier data of each subject to be matched in the first matching list to obtain a second score of each subject to be matched; determine the total score of each subject to be matched based on the first score and the second score; and use the subject identifiers to be matched in the first matching list whose total score is higher than a second preset threshold as the second matching list.

[0139] In some embodiments, the apparatus further includes a message screening result module, which is used to determine a message screening result based on the field screening results of the at least two fields to be parsed when the field screening result is obtained and the message to be parsed corresponds to two fields to be parsed.

[0140] The task scheduling device provided in this application embodiment can be used to execute the technical solution of the task scheduling method in the above embodiment. Its implementation principle and technical effect are similar, and will not be described again here.

[0141] It should be noted that the division of the various modules in the above device is merely a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, these modules can be implemented entirely in software via processing element calls; they can be fully implemented in hardware; or some modules can be implemented by processing element calls to software, while others are implemented in hardware. For example, the field path determination module 510 can be a separate processing element, or it can be integrated into a chip in the above device. Alternatively, it can be stored as program code in the memory of the above device, and its function can be called and executed by a processing element of the above device. The implementation of other modules is similar. Moreover, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed through integrated logic circuits in the hardware of the processor element or through software instructions.

[0142] Figure 6 This is a schematic diagram of the structure of an electronic device 10 that can be used to implement embodiments of the present invention. The electronic device 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 can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0143] like Figure 6 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0144] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0145] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as message processing methods.

[0146] In some embodiments, the message processing method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the message processing method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the message processing method by any other suitable means (e.g., by means of firmware).

[0147] Various embodiments of the systems and techniques described above herein 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), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0148] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0149] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0150] 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 provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, 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 sound input, voice input, or tactile input).

[0151] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0152] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0153] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0154] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the message processing method provided in any embodiment of this application.

[0155] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0156] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A message processing method, characterized in that, include: The field path corresponding to the message to be parsed is determined based on the correspondence between the message identifier and the field path in the first configuration file. The structure identifier corresponding to the field path is determined according to the correspondence between the field path and the structure identifier in the first configuration file; wherein, the first configuration file also configures the correspondence between the message identifier and the field identifier, and the correspondence between the field identifier and the field path. The step of determining the field path corresponding to the message to be parsed includes: obtaining the message identifier of the message to be parsed; determining the field identifier of at least one field to be parsed corresponding to the message to be parsed according to the correspondence between the message identifier and the field identifier; determining the field path corresponding to each field identifier according to the correspondence between the field identifier and the field path, and taking all the field paths as the field path corresponding to the message to be parsed. Extract the corresponding code segment from the message to be parsed based on the field path to obtain the target code; The at least one sub-field path corresponding to the structure identifier is determined according to the second configuration file, wherein the second configuration file is configured with the correspondence between the structure identifier and the sub-field path; The attribute data extracted from the target code based on the at least one sub-field path is used as the field parsing result of the field to be parsed corresponding to the field path.

2. The method according to claim 1, characterized in that, After using the attribute data extracted from the target code based on the at least one sub-field path as the field parsing result for the field to be parsed corresponding to the field path, the method further includes: If the message to be parsed corresponds to at least two field paths, the field parsing results corresponding to the at least two field paths are concatenated to obtain the message parsing result of the message to be parsed.

3. The method according to claim 1, characterized in that, The first configuration file contains the mapping between message identifiers and field identifiers, as well as the mapping between field identifiers and field paths. Determining the field path corresponding to the message to be parsed includes: Upon detecting a message parsing request, determine the message identifier of the message to be parsed corresponding to the message parsing request and the field identifier of at least one field to be parsed corresponding to the message identifier. If the first configuration file is detected to include a field identifier of at least one field to be parsed corresponding to the message identifier, the field paths corresponding to the field identifiers of the at least one field to be parsed are determined according to the correspondence between the field identifiers and the field paths. All the field paths mentioned above are used as the field paths corresponding to the message to be parsed.

4. The method according to claim 3, characterized in that, Also includes: If the first configuration file is found to be missing one or more of the field identifiers of at least one field to be parsed in the message to be parsed, a prompt message is output to indicate that the configuration information for the missing field identifier of the corresponding field to be parsed is missing.

5. The method according to claim 1, characterized in that, The structure identifier is configured to correspond to at least two field paths.

6. The method according to claim 1, characterized in that, After using the attribute data extracted from the target code based on the at least one sub-field path as the field parsing result for the field to be parsed corresponding to the field path, the method further includes: Based on the pre-created correspondence between structure identifiers and screening model identifiers, the screening model identifier corresponding to the structure identifier is determined; The attribute data in the field parsing result is assigned to the attribute items of the screening model corresponding to the screening model identifier, so that the screening model completes the attribute screening operation of the field parsing result to obtain the field screening result.

7. The method according to claim 6, characterized in that, The field parsing result includes main data, address data corresponding to the main data, and country data, wherein the address corresponding to the address data belongs to the country corresponding to the country data.

8. The method according to claim 7, characterized in that, The screening model completes the screening operation of the field parsing results through the following steps: If the field parsing result includes a subject identifier, the subject identifier is matched with at least two subject identifiers to be matched in the candidate matching list to obtain a first score for each subject identifier to be matched. Remove the identifiers of entities to be matched whose first score is lower than the first set threshold from the candidate matching list to obtain the first matching list.

9. The method according to claim 8, characterized in that, The field screening result also includes at least one non-subject identifier data. The step of deleting subject identifiers whose first score is lower than a first set threshold from the candidate matching list to obtain the first matching list includes: Remove the identifiers of the entities to be matched whose first score is lower than the first set threshold and all attribute data corresponding to the entity identifiers to be matched from the candidate matching list to obtain the first matching list; The at least one non-subject identifier data is matched with the at least one non-subject identifier data of each subject to be matched in the first matching list to obtain a second score for each subject to be matched. The total score of each subject to be matched is determined based on the first score and the second score of each subject to be matched; The identifiers of entities to be matched in the first matching list whose total score is higher than the second set threshold are used as the second matching list.

10. The method according to any one of claims 6-9, characterized in that, After obtaining the column screening results, the process also includes: When there are two fields to be parsed in the message to be parsed, the message screening result is determined based on the field screening result of the at least two fields to be parsed.

11. A message processing apparatus, characterized in that, include: The field path determination module is used to determine the field path corresponding to the message to be parsed based on the correspondence between the message identifier and the field path in the first configuration file. The structure identifier corresponding to the field path is determined according to the correspondence between the field path and the structure identifier in the first configuration file; wherein, the first configuration file also configures the correspondence between the message identifier and the field identifier, and the correspondence between the field identifier and the field path. The step of determining the field path corresponding to the message to be parsed includes: obtaining the message identifier of the message to be parsed; determining the field identifier of at least one field to be parsed corresponding to the message to be parsed according to the correspondence between the message identifier and the field identifier; determining the field path corresponding to each field identifier according to the correspondence between the field identifier and the field path, and taking all the field paths as the field path corresponding to the message to be parsed. The target code determination module is used to extract the corresponding code segment from the message to be parsed according to the field path to obtain the target code; The sub-field path determination module is used to determine at least one sub-field path corresponding to the structure identifier according to the second configuration file, wherein the second configuration file is configured with the correspondence between the structure identifier and the sub-field path; The parsing result determination module is used to take the attribute data extracted from the target code based on the at least one sub-field path as the field parsing result of the field to be parsed corresponding to the field path.

12. The apparatus according to claim 11, characterized in that, Also includes: The model determination module is used to determine the screening model identifier corresponding to the structure identifier based on the pre-created correspondence between structure identifiers and screening model identifiers; The screening module is used to assign the attribute data in the field parsing result to the attribute items of the screening model corresponding to the screening model identifier, so that the screening model corresponding to the screening model identifier can complete the screening operation of the field parsing result to obtain the field screening result.

13. An electronic device, characterized in that, The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, implements the message processing method as described in any one of claims 1-10.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the message processing method as described in any one of claims 1-10.

15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the message processing method as described in any one of claims 1-10.

Citation Information

Patent Citations

  • Message processing method and device, electronic equipment and storage medium

    CN113395292A