Text data generation method and device, computer equipment, readable storage medium and program product

By obtaining the knowledge graph of the pending objects and using a large language model, the problem of low text data generation efficiency in the prior art is solved, and the efficiency improvement and accuracy guarantee of text data generation is achieved.

CN119782553APending Publication Date: 2025-04-08CHINA LIFE INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510009426.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-03
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

The prior art is inefficient in generating text data and cannot quickly provide the required data.

Method used

By obtaining the knowledge graph of the pending object, obtaining the target item data corresponding to the pending object, and generating corresponding text data using a large language model.

Benefits of technology

It improves the efficiency of text data generation, achieves accurate and rapid acquisition of target matters, and improves the speed and accuracy of text data generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782553A_ABST
    Figure CN119782553A_ABST
Patent Text Reader

Abstract

The invention relates to a text data generation method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the steps of obtaining a text data generation request, wherein the text data generation request carries a to-be-processed object and a to-be-processed item corresponding to the to-be-processed object; obtaining a knowledge graph corresponding to the to-be-processed object; obtaining target item data corresponding to the to-be-processed item from the knowledge graph; and according to the target item data and the large language model, generating text data corresponding to the text data generation request. By adopting the method, the text data generation efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a text data generation method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] With the development of computer technology, more and more companies use computer technology to generate the required text data, such as generating a sales report for a certain year.

[0003] In the related art, when realizing the generation of required text data, it is necessary to obtain data according to the subject of the generated text data, such as obtaining the required data from an archive. However, the archive cannot quickly provide the required data. Therefore, the efficiency of realizing text data generation in the related art is poor. Summary of the invention

[0004] Based on this, it is necessary to provide a text data generation method, apparatus, computer device, computer-readable storage medium and computer program product that can improve the efficiency of text data generation in response to the above technical problems.

[0005] In a first aspect, the present application provides a method for generating text data, comprising:

[0006] Obtain a text data generation request, the text data generation request carrying an object to be processed and pending matters corresponding to the object to be processed;

[0007] Obtain the knowledge graph corresponding to the object to be processed;

[0008] Obtain target item data corresponding to the items to be processed from the knowledge graph;

[0009] Based on the target item data and the large language model, text data corresponding to the text data generation request is generated.

[0010] In one embodiment, text data corresponding to a text data generation request is generated according to target matter data and a large language model, including: encoding the target matter data to obtain an input vector; and inputting the input vector into the large language model to obtain text data.

[0011] In one of the embodiments, after generating text data corresponding to the text data generation request based on the target matter data and the large language model, the method also includes: sending the text data to the terminal; receiving feedback information sent by the terminal, the feedback information is used to indicate whether the terminal should correct the text data; when the feedback information indicates that the terminal should correct the text data, obtaining a first correction content in the feedback information, and adjusting the text data according to the first correction content.

[0012] In an optional embodiment, after adjusting the text data according to the first correction content, the method also includes: determining a correction type corresponding to the first correction content, and determining the number of corrections corresponding to the correction type; when the number of corrections is greater than or equal to a preset number, determining a second correction content corresponding to the correction type, the second correction content including the first correction content; and retraining the large language model according to the second correction content.

[0013] In one embodiment, before obtaining the knowledge graph corresponding to the object to be processed, the method also includes: obtaining historical data corresponding to the object to be processed; performing entity recognition processing on the historical data to obtain target objects in the historical data; wherein the target objects include the object to be processed; determining the association relationship between the target objects, and the attribute information corresponding to the target objects; and generating a knowledge graph with the target objects as nodes, the attribute information as node information, and the association relationship as a connection.

[0014] In an exemplary embodiment, after obtaining the historical data corresponding to the object to be processed, the method also includes: denoising the historical data to obtain denoised historical data; deduplicating the denoised historical data to obtain deduplicated historical data; debugging the deduplicated historical data to obtain debugged historical data; performing entity recognition on the historical data to obtain each target object in the historical data, including: performing entity recognition on the debugged historical data to obtain each target object in the debugged historical data.

[0015] In a second aspect, the present application also provides a text data generating device, comprising:

[0016] A request acquisition module, used for acquiring a text data generation request, wherein the text data generation request carries an object to be processed and items to be processed corresponding to the object to be processed;

