Data expansion method and device and electronic equipment

By combining and expanding the training data of multi-turn task-oriented dialogue scenarios, a dialogue flowchart corresponding to the frequency threshold is generated. Nodes with insufficient coverage are identified and expanded, which solves the problem of weak model generalization ability caused by uneven training data and improves the model's coverage and generalization ability across all nodes in the process.

CN120930655APending Publication Date: 2025-11-11BEIJING ZHONGKE JINDEZHU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511026188.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-24
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

In multi-turn task-oriented dialogue scenarios, poor quality and insufficient quantity of training data lead to inconsistent model performance at different process nodes and weak generalization ability.

Method used

By combining the flow nodes of dialogue statements in adjacent rounds, a dialogue flow diagram corresponding to the frequency threshold is generated. Target flow nodes with insufficient coverage are identified and expanded in a targeted manner to improve the coverage of the training data.

Benefits of technology

It improves the coverage of training data across all nodes in multi-turn task-oriented dialogue scenarios, enhances the model's generalization ability, and shows significant systematic coverage, especially in long-tail dialogue scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120930655A_ABST
    Figure CN120930655A_ABST
Patent Text Reader

Abstract

The invention discloses a data expansion method and device and electronic equipment. The data expansion method comprises the following steps: combining process nodes to which adjacent rounds of dialogue statements belong in a first dialogue to obtain a plurality of process node combinations, and determining a co-occurrence frequency of each process node combination; for each frequency threshold value in the frequency threshold value set, generating a first dialogue flow chart corresponding to the frequency threshold value based on the flow node combination with the co-occurrence frequency exceeding the frequency threshold value; based on the first dialogue flow chart corresponding to each frequency threshold, generating a second dialogue flow chart, and determining a to-be-optimized target flow node in the second dialogue flow chart; and expanding a target dialogue statement belonging to the target process node in the first dialogue to obtain a second dialogue. Therefore, data expansion of the process nodes can be performed in a targeted and fine-grained manner, the coverage degree of the training data on the whole process nodes of a multi-round task type dialogue scene is improved, and a foundation is laid for improving the generalization ability of a trained model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a data augmentation method, apparatus, and electronic device. Background Technology

[0002] When training models for multi-turn task-oriented dialogue scenarios (such as telephone sales scenarios), the poor quality and insufficient quantity of training data at some process nodes result in different performances of the trained models at different process nodes, leading to weak generalization ability.

[0003] Therefore, further solutions are still needed to find a reasonable way to expand the training data. Summary of the Invention

[0004] The purpose of this application is to provide a data augmentation method, apparatus, and electronic device for targeted and fine-grained augmentation of dialogue statements corresponding to key process nodes in training data, thereby improving the coverage of training data across all process nodes in multi-turn task-oriented dialogue scenarios and laying the foundation for improving the generalization ability of the trained model.

[0005] To achieve the above objectives, the embodiments of this application adopt the following technical solutions: In a first aspect, embodiments of this application provide a data augmentation method, including: The process nodes to which the dialogue statements of adjacent rounds in the first dialogue belong are combined to obtain multiple process node combinations, and the co-occurrence frequency of each process node combination is determined. For each frequency threshold in the frequency threshold set, a first dialogue flowchart corresponding to the frequency threshold is generated based on the combination of process nodes whose co-occurrence frequency exceeds the frequency threshold. Based on the first dialogue flowchart corresponding to each frequency threshold, a second dialogue flowchart is generated, and the target flow node to be optimized in the second dialogue flowchart is determined. The target dialogue statements belonging to the target process node in the first dialogue are expanded to obtain the second dialogue.

[0006] Secondly, embodiments of this application provide a data expansion device, comprising: The combination module is used to combine the process nodes to which the dialogue statements of adjacent rounds in the first dialogue belong, to obtain multiple process node combinations, and to determine the co-occurrence frequency of each process node combination. The first generation module is used to generate a first dialogue flowchart corresponding to each frequency threshold in the frequency threshold set, based on the combination of process nodes whose co-occurrence frequency exceeds the frequency threshold. The second generation module is used to generate a second dialogue flowchart based on the first dialogue flowchart corresponding to each frequency threshold, and to determine the target flow node to be optimized in the second dialogue flowchart. An expansion module is used to expand the target dialogue statements belonging to the target process node in the first dialogue to obtain a second dialogue.

[0007] Thirdly, embodiments of this application provide an electronic device, including: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the data augmentation method as provided in the first aspect.

[0008] Fourthly, embodiments of this application provide a computer-readable storage medium that, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform the data augmentation method as provided in the first aspect.

[0009] Fifthly, embodiments of this application provide a computer program product, the computer program product including a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps in the data augmentation method provided in the first aspect.

[0010] The above-described technical solutions adopted in the embodiments of this application can achieve the following beneficial effects: Considering the correlation between the process nodes belonging to adjacent rounds of dialogue in the first dialogue, the co-occurrence frequency of the resulting process node combinations reflects the importance of this correlation to the overall dialogue flow. By pre-setting multiple frequency thresholds from large to small, as the frequency thresholds decrease, more and more process node combinations with co-occurrence frequencies exceeding the thresholds are generated. Based on this, for each frequency threshold, a first dialogue flowchart corresponding to that threshold is generated based on the process node combinations with co-occurrence frequencies exceeding that threshold. Then, a second dialogue flowchart reflecting the complete dialogue flow is generated based on these first dialogue flowcharts. The occurrence of each process node in the second dialogue flowchart in different first dialogue flowcharts reflects the coverage of each process node in the first dialogue. Based on this, process nodes with insufficient coverage can be identified as target process nodes to be optimized. Furthermore, by expanding the target dialogue statements that belong to the target process nodes in the first dialogue, the coverage of the first dialogue for the target process nodes can be improved, thereby achieving targeted and fine-grained training data expansion and improving the coverage of the first dialogue for the entire process nodes of multi-turn task-oriented dialogue scenarios. This effectively solves the problem of weak model generalization ability caused by uneven coverage of different process nodes in the training data. Attached Figure Description

