Message processing method and device
By preprocessing and identifying model processing of transaction messages, and correcting tags based on attribute information of element items, the problem of accuracy and efficiency of non-standardized message processing in online transactions is solved, the accurate construction of structured data is achieved, and the cost is reduced. Human resource consumption.
Patent Information
- Application Number
- CN202410880376.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-07-02
AI Technical Summary
In online trading scenarios, the processing of non-standardized transaction messages involves high human resource consumption and error problems. It is difficult to achieve accurate element extraction and attribute definition, which affects the efficiency and accuracy of the trading system.
By obtaining the transaction messages associated with the target transaction business, pre-processing them according to preset rules, generating transaction message characteristics, and inputting the message recognition model for processing, initially identifying the element item tags, making corrections based on the element item attribute information, and finally constructing Target structured data.
It achieves accurate element extraction and attribute definition of non-standardized transaction messages, reduces human resource consumption, improves the accuracy and efficiency of transaction processing, and ensures the accuracy of downstream business.
Smart Images

Figure CN118410342B
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the technical field of message processing, and in particular to a message processing method and device. Background Art
[0002] With the development of computer technology, more and more businesses are going online, especially in trading scenarios. Online operations can make it easier for customers to perform any form of trading operations. As online trading matures, some abnormal trading behaviors also occur; for example, the customer's corresponding trading process communicates the transaction content through instant messaging software, and then enters the instructions through the trading system to complete the transaction operation corresponding to the customer. Since the daily trading volume corresponding to these customers is large, and the transaction content involved in each transaction may have a large number of elements, if it is entered manually, it will consume a lot of human resources, and there will be errors in manual entry. Therefore, an effective solution is urgently needed to solve the above problems. Summary of the invention
[0003] In view of this, an embodiment of this specification provides a message processing method. One or more embodiments of this specification also relate to a message processing device, a computing device, a computer-readable storage medium and a computer program product to solve the technical defects existing in the prior art.
[0004] According to a first aspect of an embodiment of this specification, a message processing method is provided, including:
[0005] Acquire a transaction message associated with the target transaction business, and pre-process the transaction message according to a preset message processing rule to obtain a transaction message feature corresponding to the transaction message;
[0006] Inputting the transaction message features into a message recognition model for processing to obtain element item prediction labels corresponding to the element items contained in the transaction message;
[0007] Determining element item attribute information of the element item relative to the transaction message, and updating the element item prediction label to the element item label according to the element item attribute information;
[0008] Target structured data matching the target transaction business is constructed based on the element items and the element item tags.
[0009] According to a second aspect of an embodiment of this specification, a message processing device is provided, including:
[0010] An acquisition module is configured to acquire a transaction message associated with a target transaction business, and pre-process the transaction message according to a preset message processing rule to obtain a transaction message feature corresponding to the transaction message;
[0011] A processing module is configured to input the transaction message features into a message recognition model for processing, and obtain a predicted element item label corresponding to the element item included in the transaction message;
[0012] an updating module, configured to determine the element item attribute information of the element item relative to the transaction message, and update the element item prediction label to the element item label according to the element item attribute information;
[0013] A construction module is configured to construct target structured data matching the target transaction business based on the element items and the element item tags.
[0014] According to a third aspect of an embodiment of this specification, a computing device is provided, including:
[0015] Memory and processor;
[0016] The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the above-mentioned message processing method are implemented.
[0017] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the above-mentioned message processing method are implemented.
[0018] According to a fifth aspect of the embodiments of this specification, a computer program product is provided, including a computer program or instructions, which implement the steps of the above-mentioned message processing method when executed by a processor.
[0019] The message processing method provided in this embodiment can accurately extract the element items contained in the message and define the attributes of the element items for the non-standardized transaction messages involved in the target transaction business, so as to facilitate subsequent use in the transaction system; the transaction message associated with the target transaction business can be first obtained, and the transaction message can be pre-processed according to the preset message processing rules, so that the transaction message is first processed with the transaction message features that can be recognized and processed by the model, and then the transaction message features are input into the message recognition model for processing, so that the element item prediction labels corresponding to the element items contained in the transaction message can be preliminarily identified through the message recognition model; after obtaining the element item prediction labels corresponding to each element item, considering the problem of model prediction accuracy, there may be prediction errors, in order to avoid the influence of this error, the element item prediction labels can be corrected, and in order to ensure the correction accuracy, the element item attribute information of the element item relative to the transaction message can be determined, and then the element item prediction labels can be updated to element item labels according to the element item attribute information, so that when the element item prediction labels are updated, they can be combined with the attributes of the element item relative to the transaction message text, so as to achieve the correction purpose. Finally, the target structured data matching the target transaction business can be constructed based on the elements and element item labels, so that the target transaction business can use the structured data corresponding to the transaction message, thereby ensuring the accuracy of business processing, making it more convenient for downstream businesses to use, and reducing the consumption of human resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is a schematic diagram of a message processing method provided by an embodiment of this specification;
[0021] Figure 2 is a flow chart of a message processing method provided by an embodiment of this specification;
[0022] Figure 3 is a flow chart of a message processing method provided by an embodiment of this specification;
[0023] Figure 4 It is a structural schematic diagram of a message processing device provided by an embodiment of this specification;
[0024] Figure 5 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION
[0025] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.
[0026] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0027] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0028] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0029] In this specification, a message processing method is provided. This specification also relates to a message processing device, a computing device, a computer-readable storage medium and a computer program product, which are described in detail one by one in the following embodiments.
[0030] See also Figure 1As shown in the schematic diagram, the message processing method provided in this embodiment can accurately extract the element items contained in the message and define the attributes of the element items for the non-standardized transaction message involved in the target transaction business, so as to be used in the transaction system later; the transaction message associated with the target transaction business can be first obtained, and the transaction message can be pre-processed according to the preset message processing rules, so that the transaction message is first processed with the transaction message features that can be recognized and processed by the model, and then the transaction message features are input into the message recognition model for processing, so that the element item prediction labels corresponding to the element items contained in the transaction message can be preliminarily identified through the message recognition model; after obtaining the element item prediction labels corresponding to each element item, considering the problem of model prediction accuracy, there may be prediction errors, in order to avoid the influence of this error, the element item prediction labels can be corrected, and in order to ensure the correction accuracy, the element item attribute information of the element item relative to the transaction message can be determined, and then the element item prediction labels can be updated to element item labels according to the element item attribute information, so that when the element item prediction labels are updated, they can be combined with the attributes of the element item relative to the transaction message text, so as to achieve the correction purpose. Finally, the target structured data matching the target transaction business can be constructed based on the elements and element item labels, so that the target transaction business can use the structured data corresponding to the transaction message, thereby ensuring the accuracy of business processing, making it more convenient for downstream businesses to use, and reducing the consumption of human resources.
[0031] See also Figure 2 , Figure 2 A flow chart of a message processing method provided according to an embodiment of the present specification is shown, which specifically includes the following steps.
[0032] Step S202, obtaining a transaction message associated with the target transaction business, and preprocessing the transaction message according to a preset message processing rule to obtain a transaction message feature corresponding to the transaction message.
[0033] The message processing method provided in this embodiment can be applied to any scenario where standardized processing of transaction messages is performed, wherein the transaction message specifically refers to the text content of the transaction process involved in the user communicated through the instant messaging software, and the text content includes the transaction content. Correspondingly, the target transaction business specifically refers to the transaction business to which the currently acquired transaction message belongs, such as securities trading business, fund trading business, etc., and this embodiment does not make any limitation here.
[0034] Accordingly, the message processing rules specifically refer to the rules for preprocessing transaction messages. The rules can not only perform preliminary standardization on transaction messages, but also convert transaction messages into transaction message features that can fully express the transaction content, so that after the subsequent input into the message recognition model, the model can more accurately identify the elements in the transaction message. Accordingly, the transaction message feature is the vector expression obtained after preprocessing the transaction message.
[0035] Based on this, in order to be able to target the non-standardized transaction messages involved in the target transaction business, the elements contained in the message can be accurately extracted and the attributes of the element items can be defined for subsequent use in the transaction system; the transaction message associated with the target transaction business can be first obtained, and the transaction message can be pre-processed according to the preset message processing rules, so that the transaction message is first processed with the transaction message features that can be recognized and processed by the model, and then the transaction message features are input into the message recognition model for processing, so that the element item prediction labels corresponding to the element items contained in the transaction message can be preliminarily identified through the message recognition model; after obtaining the element item prediction labels corresponding to each element item, considering the model prediction accuracy problem, there may be prediction errors. In order to avoid the impact of this error, the element item prediction labels can be corrected. In order to ensure the correction accuracy, the element item attribute information of the element item relative to the transaction message can be determined. After that, the element item prediction label can be updated to the element item label according to the element item attribute information, so that when the element item prediction label is updated, it can be combined with the attributes of the element item relative to the transaction message text, so as to achieve the correction purpose. Finally, target structured data matching the target transaction business can be constructed based on the elements and element item labels.
[0036] Furthermore, when preprocessing the transaction message according to the preset message processing rules, in order to ensure that the transaction message features finally obtained can reflect the core transaction content corresponding to the transaction message, the transaction message can be first converted into a target transaction message, and then the feature construction operation can be performed. In this embodiment, the specific implementation method is as follows:
[0037] The transaction message is subjected to character filtering processing according to a preset message processing rule, and an initial transaction message is generated according to the character filtering processing result; an initial message keyword contained in the initial transaction message is adjusted to obtain an intermediate transaction message; a keyword position corresponding to an intermediate message keyword contained in the intermediate transaction message is determined, and a target character is added to the intermediate transaction message according to the keyword position to obtain a target transaction message; and a transaction message feature is constructed based on the target transaction message.
[0038] Specifically, character filtering specifically refers to the operation of filtering characters in the transaction message that are irrelevant to the transaction content and are easy to affect, such as invalid characters and interference characters; accordingly, the initial transaction message is the transaction message obtained after removing invalid characters and interference characters. Among them, the characters to be filtered include but are not limited to exclamation marks, question marks, spaces, etc., and this embodiment does not make any restrictions here. Accordingly, keyword adjustment specifically refers to the processing of adjusting the initial message keywords in the initial transaction message. The adjustment can be understood as adjusting the initial message keywords to a standardized expression, such as adjusting 20** year ** month ** day to the format of 20**.**.**; or adjusting two days to 2 days, etc., and this embodiment does not make any restrictions here. Accordingly, the intermediate transaction message specifically refers to the transaction message obtained after the initial message keyword adjustment. Accordingly, the keyword position specifically refers to the problem where the intermediate message keywords contained in the intermediate transaction message are located, and accordingly, the target character specifically refers to the character added in the intermediate transaction message to separate each intermediate message keyword, which can be a semicolon, exclamation mark, etc. Correspondingly, the target transaction message specifically refers to a transaction message obtained by adding target characters according to the keyword text in the intermediate transaction message.
[0039] Based on this, after obtaining the transaction message, in order to facilitate the subsequent processing into structured data, the transaction message can be pre-processed according to the preset message processing rules. At this time, the transaction message can be firstly subjected to character filtering processing according to the preset message processing rules to generate an initial transaction message according to the character filtering processing results; thereafter, the initial message keywords contained in the initial transaction message can be adjusted to obtain an intermediate transaction message; then, in order to facilitate the subsequent model to identify the labels corresponding to the element items in the message, the keyword positions corresponding to the intermediate message keywords contained in the intermediate transaction message can be determined, and then the target characters can be added to the intermediate transaction message according to the keyword positions to obtain the target transaction message; finally, the transaction message features are constructed based on the target transaction message, and used for the element item identification of the model.
[0040] In summary, when preprocessing transaction messages, in order to generate transaction message features that fully reflect the transaction content, character filtering, keyword adjustment, and character addition processing can be performed on the transaction messages, so as to obtain standardized target transaction messages and then construct features to ensure the accuracy of feature construction.
[0041] Furthermore, when constructing transaction message features, in order to fully reflect the transaction content involved in the transaction message through the features so as to improve the accuracy of subsequent identification of elements in the transaction message, the construction can be completed by combining keyword features and sequence features. In this embodiment, the specific implementation method is as follows:
[0042] Determine the target message keywords contained in the target transaction message, and the keyword attribute information corresponding to each target message keyword; construct the keyword features corresponding to each target message keyword according to the keyword attribute information, and generate the sequence features corresponding to each target message keyword according to the keyword features; obtain the transaction message features by splicing the sequence features corresponding to each target message keyword.
[0043] Specifically, the target message keywords specifically refer to the keywords contained in the target transaction message. Accordingly, the keyword attribute information specifically refers to the attribute information corresponding to the target keyword, including but not limited to the keyword length, part of speech, character content, etc.; accordingly, the keyword feature specifically refers to the custom feature constructed by combining the target message keywords involving multi-dimensional attributes, which can be understood as a vector expression constructed by combining keywords, keyword length, and keyword part of speech; accordingly, the sequence feature specifically refers to the vector expression constructed by combining multi-dimensional keyword features; wherein, the sequence feature is constructed by the sequence feature corresponding to the keyword, the sequence feature of the part of speech, the sequence feature of the custom feature, the sequence feature of the word and the part of speech, the sequence feature of the word and the custom feature, and the sequence feature of the part of speech and the custom feature. By splicing the sequence features corresponding to each keyword, the transaction message feature of the corresponding transaction message can be obtained, so as to be subsequently input into the model for prediction of the element item label.
[0044] Based on this, after obtaining the target transaction message, in order to ensure that the subsequent model can identify more accurate element item labels, the target message keywords contained in the target transaction message and the keyword attribute information corresponding to each target message keyword can be determined; at this time, the keyword features corresponding to each target message keyword can be constructed according to the keyword attribute information, and on this basis, the sequence features corresponding to each target message keyword can be generated according to the keyword features; finally, the transaction message features can be obtained by splicing the sequence features corresponding to each target message keyword, so as to be subsequently input into the model for prediction of element item labels.
[0045] In actual applications, when custom features (keyword features) are calculated for keywords and their corresponding parts of speech in the target transaction message. Feature construction can be completed by detecting each keyword. For example, if the feature of the word meets the feature of the date, such as 20**.0*.**, the custom feature is set to T. Another example is the feature of the part of speech. If the part of speech indicates that the word is a decimal, then the decimal is judged. If it is greater than 20, the custom feature is set to F. If it is less than or equal to, the custom feature is set to f. The yield and net price can be accurately predicted by distinguishing the value range. For example, if the feature of the word is "week", "week", "day", etc., its custom feature is set to T. If two identical words appear in the message, the custom feature of the second word is set to S, and so on. After obtaining the features corresponding to each keyword, the sequence features are constructed and spliced to obtain the transaction message features of the corresponding transaction message.
[0046] For example, the user communicates the transaction content through instant messaging software A. At this time, the transaction content is extracted as transaction message T. After obtaining transaction message T, invalid characters {! ? space...} can be removed from transaction message T. By removing the invalid characters {! ? space...}, transaction message T1 is obtained; further, the keywords in transaction message T1 are corrected by replacing {year, month, day} with {.} to obtain transaction message T2; further, considering that the keywords contained in transaction message T2 are important indicators for subsequent element item correction, and in order to prevent the characters belonging to a keyword from being split during word segmentation, resulting in inaccurate recognition, separators {space} can be added before and after each keyword in transaction message T2, such as adding separators for keywords {out, terminal, net price...}, and transaction message T3 is obtained according to the addition results. Finally, custom features can be constructed for each keyword and its corresponding part of speech in the transaction message T3, and then the sequence features corresponding to each keyword can be calculated through the custom features. By splicing the sequence features of each keyword, the transaction message feature V corresponding to the transaction message T can be obtained, so that it can be input into the model later, thereby realizing the identification of the elements in the transaction message T.
[0047] In summary, by combining custom features and sequence features to construct transaction message features corresponding to transaction messages, it is possible to fully characterize the transaction content of transaction messages through transaction message features, and identify element items based on this, which can improve the accuracy and efficiency of element item identification.
[0048] Step S204: input the transaction message features into a message recognition model for processing to obtain element item prediction labels corresponding to the element items included in the transaction message.
[0049] Specifically, after obtaining the transaction message features corresponding to the transaction message, in order to reduce the consumption of human resources, the message recognition model can be used to preliminarily identify the elements in the transaction message, so that the element item prediction labels corresponding to the element items contained in the transaction message can be predicted. Then, in order to avoid the problem of inaccurate recognition rate after model prediction, label correction can be performed to support the downstream to use more accurate labels for subsequent business processing.
[0050] Among them, the message recognition model specifically refers to an identification model that inputs transaction message features and outputs prediction labels corresponding to each element item in the transaction message; accordingly, the element item specifically refers to the key information related to the transaction content in the transaction message, including but not limited to the transaction sequence number, buyer, seller, security code, rate of return, etc., and this embodiment does not make any restrictions here. Correspondingly, the element item prediction label specifically refers to the label corresponding to the element item obtained after the message recognition model processes the transaction message features. The label is used to characterize the attribute type of the element item, such as element item a is {buyer} and its label can be buyer; for example, element item b is {rate of return} and its label can be earn_rate; different element items correspond to different labels, which are used to characterize the attribute meaning corresponding to them in this transaction.
[0051] During specific implementation, in order to ensure that the message recognition model can have higher recognition accuracy, the message recognition model may be trained first. In this embodiment, the training of the message recognition model includes:
[0052] Extracting sample pairs from a sample set associated with the target transaction business, wherein the sample pairs include sample transaction messages and sample element item labels corresponding to the sample element items included in the sample transaction messages; inputting the sample transaction messages into an initial message recognition model for processing to obtain prediction element item labels corresponding to the sample element items included in the sample transaction messages; adjusting parameters of the initial message recognition model based on the sample element item labels and the prediction element item labels until the message recognition model that meets the training stop condition is obtained.
[0053] Specifically, the sample set specifically refers to a set of sample pairs used to train the message recognition model. Accordingly, the sample pair refers to a data structure consisting of samples and labels. Among them, the sample is the sample transaction message, and the label is the real element item label corresponding to each element item in the sample transaction message. Correspondingly, the predicted element item label specifically refers to the label obtained after prediction by the initial message recognition model. Correspondingly, the training stop condition specifically refers to the condition for stopping the training of the initial message recognition model, which includes but is not limited to the number of iterations condition, the loss value comparison condition or the verification set verification condition; in actual applications, the training stop condition can be selected according to actual needs, and this embodiment does not make any limitation here.
[0054] Based on this, when training the model, sample pairs can be first extracted from the sample set associated with the target transaction business, wherein the sample pairs include sample transaction messages and sample element item labels corresponding to the sample element items contained in the sample transaction messages; thereafter, the sample transaction messages can be input into the initial message recognition model for processing to obtain prediction element item labels corresponding to the sample element items contained in the sample transaction messages; thereafter, the loss value can be calculated based on the sample element item labels and the prediction element item labels, and then the initial message recognition model can be adjusted according to the loss value. If the adjusted model does not meet the training stop conditions, new sample pairs can continue to be selected in the sample set for training until a message recognition model that meets the training stop conditions is obtained.
[0055] It should be noted that, during the model training process, the sample pairs used for model training also need to undergo the same preprocessing process based on the message processing rules, so as to avoid the model from being affected by minor external factors and fully learn the prediction ability of each element item label. The specific process of this embodiment will not be described in detail here.
[0056] For example, after obtaining the transaction message feature V corresponding to the transaction message T, the transaction message feature V can be input into the message recognition model for processing. According to the processing result, it is determined that the label corresponding to the element item a{a bank - buyer} in the transaction message T is buyer; the label corresponding to the element item b{3.04 - yield} is earn_rate; the label corresponding to the element item c{1 X1**** - transaction number} is trade_no; the label corresponding to the element item d{d security - seller} is seller...; after obtaining the labels corresponding to the various element items, they can be used for subsequent structured data construction operations.
[0057] In summary, by adopting the message recognition model to process the element item corresponding to the element item prediction label, the efficiency of element item recognition can be effectively improved, thereby reducing the cost of human resources.
[0058] Step S206, determining the element item attribute information of the element item relative to the transaction message, and updating the element item prediction label to the element item label according to the element item attribute information.
[0059] Specifically, after the predicted element item prediction labels corresponding to each element item in the transaction message are predicted by the message recognition model, further, considering that there may be errors in the prediction of the message recognition model, if the predicted element item labels corresponding to the element items are incorrectly identified, it will cause indirect errors in downstream business. Therefore, in order to avoid this problem affecting the advancement of the business, after obtaining the predicted element item labels corresponding to the element items, the element item attribute information of the element item relative to the transaction message can be determined, and the attribute of each element item relative to the transaction message can be reflected through the element item attribute information. Based on this, the predicted element item labels corresponding to the element items can be corrected according to the element item attribute information, and the element item labels corresponding to the element items can be obtained, so that the downstream business can use element item labels with higher recognition rates.
[0060] Among them, the attribute information of the element item specifically refers to the attribute description information of each element item in the transaction message relative to the transaction message, including but not limited to the position of the element item in the transaction message, the label of the element item adjacent to the position, etc. In order to achieve that when the predicted label of the element item is corrected, the label of the previous element item and the position of the current element item in the transaction message can be combined for deduction, thereby ensuring the correction accuracy of the corresponding label of the element item. Accordingly, the element item label specifically refers to the label obtained after the predicted label of the element item is corrected.
[0061] Furthermore, in order to ensure that the attribute information of the element item can achieve the purpose of correcting the label corresponding to the element item, the attribute information of the element item collector relative to the transaction message can be used to complete the label correction in combination with the structural attributes of the transaction message. In this embodiment, the specific implementation method is as follows:
[0062] Determine the element item position of the element item in the transaction message, and the basic attribute information corresponding to the element item; construct the element item attribute information of the element item relative to the transaction message according to the element item position and the basic attribute information; generate the element item candidate label corresponding to the element item according to the element item position, the basic attribute information and the element item prediction label; in the case where the element item candidate label is the same as the element item prediction label, use the element item prediction label as the element item label; in the case where the element item candidate label is different from the element item prediction label, use the element item candidate label as the element item label.
[0063] Specifically, the element item position specifically refers to the position of the element item in the transaction message; it can be represented by the character position or by the coordinate system, and this embodiment does not make any limitation here. Correspondingly, the basic attribute information specifically refers to the attribute description information corresponding to the element item itself, including but not limited to the number of characters contained in the element item, part of speech, etc.; correspondingly, the element item candidate label specifically refers to the label derived for the element item in combination with the element item position, basic attribute information and element item prediction label corresponding to the element item.
[0064] Based on this, in order to ensure that the downstream can use feature item labels with higher recognition rates and thus avoid affecting business advancement, the feature item position in the transaction message and the basic attribute information corresponding to the feature item can be determined; the feature item attribute information of the feature item relative to the transaction message can be constructed based on the feature item position and the basic attribute information; on this basis, the feature item candidate label corresponding to the feature item can be generated based on the feature item position, the basic attribute information and the feature item prediction label; when the feature item candidate label is the same as the feature item prediction label, it means that the current feature item prediction label is accurate, and the feature item prediction label can be used as the feature item label; when the feature item candidate label is different from the feature item prediction label, it means that the feature item prediction label is not the real label corresponding to the feature item, and therefore the feature item candidate label can be used as the feature item label, and so on. After the feature item labels corresponding to all the feature items are determined, the subsequent target structured data construction can be carried out.
[0065] For example, after obtaining the transaction message TA whose party is A, the message recognition model can be used to identify the transaction message TA, and the label of the element item a1{**Bank B-buyer} in the transaction message TA is buyer; however, combined with the content recorded in the transaction message TA, it can be known that the message specifies that the entrustment direction is buying, and A of the party is the buyer, then the counterparty B should be the seller. Therefore, the label of the element item a1{**Bank B-seller} can be updated to seller, so that the accurate label can be used for subsequent transaction operations.
[0066] In summary, by correcting the predicted labels of factor items, we can ensure that the factor item labels used subsequently are more accurate, thereby avoiding losses due to business errors.
[0067] In addition, considering that the transaction message contains multiple elements, the label of each element needs to be corrected, so that the structured data can be constructed in combination with more accurate labels. In this embodiment, the specific implementation method is as follows:
[0068] In the case where the transaction message contains multiple element items, determining the element item label corresponding to any one of the multiple element items includes: determining the target element item position of the target element item in the transaction message according to the target element item attribute information corresponding to the target element item; determining the associated element item in the transaction message according to the target element item position, and determining the associated element item label corresponding to the associated element item; updating the target element item prediction label corresponding to the target element item based on the associated element item label and the target element item attribute information, and obtaining the target element item label corresponding to the target element item.
[0069] Specifically, the associated element item specifically refers to other element items that are located before the position of the target element item in the transaction message; it can be all the element items before the position, or it can be part of the element items, and this embodiment does not make any limitation here. Correspondingly, the associated element item label is the label corresponding to the associated element item, and the label has been corrected. It can be understood that each element item in the transaction message can be corrected in sequence, and the element item currently being corrected can use the label corresponding to the element item that has been corrected before to complete the correction operation.
[0070] Based on this, when correcting any one of the multiple element items, the target element item position of the target element item in the transaction message can be determined first according to the target element item attribute information corresponding to the target element item; thereafter, the associated element item can be determined in the transaction message according to the target element item position, and the associated element item label corresponding to the associated element item can be determined; on this basis, the target element item prediction label corresponding to the target element item can be updated based on the associated element item label and the target element item attribute information, so as to obtain the target element item label corresponding to the target element item through the inferred relationship.
[0071] For example, after obtaining the transaction message TA with party A as the party, the message recognition model can be used to identify the transaction message TA, and the label of the element item a1{**institution C-seller} in the transaction message TA is seller; and combined with the position of the element item a1 in the transaction message TA and other element items whose labels have been determined in advance, it is determined that **institution C should actually be the payee. The name before C is mistakenly identified as the seller trader, so the label of **institution C needs to be corrected. In this process, judgment can be made based on the transaction direction [out to]. In the transaction message TA, party B before [out to] is the seller, and party A is the buyer. In the transaction message TA, there is no word between A and C that represents the transaction direction, so it can be determined that **institution C is the payee. The name before C is closest to C, so the name can be identified as the payee trader, so that subsequent transaction operations can be performed based on the more accurate labels corresponding to the element items.
[0072] In summary, by correcting feature item labels based on location and attributes, it can ensure that feature item labels used subsequently are more accurate, thereby avoiding losses due to business errors.
[0073] Step S208: constructing target structured data matching the target transaction business based on the element items and the element item tags.
[0074] Specifically, after obtaining the modified element item labels of the element items, the target structured data matching the target transaction business can be constructed based on the element items and the element item labels, so that the downstream can use the target structured data for processing, such as performing specific transaction operations according to the target structured data. Among them, the target structured data specifically refers to the data in a standard format constructed by combining all the element items in the transaction message and their corresponding element item labels, such as a json string.
[0075] Furthermore, after obtaining the element items and their associated element item tags, the element items may be verified before constructing the structured data. In order to improve the verification efficiency, verification may be performed only on the specified element items. In this embodiment, the specific implementation is as follows:
[0076] According to the verification rules preset for the target transaction business, the element items to be verified are extracted from the multiple element items, and the element item labels to be verified corresponding to the element items to be verified are determined; the element item labels to be verified are verified, and when the verification passes, the step of constructing target structured data matching the target transaction business based on the element items and the element item labels is executed.
[0077] Specifically, the verification rule specifically refers to a rule for checking an error-prone element item (an element item to be verified) among the multiple element items. Accordingly, the element item to be verified specifically refers to an error-prone element item among the multiple element items.
[0078] Based on this, after obtaining the element item labels corresponding to each element item, in order to further ensure the accuracy of label recognition, the element items to be verified can be verified again. In this process, the element items to be verified can be first extracted from multiple element items according to the verification rules preset by the target transaction business, and the element item labels to be verified corresponding to the element items to be verified can be determined; thereafter, the element item labels to be verified can be verified, and if the verification passes, step S208 can be executed.
[0079] In actual applications, when checking error-prone elements among multiple elements, the error-prone elements can be determined according to the actual test results, and then these error-prone elements can be checked at each stage of transaction message processing. For example, check the element transaction sequence number, remaining term, seat number, etc. If the element {seat number} is identified as {face amount face_amount}, the length of the seat number can be determined by whether the face amount has appeared in the front of the message and combined with the identified market (bulk). For example, if the length of the seat number of S1 is 5 and the length of the seat number of S2 is 6, the [face amount] can be corrected to [trading seat]. This meets subsequent usage requirements.
[0080] Furthermore, when constructing the target structured data, the elements and their corresponding tags are actually integrated into data of a set format so that the transaction system corresponding to the target transaction business can use it. In this embodiment, the specific implementation method is as follows:
[0081] Determine key element items and basic element items in the element items according to the element item tags; merge the key element items and the basic element items, and construct target structured data matching the target transaction business based on the merged processing results; wherein the target structured data is stored in a business format preset for the target transaction business.
[0082] Specifically, key elements refer to the main elements in the transaction message, such as the total face value, trading identification, buyer, seller, and payee, etc.; correspondingly, basic elements refer to the most basic elements in the transaction message, such as transaction sequence number, bond code, yield, net price, etc. Correspondingly, business format refers to the preset format of the target transaction business, such as json format, etc.
[0083] Based on this, after obtaining the element item labels corresponding to each element item in the transaction message, the key element items and basic element items can be determined in the element items according to the element item labels; thereafter, the key element items and the basic element items can be merged and processed, and target structured data matching the target transaction business can be constructed based on the merged processing results; wherein, the target structured data is stored according to the business format preset by the target transaction business.
[0084] For example, the transaction message is {Buy 160017 40 million 3.12 today +1 20 million + 20 million A tomorrow +0 sell to B}. After the message is input into the model and corrected by the element item label, the element item and its corresponding element item label can be obtained, and then the element item corresponding to the label can be processed into structured data, as shown below:
[0085] <base>
[0086] <field name="”market_no”" func="”get_market_no”" / >
[0087] <field name="”yield_rate_type”" func="”get_" rate_type” / >
[0088] <field name="”close_period”" func="”get_close_period”" / >
[0089] <field name="”trade_no”" func="”get_trade_no”" / >
[0090] <field name="”stock_code”" func="”get_key_value”" / >
[0091] <field name="”stock_name”" func="”get_key_value”" / >
[0092] <field name="”net_price”" func="”get_" net_price” / >
[0093] <field name="”earn_rate”" func="”get_earn_rate”" / >
[0094] <field name="”medium”" func="”get_" medium” / >
[0095] <field name="”sell”" func="”get_key_value”" / >
[0096] <field name="”appointment_num”" func="”get_key_value”" / >
[0097]
[0098] On this basis, the main elements and basic elements can be selected from the elements and merged into trading instructions. After that, the complete trading instructions can be processed into structured data that meets the standards of the investment system and can be used for subsequent trading operations.
[0099] The message processing method provided in this embodiment can accurately extract the element items contained in the message and define the attributes of the element items for the non-standardized transaction messages involved in the target transaction business, so as to facilitate subsequent use in the transaction system; the transaction message associated with the target transaction business can be first obtained, and the transaction message can be pre-processed according to the preset message processing rules, so that the transaction message is first processed with the transaction message features that can be recognized and processed by the model, and then the transaction message features are input into the message recognition model for processing, so that the element item prediction labels corresponding to the element items contained in the transaction message can be preliminarily identified through the message recognition model; after obtaining the element item prediction labels corresponding to each element item, considering the problem of model prediction accuracy, there may be prediction errors, in order to avoid the influence of this error, the element item prediction labels can be corrected, and in order to ensure the correction accuracy, the element item attribute information of the element item relative to the transaction message can be determined, and then the element item prediction labels can be updated to element item labels according to the element item attribute information, so that when the element item prediction labels are updated, they can be combined with the attributes of the element item relative to the transaction message text, so as to achieve the correction purpose. Finally, the target structured data matching the target transaction business can be constructed based on the elements and element item labels, so that the target transaction business can use the structured data corresponding to the transaction message, thereby ensuring the accuracy of business processing, making it more convenient for downstream businesses to use, and reducing the consumption of human resources.
[0100] The following combination Figure 3 , taking the application of the message processing method provided in this specification in the securities trading scenario as an example, the message processing method is further explained. Figure 3 A flow chart of a message processing method provided in an embodiment of the present specification is shown, which specifically includes the following steps.
[0101] Step S302, obtaining a transaction message associated with the target transaction business, performing character filtering processing on the transaction message according to a preset message processing rule, and generating an initial transaction message according to the character filtering processing result.
[0102] Step S304: adjusting the initial message keywords contained in the initial transaction message to obtain an intermediate transaction message.
[0103] Step S306, determining the keyword position corresponding to the intermediate message keyword contained in the intermediate transaction message, adding the target character in the intermediate transaction message according to the keyword position, and obtaining the target transaction message.
[0104] Step S308: determining target message keywords contained in the target transaction message, and keyword attribute information corresponding to each target message keyword.
[0105] Step S310: construct keyword features corresponding to each target message keyword according to the keyword attribute information, and generate sequence features corresponding to each target message keyword according to the keyword features.
[0106] Step S312, obtaining transaction message features by concatenating sequence features corresponding to each target message keyword.
[0107] Step S314: Input the transaction message features into the message recognition model for processing to obtain the element item prediction labels corresponding to the element items contained in the transaction message.
[0108] Step S316, determining the element item position in the transaction message and the basic attribute information corresponding to the element item.
[0109] Step S318, constructing the element item attribute information of the element item relative to the transaction message according to the element item position and basic attribute information.
[0110] Step S320: Generate a feature item label corresponding to the feature item according to the feature item position, basic attribute information and feature item predicted label.
[0111] Step S322, extracting the element items to be verified from the multiple element items according to the verification rules preset by the target transaction business, and determining the element item labels to be verified corresponding to the element items to be verified.
[0112] Step S324, verifying the labels of the element items to be verified, and if the verification passes, determining the key element items and basic element items in the element items according to the element item labels.
[0113] Step S326, merge the key element items and the basic element items, and construct target structured data matching the target transaction business according to the merge processing result; wherein the target structured data is stored according to the business format preset by the target transaction business.
[0114] The message processing method provided in this embodiment can accurately extract the element items contained in the message and define the attributes of the element items for the non-standardized transaction messages involved in the target transaction business, so as to facilitate subsequent use in the transaction system; the transaction message associated with the target transaction business can be first obtained, and the transaction message can be pre-processed according to the preset message processing rules, so that the transaction message is first processed with the transaction message features that can be recognized and processed by the model, and then the transaction message features are input into the message recognition model for processing, so that the element item prediction labels corresponding to the element items contained in the transaction message can be preliminarily identified through the message recognition model; after obtaining the element item prediction labels corresponding to each element item, considering the problem of model prediction accuracy, there may be prediction errors, in order to avoid the influence of this error, the element item prediction labels can be corrected, and in order to ensure the correction accuracy, the element item attribute information of the element item relative to the transaction message can be determined, and then the element item prediction labels can be updated to element item labels according to the element item attribute information, so that when the element item prediction labels are updated, they can be combined with the attributes of the element item relative to the transaction message text, so as to achieve the correction purpose. Finally, the target structured data matching the target transaction business can be constructed based on the elements and element item labels, so that the target transaction business can use the structured data corresponding to the transaction message, thereby ensuring the accuracy of business processing, making it more convenient for downstream businesses to use, and reducing the consumption of human resources.
[0115] Corresponding to the above method embodiment, this specification also provides a message processing device embodiment, Figure 4 FIG. 1 shows a schematic diagram of the structure of a message processing device provided by an embodiment of the present specification. Figure 4 As shown, the device comprises:
[0116] The acquisition module 402 is configured to acquire a transaction message associated with a target transaction business, and pre-process the transaction message according to a preset message processing rule to obtain a transaction message feature corresponding to the transaction message;
[0117] The processing module 404 is configured to input the transaction message features into a message recognition model for processing, and obtain a predicted element item label corresponding to the element item included in the transaction message;
[0118] An updating module 406 is configured to determine the element item attribute information of the element item relative to the transaction message, and update the element item prediction label to the element item label according to the element item attribute information;
[0119] The construction module 408 is configured to construct target structured data matching the target transaction business based on the element items and the element item tags.
[0120] In an optional embodiment, the acquisition module 402 is further configured to:
[0121] The transaction message is subjected to character filtering processing according to a preset message processing rule, and an initial transaction message is generated according to the character filtering processing result; an initial message keyword contained in the initial transaction message is adjusted to obtain an intermediate transaction message; a keyword position corresponding to an intermediate message keyword contained in the intermediate transaction message is determined, and a target character is added to the intermediate transaction message according to the keyword position to obtain a target transaction message; and a transaction message feature is constructed based on the target transaction message.
[0122] In an optional embodiment, the acquisition module 402 is further configured to:
[0123] Determine the target message keywords contained in the target transaction message, and the keyword attribute information corresponding to each target message keyword; construct the keyword features corresponding to each target message keyword according to the keyword attribute information, and generate the sequence features corresponding to each target message keyword according to the keyword features; obtain the transaction message features by splicing the sequence features corresponding to each target message keyword.
[0124] In an optional embodiment, the training of the message recognition model includes:
[0125] Extracting sample pairs from a sample set associated with the target transaction business, wherein the sample pairs include sample transaction messages and sample element item labels corresponding to the sample element items included in the sample transaction messages; inputting the sample transaction messages into an initial message recognition model for processing to obtain prediction element item labels corresponding to the sample element items included in the sample transaction messages; adjusting parameters of the initial message recognition model based on the sample element item labels and the prediction element item labels until the message recognition model that meets the training stop condition is obtained.
[0126] In an optional embodiment, the updating module 406 is further configured to:
[0127] Determine the element item position of the element item in the transaction message, and the basic attribute information corresponding to the element item; construct the element item attribute information of the element item relative to the transaction message according to the element item position and the basic attribute information; wherein, updating the element item prediction label to the element item label according to the element item attribute information includes: generating an element item candidate label corresponding to the element item according to the element item position, the basic attribute information and the element item prediction label; in the case where the element item candidate label is the same as the element item prediction label, using the element item prediction label as the element item label; in the case where the element item candidate label is different from the element item prediction label, using the element item candidate label as the element item label.
[0128] In an optional embodiment, the updating module 406 is further configured to:
[0129] According to the target element item attribute information corresponding to the target element item, determine the target element item position of the target element item in the transaction message; according to the target element item position, determine the associated element item in the transaction message, and determine the associated element item label corresponding to the associated element item; based on the associated element item label and the target element item attribute information, update the target element item prediction label corresponding to the target element item to obtain the target element item label corresponding to the target element item.
[0130] In an optional embodiment, the device further comprises:
[0131] The verification module is configured to extract the element items to be verified from the multiple element items according to the verification rules preset by the target transaction business, and determine the element item labels to be verified corresponding to the element items to be verified; verify the element item labels to be verified, and if the verification passes, execute the step of constructing target structured data matching the target transaction business based on the element items and the element item labels.
[0132] In an optional embodiment, the construction module 408 is further configured to:
[0133] Determine key element items and basic element items in the element items according to the element item tags; merge the key element items and the basic element items, and construct target structured data matching the target transaction business based on the merged processing results; wherein the target structured data is stored in a business format preset for the target transaction business.
[0134] The message processing device provided in this embodiment can accurately extract the element items contained in the message and define the attributes of the element items for the non-standardized transaction message involved in the target transaction business, so as to facilitate subsequent use in the transaction system; the transaction message associated with the target transaction business can be first obtained, and the transaction message can be pre-processed according to the preset message processing rules, so as to first process the transaction message features that can be recognized and processed by the model, and then input the transaction message features into the message recognition model for processing, so that the element item prediction labels corresponding to the element items contained in the transaction message can be preliminarily identified through the message recognition model; after obtaining the element item prediction labels corresponding to each element item, considering the problem of model prediction accuracy, there may be prediction errors, in order to avoid the influence of this error, the element item prediction labels can be corrected, and in order to ensure the correction accuracy, the element item attribute information of the element item relative to the transaction message can be determined, and then the element item prediction labels can be updated to element item labels according to the element item attribute information, so that when the element item prediction labels are updated, they can be combined with the attributes of the element item relative to the transaction message text, so as to achieve the correction purpose. Finally, the target structured data matching the target transaction business can be constructed based on the elements and element item labels, so that the target transaction business can use the structured data corresponding to the transaction message, thereby ensuring the accuracy of business processing, making it more convenient for downstream businesses to use, and reducing the consumption of human resources.
[0135] The above is a schematic scheme of a message processing device of this embodiment. It should be noted that the technical scheme of the message processing device and the technical scheme of the message processing method described above are of the same concept, and the details not described in detail in the technical scheme of the message processing device can be referred to the description of the technical scheme of the message processing method described above.
[0136] Figure 5 The structure block diagram of a computing device 500 provided according to an embodiment of the present specification is shown. The components of the computing device 500 include but are not limited to a memory 510 and a processor 520. The processor 520 is connected to the memory 510 via a bus 530, and the database 550 is used to store data.
[0137] The computing device 500 also includes an access device 540 that enables the computing device 500 to communicate via one or more networks 560. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 540 may include one or more of any type of network interface (e.g., a network interface card (NIC)) that is wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, and a near field communication (NFC).
[0138] In one embodiment of the present specification, the above components of the computing device 500 and Figure 5 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 5 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0139] The computing device 500 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 500 may also be a mobile or stationary server.
[0140] The processor 520 is used to execute the following computer executable instructions, which implement the steps of the above-mentioned message processing method when executed by the processor.
[0141] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned message processing method belong to the same concept, and the details of the technical scheme of the computing device that are not described in detail can all be referred to the description of the technical scheme of the above-mentioned message processing method.
[0142] An embodiment of the present specification further provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned message processing method.
[0143] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the message processing method described above are of the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the message processing method described above.
[0144] An embodiment of the present specification further provides a computer program product, including a computer program or instructions, which implement the steps of the above-mentioned message processing method when executed by a processor.
[0145] The above is a schematic solution of a computer program product of this embodiment. It should be noted that the technical solution of the computer program product and the technical solution of the above-mentioned message processing method belong to the same concept, and the details not described in detail in the technical solution of the computer program product can be referred to the description of the technical solution of the above-mentioned message processing method.
[0146] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0147] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0148] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.
[0149] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0150] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can understand and use this specification well.
Claims
1. A message processing method, characterized in that: include: Acquire a transaction message associated with a target transaction business, and pre-process the transaction message according to a preset message processing rule to obtain a target transaction message, determine a target message keyword contained in the target transaction message, and keyword attribute information corresponding to each target message keyword; construct a keyword feature corresponding to each target message keyword according to the keyword attribute information, and generate a sequence feature corresponding to each target message keyword according to the keyword feature; obtain a transaction message feature by splicing the sequence features corresponding to each target message keyword; Inputting the transaction message features into a message recognition model for processing to obtain element item prediction labels corresponding to the element items contained in the transaction message; Determine the element item position of the element item in the transaction message, and basic attribute information corresponding to the element item; Generating a candidate element label corresponding to the element according to the element position, the basic attribute information and the element prediction label; When the candidate label of the element item is the same as the predicted label of the element item, using the predicted label of the element item as the label of the element item; When the candidate label of the element item is different from the predicted label of the element item, the candidate label of the element item is used as the label of the element item; Target structured data matching the target transaction business is constructed based on the element items and the element item tags.
2. The message processing method according to claim 1, characterized in that: The preprocessing of the transaction message according to the preset message processing rule to obtain the target transaction message includes: Performing character filtering processing on the transaction message according to a preset message processing rule, and generating an initial transaction message according to the character filtering processing result; Adjusting the initial message keywords contained in the initial transaction message to obtain an intermediate transaction message; A keyword position corresponding to an intermediate message keyword contained in the intermediate transaction message is determined, and a target character is added to the intermediate transaction message according to the keyword position to obtain a target transaction message.
3. The message processing method according to claim 1, characterized in that: The training of the message recognition model includes: Extracting a sample pair from a sample set associated with the target transaction business, wherein the sample pair includes a sample transaction message and a sample element item label corresponding to a sample element item included in the sample transaction message; Inputting the sample transaction message into the initial message recognition model for processing to obtain a prediction factor item label corresponding to the sample factor item contained in the sample transaction message; The initial message recognition model is adjusted based on the sample element item labels and the prediction element item labels until the message recognition model that meets the training stop condition is obtained.
4. The message processing method according to claim 1, characterized in that: In the case where the transaction message includes multiple element items, determining the element item label corresponding to any one of the multiple element items further includes: Determine the target element item position of the target element item in the transaction message according to the target element item attribute information corresponding to the target element item; Determine the associated element item in the transaction message according to the position of the target element item, and determine the associated element item tag corresponding to the associated element item; Based on the associated element item label and the target element item attribute information, the target element item prediction label corresponding to the target element item is updated to obtain the target element item label corresponding to the target element item.
5. The message processing method according to claim 4, characterized in that: Before executing the step of constructing target structured data matching the target transaction business based on the element items and the element item tags, the method further includes: Extracting a to-be-verified element item from the multiple element items according to a verification rule preset by the target transaction business, and determining a to-be-verified element item label corresponding to the to-be-verified element item; The tag of the element item to be verified is verified, and if the verification passes, a step of constructing target structured data matching the target transaction business based on the element item and the element item tag is executed.
6. The message processing method according to claim 1, characterized in that: The step of constructing target structured data matching the target transaction business based on the element items and the element item tags includes: Determine key element items and basic element items in the element items according to the element item labels; Performing a merging process on the key element items and the basic element items, and constructing target structured data matching the target transaction business according to the merging process result; The target structured data is stored in a business format preset for the target transaction business.
7. A message processing device, characterized in that: include: An acquisition module is configured to acquire a transaction message associated with a target transaction business, and pre-process the transaction message according to a preset message processing rule to obtain a target transaction message, determine a target message keyword contained in the target transaction message, and keyword attribute information corresponding to each target message keyword; construct a keyword feature corresponding to each target message keyword according to the keyword attribute information, and generate a sequence feature corresponding to each target message keyword according to the keyword feature; and obtain a transaction message feature by splicing the sequence features corresponding to each target message keyword; A processing module is configured to input the transaction message features into a message recognition model for processing, and obtain a predicted element item label corresponding to the element item included in the transaction message; An updating module is configured to determine a location of the element item in the transaction message and basic attribute information corresponding to the element item; Generating a candidate element label corresponding to the element according to the element position, the basic attribute information and the element prediction label; When the candidate label of the element item is the same as the predicted label of the element item, using the predicted label of the element item as the label of the element item; When the candidate label of the element item is different from the predicted label of the element item, the candidate label of the element item is used as the label of the element item; A construction module is configured to construct target structured data matching the target transaction business based on the element items and the element item tags.
8. A computing device, characterized in that include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method described in any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium, characterized in that: It stores computer executable instructions, which, when executed by a processor, implement the steps of the method described in any one of claims 1 to 6.
10. A computer program product, characterized in that The method comprises a computer program or an instruction, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 6.
