Business processing method and apparatus, electronic device, and storage medium
Patent Information
- Application Number
- CN202611055486.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-15
- Publication Date
- 2026-10-30
AI Technical Summary
[0004]然而,现有方案容易受到错别字、同音替换、断句错误和口语化习惯影响,使得实体边界识别不准确,甚至出现标签前后语义不一致的情形,进而造成后续知识检索条件偏差,从而导致应答不准确的情况发生
[0065]本申请实施例提供的业务处理方法、装置、电子设备、及存储介质,该方法中通过获取用户输入的待回收物品的待处理业务文本;将待处理业务文本输入至识别模型中,得到目标实体标签,识别模型是基于多种属性状态的物品的业务文本和每个物品对应的标注实体标签,构建的正样本对和负样本对进行训练得到的,正样本对为描述同一属性状态的不同非标表达的两个业务文本,负样本对为描述不同属性状态但易混淆的两个业务文本;根据目标实体标签,确定待处理业务文本对应的目标应答数据。该技术方案中,通过将待处理业务文本输入至基于多种属性状态的物品业务文本及其对应标注实体标签、并结合描述同一属性状态的不同非标表达的正样本对和描述不同属性状态但易混淆的负样本对训练得到的识别模型中,以得到目标实体标签,能够提高对型号缩写、别名混用、错别字及同音替换等复杂非标准文本的实体识别准确性和标签判定一致性,进而根据目标实体标签确定待处理业务文本对应的目标应答数据,提高业务问答结果的准确性、稳定性和一致性。
Smart Images

Figure CN123013922A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a business processing method, apparatus, electronic device, and storage medium. Background Technology
[0002] In the business of items to be recycled, especially in the scenarios of recycling acceptance, quality inspection prediction, customer service reception and store operation collaboration for consumer electronics products such as mobile phones, tablets and smart wearable devices, the business system usually needs to understand and respond to the pending business texts submitted by users.
[0003] Currently, the processing solutions for the business text of the above-mentioned items to be recycled typically use a pre-trained language model for semantic encoding, and then combine it with sequence labeling to identify entity tags such as brand, model, capacity, fault phenomenon, appearance condition, and battery status in the text. After identification, the corresponding results are used as conditions to input into the knowledge base retrieval or question-and-answer generation process to form a business response for users.
[0004] However, existing solutions are susceptible to typos, homophone substitutions, grammatical errors, and colloquialisms, which can lead to inaccurate entity boundary recognition and even semantic inconsistencies before and after labels. This can cause deviations in subsequent knowledge retrieval conditions, resulting in inaccurate responses. Summary of the Invention
[0005] The business processing method, apparatus, electronic device, and storage medium provided in the embodiments of this application are used to achieve the technical effect of improving the accuracy of responses to business texts.
[0006] In a first aspect, embodiments of this application provide a business processing method, including:
[0007] Obtain the pending business text of the items to be recycled, input by the user;
[0008] The business text to be processed is input into the recognition model to obtain the target entity label. The recognition model is trained by constructing positive sample pairs and negative sample pairs based on the business text of items with multiple attribute states and the labeled entity label corresponding to each item. The positive sample pair is two business texts that describe the same attribute state in different non-standard expressions, and the negative sample pair is two business texts that describe different attribute states but are easily confused.
[0009] Based on the target entity tag, determine the target response data corresponding to the business text to be processed.
[0010] In one or more embodiments, determining the target response data corresponding to the business text to be processed based on the target entity tag includes:
[0011] Based on the target entity label and the business text to be processed, multiple candidate knowledge fragments corresponding to the business text to be processed are determined in a multi-source database. The multi-source database includes: a historical question-answer pair knowledge base, a retrieval-enhanced generation knowledge base, and a structured knowledge graph.
[0012] The multiple candidate knowledge fragments, the business text to be processed, and the target entity tags are input into the large language model to obtain the target response data.
[0013] In one or more embodiments, the recognition model includes: a pre-trained language model, a linear slicing layer, and a conditional random field decoding layer;
[0014] Accordingly, before inputting the business text to be processed into the recognition model to obtain the target entity label, the method further includes:
[0015] Obtain the business text of the items with the various attribute states and the corresponding annotation entity label for each item;
[0016] For each attribute state of an item's business text, the positive sample pair and the negative sample pair are constructed based on the business text of the item's attribute state, respectively.
[0017] Based on the entity labels of all attribute states of the items, business text, positive and negative sample pairs, the pre-trained language model, the linear hierarchical layer, and the conditional random field decoding layer, determine the entity label labeling loss, contrastive learning loss, and adversarial training loss.
[0018] The entity labeling loss, the contrastive learning loss, and the adversarial training loss are weighted and fused to construct a joint optimization objective function;
[0019] The recognition model is determined based on the joint optimization objective function.
[0020] In one or more embodiments, determining the entity labeling loss, contrastive learning loss, and adversarial training loss based on the labeled entity labels of items with all attribute states, business text, positive and negative sample pairs, the pre-trained language model, the linear hierarchical layer, and the conditional random field decoding layer includes:
[0021] For each item with a specific attribute state, the entity label annotation loss is determined based on the business text, the labeled entity tags, the pre-trained language model, the linear hierarchical layer, and the conditional random field decoding layer.
[0022] The contrastive learning loss is determined based on the positive and negative sample pairs and the pre-trained language model.
[0023] Gradient direction perturbation is applied to the word vector layer or intermediate embedding layer of the pre-trained language model to generate adversarial examples, and the adversarial training loss is generated based on the adversarial examples.
[0024] In one or more embodiments, determining the entity label annotation loss based on the business text, the labeled entity tags, the pre-trained language model, the linear hierarchical layer, and the conditional random field decoding layer includes:
[0025] The business text is input into the pre-trained language model to obtain the first semantic representation vector of the word unit;
[0026] The first semantic representation vector is sequentially input into the linear scaling layer and the conditional random field decoding layer, and the business legality constraints are modeled using the label transition matrix to obtain the predicted entity label;
[0027] Based on the predicted entity labels and the labeled entity labels, calculate the entity label annotation loss.
[0028] In one or more embodiments, determining the contrastive learning loss based on the positive sample pairs and negative sample pairs, and the pre-trained language model, includes:
[0029] The positive sample pairs and negative sample pairs are respectively input into the pre-trained language model to obtain the second semantic representation vector corresponding to the positive sample pair and the third semantic representation vector corresponding to the negative sample pair;
[0030] The contrastive learning loss is determined based on the second semantic representation vector and the third semantic representation vector.
[0031] In one or more embodiments, before inputting the business text to be processed into the recognition model to obtain the target entity label, the method further includes:
[0032] The business text to be processed is cleaned, and the cleansing process includes: preset symbol filtering, typo correction, unit standardization, and mapping non-standard descriptions to standard descriptions.
[0033] Secondly, embodiments of this application provide a business processing apparatus, including:
[0034] The acquisition module is used to acquire the pending business text of items to be recycled, which is input by the user.
[0035] The processing module is used to input the business text to be processed into the recognition model to obtain the target entity label. The recognition model is trained by constructing positive sample pairs and negative sample pairs based on the business text of items with multiple attribute states and the labeled entity label corresponding to each item. The positive sample pair is two business texts that describe the same attribute state in different non-standard expressions, and the negative sample pair is two business texts that describe different attribute states but are easily confused.
[0036] The determination module is used to determine the target response data corresponding to the business text to be processed based on the target entity tag.
[0037] In one or more embodiments, the determining module determines the target response data corresponding to the business text to be processed based on the target entity tag, specifically for:
[0038] Based on the target entity label and the business text to be processed, multiple candidate knowledge fragments corresponding to the business text to be processed are determined in a multi-source database. The multi-source database includes: a historical question-answer pair knowledge base, a retrieval-enhanced generation knowledge base, and a structured knowledge graph.
[0039] The multiple candidate knowledge fragments, the business text to be processed, and the target entity tags are input into the large language model to obtain the target response data.
[0040] In one or more embodiments, the recognition model includes: a pre-trained language model, a linear slicing layer, and a conditional random field decoding layer;
[0041] Accordingly, before inputting the business text to be processed into the recognition model to obtain the target entity label, the processing module is further configured to:
[0042] Obtain the business text of the items with the various attribute states and the corresponding annotation entity label for each item;
[0043] For each attribute state of an item's business text, the positive sample pair and the negative sample pair are constructed based on the business text of the item's attribute state, respectively.
[0044] Based on the entity labels of all attribute states of the items, business text, positive and negative sample pairs, the pre-trained language model, the linear hierarchical layer, and the conditional random field decoding layer, determine the entity label labeling loss, contrastive learning loss, and adversarial training loss.
[0045] The entity labeling loss, the contrastive learning loss, and the adversarial training loss are weighted and fused to construct a joint optimization objective function;
[0046] The recognition model is determined based on the joint optimization objective function.
[0047] In one or more embodiments, the processing module determines entity labeling loss, contrastive learning loss, and adversarial training loss based on the labeled entity tags of items with all attribute states, business text, positive and negative sample pairs, the pre-trained language model, the linear hierarchical layer, and the conditional random field decoding layer, specifically for:
[0048] For each item with a specific attribute state, the entity label annotation loss is determined based on the business text, the labeled entity tags, the pre-trained language model, the linear hierarchical layer, and the conditional random field decoding layer.
[0049] The contrastive learning loss is determined based on the positive and negative sample pairs and the pre-trained language model.
[0050] Gradient direction perturbation is applied to the word vector layer or intermediate embedding layer of the pre-trained language model to generate adversarial examples, and the adversarial training loss is generated based on the adversarial examples.
[0051] In one or more embodiments, the processing module determines the entity label annotation loss based on the business text, the labeled entity tags, the pre-trained language model, the linear hierarchical layer, and the conditional random field decoding layer, specifically for:
[0052] The business text is input into the pre-trained language model to obtain the first semantic representation vector of the word unit;
[0053] The first semantic representation vector is sequentially input into the linear scaling layer and the conditional random field decoding layer, and the business legality constraints are modeled using the label transition matrix to obtain the predicted entity label;
[0054] Based on the predicted entity labels and the labeled entity labels, calculate the entity label annotation loss.
[0055] In one or more embodiments, the processing module determines the contrastive learning loss based on the positive sample pairs and negative sample pairs, and the pre-trained language model, specifically for:
[0056] The positive sample pairs and negative sample pairs are respectively input into the pre-trained language model to obtain the second semantic representation vector corresponding to the positive sample pair and the third semantic representation vector corresponding to the negative sample pair;
[0057] The contrastive learning loss is determined based on the second semantic representation vector and the third semantic representation vector.
[0058] In one or more embodiments, before inputting the business text to be processed into the recognition model to obtain the target entity label, the processing module is further configured to:
[0059] The business text to be processed is cleaned, and the cleansing process includes: preset symbol filtering, typo correction, unit standardization, and mapping non-standard descriptions to standard descriptions.
[0060] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;
[0061] The memory stores computer-executed instructions;
[0062] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.
[0063] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.
[0064] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.
[0065] The business processing method, apparatus, electronic device, and storage medium provided in this application embodiment include: The method involves acquiring the business text to be processed for items to be recycled, input by a user; inputting the business text to be processed into a recognition model to obtain target entity labels; the recognition model is trained on positive and negative sample pairs constructed from the business text of items with multiple attribute states and the corresponding labeled entity labels for each item; positive sample pairs are two business texts describing different non-standard expressions of the same attribute state, and negative sample pairs are two business texts describing different attribute states but easily confused; and the target response data corresponding to the business text to be processed is determined based on the target entity labels. In this technical solution, the target entity label is obtained by inputting the business text to be processed into the item business text based on multiple attribute states and its corresponding labeled entity tags, and combining positive sample pairs describing different non-standard expressions of the same attribute state with negative sample pairs describing different attribute states that are easily confused. This improves the accuracy of entity recognition and the consistency of label determination for complex non-standard texts such as model abbreviations, mixed aliases, misspellings and homophone substitutions. Then, the target response data corresponding to the business text to be processed is determined according to the target entity label, thereby improving the accuracy, stability and consistency of business question and answer results. Attached Figure Description
[0066] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0067] Figure 1 A flowchart illustrating the business processing method provided in the embodiments of this application. Figure 1 ;
[0068] Figure 2 A flowchart illustrating the business processing method provided in the embodiments of this application. Figure 2 ;
[0069] Figure 3 A flowchart illustrating the business processing method provided in the embodiments of this application. Figure 3 ;
[0070] Figure 4 A flowchart illustrating the business processing method provided in the embodiments of this application. Figure 4 ;
[0071] Figure 5 This is a schematic diagram of the structure of the business processing apparatus provided in the embodiments of this application;
[0072] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0073] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0074] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0075] In the field of processing items to be recycled, especially in the scenarios of recycling acceptance, quality inspection prediction, customer service reception and store operation collaboration for consumer electronics products such as mobile phones, tablets and smart wearable devices, the business system usually needs to understand and respond to the pending business texts submitted by users.
[0076] The text to be processed may originate from user descriptions entered in mini-programs, applications (Apps), or web pages, or from work orders entered by customer service representatives, consultation records collected by store sales staff, or text content generated from voice calls through automatic speech recognition. The system architecture typically includes a front-end acceptance module, a business text processing module, an entity recognition module, a knowledge retrieval module, and a response output module. The front-end acceptance module is responsible for obtaining user descriptions of the items to be recycled, such as model, condition, fault, repair history, battery status, and screen status. The business text processing module performs basic text cleaning and segmentation. The entity recognition module extracts attribute information related to the item's condition from the text. The knowledge retrieval module queries business rules, recycling strategies, or standard Q&A content based on the recognition results. The response output module returns estimated results, processing suggestions, or next interaction prompts to the user.
[0077] In actual business operations, users often use highly colloquial, non-standardized, or even compressed text to quickly express the condition of items to be recycled. For example, "The 14xm frame is slightly dented," "The battery is around 85%," "The outer screen has been replaced but it still works," "There is some screen burn-in but it's not serious." These texts often contain multi-dimensional information such as model, fault, repair status, and condition. Furthermore, different users express the same attribute status in significantly different ways. Therefore, how to reliably understand business text under complex input conditions has become a key foundation for the successful implementation of intelligent processing systems for items to be recycled.
[0078] In existing technologies, the processing solutions for the business text of the items to be recycled typically employ a pre-trained language model for semantic encoding, and then combine it with sequence labeling to identify entity tags such as brand, model, capacity, fault phenomenon, appearance condition, and battery status in the text. After identification, the corresponding results are used as conditions to input into the knowledge base retrieval or question-and-answer generation process to form a business response for the user.
[0079] Its general working method is as follows: first, the user input text is segmented, vectorized, and contextualized; then, an entity recognition model predicts the corresponding tags for each word or character; finally, the entity content is recovered based on the combination of predicted tags; and finally, the system calls the recycling rule base, question-answering base, or business strategy module based on the entity content to output the result. This type of solution has significant shortcomings in the real-world environment of recycling business:
[0080] 1) User descriptions are often not standard terms, but a mixture of non-standard abbreviations, colloquialisms, ellipses and vague expressions, such as “20 broken sale”, “20xmax”, “20xm”, “battery not lasts long”, “cannot charge”, “screen has a mark”, etc. Existing solutions have difficulty in reliably determining which texts belong to the same attribute state, resulting in the same item state being split into multiple inconsistent recognition results due to differences in expression.
[0081] 2) Existing solutions are susceptible to typos, homophone substitutions, grammatical errors, and colloquial language, leading to inaccurate entity boundary recognition and even semantic inconsistencies before and after labels, which in turn cause deviations in subsequent knowledge retrieval conditions. For example, descriptions that should be identified as having the same quality attribute may be missegmented into multiple fragments, or different attribute states may be confused, resulting in a mismatch between the system's recycling response and the user's actual item situation.
[0082] 3) Text describing items to be recycled often uses different expressions to represent the same or different states, which can easily lead to confusion. For example, "battery 85", "battery health 85", and "battery efficiency 85" should all be classified as the same attribute state, while "minor bump" and "border deformation", "dent" and "screen leakage" may be similar in wording but correspond to completely different business judgments. Current processing methods lack a dedicated training mechanism for distinguishing between positive and negative relationships, making it difficult to develop a stable and generalizable attribute state recognition capability in complex business texts.
[0083] The direct consequence of this is that the system outputs inaccurate response data and poor consistency, which affects not only the user experience but also the reliability of recycling pricing, manual review, and subsequent performance processes.
[0084] Accordingly, addressing the technical problems existing in the prior art, the inventors of this application propose the following: Regarding the issues of insufficient accuracy and poor consistency in response data caused by non-standard expressions in the user-input descriptions of items to be recycled and the potential for confusion between different states, the inventors drew inspiration from the cognitive logic of semantic equivalence merging and differentiation of easily confused states in manual recycling quality inspection. They realized that if the model could learn to map multiple colloquial and non-standard expressions under the same attribute to unified entity labels, while simultaneously strengthening its ability to distinguish between semantically similar but actually different texts, the consistency of understanding user intent could be fundamentally improved. Therefore, this invention proposes constructing two types of training samples using business text with multiple attributes: positive sample pairs are used to learn the equivalence relationships between different statements of the same state, and negative sample pairs are used to learn the distinction boundaries between easily confused but different states. This enables the recognition model to have a stable and accurate entity label output capability, thereby ensuring that subsequent response data is highly aligned with the user's actual item state, significantly improving user experience and enhancing the reliability of recycling pricing and fulfillment processes.
[0085] Based on the above-mentioned technical concept and technical problems, the technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems will be described in detail below with specific embodiments. The subject of this technical solution is an electronic device.
[0086] The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.
[0087] Figure 1 A flowchart illustrating the business processing method provided in the embodiments of this application. Figure 1 ,like Figure 1 As shown, the method includes:
[0088] Step 11: Obtain the pending business text of the items to be recycled input by the user;
[0089] In this step, the pending business text can refer to the business text content entered by the user and awaiting further processing, such as the condition description, attribute status description, and recycling consultation information related to the items to be recycled.
[0090] Optionally, the business text to be processed can come from various access channels, such as: consultation text filled in by users in mini programs, mobile applications, or web pages; work order content entered by customer service in the agent system; consultation records collected by store sales guides in the service terminal; or transcribed text generated by automatic speech recognition of user voice calls, etc.
[0091] Step 12: Input the business text to be processed into the recognition model to obtain the target entity label;
[0092] The recognition model is trained by constructing positive and negative sample pairs based on the business text of items with multiple attribute states and the corresponding labeled entity tags of each item. The positive sample pair is two business texts that describe the same attribute state in different non-standard expressions, and the negative sample pair is two business texts that describe different attribute states but are easily confused.
[0093] In this step, the recognition model is used to perform entity recognition on the business text to be processed and output target entity labels. The target entity labels are the recognition model's judgment results on the entity boundaries and entity categories in the text. They can correspond to business entities such as brand, model, capacity, color, repair history, appearance damage, battery health, screen status, and functional failure. They can also be further refined into condition-related attribute status labels to describe the actual state of the items to be recycled under different conditions.
[0094] Optionally, the recognition model can be formed by jointly training positive and negative sample pairs on the basis of the business text of items with multiple attribute states and their corresponding labeled entity labels. The business text of items with multiple attribute states can cover various types of items to be recycled, such as mobile phones, tablets, and smart wearable devices, and cover multiple attribute states such as appearance, screen, battery, repair, function, liquid ingress, and deformation; the labeled entity labels corresponding to each item are used to provide supervision signals for entity location and entity type for the model; positive sample pairs are used to characterize the correlation between different non-label expressions describing the same attribute state.
[0095] For example, "battery 85", "battery health 85", and "battery efficiency 85" can form a positive sample pair with the same attribute state; negative sample pairs are used to characterize the distinguishing relationship between business texts that describe different attribute states but are easily confused. For example, "slight bump" and "border deformation", "indentation" and "screen leakage" can form a negative sample pair that is easily confused but semantically different.
[0096] Optionally, the recognition model includes: pre-trained language models (e.g., Bidirectional Encoder Representations from Transformers (BERT), Robustly Optimized BERT Pretraining Approach (RoBERTa)), linear layering, and Conditional Random Field (CRF) decoding layers.
[0097] In this implementation, the pre-trained language model is used to perform contextual semantic encoding on business texts to obtain a first semantic representation vector at the token level; the linear scoring layer is configured to map the semantic representation to local scores of each entity tag; the conditional random field decoding layer is configured to output valid target entity tags in combination with tag transition relationships.
[0098] Correspondingly, the recognition model may adopt a structure combining a pre-trained language model and a sequence labeling network; the to-be-processed business text is first segmented into words or characters and encoded as word vectors, character vectors or subword vectors, then a contextual semantic representation is extracted via a contextual encoding layer, and subsequently the sequence labeling layer outputs the tag distribution corresponding to each position.
[0099] In an exemplary implementation, the model main body may include a text encoding module, a contrastive learning representation module and a tag decoding module; the text encoding module is configured to generate a contextual semantic vector of the business text; the contrastive learning representation module receives a sample set composed of positive sample pairs and negative sample pairs in the training phase, and brings different non-standard expressions of the same attribute state close to each other in the vector space and separates expressions with similar literal meanings but different attribute states in the vector space through distance constraint or similarity constraint; the tag decoding module maps the contextual representation to a target entity tag sequence in combination with the supervision signal of the entity annotation task; for the contrastive learning part, a loss function based on cosine similarity or a margin loss function may be used, in which the similarity of positive sample pairs is increased and the similarity of negative sample pairs is decreased, so that the model has more stable semantic normalization and confusable distinction capabilities after training is completed.
[0100] Optionally, before step 12, the following may further be performed: performing cleaning processing on the to-be-processed business text, where the cleaning processing includes preset symbol filtering, typo correction, unit standardization, and mapping of non-standard descriptions to standard descriptions.
[0101] In this implementation, the preset symbol filtering is used to remove duplicate punctuation marks, emoticons, decorative symbols, separators and noise characters unrelated to entity recognition in the business text, so that the input text retains valid semantics related to model, condition, fault and battery state; the typo correction is used to correct wrong characters and words formed by users due to spoken input, pinyin miswriting and homophone replacement into standard characters and words based on dictionary matching, contextual language model or rule base; the unit standardization is used to uniformly convert different expressions such as "%", "tenths", "about" and "more than" into preset units or unified dimension expressions; the mapping of non-standard descriptions to standard descriptions is used to map colloquial, abbreviated or industry-customary expressions such as "20xm", "twenty broken" and "outer screen broken but usable" to preset standard business terms.
[0102] In actual implementation, the to-be-processed business text may sequentially pass through at least one of the above cleaning processes, and the execution order and the like are not limited.
[0103] Step 13: Determine the target response data corresponding to the business text to be processed based on the target entity tag.
[0104] In this step, the target response data can be the business output content that corresponds to the current pending business text, determined based on the target entity tag. Its function is to return processing results, consultation replies, business prompts or follow-up guidance information that match the status of the items to be recycled to users, customer service or store operators.
[0105] The target response data can be standardized question and answer text, pre-valuation prompts, supplementary question content, re-inspection suggestions, risk notifications, rule hit results, or structured response objects for subsequent business modules to call.
[0106] Furthermore, the target response data can undergo consistency verification and formatted encapsulation before output: it can verify whether the response content completely corresponds to the target entity tag, whether there are any missing key states, whether mutual exclusion rules are met, and whether it conforms to the display specifications of the current channel; during formatting and encapsulation, different forms of data structures can be output according to the front-end type. For example, highly readable natural language responses can be output to the user end, structured cards with tag descriptions can be output to the customer service workbench, acceptance suggestion interfaces with operation buttons can be output to the store terminal, and standard attribute key-value pairs can be output to the downstream pricing system.
[0107] The business processing method provided in this application embodiment obtains the business text to be processed for items to be recycled, input by the user; inputs the business text to be processed into a recognition model to obtain target entity tags. The recognition model is trained on positive and negative sample pairs constructed based on business texts of items with multiple attribute states and corresponding labeled entity tags for each item. Positive sample pairs are two business texts with different non-standard expressions describing the same attribute state, and negative sample pairs are two business texts with different attribute states that are easily confused. Based on the target entity tags, the target response data corresponding to the business text to be processed is determined. In this technical solution, by inputting the business text to be processed into a recognition model trained on business texts of items with multiple attribute states and their corresponding labeled entity tags, and combining positive sample pairs describing the same attribute state with negative sample pairs describing different attribute states that are easily confused, the target entity tags are obtained. This improves the accuracy of entity recognition and the consistency of tag determination for complex non-standard texts such as model abbreviations, mixed aliases, misspellings, and homophone substitutions. Furthermore, based on the target entity tags, the target response data corresponding to the business text to be processed is determined, improving the accuracy, stability, and consistency of business question-and-answer results.
[0108] Based on the above embodiments, Figure 2A flowchart illustrating the business processing method provided in the embodiments of this application. Figure 2 ,like Figure 2 As shown, step 13 may include:
[0109] Step 21: Based on the target entity tags and the business text to be processed, identify multiple candidate knowledge fragments corresponding to the business text to be processed in the multi-source database;
[0110] The multi-source databases include: a historical question-and-answer pair knowledge base, a retrieval-enhanced generative knowledge base, and a structured knowledge graph;
[0111] In this step, the multi-source database can be a collection of databases used to store and retrieve knowledge fragments from multiple sources, its function being to provide candidate knowledge support for the generation of target response data. Specifically:
[0112] 1) Historical question-and-answer knowledge bases are used to store question-and-answer records from past business processes and return response fragments that are semantically similar to the text of the business process to be processed and match the target entity tags during retrieval; for example, vector knowledge bases (question-and-answer (QA) pairs indexed by some retrieval libraries);
[0113] 2) The Retrieval-Augmented Generation (RAG) knowledge base is used to store policy documents, business description documents, and searchable semantic fragments to provide supplementary textual support for the large language model;
[0114] 3) Structured knowledge graphs are used to store structured relationships between brands, models, configurations, faults and solutions, thereby outputting deterministic knowledge content associated with target entity tags;
[0115] Furthermore, candidate knowledge fragments can be knowledge content that may be related to the business text to be processed, selected from the aforementioned multi-source databases, and used to provide multi-source knowledge input during the generation stage.
[0116] For example, after receiving the business text to be processed and the target entity tags output by the recognition model, the target entity tags are first used as retrieval constraints (e.g., the target entity tags are used as structured query conditions to filter knowledge graph nodes, or as filtering fields in vector retrieval), and then combined with the semantic representation of the business text to be processed, the historical question-and-answer pair knowledge base, the retrieval-enhanced generation knowledge base, and the structured knowledge graph are accessed respectively:
[0117] For the historical question-and-answer knowledge base, questions and answers in historical question-and-answer records can be retrieved based on text vector similarity and entity tag matching, thereby extracting question-and-answer fragments similar to the current business scenario; for the retrieval-enhanced knowledge base, vector retrieval can be performed on business rule texts, quality judgment instructions, and recycling strategy instructions to extract paragraphs related to text semantics as candidate knowledge fragments; for the structured knowledge graph, the corresponding entity node can be located based on the target entity tag, and the state description, business constraints, or judgment rules related to the entity can be queried along the attribute relationship edge to form a graph-type candidate knowledge fragment.
[0118] Step 22: Input multiple candidate knowledge fragments, business text to be processed, and target entity labels into the large language model to obtain target response data.
[0119] In this step, the large language model is used to perform joint reasoning on candidate knowledge fragments, business text to be processed, and target entity labels, and outputs a natural language response that conforms to the business rules, i.e., the target response data.
[0120] For example, multiple candidate knowledge fragments from different sources are deduplicated, sorted, and integrated (e.g., candidate knowledge fragments can be deduplicated and sorted according to vector similarity or business priority, and then concatenated into context), and together with the business text to be processed and the target entity labels, they constitute the context input of the large language model, thereby generating target response data.
[0121] It should be understood that in practical applications, large language models can adopt generative models with long contextual understanding capabilities, and their models can be selected according to deployment resources and response latency requirements. This application embodiment does not limit this.
[0122] The business processing method provided in this application determines multiple candidate knowledge fragments corresponding to the business text to be processed in a multi-source database based on the target entity tags and the business text to be processed. The multi-source database includes: a historical question-and-answer pair knowledge base, a retrieval-enhanced generation knowledge base, and a structured knowledge graph. Multiple candidate knowledge fragments, the business text to be processed, and the target entity tags are input into a large language model to obtain target response data. This technical solution, by fusing multiple source databases to generate candidate knowledge fragments, can significantly improve the breadth and diversity of knowledge coverage. Furthermore, by inputting the candidate knowledge fragments, the business text to be processed, and the target entity tags into the large language model, the model can obtain rich, multi-dimensional, and highly relevant contextual support when generating target response data. This effectively alleviates the information bias or missing information problems caused by a single data source, improves the accuracy and consistency of responses and the adaptability to complex business scenarios, while reducing the risk of the large language model generating illusions.
[0123] Based on the above embodiments, Figure 3 A flowchart illustrating the business processing method provided in the embodiments of this application. Figure 3 ,like Figure 3 As shown, step 12 may include:
[0124] Step 31: Obtain the business text of items with multiple attribute states and the corresponding annotation entity label for each item;
[0125] In this step, the business text of items with various historical attribute states is cleaned, labeled, and sample pairs are constructed. The cleaned business text is archived according to attribute state, and then labeled by labelers or semi-automatic labeling tools to label entities such as brand, model, and attribute state in the business text to obtain the labeled entity tags corresponding to the item.
[0126] Step 32: For the business text of items with each attribute status, construct positive sample pairs and negative sample pairs based on the business text of items with each attribute status;
[0127] In this step, positive sample pairs are constructed by extracting semantically equivalent but different text pairs based on the labeled entity tags; negative sample pairs are constructed by extracting text pairs with similar word meanings but different business judgments.
[0128] 1) The attribute state is the battery dimension state:
[0129] Positive sample pair: Battery efficiency 85% ↔ Battery life 85%; Battery health 86% ↔ Battery health around 86%.
[0130] Negative sample pairs (e.g., both are talking about batteries, but with different meanings and different impacts on price): No abnormalities in the battery ↔ Battery bulging.
[0131] 2) The attribute state is the state of the appearance dimension:
[0132] Positive sample pair: Slight scratches on the outer shell ↔ Minor signs of use on the body; Small bumps on the frame ↔ Slight bumps on the corners;
[0133] Negative sample pair: Minor scratches on the body ↔ Obvious bumps and knocks on the body.
[0134] 3) The attribute state is the state in the screen dimension:
[0135] Positive sample pair: Minor scratches on the screen ↔ Slight signs of use on the outer screen; Small scratches on the screen ↔ Slight scratches on the display panel;
[0136] Negative sample pair: Minor scratches on the screen ↔ Cracked outer screen.
[0137] Step 33: Based on the entity labels of all attribute states of the items, business text, positive and negative sample pairs, pre-trained language model, linear hierarchical layer, and conditional random field decoding layer, determine the entity label labeling loss, contrastive learning loss, and adversarial training loss.
[0138] In this step, based on the labeled entity labels, business text, positive and negative sample pairs of all the attribute states of the items obtained above, the pre-trained language model, linear hierarchical layering, and conditional random field decoding layer are processed to determine the entity label labeling loss, contrastive learning loss, and adversarial training loss.
[0139] The three types of losses mentioned above share the output representation of the same pre-trained language model and are calculated through different task branches.
[0140] Step 34: Weight and fuse the entity labeling loss, contrastive learning loss, and adversarial training loss to construct a joint optimization objective function;
[0141] In this step, the entity labeling loss, contrastive learning loss, and adversarial training loss are weighted and fused according to preset weight coefficients, so that the model can simultaneously optimize entity recognition accuracy, semantic consistency, and anti-interference ability, and construct a unified joint optimization objective function.
[0142] Step 35: Determine the recognition model based on the joint optimization objective function.
[0143] In this step, based on the joint optimization objective function, the corresponding parameters of the pre-trained language model, linear hierarchical layering, and conditional random field decoding layer are continuously optimized to obtain the recognition model.
[0144] The business processing method provided in this application involves acquiring business text of items with multiple attribute states and corresponding entity labels for each item; constructing positive and negative sample pairs based on the business text of each attribute state item; determining entity label annotation loss, contrastive learning loss, and adversarial training loss based on the entity labels of all attribute states items, business text, positive and negative sample pairs, pre-trained language model, linear hierarchical layering, and conditional random field decoding layer; weightedly fusing the entity label annotation loss, contrastive learning loss, and adversarial training loss to construct a joint optimization objective function; and determining the recognition model based on the joint optimization objective function. This technical solution integrates business text with multiple attributes, labeled entity tags, and positive and negative sample pairs. It combines a pre-trained language model, linear hierarchical layering, and conditional random field decoding layer. Simultaneously, it introduces entity tag annotation loss, contrastive learning loss, and adversarial training loss. This significantly improves the accuracy of the item recognition model in complex quality scenarios: entity tag annotation loss ensures the model accurately identifies the boundaries of core entities; contrastive learning loss enhances the model's ability to distinguish subtle differences between different quality items by bringing positive sample pairs closer and pushing negative sample pairs further apart; and adversarial training loss effectively suppresses the model's overfitting to noise or domain shift by simulating input perturbations, mitigating the unstable effects of labeling bias.
[0145] Based on the above embodiments, Figure 4 A flowchart illustrating the business processing method provided in the embodiments of this application. Figure 4 ,like Figure 4 As shown, step 33 may include:
[0146] Step 41: For each item with an attribute state, determine the entity label annotation loss based on the business text, labeled entity tags, pre-trained language model, linear hierarchical layer, and conditional random field decoding layer;
[0147] In this step, entity labels are used to characterize attribute fragments such as model, condition, fault, battery status, and screen status in the business text of the items to be recycled; the business text is non-standard descriptive text entered by the user or customer service; the pre-trained language model is used to perform contextual encoding on the text, the linear hierarchical layer is used to map the label scores of each character or word; the conditional random field decoding layer is used to constrain the overall consistency of the label sequence so that adjacent labels satisfy the entity boundary and semantic continuity relationship.
[0148] In one possible implementation, for each item with an attribute state, the business text is input into a pre-trained language model to obtain a hidden representation. Then, the emission score of each label is generated through linear layering. The label path probability is calculated by combining the conditional random field decoding layer and compared with the real path corresponding to the labeled entity label to obtain the entity label annotation loss.
[0149] Optionally, one possible implementation of step 41 may include:
[0150] Step 1: Input the business text into the pre-trained language model to obtain the first semantic representation vector of the word;
[0151] In this implementation, the first semantic representation vector of a word is used to characterize the semantic information of each word in the context, and can retain attribute clues such as model, condition, fault and maintenance history.
[0152] In one possible implementation, the business text is segmented into words or characters and then input into a pre-trained language model to obtain the context vector corresponding to each word, which is denoted as the first semantic representation vector.
[0153] Step 2: Input the first semantic representation vector into the linear cascading layer and the conditional random field decoding layer in sequence, and use the label transition matrix to model the business legality constraints to obtain the predicted entity label;
[0154] In this implementation, the first semantic representation vector is then input into a linear layer to obtain the local score vector of each label. Subsequently, the conditional random field decoding layer calculates the path score of the entire label sequence based on the local score vector and the label transition matrix, and selects the sequence with the highest score from the candidate paths as the predicted entity label.
[0155] The label transition matrix defines the legal transition relationships between labels (e.g., B-Model can only be followed by I-Model or O label, but not I-Brand); it combines the local score vector and the label transition matrix to calculate the path probability of all possible label sequences, and selects the sequence with the highest score as the prediction result, i.e., the predicted entity label.
[0156] Step 3: Calculate the entity label annotation loss based on the predicted entity labels and the labeled entity labels.
[0157] In this implementation, the entity labeling loss can be calculated by the sequence difference between the predicted entity label and the labeled entity label. Specifically, it can be in the form of negative log-likelihood, so that the model can simultaneously optimize the label discrimination ability of individual words and the sequence consistency of adjacent labels during training.
[0158] After repeated iterations and updates on the training set of recycled business texts, the entity labeling loss can enable the model to more stably distinguish entity boundaries such as model, appearance, fault, and battery health, and reduce label jumps and labeling conflicts.
[0159] Step 42: Determine the contrastive learning loss based on the positive and negative sample pairs and the pre-trained language model;
[0160] In this step, based on positive and negative sample pairs, different non-standard expressions of the same attribute state are mapped to similar semantic representations, thereby widening the representation distance between easily confused texts with different attribute states, thus forming a contrastive learning loss.
[0161] Optionally, one possible implementation of step 42 may include:
[0162] Step 1: Input the positive sample pairs and negative sample pairs into the pre-trained language model to obtain the second semantic representation vector corresponding to the positive sample pairs and the third semantic representation vector corresponding to the negative sample pairs.
[0163] In this implementation, the two business texts in the positive sample pair are input into the same pre-trained language model in a parallel manner, and the two texts at both ends are encoded with shared parameters to obtain the second semantic representation vector corresponding to the positive sample pair;
[0164] The two business texts in the negative sample pair are input into the same pre-trained language model in the same way to obtain the third semantic representation vector corresponding to the negative sample pair.
[0165] Step 2: Determine the contrastive learning loss based on the second semantic representation vector and the third semantic representation vector.
[0166] In this implementation, a contrastive learning loss corresponding to the loss function is then constructed based on the distance relationship, similarity relationship, or temperature coefficient normalization comparison relationship between the second semantic representation vector and the third semantic representation vector. This makes the semantic representations of positive sample pairs tend to be closer in the vector space, and makes the semantic representations of negative sample pairs tend to be farther away in the vector space, thereby forming a constraint on the pre-trained language model.
[0167] The loss function can be calculated using cosine similarity, dot product similarity, or Euclidean distance, and can be combined with in-batch samples to form a comparison target, thereby improving the model's ability to distinguish between synonymous non-standard expressions and easily confused expressions.
[0168] This contrastive learning loss optimizes the vector distribution of positive and negative sample pairs, enabling the model to gradually learn stable semantic boundaries related to the business text of items to be recycled during training.
[0169] The contrastive learning loss can be calculated at the entity fragment level.
[0170] Step 43: Apply gradient direction perturbation to the word vector layer or intermediate embedding layer of the pre-trained language model to generate adversarial examples, and generate adversarial training loss based on the adversarial examples.
[0171] In this step, the adversarial training loss is constructed using FGM (FastGradient Method), which involves adding perturbations in the backward direction of the gradient at the word vector layer (e.g., the WordPiece embedding layer in BERT) or the intermediate embedding layer (e.g., the Hidden Layer 6 in BERT). The magnitude of the perturbation can be controlled by a preset coefficient to generate adversarial samples that preserve semantics but have shifted representation. The label prediction bias is then recalculated using these adversarial samples to obtain the adversarial training loss.
[0172] In one possible implementation, the adversarial training loss can be a weighted fusion of the CRF loss between the model's predictions on adversarial examples and the original labels, and the CRF loss of the original examples.
[0173] The business processing method provided in this application determines the entity label annotation loss for each item with a specific attribute state based on business text, labeled entity tags, a pre-trained language model, linear hierarchical layering, and a conditional random field decoding layer; it determines the contrastive learning loss based on positive and negative sample pairs and the pre-trained language model; and it generates adversarial examples by applying gradient direction perturbations to the word vector layer or intermediate embedding layer of the pre-trained language model, and generates adversarial training loss based on these adversarial examples. In this technical solution, the entity label annotation loss utilizes the cascaded structure of the pre-trained language model, linear hierarchical layering, and conditional random field decoding layer to ensure accurate serialization of entity boundaries; the contrastive learning loss enhances the model's ability to distinguish fine-grained differences in appearance by constructing positive and negative sample pairs and bringing similar quality samples closer together and pushing away dissimilar samples in the pre-trained semantic space; and the adversarial training loss generates adversarial examples by applying gradient direction perturbations to the word vector layer or intermediate embedding layer, forcing the model to maintain output robustness to small input changes, effectively suppressing overfitting and annotation noise interference. After the three elements are optimized in synergy, while maintaining high recall and precision, the system has stronger resistance to interference from changes in condition, domain shifts, and potential attacks, significantly improving the generalization and stability of cross-condition item recognition.
[0174] Furthermore, based on the above implementation, the embodiments of this application have the following technical effects:
[0175] 1) High-precision entity recognition: CRF global constraints + adversarial training + contrastive learning significantly improve the F1 score of entity recognition in noisy, abbreviation, and misspelled scenarios;
[0176] 2) Strong semantic generalization ability: By comparing and contrasting, it explicitly narrows the semantic distance between different expressions of the same entity, thus solving the problem of multiple names for one thing;
[0177] 3) High robustness: FGM adversarial training enables the model to have strong anti-interference ability against perturbations such as ASR errors and typos;
[0178] 4) Comprehensive knowledge coverage: It integrates three knowledge sources: vector retrieval, RAG, and knowledge graph, taking into account both unstructured question answering and structured rules;
[0179] 5) Credible and controllable answers: The generation process is constrained by standardized entities and multi-source knowledge to avoid illusions and ensure that the answers are consistent with business strategies;
[0180] 6) End-to-end interpretability: From the original text to the final response, every step (identification → standardization → retrieval → generation) is traceable, which facilitates operation and maintenance and iteration.
[0181] Based on the above method embodiments, Figure 5 This is a schematic diagram of the structure of the service processing device provided in the embodiments of this application, such as... Figure 5 As shown, the service processing device includes:
[0182] The acquisition module 51 is used to acquire the pending business text of the items to be recycled input by the user;
[0183] Processing module 52 is used to input the business text to be processed into the recognition model to obtain the target entity label. The recognition model is trained by constructing positive sample pairs and negative sample pairs based on the business text of items with multiple attribute states and the labeled entity label corresponding to each item. The positive sample pair is two business texts that describe the same attribute state in different non-standard expressions, and the negative sample pair is two business texts that describe different attribute states but are easily confused.
[0184] The determination module 53 is used to determine the target response data corresponding to the business text to be processed based on the target entity label.
[0185] In one or more embodiments, the determining module 53 determines the target response data corresponding to the business text to be processed based on the target entity tag, specifically for:
[0186] Based on the target entity tags and the business text to be processed, multiple candidate knowledge fragments corresponding to the business text to be processed are identified in a multi-source database. The multi-source database includes: historical question-answer pair knowledge base, retrieval enhancement generation knowledge base, and structured knowledge graph.
[0187] Multiple candidate knowledge fragments, business text to be processed, and target entity labels are input into the large language model to obtain target response data.
[0188] In one or more embodiments, the recognition model includes: a pre-trained language model, a linear slicing layer, and a conditional random field decoding layer;
[0189] Accordingly, before inputting the business text to be processed into the recognition model to obtain the target entity label, the processing module 52 is also used for:
[0190] Obtain the business text of items with multiple attribute states and the corresponding annotation entity label for each item;
[0191] For each attribute state of an item, positive and negative sample pairs are constructed based on the business text of the item's attribute state.
[0192] Based on the entity labels of items with all attribute states, business text, positive and negative sample pairs, pre-trained language model, linear hierarchical layer, and conditional random field decoding layer, determine the entity label labeling loss, contrastive learning loss, and adversarial training loss.
[0193] We construct a joint optimization objective function by weighting and fusing the entity labeling loss, contrastive learning loss, and adversarial training loss.
[0194] The identification model is determined based on the joint optimization objective function.
[0195] In one or more embodiments, the processing module 52 determines entity labeling loss, contrastive learning loss, and adversarial training loss based on the labeled entity tags of items with all attribute states, business text, positive and negative sample pairs, pre-trained language model, linear hierarchical layering, and conditional random field decoding layer, specifically for:
[0196] For each item with a specific attribute state, the entity label annotation loss is determined based on the business text, labeled entity tags, pre-trained language model, linear hierarchical layer, and conditional random field decoding layer.
[0197] The contrastive learning loss is determined based on positive and negative sample pairs and the pre-trained language model.
[0198] Gradient direction perturbation is applied to the word vector layer or intermediate embedding layer of the pre-trained language model to generate adversarial examples, and adversarial training loss is generated based on the adversarial examples.
[0199] In one or more embodiments, the processing module 52 determines the entity label annotation loss based on the business text, labeled entity tags, pre-trained language model, linear hierarchical layer, and conditional random field decoding layer, specifically for:
[0200] The business text is input into a pre-trained language model to obtain the first semantic representation vector of the word;
[0201] The first semantic representation vector is sequentially input into the linear cascading layer and the conditional random field decoding layer. The label transition matrix is used to model the business legality constraints to obtain the predicted entity label.
[0202] Calculate the entity label annotation loss based on the predicted entity labels and the labeled entity labels.
[0203] In one or more embodiments, the processing module 52 determines the contrastive learning loss based on positive sample pairs, negative sample pairs, and a pre-trained language model, specifically for:
[0204] The positive and negative sample pairs are input into the pre-trained language model to obtain the second semantic representation vector corresponding to the positive sample pair and the third semantic representation vector corresponding to the negative sample pair.
[0205] The contrastive learning loss is determined based on the second and third semantic representation vectors.
[0206] In one or more embodiments, before inputting the business text to be processed into the recognition model to obtain the target entity label, the processing module 52 is further configured to:
[0207] The business text to be processed is cleaned, including: filtering preset symbols, correcting typos, standardizing units, and mapping non-standard descriptions to standard descriptions.
[0208] It should be noted that the division of the various modules in the above device is merely a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical element, or they can be physically separated. Furthermore, these modules can be implemented entirely in software through processing element calls, or entirely in hardware. Alternatively, some modules can be implemented through processing element calls in software, while others can be implemented in hardware. Moreover, these modules can be integrated together or implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. During implementation, each step of the above method or each of the above modules can be completed through the integrated logic circuits in the hardware of the processor element or through software instructions.
[0209] As can be seen from the above, the business processing device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0210] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 6 As shown, the electronic device provided in this embodiment includes at least one processor 61 and a memory 62.
[0211] Optionally, the electronic device also includes a communication component 63.
[0212] The processor 61, memory 62, and communication component 63 are connected via bus 64.
[0213] In a specific implementation, at least one processor 61 executes computer execution instructions stored in memory 62, causing at least one processor 61 to perform the above-described method.
[0214] The specific implementation process of processor 61 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0215] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0216] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0217] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0218] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0219] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0220] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0221] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0222] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0223] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0224] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0225] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0226] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0227] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A business processing method, characterized in that, include: Obtain the pending business text of the items to be recycled, input by the user; The business text to be processed is input into the recognition model to obtain the target entity label. The recognition model is trained by constructing positive sample pairs and negative sample pairs based on the business text of items with multiple attribute states and the labeled entity label corresponding to each item. The positive sample pair is two business texts that describe the same attribute state in different non-standard expressions, and the negative sample pair is two business texts that describe different attribute states but are easily confused. Based on the target entity tag, determine the target response data corresponding to the business text to be processed.
2. The method according to claim 1, characterized in that, The step of determining the target response data corresponding to the business text to be processed based on the target entity tag includes: Based on the target entity label and the business text to be processed, multiple candidate knowledge fragments corresponding to the business text to be processed are determined in a multi-source database. The multi-source database includes: a historical question-answer pair knowledge base, a retrieval-enhanced generation knowledge base, and a structured knowledge graph. The multiple candidate knowledge fragments, the business text to be processed, and the target entity tags are input into the large language model to obtain the target response data.
3. The method according to claim 1 or 2, characterized in that, The recognition model includes: a pre-trained language model, a linear slicing layer, and a conditional random field decoding layer; Accordingly, before inputting the business text to be processed into the recognition model to obtain the target entity label, the method further includes: Obtain the business text of the items with the various attribute states and the corresponding annotation entity label for each item; For each attribute state of an item's business text, the positive sample pair and the negative sample pair are constructed based on the business text of the item's attribute state, respectively. Based on the entity labels of all attribute states of the items, business text, positive and negative sample pairs, the pre-trained language model, the linear hierarchical layer, and the conditional random field decoding layer, determine the entity label labeling loss, contrastive learning loss, and adversarial training loss. The entity labeling loss, the contrastive learning loss, and the adversarial training loss are weighted and fused to construct a joint optimization objective function; The recognition model is determined based on the joint optimization objective function.
4. The method according to claim 3, characterized in that, The process of determining entity labeling loss, contrastive learning loss, and adversarial training loss based on the labeled entity labels of items with all attribute states, business text, positive and negative sample pairs, the pre-trained language model, the linear hierarchical layer, and the conditional random field decoding layer includes: For each item with a specific attribute state, the entity label annotation loss is determined based on the business text, the labeled entity tags, the pre-trained language model, the linear hierarchical layer, and the conditional random field decoding layer. The contrastive learning loss is determined based on the positive and negative sample pairs and the pre-trained language model. Gradient direction perturbation is applied to the word vector layer or intermediate embedding layer of the pre-trained language model to generate adversarial examples, and the adversarial training loss is generated based on the adversarial examples.
5. The method according to claim 4, characterized in that, The step of determining the entity label annotation loss based on the business text, the labeled entity tags, the pre-trained language model, the linear hierarchical layer, and the conditional random field decoding layer includes: The business text is input into the pre-trained language model to obtain the first semantic representation vector of the word unit; The first semantic representation vector is sequentially input into the linear scaling layer and the conditional random field decoding layer, and the business legality constraints are modeled using the label transition matrix to obtain the predicted entity label; Based on the predicted entity labels and the labeled entity labels, calculate the entity label annotation loss.
6. The method according to claim 3, characterized in that, Determining the contrastive learning loss based on the positive and negative sample pairs and the pre-trained language model includes: The positive sample pairs and negative sample pairs are respectively input into the pre-trained language model to obtain the second semantic representation vector corresponding to the positive sample pair and the third semantic representation vector corresponding to the negative sample pair; The contrastive learning loss is determined based on the second semantic representation vector and the third semantic representation vector.
7. The method according to claim 1 or 2, characterized in that, Before inputting the business text to be processed into the recognition model to obtain the target entity label, the method further includes: The business text to be processed is cleaned, and the cleansing process includes: preset symbol filtering, typo correction, unit standardization, and mapping non-standard descriptions to standard descriptions.
8. A business processing device, characterized in that, include: The acquisition module is used to acquire the pending business text of items to be recycled, which is input by the user. The processing module is used to input the business text to be processed into the recognition model to obtain the target entity label. The recognition model is trained by constructing positive sample pairs and negative sample pairs based on the business text of items with multiple attribute states and the labeled entity label corresponding to each item. The positive sample pair is two business texts that describe the same attribute state in different non-standard expressions, and the negative sample pair is two business texts that describe different attribute states but are easily confused. The determination module is used to determine the target response data corresponding to the business text to be processed based on the target entity tag.
9. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-7.