[0011] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A flowchart illustrating a data augmentation method provided in one embodiment of this application; Figure 2 A first dialogue flowchart corresponding to different frequency thresholds is provided as an embodiment of this application; Figure 3 A flowchart illustrating a data augmentation method provided for another embodiment of this application; Figure 4 A schematic diagram of the structure of a data expansion device provided in one embodiment of this application; Figure 5 This is a schematic diagram of the structure of an electronic device provided in one embodiment of this application. Detailed Implementation

[0012] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0013] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application.

[0014] Furthermore, the terms “comprising” and “having”, and any variations thereof, are intended to cover non-exclusive inclusion, such that a process, method, system, product, or apparatus that comprises a series of units is not necessarily limited to those units, but may include other units not expressly listed or inherent to those processes, methods, products, or apparatus.

[0015] It should be understood that the data augmentation method proposed in this application embodiment can be executed by an electronic device. As an example, it can be executed by software in an electronic device. The electronic device referred to herein may include terminal devices, such as smartphones, tablets, laptops, desktop computers, smart voice interaction devices, smart home appliances, smartwatches, vehicle terminals, aircraft, etc.; or, the electronic device may also include a server, such as a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0016] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.

[0017] Please refer to Figure 1 The following is a flowchart illustrating a data augmentation method according to an embodiment of this application. The method includes the following steps: S102, combine the process nodes to which the dialogue statements of adjacent rounds in the first dialogue belong to obtain multiple process node combinations, and determine the co-occurrence frequency of each process node combination.

[0018] The first dialogue can be used as training data to train a model applicable to multi-turn task-oriented dialogue scenarios. The first dialogue can be any historical dialogue, such as a historical dialogue between an agent and a customer. In practical applications, the first dialogue can be obtained from the business platform. There can be multiple first dialogues, each consisting of one conversation, or it can include multiple conversations; this embodiment of the application does not limit this.

[0019] The first dialogue contains multiple rounds of dialogue, each round of which can include several consecutive dialogue statements. In practical applications, the dialogue statements corresponding to one interaction between different speakers in the first dialogue can be divided into one round of dialogue statements. Taking the dialogue between the agent and the customer as an example, the dialogue statements corresponding to one interaction between the agent and the customer can be divided into one round of dialogue statements. For example, the dialogue statements corresponding to the following interaction are one round of dialogue statements: Customer: Hello.

[0020] Operator: Hello, how can I help you? Each round of dialogue has a corresponding flow node, also known as a dialogue label or flow step, which represents a step or operation followed during the dialogue. For example, the flow node corresponding to the previous round of dialogue is "greet".

[0021] In practical applications, a large model can be used to extract tags for each round of dialogue statements in the first dialogue, obtaining dialogue tags for each round of dialogue statements. Then, for each round of dialogue statements, its dialogue tags are used as the flow node to which that round of dialogue statements belong. The large model can be any large language model with semantic parsing and tag extraction capabilities, such as the Qwen series of large models. This application embodiment does not limit this.

[0022] More specifically, given that dialogue tags may be similar or diverse, affecting subsequent data expansion, a hierarchical tag extraction method can be used for each round of dialogue statements through a large model to improve tag regularity and accuracy. Specifically, for each round of dialogue statements, the large model performs open-ended tag extraction (i.e., without limiting specific dialogue tags) to obtain the dialogue tags for that round. Then, after summarizing and organizing the dialogue tags from all rounds, a dialogue tag list is obtained. Finally, the large model performs a new round of refined tag extraction from the dialogue tag list to determine the process node to which each round of dialogue statements belongs.

[0023] For example, by extracting tags from each round of dialogue using a large model, the following dialogue tag list is obtained: ['Greetings', 'Company introduction', 'Inquiring about handover time', 'Has the property already been handed over', 'Event time and address', 'Promotional information', 'Has the property already been renovated', 'Inquiring about renovation plans', 'Inquiring about user budget', 'Inquiring if this is your first home', 'Inquiring about user preferences', 'Request to add as a friend', 'Invitation to visit the store', 'Introduction to in-store gifts', 'Providing design examples', 'Adding user's phone number', 'Goodbye', 'Sorry to bother you'] By using a large model to hierarchically divide these dialogue tags, the following tag system is obtained: { 'Level 1 Tags': ['Greeting', 'Company Introduction', 'Promotional Activities', 'Collecting User Information', 'Invitation to Visit Store', 'Add User as Friend', 'Closing Remarks'] 'Secondary tag': 'Greet': ['Greet'], 'Company Introduction': ['Company Introduction'], 'Promotional Activity Introduction': ['Activity Time and Location', 'Promotional Information'], 'Collecting user information': ['Has the property been handed over?', 'Has it been renovated?', 'Inquire about the handover date', 'Inquire about when to renovate', 'Inquire if this is your first property purchase', 'Inquire about user preferences', 'Inquire about user budget'] 'Invitation to the store': ['Invitation to the store', 'Introduction to in-store gifts'], 'Add User as Friend': ['Request to add WeChat', 'Add User's Phone Number', 'Provide Design Examples'], Closing remarks: ['Goodbye,' 'Sorry to bother you'] } In this system, a first-level tag refers to a tag located at the first level, and a second-level tag refers to a tag located at the second level. Second-level tags are sub-tags of first-level tags. Of course, in practical applications, the tag system can include many more previous tags, and this embodiment does not limit this.

[0024] After obtaining the flow nodes to which adjacent rounds of dialogue statements belong in the first dialogue, the flow nodes to which adjacent rounds of dialogue statements belong are combined to obtain the flow node combination. Adjacent rounds of dialogue statements can be dialogue statements from two or more adjacent rounds. For example, adjacent rounds of dialogue statements can be dialogue statements from round i and round i+1, etc., then the flow node combination obtained by combining the flow nodes to which they belong is <flow node to which round i belongs, flow node to which round i+1 belongs>, where i is a positive integer.