[0017] A knowledge graph acquisition module is used to obtain the knowledge graph corresponding to the object to be processed;

[0018] The target item acquisition module is used to obtain the target item data corresponding to the items to be processed from the knowledge graph;

[0019] The text data generation module is used to generate text data corresponding to the text data generation request based on the target event data and the large language model.

[0020] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned method embodiments when executing the computer program.

[0021] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above-mentioned method embodiments when the computer program is executed by a processor.

[0022] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned method embodiments when executed by a processor.

[0023] The above-mentioned text data generation method, device, computer equipment, computer-readable storage medium and computer program product, in this embodiment, are based on the pre-generated knowledge graph, and the target items corresponding to the items to be processed are obtained from the knowledge graph, and the text data is generated based on this. The target items can be accurately and quickly acquired through the knowledge graph, thereby improving the efficiency of text data generation. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0025] Figure 1 An application environment diagram of a text data generating method in one embodiment;

[0026] Figure 2 A flowchart of a method for generating text data in one embodiment;

[0027] Figure 3 A schematic diagram of a flow chart of a method for generating text data in another embodiment;

[0028] Figure 4 is a structural block diagram of a text data generating device in one embodiment;

[0029] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0030] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0031] The text data generation method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server 104 obtains the text data generation request sent by the terminal 102, and the text data generation request carries the object to be processed and the pending items corresponding to the object to be processed; obtains the knowledge graph corresponding to the object to be processed; obtains the target item data corresponding to the pending item from the knowledge graph; generates text data corresponding to the text data generation request according to the pending items, the target item data and the large language model. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0032] In an exemplary embodiment, Figure 2 As shown, a text data generation method is provided, and the method is applied to Figure 1 The server in the example is used to illustrate, including the following steps 202 to 208. Among them:

[0033] Step 202: Obtain a text data generation request, where the text data generation request carries an object to be processed and items to be processed corresponding to the object to be processed.

[0034] The text data generation request is used to request the generation of text data based on the object to be processed and the pending matters corresponding to the object to be processed. The text data is used to represent the pending matters corresponding to the object to be processed in the form of literary information. The object to be processed is used to represent the object targeted by the text data generation request. The pending matters are used to represent the matters targeted by the text data generation request. Exemplarily, the text data generation request can be "the sales situation of an enterprise in a certain year", the object to be processed can be "the enterprise", the pending matters can be "the sales situation in a certain year", and the text data can be "the sales report of an enterprise in a certain year".

[0035] In one embodiment, the text data generation request is sent by the terminal to the server.

[0036] Optionally, text data generation software may be formed on the terminal, and the user uses the text data generation software formed on the terminal to form a text data generation request, and the terminal sends the text data generation request to the server.

[0037] In an optional embodiment, the text data generating software may include an input control, and the user uses the input control to input the object to be processed and the items to be processed corresponding to the object to be processed.

[0038] In one embodiment, the user can use an input device to input the objects to be processed and the matters to be processed corresponding to the objects to be processed.

[0039] In an optional embodiment, the user may also use an input device to input the subject corresponding to the text data, and the terminal generates a text data generation request according to the subject corresponding to the text data.

[0040] Optionally, the subject corresponding to the text data may include objects to be processed and pending matters corresponding to the objects to be processed. Exemplarily, if the user inputs the subject "the sales situation of the enterprise in a certain year", the terminal generates a text data generation request according to the subject after obtaining the subject "the sales situation of the enterprise in a certain year", and sends the text data generation request to the server. After receiving the text data generation request, the server obtains the subject from the text data generation request and parses the subject to obtain the objects to be processed and the pending matters corresponding to the objects to be processed included in the subject.

[0041] In one embodiment, after the user inputs the subject corresponding to the text data using an input device, the subject can be parsed to determine the objects to be processed and the pending matters corresponding to the objects to be processed included in the subject. Exemplarily, the user inputs the subject "the sales situation of the enterprise in a certain year", and the terminal parses the acquired subject "the sales situation of the enterprise in a certain year" to obtain the objects to be processed and the pending matters corresponding to the objects to be processed. Optionally, the objects to be processed can be enterprises, and the pending matters corresponding to the objects to be processed can be the sales situation in a certain year. After obtaining the objects to be processed and the pending matters corresponding to the objects to be processed, the terminal generates a text data generation request based on the objects to be processed and the pending matters corresponding to the objects to be processed, and sends the text data generation request to the server. The server obtains the objects to be processed and the pending matters corresponding to the objects to be processed from the received text data generation request.

