CN116192999A - Message processing method, device, equipment, storage medium and program product - Google Patents

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

Info

Publication number
CN116192999A
CN116192999A CN202310199305.9A CN202310199305A CN116192999A CN 116192999 A CN116192999 A CN 116192999A CN 202310199305 A CN202310199305 A CN 202310199305A CN 116192999 A CN116192999 A CN 116192999A
Authority
CN
China
Prior art keywords
column
message
identifier
path
analyzed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310199305.9A
Other languages
Chinese (zh)
Inventor
余孟泽
陈云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202310199305.9A priority Critical patent/CN116192999A/en
Publication of CN116192999A publication Critical patent/CN116192999A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a message processing method, a message processing device, a message processing equipment, a message processing storage medium and a message processing program product. The invention relates to the technical field of communication. The method comprises the following steps: determining a column path corresponding to a message to be analyzed according to the corresponding relation between the message identifier in the first configuration file and the column path; determining a structure body identifier corresponding to the column position path according to the corresponding relation between the column position path and the structure body identifier in the first configuration file; extracting corresponding code paragraphs from the message to be analyzed according to the column path to obtain an object code; determining at least one sub-column path corresponding to the structure body identifier according to a second configuration file, wherein the second configuration file is configured with a corresponding relation between the structure body identifier and the sub-column path; and taking the attribute data extracted from the object code based on at least one sub-column path as a column analysis result of the column to be analyzed corresponding to the column path. The technical scheme of the invention can realize the analysis processing of the messages with different message structures.

Description

