Text processing method and apparatus

By segmenting and extracting features from user-submitted text materials using a text processing model, the problem of low efficiency in reviewing long texts has been solved, enabling efficient and accurate review in different business scenarios and saving manpower and resources.

CN116483965BActive Publication Date: 2026-02-17ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310401259.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-14
Publication Date
2026-02-17
Estimated Expiration
2043-04-14

AI Technical Summary

Technical Problem

Existing technologies suffer from inefficiency and insufficient accuracy in user text review, especially when reviewing long text materials. In particular, manual review is burdensome and costly in business scenarios such as insurance claims, shared resource applications, and credit-based rentals.

Method used

The text processing model includes an initialization unit, an extraction unit, an exchange unit, and a processing unit. By generating text fragments, adding identification information, performing initialization processing, extracting features from intermediate fragments, and performing information exchange processing, the model ultimately obtains event decision information, achieving efficient review without being limited by text length.

Benefits of technology

It improves the accuracy and efficiency of text review, saves human and material resources, and ensures fast and accurate review in different business scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116483965B_ABST
    Figure CN116483965B_ABST
Patent Text Reader

Abstract

Embodiments of the present specification provide a text processing method and device, wherein the text processing method comprises: generating a text segment according to a business text corresponding to a target event, and inputting the text segment into a text processing model, wherein the text processing model comprises an initialization unit, an extraction unit, an exchange unit and a processing unit; adding identification information to the text segment, and performing initialization processing on the text segment with the added identification information by the initialization unit to obtain intermediate segment features; extracting target features of the intermediate segment features by the extraction unit, and performing information exchange processing on target identification information in the target features by the exchange unit to determine target segment features according to the processing result; and processing the target segment features by the processing unit to obtain event decision information of the target event.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present specification relate to the technical field of machine learning, and in particular to a text processing method and device. BACKGROUND

[0002] With the development of Internet technology, more and more businesses begin to be online, thereby bringing more convenient services to users. In order to provide more stable and secure services for users, some businesses need to conduct multi-dimensional audits on users, and most of the audits will adopt manual auditing on the text materials uploaded by users; the audit can occur in the business participation stage or in the business end stage, and by auditing the materials submitted by users, it is ensured that the user participates in the business under safe and reliable conditions. In the auditing stage, OCR recognition technology or NLP natural language processing technology is usually used to realize the auditing of the text. However, since different business scenarios require different materials to be audited, and the text length is indefinite and the processing logic is relatively complex, an effective solution is urgently needed to solve the above problems. SUMMARY

[0003] Therefore, the embodiments of the present specification provide a text processing method. One or more embodiments of the present specification also relate to a text processing device, a computing device, a computer-readable storage medium, and a computer program to solve the technical defects in the prior art.

[0004] According to a first aspect of the embodiments of the present specification, a text processing method is provided, comprising:

[0005] generating a text segment according to a business text corresponding to a target event, and inputting the text segment into a text processing model, wherein the text processing model comprises an initialization unit, an extraction unit, an exchange unit, and a processing unit;

[0006] adding identification information to the text segment, and performing initialization processing on the text segment with the added identification information by the initialization unit to obtain intermediate segment features;

[0007] extracting target features of the intermediate segment features by the extraction unit, and performing information exchange processing on target identification information in the target features by the exchange unit, and determining target segment features according to the processing result;

[0008] processing the target segment features by the processing unit to obtain event decision information of the target event.

[0009] According to a second aspect of the embodiments of the present specification, another text processing method is provided, comprising:

[0010] According to the medical voucher text corresponding to the claim event, a text segment is generated, and the text segment is input into a text processing model, wherein the text processing model comprises an initialization unit, an extraction unit, an exchange unit, and a processing unit;

[0011] Identification information is added to the text segment, and the initialization unit is used to perform initialization processing on the text segment with the added identification information, to obtain intermediate segment features;

[0012] The target features of the intermediate segment features are extracted by the extraction unit, and the target identification information in the target features is processed by the exchange unit, and the target segment features are determined according to the processing result;

[0013] The target segment features are processed by the processing unit, and the claim decision information of the claim event is obtained.

[0014] According to a third aspect of the embodiments of the present specification, a text processing device is provided, comprising:

[0015] The input module is configured to generate a text segment according to the business text corresponding to the target event, and input the text segment into a text processing model, wherein the text processing model comprises an initialization unit, an extraction unit, an exchange unit, and a processing unit;

[0016] The initialization module is configured to add identification information to the text segment, and perform initialization processing on the text segment with the added identification information by the initialization unit, to obtain intermediate segment features;

[0017] The exchange processing module is configured to extract target features of the intermediate segment features by the extraction unit, and perform information exchange processing on the target identification information in the target features by the exchange unit, and determine the target segment features according to the processing result;

[0018] The information determination module is configured to process the target segment features by the processing unit, and obtain the event decision information of the target event.

[0019] According to a fourth aspect of the embodiments of the present specification, a text processing device is provided, comprising:

[0020] The input model module is configured to generate a text segment according to the medical voucher text corresponding to the claim event, and input the text segment into a text processing model, wherein the text processing model comprises an initialization unit, an extraction unit, an exchange unit, and a processing unit;

[0021] An initialization fragment module is configured to add identification information to the text fragment, and initialize the text fragment with the added identification information by the initialization unit to obtain intermediate fragment features;

[0022] An information exchange processing module is configured to extract target features of the intermediate fragment features by the extraction unit, and perform information exchange processing on target identification information in the target features by the exchange unit, and determine target fragment features according to a processing result;

[0023] A decision information determination module is configured to process the target fragment features by the processing unit to obtain claim settlement decision information of the claim settlement event.

[0024] According to a fifth aspect of the embodiments of the present specification, a computing device is provided, comprising:

[0025] a memory and a processor;

[0026] The memory is configured to store computer executable instructions, and the processor is configured to execute the computer executable instructions, and the computer executable instructions, when executed by the processor, implement the steps of the above text processing method.

[0027] According to a sixth aspect of the embodiments of the present specification, a computer readable storage medium is provided, which stores computer executable instructions, and the instructions, when executed by a processor, implement the steps of the above text processing method.

[0028] According to a seventh aspect of the embodiments of the present specification, a computer program is provided, wherein when the computer program is executed in a computer, the computer program causes the computer to execute the steps of the above text processing method.

[0029] The text processing method provided in this manual aims to quickly and accurately review business texts based on target events. It first generates text fragments from the business text corresponding to the target event, then inputs these fragments into a text processing model to improve review efficiency. Based on this, the review process is completed through the initialization, extraction, exchange, and processing units within the text processing model. Specifically, identification information is added to the text fragments; the initialization unit initializes the text fragments with added identification information to obtain intermediate fragment features. Next, the extraction unit processes the intermediate fragment features to obtain the target features corresponding to the text fragments. Then, the exchange unit exchanges the target identification information within the target features to obtain the target fragment features, thus fusing contextual text information with target identification information to improve model prediction accuracy. Finally, the target fragment features are input into the processing unit for further processing to obtain the event decision information for the target event. This allows the text review stage to be completed through the text processing model, enabling the determination of decision information without being limited by text length, thereby significantly improving the accuracy and efficiency of text review and effectively saving human and material resources. Attached Figure Description

[0030] Figure 1 This is a schematic diagram of a text processing method provided in one embodiment of this specification;

[0031] Figure 2 This is a flowchart illustrating a text processing method provided in one embodiment of this specification;

[0032] Figure 3 This is a schematic diagram of the structure of a text processing model in a text processing method provided in one embodiment of this specification;

[0033] Figure 4 This is a schematic diagram of the structure of a processing unit in a text processing method provided in one embodiment of this specification;