[0042] In one of the embodiments, the text data generation software formed on the terminal can also pre-configure subject information so that the user can select the target subject information from the pre-configured subject information. After obtaining the target subject information, the terminal generates a text data generation request based on the obtained target subject information and sends it to the server. The server obtains the target subject information from the text data generation request and parses the target subject information to obtain the to-be-processed objects included in the target subject information and the to-be-processed matters corresponding to the to-be-processed objects.

[0043] Optionally, after acquiring the target subject information, the terminal may parse the target subject information to obtain the objects to be processed and the pending matters corresponding to the objects to be processed, and generate a text data generation request based on the parsed objects to be processed and the pending matters corresponding to the objects to be processed, and send it to the server, and the server obtains the objects to be processed and the pending matters corresponding to the objects to be processed included in the target subject information from the text data generation request.

[0044] Step 204, obtain the knowledge graph corresponding to the object to be processed.

[0045] Among them, the knowledge graph is a structured knowledge base used to represent objects and the relationships between objects.

[0046] In one of the embodiments, the knowledge graph can also represent the attribute information of the object.

[0047] The attribute information is used to characterize the properties of the object. Optionally, the attribute information may include, but is not limited to, the industry to which the enterprise belongs, the rules of the products generated by the enterprise, the performance of the products, etc.

[0048] In an optional embodiment, there may be different knowledge graphs for different objects. For example, different enterprises may have different knowledge graphs.

[0049] In one embodiment, an object identifier may be set to distinguish different objects, and the object identifier may be used to obtain a knowledge graph corresponding to the object to be processed.

[0050] In one embodiment, the knowledge graph can be pre-generated.

[0051] Optionally, the method for pre-generating a knowledge graph may include: obtaining historical data corresponding to the object to be processed; performing entity recognition processing on the historical data to obtain target objects in the historical data; determining the association relationship between the target objects, and the attribute information corresponding to the target objects; and generating a knowledge graph with the target objects as nodes, the attribute information as node information, and the association relationship as a connection.

[0052] Optionally, the historical data may be files obtained from an archive database and business documents, technical data, etc. obtained from a literature database.

[0053] The target object is used to represent the entity included in the historical data. For example, the target object may include but is not limited to an enterprise, a product, a task, a location, a time, etc.

[0054] Optionally, the target object includes an object to be processed.

[0055] In one embodiment, after the target object is identified from the historical data, the association relationship between the actual target object and the target object may be determined. For example, a product is developed by a certain enterprise at a certain time.

[0056] In one embodiment, the attribute information of the target object can also be determined based on the historical data, and the target object can be labeled using the acquired attribute information. For example, the attribute information can include but is not limited to the rules and performance of the product.

[0057] In one embodiment, when forming a knowledge graph, it is also possible to obtain legal and regulatory provisions, industry standards and specifications from a literature database, an external relevant legal and regulatory database, an industry standard database, etc., and obtain attribute information from the obtained legal and regulatory provisions, industry standards and specifications. For example, the attribute information may be a manufacturing method of a product, etc.

[0058] In an optional embodiment, after determining the target object, the association relationship between the target objects, and the attribute information of the target object, a knowledge graph is formed with the target object as a node, the attribute information as the node information of the node, and the association relationship as a connection.

[0059] In one embodiment, after acquiring the historical data, the historical data may be preprocessed to ensure the accuracy and consistency of the data. Optionally, the preprocessing step may include: denoising the historical data to obtain denoised historical data; deduplicating the denoised historical data to obtain deduplicated historical data; and debugging the deduplicated historical data to obtain debugged historical data.

[0060] Optionally, the denoising process may include but is not limited to mean filtering, median filtering, Gaussian filtering, wavelet transform, etc.

[0061] Optionally, deduplication processing may include but is not limited to field-based deduplication, whole-row deduplication, field combination deduplication, sampling deduplication, etc.