[0025] For each flow node combination, its co-occurrence frequency refers to the number of times that flow node combination appears in all first dialogues. This co-occurrence frequency can reflect, to some extent, the importance of the relationships between the flow nodes in that flow node combination to the overall dialogue flow. The higher the co-occurrence frequency of a flow node combination, the more important the relationships between the flow nodes in that flow node combination are to the overall dialogue flow.

[0026] S104, for each frequency threshold in the frequency threshold set, generate the first dialogue flowchart corresponding to the frequency threshold based on the combination of process nodes whose co-occurrence frequency exceeds the frequency threshold.

[0027] The frequency threshold set includes multiple preset frequency thresholds. These frequency thresholds can be set based on actual historical experience, such as 50, 40, 30, 20, etc., and this application embodiment does not limit this.

[0028] For each frequency threshold, process nodes whose co-occurrence frequency exceeds the threshold are filtered out, and based on the relationship between process nodes in these process node combinations, connection lines are created between these process nodes to obtain the first dialogue flowchart corresponding to the frequency threshold.

[0029] For example, with a frequency threshold of 1 of 40, process node combinations with a co-occurrence frequency exceeding 40 include: <Agent requests to add WeChat, agent asks if WeChat is the same as phone number>, <Agent asks if WeChat is the same as phone number, customer agrees to add WeChat>, <Customer agrees to add WeChat, end>, <Agent asks if WeChat is the same as phone number, customer confirms WeChat is the same as phone number>, <Customer confirms WeChat is the same as phone number, end>, <Customer confirms WeChat is the same as phone number, agent requests customer to approve adding WeChat>, <Agent requests customer to approve adding WeChat, end>, <Agent requests customer to approve adding WeChat, agent informs customer of WeChat name>, <Agent informs customer of WeChat name, agent informs about follow-up services after adding WeChat>, <Agent informs about follow-up services after adding WeChat, end>.

[0030] Taking the process node combination <Agent requests to add WeChat, Agent asks if WeChat is the same as phone number> as an example, the relationship is "Agent requests to add WeChat" followed by "Agent asks if WeChat is the same as phone number". Therefore, a connection is created from the process node "Agent requests to add WeChat" to the process node "Agent asks if WeChat is the same as phone number". Similarly, by adding connection lines between process nodes in the above process node combinations, the first dialogue flowchart corresponding to the frequency threshold 1 is obtained, as shown below. Figure 2 As shown in (a).

[0031] Similarly, with a frequency threshold of 20, the first dialogue flowchart corresponding to the frequency threshold of 2 can be generated using the above method, such as... Figure 2 As shown in (b).

[0032] S106, Based on the first dialogue flowchart corresponding to each frequency threshold, generate a second dialogue flowchart and determine the target flow node to be optimized in the second dialogue flowchart.

[0033] The second dialogue flowchart refers to the dialogue flowchart that serves as a business operation standard, also known as a standard operating procedure (SOP).

[0034] From the above Figure 2 The flowcharts of the first dialogue corresponding to different frequency thresholds show that if the co-occurrence frequency of a certain combination of process nodes exceeds the threshold, it means that the relationship between the process nodes in that combination is relatively important to the first dialogue flow corresponding to that frequency threshold. As the frequency threshold decreases, the number of process nodes in the first dialogue flowchart increases, and the dialogue flow it describes becomes more and more complete.

[0035] Based on this, the second dialogue flowchart is obtained as follows: determine the minimum frequency threshold in the frequency threshold set; generate the second dialogue flowchart based on the first dialogue flowchart corresponding to the minimum frequency threshold. Specifically, the first dialogue flowchart corresponding to the minimum frequency threshold can be modified by a large model or manually, such as modifying the connecting lines between process nodes, to obtain the second dialogue flowchart.

[0036] From the above Figure 2 The flowcharts of the first dialogue corresponding to different frequency thresholds shown also reveal that, for each flow node in the second dialogue flowchart, its appearance in the first dialogue flowchart corresponding to different frequencies reflects the coverage of that flow node by the training data. For example, if a flow node only appears in the first dialogue flowchart corresponding to a low frequency threshold but not in the first dialogue flowchart corresponding to a high frequency threshold, it means that the training data coverage of that flow node is insufficient, i.e., the amount of dialogue statements belonging to that flow node in the first dialogue is small. This will lead to poor performance of the trained model on that flow node. Therefore, expanding the dialogue statements belonging to this type of flow node in the first dialogue helps to improve the generalization ability of the trained model.

[0037] Based on this, in one implementation, the target process node is determined as follows: a first frequency threshold and a second frequency threshold are determined from the set of frequency thresholds, wherein the first frequency threshold is less than the second frequency threshold; for each process node in the second dialogue flowchart, if the process node exists in the first dialogue flowchart corresponding to the first frequency threshold and does not exist in the second dialogue flowchart corresponding to the second frequency threshold, then the process node is determined as the target process node to be optimized.

[0038] In practical applications, the first frequency threshold and the second frequency threshold can be any two frequency thresholds from the set of frequency thresholds. Alternatively, based on a preset threshold, the frequency thresholds in the set that are less than the preset threshold can be determined as the first frequency threshold, and the frequency thresholds in the set that are greater than or equal to the preset threshold can be determined as the second frequency threshold.

[0039] For example, if the frequency threshold set includes four frequency thresholds: 50, 40, 30, and 20, and the preset threshold is 35, then 30 and 20 are determined as the first frequency threshold, and 50 and 40 are determined as the second frequency threshold. Therefore, Figure 2 The first dialogue flowchart shown in (a) corresponds to the second frequency threshold. Figure 2 (b) The first dialogue flowchart corresponds to the first frequency threshold. Since the process nodes “customer agrees to add WeChat” and “customer disagrees to add WeChat” appear in the first flowchart corresponding to the first frequency threshold, but do not appear in the first flowchart corresponding to the second frequency threshold, these two process nodes are identified as target process nodes to be optimized.