[0034] Figure 5 This is a flowchart illustrating the processing procedure of a text processing method provided in one embodiment of this specification.

[0035] Figure 6 This is a flowchart of another text processing method provided in one embodiment of this specification;

[0036] Figure 7 This is a schematic diagram of the structure of a text processing device provided in one embodiment of this specification;

[0037] Figure 8 This is a schematic diagram of the structure of another text processing device provided in one embodiment of this specification;

[0038] Figure 9 is a structural block diagram of a computing device provided by an embodiment of the present specification. DETAILED DESCRIPTION

[0039] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present specification. However, the present specification can be practiced without the specific details, other than in the examples, and it can be apparent to those skilled in the art that the present specification can be practiced without the specific details. In other instances, well-known methods, procedures, components, and networks have not been described in detail so as not to unnecessarily obscure aspects of the present specification.

[0040] The terminology used in one or more embodiments of the present specification is for the purpose of describing particular embodiments only and is not intended to be limiting of one or more embodiments of the present specification. As used in one or more embodiments of the present specification and the accompanying claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in one or more embodiments of the present specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0041] It will be understood that, although the terms first, second, etc. can be used herein to describe various information, these terms are not intended to denote a temporal or chronological order. Rather, these terms are used solely to distinguish one from another only. For example, without departing from the scope of one or more embodiments of the present specification, first can be termed second, and similarly, second can be termed first. The word "if' as used herein means "when" or "upon" or "in response to a determination" depending on the context.

[0042] 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 for analysis, stored data, displayed data, etc.) involved in one or more embodiments of the present specification are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.

[0043] First, the nomenclature involved in one or more embodiments of the present specification is explained.

[0044] OCR: (optical character recognition) character recognition refers to the process in which an electronic device (such as a scanner or digital camera) checks the characters printed on paper, and then translates the shape into computer text by character recognition method; that is, the process of scanning text materials, and then analyzing and processing image files to obtain text and layout information.

[0045] NLP: (Natural Language Processing, natural language processing) is a discipline that studies the language problems of human-computer interaction. According to the difficulty of technical implementation, such systems can be divided into three types: simple matching type, fuzzy matching type and paragraph understanding type.

[0046] Transformer model: a deep learning model that uses attention mechanism to differentially weight the importance of each part of the input data, and is widely used in various natural language processing tasks.

[0047] BERT model: (Bidirectional Encoder Representations from Transformer) is a bidirectional encoder representation based on Transformer. The root of BERT model is Transformer, which comes from attention is all you need. The meaning of bidirectional indicates that it can consider the information of the words before and after the word when processing a word, so as to obtain the semantic context.

[0048] In the present specification, a text processing method is provided, and the present specification also relates to a text processing device, a computing device, and a computer readable storage medium, which are described in detail one by one in the following embodiments.

[0049] In practical application, in the business participation stage or the business audit stage, the audit of the materials submitted by the user may be involved, such as insurance business projects, shared resource application projects, credit rental projects, etc., which need to be audited before or during the execution of the business to determine whether the user meets the requirements of participating in the business project or whether the user meets the requirements of accepting the service of the business project. However, in this process, the core is to accurately audit the materials submitted by the user before use. For example, in the insurance business project scenario, when the user applies for claim, the user needs to upload the medical certificate materials related to the disease, and then the audit personnel needs to audit before the claim can be processed.

[0050] In the claim settlement system, after receiving the medical certificate materials, the materials are classified and identified, that is, the medical certificate materials are extracted by using OCR, NLP and other technologies to assist the audit personnel to complete the claim settlement decision processing. However, the declaration materials are usually at an angle, and each material contains a large amount of text information, and the length of most of them will exceed 512 bytes. The audit pressure and efficiency are very large, so an effective solution is needed to solve the above problems.

[0051] Referring to Figure 1 The text processing method provided by the present specification can quickly and accurately complete the audit of the business text based on the target event. The text processing method provided by the present specification can first generate a text segment according to the business text corresponding to the target event, and then input the text segment into a text processing model to improve the text audit efficiency through the text processing model. On this basis, the audit can be completed through the initialization unit, the extraction unit, the exchange unit and the processing unit in the text processing model; that is, the identification information is added to the text segment, and then the initialization unit is used to initialize the text segment with the added identification information, so as to obtain the intermediate segment features corresponding to the text segment. Then, the intermediate segment features are processed by the extraction unit to obtain the target features corresponding to the text segment. At this time, the target identification information in the target features is processed by the exchange unit to obtain the target segment features, so as to fuse the context text information through the target identification information and improve the model prediction accuracy. Finally, the target segment features are input into the processing unit for processing, so as to obtain the event decision information of the target event. In the text audit stage, the text processing model can be used to complete the determination of the decision information without being limited by the length of the text, so as to greatly improve the text audit accuracy and efficiency, and effectively save the human and material resources.

[0052] Referring to Figure 2 , Figure 2 A flowchart of a text processing method according to one embodiment of the present specification is shown, which specifically includes the following steps.

[0053] In step S202, a text segment is generated according to the business text corresponding to the target event, and the text segment is input into a text processing model, wherein the text processing model includes an initialization unit, an extraction unit, an exchange unit and a processing unit.

[0054] The text processing method provided in this embodiment can be applied to scenarios such as an insurance business project, a shared resource application project, and a credit rental project, and is used to realize auditing of a business text submitted by a user through the text processing method provided in this embodiment, so that event decision information of an associated business can be obtained, and subsequent business processing of the business project according to the event decision information is facilitated. This embodiment takes the insurance business project as an example to describe the text processing method, and the related descriptions in other scenarios can be referred to in this embodiment, which will not be described in detail herein.

[0055] Based on this, the target event specifically refers to an event that needs to be performed in a business project. For example, in an insurance business project, the target event is a claim auditing event, which is used to audit medical materials submitted by a user, so as to determine whether to perform a claim. For example, in a shared resource application project, the target event is a shared resource auditing event, which is used to audit shared resource application materials submitted by a user, so as to determine whether to allocate shared resources. Or in a credit rental scenario, the target event is a credit auditing event, which is used to audit credit materials submitted by a user, so as to determine whether to perform an item rental. Correspondingly, the business text is a material text submitted by a user for the target event. In an insurance business project, the business text is a medical material text. In a shared resource application project, the business text is a shared resource application material. In a credit rental project, the business text is a credit information description text of a user.

[0056] Correspondingly, the text segment specifically refers to a text segment obtained by segmenting a business text, which is used to realize auditing of an event from each text segment after inputting into a text processing model, so as to obtain event decision information with higher accuracy. Correspondingly, the text processing model specifically refers to a model used to audit a text segment corresponding to a business text, and different text processing models correspond to different business scenarios. That is, the text processing model in different business scenarios can be supervised training according to business requirements, which will not be limited herein.

[0057] It should be noted that the text processing model needs to include an initialization unit, an extraction unit, a switching unit, and a processing unit. The initialization unit is used to convert a text segment into a vector representation. The extraction unit is used to extract semantic features of a text segment. The switching unit is used to fuse the semantic features into identification information corresponding to a context-related text segment, so as to realize prediction of event decision information by the processing unit according to the features fused with the context information. Moreover, considering that the text processing model needs to complete prediction based on a text segment corresponding to a business text, the business text in the submitted material of a user needs to be extracted through an OCR recognition technology for use. The material submitted by the user can be in the form of a photograph, a text, or a voice, which will not be limited herein.

[0058] Based on this, when the target event needs to be executed, the business text needs to be extracted from the user-submitted materials first, and then the business text is segmented into text segments, and the text segments are input into the text processing model in the form of segmentation, so that the text processing model can be processed more conveniently, and the information in the text segments can be fused by the different units in the model to output event decision information with high enough precision for the convenience of downstream business use.