[0062] Optionally, the debugging process may include but is not limited to context matching, edit distance, dictionary matching, etc.

[0063] In one of the embodiments, after the historical data is acquired, denoising, deduplication and / or error debugging may be performed on the historical data to obtain processed historical data.

[0064] In one embodiment, when performing denoising, deduplication and / or error correction processing on historical data, there is no particular order, and denoising can be performed first, deduplication can be performed later, and error correction can be performed last. It is also possible to perform deduplication first, de-noise later, and then error correction. It is also possible to perform error correction first, de-noise later, and then de-duplication. There is no limitation to this, as long as the pre-processing of historical data is achieved so that the processed historical data is accurate and consistent.

[0065] In an optional embodiment, performing entity recognition on historical data to obtain each target object in the historical data may be performing entity recognition processing on pre-processed historical data to obtain each target object, and may include: performing entity recognition processing on debugged historical data to obtain each target object in the debugged historical data.

[0066] Step 206, obtaining target item data corresponding to the items to be processed from the knowledge graph.

[0067] In an optional embodiment, after the object to be processed is obtained, the corresponding knowledge graph may be obtained based on the object to be processed. For example, the knowledge graph corresponding to the object to be processed is obtained based on the object identifier of the object to be processed.

[0068] Optionally, after obtaining the knowledge graph, the corresponding data can be searched from the knowledge graph based on the pending items to obtain the target item data. For example, if the pending item is "sales situation in a certain year", the sales situation in that year, such as sales data, products sold, product attribute information, sales regions, etc., can be searched from the knowledge graph to obtain the target item data.

[0069] Step 208: Generate text data corresponding to the text data generation request based on the target event data and the large language model.

[0070] Among them, a large language model refers to a deep learning model trained with a large amount of text data, which can generate natural language text or understand the meaning of language text. Optionally, a large language model can handle a variety of natural language tasks, such as text classification, question answering, text generation, etc. Exemplarily, a large language model may include but is not limited to BLOOM, ChatGPT, etc.

[0071] In an optional embodiment, after obtaining the target processing items, the target processing items can be pre-processed and then input into the large language model to obtain text data output by the large language model. Optionally, it can include: encoding the target item data to obtain an input vector; inputting the input vector into the large language model to obtain text data.

[0072] In one embodiment, the large language model may be pre-trained so that the large language model outputs text data.

[0073] Optionally, training data may be obtained, wherein the training data is used to train the large language model. Optionally, the training data includes but is not limited to training event data and training text data corresponding to the training event data, and the large language model is trained using the training event data and the training text data, so that the trained large language model can generate corresponding text data based on the input event data.

[0074] In one embodiment, the training text data includes a training text template, wherein the training text template is used to make the large language model obtained through training output a template text.

[0075] Optionally, when the server receives the text template requirement sent by the terminal, the text template requirement can be input into the large language model as an input, so that the large language model generates text data based on the text template requirement. Exemplarily, the text template requirement can be displayed as a chart.

[0076] In one embodiment, after generating text data corresponding to the text data generation request based on the pending matters, target matter data and the large language model, the text data generation method also includes: sending the text data to the terminal; receiving feedback information sent by the terminal; when the feedback information indicates that the terminal should correct the text data, obtaining the first correction content in the feedback information, and adjusting the text data according to the first correction content.

[0077] The feedback information is used to indicate whether the terminal should correct the text data.

[0078] Optionally, the text data may be sent to a terminal so that a user can verify the text data using the terminal to determine whether the text data needs to be corrected.

[0079] In one embodiment, the user uses the terminal to correct the text data, and the terminal collects the corrected content, records it as the first corrected content, and forms feedback information based on the first corrected content, and can send the feedback information to the server. After obtaining the feedback information, the server can extract the first corrected content from the feedback information, and correct the text data according to the first corrected content to obtain the corrected text data.

[0080] In one embodiment, after adjusting the text data according to the first correction content, the method also includes: determining the correction type corresponding to the first correction content, and determining the number of corrections corresponding to the correction type; when the number of corrections is greater than or equal to the preset number, determining the second correction content corresponding to the correction type; and retraining the large language model according to the second correction content.