[0040] In another implementation, the method for determining the target process node further includes: for each process node in the second dialogue flow chart, if the ratio between the number of the first dialogues containing the process node and the total number of the first dialogues is less than a preset ratio, then determine the process node as the target process node to be optimized.

[0041] Wherein, the preset ratio can be set according to actual needs, such as set to 5%, etc., and the embodiments of the present application do not limit this.

[0042] For each process node, the first dialogue containing the process node refers to the dialogue statements belonging to the process node in the first dialogue. If the number of the first dialogues containing the process node is less than the preset ratio, it means that the coverage of the training data for the process node is insufficient, which will lead to poor performance of the trained model at the process node. Therefore, by using such process nodes as the target nodes to be optimized for data augmentation, the coverage of the training data for such process nodes can be improved, laying a foundation for enhancing the generalization ability of the trained model.

[0043] The above shows some implementation manners of the above S106. Of course, it should be understood that the above S106 can also be implemented by other means, and the embodiments of the present application do not limit this.

[0044] S108, augment the target dialogue statements belonging to the target process node in the first dialogue to obtain the second dialogue.

[0045] The augmentation of the target dialogue statements can be implemented by various appropriate means, and the embodiments of the present application do not limit this.

[0046] In one implementation, use the preset mapping relationship of modal particles and prefix words to modify the tone of the target dialogue statements, and determine the first dialogue after replacement as the second dialogue. Thereby, the diverse expressions of the training data can be enhanced.

[0047] For example, the target statement is "Agent: Is your mobile phone number your WeChat number?". Using the preset mapping relationship of modal particles {"?" : "吗", "么" : "吗", "吧" : "哈", "是么" : "么", ……, "对吧" : "是吧"} to replace the modal particles in the target statement, and using the prefix words ["请问", "麻烦问下", "请说下", ……, "请给出"] to generalize the target statement, the following two augmented statements are obtained: "请问您的手机号是微信号吗", "请说下您的手机号是微信号吗". For each augmented statement, replace the target statement in the first dialogue with the augmented statement, and a second dialogue is obtained.

[0048] In another implementation, synonyms are used to replace words in the target dialogue. This can improve the diversity of the training data.

[0049] For example, if the word "how are you feeling today?" in the target statement is replaced with the synonym "how", the expanded statement "How are you feeling today?" is obtained. Replacing the target statement in the first dialogue with this expanded statement will result in a second dialogue.

[0050] In another implementation, the target dialogue statement is converted into a multi-turn dialogue statement. This improves the diversity of the training data while ensuring consistency of business logic.

[0051] For example, if the target statement is "Agent: Is your mobile number your WeChat ID? Customer: Yes", using the pre-defined interruption mapping relationship {"Sorry, I didn't hear you clearly", "Excuse me, I didn't hear you clearly", "What did you say?", "What did you say?", ..., "Say it again"}, the single-turn dialogue is generalized to two turns, resulting in the expanded statement "Agent: Is your mobile number your WeChat ID? Customer: What did you say? Agent: Is your mobile number your WeChat ID? Customer: Yes". Replacing the target statement in the first dialogue with this expanded statement yields a second dialogue.

[0052] For example, using a large model, the single-turn target statement "Agent: Please say your WeChat ID. Customer: XXXXXX" can be transformed into a two-turn dialogue statement "Agent: Please say your WeChat ID. Customer: XXXXXX. Agent: And then? Customer: YY." Replacing the target statement in the first dialogue with this second dialogue yields a second dialogue.

[0053] The foregoing illustrates a partial implementation of S108. It should be understood that S108 can also be implemented in other ways, and this application embodiment does not limit this implementation.

[0054] In practical applications, the above implementation methods can be used simultaneously, which can overcome the limitations of traditional coarse-grained data augmentation and avoid the problem of "increased data volume and decreased model performance" caused by semantic deviation.

[0055] The data augmentation method provided in the above embodiments takes into account the correlation between the process nodes to which the dialogue statements in adjacent rounds belong in the first dialogue. The co-occurrence frequency of the process node combination obtained by combining the two reflects the importance of the correlation between the two to the entire dialogue process. By pre-setting multiple frequency thresholds from large to small, as the frequency thresholds decrease, the number of process node combinations with a co-occurrence frequency exceeding the threshold increases. Based on this, for each frequency threshold, a first dialogue flowchart corresponding to that frequency threshold is generated based on the process node combinations with a co-occurrence frequency exceeding that threshold. Then, a second dialogue flowchart reflecting the complete dialogue process is generated based on these first dialogue flowcharts. The occurrence of each process node in the second dialogue flowchart in different first dialogue flowcharts reflects the coverage of each process node by the first dialogue. Based on this, process nodes with insufficient coverage can be identified as target process nodes to be optimized. By expanding the target dialogue statements belonging to the target process nodes in the first dialogue, the coverage of the first dialogue for the target process nodes can be improved, thereby achieving targeted and fine-grained training data expansion. This improves the coverage of the first dialogue for the entire process nodes in multi-turn task-oriented dialogue scenarios, especially the systematic coverage of long-tail dialogue scenarios, thus effectively solving the problem of weak model generalization ability caused by uneven coverage of different process nodes in the training data.

[0056] Please refer to Figure 3 The following is a flowchart illustrating a data augmentation method according to another embodiment of this application, which includes the following steps: S302, combine the process nodes to which the dialogue statements of adjacent rounds in the first dialogue belong to obtain multiple process node combinations, and determine the co-occurrence frequency of each process node combination.