[0059] Further, when converting the business text into text segments, considering the processing logic of the text processing model and the fixed length of the text that can be processed, the segmentation needs to be performed in a set manner; in the embodiment, the specific implementation is as follows:

[0060] receiving the business text submitted for the target event; segmenting the business text according to a preset length threshold and a text segmentation rule to obtain the text segments; and inputting the text segments into the text processing model.

[0061] Specifically, the preset length threshold specifically refers to the maximum length threshold when the business text is segmented, that is, the length of the segmented text is less than or equal to the preset length threshold; correspondingly, the text segmentation rule specifically refers to the rule that needs to be executed when the business text is segmented, which is used to limit that each text segment needs to have an overlapping area with the adjacent text segment after segmentation, that is, the adjacent text segments need to have overlapping characters, so as to facilitate subsequent use.

[0062] Based on this, when the user-submitted materials for the target event are received and the business text is identified from the materials, the business text can be segmented according to the text segmentation rule first, and the segmentation is limited according to the preset length threshold, so that multiple text segments corresponding to the business text can be obtained according to the segmentation result, and the text segments can be input into the text processing model to determine the event decision information.

[0063] For example, in an insurance business project, when user A has a claim settlement demand, medical materials will be uploaded according to the claim settlement rules of the insurance business project, at this time, the medical text can be identified from the medical materials through the OCR recognition technology, and then the medical text can be segmented into text segments S0, S1,..., S N containing overlapping areas and less than 512 in length, which facilitates subsequent determination of claim settlement decision based on N text segments.

[0064] In summary, by segmenting the business text in a set manner, text segments that meet the use of the text processing model and improve the prediction accuracy can be obtained in the data preprocessing stage, so that the prediction of event decision information based on the text segments can be more convenient.

[0065] In addition, in order to train a text processing model meeting the use requirement, the text processing model needs to be continuously trained before the target event is executed; in the embodiment, the implementation is as follows:

[0066] The sample text and the sample label are obtained; the sample text segment is generated according to the sample text, and the sample text segment is input into the initial text processing model for processing to obtain sample decision information; the initial text processing model is adjusted according to the sample decision information and the sample label until the text processing model meeting the training stop condition is obtained.

[0067] Specifically, the sample text specifically refers to the text used for training the initial text processing model, and the sample text belongs to the field corresponding to the target event, and is used for training the text processing model related to the field; accordingly, the sample label is the real event decision information; accordingly, the sample decision information is the event decision information predicted by the initial text processing model; the training stop condition specifically refers to the condition for stopping training the model, which can be the iteration number condition, the loss value comparison condition or the verification comparison condition, etc., which is not limited in the embodiment.

[0068] Based on this, after the sample text and the sample label are obtained, the sample text segment can be generated according to the sample text, and then input into the initial text processing model for processing, so that the sample decision information corresponding to the sample text can be obtained, at this time, the loss value can be calculated in combination with the sample decision information and the sample label, and the initial text processing model can be adjusted according to the calculation result, if the model after adjustment does not meet the training stop condition, new samples can be selected for continuous training, until the text processing model meeting the training stop condition is obtained in a certain training stage.

[0069] It should be noted that when the initial text processing model is adjusted, the units in the initial text processing model are actually adjusted, so that the text processing model meeting the use requirement is obtained and deployed in the business project for use; and in the model application stage, if it is monitored that the model does not meet the prediction requirement, it can be optimized in combination with new samples, so as to ensure that the model with high enough prediction accuracy is always used in the business project.

[0070] In summary, by fully training the text processing model, it can be ensured that the information of the business requirement in the business project is accurately predicted, so as to facilitate the use of the downstream business.

[0071] In step S204, the identification information is added to the text segment, and the initialization unit is used to initialize the text segment with the added identification information to obtain the intermediate segment feature.

[0072] Specifically, after the text segments corresponding to the business text are input into the text processing model, each text segment needs to be converted into a vector representation before the text processing model processes the text segments. In the initialization stage, to improve the prediction accuracy of the model, an identification information can be inserted into each text segment, which facilitates the subsequent use of context information fusion. That is, after the text segments are input into the text processing model, identification information can be added to the text segments to initialize the content of the fused text segments and identification information in the initialization stage to construct intermediate segment features containing identification information and text segments, which facilitates subsequent prediction based on intermediate segment features.

[0073] The identification information specifically refers to a global token added to the text segment, which can be a [CLS] token. The token is used to fuse context information during model processing to improve the prediction accuracy and efficiency of the model. Accordingly, the initialization process is a vector embedding process for text segments with added identification information, which is used to convert the text segments with added identification information into vector representations, i.e., intermediate segment features, for subsequent prediction processing.

[0074] Further, in the process of processing text segments by the initialization unit to obtain intermediate text segments, to improve the prediction accuracy of event decision information in the subsequent process, the identification information can be inserted into the features to fuse the context information, so that the analysis of the identification information can determine the review result. In this embodiment, the specific implementation is as follows:

[0075] In the text processing model, a preset identification information is determined and added to the character start position of the text segment. The text segment carrying the identification information is input into the initialization unit for initialization processing to obtain the intermediate segment feature. The intermediate segment feature is determined based on the identification feature corresponding to the identification information and the segment feature corresponding to the text segment.

[0076] Specifically, the character start position specifically refers to the character head position of the text segment. Based on this, in order to be able to perform information fusion and prediction in the model processing stage through the identification information, a preset identification information can be determined in the text processing model to add the identification information to the character start position of the text segment; at this time, the text segment carrying the identification information is input to the initialization unit for initialization processing, so as to obtain the intermediate segment feature; and the intermediate segment feature is determined based on the identification feature corresponding to the identification information and the segment feature corresponding to the text segment. That is, when the text segment carrying the identification information is processed by the initialization unit, the identification information and the text segment will be vectorized and converted, so as to obtain the intermediate segment feature for subsequent use.

[0077] In the above example, after obtaining N text segments, in order to gradually transmit context information between the segments in the network structure for subsequent prediction of event decision information, a global token can be inserted at the head of each text segment to play a role in transmitting information between segments, that is, in the implementation, the global token can be set as [CLS], and then inserted in front of each text segment, at this time, N text segments carrying the global token will be obtained. After initialization by the token embedding and position embedding layers (the hierarchical structure contained in the initialization unit) in the text processing model, the model input features E0, E1,..., EN corresponding to the text segments can be obtained. N , and the model input feature carries a global token, which is also initialized by the initialization unit for subsequent use of the model input feature carrying the global token for prediction processing.

[0078] In summary, by inserting identification information in front of the text segment, context information can be transmitted through the identification information, thereby playing a role in transmitting information between segments, and facilitating subsequent determination of event decision information based thereon.

[0079] Step S206, extracting the target feature of the intermediate segment feature by the extraction unit, and performing information exchange processing on the target identification information in the target feature by the exchange unit, and determining the target segment feature according to the processing result.

[0080] Specifically, after obtaining the intermediate segment features, further, since the intermediate segment features represent the vectorization expression of the text segment, the intermediate segment features do not have the semantic information of the text segment, and the event decision information needs to be based on the semantic information of the business text to accurately predict, therefore, after obtaining the intermediate segment features corresponding to the text segment, the extraction unit is needed to process the intermediate segment features, so as to obtain the target features corresponding to the text segment; and since the identification information is fused in the intermediate segment features, and the identification information is the basis for inter-segment information transmission, therefore, the target identification information in the target features can be further processed by the exchange unit to exchange information, so as to realize the transmission of context information through the identification information, so that after obtaining the target segment features, the prediction of the event decision information can be performed.