[0081] Optionally, the second revised content includes the first revised content.

[0082] In an optional embodiment, the server may record the received feedback information indicating that the text data needs to be corrected, and may determine the correction type of the recorded correction content, so as to adjust the large language model based on the correction content.

[0083] Optionally, the number of corrections of the same correction type can be recorded. When the number of corrections is greater than a preset number, it indicates that the correction type is frequently modified. Then, a second correction content corresponding to the correction type can be obtained, and the training data can be adjusted using the second correction content. The adjusted training data can be used to retrain the large language model.

[0084] In the above-mentioned text data generation method, in this embodiment, the target items corresponding to the items to be processed are obtained from the knowledge graph based on the pre-generated knowledge graph, and the text data is generated based on the knowledge graph. The target items can be accurately and quickly obtained through the knowledge graph, thereby improving the efficiency of text data generation. In addition, it is also possible to interact with the terminal, correct the text data through terminal interaction, and adjust the model according to the correction content to ensure the accuracy of the model, thereby ensuring the accuracy of the text data.

[0085] In an exemplary embodiment, Figure 3 As shown, a text data generation method is provided, and the method is applied to Figure 1 The server in the example is used to illustrate, including the following steps 302 to 208. Among them:

[0086] Step 302: Obtain a text data generation request, where the text data generation request carries an object to be processed and items to be processed corresponding to the object to be processed.

[0087] Step 304, obtain the knowledge graph corresponding to the object to be processed.

[0088] Step 306, obtaining target item data corresponding to the items to be processed from the knowledge graph.

[0089] Step 308, encode the target event data to obtain an input vector.

[0090] Step 310: input the input vector into the large language model to obtain text data.

[0091] Step 312, sending the text data to the terminal.

[0092] Step 314: receiving feedback information sent by the terminal.

[0093] The feedback information is used to indicate whether the terminal should correct the text data.

[0094] Step 316 , determining whether the feedback information instructs the terminal to modify the text data, if so, executing step 318 , if not, executing step 320 .

[0095] Step 318: Obtain the first revised content in the feedback information, and adjust the text data according to the first revised content.

[0096] Step 320: output text data.

[0097] In this embodiment, the target items corresponding to the items to be processed are obtained from the knowledge graph based on the pre-generated knowledge graph, and the text data is generated based on the knowledge graph. The target items can be accurately and quickly obtained through the knowledge graph, thereby improving the efficiency of text data generation. In addition, it is also possible to interact with the terminal, correct the text data through terminal interaction, and adjust the model according to the correction content to ensure the accuracy of the model, thereby ensuring the accuracy of the text data.

[0098] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0099] Based on the same inventive concept, the embodiment of the present application also provides a text data generating device for implementing the above-mentioned text data generating method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in one or more text data generating device embodiments provided below can refer to the limitations of the text data generating method above, and will not be repeated here.

[0100] In an exemplary embodiment, Figure 4 As shown, a text data generating device 400 is provided, comprising: a request obtaining module 402, a knowledge graph obtaining module 404, a target item obtaining module 406 and a text data generating module 408, wherein:

[0101] The request acquisition module 402 is used to acquire a text data generation request, where the text data generation request carries an object to be processed and a to-be-processed matter corresponding to the object to be processed.

[0102] The knowledge graph acquisition module 404 is used to obtain the knowledge graph corresponding to the object to be processed.

[0103] The target item acquisition module 406 is used to obtain target item data corresponding to the items to be processed from the knowledge graph.

[0104] The text data generation module 408 is used to generate text data corresponding to the text data generation request according to the target event data and the large language model.

[0105] In one embodiment, the text data generation module is further used to encode the target item data to obtain an input vector; and input the input vector into the large language model to obtain text data.

[0106] In one embodiment, the text data generating device also includes a correction module, which is used to send the text data to the terminal; receive feedback information sent by the terminal, the feedback information is used to indicate whether the terminal should correct the text data; when the feedback information indicates that the terminal should correct the text data, obtain the first correction content in the feedback information, and adjust the text data according to the first correction content.

[0107] In one embodiment, the text data generating device also includes a model training module, which is used to determine the correction type corresponding to the first correction content, and determine the number of corrections corresponding to the correction type; when the number of corrections is greater than or equal to the preset number, determine the second correction content corresponding to the correction type, and the second correction content includes the first correction content; retrain the large language model according to the second correction content.

[0108] In one of the embodiments, the text data generating device also includes a knowledge graph generating device, which is used to obtain historical data corresponding to the object to be processed; perform entity recognition processing on the historical data to obtain each target object in the historical data; wherein the target object includes the object to be processed; determine the association relationship between each target object, and the attribute information corresponding to each target object; and generate a knowledge graph with the target object as a node, the attribute information as the node information, and the association relationship as a connection.

[0109] In one embodiment, the text data generating device also includes a preprocessing mode, which is used to perform denoising on the historical data to obtain denoised historical data; perform deduplication processing on the denoised historical data to obtain deduplicated historical data; and perform error debugging on the deduplicated historical data to obtain error-debugged historical data.

[0110] The knowledge graph generation device is also used to perform entity recognition processing on the debugged historical data to obtain each target object in the debugged historical data.

[0111] Each module in the above-mentioned text data generating device can be implemented in whole or in part by software, hardware and a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.

[0112] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a text data generation method is implemented.

[0113] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0114] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps of the above-mentioned method embodiments when executing the computer program.

[0115] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned method embodiments are implemented.

[0116] In one embodiment, a computer program product is provided, including a computer program, which implements the steps of the above-mentioned method embodiments when executed by a processor.

[0117] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0118] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0119] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0120] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for generating text data, characterized in that: The method comprises: Obtaining a text data generation request, wherein the text data generation request carries an object to be processed and items to be processed corresponding to the object to be processed; Obtaining the knowledge graph corresponding to the object to be processed; Acquire target item data corresponding to the items to be processed from the knowledge graph; Based on the target item data and the large language model, text data corresponding to the text data generation request is generated.

2. The method according to claim 1, characterized in that The step of generating text data corresponding to the text data generation request according to the target item data and the large language model includes: Encoding the target item data to obtain an input vector; The input vector is input into the large language model to obtain the text data.

3. The method according to claim 1, characterized in that After generating text data corresponding to the text data generation request according to the target item data and the large language model, the method further includes: Sending the text data to a terminal; receiving feedback information sent by the terminal, wherein the feedback information is used to indicate whether the terminal should modify the text data; In a case where the feedback information instructs the terminal to correct the text data, first correction content in the feedback information is obtained, and the text data is adjusted according to the first correction content.

4. The method according to claim 3, characterized in that After adjusting the text data according to the first correction content, the method further includes: Determine a correction type corresponding to the first correction content, and determine the number of corrections corresponding to the correction type; When the number of corrections is greater than or equal to the preset number, determining a second correction content corresponding to the correction type, where the second correction content includes the first correction content; The large language model is retrained according to the second revised content.

5. The method according to claim 1, characterized in that Before obtaining the knowledge graph corresponding to the object to be processed, the method further includes: Acquire historical data corresponding to the object to be processed; Performing entity recognition processing on the historical data to obtain target objects in the historical data; wherein the target objects include the objects to be processed; Determine the association relationship between the target objects and the attribute information corresponding to the target objects; The knowledge graph is generated with the target object as a node, the attribute information as node information, and the association relationship as a connection.

6. The method according to claim 5, characterized in that After obtaining the historical data corresponding to the object to be processed, the method further includes: Performing denoising processing on the historical data to obtain denoised historical data; Performing deduplication processing on the denoised historical data to obtain deduplicated historical data; Performing error debugging on the deduplicated historical data to obtain error-debugged historical data; The performing entity recognition processing on the historical data to obtain each target object in the historical data includes: Entity recognition processing is performed on the debugged historical data to obtain each of the target objects in the debugged historical data.

7. A text data generating device, characterized in that: The device comprises: A request acquisition module, used for acquiring a text data generation request, wherein the text data generation request carries an object to be processed and items to be processed corresponding to the object to be processed; A knowledge graph acquisition module, used to acquire the knowledge graph corresponding to the object to be processed; A target item acquisition module, used to acquire target item data corresponding to the items to be processed from the knowledge graph; The text data generation module is used to generate text data corresponding to the text data generation request based on the target event data and the large language model.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.