[0057] The specific implementation method of S302 above is the same as Figure 1 The specific implementation of S102 in the illustrated embodiment is similar and will not be described again.

[0058] S304, for each frequency threshold in the frequency threshold set, generate the first dialogue flowchart corresponding to the frequency threshold based on the combination of process nodes whose co-occurrence frequency exceeds the frequency threshold.

[0059] The specific implementation method of S304 mentioned above is the same as Figure 1 The specific implementation of S104 in the illustrated embodiment is similar and will not be described again.

[0060] S306, Based on the first dialogue flowchart corresponding to each frequency threshold, generate a second dialogue flowchart and determine the target flow node to be optimized in the second dialogue flowchart.

[0061] The specific implementation method of S306 above and Figure 1The specific implementation of S106 in the illustrated embodiment is similar and will not be described again.

[0062] S308 expands the target dialogue statements belonging to the target process node in the first dialogue to obtain the second dialogue.

[0063] The specific implementation method of S308 mentioned above and Figure 1 The specific implementation of S108 in the illustrated embodiment is similar and will not be described again.

[0064] S310, obtain the third dialogue based on the target process node.

[0065] The third dialogue contains sample dialogue statements belonging to the target process node.

[0066] In one implementation, a historical dialogue containing dialogue statements belonging to the target process node can be used as a third dialogue.

[0067] In another implementation, question-answer pairs (QA) belonging to the target process nodes can be written manually or using a large model. These QA are then pieced together according to the process indicated by the second dialogue flowchart to obtain the third dialogue.

[0068] In another implementation, S310 above includes the following steps: S3102, determine the first path containing the target node from the second dialogue flowchart.

[0069] As an example, any path in the second dialogue flowchart that contains the target node can be designated as the first path. For example, suppose... Figure 2 (b) The first dialogue flowchart shown is the final second dialogue flowchart. The target flow node is "the agent requests to add WeChat". One of the first paths is determined as: "START" → "the customer requests to add WeChat" → "the agent asks if the WeChat number is the same as the mobile number" → "the agent requests to add WeChat" → "the customer does not agree to add WeChat" → "END".

[0070] As another example, when there are multiple target nodes, the path in the second dialogue flowchart that contains at least two target nodes can be identified as the first path. For example, continuing with the second dialogue flowchart... Figure 2 (b) shows the first dialogue flowchart as an example. Assuming that the target process nodes include "customer agrees to add WeChat" and "customer disagrees to add WeChat", then one of the first paths is determined as: "START" → "customer requests to add WeChat" → "agent asks if WeChat is the same as the mobile number" → "customer confirms the same mobile number" → "customer agrees to add WeChat" → "customer disagrees to add WeChat" → "END".

[0071] As another example, following S306 above, the method further includes: for each process node in the second dialogue flowchart, determining the importance of that process node based on a frequency threshold corresponding to the first dialogue flowchart containing that process node. Specifically, for each process node, the higher the frequency threshold corresponding to the first dialogue flowchart containing that process node, the greater the importance of that process node.

[0072] Accordingly, in S3102 above, multiple second paths containing the target node are determined from the second dialogue flowchart; for each second path, the importance of the second path is determined based on the importance of the process nodes on that second path; and the second path with at least two kinds of importance among the multiple second paths is determined as the first path. The importance of the second path can be the average or weighted sum of the importance of the process nodes on the second path, etc., and this embodiment of the application does not limit this.

[0073] For example, process nodes can be assigned corresponding colors based on their importance. For instance, red can be assigned to the process node with the highest importance, yellow to the process node with the next highest importance, green to the process node with relatively low importance, and gray to the process node with the lowest importance, and so on.

[0074] Then, any path in the second dialogue flowchart that contains the target node is determined as the second path.

[0075] Furthermore, a second path containing target process nodes with different color combinations is selected as the first path. For example, a second path containing target process nodes of all colors is selected as one first path, a second path containing target process nodes of red, yellow and green is selected as another first path, and a second path containing only target process nodes of gray is selected as yet another first path.

[0076] Therefore, the first path identified not only covers the target process nodes but also varies in complexity, resulting in the third dialogue generated based on these first paths containing rich information. This helps to accurately test the model prediction effect before and after data augmentation of the target process nodes.

[0077] S3104, For each process node on the first path, generate sample dialogue statements corresponding to the process node.

[0078] For each process node on the first path, QA statements belonging to that process node can be written manually or using a large model as sample dialogue statements corresponding to that process node.

[0079] S3106, concatenate the sample dialogue statements corresponding to each process node on the first path to obtain the third dialogue.

[0080] By concatenating the sample dialogue statements corresponding to all process nodes on the first path in the order indicated by the first path, the third dialogue is obtained.

[0081] The foregoing illustrates a partial implementation of S310. It should be understood that S310 can also be implemented in other ways, and this application embodiment does not limit this implementation.

[0082] S312, based on the third dialogue, tests the first performance information of the first model at the target process node.

[0083] The first model is trained on the base model based on the first dialogue. The base model can be any model capable of handling multi-task dialogues, such as a generative language model.

[0084] Training the basic model based on the first dialogue can be achieved through various model training methods in the field, and the embodiments of this application do not limit this.

[0085] For example, an autoregressive training method is performed on the base model based on the first dialogue to obtain the first model. Autoregressive training is a modeling method based on sequence data, and its core idea is to gradually predict future data by utilizing historical information.

[0086] Here, a base model is used to predict the word probability distribution corresponding to the position of each word in the first dialogue, based on the context of each word. Then, based on each word and the word probability distribution corresponding to the position of each word, the first loss of the base model is determined. Finally, the parameters of the base model are adjusted based on the first loss to obtain the first model. For the i-th word in the first dialogue, its context includes the first i-1 words in the first dialogue, and the word probability distribution corresponding to its position includes the probability of each word in the vocabulary appearing at the position of the i-th word, where i is a positive integer.