[0081] The target features specifically refer to the vector expression of the corresponding text segment extracted based on the intermediate segment features, which can be understood as the semantic expression features corresponding to the text segment. Correspondingly, the target identification information specifically refers to the extraction result of the identification information after the extraction unit extracts the intermediate segment features containing the identification information and the features corresponding to the text segment. Correspondingly, the target segment features specifically refer to the vector expression composed of the features corresponding to the text segment in the target features after the exchange unit performs inter-segment information transmission on the identification information, which is used for subsequent conversion by the processing unit to obtain the event decision information. It should be noted that the extraction unit can be implemented using the Transformer structure.

[0082] Further, when performing information exchange processing, the identification information in the features is used to complete information fusion and exchange. In this embodiment, the specific implementation is as follows:

[0083] The intermediate segment features are input to the extraction unit for feature extraction processing to obtain the target features corresponding to the text segment. The target identification information corresponding to the identification information and the target text segment features corresponding to the text segment are extracted from the target features. The target identification information is input to the exchange unit for information exchange processing to obtain global identification information. The target segment features are generated according to the global identification information and the target text segment features.

[0084] Specifically, the target text segment feature is specifically a semantic expression feature of the corresponding text segment in the target feature, which is not used in the information exchange process. Because the identification information only corresponds to the text segment when the extraction unit extracts the feature, the information exchange process of the identification information needs to be completed by fusing the context information, so that the target segment feature can be formed according to the global identification information after the exchange processing and the target text segment feature, facilitating the subsequent prediction and use of event decision information. Correspondingly, the global identification information is specifically the identification information after fusing the context information.

[0085] Based on this, after obtaining the intermediate segment feature, in order to be able to realize the fusion of context information to obtain the target segment feature, facilitate subsequent use, the intermediate segment feature can be input to the extraction unit for feature extraction processing, so as to obtain the target feature corresponding to the text segment; At this time, the target identification information corresponding to the identification information and the target text segment feature corresponding to the text segment can be extracted in the target feature; And because the feature has been fused with the feature of the belonging segment through the target identification information during feature extraction, the target identification information can be input to the exchange unit for information exchange processing, realizing the fusion of context information through the target identification information, so as to obtain the global identification information; Finally, the target segment feature can be generated according to the global identification information and the target text segment feature, for further processing.

[0086] That is, after feature extraction, because the intermediate segment feature contains the feature expression corresponding to the identification information and the text segment, after feature extraction, the target identification information in the target feature will fuse the information of the belonging segment, at this time, only the target identification information can be processed for information exchange, that is, the context information can be fused, the inter-segment information can be transmitted, and the target segment feature can be formed, facilitating the determination of event decision information using the target segment feature subsequently.

[0087] In summary, by fusing the text segment information into the identification information in the feature extraction stage, the inter-segment information transmission can be realized by only combining the target identification information during the information exchange process, thereby effectively improving the model processing efficiency.

[0088] Further, during the information exchange process, the context information is fused through the identification information, so that the vector expression of the text segment after fusing the context information through the identification information is realized, thereby facilitating the determination of event decision information based on the identification information corresponding to each text segment subsequently; In this embodiment, the specific implementation is as follows:

[0089] The target identification information is input to the exchange unit, a self-attention matrix is generated through an attention layer in the exchange unit, and a similarity matrix is generated through a similarity calculation layer in the exchange unit; according to the self-attention matrix and the similarity matrix, a weight matrix corresponding to the target identification information is determined, and global identification information corresponding to the target identification information is generated according to the weight matrix.

[0090] Specifically, the attention layer specifically refers to the hierarchical structure of constructing the attention matrix; correspondingly, the similarity calculation layer specifically refers to the hierarchical structure of calculating the similarity matrix; correspondingly, the weight matrix specifically refers to the matrix obtained by combining the similarity matrix and the self-attention matrix for calculation, which is used to generate the global identification information of the target identification information, that is, to generate the identification information fused with the context information according to the weight matrix.

[0091] Based on this, when fusing the context information through the identification information, the target identification information can be first input to the exchange unit, a self-attention matrix is generated through an attention layer in the exchange unit, and a similarity matrix is generated through a similarity calculation layer in the exchange unit; at this time, according to the self-attention matrix and the similarity matrix, the weight matrix corresponding to the target identification information can be calculated, and finally the global identification information corresponding to the target identification information can be generated according to the weight matrix. It is used to combine the target text segment features to generate target segment features.

[0092] For example, referring to the schematic diagram shown in Figure 3 After obtaining the medical text uploaded by user A, N text segments are obtained after segmentation, at this time, identification information can be added before each text segment, thereby obtaining S0-S N carrying [CLS] global token text segments. Then S0-S N are input to the text processing model, and the text processing model is initialized by the initialization unit to initialize the text segments carrying the global token, and the model input features composed of the global token and the text segment features are obtained, that is, the model input features are wherein E N represents the text segment feature, represents the global identification; then the model input features can be input to the Transformer layer in the model for processing, to realize the generation of the intermediate hidden features corresponding to each text segment. However, only extracting the features in the segment without considering the information of other segments will lead to inaccurate prediction results. Therefore, after extracting the features through the Transformer layer, the similarity sensitive fusion module (exchange unit) can be used to promote the context propagation between the segments.

[0093] That is, since the global token has the text information of the corresponding segment after feature extraction by the extraction unit, the global token corresponding to each segment can be taken as the input of the similar sensitive fusion module to realize information exchange between text segments. In order to better aggregate the information between segments, the weight matrix can be constructed in two ways, so as to obtain the global token with fused context information according to the weight matrix.

[0094] Referring to Figure 4 After inputting the global token into the similar sensitive fusion module, on the one hand, the self-attention matrix W a can be obtained by using the multi-head attention layer to realize information transmission between global tokens by using the automatic learning ability of the model; on the other hand, considering that longer text usually expresses more information, not all text segments have strong connection, and in order to establish the difference between text segments, the relevance between text segments can be judged by the heuristic similarity matrix W c of cosine similarity, that is, the greater the cosine similarity, the higher the relevance between text segments, and vice versa. Therefore, the weight matrix W corresponding to the text segment can be finally obtained by combining the self-attention matrix W a and the similarity matrix W c , so as to obtain the global token with fused context information according to the weight matrix W corresponding to the text segment, that is, part of the global token is represented as and the other part is represented as Finally, the representations belonging to the same global token are combined to obtain the representation of the global token Then the global token with fused context information is brought back to each text segment to obtain the target segment feature with fused context information for facilitating subsequent determination of event decision information according to the target segment feature.

[0095] In summary, by extracting the identification information for context information fusion when the exchange unit is processed, the difference between text segments based on the identification information can be realized, and the subsequent processing is based on this, which effectively makes up for the problem of information fragmentation, so as to ensure more accurate prediction accuracy.

[0096] Step S208, processing the target segment feature by the processing unit to obtain the event decision information of the target event.

[0097] Specifically, after obtaining the target segment feature, the target segment feature can be directly input into the processing unit for prediction since the target segment feature has fused context information and is not limited by the length of the text, so as to predict the event decision information corresponding to the target event and output the text processing model, and the subsequent processing of the target event can be based on the event decision information.

[0098] The event decision information specifically refers to information of a decision target event predicted based on the business text, such as whether to perform claim settlement in a medical insurance project, whether to perform shared resource allocation in a shared resource application project, or whether to perform item rental in a credit item rental project.

[0099] Further, when determining the event decision information by the processing unit, the feature is actually averaged by the pooling layer, and then the decision classification is performed based on the pooling. In this embodiment, the specific implementation manner is as follows:

[0100] The target segment feature is input into the processing unit, the global identification information in the target segment feature is averaged by the pooling layer in the processing unit, and the text segment feature corresponding to the text segment is obtained. The text segment feature is processed by the feature processing layer in the processing unit, and the event decision information of the target event is determined according to the processing result.

[0101] Specifically, the pooling layer specifically refers to a hierarchical structure of the processing unit for averaging the target segment feature. Correspondingly, the text segment feature specifically refers to the final vector expression representing the semantic of the text segment. Correspondingly, the feature processing layer specifically refers to a hierarchical structure capable of generating the event decision information after processing the text segment feature.

[0102] Based on this, after obtaining the target segment feature, in order to accurately determine the event decision information, the target segment feature can be input into the processing unit, the global identification information in the target segment feature is averaged by the pooling layer in the processing unit, so as to obtain the text segment feature corresponding to the text segment. Then, the text segment feature is processed by the feature processing layer in the processing unit, and the event decision information of the target event is determined according to the processing result.

[0103] In summary, by combining the pooling layer and the feature processing layer for prediction processing, the prediction accuracy of the event decision information can be effectively improved to facilitate the use of downstream business.

[0104] Further, when the decision classification is performed, that is, the class analysis is performed through the full connection layer; in the embodiment, the specific implementation manner is as follows:

[0105] The text segment features are input into the feature processing layer in the processing unit for fusion processing to obtain long text features corresponding to the business text; the long text features are input into the full connection layer in the processing unit for class analysis to obtain the event decision information of the target event.

[0106] Specifically, the long text features specifically refer to the vector expression obtained after the fusion processing of the text segment features; based on this, after the text segment features are input into the feature processing layer in the processing unit for fusion processing, the long text features corresponding to the business text can be obtained; at this time, the long text features are input into the full connection layer in the processing unit for class analysis, and the event decision information of the target event can be obtained.

[0107] That is, the text processing model provided in the embodiment is similar to the BERT model structure, a certain number of extraction units and processing units can be stacked in the text processing model, so as to realize the complete extraction of the context information of all text segments, and since the identification information already has the local information between the text segments and the global information between the segments, the characteristics of the identification information can be directly used to identify the entire business text, the average pooling operation is performed on the identification information corresponding to each text segment to obtain the feature expression r corresponding to each text segment, so as to facilitate the subsequent calculation of the event decision information on this basis; wherein, the feature expression r0, r1,..., r N is calculated through the following formula (1):

[0108]

[0109] wherein, r k is the feature expression of the identification information of any one text segment after the average pooling, is the vector expression of the identification information of the text segment. k is a segmentation index, and k∈[0, N].

[0110] On the basis of the attention mechanism, all segments are combined to obtain the super-long text d corresponding to the business text, and the weight β k in the attention mechanism represents the importance of the text segment k in the entire business text, so the weight β k and d can be calculated through the following formulas (2) and (3), wherein U is a learnable parameter, and the dimension is the same as r k :

[0111]

[0112]

[0113] After obtaining the super-long text representation d, a fully connected layer is connected to output the final event decision information.

[0114] Following the above example, after obtaining the target segment feature , the global tokens with fused context information can be extracted from the target segment feature . Then, the weight values β1, β2…β N corresponding to each global token are obtained by performing average pooling on each global token, i.e., by using the above formula (2). At this time, the weight values corresponding to each global token are merged, i.e., the long text d corresponding to the medical text is obtained by calculating using the above formula (3). Finally, the long text d is processed by a fully connected layer, and the decision information of whether to compensate for user A is output by the model.

[0115] In summary, by determining the event decision information, different levels of structures in the processing unit can be used to complete the determination, ensuring the accuracy of the event decision information prediction.

[0116] In addition, after determining the event decision information of the target event, since the event decision information is the basis for executing the target event, the event state of the target event needs to be changed in combination with the event decision information, so as to facilitate the downstream business to perform related business processing based on the event state. In this embodiment, the specific implementation is as follows:

[0117] The business text submitted by the user for the target event is received; wherein, after the step of obtaining the event decision information of the target event by processing the target segment feature by the processing unit, the method further comprises: creating an event processing task corresponding to the target event according to the event decision information and performing the event processing task, and updating the event state corresponding to the target event according to the task execution result.

[0118] Specifically, the user specifically refers to a user who submits a business text for a target event, such as a compensated user, a user who applies for resources, or a user who rents an article; correspondingly, the event processing task specifically refers to a task of processing a target event in combination with event decision information, different project scenarios correspond to different event processing tasks, such as a compensation task or a non-compensation task for an insurance business project; for example, a resource allocation task or a resource non-allocation task for a shared resource application project. Correspondingly, the event state specifically refers to the state of the target event after the execution of the event processing task, including but not limited to a processing state, an end state, a start state, etc.

[0119] Based on this, when receiving the business text submitted by the user for the target event, the event decision information can be predicted through the text processing model, and on this basis, the event processing task corresponding to the target event can be created and executed according to the event decision information, so as to update the event state corresponding to the target event according to the task execution result.

[0120] On this basis, considering that different event decision information needs to create different tasks, the event needs to be updated to different states in combination with different tasks; in this embodiment, the specific implementation manner is as follows:

[0121] (1) In the case that the event decision information is pass decision information, a first event processing task corresponding to the target event is created and executed according to the pass decision information, and the event state corresponding to the target event is updated to an event completion state according to the task execution result of the first event processing task.

[0122] Based on this, in the case that the event decision information is pass decision information, it means that the event of auditing the business text for the target event is passed, so at this time, the first event processing task corresponding to the target event can be created and executed according to the pass decision information, and the event state corresponding to the target event is updated to an event completion state according to the task execution result of the first event processing task.

[0123] Following the above example, when the model outputs the claim information for user A, an insurance claim task can be created at this time, the claim amount is calculated by executing the insurance claim task, and after the claim amount is compensated to user A, the claim event can be updated to a claim completion state.

[0124] (2) In the case that the event decision information is reject decision information, a second event processing task corresponding to the target event is created and executed according to the reject decision information, and the event state corresponding to the target event is updated to an event audit state according to the task execution result of the second event processing task.

[0125] Based on this, in the case that the event decision information is reject decision information, it means that the event of auditing the business text for the target event is not passed, so at this time, the second event processing task corresponding to the target event can be created and executed according to the reject decision information, and the event state corresponding to the target event is updated to an event audit state according to the task execution result of the second event processing task.

[0126] Following the above example, when the model outputs the non-claim information for user A, an insurance claim task can be created at this time, the claim information or the information audited by the artificial is generated by executing the insurance claim task, which is used to inform the user or notify the audit personnel to re-audit, and the claim event is updated to an audit state, facilitating further audit whether to claim in the future.

[0127] The text processing method provided in the specification can quickly and accurately complete the review of the business text based on the target event. The text segment corresponding to the target event can be generated first, and then input into the text processing model to improve the text review efficiency through the text processing model. On this basis, the initialization unit, extraction unit, exchange unit and processing unit in the text processing model can be used to complete the review. That is, the identification information is added to the text segment first, and then the initialization unit is used to initialize the text segment with the added identification information, so as to obtain the intermediate segment features corresponding to the text segment. Then, the target features corresponding to the text segment are obtained by processing the intermediate segment features through the extraction unit. At this time, the target identification information in the target features is exchanged through the exchange unit, so as to obtain the target segment features, realize the fusion of the context text information through the target identification information, and improve the model prediction accuracy. Finally, the target segment features are input into the processing unit for processing, so as to obtain the event decision information of the target event. In the text review stage, the text processing model can be used to complete the determination of the decision information without being limited by the length of the text, so as to greatly improve the text review accuracy and efficiency, and effectively save the human and material resources.

[0128] The following describes the text processing method provided in the specification in conjunction with the accompanying drawings Figure 5 The text processing method provided in the specification is used in the application of a shared resource application project as an example to further illustrate the text processing method. Wherein, Figure 5 A processing process flowchart of a text processing method provided in an embodiment of the specification is shown, which specifically includes the following steps.

[0129] Step S502, receiving a business text submitted for a target event.

[0130] Step S504, dividing the business text according to a preset length threshold and a text division rule to obtain a text segment.

[0131] Step S506, inputting the text segment into a text processing model.

[0132] The text processing model includes an initialization unit, an extraction unit, an exchange unit and a processing unit.

[0133] Step S508, determining a preset identification information in the text processing model, and adding the identification information to the character starting position of the text segment.

[0134] Step S510, inputting the text segment with the identification information into the initialization unit for initialization processing to obtain intermediate segment features.

[0135] The intermediate segment feature is determined based on an identification feature corresponding to the identification information and a segment feature corresponding to the text segment.

[0136] In step S512, the intermediate segment feature is input to the extraction unit for feature extraction processing to obtain a target feature corresponding to the text segment.

[0137] In step S514, target identification information corresponding to the identification information and a target text segment feature corresponding to the text segment are extracted from the target feature.

[0138] In step S516, the target identification information is input to the exchange unit, a self-attention matrix is generated through an attention layer in the exchange unit, and a similarity matrix is generated through a similarity calculation layer in the exchange unit.

[0139] In step S518, a weight matrix corresponding to the target identification information is determined according to the self-attention matrix and the similarity matrix, and global identification information corresponding to the target identification information is generated according to the weight matrix.

[0140] In step S520, a target segment feature is generated according to the global identification information and the target text segment feature.

[0141] In step S522, the target segment feature is input to the processing unit, and the global identification information in the target segment feature is subjected to average pooling processing through a pooling layer in the processing unit to obtain a text segment feature corresponding to the text segment.

[0142] In step S524, the text segment feature is input to a feature processing layer in the processing unit for fusion processing to obtain a long text feature corresponding to the business text.

[0143] In step S526, the long text feature is input to a fully connected layer in the processing unit for category analysis to obtain event decision information of the target event.

[0144] In step S528, an event processing task corresponding to the target event is created and executed according to the event decision information, and an event state corresponding to the target event is updated according to a task execution result.

[0145] In the case where the event decision information is pass decision information, a first event processing task corresponding to the target event is created and executed according to the pass decision information, and an event state corresponding to the target event is updated to an event completion state according to a task execution result of the first event processing task; in the case where the event decision information is reject decision information, a second event processing task corresponding to the target event is created and executed according to the reject decision information, and an event state corresponding to the target event is updated to an event audit state according to a task execution result of the second event processing task.

[0146] In summary, in order to be able to quickly and accurately complete the review of the business text based on the target event, the text segment can be generated according to the business text corresponding to the target event, and then input into the text processing model to improve the text review efficiency through the text processing model. On this basis, the review can be completed through the initialization unit, extraction unit, exchange unit and processing unit in the text processing model; that is, the identification information is added to the text segment, and then the initialization unit is used to initialize the text segment with the added identification information, so as to obtain the intermediate segment features corresponding to the text segment. Then, the target features corresponding to the text segment are obtained by processing the intermediate segment features through the extraction unit. At this time, the target segment features are obtained by exchanging the target identification information in the target features through the exchange unit, so as to fuse the context text information through the target identification information and improve the model prediction accuracy. Finally, the target segment features are input into the processing unit for processing, so as to obtain the event decision information of the target event. In the text review stage, the text processing model can be used to complete the determination of the decision information without being limited by the length of the text, so as to greatly improve the text review accuracy and efficiency, and effectively save the human and material resources.

[0147] Referring to Figure 6 , Figure 6 A flowchart of another text processing method provided according to one embodiment of the present specification is shown, which specifically includes the following steps.

[0148] In step S602, a text segment is generated according to the medical voucher text corresponding to the claim event, and the text segment is input into a text processing model, wherein the text processing model includes an initialization unit, an extraction unit, an exchange unit and a processing unit.

[0149] In step S604, identification information is added to the text segment, and the initialization unit is used to initialize the text segment with the added identification information, so as to obtain the intermediate segment features.

[0150] In step S606, the target features of the intermediate segment features are extracted through the extraction unit, and the target identification information in the target features is exchanged through the exchange unit, and the target segment features are determined according to the processing result.

[0151] In step S608, the processing unit is used to process the target segment features, so as to obtain the claim decision information of the claim event.

[0152] It should be noted that the descriptions provided in the present embodiment can refer to the same or corresponding descriptions in the above embodiments, and the present embodiment will not be described in detail here.

[0153] Corresponding to the method embodiments, the specification also provides text processing device embodiments, Figure 7 A structural schematic diagram of a text processing device provided by one embodiment of the specification is shown. As shown in the figure, Figure 7 The device comprises:

[0154] The input module 702 is configured to generate a text segment from a business text corresponding to a target event, and input the text segment to a text processing model, wherein the text processing model comprises an initialization unit, an extraction unit, an exchange unit, and a processing unit.

[0155] The initialization module 704 is configured to add identification information to the text segment, and perform initialization processing on the text segment with the added identification information through the initialization unit, to obtain an intermediate segment feature.

[0156] The exchange processing module 706 is configured to extract a target feature of the intermediate segment feature through the extraction unit, and perform information exchange processing on a target identification information in the target feature through the exchange unit, to determine a target segment feature according to a processing result.

[0157] The information determination module 708 is configured to process the target segment feature through the processing unit, to obtain event decision information of the target event.

[0158] In an optional embodiment, the input module 702 is further configured to:

[0159] receive the business text submitted for the target event; split the business text according to a preset length threshold and a text splitting rule, to obtain the text segment; and input the text segment to the text processing model.

[0160] In an optional embodiment, the initialization module 704 is further configured to:

[0161] determine a preset identification information in the text processing model, and add the identification information to a character starting position of the text segment; input the text segment carrying the identification information to the initialization unit for initialization processing, to obtain the intermediate segment feature; wherein the intermediate segment feature is determined based on an identification feature corresponding to the identification information and a segment feature corresponding to the text segment.

[0162] In an optional embodiment, the exchange processing module 706 is further configured to:

[0163] inputting the intermediate segment feature into the extraction unit for feature extraction processing to obtain a target feature corresponding to the text segment; extracting target identification information corresponding to the identification information and a target text segment feature corresponding to the text segment from the target feature; inputting the target identification information into the exchange unit for information exchange processing to obtain global identification information; and generating the target segment feature according to the global identification information and the target text segment feature.

[0164] In an optional embodiment, the exchange processing module 706 is further configured to:

[0165] inputting the target identification information into the exchange unit, generating a self-attention matrix through an attention layer in the exchange unit, and generating a similarity matrix through a similarity calculation layer in the exchange unit; determining a weight matrix corresponding to the target identification information according to the self-attention matrix and the similarity matrix, and generating global identification information corresponding to the target identification information according to the weight matrix.

[0166] In an optional embodiment, the information determination module 708 is further configured to:

[0167] inputting the target segment feature into the processing unit, performing average pooling processing on the global identification information in the target segment feature through a pooling layer in the processing unit to obtain a text segment feature corresponding to the text segment; and processing the text segment feature through a feature processing layer in the processing unit to determine event decision information of the target event according to a processing result.

[0168] In an optional embodiment, the information determination module 708 is further configured to:

[0169] inputting the text segment feature into the feature processing layer in the processing unit for fusion processing to obtain a long text feature corresponding to the business text; and inputting the long text feature into a fully connected layer in the processing unit for category analysis to obtain event decision information of the target event.

[0170] In an optional embodiment, the apparatus further includes:

[0171] The receiving module is configured to receive the business text submitted by a user for the target event.

[0172] The state updating module is configured to create an event processing task corresponding to the target event and perform the event processing task according to the event decision information, and update an event state corresponding to the target event according to a task execution result.

[0173] In an optional embodiment, the state updating module is further configured to:

[0174] In a case that the event decision information is pass decision information, a first event processing task corresponding to the target event is created and executed according to the pass decision information, and an event state corresponding to the target event is updated to an event completion state according to a task execution result of the first event processing task; in a case that the event decision information is reject decision information, a second event processing task corresponding to the target event is created and executed according to the reject decision information, and the event state corresponding to the target event is updated to an event audit state according to a task execution result of the second event processing task.

[0175] In an optional embodiment, the training of the text processing model comprises:

[0176] obtaining a sample text and a sample label, generating a sample text segment from the sample text, inputting the sample text segment into an initial text processing model for processing to obtain sample decision information, and adjusting the initial text processing model according to the sample decision information and the sample label until the text processing model satisfying a training stop condition is obtained.

[0177] In summary, in order to quickly and accurately complete the audit of the business text based on the target event, the text segment can be generated from the business text corresponding to the target event, and then input into the text processing model to improve the text audit efficiency through the text processing model. On this basis, the audit can be completed through the initialization unit, the extraction unit, the exchange unit and the processing unit in the text processing model; that is, the identification information is added to the text segment, and then the initial unit is used to initialize the text segment with the added identification information to obtain the intermediate segment features corresponding to the text segment. Then the extraction unit is used to process the intermediate segment features to obtain the target features corresponding to the text segment, and then the exchange unit is used to exchange the target identification information in the target features to obtain the target segment features, so as to fuse the text information of the context through the target identification information and improve the model prediction accuracy. Finally, the target segment features are input into the processing unit for processing to obtain the event decision information of the target event. In the text audit stage, the text processing model can be used to complete the determination of the decision information without being limited by the length of the text, thereby greatly improving the text audit accuracy and efficiency, and effectively saving the human and material resources.

[0178] Each of the embodiments in the specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each of the embodiments focuses on the difference from other embodiments. In particular, the text processing device is basically similar to the text processing method, and thus the description is relatively simple, and the relevant parts can be referred to the description of the text processing method.

[0179] Corresponding to the method embodiments described above, the specification also provides another text processing device embodiment, Figure 8 The structure schematic diagram of another text processing device provided by an embodiment of the specification is shown. As shown in the figure, Figure 8 The device comprises:

[0180] The input model module 802 is configured to generate a text segment according to the medical voucher text corresponding to the claim event, and input the text segment into a text processing model, wherein the text processing model comprises an initialization unit, an extraction unit, an exchange unit and a processing unit;

[0181] The initialization segment module 804 is configured to add identification information to the text segment, and perform initialization processing on the text segment with the added identification information through the initialization unit, to obtain intermediate segment features;

[0182] The information exchange processing module 806 is configured to extract target features of the intermediate segment features through the extraction unit, and perform information exchange processing on the target identification information in the target features through the exchange unit, to determine target segment features according to the processing result;

[0183] The decision information determination module 808 is configured to process the target segment features through the processing unit, to obtain claim decision information of the claim event.

[0184] Each of the embodiments in the specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each of the embodiments focuses on the difference from other embodiments. In particular, the text processing device is basically similar to the text processing method, and thus the description is relatively simple, and the relevant parts can be referred to the description of the text processing method.

[0185] Figure 9 The structure block diagram of a computing device 900 provided by an embodiment of the specification is shown. The components of the computing device 900 include but are not limited to a memory 910 and a processor 920. The processor 920 is connected with the memory 910 through a bus 930, and a database 950 is used to save data.

[0186] The computing device 900 also includes an access device 940 that enables the computing device 900 to communicate via one or more networks 960. Examples of such networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or combinations of such networks, such as the Internet. The access device 940 can include one or more of any type of network interface (for example, a network interface card (NIC)) such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, Near Field Communication (NFC).

[0187] In one embodiment of the present specification, the above-mentioned components of the computing device 900 and other components not shown in the Figure 9 may be connected to each other, such as through a bus. It should be understood that Figure 9 The computing device structure diagram shown is merely for the purpose of example, and is not a limitation on the scope of the present specification. Other components can be added or replaced by those skilled in the art as needed.

[0188] The computing device 900 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (for example, a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, and the like), a mobile phone (for example, a smartphone), a wearable computing device (for example, a smart watch, smart glasses, and the like), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 900 can also be a mobile or stationary server.

[0189] The processor 920 is configured to execute computer-executable instructions, which, when executed by the processor, implement the steps of the text processing method described above.

[0190] Each of the embodiments in the specification is described in a progressive manner, and the same or similar parts among the embodiments can be referred to each other. Each of the embodiments focuses on the difference from other embodiments. In particular, the computing device embodiment is described simply because it is basically similar to the text processing method embodiment, and the relevant part can be referred to the part of the text processing method embodiment.

[0191] An embodiment of the specification also provides a computer readable storage medium storing computer executable instructions, which, when executed by a processor, implement the steps of the above text processing method.

[0192] Each of the embodiments in the specification is described in a progressive manner, and the same or similar parts among the embodiments can be referred to each other. Each of the embodiments focuses on the difference from other embodiments. In particular, the computer readable storage medium embodiment is described simply because it is basically similar to the text processing method embodiment, and the relevant part can be referred to the part of the text processing method embodiment.

[0193] An embodiment of the specification also provides a computer program, which, when executed in a computer, causes the computer to perform the steps of the above text processing method.

[0194] Each of the embodiments in the specification is described in a progressive manner, and the same or similar parts among the embodiments can be referred to each other. Each of the embodiments focuses on the difference from other embodiments. In particular, the computer program embodiment is described simply because it is basically similar to the text processing method embodiment, and the relevant part can be referred to the part of the text processing method embodiment.

[0195] The above describes specific embodiments of the specification. Other embodiments are within the scope of the appended claims. In some cases, the acts or steps in a claim can be performed in an order different than the order in which the acts or steps are recited, and still accomplish the desired results. Also, the process depicted in the accompanying figures does not necessarily require the particular order shown, or sequential order, to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous.

[0196] The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, software distribution medium, etc. It should be noted that the computer readable medium can include appropriate additions or deletions according to the requirements of patent practice, for example, in some regions, according to the patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.

[0197] It should be noted that the above describes specific embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different than the order in the embodiments and still achieve the desired result. In addition, the processes depicted in the figures do not necessarily require the particular order shown or sequential order to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous or possible. Secondly, those skilled in the art should know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments of the specification.

[0198] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.

[0199] The preferred embodiments of the present specification disclosed above are only used to help explain the present specification. The alternative embodiments do not describe all the details and limit the invention to the specific embodiments described. Obviously, according to the content of the embodiments of the present specification, many modifications and changes can be made. The present specification selects and describes these embodiments in order to better explain the principles and practical applications of the embodiments of the present specification, so that those skilled in the art can well understand and use the present specification. The present specification is limited by the claims and their full scope and equivalents.

Claims

1. A text processing method, comprising: generating a text segment from a business text corresponding to a target event, and inputting the text segment into a text processing model, wherein the text processing model comprises an initialization unit, an extraction unit, an exchange unit, and a processing unit; adding identification information to the text segment, and performing initialization processing on the text segment with the added identification information by the initialization unit to obtain intermediate segment features; extracting target features of the intermediate segment features by the extraction unit, and performing information exchange processing on target identification information in the target features by the exchange unit to determine target segment features according to a processing result, wherein performing information exchange processing on the target identification information in the target features by the exchange unit comprises updating the target identification information in the target features to global identification information by the exchange unit, and updating the target identification information in the target features to global identification information by the exchange unit comprises determining a weight matrix corresponding to the target identification information by a self-attention matrix and a similarity matrix in the exchange unit, and generating global identification information corresponding to the target identification information according to the weight matrix; processing the target segment features by the processing unit to obtain event decision information of the target event.

2. The method of claim 1, wherein generating a text segment from a business text corresponding to a target event, and inputting the text segment into a text processing model comprises: receiving the business text submitted for the target event; segmenting the business text according to a preset length threshold and a text segmentation rule to obtain the text segment; inputting the text segment into the text processing model.

3. The method of claim 1, wherein adding identification information to the text segment, and performing initialization processing on the text segment with the added identification information by the initialization unit to obtain intermediate segment features comprises: determining preset identification information in the text processing model, and adding the identification information to a character start position of the text segment; inputting the text segment carrying the identification information into the initialization unit for initialization processing to obtain the intermediate segment features; wherein the intermediate segment features are determined based on identification features corresponding to the identification information and segment features corresponding to the text segment.

4. The method of claim 1, wherein extracting target features of the intermediate segment features by the extraction unit, and performing information exchange processing on target identification information in the target features by the exchange unit to determine target segment features according to a processing result comprises: inputting the intermediate segment features into the extraction unit for feature extraction processing to obtain target features corresponding to the text segment; extracting target identification information corresponding to the identification information and target text segment features corresponding to the text segment in the target features; inputting the target identification information into the exchange unit for information exchange processing to obtain global identification information; generating the target segment feature according to the global identification information and the target text segment feature.

5. The method of claim 4, wherein the inputting the target identification information into the exchange unit to perform information exchange processing to obtain global identification information comprises: inputting the target identification information into the exchange unit, generating a self-attention matrix by an attention layer in the exchange unit, and generating a similarity matrix by a similarity calculation layer in the exchange unit; determining a weight matrix corresponding to the target identification information according to the self-attention matrix and the similarity matrix, and generating global identification information corresponding to the target identification information according to the weight matrix.

6. The method of claim 4 or 5, wherein the processing the target segment feature by the processing unit to obtain event decision information of the target event comprises: inputting the target segment feature into the processing unit, performing average pooling processing on the global identification information in the target segment feature by a pooling layer in the processing unit to obtain a text segment feature corresponding to the text segment; processing the text segment feature by a feature processing layer in the processing unit, and determining event decision information of the target event according to a processing result.

7. The method of claim 6, wherein the processing the text segment feature by the feature processing layer in the processing unit to determine event decision information of the target event according to a processing result comprises: inputting the text segment feature into the feature processing layer in the processing unit to perform fusion processing, to obtain a long text feature corresponding to the business text; inputting the long text feature into a fully connected layer in the processing unit to perform category analysis, to obtain event decision information of the target event.

8. The method of claim 1, further comprising, before the generating text segments according to a business text corresponding to a target event: receiving the business text submitted by a user for the target event; wherein, after the processing the target segment feature by the processing unit to obtain event decision information of the target event, the method further comprises: creating an event processing task corresponding to the target event according to the event decision information and performing the event processing task, and updating an event state corresponding to the target event according to a task execution result.

9. The method of claim 8, wherein the creating an event processing task corresponding to the target event according to the event decision information and performing the event processing task, and updating an event state corresponding to the target event according to a task execution result comprises: in a case where the event decision information is pass decision information, creating a first event processing task corresponding to the target event according to the pass decision information and performing the first event processing task, and updating the event state corresponding to the target event to an event completion state according to a task execution result of the first event processing task. In a case that the event decision information is rejection decision information, a second event processing task corresponding to the target event is created and executed according to the rejection decision information, and an event state corresponding to the target event is updated to an event audit state according to a task execution result of the second event processing task.

10. The method of claim 1, wherein the training of the text processing model comprises: obtaining sample text and sample labels; generating a sample text segment from the sample text and inputting the sample text segment to an initial text processing model for processing to obtain sample decision information; performing parameter adjustment on the initial text processing model according to the sample decision information and the sample labels until the text processing model satisfying a training stop condition is obtained.

11. A text processing method, comprising: generating a text segment from medical voucher text corresponding to a claim event and inputting the text segment to a text processing model, wherein the text processing model comprises an initialization unit, an extraction unit, a switching unit, and a processing unit; adding identification information to the text segment and performing initialization processing on the text segment with the added identification information by the initialization unit to obtain intermediate segment features; extracting target features of the intermediate segment features by the extraction unit and performing information switching processing on target identification information in the target features by the switching unit to determine target segment features according to a processing result, wherein the information switching processing on the target identification information in the target features by the switching unit comprises updating the target identification information in the target features to global identification information by the switching unit, and the updating of the target identification information in the target features to global identification information by the switching unit comprises determining a weight matrix corresponding to the target identification information by a self-attention matrix and a similarity matrix in the switching unit and generating global identification information corresponding to the target identification information according to the weight matrix; processing the target segment features by the processing unit to obtain claim decision information of the claim event.

12. A text processing apparatus, comprising: an input module configured to generate a text segment from business text corresponding to a target event and input the text segment to a text processing model, wherein the text processing model comprises an initialization unit, an extraction unit, a switching unit, and a processing unit; an initialization module configured to add identification information to the text segment and perform initialization processing on the text segment with the added identification information by the initialization unit to obtain intermediate segment features; The exchange processing module is configured to extract target features of the intermediate segment features through the extraction unit, and perform information exchange processing on target identification information in the target features through the exchange unit, and determine target segment features according to a processing result, wherein the information exchange processing on the target identification information in the target features through the exchange unit comprises updating the target identification information in the target features into global identification information through the exchange unit, and the updating of the target identification information in the target features into global identification information through the exchange unit comprises determining a weight matrix corresponding to the target identification information through a self-attention matrix and a similarity matrix in the exchange unit, and generating global identification information corresponding to the target identification information according to the weight matrix; The information determination module is configured to process the target segment features through the processing unit to obtain event decision information of the target event.

13. A text processing apparatus, comprising: An input model module configured to generate a text segment from medical voucher text corresponding to a claim event, and input the text segment into a text processing model, wherein the text processing model comprises an initialization unit, an extraction unit, an exchange unit, and a processing unit; An initialization segment module configured to add identification information to the text segment, and perform initialization processing on the text segment with the added identification information through the initialization unit to obtain intermediate segment features; An information exchange processing module configured to extract target features of the intermediate segment features through the extraction unit, and perform information exchange processing on target identification information in the target features through the exchange unit, and determine target segment features according to a processing result, wherein the information exchange processing on the target identification information in the target features through the exchange unit comprises updating the target identification information in the target features into global identification information through the exchange unit, and the updating of the target identification information in the target features into global identification information through the exchange unit comprises determining a weight matrix corresponding to the target identification information through a self-attention matrix and a similarity matrix in the exchange unit, and generating global identification information corresponding to the target identification information according to the weight matrix; A decision information determination module configured to process the target segment features through the processing unit to obtain claim decision information of the claim event.

14. A computing device, comprising: a memory and a processor; the memory is configured to store computer executable instructions, and the processor is configured to execute the computer executable instructions, and the computer executable instructions, when executed by the processor, implement steps of the method in any one of claims 1 to 11.

15. A computer readable storage medium storing computer executable instructions, and the computer executable instructions, when executed by a processor, implement steps of the method in any one of claims 1 to 11.

Citation Information

Patent Citations

  • Text scoring method, text scoring model, text scoring device and storage medium

    CN114417815A

  • Text processing method, text processing model training method, device and equipment

    CN114547270A