Data generation method and device, equipment and medium

By identifying the user's inquiry intention and rewriting it into document structure description data, the problem of insufficient quality in generating reply data is solved, and higher quality data generation is achieved.

CN119474302APending Publication Date: 2025-02-18BAIDU COM TIMES TECH (BEIJING) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411496337.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

When the prior art generates reply data using a generative language model, the quality of the reply data cannot fully meet the needs of users, mainly because there is a lack of a comprehensive description of the document structure characteristics during the application stage of the model.

Method used

By identifying the user's inquiry intention, including generating intent for the document of the first document category, rewrite the inquiry data as the first description data to describe the document structure characteristics more comprehensively, and then generate reply data based on these description data.

Benefits of technology

Through more accurate and standardized document structure description, the quality of the generated reply data has been improved, which can better meet the needs of users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119474302A_ABST
    Figure CN119474302A_ABST
Patent Text Reader

Abstract

The invention provides a data generation method and device, equipment and a medium, and relates to the technical field of artificial intelligence, in particular to the technical field of natural language processing, deep learning and the like. The data generation method comprises the steps of determining an inquiry intention of a user based on inquiry data from the user; in response to determining that the inquiry intention comprises a document generation intention for a first document category, first description data is determined based on the inquiry data, and the first description data comprises document structure description information corresponding to the first document category; based on the first description data, reply data aiming at the inquiry data is generated, and the reply data comprises a first document generated based on the document structure description information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, in particular to the field of natural language processing and deep learning technology, and specifically to a data generation method, device, electronic device, computer-readable storage medium, and computer program product. 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] The generative language model can be applied to various natural language processing tasks, especially to generate natural language text for reply based on the user's query content to achieve interaction with the user.

[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 data generation method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product.

[0006] According to one aspect of the present disclosure, a data generation method is provided, comprising: determining a user's inquiry intention based on inquiry data from the user; in response to determining that the inquiry intention includes a document generation intention for a first document category, determining first description data based on the inquiry data, wherein the first description data includes document structure description information corresponding to the first document category; and generating reply data for the inquiry data based on the first description data, wherein the reply data includes a first document generated based on the document structure description information.

[0007] According to another aspect of the present disclosure, a data generating device is provided, including: a first determination unit, configured to determine the inquiry intention of a user based on inquiry data from the user; a second determination unit, configured to determine first description data based on the inquiry data in response to determining that the inquiry intention includes a document generation intention for a first document category, wherein the first description data includes document structure description information corresponding to the first document category; and a generating unit, configured to generate reply data for the inquiry data based on the first description data, wherein the reply data includes a first document generated based on the document structure description information.

[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 quality of reply data generation 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 A schematic diagram showing a data generation process according to an exemplary embodiment of the present disclosure;

[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] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0023] 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.

[0024] 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.

[0025] 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.

[0026] 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.

[0027] 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.

[0028] 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.

[0029] 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.

[0030] 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.

[0031] 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.

[0032] 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.

[0033] 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.

[0034] 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.

[0035] 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.

[0036] 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.

[0037] In the related art, when a generative language model is applied to generate response data based on user input data, the performance of the model is usually enhanced by manually annotating the corpus or adjusting the training method (such as optimizing the loss function or performing reinforcement learning) during the model training phase. In the application phase of the model, that is, the data generation process, the response data is usually directly generated based on the query data input by the user. The quality of the response data depends entirely on the performance of the language model, which results in the quality of the response data not being able to fully meet the needs of the user.

[0038] Based on this, the present disclosure provides a data generation method. When it is recognized that the user's query intention includes the intention to generate a document for a first document category, the query data is rewritten into first description data to more comprehensively describe the corresponding document structure features of the first document category, and then a more accurate and standardized first document can be generated based on the document structure description information contained in the first description data, so as to improve the accuracy of data generation.

[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: Determine the inquiry intention of the user based on the inquiry data from the user;

[0041] Step S202: in response to determining that the query intention includes a document generation intention for a first document category, determining first description data based on the query data, wherein the first description data includes document structure description information corresponding to the first document category; and

[0042] Step S203: Generate response data for the inquiry data based on the first description data, wherein the response data includes a first document generated based on the document structure description information.

[0043] By applying the above method 200, when it is recognized that the user's query intention includes the intention to generate a document for the first document category, the query data can be rewritten into first description data, and the first description data can be used to more comprehensively describe the corresponding document structure features of the first document category, thereby being able to generate a more accurate and standardized first document based on the document structure description information contained in the first description data, so as to improve the accuracy of data generation.

[0044] In some examples, the inquiry data, the first description data, and the reply data may be natural language text. For example, the inquiry data may be "help me generate a birthday party invitation letter". In this case, the document generation intention for the document category "invitation letter" can be identified through step S201, and then the first description data including the following document structure description information can be obtained: "The content requirements of the invitation letter are as follows: 1. Opening remarks: open the invitation letter with enthusiastic and sincere language, and briefly explain the purpose; 2. Basic information of the birthday party: detailed introduction of the time, place and other related arrangements of the party, such as theme, dress requirements, etc.; 3. Event preview: outline the various activities and games to be held at the birthday party to attract the invitees to participate; 4. Invitation reason: express why you want the invitees to attend your birthday party and emphasize the important role they play in this celebration; 5. Reply requirements: indicate whether the invitees need to reply in advance to confirm their attendance, and inform the reply method and deadline; 6. Ending words". By using the first description data to indicate the document structure features for a specific document category, the first document that meets the structural requirements can be generated based on this, ensuring the accuracy and standardization of the reply data, thereby improving the quality of reply data generation.

[0045] By generating data based on the first description data, it is equivalent to decomposing the overall document generation task into multiple sub-generation tasks for each structural module in the document structure, that is, a more accurate and standardized document generation result can be obtained through a layer-by-layer generation method.

[0046] According to some embodiments, generating response data for the query data based on the first description data in step S203 includes: generating the first document based on the first description data using a first generative language model. When the generative language model is called to obtain the document content required by the user, the first description data can be used to more comprehensively and accurately describe the generation task, so that the language model can output a more accurate generation result.

[0047] It is understandable that when a generative language model is applied to a specific vertical field (e.g., when generating documents of a specific category), it is usually necessary to use the corpus of the vertical field to fine-tune the generative language model. By applying the method 200 provided by the present disclosure, by adding explicit document structure description information to the input information of the generative language model, the model generation result can be optimized without adjusting the generative language model, thereby saving model training resources.

[0048] 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.

[0049] Referring to the example described above, in this example, the query data, the first description data, and the reply data are all natural language texts, and the generative language model is also used to receive and generate natural language texts. In this case, the input data of the generative language model can be a preset natural language text fragment or template to indicate the existence of the first description data in the input data. The input data can be, for example, "Please generate reply data for the query data based on the first description data." By filling the query data and the content of the first description result into the template, input data that can clearly indicate the data generation requirements can be obtained, so that the first generative language model can generate reply data based on this.

[0050] It should be understood that the above implementation is only an example of the input data of the first generative language model, and the input data can 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 first description data to obtain the input data, so that the generative language model can determine that the input data contains the first description data based on the label. As long as the deep learning model can perceive the existence of the first description data in the input data and generate response data based on the first description data, the present disclosure does not limit the method of determining the input data.

[0051] In some examples, different pre-trained generative language models may be selected in step S203 according to actual needs. For example, the selection may be based on indicators of various dimensions such as the application cost and prediction performance of the model to improve data generation efficiency or accuracy.

[0052] According to some embodiments, determining the user's inquiry intent based on the inquiry data from the user in step S201 includes: inputting the inquiry data into an intention classification model to obtain the inquiry intent output by the intention classification model, wherein the intention classification model is trained using sample inquiry data labeled with reference inquiry intent. By using the trained intention classification model to determine the inquiry intent corresponding to the user's inquiry data, the efficiency and accuracy of intent recognition can be improved.

[0053] In some examples, the intent classification model can be fine-tuned based on a pre-trained language model. The sample corpus used to train the intent classification model can include sample query data annotated with reference query intent. During the training process, the sample query data can be input into the intent classification model to obtain a predicted query intent, a loss value is calculated based on the predicted query intent and the reference query intent, and then the parameters of the intent classification model are adjusted based on the loss value.

[0054] In some examples, the intent classification model can be configured to determine one or more query intents from multiple candidate intents. In this case, multiple candidate intents can be set with document generation intents for multiple document categories. When the query intent includes a document generation intent for the first document category, the aforementioned steps S202 and S203 can be further performed based on this to generate a more standardized first document.

[0055] In some examples, multiple candidate intents may be pre-set manually based on demand, and may include, for example, various types of content editing intents, various types of document generation intents, information search intents, and the like.

[0056] In some examples, other methods may be used in step S201 to determine the query intent corresponding to the query data. For example, the query intent may be determined by extracting keywords from the query data. As long as the user's query intent can be identified, the present disclosure does not limit the specific implementation of step S201.

[0057] According to some embodiments, determining the first description data based on the query data in step S202 includes: inputting the query data into a description generation model to obtain the first description data output by the description generation model, wherein the description generation model is trained using sample query data and sample description data. By using the trained description generation model to rewrite the user query data to obtain the first description data, the efficiency of description data generation can be improved.

[0058] According to some embodiments, the description generation model is obtained by fine-tuning the second generative language model using the sample query data and the sample description data. By fine-tuning the pre-trained second generative language model to obtain the description generation model, the natural language processing capability of the pre-trained language model can be effectively utilized to improve the training efficiency and prediction performance of the description generation model.

[0059] In some examples, similar to the training process of the intent classification model described above, the description generation model can be fine-tuned based on a pre-trained language model. For example, the supervised fine-tuning (SFT) method can be applied to train the pre-trained large model. The sample corpus used to train the description generation model may include annotated sample query data and sample description data. During the training process, the sample query data may be input into the description generation model to obtain predicted description data, and the loss value may be calculated based on the predicted description data and the sample description data, and then the parameters of the description generation model may be adjusted based on the loss value.

[0060] In some examples, the first generative language model and the second generative language model may be the same. In some examples, the two may also be different, for example, a larger-scale language model may be selected as the first generative language model, and a smaller-scale language model may be selected as the second generative language model, so that the occupation of hardware resources by the language model can be adapted to its performance requirements, thereby improving data generation efficiency.

[0061] According to some embodiments, generating reply data for the inquiry data based on the first description data in step S203 includes: obtaining a format processing rule for the first document based on the inquiry intent; adjusting the format of the first document based on the format processing rule; and determining the reply data based on the first document after the format adjustment. Thus, the corresponding format processing rule can be determined based on the intent recognition result to obtain more accurate and standardized reply data.

[0062] In some examples, the format processing rules may include adjusting the font size of the first document, adjusting the word limit, etc., so that the reply data can be more standardized.

[0063] According to some embodiments, method 200 further includes: in response to determining that the query intent includes a document generation intent for a second document category, determining second description data based on the query data, wherein the second description data includes a target search result obtained by searching based on the query data; and generating reply data for the query data based on the second description data. By applying the above means, the content richness of the description data can be improved by adding search results, thereby improving the quality of the generated results.

[0064] In some examples, the first document category and the second document category can be predefined according to needs, and the two can be the same or different. It can be understood that by generating documents based on the aforementioned first description data, the document structure can be made clearer and more complete, with stronger structural norms, and by generating documents based on the aforementioned second description data, the content richness of the generated results can be improved, which is suitable for injecting professional knowledge. In this case, when it is necessary to generate summary reports, speeches and other documents with high requirements for structural norms, it is suitable to apply the aforementioned first description data, and when it is necessary to generate book reviews, experience and other documents with high requirements for content extensibility and richness, it is suitable to apply the aforementioned second description data.

[0065] According to some embodiments, determining the second description data based on the query data includes: determining at least one keyword included in the query data; searching based on the at least one keyword to obtain multiple preliminary search results; determining the target search result from the multiple preliminary search results based on the relevance of each search result in the multiple preliminary search results to the query data; and determining the second description data based on the target search result. By pre-searching based on the keywords of the query data and then filtering the target search results therefrom, it is possible to take into account both the comprehensiveness and accuracy of the search, and thus obtain higher quality response data based on more accurate second description data.

[0066] In some examples, the above technical means can be implemented through retrieval-augmented generation (RAG), that is, obtaining relevant information from an external knowledge base and embedding it into the user query data to obtain more comprehensive description data. In this example, the external knowledge base can be pre-screened and built, for example, a document vector index can be constructed for the screened high-quality documents. After keyword extraction based on user query data, document vectors can be recalled in the knowledge base through ANN (Approximate Nearest Neighbor) retrieval, and then filtered based on the relevance of the recall results (preliminary search results) to the user query data, and the second description data is determined using the screened target search results.

[0067] Figure 3 FIG. 1 is a schematic diagram showing a data generation process according to an exemplary embodiment of the present disclosure. Figure 3 As shown, after receiving the user query data, the intent recognition model 310 can be used to perform intent recognition, and how to determine the description data can be selected based on the intent recognition result.

[0068] In this example, the generation link of the description data includes: 1. Obtaining the description data using the instruction rewriting module 321, that is, applying the method described in the previous text to obtain the first description data containing the document structure description information, and determining the data generation instructions for the input language model based on the first description data to improve the standardization of the data generation results; 2. Obtaining the description data using the knowledge injection module 321, that is, applying the method described in the previous text to obtain the second description data containing the target search results corresponding to the query data, and determining the data generation instructions for the input language model based on the second description data to improve the content richness of the data generation results; 3. Directly generating data generation instructions for the input language model based on the query data to simplify the data generation process and save hardware resources.

[0069] After receiving the data generation instruction, the generative language model 330 can be used to obtain the data generation result, and then the post-processing module 340 can be used to format the model output result to further improve the data standardization, so as to obtain more accurate and standardized reply data and return it to the user, thereby improving the user experience.

[0070] 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:

[0071] A first determining unit 401 is configured to determine the user's inquiry intention based on the inquiry data from the user;

[0072] A second determining unit 402 is configured to determine first description data based on the query data in response to determining that the query intention includes a document generation intention for a first document category, wherein the first description data includes document structure description information corresponding to the first document category; and

[0073] The generating unit 403 is configured to generate reply data for the inquiry data based on the first description data, wherein the reply data includes a first document generated based on the document structure description information.

[0074] According to some embodiments, the generating unit 403 is configured to: generate the first document based on the first description data using a first generative language model.

[0075] According to some embodiments, the generation unit 403 includes: an acquisition subunit, configured to acquire format processing rules for the first document based on the query intention; an adjustment subunit, configured to adjust the format of the first document based on the format processing rules; and a first determination subunit, configured to determine the reply data based on the first document after the format is adjusted.

[0076] According to some embodiments, the second determination unit 402 is configured to: input the query data into a description generation model to obtain the first description data output by the description generation model, wherein the description generation model is trained using sample query data and sample description data.

[0077] According to some embodiments, the description generation model is obtained by fine-tuning a second generative language model using the sample query data and the sample description data.

[0078] According to some embodiments, the device 400 also includes: a third determination unit, configured to determine second description data based on the query data in response to determining that the query intention includes a document generation intention for a second document category, wherein the second description data includes target search results obtained by searching based on the query data, and wherein the generation unit 403 is further configured to generate reply data for the query data based on the second description data.

[0079] According to some embodiments, the third determination unit includes: a second determination subunit, configured to determine at least one keyword included in the query data; a search subunit, configured to search based on the at least one keyword to obtain a plurality of preliminary search results; a third determination subunit, configured to determine the target search result from the plurality of preliminary search results based on a relevance of each search result in the plurality of preliminary search results to the query data; and a fourth determination subunit, configured to determine the second description data based on the target search result.

[0080] According to some embodiments, the first determination unit 401 is configured to: input the query data into an intent classification model to obtain the query intent output by the intent classification model, wherein the intent classification model is trained using sample query data labeled with reference query intent.

[0081] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0082] 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.

[0083] 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.

[0084] 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.

[0085] 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.

[0086] like Figure 5 As 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.

[0087] 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.

[0088] 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).

[0089] 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.

[0090] 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.

[0091] 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.

[0092] 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).

[0093] 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.

[0094] 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.

[0095] 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.

[0096] 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, but only by the claims after authorization and their equivalent scope. Various elements in the embodiments or examples can be omitted or replaced by their equivalent elements. In addition, each step can be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples can be combined in various ways. It is important that with the evolution of technology, many elements described herein can be replaced by equivalent elements that appear after the present disclosure.

Claims

1. A data generation method, comprising: Determining the user's inquiry intention based on the inquiry data from the user; In response to determining that the query intention includes a document generation intention for a first document category, determining first description data based on the query data, wherein the first description data includes document structure description information corresponding to the first document category; and Based on the first description data, response data for the inquiry data is generated, wherein the response data includes a first document generated based on the document structure description information.

2. The method of claim 1, wherein: The generating, based on the first description data, reply data for the inquiry data comprises: The first document is generated based on the first description data using a first generative language model.

3. The method of claim 2, wherein: The generating, based on the first description data, reply data for the inquiry data comprises: Acquire a format processing rule for the first document based on the query intention; adjusting the format of the first document based on the format processing rule; and The reply data is determined based on the formatted first document.

4. The method according to any one of claims 1 to 3, wherein: The determining the first description data based on the query data comprises: The query data is input into a description generation model to obtain the first description data output by the description generation model, wherein the description generation model is trained using sample query data and sample description data.

5. The method of claim 4, wherein: The description generation model is obtained by fine-tuning and training a second generative language model using the sample query data and the sample description data.

6. The method according to any one of claims 1 to 5, further comprising: In response to determining that the query intention includes a document generation intention for a second document category, determining second description data based on the query data, wherein the second description data includes a target search result obtained by searching based on the query data; and Based on the second description data, response data for the inquiry data is generated.

7. The method of claim 6, wherein: The determining the second description data based on the query data comprises: determining at least one keyword included in the query data; Searching based on the at least one keyword to obtain a plurality of preliminary search results; Determining the target search result from the plurality of preliminary search results based on the relevance of each search result in the plurality of preliminary search results to the query data; and Based on the target search result, the second description data is determined.

8. The method according to any one of claims 1 to 7, wherein: The determining the user's inquiry intention based on the inquiry data from the user includes: The query data is input into an intent classification model to obtain the query intent output by the intent classification model, wherein the intent classification model is trained using sample query data annotated with reference query intent.

9. A data generating device, comprising: A first determining unit, configured to determine the user's inquiry intention based on the inquiry data from the user; a second determining unit configured to, in response to determining that the inquiry intention includes a document generation intention for a first document category, determine first description data based on the inquiry data, wherein the first description data includes document structure description information corresponding to the first document category; and A generating unit is configured to generate reply data for the inquiry data based on the first description data, wherein the reply data includes a first document generated based on the document structure description information.

10. The device of claim 9, wherein: The generating unit is configured to: The first document is generated based on the first description data using a first generative language model.

11. The device of claim 10, wherein: The generating unit comprises: an acquisition subunit, configured to acquire a format processing rule for the first document based on the query intention; an adjusting subunit, configured to adjust the format of the first document based on the format processing rule; and The first determining subunit is configured to determine the reply data based on the first document after the format is adjusted.

12. The device according to any one of claims 9 to 11, wherein: The second determining unit is configured to: The query data is input into a description generation model to obtain the first description data output by the description generation model, wherein the description generation model is trained using sample query data and sample description data.

13. The device of claim 12, wherein: The description generation model is obtained by fine-tuning and training a second generative language model using the sample query data and the sample description data.

14. The apparatus according to any one of claims 9 to 13, further comprising: a third determining unit configured to determine second description data based on the query data in response to determining that the query intention includes a document generation intention for a second document category, wherein the second description data includes a target search result obtained by searching based on the query data, The generating unit is further configured to generate reply data for the inquiry data based on the second description data.

15. The device of claim 14, wherein: The third determining unit includes: A second determining subunit is configured to determine at least one keyword included in the query data; A search subunit configured to search based on the at least one keyword to obtain a plurality of preliminary search results; A third determining subunit is configured to determine the target search result from the plurality of preliminary search results based on the relevance of each search result in the plurality of preliminary search results to the query data; and The fourth determining subunit is configured to determine the second description data based on the target search result.

16. The device according to any one of claims 9 to 15, wherein: The first determining unit is configured to: The query data is input into an intent classification model to obtain the query intent output by the intent classification model, wherein the intent classification model is trained using sample query data annotated with reference query intent.

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

Cited By

  • Document generation method, system and device based on intelligent agent, electronic equipment, medium and program product

    CN120449919A