[0087] The first performance information may include any information that can reflect the performance of the first model at the target process node, such as, but not limited to, accuracy, perplexity (PPL), etc.

[0088] In this field, perplexity measures the perplexity of a language model (such as a dialogue generation model) for a given text sequence X={x0,x1,…,x...}. t The perplexity is the predictive power of the model. The lower the perplexity, the more accurate the model's prediction of the text, that is, the more the text conforms to the model's expectations; the higher the perplexity, the less accurate the model's prediction of the text, that is, the more "unexpected" or unreasonable the text is. Specifically, the perplexity is calculated as shown in the following formula (1): (1) in, Representation Model The perplexity of a given text sequence X; This represents the probability of the model predicting the i-th word given the first i-1 words; Represents logarithmic operations. This indicates exponentiation.

[0089] In this embodiment, the first performance information may include a first perplexity of the sample dialogue statement. The first perplexity is used to measure the predictive ability of the first model for the sample dialogue statement. The first perplexity can be determined by the above formula (1), in which case the given text sequence is the above third dialogue.

[0090] S314, the second model is obtained by training the base model based on the second dialogue, and the second performance information of the second model is tested at the target process node based on the third dialogue.

[0091] Training the base model based on the second dialogue can be achieved through various model training methods in the field, and the embodiments of this application are not limited to this.

[0092] For example, an autoregressive training process is performed on the base model based on the second dialogue to obtain the second model. Specifically, the base model can predict the word probability distribution corresponding to the position of each word in the second dialogue based on the context of each word; then, based on each word and the word probability distribution corresponding to the position of each word, the second loss of the base model is determined; finally, the parameters of the base model are adjusted based on the second loss to obtain the second model. For the i-th word in the second dialogue, its context includes the first i-1 words in the second dialogue, and the word probability distribution corresponding to its position includes the probability of each word in the vocabulary appearing at the position of the i-th word, where i is a positive integer.

[0093] The second performance information may include any information that reflects the performance of the first model at the target flow node, such as, but not limited to, accuracy and perplexity. In one implementation, the second performance information may include the second perplexity of the sample dialogue statement. The second perplexity is used to measure the predictive ability of the second model for the sample dialogue statement. The second perplexity can be determined by the above formula (1), in which case the given text sequence is the above third dialogue.

[0094] If the first performance information and the second performance information do not meet the conditions for stopping expansion, then the target dialogue statement in the first dialogue will continue to be expanded, that is, the above S308~S314 will be repeated until the first performance information and the second performance information meet the conditions for stopping expansion.

[0095] The conditions for stopping expansion can be set according to actual needs, and this application embodiment does not limit this.

[0096] In one implementation, the first performance information includes the first perplexity of the sample dialogue statement, and the second performance information includes the second perplexity of the sample dialogue statement. In this case, the perplexity changes of the first model and the second model in the sample dialogue statement can be as follows: Case 1: Increase, meaning the first perplexity is less than the second perplexity.

[0097] This situation means that the second model has performed worse than the first model at the target process node. This indicates that the data expansion of the target process node is not effective and does not meet expectations. Therefore, in this case, the second dialogue obtained from the previous data expansion can be removed, and the data expansion of the target process node can be performed again.

[0098] Case 2: Decrease, meaning the first level of perplexity is greater than the second level of perplexity.

[0099] This situation indicates that the second model has improved its performance on the target process node compared to the first model. This shows that the data expansion on the target process node has a good effect and meets expectations. Therefore, in this case, data expansion on the target process node can be stopped.

[0100] Case 3: No change, but both the first and second perplexity are in the low range.

[0101] The lower range can be set according to actual needs, such as [0, 200), etc., and this application embodiment does not limit this.

[0102] Situation 3 means that the second model does not change in performance at the target process node compared to the first model, but the original first dialogue has already covered the target process node. Therefore, in this case, data expansion for the target process node can be stopped.

[0103] Case 4: No change, but both the first and second levels of confusion are in the high range.

[0104] The high range can be set according to actual needs, such as [200, 10000), etc., but this application embodiment does not limit it.

[0105] Situation 4 means that the second model does not change in performance at the target process node compared to the first model. However, the original first dialogue and the expanded second dialogue have low coverage of the target process node. Therefore, in this case, data expansion can continue to be carried out on the target process node.

[0106] Therefore, the conditions for stopping expansion may include, but are not limited to: the first perplexity is greater than the second perplexity; or, the first perplexity is equal to the second perplexity, and both the first and second perplexities are less than the perplexity threshold.

[0107] If the first performance information and the second performance information do not meet the conditions for stopping expansion, such as in situation 1 or situation 4 above, then repeat the above S308~S316 until the first performance information and the second performance information meet the conditions for stopping expansion, such as in situation 2 or situation 3 above.

[0108] The data augmentation method provided in this embodiment, after augmenting the target process nodes, also introduces a quantitative evaluation and iterative optimization of the model's performance on the target process nodes before and after augmentation. By quantitatively evaluating the model's performance on the target process nodes before and after augmentation, an interpretable evaluation chain is constructed, breaking through the traditional evaluation model that relies solely on end-to-end dialogue success rate, which helps to clarify the data augmentation effect on the target process nodes. Through iterative optimization, an automated data augmentation process can be achieved across the entire chain, allowing for more targeted data augmentation of the target process nodes and improving the coverage of the first dialogue across the entire process.

[0109] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0110] Based on the same inventive concept, this application also proposes a data expansion device. Please refer to... Figure 4 This is a schematic diagram of the structure of a data expansion device 400 provided in an embodiment of this application. The device 400 includes: a combination module 410, a first generation module 420, a second generation module 430, and an expansion module 440.

[0111] The combination module 410 is used to combine the process nodes to which the dialogue statements of adjacent rounds in the first dialogue belong, to obtain multiple process node combinations, and to determine the co-occurrence frequency of each process node combination.