Message processing method, device, equipment, storage medium and program product
Technical Field
Embodiments of the present invention relate to the field of communications technologies, and in particular, to a method, an apparatus, a device, a storage medium, and a program product for processing a message.
Background
In the prior art, a corresponding Java object is created according to a message format, and then a JAXB (Java Architecture for XML binding, JAXB for short) tool is utilized to analyze the message. The message parsing mode belongs to a hard coding mode, when the message structure is changed, java objects are required to be modified according to the new message structure, then the Java objects are tested, the Java objects can be online after the test is passed, and the development flow is long.
In summary, the existing message parsing method at least has the problem that only the messages with the fixed message structure can be parsed.
Disclosure of Invention
The embodiment of the invention provides a message processing method, a device, equipment, a storage medium and a program product, which are used for solving the technical problem that only messages with fixed message structures can be analyzed.
In a first aspect, an embodiment of the present invention provides a method for processing a packet, including:
determining a column path corresponding to a message to be analyzed according to the corresponding relation between the message identifier in the first configuration file and the column path; determining a structure body identifier corresponding to the column path according to the corresponding relation between the column path and the structure body identifier in the first configuration file;
Extracting corresponding code paragraphs from the message to be analyzed according to the column path to obtain an object code;
determining at least one sub-column path corresponding to the structure body identifier according to a second configuration file, wherein the second configuration file is configured with a corresponding relation between the structure body identifier and the sub-column path;
and taking the attribute data extracted from the target code based on the at least one sub-column path as a column analysis result of a column to be analyzed corresponding to the column path.
In a second aspect, an embodiment of the present invention further provides a packet processing device, where the device includes:
the column path determining module is used for determining a column path corresponding to the message to be analyzed according to the corresponding relation between the message identifier in the first configuration file and the column path; determining a structure body identifier corresponding to the column path according to the corresponding relation between the column path and the structure body identifier in the first configuration file;
the object code determining module is used for extracting corresponding code paragraphs from the message to be analyzed according to the column path so as to obtain an object code;
the sub-column path determining module is used for determining at least one sub-column path corresponding to the structure body identifier according to a second configuration file, and the second configuration file is configured with a corresponding relation between the structure body identifier and the sub-column path;
And the analysis result determining module is used for taking the attribute data extracted from the target code based on the at least one sub-column path as a column analysis result of a column to be analyzed corresponding to the column path.
In a third aspect, an embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements a method for processing a packet according to any one of the embodiments of the present invention when the processor executes the program.
In a fourth aspect, an embodiment of the present invention further provides a computer readable storage medium, where a computer program is stored, where the program when executed by a processor implements a method for processing a message according to any one of the embodiments of the present invention.
In a fifth aspect, embodiments of the present invention further provide a computer program product comprising a computer program which, when executed by a processor, implements a method for processing a message according to any of the embodiments of the present invention.
According to the technical scheme, the object codes of the columns to be analyzed can be positioned and extracted in the messages to be analyzed through the corresponding relation between the message identifications and the column paths in the first configuration file and the corresponding relation between the column paths and the structure identifications; determining at least one sub-column path corresponding to the structure body identifier corresponding to the column to be analyzed according to the corresponding relation between the structure body identifier in the second configuration file and the sub-column path, and extracting all attribute data of the column to be analyzed from the target code according to the at least one sub-column path to obtain a column analysis result; the flexibility of message analysis is improved through each piece of configuration information, the analysis processing of the messages with different message structures can be completed, and the convenience of message processing is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a message processing method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a message processing method according to an embodiment of the present invention;
FIG. 3 is a flowchart of a message processing method according to an embodiment of the present invention;
FIG. 4 is a flowchart of a message processing method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a message processing apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only to distinguish the description, and are not to be construed as indicating or implying relative importance. The data acquisition, storage, use, processing and the like in the technical scheme meet the relevant regulations of national laws and regulations.
Fig. 1 is a flowchart of a message processing method according to an embodiment of the present invention. The embodiment of the invention can be suitable for the situation of processing the messages, in particular to the scene of processing the messages with different message structures. The method can be executed by a message processing device, and the device can be realized by software and/or hardware and is integrated into a computer device with an application development function.
As shown in fig. 1, the message processing method in the embodiment of the invention includes the following steps:
s110, determining a column path corresponding to the message to be analyzed according to the corresponding relation between the message identification and the column path in the first configuration file.
The message to be analyzed can be understood as a message needing to be analyzed. The data of the message to be parsed may be one or more. Under the condition that the number of the messages to be analyzed is multiple, the message structures of different messages to be analyzed can be the same or different. The message to be parsed may include one or more fields. In practical applications, the message to be parsed usually includes a plurality of fields. The field path may be used to extract a code segment of a corresponding field in the message, where the code segment may be used to store field content of the corresponding field. The message identification may be used to distinguish between different messages. The first configuration file can be understood as a file configured in advance for the corresponding relationship between the message identifier and the column path, and can be configured more flexibly for the corresponding relationship between the message identifier and the column path. One or more message identifications may be included in the first configuration file.
Specifically, a message to be analyzed is obtained, and a message identifier of the message to be analyzed is determined. And then the message identification of the message to be analyzed can be matched with the message identification in the first configuration file. So that the matched message identification can be determined. And then the column path corresponding to the matched message identification can be determined according to the corresponding relation between the message identification and the column path in the first configuration file. For example, the first configuration file may be shown in table 1, where the packet identifier 01 corresponds to the field path a, the packet identifier 02 corresponds to the field path B, and the packet identifier 03 corresponds to the field path C. When the message identifier of the message to be analyzed is the message identifier 02. At this time, the message identifier obtained by matching may be determined as the message identifier 02. Thus, according to the corresponding relation between the message identification and the column path in the first configuration file: the message identifier 02 corresponds to the field path B, and it can be determined that the field path corresponding to the matched message identifier is the field path B. After determining the column path corresponding to the message identifier obtained by matching, the column path corresponding to the message identifier obtained by matching can be used as the column path corresponding to the message to be analyzed.
TABLE 1 first Profile
Configuration numbering Message identification Column path Structure body mark
Number 1 Message identifier 01 Column path A Structure 001
Number 2 Message identification 02 Column path B Structure 001
Number 3 Message identification 03 Column path C Structure 002
S120, determining the structure body identifier corresponding to the column path according to the corresponding relation between the column path and the structure body identifier in the first configuration file.
Wherein the structure identification can distinguish between different structures. The structure of the structure may be predefined. The structure can be used to construct information needed for the message. It should be noted that, in the embodiment of the present invention, the structure body may be understood as a message component, that is, a message component is defined as a structure body. Alternatively, the structure identifier may be configured to correspond to at least two column paths. That is, one column path may correspond to one structural body identifier, and one structural body identifier may correspond to a plurality of column paths. In other words, different column paths may correspond to the same structure identification. In the embodiment of the invention, the first configuration file not only can be configured with the corresponding relation between the message identifier and the column path, but also can be configured with the corresponding relation between the column path and the structure identifier. The method has the advantage that the corresponding relation between the message identifier and the column path can be adjusted more flexibly, or the corresponding relation between the column path and the structure identifier can be adjusted.
Specifically, the column path of the message to be analyzed is matched with the column path in the first configuration file. So that the matched field path can be determined. And further, according to the corresponding relation between the column path and the structure body identifier in the first configuration file, the structure body identifier corresponding to the matched column path, that is, the structure body identifier corresponding to the message to be analyzed, is determined.
In one embodiment, as shown in table 2, the first configuration file, following the above example, corresponds to the field path and the structure identifier: the column path a corresponds to the structure identifier 001, the column path B corresponds to the structure identifier 001, and the column path C corresponds to the structure identifier 002. Therefore, in the case that the field path of the message to be parsed is the field path B, it can be determined that the structure body identifier matched with the field path B is 001.
The first configuration file further includes a structure name, a structure version number, and a structure description corresponding to each structure identifier, see table 2.
TABLE 2 first Profile
Figure BDA0004108489290000061
Figure BDA0004108489290000071
S130, extracting corresponding code paragraphs from the message to be analyzed according to the column path to obtain an object code.
The code segment may be understood as a part of the code in the message to be parsed. The object code may be understood as a code paragraph corresponding to a field path extracted from the message to be parsed.
Specifically, according to a column path corresponding to a message to be analyzed, determining a code paragraph corresponding to the column path in the message to be analyzed. And further the code segment can be extracted. Thereby obtaining the object code.
In the embodiment of the present invention, determining a code segment corresponding to the field path in the message to be parsed may include: presetting a corresponding relation between a column path and a code starting identifier. Further, according to the corresponding relation between the column path and the code starting identifier, the code starting identifier corresponding to the column path in the message to be analyzed can be determined; therefore, the code paragraph corresponding to the column path in the message to be analyzed can be determined based on the code starting identification.
Wherein the code start identifier can be used to distinguish between different field paths corresponding to code paragraphs. The code start identifier may include a code start identifier and a code end identifier. The code start identifier may be understood as a start flag of a code paragraph corresponding to a field path. The code endpoint identifier may be understood as an end flag of a field path corresponding to a code paragraph. In the embodiment of the present invention, a code segment corresponding to the field path in the message to be analyzed is determined based on the code start identifier, specifically, a code between the code start identifier and the code end identifier is used as the code segment corresponding to the field path in the message to be analyzed.
S140, determining at least one sub-column path corresponding to the structure body identifier according to a second configuration file, wherein the second configuration file is configured with a corresponding relation between the structure body identifier and the sub-column path.
Wherein the sub-field path may be used for attribute data extracted from the object code. For example, for a message in the financial field, the attribute data may be a service type, a service amount, a payment manner, or the like. The second configuration file may be understood as a file that is preset to configure the correspondence between the structure identifier and the sub-field path. The correspondence between the structure identifiers and the sub-field paths may be one-to-one or one-to-many.
Specifically, the structure body identifier corresponding to the message to be analyzed and the structure body identifier in the second configuration file can be matched, so that the matched structure body identifier can be determined. And determining a sub-column path corresponding to the matched structure body identifier according to the corresponding relation between the structure body identifier and the sub-column path in the second configuration file. For example, as shown in the second configuration file of table 3, the structure body identifies 001 to have a sub-field path A1 and a sub-field path B1 corresponding to the sub-field path. The second configuration file further includes a sub-field name, for example, the structure identifier 002 corresponds to a sub-field C, where the path of the sub-field C is a sub-field path C1.
TABLE 3 second Profile
Configuration numbering Structure body mark Sub-field name Sub-field path
Number 1 Structure 001 Sub-column A Sub-field path A1
Number 2 Structure 001 Sub-column B Sub-field path B1
Number 3 Structure 002 Sub-column C Sub-field path C1
And S150, taking the attribute data extracted from the target code based on the at least one sub-column path as a column analysis result of a column to be analyzed corresponding to the column path.
The field analysis result can be understood as a result obtained by extracting attribute data of the object code based on the sub-field path. The field to be parsed can be understood as a field to be parsed in the message to be parsed.
Specifically, for each sub-field path, attribute data corresponding to the sub-field path in the object code may be determined. And further, data extraction processing can be performed on the attribute data. After the extraction of the attribute data is completed, at least one attribute data may be obtained. And further, the obtained attribute data is used as a column analysis result of the column to be analyzed corresponding to the column path.
On the basis of the above embodiment, after the attribute data to be extracted from the object code based on the at least one sub-field path is used as a field parsing result of a field to be parsed corresponding to the field path, the method may further include: and under the condition that the message to be analyzed corresponds to at least two column paths, splicing column analysis results corresponding to the at least two column paths to obtain a message analysis result of the message to be analyzed.
Specifically, under the condition that the message to be analyzed corresponds to at least two column paths, column analysis results corresponding to the at least two column paths can be spliced. And obtaining the spliced result, namely, the message analysis result of the message to be analyzed.
Optionally, splicing the field analysis results corresponding to the at least two field paths may include: based on a preset column splicing mode, at least two column analysis results corresponding to the column paths are spliced. The preset field splicing mode can be used for setting the splicing sequence of the plurality of field analysis results and splicing symbols (such as "+", "-", or ".") required for splicing.
According to the technical scheme, the object codes of the columns to be analyzed can be positioned and extracted in the messages to be analyzed through the corresponding relation between the message identifications and the column paths in the first configuration file and the corresponding relation between the column paths and the structure identifications; determining at least one sub-column path corresponding to the structure body identifier corresponding to the column to be analyzed according to the corresponding relation between the structure body identifier in the second configuration file and the sub-column path, and extracting all attribute data of the column to be analyzed from the target code according to the at least one sub-column path to obtain a column analysis result; the flexibility of message analysis is improved through each piece of configuration information, the analysis processing of the messages with different message structures can be completed, and the convenience of message processing is improved.
Fig. 2 is a flowchart of a message processing method according to an embodiment of the present invention, where the embodiment and the message processing method in the foregoing embodiment belong to the same inventive concept, and how to determine a field path corresponding to a message to be parsed is further refined. Wherein, the technical terms identical to or corresponding to the above embodiments are not repeated herein.
As shown in fig. 2, the message processing method in the embodiment of the invention includes the following steps:
s210, obtaining a message identifier of the message to be analyzed.
In the embodiment of the present invention, there are various ways for obtaining the message identifier of the message to be parsed, which are not specifically limited herein. As an optional implementation manner of the embodiment of the present invention, obtaining a message identifier of a message to be parsed may include: and obtaining the message to be analyzed. And further, the message to be analyzed can be analyzed. Thus, the message identification of the message to be analyzed can be obtained.
As another optional implementation manner of the embodiment of the present invention, obtaining a message identifier of a message to be parsed may include: acquiring a message to be analyzed; and further, hash calculation can be performed on the message content of the message to be analyzed. Thus, the hash value of the message to be analyzed can be obtained. And then a message identifier of the message to be analyzed can be generated based on the hash value.
S220, determining the field identification of at least one field to be analyzed corresponding to the message to be analyzed according to the corresponding relation between the message identification and the field identification configured in the first configuration file.
Specifically, for each message identifier configured in the first configuration file, the message identifier in the first configuration file may be compared with the message identifier of the message to be analyzed in consistency. Thus, a comparison result can be obtained. Under the condition that the comparison result is consistent, the column identification corresponding to the message identification of the message to be analyzed can be determined according to the corresponding relation between the message identification and the column identification in the first configuration file, namely, the column identification corresponding to the message to be analyzed can be determined. And then, the column identification of at least one column to be analyzed corresponding to the message to be analyzed can be determined according to the column identification corresponding to the message to be analyzed.
In an embodiment of the present invention, determining, according to a field identifier corresponding to a message to be parsed, a field identifier of at least one field to be parsed corresponding to the message to be parsed may include: determining at least one column to be parsed of the message to be parsed; for each column to be analyzed, determining the column identification corresponding to the column to be analyzed according to the corresponding relation between each column and the column identification in the message to be analyzed. Thereby, the column identification of at least one column to be analyzed corresponding to the message to be analyzed can be determined.
S230, according to the corresponding relation between the column identifications and the column paths configured in the first configuration file, determining the column paths corresponding to the column identifications respectively, and taking all the column paths as the column paths corresponding to the message to be analyzed.
Specifically, for each field identifier corresponding to the message to be parsed, consistency comparison may be performed between the field identifier and each field identifier in the first configuration file. Thus, a comparison result can be obtained. And under the condition that the comparison result is consistent, determining the column path corresponding to the column identifier consistent with the comparison according to the corresponding relation between the column identifier configured in the first configuration file and the column path. Thereby, the column paths respectively corresponding to the column identifications can be determined. Thereby obtaining all column paths. After obtaining all the column paths, the column paths can be used as the column paths corresponding to the message to be analyzed.
Optionally, after all the column paths are obtained, the corresponding column paths can be sequentially sequenced and/or spliced according to the sequence of the columns in the message to be analyzed, so that the readability of the column paths corresponding to the message to be analyzed is improved.
S240, determining the structure body identifier corresponding to the column path according to the corresponding relation between the column path and the structure body identifier in the first configuration file.
S250, extracting corresponding code paragraphs from the message to be analyzed according to the column path to obtain an object code.
S260, determining at least one sub-column path corresponding to the structure body identifier according to a second configuration file, wherein the second configuration file is configured with the corresponding relation between the structure body identifier and the sub-column path.
S270, the attribute data extracted from the target code based on the at least one sub-column path is used as a column analysis result of a column to be analyzed corresponding to the column path.
According to the technical scheme, the message identification of the message to be analyzed is obtained; determining a column identifier of at least one column to be analyzed corresponding to the message to be analyzed according to the corresponding relation between the message identifier and the column identifier in the first configuration file; according to the corresponding relation between the column identifications and the column paths in the first configuration file, determining the column paths corresponding to the column identifications respectively, and taking all the column paths as the column paths corresponding to the message to be analyzed. The technical scheme of the embodiment realizes more convenient and effective determination of the column path corresponding to the message to be analyzed.
Fig. 3 is a flowchart of a message processing method according to an embodiment of the present invention, where the embodiment and the message processing method in the foregoing embodiment belong to the same inventive concept, and how to determine a field path corresponding to a message to be parsed is further refined. Wherein, the technical terms identical to or corresponding to the above embodiments are not repeated herein.
As shown in fig. 3, the message processing method in the embodiment of the invention includes the following steps:
s310, under the condition that a message analysis request is detected, determining a message identification of a message to be analyzed corresponding to the message analysis request and a field identification of at least one field to be analyzed corresponding to the message identification, and acquiring a first configuration file.
The message parsing request may be understood as a request for parsing a message. The message parsing request may include a message identifier of a message to be parsed and a field identifier of a field to be parsed corresponding to the message identifier. In addition, the message resolution request may also include timestamp information to facilitate determining whether the message resolution request is valid.
Specifically, under the condition that a message analysis request is detected, a first configuration file can be acquired, and the message request to be analyzed is analyzed. And then the message identification of the message to be analyzed and the column identification of at least one column to be analyzed corresponding to the message identification can be obtained.
In an embodiment of the present invention, obtaining the first configuration file may include: and loading the first configuration file. After the first configuration file is loaded, the first configuration file can be read. So that the first configuration file can be obtained.
In the embodiment of the present invention, the manner of obtaining the message parsing request may specifically be that a message parsing instruction input by a user is received; and then a message parsing request can be generated based on the message parsing instruction. Thereby, the message parsing request can be obtained. The message parsing instruction may be a section of code for message parsing.
S320, under the condition that the first configuration file comprises at least one column identifier of a column to be analyzed corresponding to the message identifier, determining column paths respectively corresponding to the column identifiers of the at least one column to be analyzed according to the corresponding relation between the column identifiers and the column paths, and taking all the column paths as the column paths corresponding to the message to be analyzed.
Specifically, when it is detected that the first configuration file includes at least one field identifier of the field to be resolved corresponding to the message identifier, the field identifier of each field to be resolved may be targeted, and a field path corresponding to the field identifier of the field to be resolved may be determined according to a correspondence between the field identifier configured in the first configuration file and the field path. And then the column paths corresponding to the column identifications of all the columns to be analyzed can be determined, namely, all the column paths are determined. After determining all the column paths, the column paths can be used as column paths corresponding to the file to be analyzed.
In the embodiment of the invention, the configuration information of a plurality of column identifiers is configured in the first configuration file, and the configuration information can be used for representing that the column identifiers can be used. The method may further comprise: and determining whether the first configuration file comprises a field identification of at least one field to be analyzed corresponding to the message identification. Specifically, for each field to be resolved in the message resolution request, a field identification of the field to be resolved may be determined. And then the field identification of the field to be analyzed and a plurality of field identifications in the first configuration file can be matched. Under the condition that the field identification of the field to be analyzed is matched in the first configuration file, whether the configuration information of the field identification of the field to be analyzed is configured in the first configuration file can be determined. If the message identification exists, the first configuration file can be determined to comprise the field identification of at least one field to be analyzed corresponding to the message identification. If the message identification does not exist, the first configuration file can be determined to not include the field identification of at least one field to be analyzed corresponding to the message identification.
Optionally, the method further comprises: outputting prompt information for indicating lack of configuration information corresponding to the field identification of the field to be analyzed under the condition that the first configuration file lacks one or more of the field identifications of the at least one field to be analyzed of the message to be analyzed is detected.
The prompt information may be used to prompt the first configuration file for lack of configuration information corresponding to a field identifier of a field to be parsed. The number of hints may be one or more. In the embodiment of the invention, under the condition that the number of the missing field identifications corresponding to the fields to be analyzed is a plurality of, the number of the output prompt messages can be one or a plurality of.
The absence of one or more of the field identifiers of the at least one field to be parsed of the message in the first configuration file may be understood as determining that the configuration information of the field identifier of the one or more fields to be parsed is not configured in the first configuration file.
Specifically, under the condition that the first configuration file lacks one or more of the field identifiers of the at least one field to be resolved of the message to be resolved, the field identifier of the corresponding field to be resolved of the configuration information lacking in the first configuration file can be determined. And generating prompt information for representing the lack of configuration information corresponding to the field identification of the field to be analyzed based on the lack of the field identification corresponding to the field to be analyzed. And further the prompt information can be output.
In one embodiment, when the number of field identifiers of the fields to be resolved, which lack configuration information, in the first configuration file is a plurality of, the prompt information for prompting that the configuration information corresponding to the field identifier of each field to be resolved is absent may be generated based on all the field identifiers which lack configuration information.
In one embodiment, when the number of field identifiers of the field to be parsed lacking configuration information in the first configuration file is a plurality of, a prompt message for prompting the configuration information lacking the field identifier may be generated for each field identifier lacking the configuration information based on the field identifier.
S330, determining the structure body identifier corresponding to the column path according to the corresponding relation between the column path and the structure body identifier in the first configuration file.
S340, extracting corresponding code paragraphs from the message to be analyzed according to the column path to obtain the target code.
S350, determining at least one sub-column path corresponding to the structure body identifier according to a second configuration file, wherein the second configuration file is configured with a corresponding relation between the structure body identifier and the sub-column path.
S360, the attribute data extracted from the target code based on the at least one sub-column path is used as a column analysis result of a column to be analyzed corresponding to the column path.
According to the technical scheme, under the condition that a message analysis request is detected, a message identification of a message to be analyzed corresponding to the message analysis request and a field identification of at least one field to be analyzed corresponding to the message identification are determined; under the condition that the first configuration file comprises at least one column identifier of a column to be analyzed corresponding to the message identifier, determining column paths respectively corresponding to the at least one column identifier of the column to be analyzed according to the corresponding relation between the column identifier and the column paths; and taking all the column paths as column paths corresponding to the message to be analyzed. The technical scheme of the embodiment can more effectively determine the column path corresponding to the message to be analyzed.
Fig. 4 is a flowchart of a message processing method according to an embodiment of the present invention, where the embodiment and the message processing method in the foregoing embodiment belong to the same inventive concept, and how to screen a field analysis result to obtain a field screening result is added. Wherein, the technical terms identical to or corresponding to the above embodiments are not repeated herein.
As shown in fig. 4, the message processing method in the embodiment of the invention includes the following steps:
S410, determining a column path corresponding to the message to be analyzed according to the corresponding relation between the message identification in the first configuration file and the column path.
S420, determining a structural body identifier corresponding to the column path according to the corresponding relation between the column path and the structural body identifier in the first configuration file.
S430, extracting corresponding code paragraphs from the message to be analyzed according to the column path to obtain the target code.
S440, determining at least one sub-column path corresponding to the structure body identifier according to a second configuration file, wherein the second configuration file is configured with the corresponding relation between the structure body identifier and the sub-column path.
S450, the attribute data extracted from the target code based on the at least one sub-column path is used as a column analysis result of a column to be analyzed corresponding to the column path.
S460, determining a screening model identifier corresponding to the structure body identifier according to a corresponding relation between the pre-established structure body identifier and the screening model identifier.
Wherein the screening model identification may be used to distinguish between different screening models. The screening model can be used for screening all attribute data in the column analysis result. In practical applications, the number of screening models is typically multiple. The correspondence between the structure identifiers and the screening model identifiers may be one-to-one.
Specifically, the correspondence between the structure body identifier and the screening model identifier, which are created in advance in the third configuration file. After determining the structure identifier corresponding to the message to be parsed, the structure identifier may be matched with the screening model identifier matched with the structure identifier from the corresponding relationship between the pre-created structure identifier and the screening model identifier, for example, as shown in table 4, in the case that the structure identifier is 01, the corresponding screening model is a first screening model, and in the case that the structure identifier is 02, the corresponding screening model is a second screening model. In one embodiment, the third profile as shown in Table 4 also includes model specifications, such as a first screening model description corresponding to a first screening model and a second screening model description corresponding to a second screening model.
TABLE 4 third Profile
Structure body mark Model name Description of the model
Structure 01 First screening model First screening model description content
Structure 02 Second screening model Second screening model description
S470, assigning each attribute data in the column analysis 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 column analysis result to obtain a column screening result.
Wherein the screening model may include a plurality of attribute terms. The attribute terms of the screening model may be preconfigured. The method has the advantages that the attribute data needing to be screened can be selected more flexibly, so that the required attribute data can be extracted from the message to be analyzed, and complete information can be extracted. The attribute items of the screening model can be used for screening the attribute data in the column analysis result. The column screening result can be a result obtained by screening the attribute data of the column analysis result based on a screening model. Optionally, the column analysis result may include main body data, address data corresponding to the main body data, and country data, where an address corresponding to the address data belongs to a country corresponding to the country data. For example, the subject data may be user identity information. The address data corresponding to the main body data may be a home address of the user. The country data corresponding to the subject information may be nationality of the user.
Specifically, for each attribute data in the column analysis result, an attribute item corresponding to the attribute data in each attribute item of the screening model corresponding to the screening model identification can be determined. And further, the attribute data can be assigned to attribute items corresponding to the attribute data. Therefore, the attribute screening operation of the column analysis result can be completed based on the screening model. And then a column screening result can be obtained.
In one embodiment, according to the fourth configuration file shown in table 5, if the screening model is identified as model 01, if the column parsing result includes attribute a data, attribute B data, and attribute C data, then the attribute a data is stored to attribute path a, the attribute B data is stored to attribute path B, and the attribute C data is stored to attribute path C.
TABLE 5 fourth Profile
Model attribute item numbering Model identification Attribute names 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
In the embodiment of the present invention, the screening operation of the column analysis result by the screening model is completed through the following steps, which may include: under the condition that the column analysis result comprises main body identifiers, carrying out main body matching on the main body identifiers and at least two main body identifiers to be matched in a candidate matching list so as to obtain a first score of each main body identifier to be matched; and deleting the main body identification to be matched with the first score lower than a first set threshold value from the candidate matching list to obtain a first matching list.
Wherein the subject data may include a subject identification. The subject identification may be used to distinguish between different subjects. The candidate matching list may be a pre-configured data table for storing subject identities to be matched. In practical applications, the candidate matching list typically includes a plurality of subject identities to be matched. The first score may be a score obtained by performing subject matching on the subject identifier in the column analysis result and the subject identifier to be matched in the candidate matching list. The first set threshold may be a score threshold preset according to actual requirements. The first matching list may be a matching list obtained by deleting the subject to be matched identifier with the first score lower than a first set threshold value from the candidate matching list.
Specifically, in the case that the column analysis result includes the subject identifier, the subject identifier may be subject to matching with at least two subject identifiers to be matched in the candidate matching list. Thus, a plurality of subject matching degree results can be obtained. And further, the score of each subject identifier to be matched can be determined based on the corresponding relation between the preset subject matching degree result and the score, that is, the first score of each subject identifier to be matched is determined. For each first score, the first score may be compared in magnitude to a first set threshold. And deleting the main body identification to be matched corresponding to the first score from the candidate matching list under the condition that the first score is lower than a first set threshold value. And then a first matching list may be obtained.
Based on the above embodiment, the field screening result may further include at least one item of non-subject identification data. That is, the field screening result may include a subject identification and at least one item of non-subject identification data. The deleting the subject identifier to be matched with the first score lower than the first set threshold from the candidate matching list to obtain a first matching list may include: and deleting the main body identification to be matched with the first score lower than a first set threshold value and all attribute data corresponding to the main body identification to be matched from the candidate matching list, so that a first matching list can be obtained.
On the basis of the above-described embodiments. After obtaining the first matching list, the method may further include: matching the at least one item of non-subject identification data with the at least one item of non-subject identification data of each subject to be matched in the first matching list respectively so as to obtain a second score of each subject to be matched; determining a total score of the main body to be matched according to the first score and the second score of each main body to be matched; and taking the main body identification to be matched, of which the total score is higher than a second set threshold value, in the first matching list as a second matching list.
The second score may be a score obtained by matching non-subject identification data in the column screening result with corresponding non-subject identification data of each subject to be matched in the first matching list. The second set threshold may be a score threshold that is preset. The second matching list may be a matching list obtained based on the to-be-matched subject identification with the total score higher than a second set threshold in the first matching list.
In the embodiment of the present invention, the at least one item of non-subject identification data is respectively matched with the at least one item of non-subject identification data of each subject to be matched in the first matching list, so as to obtain a second score of each subject to be matched, specifically, for each subject to be matched in the first matching list, at least one item of non-subject identification data of the subject to be matched may be determined; and respectively matching at least one item of non-main body identification data in the column screening result with at least one item of non-main body identification data of the main body to be matched, so that a matching result of each non-main body identification data can be obtained. And further, a second score of the main body to be matched can be obtained based on the matching result of the non-main body identification data.
In the embodiment of the invention, the total score of the main body to be matched is determined according to the first score and the second score of each main body to be matched; and taking the identification of the main body to be matched, the total score of which is higher than a second set threshold value, in the first matching list as a second matching list, wherein specifically, for each main body to be matched, the total score of the main body to be matched can be determined based on the first score and the second score of the main body to be matched. Further, the total score may be compared to a second set threshold. And under the condition that the total score is higher than a second set threshold value, obtaining a second matching list based on the main body identification to be matched, of which the total score is higher than the second set threshold value, in the first matching list.
Optionally, based on the identity of the subject to be matched with the total score in the first matching list being higher than a second set threshold, obtaining a second matching list may include:
determining main body identifiers to be matched except the main body identifiers to be matched, the total score of which is higher than a second set threshold value, in the first matching list, and taking the main body identifiers to be matched as main body identifiers to be deleted; and deleting the main body identifier to be deleted. The subject identifier to be deleted can be understood as the subject identifier to be matched except the subject identifier to be matched, of which the total score is higher than the second set threshold value, in the first matching list. The number of subject identities to be deleted may be one or more.
Based on the foregoing embodiment, after obtaining the column screening result, the method may further include: and under the condition that the message to be analyzed corresponds to two columns to be analyzed, determining a message screening result according to the column screening results of the at least two columns to be analyzed. Specifically, under the condition that the message to be analyzed corresponds to at least two columns to be analyzed, column screening results of the columns to be analyzed can be spliced. So that the splice result can be obtained. At this time, the spliced result is a message screening result.
According to the technical scheme of the embodiment, the screening model identification corresponding to the structure body identification is determined according to the corresponding relation between the pre-established structure body identification and the screening model identification; and assigning each attribute data in the column analysis 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 column analysis result to obtain a column screening result. According to the technical scheme, the screening processing of the attribute data in the column analysis result is more flexible and effective.
Fig. 5 is a schematic structural diagram of a message processing apparatus according to an embodiment of the present invention. As shown in fig. 5, the message processing apparatus includes: the system comprises a column path determining module 510, an object code determining module 520, a sub-column path determining module 530 and a parsing result determining module 540.
The column path determining module 510 is configured to determine a column path corresponding to a message to be parsed according to a correspondence between a message identifier in the first configuration file and the column path; determining a structure body identifier corresponding to the column path according to the corresponding relation between the column path and the structure body identifier in the first configuration file; the object code determining module 520 is configured to extract a corresponding code segment from the message to be parsed according to the field path, so as to obtain an object code; a sub-field path determining module 530, configured to determine at least one sub-field path corresponding to the structure identifier according to a second configuration file, where the second configuration file is configured with a correspondence between the structure identifier and the sub-field path; the parsing result determining module 540 is configured to use the attribute data extracted from the object code based on the at least one sub-field path as a field parsing result of a field to be parsed corresponding to the field path.
According to the technical scheme, the object codes of the columns to be analyzed can be positioned and extracted in the messages to be analyzed through the corresponding relation between the message identifications and the column paths in the first configuration file and the corresponding relation between the column paths and the structure identifications; determining at least one sub-column path corresponding to the structure body identifier corresponding to the column to be analyzed according to the corresponding relation between the structure body identifier in the second configuration file and the sub-column path, and extracting all attribute data of the column to be analyzed from the target code according to the at least one sub-column path to obtain a column analysis result; the flexibility of message analysis is improved through each piece of configuration information, the analysis processing of the messages with different message structures can be completed, and the convenience of message processing is improved.
In some embodiments, the apparatus further includes a field parsing result splicing module, configured to, after the attribute data to be extracted from the object code based on the at least one sub-field path is used as a field parsing result of a field to be parsed corresponding to the field path, splice field parsing results corresponding to at least two field paths when the message to be parsed corresponds to at least two field paths, so as to obtain a message parsing result of the message to be parsed.
In some embodiments, the first configuration file is further configured with a correspondence between a message identifier and a field identifier, and a correspondence between a field identifier and a field path; the column path determining module 510 is specifically configured to: acquiring a message identifier of a message to be analyzed; determining a column identifier of at least one column to be analyzed corresponding to the message to be analyzed according to the corresponding relation between the message identifier and the column identifier; and determining the column paths corresponding to the column identifiers respectively according to the corresponding relation between the column identifiers and the column paths, and taking all the column paths as the column paths corresponding to the message to be analyzed.
In some embodiments, the first configuration file is configured with a correspondence between a message identifier and a field identifier, and a correspondence between a field identifier and a field path; the column path determining module 510 is specifically configured to: under the condition that a message analysis request is detected, determining a message identifier of a message to be analyzed corresponding to the message analysis request and a column identifier of at least one column to be analyzed corresponding to the message identifier; under the condition that the first configuration file comprises at least one column identifier of a column to be analyzed corresponding to the message identifier, determining column paths respectively corresponding to the at least one column identifier of the column to be analyzed according to the corresponding relation between the column identifier and the column paths; and taking all the column paths as column paths corresponding to the message to be analyzed.
In some embodiments, the apparatus further comprises: the prompt information output module is used for outputting prompt information for indicating that the configuration information corresponding to the field identification of the field to be analyzed is absent under the condition that the first configuration file lacks one or more of the field identifications of the at least one field to be analyzed of the message to be analyzed.
In some embodiments, the structure identifier is configured to correspond to at least two column paths.
In some embodiments, the apparatus further comprises: the model determining module and the screening module; the model determining module is used for determining a screening model identifier corresponding to the structure body identifier according to a corresponding relation between the pre-established structure body identifier and the screening model identifier; and the screening module is used for assigning each attribute data in the column analysis result to each attribute item of the screening model corresponding to the screening model identifier so that the screening model can complete the attribute screening operation of the column analysis result to obtain a column screening result.
In some embodiments, the column parsing result includes main body data, address data corresponding to the main body data, and country data, the address corresponding to the address data being affiliated to a country corresponding to the country data.
In some embodiments, the screening module is specifically configured to, when the column analysis result includes a subject identifier, subject-match the subject identifier with at least two subject identifiers to be matched in the candidate matching list, so as to obtain a first score of each subject identifier to be matched; and deleting the main body identification to be matched with the first score lower than a first set threshold value from the candidate matching list to obtain a first matching list.
In some embodiments, the field screening result further includes at least one item of non-subject identification data, and the screening module is configured to delete, from the candidate matching list, the subject identification to be matched with the first score being lower than a first set threshold value and all attribute data corresponding to the subject identification to be matched, so as to obtain a first matching list; matching the at least one item of non-subject identification data with the at least one item of non-subject identification data of each subject to be matched in the first matching list respectively so as to obtain a second score of each subject to be matched; determining a total score of the main body to be matched according to the first score and the second score of each main body to be matched; and taking the main body identification to be matched, of which the total score is higher than a second set threshold value, in the first matching list as a second matching list.
In some embodiments, the apparatus further includes a message screening result module, configured to determine, after the obtaining a field screening result, a message screening result according to the field screening results of the at least two fields to be resolved if the message to be resolved corresponds to the two fields to be resolved.
The task scheduling device provided in the embodiment of the present application may be used to execute the technical scheme of the task scheduling method in the above embodiment, and its implementation principle and technical effect are similar, and are not repeated here.
It should be noted that, it should be understood that the division of the modules of the above apparatus is merely a division of a logic function, and may be fully or partially integrated into a physical entity or may be physically separated. And these modules may all be implemented in software in the form of calls by the processing element; or can be realized in hardware; the method can also be realized in a form of calling software by a processing element, and the method can be realized in a form of hardware by a part of modules. For example, the column path determining module 510 may be a processing element that is set up separately, may be implemented in a chip of the above apparatus, or may be stored in a memory of the above apparatus in the form of program codes, and may be called by a processing element of the above apparatus to execute the functions of the column path determining module 510. The implementation of the other modules is similar. In addition, all or part of the modules can be integrated together or can be independently implemented. The processing element here may be an integrated circuit with signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in a software form.
Fig. 6 is a schematic diagram of an electronic device 10 that may be used to implement an embodiment of the present invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, 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 meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 6, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having 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 specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as message processing methods.
In some embodiments, the message processing method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. One or more of the steps of the message processing method described above may be performed when the computer program is loaded into RAM 13 and executed by processor 11. Alternatively, in other embodiments, the processor 11 may be configured to perform the message processing method in any other suitable way (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out 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, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here 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 a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The embodiments of the present invention also provide a computer program product comprising a computer program which, when executed by a processor, implements a message processing method as provided in any of the embodiments of the present application.
Computer program product in the implementation, the computer program code for carrying out operations of the present invention may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (16)

1. A method for processing a message, comprising:
determining a column path corresponding to a message to be analyzed according to the corresponding relation between the message identifier in the first configuration file and the column path; determining a structure body identifier corresponding to the column path according to the corresponding relation between the column path and the structure body identifier in the first configuration file;
extracting corresponding code paragraphs from the message to be analyzed according to the column path to obtain an object code;
determining at least one sub-column path corresponding to the structure body identifier according to a second configuration file, wherein the second configuration file is configured with a corresponding relation between the structure body identifier and the sub-column path;
And taking the attribute data extracted from the target code based on the at least one sub-column path as a column analysis result of a column to be analyzed corresponding to the column path.
2. The method according to claim 1, wherein after the attribute data extracted from the object code based on the at least one sub-field path is used as a field parsing result of a field to be parsed corresponding to the field path, further comprising:
and under the condition that the message to be analyzed corresponds to at least two column paths, splicing column analysis results corresponding to the at least two column paths to obtain a message analysis result of the message to be analyzed.
3. The method of claim 1, wherein the first configuration file is further configured with a correspondence between a message identifier and a field identifier, and a correspondence between a field identifier and a field path, and the determining a field path corresponding to the message to be parsed includes:
acquiring a message identifier of a message to be analyzed;
determining a column identifier of at least one column to be analyzed corresponding to the message to be analyzed according to the corresponding relation between the message identifier and the column identifier;
And determining the column paths corresponding to the column identifiers respectively according to the corresponding relation between the column identifiers and the column paths, and taking all the column paths as the column paths corresponding to the message to be analyzed.
4. The method of claim 1, wherein the first configuration file is configured with a correspondence between a message identifier and a field identifier, and a correspondence between a field identifier and a field path, and the determining the field path corresponding to the message to be parsed includes:
under the condition that a message analysis request is detected, determining a message identifier of a message to be analyzed corresponding to the message analysis request and a column identifier of at least one column to be analyzed corresponding to the message identifier;
under the condition that the first configuration file comprises at least one column identifier of a column to be analyzed corresponding to the message identifier, determining column paths respectively corresponding to the at least one column identifier of the column to be analyzed according to the corresponding relation between the column identifier and the column paths;
and taking all the column paths as column paths corresponding to the message to be analyzed.
5. The method as recited in claim 4, further comprising:
Outputting prompt information for indicating lack of configuration information corresponding to the field identification of the field to be analyzed under the condition that the first configuration file lacks one or more of the field identifications of the at least one field to be analyzed of the message to be analyzed is detected.
6. The method of claim 1, wherein the structure identifier is configured to correspond to at least two column paths.
7. The method according to claim 1, wherein after the attribute data extracted from the object code based on the at least one sub-field path is used as a field parsing result of a field to be parsed corresponding to the field path, further comprising:
determining a screening model identifier corresponding to a structure identifier according to a corresponding relation between the pre-established structure identifier and the screening model identifier;
and assigning each attribute data in the column analysis 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 column analysis result to obtain a column screening result.
8. The method of claim 7, wherein the step of determining the position of the probe is performed,
The column analysis result comprises main body data, address data corresponding to the main body data and country data, wherein the address corresponding to the address data belongs to the country corresponding to the country data.
9. The method of claim 8, wherein the screening model performs the screening of the column resolution results by:
under the condition that the column analysis result comprises main body identifiers, carrying out main body matching on the main body identifiers and at least two main body identifiers to be matched in a candidate matching list so as to obtain a first score of each main body identifier to be matched;
and deleting the main body identification to be matched with the first score lower than a first set threshold value from the candidate matching list to obtain a first matching list.
10. The method of claim 9, wherein the field screening result further includes at least one item of non-subject identification data, and the deleting subject identifications to be matched having the first score lower than a first set threshold from the candidate matching list to obtain a first matching list includes:
deleting the main body identification to be matched with the first score lower than a first set threshold value and all attribute data corresponding to the main body identification to be matched from the candidate matching list to obtain a first matching list;
Matching the at least one item of non-subject identification data with the at least one item of non-subject identification data of each subject to be matched in the first matching list respectively so as to obtain a second score of each subject to be matched;
determining a total score of the main body to be matched according to the first score and the second score of each main body to be matched;
and taking the main body identification to be matched, of which the total score is higher than a second set threshold value, in the first matching list as a second matching list.
11. The method according to any one of claims 7-10, further comprising, after obtaining the field screening result:
and under the condition that the message to be analyzed corresponds to two columns to be analyzed, determining a message screening result according to the column screening results of the at least two columns to be analyzed.
12. A message processing apparatus, comprising:
the column path determining module is used for determining a column path corresponding to the message to be analyzed according to the corresponding relation between the message identifier in the first configuration file and the column path; determining a structure body identifier corresponding to the column path according to the corresponding relation between the column path and the structure body identifier in the first configuration file;
The object code determining module is used for extracting corresponding code paragraphs from the message to be analyzed according to the column path so as to obtain an object code;
the sub-column path determining module is used for determining at least one sub-column path corresponding to the structure body identifier according to a second configuration file, and the second configuration file is configured with a corresponding relation between the structure body identifier and the sub-column path;
and the analysis result determining module is used for taking the attribute data extracted from the target code based on the at least one sub-column path as a column analysis result of a column to be analyzed corresponding to the column path.
13. The apparatus as recited in claim 12, further comprising:
the model determining module is used for determining a screening model identifier corresponding to the structure body identifier according to the corresponding relation between the pre-established structure body identifier and the screening model identifier;
and the screening module is used for assigning each attribute data in the column analysis result to each attribute item 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 column analysis result to obtain the column screening result.
14. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable by the processor, wherein the processor implements the message processing method according to any of claims 1-11 when executing the computer program.
15. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the message processing method according to any of claims 1-11.
16. A computer program product comprising a computer program which, when executed by a processor, implements the message processing method according to any of claims 1-11.
CN202310199305.9A 2023-02-28 2023-02-28 Message processing method, device, equipment, storage medium and program product Pending CN116192999A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310199305.9A CN116192999A (en) 2023-02-28 2023-02-28 Message processing method, device, equipment, storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310199305.9A CN116192999A (en) 2023-02-28 2023-02-28 Message processing method, device, equipment, storage medium and program product

Publications (1)

Publication Number Publication Date
CN116192999A true CN116192999A (en) 2023-05-30

Family

ID=86450445

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310199305.9A Pending CN116192999A (en) 2023-02-28 2023-02-28 Message processing method, device, equipment, storage medium and program product

Country Status (1)

Country Link
CN (1) CN116192999A (en)

Similar Documents

Publication Publication Date Title
CN112506581A (en) Method and device for rendering small program, electronic equipment and readable storage medium
CN115576828A (en) Test case generation method, device, equipment and storage medium
CN115048352B (en) Log field extraction method, device, equipment and storage medium
CN116303013A (en) Source code analysis method, device, electronic equipment and storage medium
CN116126719A (en) Interface testing method and device, electronic equipment and storage medium
CN116192999A (en) Message processing method, device, equipment, storage medium and program product
CN114722401A (en) Equipment safety testing method, device, equipment and storage medium
CN113742501A (en) Information extraction method, device, equipment and medium
CN116070601B (en) Data splicing method and device, electronic equipment and storage medium
CN114281981B (en) News brief report generation method and device and electronic equipment
CN113360407B (en) Function positioning method and device, electronic equipment and readable storage medium
CN116954689A (en) Identification generation and identification verification methods, devices, electronic equipment and storage medium
CN117609064A (en) Unit test method and device, electronic equipment and storage medium
CN117609625A (en) Data processing method, device, electronic equipment and storage medium
CN112948246A (en) AB test control method, device, equipment and storage medium of data platform
CN117951542A (en) Method and device for processing signboard data, electronic equipment and storage medium
CN116719719A (en) Test method, test device, electronic equipment and storage medium
CN115567624A (en) Message processing method and device, electronic equipment and medium
CN117056222A (en) Interface test file generation method and device, electronic equipment and storage medium
CN115859300A (en) Vulnerability detection method and device, electronic equipment and storage medium
CN113535857A (en) Data synchronization method and device
CN114328224A (en) Method and device for reproducing exception request, electronic equipment and storage medium
CN116340097A (en) Method, device, equipment and storage medium for processing abnormal information
CN116010744A (en) Page data processing method and device, electronic equipment and readable storage medium
CN117251196A (en) Data maintenance method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination