Data generation method and device based on large model, equipment and medium
By obtaining application code data and using a large model to parse the code to generate responses, the existing technology problems of high labor cost and insufficient flexibility in answering application function questions are solved, and an efficient and accurate question and answer process is achieved.
Patent Information
- Application Number
- CN202410804877.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-09-13
AI Technical Summary
When the existing technology answers users' questions about application functions or usage methods, the labor cost is high and the flexibility of automatic question and answer is insufficient, making it difficult to adapt to application version updates or function iterations.
By obtaining the code data of the target application, combined with the user inquiry data, and using a large model (such as a pre-trained large language model) to parse the code and generate reply data, efficient and accurate question and answer can be achieved.
It improves the efficiency and quality of reply data generation, reduces labor costs, and improves the flexibility and adaptability of question and answer.
Smart Images

Figure CN118643139A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, in particular to technical fields such as natural language processing and deep learning, and specifically to a data generation method, device, electronic device, computer-readable storage medium and computer program product based on a large model. Background Art
[0002] Artificial intelligence is a discipline that studies how to use computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.). It includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.
[0003] With the development of computer technology, the functions of application programs are becoming more and more complex. When users have questions about the functions or usage of application programs, it is necessary to answer the questions raised by users.
[0004] The methods described in this section are not necessarily methods that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any method described in this section is considered to be prior art simply because it is included in this section. Similarly, unless otherwise indicated, the issues mentioned in this section should not be considered to have been recognized in any prior art. Summary of the invention
[0005] The present disclosure provides a method, device, electronic device, computer-readable storage medium and computer program product for generating data based on a large model.
[0006] According to one aspect of the present disclosure, a large model-based data generation method is provided, comprising: in response to determining that inquiry data from a user includes inquiry information regarding a function or usage of a preset target application, acquiring code data of the target application; and generating reply data based on the inquiry data and the code data.
[0007] According to another aspect of the present disclosure, a data generation device based on a large model is provided, including: an acquisition unit, configured to acquire code data of a target application in response to determining that inquiry data from a user includes inquiry information regarding a function or usage of a preset target application; and a generation unit, configured to generate reply data based on the inquiry data and the code data.
[0008] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned data generation method.
[0009] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the above data generation method.
[0010] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein the computer program can implement the above data generation method when executed by a processor.
[0011] According to one or more embodiments of the present disclosure, the generation efficiency and quality of reply data may be improved.
[0012] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0014] Figure 1 A schematic diagram showing an exemplary system in which the various methods described herein may be implemented according to an exemplary embodiment of the present disclosure;
[0015] Figure 2 A flow chart showing a data generation method according to an exemplary embodiment of the present disclosure is shown;
[0016] Figure 3 An interactive flow chart of a data generation method according to an exemplary embodiment of the present disclosure is shown;
[0017] Figure 4 A structural block diagram of a data generating device according to an exemplary embodiment of the present disclosure is shown;
[0018] Figure 5 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0019] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0020] In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of these elements, and such terms are only used to distinguish one element from another element. In some examples, the first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.
[0021] The terms used in the description of various examples in this disclosure are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element can be one or more. In addition, the term "and / or" used in this disclosure covers any one of the listed items and all possible combinations.
[0022] In the related art, in order to answer questions raised by users about the functions or usage of an application, one way is for manual customer service to answer, and another way is to pre-write a FAQ document to store the FAQ and the corresponding answer content, and realize automatic Q&A based on the preset document. However, answering user questions by manual customer service brings high labor costs, and automatic Q&A based on the preset document is not flexible enough, and it also takes a high labor cost to maintain the preset document so that the content of the preset document can adapt to the version update or function iteration of the application.
[0023] Based on this, the present disclosure provides a data generation method, which obtains the target application code data when receiving an inquiry about the function or usage of the target application, and obtains response data for the user inquiry in combination with the code data. By parsing the code of the target application, the questions and answers associated with the target application can be completed efficiently and accurately, thereby improving the efficiency of question and answer.
[0024] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0025] Figure 1 FIG. 1 is a schematic diagram of an exemplary system 100 in which various methods and apparatuses described herein may be implemented according to an embodiment of the present disclosure. Figure 1, the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.
[0026] In an embodiment of the present disclosure, the server 120 may run one or more services or software applications that enable the data generation method to be performed.
[0027] In some embodiments, server 120 may also provide other services or software applications, which may include non-virtualized environments and virtualized environments. In some embodiments, these services may be provided as web-based services or cloud services, such as provided to users of client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.
[0028] exist Figure 1 In the configuration shown, the server 120 may include one or more components that implement the functions performed by the server 120. These components may include software components, hardware components, or a combination thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may in turn utilize one or more client applications to interact with the server 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from the system 100. Therefore, Figure 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.
[0029] The user may use client devices 101, 102, 103, 104, 105 and / or 106 to send query data. The client device may provide an interface that enables the user of the client device to interact with the client device. The client device may also output information to the user via the interface. Figure 1 Only six client devices are depicted, but one skilled in the art will appreciate that the present disclosure may support any number of client devices.
[0030] Client devices 101, 102, 103, 104, 105 and / or 106 may include various categories of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, game systems, thin clients, various messaging devices, sensors or other sensing devices, etc. These computer devices may run various categories and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux or Linux-like operating systems (such as GOOGLE Chrome OS); or include various mobile operating systems, such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, Android. Portable handheld devices may include cellular phones, smart phones, tablet computers, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Game systems may include various handheld game devices, Internet-enabled game devices, etc. The client device is capable of executing a variety of different applications, such as various Internet-related applications, communication applications (eg, email applications), short message service (SMS) applications, and may use various communication protocols.
[0031] The network 110 may be any type of network known to those skilled in the art that may support data communications using any of a variety of available protocols, including but not limited to TCP / IP, SNA, IPX, etc. By way of example only, one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a blockchain network, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.
[0032] Server 120 may include one or more general purpose computers, dedicated server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain a server's virtual storage device). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.
[0033] The computing units in the server 120 may run one or more operating systems including any of the above operating systems and any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and / or middle-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.
[0034] In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and 106. Server 120 may also include one or more applications to display data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.
[0035] In some embodiments, the server 120 may be a server of a distributed system, or a server combined with a blockchain. The server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in a cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and virtual private servers (VPS) services.
[0036] The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. The databases 130 may reside in various locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. The databases 130 may be of different categories. In some embodiments, the databases used by the server 120 may be, for example, relational databases. One or more of these databases may store, update, and retrieve data to and from the databases in response to commands.
[0037] In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the applications may be different categories of databases, such as a key-value store, an object store, or a conventional store backed by a file system.
[0038] Figure 1The system 100 may be configured and operated in various ways to enable the application of various methods and apparatuses described in the present disclosure.
[0039] Figure 2 FIG. 2 shows a flow chart of a data generation method 200 according to an exemplary embodiment of the present disclosure. Figure 2 As shown, the method 200 includes:
[0040] Step S201, in response to determining that the inquiry data from the user includes inquiry information about a function or usage of a preset target application, acquiring code data of the target application; and
[0041] Step S202: Generate response data based on the query data and the code data.
[0042] By applying the above-mentioned data generation method 200, when an inquiry about the function or usage of the target application is received, the target application code data can be obtained, and response data for the user inquiry can be obtained in combination with the code data. By parsing the code of the target application, the questions and answers associated with the target application can be completed efficiently and accurately, thereby improving the efficiency of question and answer.
[0043] In some examples, method 200 is implemented based on a large model, which can be a pre-trained large language model (LLM), such as the Wenxinyiyan model. By passing the query data from the user into the large language model, the code parsing ability and data generation ability of the large language model can be used to obtain the response data that can answer the function or usage of the target application.
[0044] In some examples, the large language model described above may be configured with a built-in plug-in for answering the functions or usage of a software product (i.e., a target application). When receiving a user's query data regarding a software product, the built-in plug-in may be called to retrieve the code of the target application and parse it, thereby generating reply data for sending to the user.
[0045] In some examples, the inquiry data and the reply data may be natural language text. For example, the inquiry data may be "What functions does the AAA application software have?" In this case, the code data of the AAA application software may be obtained, and then the reply data for the inquiry data may be generated by parsing the code data. The reply data may be, for example, a text paragraph explaining the functions of the AAA application software to meet the user's inquiry needs.
[0046] In some examples, whether the query data includes query information about the functions or usage of the preset target application can be explicit. For example, when method 200 is applied to an intelligent usage assistant built into the target application, it can be determined that the query data issued by the user through the intelligent usage assistant is used to ask questions about the functions or usage of the target application. In other examples, the query data is only a natural language text customized by the user. In this case, a semantic analysis can be performed on the query data before step S201, and step S201 can be executed when it is determined that the query data includes query information about the functions or usage of the preset target application.
[0047] In some examples, the above method 200 can be applied to various business fields.
[0048] In one example, method 200 can be applied to an application in the financial field to implement intelligent usage assistance for financial software, provide users with clear operation instructions, and help users quickly locate and handle required matters.
[0049] In one example, method 200 can be applied to various self-service business processing applications to realize the automation of business processing, deeply analyze the processing procedures of various self-service businesses, convert complex processes into steps that are easy for users to understand, help users quickly locate and handle required matters, enable users to complete business processing independently, improve service efficiency, and save labor costs.
[0050] In one example, the method 200 can be applied to an office automation application program, and the internal logic of the office automation tool can be parsed by parsing the program source code, thereby providing operation assistance to the user and reducing the learning cost.
[0051] In one example, method 200 can be applied to a background management program or an intelligent customer service program of an e-commerce platform to analyze the operation process in detail for the user, thereby improving the user's experience.
[0052] According to some embodiments, generating reply data based on the query data and the code data in step S202 includes: determining input data for a deep learning model based on the query data and the code data, the deep learning model being used to generate reply data based on the input data, wherein the deep learning model is trained using a first sample corpus, the first sample corpus including a first sample query data and sample code data; and inputting the input data into the deep learning model to obtain the reply data. Thus, the deep learning model can be used to parse the code data and generate replies, and the code parsing and text generation capabilities of the deep learning model can be used to achieve efficient automatic question and answer.
[0053] In some examples, the deep learning model for generating reply data based on input data has an end-to-end feature, and can directly generate reply data in the form of natural language text based on input data in the form of natural language text. In some examples, the deep learning model can adopt an N-layer Transformer network structure with an encoder (Encoder) and a decoder (Decoder), or a unified pre-trained language model (Unified pre-trained LanguageModel, UniLM) network structure. It is understandable that the deep learning model can also be other neural network models based on the Transformer network structure, which is not limited here.
[0054] In some examples, the deep learning model may be a generative large language model trained using a first sample corpus. In one example, the first sample corpus may include only sample input data consisting of a first sample query data and sample code data. During the training process, the sample input data may be input into the deep learning model to obtain predicted reply data, and then the predicted evaluation information for the predicted reply data may be determined (the predicted evaluation information may be determined manually based on the predicted reply data), and the loss value may be calculated based on the predicted evaluation information, and then the parameters of the deep learning model may be adjusted based on the loss value. In another example, the first sample corpus used to train the deep learning model may also include sample reply data for the sample input data consisting of the first sample query data and sample code data. During the training process, the sample input data may be input into the deep learning model to obtain predicted reply data, and the loss value may be calculated based on the predicted reply data and the sample reply data, and then the parameters of the deep learning model may be adjusted based on the loss value.
[0055] According to some embodiments, the determining the input data for the deep learning model based on the query data and the code data comprises: determining the input data based on the query data, the code data and task description information, wherein the task description information indicates that the input data includes the code data. Thus, task description information can be added based on the query data and code data input by the user, so that the deep learning model can more accurately understand the data generation requirements, thereby improving the quality of the generated response data.
[0056] In one example, when the query data is "What functions does the AAA application software have", the task description information can be, for example: "Please parse the code data of the AAA application software and explain the functions of the AAA application software based on the parsing results." Based on this, more accurate data generation instructions can be input into the deep learning model, so that the deep learning model can more efficiently generate response data that meets the requirements.
[0057] In some examples, the task description information may include more content, such as a more detailed and comprehensive description of the requirements for the response data. For example, the task description information "Do not include specific functions and variables in the code data in the explanation content, and add usage examples" can be added to enable the deep learning model to more accurately generate response data that meets the requirements.
[0058] It should be understood that the above implementation is only an example of input data for a deep learning model, and the input data may also be generated based on other methods, such as directly adding a label of a predefined generation mode on the basis of the query data and the code data to obtain the input data, so that the deep learning model can determine that the input data contains code data based on the label. As long as the deep learning model can perceive the existence of code data in the input data and parse the code data, the present disclosure does not limit the method of determining the input data.
[0059] According to some embodiments, the target application includes multiple functional modules, and in step S201, in response to determining that the query data from the user includes query information for the function or usage of the preset target application, the code data of the target application is obtained. Acquiring the code data of the target application includes: in response to determining that the query data from the user includes query information for the function or usage of the preset target application, determining the target functional module targeted by the query data from the multiple functional modules; and obtaining the code data of the target functional module. When the target application includes multiple functional modules, by applying the above means, the target functional module to be parsed can be first determined based on the user query content, and then the source code of the target functional module can be directly obtained and parsed, thereby reducing the amount of code data to be processed in step S202, further improving the efficiency of generating reply data, and saving hardware resources.
[0060] In some examples, the division information of the code data of multiple functional modules may be explicitly stored in the code database, so that the corresponding code data can be directly obtained according to the information of the target functional module. In some examples, the code data of the entire target application may be initially parsed in step S201, and then the code data of the target functional module may be obtained based on the preliminary parsing result.
[0061] According to some embodiments, determining the target functional module targeted by the query data from the multiple functional modules includes: inputting the query data into an intent recognition network to obtain the target functional module output by the intent recognition network, wherein the intent recognition network is trained using a second sample corpus, and the second sample corpus includes a second sample query data and a reference target functional module for the second sample query data. Thus, the intent recognition network can be used to more efficiently determine the target functional module, thereby improving the efficiency of generating reply data.
[0062] In some examples, the intent recognition network may be an N-layer Transformer network structure having an encoder and a decoder, or a unified pre-trained language model (UniLM) network structure. Similar to the training method of the deep learning model described above, the intent recognition network may be trained using a second sample corpus, and the second sample corpus used to train the intent recognition network may include, for example, second sample query data and a reference target function module for the second sample query data. During the training process, the second sample query data may be input into the intent recognition network to obtain a predicted target function module, and a loss value may be calculated based on the predicted target function module and the reference target function module, and then the parameters of the intent recognition network may be adjusted based on the loss value.
[0063] In some examples, the target functional module targeted by the query data may also be determined from the multiple functional modules in other ways. For example, keywords may be extracted from the query data and matched with the names of multiple functional modules, and the target functional module may be determined based on the matching results. As long as the target functional module associated with the query data can be determined, the present disclosure does not limit the specific implementation of this step.
[0064] According to some embodiments, the code data of the target application includes source code and annotation information for the source code, wherein the annotation information indicates the grammatical structure of the source code. By pre-identifying the grammatical structure of the code, key information can be located more quickly when parsing the code, thereby improving the efficiency of code data parsing and thus improving the efficiency of generating reply data.
[0065] In some examples, a code optimization tool may be called to implement a code annotation function, and key information such as the code execution path, method call chain, and entry and exit parameters of each method may be identified. Based on this, the above explicit annotation information can be read in step S202, which helps to more efficiently determine the code execution process, and then determine the function or usage of the target application.
[0066] In some examples, code optimization tools can also implement code de-redundancy and refactoring functions. For example, they can remove redundant code by extracting common content, merging duplicate code, etc., reduce confusion and misunderstanding that may occur during code parsing, and thus improve the accuracy of code parsing.
[0067] According to some embodiments, method 200 further includes: determining a plurality of code snippets by segmenting the code data of the target application, wherein generating reply data based on the query data and the code data in step S202 includes: parsing the plurality of code snippets in parallel using a plurality of processes; and generating the reply data based on the parsing results of the plurality of code snippets and the query data. Thus, the code base can be split into snippets that are easier to parse, and efficiency can be improved through parallel processing.
[0068] In some examples, when a deep learning model is used to perform code data parsing, multiple large model instances can be run in parallel to parse multiple code snippets respectively, so as to make full use of computing resources, accelerate the code parsing process, and improve the efficiency of response data generation.
[0069] According to some embodiments, method 200 further includes: obtaining evaluation information for the reply data; and in response to determining that the evaluation information indicates that the reply data satisfies a preset condition, sending the reply data to the user. Thus, quality control of the reply data can be achieved based on verifying the evaluation information, thereby better meeting user needs.
[0070] In some examples, a reply evaluation model may be used to determine evaluation information for reply data. The reply evaluation model may be constructed based on a pre-trained language model, and the training process of the model is similar to the training process of the deep learning model for generating reply data or the training process of the intent recognition network, and will not be described in detail here.
[0071] In some examples, the evaluation information may be discretized scoring information for the reply data, and whether the reply data satisfies the preset conditions may be determined by checking the relative size relationship between the discretized scoring information and a preset scoring threshold.
[0072] Figure 3 FIG. 3 shows an interactive flow chart of a data generation method 300 according to an exemplary embodiment of the present disclosure. Figure 3 , the data generation method 300 is completed by five components: front-end module, deep learning model, intent recognition network, code processing tool and verification platform. Figure 3 As shown, the method 300 includes:
[0073] Step S1: The front-end module receives user inquiry data.
[0074] Step S2: The intention recognition model recognizes the user intention. As mentioned above, in this example, the target application may include multiple functional components, and the intention recognition model may determine the target functional component associated with the query data based on the query data input by the user.
[0075] Step S3: The deep learning model queries the code of the target functional module based on the user's intention. In this example, the deep learning model can retrieve the code of the target functional module from the code database, for example, by implementing a fast retrieval based on a semantic retrieval method.
[0076] Step S4: The code processing tool retrieves and divides the code of the target functional module. As mentioned above, the code processing tool can obtain the code of the target functional module from the code database and divide it into code fragments, so that the deep learning model can parse it more easily and efficiently.
[0077] Step S5: The deep learning model parses the code snippet to generate reply data. In this example, input data for inputting into the deep learning model may be generated based on the query data, the code snippet, and the task description information, and then the reply data generated by the deep learning model may be obtained.
[0078] Step S6: The verification platform determines evaluation information for the reply data.
[0079] In response to the evaluation information on the reply data satisfying the preset condition, step S7 may be executed, where the front-end module displays the reply data to the user.
[0080] When the evaluation information of the reply data cannot meet the preset conditions, at least one of the intent recognition network, the deep learning model and the code processing tool can be made to re-execute one or more of the aforementioned steps S2-S5 to obtain updated reply data until the generated reply data can meet the preset conditions.
[0081] By applying the above-mentioned data generation method 300, when an inquiry about the function or usage of a target application is received, the deep learning model can be used to parse the relevant code data, and response data for the user inquiry can be obtained in combination with the code data. By parsing the code of the target application, the questions and answers associated with the target application can be completed efficiently and accurately, thereby improving the efficiency of question and answer.
[0082] According to one aspect of the present disclosure, a data generating device is also provided. Figure 4 FIG. 4 shows a structural block diagram of a data generating device 400 according to an exemplary embodiment of the present disclosure. Figure 4 As shown, the device 400 includes:
[0083] The acquisition unit 401 is configured to acquire code data of the target application in response to determining that the inquiry data from the user includes inquiry information about a function or usage of a preset target application; and
[0084] The generating unit 402 is configured to generate reply data based on the query data and the code data.
[0085] According to some embodiments, the generation unit 402 includes: a first determination subunit, configured to determine input data for a deep learning model based on the query data and the code data, the deep learning model being used to generate reply data based on the input data; and an input subunit, configured to input the input data into the deep learning model to obtain the reply data.
[0086] According to some embodiments, the determining subunit is configured to: determine the input data based on the query data, the code data and task description information, the task description information indicating that the input data includes the code data.
[0087] According to some embodiments, the target application includes multiple functional modules, and the acquisition unit 401 includes: a second determination sub-unit, configured to determine the target functional module targeted by the inquiry data from the multiple functional modules in response to determining that the inquiry data from the user includes inquiry information about the function or usage of a preset target application; and an acquisition sub-unit, configured to acquire code data of the target functional module.
[0088] According to some embodiments, the second determination subunit is configured to: input the query data into an intent recognition network to obtain the target function module output by the intent recognition network, wherein the intent recognition network is trained using a sample corpus, and the sample corpus includes sample query data and a reference target function module for the sample query data.
[0089] According to some embodiments, the code data of the target application includes source code and annotation information for the source code, wherein the annotation information indicates a grammatical structure of the source code.
[0090] According to some embodiments, the device 400 also includes: a segmentation unit, configured to determine a plurality of code snippets by segmenting the code data of the target application, wherein the generation unit 402 includes: a parsing subunit, configured to parse the plurality of code snippets in parallel using a plurality of processes; and a generation subunit, configured to generate the reply data based on the parsing results of the plurality of code snippets and the query data.
[0091] According to some embodiments, the device 400 also includes: an evaluation unit configured to obtain evaluation information for the reply data; and a sending unit configured to send the reply data to the user in response to determining that the evaluation information indicates that the reply data satisfies a preset condition.
[0092] It should be understood that Figure 4 The operations of the various units of the data generating device 400 shown in FIG. 4 can be compared with Figure 2 The steps in the described data generation method 200 correspond to each other. Therefore, the operations, features and advantages described above for the method 200 are also applicable to the device 400 and the various units included therein. For the sake of brevity, some operations, features and advantages are not repeated here.
[0093] According to another aspect of the present disclosure, an electronic device is also provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned data generation method.
[0094] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is also provided, wherein the computer instructions are used to enable the computer to execute the above-mentioned data generation method.
[0095] According to another aspect of the present disclosure, a computer program product is also provided, including a computer program, wherein the computer program implements the above-mentioned data generation method when executed by a processor.
[0096] refer to Figure 5 , a block diagram of an electronic device 500 that can be used as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0097] like Figure 5As shown, the device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0098] Multiple components in the device 500 are connected to the I / O interface 505, including: an input unit 506, an output unit 507, a storage unit 508, and a communication unit 509. The input unit 506 can be any type of device that can input information to the device 500. The input unit 506 can receive input digital or character information and generate key signal input related to user settings and / or function control of the electronic device, and can include but is not limited to a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and / or a remote controller. The output unit 507 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 508 can include but is not limited to a disk, an optical disk. The communication unit 509 allows the device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0099] The computing unit 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 501 performs the various methods and processes described above, such as data generation methods. For example, in some embodiments, the data generation method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by the computing unit 501, one or more steps of the data generation method described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the data generation method in any other appropriate manner (e.g., by means of firmware).
[0100] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0101] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0102] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0103] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0104] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.
[0105] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0106] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0107] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples. Various elements in the embodiments or examples may be omitted or may be replaced by their equivalent elements. In addition, each step may be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples may be combined in various ways. It is important that with the evolution of technology, many elements described herein may be replaced by equivalent elements that appear after the present disclosure.
Claims
1. A data generation method based on a large model, the method comprising: In response to determining that the inquiry data from the user includes inquiry information regarding a function or usage of a preset target application, acquiring code data of the target application; as well as Based on the query data and the code data, response data is generated.
2. The method of claim 1, wherein: The generating response data based on the query data and the code data comprises: Determining input data for a deep learning model based on the query data and the code data, the deep learning model being used to generate response data based on the input data, wherein the deep learning model is trained using a first sample corpus, the first sample corpus including a first sample query data and sample code data; and The input data is input into the deep learning model to obtain the response data.
3. The method of claim 2, wherein: The determining, based on the query data and the code data, input data for a deep learning model comprises: The input data is determined based on the query data, the code data, and task description information, the task description information indicating that the input data includes the code data.
4. The method according to any one of claims 1 to 3, wherein: The target application includes a plurality of functional modules, and in response to determining that the inquiry data from the user includes inquiry information about a preset function or usage of the target application, obtaining code data of the target application includes: In response to determining that the inquiry data from the user includes inquiry information for a function or usage of a preset target application, determining a target functional module targeted by the inquiry data from the plurality of functional modules; and Obtain code data of the target functional module.
5. The method of claim 4, wherein: The step of determining the target functional module targeted by the query data from the plurality of functional modules comprises: The query data is input into an intent recognition network to obtain the target function module output by the intent recognition network, wherein the intent recognition network is trained using a second sample corpus, and the second sample corpus includes a second sample query data and a reference target function module for the second sample query data.
6. The method according to any one of claims 1 to 5, wherein: The code data of the target application program includes source code and annotation information for the source code, where the annotation information indicates a grammatical structure of the source code.
7. The method according to any one of claims 1 to 6, further comprising: By segmenting the code data of the target application, a plurality of code fragments are determined. Wherein, generating reply data based on the query data and the code data includes: Parsing the plurality of code snippets in parallel using a plurality of processes; and The reply data is generated based on the parsing results of the multiple code snippets and the query data.
8. The method according to any one of claims 1 to 7, further comprising: Obtaining evaluation information for the response data; as well as In response to determining that the evaluation information indicates that the reply data satisfies a preset condition, the reply data is sent to the user.
9. A data generation device based on a large model, the device comprising: an acquisition unit, configured to acquire code data of a target application in response to determining that the inquiry data from the user includes inquiry information regarding a function or usage of a preset target application; as well as The generating unit is configured to generate reply data based on the inquiry data and the code data.
10. The device of claim 9, wherein: The generating unit comprises: A first determining subunit is configured to determine input data for a deep learning model based on the query data and the code data, wherein the deep learning model is used to generate response data based on the input data; and An input subunit is configured to input the input data into the deep learning model to obtain the response data.
11. The device of claim 10, wherein: The determining subunit is configured as follows: The input data is determined based on the query data, the code data, and task description information, the task description information indicating that the input data includes the code data.
12. The device according to any one of claims 9 to 11, wherein: The target application includes multiple functional modules, and the acquisition unit includes: A second determining subunit is configured to, in response to determining that the inquiry data from the user includes inquiry information for a function or usage mode of a preset target application, determine a target functional module targeted by the inquiry data from the plurality of functional modules; and The acquisition subunit is configured to acquire the code data of the target functional module.
13. The device of claim 12, wherein: The second determining subunit is configured as follows: The query data is input into an intent recognition network to obtain the target function module output by the intent recognition network, wherein the intent recognition network is trained using a sample corpus, and the sample corpus includes sample query data and a reference target function module for the sample query data.
14. The device according to any one of claims 9 to 13, wherein: The code data of the target application program includes source code and annotation information for the source code, where the annotation information indicates a grammatical structure of the source code.
15. The apparatus according to any one of claims 9 to 14, further comprising: A segmentation unit is configured to determine a plurality of code fragments by segmenting the code data of the target application program, Wherein, the generating unit comprises: a parsing subunit configured to parse the plurality of code snippets in parallel using a plurality of processes; and The generating subunit is configured to generate the reply data based on the parsing results of the multiple code snippets and the query data.
16. The apparatus according to any one of claims 9 to 15, further comprising: an evaluation unit, configured to obtain evaluation information for the reply data; as well as The sending unit is configured to send the reply data to the user in response to determining that the evaluation information indicates that the reply data satisfies a preset condition.
17. An electronic device comprising: at least one processor; as well as a memory communicatively coupled to the at least one processor; in The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.
18. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to make a computer execute the method according to any one of claims 1-8.
19. A computer program product comprising a computer program, wherein: The computer program implements the method according to any one of claims 1 to 8 when executed by a processor.
Citation Information
Patent Citations
Intelligent data analysis method and device based on large language model
CN117555986A
Method and system for automatically generating reusable API based on code snippets
CN117892031A
Code risk detection method, and deep learning model training method and device
CN117909235A
Method and system for enabling conversational reverse engineering and understanding of a software application
US20240160500A1
Cited By
Question and answer processing method and device, large model training method and device, equipment and storage medium
CN119443277A
Multi-modal speech language large model training method and device, equipment and medium
CN120472888A