[0112] The first generation module 420 is used to generate a first dialogue flowchart corresponding to each frequency threshold in the frequency threshold set, based on the combination of process nodes whose co-occurrence frequency exceeds the frequency threshold.

[0113] The second generation module 430 is used to generate a second dialogue flowchart based on the first dialogue flowchart corresponding to each frequency threshold, and to determine the target flow node to be optimized in the second dialogue flowchart.

[0114] The expansion module 440 is used to expand the target dialogue statements belonging to the target process node in the first dialogue to obtain the second dialogue.

[0115] In another embodiment, the second generation module includes: The first determining submodule is used to determine the minimum frequency threshold in the frequency threshold set; The first generation submodule is used to generate a second dialogue flowchart based on the first dialogue flowchart corresponding to the minimum frequency threshold.

[0116] In another embodiment, the target process node is determined in the following manner: A first frequency threshold and a second frequency threshold are determined from the set of frequency thresholds, wherein the first frequency threshold is less than the second frequency threshold; For each process node in the second dialogue flowchart, if the process node exists in the first dialogue flowchart corresponding to the first frequency threshold but does not exist in the second dialogue flowchart corresponding to the second frequency threshold, then the process node is determined as the target process node to be optimized.

[0117] In another embodiment, the second generation module further includes: The second determining submodule is used to determine the process node as a target process node to be optimized if the ratio between the number of first dialogues containing the process node and the total number of first dialogues is less than a preset ratio for each process node in the second dialogue flowchart.

[0118] In another embodiment, the data augmentation device further includes: The acquisition module is used to acquire a third dialogue based on the target process node, wherein the third dialogue contains sample dialogue statements belonging to the target process node; The first testing module is used to test the first performance information of the first model at the target process node based on the third dialogue. The first model is obtained by training the base model based on the first dialogue. The second testing module is used to train the base model based on the second dialogue to obtain a second model, and to test the second performance information of the second model at the target process node based on the third dialogue. The expansion module is further configured to continue expanding the target dialogue statement in the first dialogue if the first performance information and the second performance information do not meet the conditions for stopping expansion.

[0119] In another embodiment, the first performance information includes a first level of confusion of the sample dialogue statement, and the second performance information includes a second level of confusion of the sample dialogue statement; The conditions for stopping expansion include: The first perplexity is greater than the second perplexity; or, The first perplexity is equal to the second perplexity, and both the first perplexity and the second perplexity are less than the perplexity threshold.

[0120] In another embodiment, the acquisition module is used to: Determine a first path containing the target node from the second dialogue flowchart; For each process node on the first path, generate sample dialogue statements corresponding to the process node; The sample dialogue statements corresponding to each process node on the first path are concatenated to obtain the third dialogue.

[0121] In another embodiment, the second generation module is further configured to: After generating a second dialogue flowchart based on the first dialogue flowchart corresponding to each frequency threshold, for each process node in the second dialogue flowchart, the importance of the process node is determined based on the frequency threshold corresponding to the first dialogue flowchart containing the process node. The acquisition module includes: The third determination submodule is used to determine multiple second paths containing the target node from the second dialogue flowchart; The fourth determination submodule is used to determine the importance of each second path based on the importance of the process nodes on the second path. The fifth determining submodule is used to determine the second path with at least two levels of importance among the multiple second paths as the first path.

[0122] Obviously, the data expansion device provided in this application embodiment can serve as... Figure 1 The entity executing the data augmentation method shown, for example Figure 1 In the data augmentation method shown, step S102 can be performed by... Figure 4 The combined module 410 in the data expansion device shown executes step S104, which can be performed by... Figure 4 The first generation module 420 in the data expansion device shown executes step S106, which can be performed by... Figure 4 The second generation module 430 in the data expansion device shown executes step S108, which can be performed by... Figure 4 The expansion module 440 in the data expansion device shown is executed.

[0123] According to another embodiment of this application, Figure 4 The modules in the data expansion device shown can be individually or entirely merged into one or more other modules, or some of the modules can be further divided into multiple functionally smaller modules. This achieves the same operation without affecting the technical effects of the embodiments of this application. The above units are based on logical function division. In practical applications, the function of one module can be implemented by multiple modules, or the function of multiple modules can be implemented by one module. In the embodiments of this application, the data expansion device may also include other modules. In practical applications, these modules can also be implemented with the assistance of other modules, and can be implemented collaboratively by multiple modules.

[0124] According to another embodiment of this application, a general-purpose computing device, such as a computer, including processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM), can run an application capable of performing tasks such as... Figure 1 The computer program (including program code) for each step involved in the corresponding method shown, to construct such... Figure 4 The data expansion apparatus shown herein, and the data expansion method for implementing the embodiments of this application, are described. The computer program may be recorded on, for example, a computer-readable storage medium, and may be transferred to and executed in an electronic device via such a medium.

[0125] Figure 5 This is a schematic diagram of the structure of an electronic device provided in one embodiment of this application. Please refer to it. Figure 5 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and memory. The memory may include main memory, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk drive. Of course, the electronic device may also include other hardware required for other business operations.

[0126] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 5 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0127] Memory is used to store programs. Specifically, programs may include program code, which includes computer operation instructions. Memory may include main memory and non-volatile memory, and provides instructions and data to the processor.

[0128] The processor reads the corresponding computer program from non-volatile memory into main memory and then runs it, forming a data expansion device at the logical level. The processor executes the program stored in memory and specifically performs the following operations: The process nodes to which the dialogue statements of adjacent rounds in the first dialogue belong are combined to obtain multiple process node combinations, and the co-occurrence frequency of each process node combination is determined. For each frequency threshold in the frequency threshold set, a first dialogue flowchart corresponding to the frequency threshold is generated based on the combination of process nodes whose co-occurrence frequency exceeds the frequency threshold. Based on the first dialogue flowchart corresponding to each frequency threshold, a second dialogue flowchart is generated, and the target flow node to be optimized in the second dialogue flowchart is determined. The target dialogue statements belonging to the target process node in the first dialogue are expanded to obtain the second dialogue.

