Business training data generation method and device, equipment, medium and program product
By collecting browser monitoring data and using a large language model to generate mapping rules for data augmentation, the problem of long recording time and inability to cover diverse scenarios in existing technologies has been solved. This enables efficient and flexible generation of business training data, improving data accuracy and training efficiency.
Patent Information
- Application Number
- CN202511991385.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-04-10
AI Technical Summary
Existing technologies that use recorded expert operation videos as business training data are time-consuming and cannot cover diverse scenarios. This results in business training data that relies on fixed data, lacks flexibility, and cannot adapt to diverse dynamic business needs. Consequently, the data suffers from significant redundancy, low accuracy, and poor reliability, severely impacting training efficiency and user experience.
By collecting browser monitoring data from standard business operating procedures, obtaining API documentation, extracting key information, and inputting it into a large language model to generate mapping rules, data augmentation is performed, and finally, the data is merged to generate target business training data.
It significantly improved the accuracy and reliability of business training data, increased training efficiency, saved time and manpower costs, and enhanced user experience.
Smart Images

Figure CN121836984A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of big data and the technical field of artificial intelligence, in particular to the application of a large model in the field of financial technology, and specifically relates to a business training data generation method and device, equipment, medium and program product. BACKGROUND
[0002] In the onboarding training of new employees in enterprises including banks, expert operation videos are recorded as business training data to enable new employees to query business training data and simulate business operation processes through terminal devices to learn business.
[0003] However, when expert operation videos are recorded as business training data, it takes a long time and cannot cover diverse scenarios, making the generated business training data dependent on fixed data. This makes the business training data lack flexibility and unable to adapt to diverse dynamic business needs, resulting in a large redundancy of business training data and low accuracy and poor reliability of business training data, which seriously affects training efficiency and reduces user experience. SUMMARY
[0004] In view of the above problems, the present application provides a business training data generation method, device, equipment, medium and program product.
[0005] According to a first aspect of the present application, a business training data generation method is provided, which comprises: obtaining browser monitoring data of a business standard operation process, wherein the browser monitoring data comprises: n initial request-response data pairs, wherein each initial request-response data pair comprises: initial business request data and initial business response data having a mapping relationship, and n is an integer greater than 1; based on the n initial request-response data pairs, obtaining related documents of application programming interfaces called by each initial request-response data pair in the n initial request-response data pairs, to generate n application programming interface document sets; performing key information extraction on the n application programming interface document sets to generate key information of the n application programming interfaces; inputting the n initial request-response data pairs and the key information of the n application programming interfaces corresponding thereto into a pre-trained target large language model to output a target mapping rule of each initial request-response data pair in the n initial request-response data pairs; based on the target mapping rule of each initial request-response data pair in the n initial request-response data pairs, performing data augmentation on the n initial request-response data pairs to generate m target request-response augmented data pairs, wherein m is an integer greater than 1; and merging the n initial request-response data pairs and the m target request-response augmented data pairs to generate k target business training data, wherein k is equal to the sum of n and m.
[0006] According to an embodiment of the present application, based on the n initial request response data pairs, the related documents of the application programming interface called by each initial request response data pair in the n initial request response data pairs are obtained, and n application programming interface document sets are generated, including: obtaining the request path in each initial request data in the n initial request response data pairs; performing parameterization processing on the request path in each initial request data in the n initial request response data pairs, to generate the request path in each initial request data in the n initial request response data pairs after parameterization; performing standardization processing on the request path in each initial request data in the n initial request response data pairs after parameterization, to generate the request path in each initial request data in the n initial request response data pairs after standardization, as the application programming interface identifier called by each initial request response data pair in the n initial request response data pairs; performing document search on a preset document library according to the application programming interface identifier called by each initial request response data pair in the n initial request response data pairs; and obtaining the related documents of the application programming interface called by each initial request response data pair in the n initial request response data pairs from the preset document library, to generate the n application programming interface document sets.
[0007] According to an embodiment of the present application, key information of the n application programming interfaces is generated by performing key information extraction on the n application programming interface document sets, including: obtaining the document data of each application programming interface document set in the n application programming interface document sets, performing data cleaning and data normalization on the document data of each application programming interface document set in the n application programming interface document sets, to generate standardized n application programming interface document data; and performing key information extraction on the standardized n application programming interface document data by natural language processing technology, to generate the key information of the n application programming interfaces.
[0008] According to an embodiment of the present application, the n initial request response data pairs and the key information of the n application programming interfaces corresponding thereto are input into a pre-trained target large language model, and a target mapping rule of each initial request response data pair in the n initial request response data pairs is output, including: presetting an initial prompt word, performing text cleaning on the initial prompt word to generate a first prompt word after text cleaning, performing sentence simplification on the first prompt word to generate a second prompt word after sentence simplification, performing term unification on the second prompt word to generate a third prompt word after term unification, performing ambiguity elimination on the third prompt word to generate a target prompt word after ambiguity elimination, and inputting the n initial request response data pairs and the key information of the n application programming interfaces corresponding thereto into the pre-trained target large language model according to the target prompt word, and outputting the target mapping rule of each initial request response data pair in the n initial request response data pairs.
[0009] According to an embodiment of the present application, based on the target mapping rule of each initial request response data pair in the n initial request response data pairs, data augmentation is performed on the n initial request response data pairs to generate m target request response augmented data pairs, including: obtaining the initial request data of each initial request response data pair in the n initial request response data pairs, performing data augmentation on the initial request data of each initial request response data pair in the n initial request response data pairs according to a preset data variation strategy to generate augmented request data of each initial request response data pair in the i initial request response data pairs, wherein the preset data variation strategy includes: field value randomization variation, structure variation and combination variation, i is an integer and i is greater than m; generating the i target request response augmented data pairs based on the augmented request data of each initial request response data pair in the i initial request response data pairs and the target mapping rule of each initial request response data pair in the i initial request response data pairs; performing consistency verification on the i target request response augmented data pairs; and obtaining the target request response augmented data pairs that pass the consistency verification from the i target request response augmented data pairs to generate the m target request response augmented data pairs.
[0010] According to an embodiment of the present application, the consistency verification on the i target request response augmented data pairs includes: constructing a mapping rule knowledge graph according to the n target mapping rules; and performing mapping rule query on the i target request response augmented data pairs according to the mapping rule knowledge graph, if the query result is that there is a mapping rule, it is characterized by passing the mapping rule consistency verification.
[0011] According to an embodiment of the present application, the method further comprises: generating a business training detection test question according to the target business training data, for business training detection.
[0012] According to a second aspect of the present application, a business training data generation apparatus is provided, comprising: a first acquisition module configured to acquire browser monitoring data of a business standard operation process, wherein the browser monitoring data comprises n initial request-response data pairs, each of which comprises initial business request data and initial business response data having a mapping relationship, and n is an integer greater than 1; a first generation module configured to acquire, based on the n initial request-response data pairs, related documents of application programming interfaces called by each of the n initial request-response data pairs, and generate n application programming interface document sets; a second generation module configured to extract key information from the n application programming interface document sets, and generate key information of n application programming interfaces; a third generation module configured to input the n initial request-response data pairs and the key information of the corresponding n application programming interfaces into a pre-trained target large language model, and output target mapping rules of each of the n initial request-response data pairs; a fourth generation module configured to perform data augmentation on the n initial request-response data pairs based on the target mapping rules of each of the n initial request-response data pairs, and generate m target request-response augmented data pairs, wherein m is an integer greater than n; and a fifth generation module configured to merge the n initial request-response data pairs and the m target request-response augmented data pairs, and generate k target business training data, wherein k is equal to the sum of n and m.
[0013] According to a third aspect of the present application, an electronic device is provided, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0014] According to a fourth aspect of the present application, a computer-readable storage medium is also provided, which stores a computer program or instructions, and the computer program or instructions are executed by a processor to implement the steps of the above method.
[0015] According to a fifth aspect of the present application, a computer program product is also provided, comprising a computer program or instructions, and the computer program or instructions are executed by a processor to implement the steps of the above method.
[0016] This application employs a technical approach that collects browser monitoring data from standard business operation processes, obtains API documentation from this monitoring data, extracts key information from these documents, generates target mapping rules for each initial request-response data pair using a large language model, performs data augmentation based on these target mapping rules, and finally generates target business training data. This method accurately understands business semantics by extracting key API information and generating mapping rules. It effectively improves the quality and correctness of the generated target business training data, significantly enhancing its accuracy and reliability, increasing training efficiency, saving time and manpower costs, and improving user experience. It addresses the technical problems of existing technologies that use recorded expert operation videos as business training data, which are time-consuming and cannot cover diverse scenarios. Furthermore, the generated business training data relies on fixed data, lacks flexibility, and cannot adapt to diverse dynamic business needs. This results in significant data redundancy, low accuracy, and poor reliability, severely impacting training efficiency and reducing user experience. Attached Figure Description
[0017] The above-mentioned contents, other objects, features and advantages of this application will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0018] Figure 1 The illustrations depict application scenarios of the business training data generation method, apparatus, device, medium, and program products according to embodiments of this application.
[0019] Figure 2 A flowchart illustrating a business training data generation method according to an embodiment of this application is shown schematically.
[0020] Figure 3 This illustration schematically shows a flowchart of generating a set of n application programming interface documents in a business training data generation method according to an embodiment of this application;
[0021] Figure 4 This illustration shows a flowchart illustrating key information for generating n application programming interfaces in a business training data generation method according to an embodiment of this application.
[0022] Figure 5 This illustration schematically shows a flowchart of the target mapping rule for each of the n initial request-response data pairs in the business training data generation method according to an embodiment of this application;
[0023] Figure 6 This illustration schematically shows a flowchart of generating m target request-response augmentation data pairs in a business training data generation method according to an embodiment of this application;
[0024] Figure 7 The flowchart illustrating the consistency verification in the business training data generation method according to an embodiment of this application is shown in the illustration.
[0025] Figure 8 This schematic diagram illustrates the structural block diagram of a business training data generation apparatus according to an embodiment of this application;
[0026] Figure 9 A block diagram schematically illustrates an electronic device suitable for implementing a business training data generation method according to an embodiment of this application. Detailed Implementation
[0027] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.
[0028] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0029] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0030] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0031] The accompanying drawings show some block diagrams and / or flowcharts. It should be understood that some blocks or combinations thereof in the block diagrams and / or flowcharts can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable control device, so that when executed by the processor, these instructions can create means for implementing the functions / operations described in these block diagrams and / or flowcharts.
[0032] First, the technical terms used in this article are explained as follows:
[0033] LLM (Large Language Model) is an artificial intelligence model generated by training on massive amounts of text data.
[0034] An API (Application Programming Interface) is a set of predefined functions, rules, and data formats used to request and exchange data or functionality with another software.
[0035] JSON (JavaScript Object Navigation) is a lightweight, structured data exchange format used for transmitting and storing data between different systems in a way that is easy for machines to parse and generate.
[0036] This application provides a method for generating business training data. The method includes: acquiring browser monitoring data of standard business operation processes, wherein the browser monitoring data includes n initial request-response data pairs, each initial request-response data pair including initial business request data and initial business response data with a mapping relationship, where n is an integer and greater than 1. Based on the n initial request-response data pairs, acquiring relevant documents of the application programming interfaces (APIs) called by each of the n initial request-response data pairs, generating a set of n API documentation. Extracting key information from the set of n API documentation to generate key information for the n APIs. Inputting the n initial request-response data pairs and the corresponding key information of the n APIs into a pre-trained target large language model, outputting a target mapping rule for each of the n initial request-response data pairs. Based on the target mapping rule for each of the n initial request-response data pairs, performing data augmentation on the n initial request-response data pairs to generate m target request-response augmentation data pairs, where m is an integer and greater than 1. The n initial request-response data pairs and the m target request-response incremental data pairs are merged to generate k target business training data, where k is equal to the sum of n and m.
[0037] According to the embodiments of this application, a technical approach is adopted to generate target business training data by collecting browser monitoring data of standard business operation processes, obtaining API documentation from the monitoring data, extracting key information from these documents, generating target mapping rules for each initial request-response data pair through a large language model, performing data augmentation based on the target mapping rules, and finally generating target business training data. This approach can accurately understand business semantics by extracting key API information and generating mapping rules. It effectively improves the quality and correctness of the generated target business training data, significantly enhances the accuracy and reliability of the target business training data, improves training efficiency, saves time and manpower costs, and improves user experience. It solves the technical problems of existing technologies that use recorded expert operation videos as business training data, which are time-consuming and cannot cover diverse scenarios. The generated business training data relies on fixed data, lacks flexibility, and cannot adapt to diverse dynamic business needs. This results in significant redundancy and low accuracy and reliability of the business training data, seriously affecting training efficiency and reducing user experience.
[0038] Figure 1 The illustration schematically depicts an application scenario of the business training data generation method, apparatus, device, medium, and program product according to embodiments of this application. It should be noted that... Figure 1 The examples shown are merely examples of scenarios in which the embodiments of this application can be applied, to help those skilled in the art understand the technical content of this application, but do not mean that the embodiments of this application cannot be used in other devices, systems, environments or scenarios.
[0039] like Figure 1 As shown, application scenario 100 according to this embodiment may include an application scenario for generating business training data. Network 104 is used as a medium to provide a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0040] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0041] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0042] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0043] It should be noted that the business training data generation method provided in this application embodiment can generally be executed by server 105. Correspondingly, the business training data generation device provided in this application embodiment can generally be located in server 105. The business training data generation method provided in this application embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the business training data generation device provided in this application embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.
[0044] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0045] The following will be based on Figure 1 The described scene, through Figures 2-7 The method for generating business training data according to the disclosed embodiments is described in detail. It should be noted that the above application scenarios are shown only to facilitate understanding of the spirit and principles of this application, and the implementation methods of this application are not limited in any way. Rather, the implementation methods of this application can be applied to any applicable scenario.
[0046] Figure 2 A flowchart illustrating a business training data generation method according to an embodiment of this application is shown.
[0047] like Figure 2 As shown, the method 200 includes steps S201 to S206.
[0048] Step S201: Obtain browser monitoring data of the standard business operation process, wherein the browser monitoring data includes: n initial request-response data pairs, wherein each initial request-response data pair includes: initial business request data and initial business response data with a mapping relationship, where n is an integer and n is greater than 1.
[0049] For example, the request data in a request-response data pair typically includes: request headers, request path, request method, and request body.
[0050] Step S202: Based on the n initial request-response data pairs, obtain the relevant documentation of the application programming interface called by each of the n initial request-response data pairs, and generate a set of n application programming interface documentation.
[0051] Figure 3 The flowchart illustrating the process of generating a set of n application programming interface documents in the business training data generation method according to an embodiment of this application is shown.
[0052] like Figure 3 As shown, the method 300 includes steps S301 to S305.
[0053] Step S301: Obtain the request path in each of the n initial request response data pairs.
[0054] Step S302: Deparameterize the request path in each initial request data in the n initial request response data pairs to generate deparameterized request paths in each initial request data in the n initial request response data pairs.
[0055] For example, deparameterization can include replacing dynamic parameters with uniform placeholders.
[0056] Step S303: Standardize the request path in each initial request data in the deparameterized n initial request-response data pairs to generate standardized request paths in each initial request data in the n initial request-response data pairs, which serve as application programming interface identifiers called by each initial request-response data pair in the n initial request-response data pairs.
[0057] For example, standardization processing can include processing data according to a unified standard format specification.
[0058] Step S304: Perform a document search on the preset document library based on the application programming interface identifier called by each of the n initial request-response data pairs.
[0059] Step S305: Obtain the relevant documents of the application programming interface called by each of the n initial request-response data pairs from the preset document library, and generate the n application programming interface document set.
[0060] In addition, if no relevant document is found in the local preset document library, you can also search for relevant documents in the online document library.
[0061] By deparameterizing and standardizing specific request paths, they are converted into easily recognizable standardized interface identifiers. These standardized interface identifiers are then used to search for documents from a pre-defined document library, generating n API document sets. This effectively improves the correctness and reliability of the generated n API document sets, while also increasing the efficiency of API document set generation and saving computer and network resources.
[0062] Return to reference Figure 2 In step S203, key information is extracted from the set of n application programming interface documents to generate key information for the n application programming interfaces.
[0063] Figure 4 The flowchart illustrating the generation of key information for n application programming interfaces in the business training data generation method according to an embodiment of this application is shown.
[0064] like Figure 4 As shown, the method 400 includes steps S401 to S402.
[0065] Step S401: Obtain the document data of each application programming interface (API) document set in the n API document sets, perform data cleaning and data normalization on the document data of each API document set in the n API document sets, and generate standardized API document data for the n APIs.
[0066] Step S402: Extract key information from the document data of the standardized n application programming interfaces using natural language processing technology to generate key information for the n application programming interfaces.
[0067] For example, key information in an application programming interface typically includes: parameters, return values, data types, and constraints.
[0068] Noise removal through data cleaning effectively improves the purity of document data; data normalization unifies document data into a unified standard, achieving data isomorphism; and natural language processing techniques are used to extract key data from the normalized document data, which can effectively improve the reliability of input data for large language models, enhance the computational efficiency of large models, and improve the accuracy of large model outputs.
[0069] Return to reference Figure 2 In step S204, the key information of the n initial request-response data pairs and the corresponding n application programming interfaces is input into the pre-trained target large language model, and the target mapping rule of each initial request-response data pair in the n initial request-response data pairs is output.
[0070] Figure 5 The flowchart illustrates the target mapping rule for each of the n initial request-response data pairs in the business training data generation method according to an embodiment of this application.
[0071] like Figure 5 As shown, the method 500 includes steps S501 to S505.
[0072] Step S501: Preset initial prompt words, perform text cleaning on the initial prompt words, and generate the first prompt words after text cleaning.
[0073] For example, preset initial prompts can include: role definition, core task description, input specifications, output requirements, and constraints. The initial prompts can be cleaned by removing unnecessary special characters, standardizing spaces and line breaks, and correcting spelling errors, generating a cleaned first prompt.
[0074] Step S502: Simplify the first prompt word to generate a simplified second prompt word.
[0075] For example, the first prompt word can be simplified by using dependency parsing to break down long sentences into shorter sentences and remove redundant modifiers, thus generating a simplified second prompt word.
[0076] Step S503: Standardize the terminology of the second prompt word to generate a third prompt word after standardization.
[0077] For example, synonyms in the second prompt word can be replaced with standardized terms, such as unifying "interface" as "API" and changing "reply" to "response".
[0078] Step S504: Perform ambiguity removal on the third prompt word to generate the ambiguity-removed target prompt word.
[0079] For example, semantic elimination techniques can be used to determine the meaning of polysemous third-party prompts within their context and replace them with more specific words. Specific numerical values or ranges can also be added to replace vague terms.
[0080] Step S505: Based on the target prompt words, input the key information of the n initial request-response data pairs and the corresponding n application programming interfaces into the pre-trained target large language model, and output the target mapping rule for each of the n initial request-response data pairs.
[0081] For example, the target mapping rule can be a structured JSON object.
[0082] By performing text cleaning, sentence simplification, terminology standardization, and ambiguity removal on pre-defined prompts, we can eliminate vague expressions and inconsistencies in terminology that may lead to LLM misunderstandings, thereby improving the accuracy of generated target prompts. We can remove redundant modifiers and complex sentence structures, highlighting the core instructions of the target prompts and reducing the cognitive load on LLM. We ensure that the same terminology is used for the same concept throughout the text, maintaining consistency in target prompts. We clarify the single intent of statements that may lead to multiple interpretations, making target prompts unambiguous. This significantly improves the accuracy and consistency of the model output, reduces task comprehension bias in LLM, and ensures alignment with business objectives.
[0083] Return to reference Figure 2 In step S205, based on the target mapping rule of each of the n initial request-response data pairs, data augmentation is performed on the n initial request-response data pairs to generate m target request-response augmentation data pairs, where m is an integer and m is greater than 1.
[0084] Figure 6 The flowchart illustrating the generation of m target request-response augmentation data pairs in the business training data generation method according to an embodiment of this application is shown in the illustration.
[0085] like Figure 6 As shown, the method 600 includes steps S601 to S604.
[0086] Step S601: Obtain the initial request data of each of the n initial request response data pairs; perform data augmentation on the initial request data of each of the n initial request response data pairs according to a preset data mutation strategy to generate augmented request data for each of the i initial request response data pairs; wherein the preset data mutation strategy includes: field value randomization mutation, structural mutation, and combined mutation, where i is an integer and i is greater than m.
[0087] For example, field value randomization mutation strategies can randomly change field values in a request while maintaining reasonable formatting and semantics. Structural mutation strategies can alter the structure of a request, such as adding or deleting optional fields. Combination mutation strategies can combine parts of multiple initial requests to form a new request.
[0088] Step S602: Based on the incremental request data of each of the i initial request-response data pairs, and according to the target mapping rule of each of the i initial request-response data pairs, generate the i target request-response incremental data pairs.
[0089] Step S603: Perform consistency verification on the i target request response augmentation data pairs.
[0090] Figure 7 The flowchart illustrating consistency verification in the business training data generation method according to an embodiment of this application is shown in the illustration.
[0091] like Figure 7 As shown, the method 700 includes steps S701 to S702.
[0092] Step S701: Construct a mapping rule knowledge graph based on the n target mapping rules.
[0093] For example, the business function nodes and their attributes in n target mapping rules can be used as the intersection points of the mapping rule knowledge graph, and the mapping rule relationships between the business function nodes and their attributes can be used as the edges to construct the mapping rule knowledge graph.
[0094] Step S702: Perform a mapping rule query on the i target request-response augmentation data pairs according to the mapping rule knowledge graph. If the query result indicates that a mapping rule exists, it indicates that the mapping rule consistency verification has been passed.
[0095] If the query result indicates that no mapping rule exists, it means that the mapping rule consistency verification failed. Data pairs that failed the mapping rule consistency verification can be removed from the target request response, and a data removal log can be generated.
[0096] Constructing a target mapping rule knowledge graph for consistency verification through target mapping rules can improve the efficiency and interpretability of consistency verification. This further enhances the reliability of the generated target request-response data pairs.
[0097] Return to reference Figure 6 In step S604, the target request response augmentation data pairs that have passed the consistency verification among the i target request response augmentation data pairs are obtained, and the m target request response augmentation data pairs are generated.
[0098] Data augmentation is performed on the initial request data using data mutation strategies such as randomized field value mutation, structural mutation, and combined mutation. This augmentation can be achieved through methods such as replacing valid values, adding or deleting optional fields, and logically combining parameters. This ensures that the generated augmented data broadly covers business scenarios and edge cases, effectively improving the reliability of the augmented request data. Furthermore, consistency verification of the target request-response augmented data pairs using target mapping rules significantly improves the accuracy and correctness of the generated target request-response augmented data pairs.
[0099] Return to reference Figure 2 In step S206, the n initial request-response data pairs and the m target request-response incremental data pairs are merged to generate k target business training data, where k is equal to the sum of n and m.
[0100] According to embodiments of this application, the method further includes: generating business training test questions based on the target business training data for business training testing. Generating business training test questions from the target business training data and conducting business training testing can significantly improve the efficiency of business training and enhance the user experience.
[0101] Figure 8 The diagram illustrates the structure of a business training data generation apparatus according to an embodiment of this application.
[0102] like Figure 8 As shown, the device 800 includes: a first acquisition module 801, a first generation module 802, a second generation module 803, a third generation module 804, a fourth generation module 805, and a fifth generation module 806.
[0103] The first acquisition module 801 is used to acquire browser monitoring data of the standard business operation process. The browser monitoring data includes n initial request-response data pairs, where each initial request-response data pair includes initial business request data and initial business response data with a mapping relationship, and n is an integer greater than 1. In one embodiment, the first acquisition module 801 can be used to execute step S201 described above, which will not be repeated here.
[0104] The first generation module 802 is configured to, based on the n initial request-response data pairs, obtain the relevant documentation for the application programming interface (API) invoked by each of the n initial request-response data pairs, and generate a set of n API documentation. In one embodiment, the first generation module 802 may be used to execute step S202 described above.
[0105] The first generation module 802 includes: a second acquisition module, a sixth generation module, a seventh generation module, a first search module, and an eighth generation module.
[0106] The second acquisition module is used to acquire the request path in each of the n initial request-response data pairs. In one embodiment, the second acquisition module can be used to execute step S301 described above, which will not be repeated here.
[0107] The sixth generation module is used to deparameterize the request path in each of the n initial request-response data pairs, generating a deparameterized request path in each of the n initial request-response data pairs. In one embodiment, the sixth generation module can be used to execute step S302 described above, which will not be repeated here.
[0108] The seventh generation module is used to standardize the request path in each of the n initial request data pairs in the deparameterized initial request-response data pairs, generating standardized request paths in each of the n initial request-response data pairs, which serve as application programming interface identifiers called by each of the n initial request-response data pairs. In one embodiment, the seventh generation module can be used to execute step S303 described above, which will not be repeated here.
[0109] The first search module is used to perform a document search on a preset document library based on the application programming interface identifier invoked by each of the n initial request-response data pairs. In one embodiment, the first search module can be used to execute step S304 described above, which will not be repeated here.
[0110] The eighth generation module is used to obtain the relevant documents of the application programming interface (API) called by each of the n initial request-response data pairs from a preset document library, and generate the n API document sets. In one embodiment, the eighth generation module can be used to execute step S305 described above, which will not be repeated here.
[0111] The second generation module 803 is used to extract key information from the n sets of application programming interface (API) documents and generate key information for the n APIs. In one embodiment, the second generation module 803 can be used to execute step S203 described above.
[0112] The second generation module 803 includes: the ninth generation module and the tenth generation module.
[0113] The ninth generation module is used to obtain document data for each of the n application programming interface (API) document sets, perform data cleaning and normalization on the document data of each of the n API document sets, and generate standardized document data for the n APIs. In one embodiment, the ninth generation module can be used to execute step S401 described above, which will not be repeated here.
[0114] The tenth generation module is used to extract key information from the document data of the standardized n application programming interfaces (APIs) using natural language processing technology, and generate key information for the n APIs. In one embodiment, the tenth generation module can be used to execute step S402 described above, which will not be repeated here.
[0115] The third generation module 804 is used to input the key information of the n initial request-response data pairs and the corresponding n application programming interfaces into the pre-trained target large language model, and output the target mapping rule for each of the n initial request-response data pairs. In one embodiment, the third generation module 804 can be used to execute step S204 described above.
[0116] The third generation module 804 includes: the eleventh generation module, the twelfth generation module, the thirteenth generation module, the fourteenth generation module, and the fifteenth generation module.
[0117] The eleventh generation module is used to preset initial prompt words, perform text cleaning on the initial prompt words, and generate a first prompt word after text cleaning. In one embodiment, the eleventh generation module can be used to execute step S501 described above, which will not be repeated here.
[0118] The twelfth generation module is used to simplify the first prompt word and generate a simplified second prompt word. In one embodiment, the twelfth generation module can be used to perform step S502 described above, which will not be repeated here.
[0119] The thirteenth generation module is used to standardize the terminology of the second prompt word and generate a third prompt word after standardization. In one embodiment, the thirteenth generation module can be used to execute step S503 described above, which will not be repeated here.
[0120] The fourteenth generation module is used to perform ambiguity removal on the third prompt word and generate a ambiguity-removed target prompt word. In one embodiment, the fourteenth generation module can be used to execute step S504 described above, which will not be repeated here.
[0121] The fifteenth generation module is used to input the key information of the n initial request-response data pairs and their corresponding n application programming interfaces into a pre-trained target large language model based on the target prompt words, and output the target mapping rule for each of the n initial request-response data pairs. In one embodiment, the fifteenth generation module can be used to execute step S505 described above, which will not be repeated here.
[0122] The fourth generation module 805 is used to perform data augmentation on the n initial request-response data pairs based on the target mapping rule of each initial request-response data pair, generating m target request-response augmented data pairs, where m is an integer and m is greater than 1. In one embodiment, the fourth generation module 805 can be used to execute step S205 described above.
[0123] The fourth generation module 805 includes: the sixteenth generation module, the seventeenth generation module, the first verification module, and the eighteenth generation module.
[0124] The sixteenth generation module is used to obtain the initial request data of each of the n initial request-response data pairs, and to perform data augmentation on the initial request data of each of the n initial request-response data pairs according to a preset data mutation strategy, generating augmented request data for each of the i initial request-response data pairs. The preset data mutation strategy includes: field value randomization mutation, structural mutation, and combined mutation, where i is an integer and i is greater than m. In one embodiment, the sixteenth generation module can be used to execute step S601 described above, which will not be repeated here.
[0125] The seventeenth generation module is used to generate the i target request-response augmented data pairs based on the augmented request data of each of the i initial request-response data pairs and the target mapping rules of each of the i initial request-response data pairs. In one embodiment, the seventeenth generation module can be used to execute step S602 described above, which will not be repeated here.
[0126] The first verification module is used to perform consistency verification on the i target request-response augmentation data pairs. In one embodiment, the first verification module can be used to execute step S603 described above.
[0127] The first verification module includes: the nineteenth generation module and the second verification module.
[0128] The nineteenth generation module is used to construct a mapping rule knowledge graph based on the n target mapping rules. In one embodiment, the nineteenth generation module can be used to execute step S701 described above, which will not be repeated here.
[0129] The second verification module is used to perform mapping rule queries on the i target request-response augmentation data pairs according to the mapping rule knowledge graph. If the query result indicates that a mapping rule exists, it signifies that the mapping rule consistency verification has been passed. In one embodiment, the second verification module can be used to execute step S702 described above, which will not be repeated here.
[0130] The eighteenth generation module is used to obtain the target request-response augmented data pairs that have passed consistency verification from the i target request-response augmented data pairs, and generate the m target request-response augmented data pairs. In one embodiment, the eighteenth generation module can be used to execute step S604 described above, which will not be repeated here.
[0131] The fifth generation module 806 is used to merge the n initial request-response data pairs and the m target request-response augmentation data pairs to generate k target business training data pairs, where k equals the sum of n and m. In one embodiment, the fifth generation module 806 can be used to execute step S206 described above, which will not be repeated here.
[0132] The device also includes a twentieth generation module, used to generate business training test questions based on the target business training data, for use in business training testing.
[0133] According to embodiments of this application, any plurality of modules among the first acquisition module 801, first generation module 802, second generation module 803, third generation module 804, fourth generation module 805, and fifth generation module 806 can be combined into one module, or any one of these modules can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules can be combined with at least part of the functionality of other modules and implemented in one module. According to embodiments of this application, at least one of the first acquisition module 801, first generation module 802, second generation module 803, third generation module 804, fourth generation module 805, and fifth generation module 806 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging the circuitry, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in a suitable combination of any of these. Alternatively, at least one of the first acquisition module 801, the first generation module 802, the second generation module 803, the third generation module 804, the fourth generation module 805, and the fifth generation module 806 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.
[0134] Figure 9 A block diagram schematically illustrates an electronic device suitable for implementing a business training data generation method according to an embodiment of this application.
[0135] like Figure 9 As shown, an electronic device 900 according to an embodiment of this application includes a processor 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage portion 908 into a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this application.
[0136] RAM 903 stores various programs and data required for the operation of electronic device 900. Processor 901, ROM 902, and RAM 903 are interconnected via bus 904. Processor 901 executes various operations of the method flow according to embodiments of this application by executing programs in ROM 902 and / or RAM 903. It should be noted that the programs may also be stored in one or more memories other than ROM 902 and RAM 903. Processor 901 may also execute various operations of the method flow according to embodiments of this application by executing programs stored in said one or more memories.
[0137] According to embodiments of this application, the electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to a bus 904. The electronic device 900 may also include one or more of the following components connected to the input / output (I / O) interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the input / output (I / O) interface 905 as needed. A removable medium 911, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 910 as needed so that computer programs read from it can be installed into the storage section 908 as needed.
[0138] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.
[0139] According to embodiments of this application, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this application, the computer-readable storage medium may include ROM 902 and / or RAM 903 and / or one or more memories other than ROM 902 and RAM 903 described above.
[0140] Embodiments of this application also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code enables the computer system to implement the business training data generation method provided in the embodiments of this application.
[0141] When the computer program is executed by the processor 901, it performs the functions defined in the system / apparatus of this application embodiment. According to the embodiments of this application, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0142] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and downloaded and installed via the communication section 909, and / or installed from a removable medium 911. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0143] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 909, and / or installed from the removable medium 911. When the computer program is executed by the processor 901, it performs the functions defined in the system of this application embodiment. According to the embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0144] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0145] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0146] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.
Claims
1. A method for generating business training data, characterized in that, The method includes: Obtain browser monitoring data of standard business operation process, wherein the browser monitoring data includes: n initial request-response data pairs, wherein each initial request-response data pair includes: initial business request data and initial business response data with mapping relationship, where n is an integer and n is greater than 1; Based on the n initial request-response data pairs, obtain the relevant documentation of the application programming interface called by each of the n initial request-response data pairs, and generate a set of n application programming interface documentation. Extract key information from the n application programming interface (API) document sets to generate key information for the n APIs; Input the key information of the n initial request-response data pairs and the corresponding n application programming interfaces into the pre-trained target large language model, and output the target mapping rule for each of the n initial request-response data pairs. Based on the target mapping rule of each of the n initial request-response data pairs, data augmentation is performed on the n initial request-response data pairs to generate m target request-response augmented data pairs, where m is an integer and m is greater than 1; and The n initial request-response data pairs and the m target request-response incremental data pairs are merged to generate k target business training data, where k is equal to the sum of n and m.
2. The method according to claim 1, characterized in that, Based on the n initial request-response data pairs, obtain the relevant documentation for the application programming interface (API) invoked by each of the n initial request-response data pairs, and generate a set of n API documentation, including: Obtain the request path from each of the n initial request-response data pairs; The request path in each of the n initial request-response data pairs is deparameterized to generate the deparameterized request path in each of the n initial request-response data pairs. The request path in each initial request data in the n initial request-response data pairs that have been deparameterized is standardized to generate a standardized request path in each initial request data in the n initial request-response data pairs, which serves as the application programming interface identifier called by each initial request-response data pair in the n initial request-response data pairs. A document search is performed on the preset document library based on the application programming interface identifier invoked by each of the n initial request-response data pairs; and Retrieve the relevant documentation for the application programming interface (API) invoked by each of the n initial request-response data pairs from the preset document library, and generate the n API documentation sets.
3. The method according to claim 1, characterized in that, Key information is extracted from the n application programming interface (API) document sets to generate key information for the n APIs, including: Obtain the document data of each of the n application programming interface (API) document sets; perform data cleaning and normalization on the document data of each of the n API document sets to generate standardized document data for the n APIs; and Key information is extracted from the documentation data of the standardized n application programming interfaces using natural language processing technology to generate key information for the n application programming interfaces.
4. The method according to claim 1, characterized in that, Input the key information of the n initial request-response data pairs and their corresponding n application programming interfaces into the pre-trained target large language model, and output the target mapping rule for each of the n initial request-response data pairs, including: A preset initial prompt word is used, and the text of the initial prompt word is cleaned to generate a first prompt word after text cleansing; The first prompt word is simplified to generate a second prompt word after simplification. Standardize the terminology of the second prompt word to generate a third prompt word with standardized terminology. The third prompt word is disambiguated to generate a disambiguated target prompt word; and Based on the target prompt words, the key information of the n initial request-response data pairs and the corresponding n application programming interfaces are input into the pre-trained target large language model, and the target mapping rule of each initial request-response data pair in the n initial request-response data pairs is output.
5. The method according to claim 1, characterized in that, Based on the target mapping rule of each of the n initial request-response data pairs, data augmentation is performed on the n initial request-response data pairs to generate m target request-response augmented data pairs, including: Obtain the initial request data of each of the n initial request-response data pairs, and perform data augmentation on the initial request data of each of the n initial request-response data pairs according to a preset data mutation strategy to generate augmented request data for each of the i initial request-response data pairs. The preset data mutation strategy includes: field value randomization mutation, structural mutation, and combined mutation, where i is an integer and i is greater than m. Based on the incremental request data of each of the i initial request-response data pairs, and based on the target mapping rule of each of the i initial request-response data pairs, generate the i target request-response incremental data pairs. Perform consistency verification on the i target request-response augmentation data pairs; and Obtain the target request response augmentation data pairs that have passed consistency verification from the i target request response augmentation data pairs, and generate the m target request response augmentation data pairs.
6. The method according to claim 5, characterized in that, Perform consistency verification on the i target request-response augmentation data pairs, including: Construct a mapping rule knowledge graph based on the n target mapping rules; and Based on the mapping rule knowledge graph, the mapping rule query is performed on the i target request-response augmentation data pairs. If the query result indicates that a mapping rule exists, it indicates that the mapping rule consistency verification has been passed.
7. The method according to any one of claims 1 to 6, characterized in that, The method also includes: Based on the target business training data, business training test questions are generated for business training assessment.
8. A business training data generation device, characterized in that, The device includes: The first acquisition module is used to acquire browser listening data of the standard business operation process. The browser listening data includes n initial request-response data pairs, wherein each initial request-response data pair includes initial business request data and initial business response data with a mapping relationship, where n is an integer and n is greater than 1. The first generation module is used to obtain the relevant documentation of the application programming interface called by each of the n initial request-response data pairs based on the n initial request-response data pairs, and generate a set of n application programming interface documentation. The second generation module is used to extract key information from the n sets of application programming interface documents and generate key information for the n application programming interfaces. The third generation module is used to input the key information of the n initial request-response data pairs and the corresponding n application programming interfaces into the pre-trained target large language model, and output the target mapping rule of each initial request-response data pair in the n initial request-response data pairs. The fourth generation module is used to perform data augmentation on the n initial request-response data pairs based on the target mapping rule of each initial request-response data pair, generating m target request-response augmented data pairs, where m is an integer and m is greater than n; and The fifth generation module is used to merge the n initial request-response data pairs and the m target request-response incremental data pairs to generate k target business training data, where k is equal to the sum of n and m.
9. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 7.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.