[0129] The above is as stated in this application. Figure 1The method executed by the data expansion device disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0130] The electronic device can also perform Figure 1 The method, and implement the data expansion device in Figure 1 , Figure 3 The functions of the embodiments shown are not described in detail here.

[0131] Of course, in addition to software implementation, the electronic device of this application does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. In other words, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0132] This application also proposes a computer-readable storage medium that stores one or more programs, the programs including instructions that, when executed by an electronic device including multiple applications, enable the electronic device to perform... Figure 1 The method of the illustrated embodiment is specifically used to perform the following operations: The process nodes to which the dialogue statements of adjacent rounds in the first dialogue belong are combined to obtain multiple process node combinations, and the co-occurrence frequency of each process node combination is determined. For each frequency threshold in the frequency threshold set, a first dialogue flowchart corresponding to the frequency threshold is generated based on the combination of process nodes whose co-occurrence frequency exceeds the frequency threshold. Based on the first dialogue flowchart corresponding to each frequency threshold, a second dialogue flowchart is generated, and the target flow node to be optimized in the second dialogue flowchart is determined. The target dialogue statements belonging to the target process node in the first dialogue are expanded to obtain the second dialogue.

[0133] This application also proposes a computer program product comprising a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps in the data augmentation method proposed in this application.

[0134] In summary, the above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

[0135] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0136] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0137] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0138] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

Claims

1. A data augmentation method, characterized in that, include: The process nodes to which the dialogue statements of adjacent rounds in the first dialogue belong are combined to obtain multiple process node combinations, and the co-occurrence frequency of each process node combination is determined. For each frequency threshold in the frequency threshold set, a first dialogue flowchart corresponding to the frequency threshold is generated based on the combination of process nodes whose co-occurrence frequency exceeds the frequency threshold. Based on the first dialogue flowchart corresponding to each frequency threshold, a second dialogue flowchart is generated, and the target flow node to be optimized in the second dialogue flowchart is determined. The target dialogue statements belonging to the target process node in the first dialogue are expanded to obtain the second dialogue.

2. The method according to claim 1, characterized in that, The process of generating a second dialogue flowchart based on the first dialogue flowchart corresponding to each frequency threshold includes: Determine the minimum frequency threshold in the set of frequency thresholds; A second dialogue flowchart is generated based on the first dialogue flowchart corresponding to the minimum frequency threshold.

3. The method according to claim 1, characterized in that, The target process node is determined in the following way: A first frequency threshold and a second frequency threshold are determined from the set of frequency thresholds, wherein the first frequency threshold is less than the second frequency threshold; For each process node in the second dialogue flowchart, if the process node exists in the first dialogue flowchart corresponding to the first frequency threshold but does not exist in the second dialogue flowchart corresponding to the second frequency threshold, then the process node is determined as the target process node to be optimized.

4. The method according to claim 3, characterized in that, Also includes: For each process node in the second dialogue flowchart, if the ratio between the number of first dialogues containing the process node and the total number of first dialogues is less than a preset ratio, then the process node is determined as a target process node to be optimized.

5. The method according to claim 1, characterized in that, After expanding the target dialogue statements belonging to the target flow node in the first dialogue to obtain the second dialogue, the method further includes: A third dialogue is obtained based on the target process node, and the third dialogue contains sample dialogue statements belonging to the target process node. Based on the third dialogue, the first performance information of the first model at the target process node is tested. The first model is obtained by training the base model based on the first dialogue. The second model is obtained by training the base model based on the second dialogue, and the second performance information of the second model at the target process node is tested based on the third dialogue. If the first performance information and the second performance information do not meet the conditions for stopping expansion, then the target dialogue statement in the first dialogue will continue to be expanded.

6. The method according to claim 5, characterized in that, The first performance information includes a first level of confusion of the sample dialogue statement, and the second performance information includes a second level of confusion of the sample dialogue statement; The conditions for stopping expansion include: The first level of perplexity is greater than the second level of perplexity; or, The first perplexity is equal to the second perplexity, and both the first perplexity and the second perplexity are less than the perplexity threshold.

7. The method according to claim 5, characterized in that, The step of obtaining the third dialogue based on the target process node includes: Determine a first path containing the target node from the second dialogue flowchart; For each process node on the first path, generate sample dialogue statements corresponding to the process node; The sample dialogue statements corresponding to each process node on the first path are concatenated to obtain the third dialogue.

8. The method according to claim 7, characterized in that, After generating the second dialogue flowchart based on the first dialogue flowchart corresponding to each frequency threshold, the process further includes: For each process node in the second dialogue flowchart, the importance of the process node is determined based on the frequency threshold corresponding to the first dialogue flowchart containing the process node. Determining the first path containing the target node from the second dialogue flowchart includes: Multiple second paths containing the target node are determined from the second dialogue flowchart; For each second path, the importance of the second path is determined based on the importance of the process nodes on the second path; The second path with at least two levels of importance among the plurality of second paths is determined as the first path.

9. A data expansion device, characterized in that, include: The combination module is used to combine the process nodes to which the dialogue statements of adjacent rounds in the first dialogue belong, to obtain multiple process node combinations, and to determine the co-occurrence frequency of each process node combination. The first generation module is used to generate a first dialogue flowchart corresponding to each frequency threshold in the frequency threshold set, based on the combination of process nodes whose co-occurrence frequency exceeds the frequency threshold. The second generation module is used to generate a second dialogue flowchart based on the first dialogue flowchart corresponding to each frequency threshold, and to determine the target flow node to be optimized in the second dialogue flowchart. An expansion module is used to expand the target dialogue statements belonging to the target process node in the first dialogue to obtain a second dialogue.

10. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the data augmentation method as described in any one of claims 1 to 8.