Live broadcast text generation method and device based on large language model

Through the live text generation method based on the large language model, the problem of low efficiency and difficult quality of product explanation text generation in live broadcast is solved, and efficient and high-quality live text generation is achieved, adapting to the anchor explanation style, improving user adoption rate .

CN119026588APending Publication Date: 2024-11-26BAIDU COM TIMES TECH (BEIJING) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411109930.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

The product explanation text generation efficiency in live broadcasts is low and the quality is difficult to guarantee, mainly because manual writing takes a long time and is limited by the author's professional level.

Method used

The live text generation method based on the large language model is adopted. By obtaining the information of the target object and the anchor style, the live text text adapted to the explanation style is automatically generated, and the text understanding and generation ability of the large language model is integrated and polished.

Benefits of technology

The generation efficiency and quality of live texts have been improved. The quality rate of generated text is as high as more than 95%, the user adoption rate is as high as 98%, and the generation time is within 1 minute, with an average of 30 seconds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119026588A_ABST
    Figure CN119026588A_ABST
Patent Text Reader

Abstract

The invention provides a live text generation method and device based on a large language model, and relates to the technical field of artificial intelligence, in particular to the technical field of AIGC (artificial intelligence generation content) and large language models. The live text generation method based on the large language model comprises the steps of obtaining object information of a to-be-explained target object and a style of an anchor explaining the target object; generating a first explanation text of the target object with the style based on the explanation template and the object information corresponding to the style; and based on the object information and the first explanation text, utilizing the first large language model to generate a second explanation text for explaining the target object in the live broadcast.
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 AIGC (artificial intelligence generated content) and large language model technology, and specifically to a live text generation method and device based on a large language model, an electronic device, a computer-readable storage medium and a computer program product. Background Art

[0002] Live broadcast is a new service mode based on the Internet platform. In the live broadcast, the anchor can interact with the audience in real time and explain the products, services, knowledge, etc.

[0003] 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

[0004] The present disclosure provides a method and device for generating live text based on a large language model, an electronic device, a computer-readable storage medium, and a computer program product.

[0005] According to one aspect of the present disclosure, a method for generating live broadcast text based on a large language model is provided, comprising: obtaining object information of a target object to be explained and the style of a host explaining the target object; generating a first explanation text of the target object with the style based on an explanation template and object information corresponding to the style; and generating a second explanation text for explaining the target object in a live broadcast using a first large language model based on the object information and the first explanation text.

[0006] According to one aspect of the present disclosure, a live broadcast text generation device based on a large language model is provided, comprising: a first acquisition module, configured to acquire object information of a target object to be explained and the style of a host explaining the target object; a first generation module, configured to generate a first explanation text of the target object with the style based on an explanation template and object information corresponding to the style; and a second generation module, configured to generate a second explanation text for explaining the target object in a live broadcast using a first large language model based on the object information and the first explanation text.

[0007] According to one 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 performs the above method.

[0008] According to one aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute the above method.

[0009] According to one aspect of the present disclosure, a computer program product is provided, comprising computer program instructions, which implement the above method when executed by a processor.

[0010] According to one or more embodiments of the present disclosure, a live broadcast explanation text adapted to the host's explanation style can be automatically generated for a designated object, thereby improving the generation efficiency and quality of the live broadcast text.

[0011] 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

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

[0013] Figure 1 A schematic diagram showing an exemplary system in which various methods described herein may be implemented according to an embodiment of the present disclosure;

[0014] Figure 2 A flowchart of a live text generation method based on a large language model according to an embodiment of the present disclosure is shown;

[0015] Figures 3A-3E A schematic diagram showing a live text generation process according to an embodiment of the present disclosure is shown;

[0016] Figure 4 A structural block diagram of a live text generation device based on a large language model according to an embodiment of the present disclosure is shown; and

[0017] 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

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

[0019] 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, temporal 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.

[0020] 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. "Multiple" refers to two or more.

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

[0022] The anchor can explain the product during the live broadcast. In order to ensure the quality of the product explanation, the product explanation text needs to be written before the live broadcast. In the related art, the product explanation text is usually written manually by the anchor or other staff. The manual writing of the explanation text is time-consuming and inefficient. Limited by the professional level of the author, the quality of the explanation text is often difficult to guarantee.

[0023] In view of the above problems, the present disclosure provides a method for generating live text based on a large language model. The method uses a large language model to automatically generate live text adapted to the host's explanation style for a specified object (including goods and services), thereby improving the efficiency of generating live text and ensuring the quality of the live text.

[0024] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0025] Figure 1 FIG. 1 is a schematic diagram of an exemplary system 100 in which various methods and apparatuses described herein may be implemented according to an embodiment of the present disclosure. Figure 1, the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.

[0026] In an embodiment of the present disclosure, the client devices 101 , 102 , 103 , 104 , 105 , and 106 and the server 120 may run one or more services or software applications that enable the execution of a live text generation method based on a large language model.

[0027] In some embodiments, server 120 may also provide other services or software applications, which may include non-virtualized environments and virtualized environments. In some embodiments, these services may be provided as web-based services or cloud services, such as provided to users of client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.

[0028] exist Figure 1 In the configuration shown, the server 120 may include one or more components that implement the functions performed by the server 120. These components may include software components, hardware components, or a combination thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may in turn utilize one or more client applications to interact with the server 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from the system 100. Therefore, Figure 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.

[0029] Client devices 101, 102, 103, 104, 105, and / or 106 may provide an interface that enables a user of the client device to interact with the client device. The client device may also output information to the user via the interface. Figure 1 Only six client devices are depicted, but one skilled in the art will appreciate that the present disclosure may support any number of client devices.

[0030] Client devices 101, 102, 103, 104, 105 and / or 106 may include various types 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, vehicle-mounted devices, game systems, thin clients, various messaging devices, sensors or other sensing devices, etc. These computer devices may run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux or Linux-like operating systems; 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. Client devices are capable of executing various different applications, such as various Internet-related applications, communication applications (such as email applications), short message service (SMS) applications, and may use various communication protocols.

[0031] The network 110 may be any type of network known to those skilled in the art that may support data communications using any of a variety of available protocols, including but not limited to TCP / IP, SNA, IPX, etc. By way of example only, the 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, Wi-Fi), and / or any combination of these and / or other networks.

[0032] Server 120 may include one or more general purpose computers, dedicated server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain a server's virtual storage device). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.

[0033] The computing units in the server 120 may run one or more operating systems including any of the above operating systems and any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and / or middle-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.

[0034] In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and / or 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 / or 106.

[0035] In some embodiments, the server 120 may be a server of a distributed system, or a server combined with a blockchain. The server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in a cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and virtual private servers (VPS) services.

[0036] The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. The databases 130 may reside in various locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. The databases 130 may be of different types. In some embodiments, the databases used by the server 120 may be, for example, relational databases. One or more of these databases may store, update, and retrieve data to and from the databases in response to commands.

[0037] In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the applications may be different types of databases, such as a key-value store, an object store, or a conventional store backed by a file system.

[0038] Figure 1 The system 100 may be configured and operated in various ways to enable the application of various methods and apparatuses described in the present disclosure.

[0039] According to some embodiments, the user can specify the target object (which can be a product or service) to be explained in the live broadcast and the desired explanation style through the client device 101-106. The client device 101-106 or the server 120 can automatically generate a live broadcast explanation text adapted to the explanation style for the target object by executing the live broadcast text generation method based on a large language model of the embodiment of the present disclosure. The client device 101-106 can output the generated live broadcast explanation text to the user.

[0040] Figure 2 The flowchart of the live text generation method 200 based on the large language model according to the embodiment of the present disclosure is shown. The execution subject of the method 200 can be a server, for example Figure 1 The server 120 shown in FIG. 1 may also be a client device, such as Figure 1 Client devices 101-106 are shown in FIG.

[0041] like Figure 2 As shown, method 200 includes steps S210 - S230 .

[0042] In step S210, object information of the target object to be explained and the style of the host explaining the target object are obtained.

[0043] In step S220, based on the explanation template corresponding to the style and the object information, a first explanation text of the target object having the style is generated.

[0044] In step S230, based on the object information and the first explanation text, a second explanation text for explaining the target object in the live broadcast is generated using the first language model.

[0045] According to the embodiments of the present disclosure, by combining the object information of the target object and the explanation template corresponding to the specified style, it is possible to preliminarily generate the imitation explanation text of the target object according to the high-quality explanation template of the specified style, that is, the first explanation text. Furthermore, by using the text understanding and generation capabilities of the large language model, the object information and the imitation explanation text are integrated and polished, thereby generating the live explanation text of the target object that can be used in the live broadcast, that is, the second explanation text.

[0046] According to the embodiments of the present disclosure, the user only needs to specify the target object to be explained in the live broadcast and the desired explanation style, and a live explanation text of the target object adapted to the explanation style can be generated with one click, thereby improving the generation efficiency and quality of the live text.

[0047] The following is a detailed description of each step of method 200.

[0048] In step S210, object information of a target object to be explained in the live broadcast and the style of the host explaining the target object are obtained.

[0049] The target objects to be explained can be physical goods (such as clothing, food, etc.), virtual goods (such as office software, e-books, etc.), online services (such as online courses, online consultations, etc.), offline services (such as catering, accommodation, etc.), etc.

[0050] The target object's object information refers to information related to the target object, including the target object's name, specifications, promotional activities, detailed introduction, service guarantee and other information.

[0051] The style of the host who explains the target object is the explanation style of the target object. The style can be expressed as the host's identifier, such as host A, host B, etc.; it can also be expressed as an identifier of style characteristics, such as lively, friendly, calm, etc. It should be noted that the host who explains the target object can be a real person or a digital person (i.e., a virtual host).

[0052] According to some embodiments, the target object and its explanation style may be specified by the user. For example, the user may specify the target object by inputting the identifier of the target object, selecting a link of the target object, etc. The user may select a certain style from a plurality of preset styles as the explanation style of the target object, or customize the explanation style of the target object by manually inputting a live explanation text.

[0053] According to some embodiments, step S210 may include steps S211 and S212.

[0054] In step S211, the description text of the target object is obtained.

[0055] In step S212, the description text is structured using the second largest language model to obtain structured object information.

[0056] According to the above embodiment, the language understanding and generation capabilities of the second largest language model are used to automatically extract structured object information from the description text of the target object. In the subsequent steps, the structured object information is used to enable the first largest language model to generate a live explanation text of the target object, which can ensure that the first largest language model accurately understands the object information of the target object, thereby ensuring the quality of the live explanation text and its relevance to the target object.

[0057] The first large language model and the second large language model may be the same large language model or different large language models.

[0058] A large language model (LLM, also known as a large language model or large model) is a deep learning model trained using a large amount of text data, which can realize the understanding and generation of natural language text. The number of model parameters of a large language model can reach tens of billions, hundreds of billions or even higher. According to some embodiments, a large language model can adopt a decoder structure (Decoder-Only). The large language model of the decoder structure only includes a decoder (Decoder) in a transformer (Transformer) structure, but does not include an encoder (Encoder). The large language model of the decoder structure usually has good performance on text generation tasks. According to other embodiments, a large language model can also adopt a transformer structure including an encoder and a decoder.

[0059] According to some embodiments, the first large language model and the second large language model may both be pre-trained basic large language models. The basic large language model is obtained by pre-training with a large amount of unlabeled natural language corpus through an autoregressive unsupervised training method.

[0060] According to some embodiments, the first large language model may be obtained by fine-tuning the basic large language model in a supervised manner using the first training data. The first training data may be a data set consisting of sample object information, sample imitation explanation text, and live explanation text labels. In some embodiments, the first training data may also include sample object knowledge.

[0061] According to some embodiments, the second large language model may be obtained by fine-tuning the basic large language model in a supervised manner using the second training data. The second training data may be a data set consisting of description text of sample objects and structured object information.

[0062] The description text of the target object may include text used to describe the target object from multiple different perspectives (e.g., the properties of the target object itself, the e-commerce platform that sells the target object, the user portrait of the target object, etc.). According to some embodiments, the description text of the target object may include text extracted from the target object's detail page (i.e., sales link), text extracted from the target object's picture, current marketing information of the e-commerce platform that sells the target object, the user portrait of the target object, etc.

[0063] The text extracted from the target object's details page includes, for example, the target object's name, specifications, price, details, etc. The target object's image can be obtained from the target object's details page. The marketing information of the e-commerce platform that sells the target object is text indicating the marketing activities of the current e-commerce platform, such as "xx big promotion" and "xx holiday discount". The user portrait of the target object includes, for example, the target object's user group (such as the elderly, students, etc.), the user's comments on the target object, and the user pain points solved by the target object.

[0064] In the case where the description text of the target object includes text extracted from a picture of the target object, step S211 may further include steps S2111 and S2112 .

[0065] In step S2111, optical character recognition (OCR) is performed on the image of the target object to obtain a first text contained in the image.

[0066] In step S2112, the third language model is used to extract the second text related to the target object from the first text.

[0067] According to the above embodiment, in step S2111, the first text obtained by performing OCR on the image is usually not a complete sentence, but a plurality of separate words, and may contain some information irrelevant to the target object, such as serial number, year, interjection, etc. In step S2112, the OCR result of the image (i.e., the first text) is organized and cleaned by utilizing the language understanding and generation capabilities of the three major language models, and the text irrelevant to the target object is filtered out, and only the text related to the target object (i.e., the second text) is retained, which is conducive to improving the generation efficiency and quality of the live explanation text.

[0068] For example, the target object is a dishcloth, and the OCR result of the target object's image is a word set {1, convenient, labor-saving, easy, 2024, hangable, oil, ...}. The third language model is used to clean the OCR result, and the second text is obtained as "dry and wet dual-use, easy to use, clean and labor-saving; not easy to get oily; can be hung to drain; ... ".

[0069] The third largest language model may be the same as the first largest language model or the second largest language model described above, or may be different from both the first largest language model and the second largest language model.

[0070] The third large language model may be a pre-trained basic large language model, or a large language model obtained by fine-tuning the basic large language model in a supervised manner using the third training data. The third training data may be a data set consisting of a sample first text and a sample second text.

[0071] In step S2112, a third prompt template can be used to guide the third language model to extract a second text related to the target object. The third prompt template can be preset, which includes task description information and slots to be filled. The task description information is used to describe the text processing task of extracting text related to the target object, thereby guiding the third language model to extract the second text related to the target object. The slot to be filled is used to fill the first text. In some cases, the slot to be filled can also be used to fill relevant information of the target object, such as the name, category, etc. of the target object.

[0072] For example, the third prompt template can be "You are a data mining expert. Please extract information related to "_" from "_" and organize it into a coherent sentence." In the third prompt template, "_" is the slot to be filled, and the other characters are task description information. The first slot is used to fill in the first text, and the second slot is used for the category of the target object.

[0073] It should be noted that since the description text of the target object may come from multiple sources and be used to describe the target object from multiple angles, the description text of the target object is unstructured, that is, the data structure of the description text is irregular and it is not convenient to represent it using regular structures such as two-dimensional tables and key-value pairs. In addition, description texts from different sources and different angles may overlap in content. For example, the content of the text extracted from the details page of the target object may overlap with the content of the text extracted from the picture. Therefore, after obtaining the description text of the target object through step S211, in step S212, the description text is structured using the second largest language model to obtain structured object information.

[0074] It can be understood that structured data refers to data that follows certain data format rules. Structured object information can be represented by a two-dimensional table structure, for example. Each row of the two-dimensional table can represent a data record; each column can represent a field that is used to describe a type of object information. Structured data can also be represented as a key-value pair. Each key-value pair represents a field that is used to describe a type of object information, where the key is the field name and the value is the field value.

[0075] For example, structured object information can be represented in the form of key-value pairs. Each key represents a type of object information, such as name, specification, promotion, details, service guarantee, etc. The value corresponding to the key is the content of the object information of that type. For example, the value of "name" is "dishcloth", the value of "specification" is "3 pack", and the value of "service guarantee" is "free shipping, seven-day unconditional return and exchange, and free return for damaged products".

[0076] According to some embodiments, in step S212, a second prompt template may be used to guide the second largest language model to extract structured object information from the description text of the target object. The second prompt template may be preset, and includes task description information and slots to be filled. The task description information is used to describe a text processing task for structuring the description text, thereby guiding the second largest language model to extract structured object information from the description text. The slots to be filled are used to fill the description text of the target object.

[0077] For example, the second prompt template may be "You are a data organization expert, please extract key information from "_" and express it in the form of a key-value pair." In the second prompt template, "_" is a slot to be filled, which is used to fill in the description text of the target object; other characters are task description information.

[0078] In step S220, based on the explanation template corresponding to the style and the object information, a first explanation text of the target object having the style is generated.

[0079] According to some embodiments, a style template library may be pre-set. The style template library includes explanation templates corresponding to a plurality of different styles. Furthermore, for each style, a plurality of explanation templates for a plurality of object categories may be set. For example, for the style of anchor A, explanation templates for anchor A for a plurality of object categories such as clothing, skin care products, electrical appliances, and food may be set respectively.

[0080] The explanation templates of different anchors can be obtained from the anchor's historical live video. For example, in order to obtain anchor A's explanation template for clothing categories, high-quality clothing explanation clips can be intercepted from anchor A's historical live video, and the clothing explanation clips can be converted into text through voice recognition technology. Then, the information related to specific clothing in the text (such as the name, price, discount, etc. of the clothing) can be replaced with fillable slots, so as to obtain anchor A's explanation template for clothing categories.

[0081] When a user customizes a style by manually inputting a live explanation text, the information of the object in the live explanation text (such as name, price, discount, etc.) can be replaced with fillable slots to obtain an explanation template corresponding to the customized style. It should be noted that the object in the live explanation text can belong to the same category as the target object to be explained, or it can belong to a different category from the target object.

[0082] According to some embodiments, whether the clothing explanation segment is of high quality may be determined based on user interaction data (eg, sales volume, number of likes, number of comments, etc.).

[0083] According to some embodiments, step S220 may include steps S221 - S223 .

[0084] In step S221, the category to which the target object belongs is obtained.

[0085] In step S222, an explanation template for explaining the object of the category in a user-specified style is obtained. The explanation template includes a plurality of first slots to be filled, and the plurality of first slots are respectively used to fill in a plurality of types of object information. That is, each first slot is used to fill in a specific type of object information.

[0086] In step S223, the object information of the target object is filled into the corresponding first slot to obtain a first explanation text.

[0087] According to the above embodiment, by filling in the slots, an imitation explanation text of a specified style can be quickly generated.

[0088] According to some embodiments, in step S223, steps S2231-S2233 may be performed for each first slot in the explanation template, so as to fill the first slot with corresponding object information.

[0089] In step S2231, the type of object information corresponding to the first slot is obtained.

[0090] In step S2232, a text segment describing object information of this type is extracted from the historical live broadcast text of the target object.

[0091] In step S2233, the text segment is filled into the first slot.

[0092] The structured object information is usually concise and written, which does not meet the requirements of colloquial expression during live broadcast; while the historical live broadcast text is the text generated in the live broadcast scene, and its description of the object information is more natural and colloquial. According to the above embodiment, by combining the historical live broadcast text of the target object to generate a simulated explanation text of a specified style, the simulated explanation text is more in line with the expression requirements during live broadcast.

[0093] According to some embodiments, the type of object information corresponding to each first slot may be pre-marked, and accordingly, in step S2231, the type of object information corresponding to the first slot may be directly obtained. According to other embodiments, a large language model may be used to understand the context of the first slot to identify the type of object information corresponding to the first slot.

[0094] According to some embodiments, the historical live text of the target object can be obtained by performing voice recognition on high-quality historical live clips that explain the target object. For example, high-quality historical live clips can be selected from multiple historical live clips that explain the target object based on user interaction data (such as sales volume, number of likes, number of comments, etc.). Voice recognition is performed on the high-quality historical live clips to obtain the historical live text. The historical live text is semantically understood using a large language model or other machine learning model to determine the type of object information described by each sentence in the historical live text, so that text fragments (including one or more sentences) that describe specific types of object information can be extracted from the historical live text.

[0095] For example, the structured object information of the freckle essence C includes: name-C, solved user pain point-freckle removal. Its historical live text is "Do you usually have a worry that your face is dull and prone to freckles? I am here to help you solve your worries today and bring you a good thing, our high-concentration freckle solution-C. This essence is really very easy to use...". The text segment describing the name extracted from the historical live text is "our high-concentration freckle solution-C", and the text segment describing the user pain point is "our face is dull and prone to freckles".

[0096] It should be noted that the first explanation text obtained by slot filling may not be smooth and natural. Therefore, according to some embodiments, a large language model can be used to polish the first explanation text obtained by slot filling to improve the fluency of the first explanation text, thereby ensuring the quality of the second explanation text generated based on the first explanation text.

[0097] In step S230, based on the object information and the first explanation text, a second explanation text for explaining the target object in the live broadcast is generated using the first language model.

[0098] According to some embodiments, the object information and the first explanation text may be input into the first large language model to obtain the second explanation text output by the first large language model.

[0099] According to some embodiments, in step S230, the second explanation text may be generated using the first large language model based on the object information, the first explanation text, and the object knowledge of the target object acquired from a preset knowledge base.

[0100] Object knowledge can be used as a supplement to structured object information. Combining object knowledge to generate live explanation text (i.e., second explanation text) can improve the richness and diversity of the content of the live explanation text.

[0101] According to some embodiments, object knowledge may be acquired through the following steps S241 and S242 .

[0102] In step S241, a first tag of the first explanation text is obtained. The first tag indicates the type of content described by the first explanation text.

[0103] In step S242, based on the first tag and the object information, a knowledge base is queried to obtain object knowledge.

[0104] According to the above embodiment, the object knowledge required for the imitation explanation text (first explanation text) is queried from the knowledge base, which can improve the pertinence of the object knowledge, thereby improving the polishing effect of the large language model on the imitation explanation text.

[0105] According to some embodiments, in step S241, a large language model may be used to perform semantic understanding on the first explanation text to determine the first label of each sentence in the first explanation text. The first label may be, for example, sales volume (describing the recent sales volume of the object, or using data to illustrate the popularity of the sales), buyer reviews (describing buyer shows, buyers' evaluations of the object), competitive product prices (describing the prices of other brands or objects), brand achievements (describing the brand history, vision, mission or major achievements of the object), authoritative endorsement (describing the cooperation between the object or its brand and celebrities, having a certificate issued by an official agency, meeting national standards, and belonging to the same style as the star), mythological stories (describing traditional mythological stories, mythological characters or mythological elements related to the object), celebrity allusions (describing celebrities from ancient and modern times, both at home and abroad and the stories or allusions behind the object), scientific knowledge (describing scientific principles, technological innovations or scientific research results related to the object), etc.

[0106] In step S242, the first tag and the object information may be combined as a query (also referred to as a query term). The query is used to query the knowledge base to obtain object knowledge. The knowledge base may include a general knowledge base and a specialized knowledge base in a specific field, such as an e-commerce knowledge base, a literature knowledge base, a physics knowledge base, etc.

[0107] For example, the first tag "brand achievement" can be combined with the object information "brand D" to obtain the query question "D's brand achievement". For another example, the first tag "scientific knowledge" can be combined with the object information "name-E" to obtain the query question "E's scientific knowledge". Use the constructed query question to query each knowledge base separately to obtain the corresponding query results. The query results of each knowledge base are aggregated as object knowledge.

[0108] According to some embodiments, step S230 may include steps S231 - S233 .

[0109] In step S231, a prompt template for guiding the first large language model to generate a second explanation text is obtained. The prompt template includes a plurality of second slots to be filled.

[0110] In step S232, the object information, the first explanation text and the object knowledge are respectively filled into the corresponding second slots of the prompt template to obtain the prompt text (ie, prompt).

[0111] In step S233, the prompt text is input into the first large language model to obtain a second explanation text output by the first large language model.

[0112] According to the above embodiment, the language understanding and generation capabilities of the large language model can be used to automatically generate explanation text that meets the requirements of live broadcast.

[0113] In step S231, the prompt template may be preset, which includes task description information and a plurality of second slots to be filled. The task description information is used to describe the text processing task of generating a live explanation text, thereby guiding the first language model to generate a live explanation text (a second explanation text) based on the object information, the imitation explanation text (the first explanation text) of the specified style and the object knowledge. The plurality of second slots are used to fill in the object information, the first explanation text and the object knowledge, respectively.

[0114] For example, the prompt template in step S231 may be "You are a host in the live broadcast room. Please write the live broadcast explanation text based on "_", "_" and "_", and pay attention to the language being relaxed and fluent." In this prompt template, "_" is the second slot to be filled, which is used to fill in the object information, the first explanation text and the object knowledge respectively; the other characters are the task description information.

[0115] According to some embodiments, after obtaining the prompt text through step S232 and before executing step S233, the prompt text is subjected to risk detection. Accordingly, step S233 may include: in response to determining that the prompt text does not have risk, inputting the prompt text into the first language model to obtain a second explanation text output by the first language model.

[0116] According to the above embodiment, before submitting the data to the large language model for processing, risk detection is performed on the data to prevent the large language model from generating risky (eg, political or pornographic) explanation texts.

[0117] Risk detection refers to detecting whether the prompt text contains risks, for example, detecting whether the prompt text involves sensitive or illegal information such as politics, violence, pornography, etc.

[0118] According to some embodiments, a trained general risk control model can be used to determine whether the prompt text has risks. The general risk control model can be, for example, a binary classification model. By inputting the prompt text into the general risk control model, the general risk control model outputs a classification result of whether the prompt text has risks or does not have risks. The general risk control model can also be a multi-classification model. By inputting the prompt text into the general risk control model, the general risk control model outputs the risk type of the prompt text, such as political, pornographic, no risk, etc.

[0119] If the prompt text does not contain any risk, the prompt text is input into the first language model to obtain a second explanation text output by the first language model.

[0120] If the prompt text has risks, the prompt text is rejected from being input into the first language model. Furthermore, a prompt message indicating that the live explanation text generation failed can be returned to the user.

[0121] According to some embodiments, method 200 further includes steps S250 and S260.

[0122] In step S250, risk detection is performed on the second explanation text.

[0123] In step S260 , in response to determining that the second explanation text does not present risks, the second explanation text is output to the client device.

[0124] According to the above embodiment, after the live broadcast explanation text is generated, risk detection is performed on the live broadcast explanation text to avoid returning the live broadcast explanation text with risks to the user.

[0125] According to some embodiments, in step S250, a trained general risk control model can be used to determine whether the second explanation text has general risks, such as political-related, pornographic-related, etc. The general risk control model can be, for example, a binary classification model. By inputting the second explanation text into the general risk control model, the general risk control model outputs a classification result of whether the second explanation text has risks or does not have risks. The general risk control model can also be a multi-classification model. By inputting the second explanation text into the general risk control model, the general risk control model outputs the risk type of the second explanation text, such as political-related, pornographic-related, no risk, etc.

[0126] According to some embodiments, in step S250, a trained general risk control model can be used to determine whether the second explanation text has general risks, and a trained special model for the e-commerce field can be used to determine whether the second explanation text has specific risks in the e-commerce field, for example, a false propaganda model can be used to determine whether the second explanation text has false propaganda. The false propaganda model can be a binary classification model. By inputting the second explanation text into the false propaganda model, the false propaganda model outputs a classification result of whether the second explanation text has false propaganda or not.

[0127] If the second explanation text does not contain any risk, the second explanation text is output to the client device. The client device displays the second explanation text to the user. The user can choose to adopt the second explanation text, copy it in full, save it to the online live text library, or download it locally. The user can also instruct the system to make further adjustments to the second explanation text, such as expansion, simplification, polishing, adjusting the tone, etc., to generate a new second explanation text.

[0128] If the second explanation text has risks, the second explanation text can be discarded, and the first language model can be re-called with the prompt text to generate a new second explanation text. The first language model can be repeatedly called multiple times until a second explanation text that meets the risk requirements is generated.

[0129] According to some embodiments, after generating the second explanation text, a second tag of the second explanation text may be generated using the fourth language model. The second tag indicates the type of content described by the second explanation text. Subsequently, the second explanation text and the second tag are output to the client device together.

[0130] According to the above embodiment, the live broadcast explanation text and its content tags are returned to the user together, so that the user can quickly determine whether the generated live broadcast explanation text meets his or her own needs.

[0131] The fourth language model may be the same as the first language model, the second language model or the third language model described above, or may be different from the first language model, the second language model and the third language model.

[0132] The fourth language model may be a pre-trained basic language model, or a language model obtained by fine-tuning the basic language model in a supervised manner using the fourth training data. The fourth training data may be a data set consisting of sample explanation texts and content labels of each paragraph in the sample explanation texts.

[0133] In step S2112, the fourth prompt template can be used to guide the fourth language model to extract the second label of the second explanation text. The fourth prompt template can be preset, which includes task description information and slots to be filled. The task description information is used to describe the text processing task of extracting content labels, thereby guiding the fourth language model to extract the second labels of each paragraph in the second explanation text. The slots to be filled are used to fill the second explanation text.

[0134] For example, the fourth prompt template may be “You are a semantic summarization expert, please summarize the main idea of ​​“_””. In the fourth prompt template, “_” is a slot to be filled, which is used to fill each paragraph in the second explanation text; other characters are task description information.

[0135] The following is an example of the generated second explanation text and its second label. The content in brackets is the second label.

[0136] (01 Opening introduction + introducing products + attracting user interest + emphasizing product selling points + describing people’s pain points)

[0137] Friends in the live studio, come on, do you usually have a problem that your face is dry, rough, dull, and prone to spots, which particularly affects our beauty, right? The anchor asked, do you want to make your face white and tender? OK, I am here to help you solve your problems today, and I have brought you a good thing, which is our high-concentration spot-dissolving liquid-C,…

[0138] (02 Product explanation emphasizes product selling points)

[0139] This essence contains a high concentration of spot-dissolving formula, which has a super good spot-lightening effect. Not only that, it also contains a variety of natural plant extracts,…

[0140] (03 Product explanation emphasizes product selling points + describes the pain points of the crowd)

[0141] Come on, are there any girls with dry faces? It is easy to get powder stuck when putting on makeup, right? This essence can help us moisturize our skin and also have a whitening effect,…

[0142] (04 Product explanation, promotions and purchase guidance)

[0143] This essence is usually not cheap if you buy it offline or in other stores, right? However, today the host will give you a limited-time offer, buy one get one free, which is very cost-effective. Here, we will give you the link,…

[0144] (05 Product explanation to guide purchase + emphasize product selling points + emphasize purchase guarantees + describe the pain points of the crowd)

[0145] Sisters, hurry up and click the link below to buy. Do you usually spend hundreds or even thousands of yuan for a whitening and anti-freckle treatment at a beauty salon? But today in our live studio, you only need to spend xx yuan to buy a high-concentration whitening and anti-freckle essence, and it is buy one get one free. After you take it home, if you are not satisfied with it or have any problems, you can return it. We support seven days of unconditional return and exchange, so you can buy it with confidence,…

[0146] (06 Guide orders and purchases)

[0147] Sisters who want to be white, what are you waiting for? Don't miss it, hurry up and take pictures.

[0148] According to the embodiments of the present disclosure, a live broadcast explanation text adapted to the anchor's explanation style can be automatically generated for a specified object, which improves the quality rate of the live broadcast text and shortens the creation time of the live broadcast text. It has been verified that the live broadcast explanation text generated by the embodiments of the present disclosure has a quality rate of more than 95% (the quality rates of manual evaluation and machine evaluation are both higher than 95%), and the user adoption rate is as high as 98%. The generation time of the live broadcast explanation text is within 1 minute, and the average is 30 seconds.

[0149] Figures 3A-3E The live text generation process of the embodiment of the present disclosure is described.

[0150] Figure 3A The overall flow chart of the live text generation process is shown in FIG. Figure 3A As shown, the embodiment of the present disclosure uses a large model to generate a live explanation text of a specified object. Specifically, in step S311, the large model generates a live explanation text based on structured object information, a simulated text of the explanation style desired by the user (corresponding to the first explanation text above) and the queried object knowledge.

[0151] Figure 3B FIG. 4 shows a flowchart for obtaining structured object information. Figure 3B As shown, structured object information can be obtained through steps S321-S326.

[0152] In step S321, object data in the database is obtained. The object data may be data in the object details page, including text and pictures.

[0153] In step S322, the image of the object is recognized using OCR technology to extract text data from the image.

[0154] In step S323, the large model is used to clean the text data obtained by OCR, remove data irrelevant to the object (such as number, year, interjection, etc.), and only retain text data related to the object.

[0155] In step S324, the marketing information of the e-commerce platform at the current time point is obtained, such as the marketing activities, discount rules, etc. of the current e-commerce platform.

[0156] In step S325, the user population of the object, the user pain points solved, the user's high-quality comments, etc. are obtained. The user population of the object can be extracted from the preset fields of the object. For example, the user population of health products can be preset as the elderly; the user population of the object can also be determined by counting the attributes of users who purchase the object. User pain points can be extracted from the detailed introduction of the object or user comments. The user's high-quality comments can be comments with a word count exceeding a threshold, or comments determined to be high-quality by the evaluation model (a trained machine learning model).

[0157] In step S326, the multi-dimensional data obtained in steps S321-S325 are structured using the large model to obtain structured object information.

[0158] Figure 3C A flowchart for generating imitation text is shown. Figure 3C As shown, the imitation text can be generated through steps S331-S336.

[0159] In step S331, a historical live video that explains the object is obtained. There may be one or more historical live videos.

[0160] In step S332, a high-quality explanation segment of the object is extracted from the historical live video. For example, the explanation segment of the object can be extracted from the historical live video. Then, for each explanation segment, the sales volume of the object within the time range of the explanation segment is obtained. The explanation segment with the largest sales volume is determined as the high-quality explanation segment.

[0161] In step S333, the speech of the high-quality explanation segment is converted into text using speech recognition technology.

[0162] In step S334, an explanation template of a specified category (ie, the category to which the object belongs) with the explanation style desired by the user is obtained from the style preset library.

[0163] In step S335, the structured information of the object is filled into the slot of the explanation template to generate a parody text of a specified style. The parody text at this time may not be smooth and natural enough.

[0164] In step S336, the imitation text obtained in step S335 is polished using the large model to obtain a smooth and natural imitation text.

[0165] Figure 3D FIG. 1 shows a flowchart of querying object knowledge. Figure 3D As shown, object knowledge can be obtained through querying steps S341-S345.

[0166] In step S341, the large model is used to perform semantic analysis on the imitation text to obtain labels of each sentence in the imitation text (corresponding to the first label above).

[0167] In step S342, the tag of the simulated text is combined with the object information to obtain a query.

[0168] In step S343, the query question is used to query the general knowledge base to obtain general knowledge related to the object.

[0169] In step S344, the e-commerce knowledge base is queried using the query question to obtain e-commerce knowledge related to the object (such as historical sales, sales of competing products, etc.).

[0170] In step S345, the general knowledge and e-commerce knowledge obtained by the query are summarized to obtain the object knowledge of the object.

[0171] Figure 3E FIG. 4 shows a flow chart of using a large model to generate a live explanation text (corresponding to the second explanation text above). Figure 3E As shown, the live explanation text can be generated through steps S351-S357.

[0172] In step S351, a prompt text (prompt) is generated using a prompt template according to the structured object information, the queried object knowledge and the generated imitation text.

[0173] In step S352, the general risk control model is requested to determine whether the prompt is available. If the general risk control model determines that the prompt is available (i.e., there is no risk), step S353 is continued to request the large model to generate a live explanation text. If the general risk control model determines that the prompt is not available (for example, there is a risk of political or pornographic content), the live explanation text is refused to be generated.

[0174] In step S354, the general risk control model and the false propaganda model are respectively requested to determine whether the live explanation text generated by the large model is available. If both the general risk control model and the false propaganda model determine that the live explanation text is available, then continue to execute steps S355 and S356, use the large model to generate the content tag of the live explanation text (corresponding to the second tag above), and output the live explanation text and its content tag to the user. If at least one of the general risk control model and the false propaganda model determines that the live explanation text is not available, then return to step S353 and request the large model to generate the live explanation text again.

[0175] After the live explanation text and its content tags are output to the user through step S356, the user can adopt the live explanation text by operating the controls in the display interface of the live explanation text (for example, clicking buttons such as copy full text, save to text library, download to local, etc. in the display interface).

[0176] The user can also further adjust the live explanation text by operating the controls in the display interface of the live explanation text (for example, clicking the expansion, simplification, polishing, etc. buttons in the display interface). Accordingly, in response to the user's operation of the controls in the display interface of the live explanation text, in step S357, the big model can be requested to expand, simplify or polish the live explanation text, and return the adjusted live explanation text to the user.

[0177] According to an embodiment of the present disclosure, a live text generation device based on a large language model is also provided. Figure 4 FIG. 4 shows a structural block diagram of a live text generation device 400 based on a large language model according to an embodiment of the present disclosure. Figure 4 As shown, the apparatus 400 includes a first acquisition module 410 , a first generation module 420 and a second generation module 430 .

[0178] The first acquisition module 410 is configured to acquire object information of a target object to be explained and the style of a host explaining the target object.

[0179] The first generating module 420 is configured to generate a first explanation text of the target object with the style based on the explanation template corresponding to the style and the object information.

[0180] The second generating module 430 is configured to generate a second explanation text for explaining the target object in the live broadcast by using a first large language model based on the object information and the first explanation text.

[0181] According to the embodiments of the present disclosure, by combining the object information of the target object and the explanation template corresponding to the specified style, it is possible to preliminarily generate the imitation explanation text of the target object according to the high-quality explanation template of the specified style, that is, the first explanation text. Furthermore, by using the text understanding and generation capabilities of the large language model, the object information and the imitation explanation text are integrated and polished, thereby generating the live explanation text of the target object that can be used in the live broadcast, that is, the second explanation text.

[0182] According to the embodiments of the present disclosure, the user only needs to specify the target object to be explained in the live broadcast and the desired explanation style, and a live explanation text of the target object adapted to the explanation style can be generated with one click, thereby improving the generation efficiency and quality of the live text.

[0183] According to some embodiments, the first acquisition module includes: a first acquisition unit, configured to acquire a description text of the target object; and a structuring unit, configured to structure the description text using a second language model to obtain the structured object information.

[0184] According to some embodiments, the description text includes text extracted from a picture of the target object, and wherein the first acquisition unit includes: a recognition subunit configured to perform optical character recognition on the picture to obtain a first text contained in the picture; and an extraction subunit configured to extract a second text related to the target object from the first text using a third language model.

[0185] According to some embodiments, the first generation module includes: a second acquisition unit, configured to acquire the category to which the target object belongs; a third acquisition unit, configured to acquire the explanation template with the style for explaining objects of the category, wherein the explanation template includes a plurality of first slots to be filled, and the plurality of first slots are respectively used to fill in a plurality of types of object information; and a first filling unit, configured to fill the object information into the corresponding first slot to obtain the first explanation text.

[0186] According to some embodiments, the first filling unit is further configured to: for any first slot among the multiple first slots: obtain the type of object information corresponding to the first slot; extract a text fragment describing the type of object information from the historical live text of the target object; and fill the text fragment into the first slot.

[0187] According to some embodiments, the second generating module is further configured to generate the second explanation text using the first large language model based on the object information, the first explanation text and the object knowledge of the target object obtained from a preset knowledge base.

[0188] According to some embodiments, the device 400 also includes: a second acquisition module, configured to acquire a first label of the first explanation text, wherein the first label indicates the type of content described by the first explanation text; and a query module, configured to query the knowledge base based on the first label and the object information to obtain the object knowledge.

[0189] According to some embodiments, the second generation module includes: a fourth acquisition unit, configured to acquire a prompt template for guiding the first large language model to generate the second explanation text, wherein the prompt template includes a plurality of second slots to be filled; a second filling unit, configured to fill the object information, the first explanation text and the object knowledge into the corresponding second slots of the prompt template respectively to obtain the prompt text; and an input unit, configured to input the prompt text into the first large language model to obtain the second explanation text output by the first large language model.

[0190] According to some embodiments, the device 400 also includes: a first detection module, configured to perform risk detection on the prompt text before inputting the prompt text into the first large language model, wherein the input unit is further configured to: in response to determining that the prompt text does not have any risk, input the prompt text into the first large language model.

[0191] According to some embodiments, the apparatus 400 further includes: a second detection module configured to perform risk detection on the second explanation text; and a first output module configured to output the second explanation text to a client device in response to determining that the second explanation text does not pose a risk.

[0192] According to some embodiments, the apparatus 400 further includes: a third generation module configured to generate a second label for the second explanation text using a fourth language model, wherein the second label indicates the type of content described by the second explanation text; and a second output module configured to output the second explanation text and the second label to a client device.

[0193] It should be understood that Figure 4 The various modules and units of the apparatus 400 shown in FIG. 4 can be compared with those of the reference Figure 2 The steps in the method 200 described above correspond to each other. Therefore, the operations, features and advantages described above for the method 200 are also applicable to the device 400 and the modules and units included therein. For the sake of brevity, some operations, features and advantages are not repeated here.

[0194] Although specific functionality is discussed above with reference to specific modules, it should be noted that the functionality of the various modules discussed herein may be separated into multiple modules, and / or at least some functionality of multiple modules may be combined into a single module.

[0195] It should also be understood that various techniques may be described herein in the general context of software hardware elements or program modules. Figure 4The various units described can be implemented in hardware or in hardware in combination with software and / or firmware. For example, these units can be implemented as computer program codes / instructions, which are configured to be executed in one or more processors and stored in a computer-readable storage medium. Alternatively, these units can be implemented as hardware logic / circuits. For example, in some embodiments, one or more of modules 410-430 can be implemented together in a system on chip (System on Chip, SoC). SoC can include an integrated circuit chip (which includes a processor (e.g., a central processing unit (CPU), a microcontroller, a microprocessor, a digital signal processor (DSP), etc.), a memory, one or more communication interfaces, and / or one or more components in other circuits), and can optionally execute the received program code and / or include embedded firmware to perform functions.

[0196] According to an embodiment 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, the memory storing instructions executable by the at least one processor, the instructions being executed by the at least one processor so that the at least one processor executes the live text generation method based on a large language model of an embodiment of the present disclosure.

[0197] According to an embodiment of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is also provided, and the computer instructions are used to enable a computer to execute the live text generation method based on a large language model of an embodiment of the present disclosure.

[0198] According to an embodiment of the present disclosure, a computer program product is also provided, including computer program instructions, which, when executed by a processor, implement the live text generation method based on a large language model of an embodiment of the present disclosure.

[0199] 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 assistants, 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.

[0200] like Figure 5 As shown, the electronic 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 electronic 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.

[0201] Multiple components in the electronic 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 electronic 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 electronic 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 Wi-Fi device, a WiMAX device, a cellular communication device, and / or the like.

[0202] 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 method 200. For example, in some embodiments, the method 200 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 electronic device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the method 200 described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the method 200 in any other appropriate manner (e.g., by means of firmware).

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

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

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

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

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

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

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

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

Claims

1. A live text generation method based on a large language model, comprising: Obtaining object information of a target object to be explained and the style of a host explaining the target object; Based on the explanation template corresponding to the style and the object information, generating a first explanation text of the target object with the style; as well as Based on the object information and the first explanation text, a second explanation text for explaining the target object in a live broadcast is generated using a first language model.

2. The method according to claim 1, wherein: The obtaining of the object information of the target object to be explained includes: Obtaining a description text of the target object; and The description text is structured using the second largest language model to obtain the structured object information.

3. The method according to claim 2, wherein: The description text includes text extracted from the image of the target object, and wherein obtaining the description text of the target object includes: Performing optical character recognition on the image to obtain a first text contained in the image; and A second text related to the target object is extracted from the first text using a third language model.

4. The method according to any one of claims 1 to 3, wherein: The generating a first explanation text of the target object having the style based on the explanation template corresponding to the style and the object information comprises: Obtaining the category to which the target object belongs; Acquire the explanation template with the style for explaining the object of the category, wherein the explanation template includes a plurality of first slots to be filled, and the plurality of first slots are respectively used to fill in a plurality of types of object information; and Fill the object information into the corresponding first slot to obtain the first explanation text.

5. The method according to claim 4, wherein: Filling the object information into the corresponding first slot includes: For any first slot of the plurality of first slots: Obtain the type of object information corresponding to the first slot; Extracting a text segment describing object information of the type from the historical live broadcast text of the target object; and Fill the first slot with the text segment.

6. The method according to any one of claims 1 to 5, wherein: The step of generating a second explanation text for explaining the target object in a live broadcast by using a first language model based on the object information and the first explanation text comprises: The second explanation text is generated by using the first language model based on the object information, the first explanation text and the object knowledge of the target object obtained from a preset knowledge base.

7. The method according to claim 6, further comprising: acquiring a first tag of the first explanation text, wherein the first tag indicates a type of content described by the first explanation text; and Based on the first tag and the object information, the knowledge base is queried to obtain the object knowledge.

8. The method according to claim 6 or 7, wherein: The step of generating the second explanation text by using the first language model based on the object information, the first explanation text and the object knowledge of the target object obtained from a preset knowledge base includes: Obtaining a prompt template for guiding the first language model to generate the second explanation text, wherein the prompt template includes a plurality of second slots to be filled; Filling the object information, the first explanation text and the object knowledge into the corresponding second slots of the prompt template respectively to obtain a prompt text; and The prompt text is input into the first language model to obtain the second explanation text output by the first language model.

9. The method according to claim 8, further comprising: Before inputting the prompt text into the first language model, performing risk detection on the prompt text, The step of inputting the prompt text into the first language model includes: In response to determining that the prompt text does not present risk, the prompt text is input into the first language model.

10. The method according to any one of claims 1 to 9, further comprising: Performing risk detection on the second explanation text; as well as In response to determining that the second explanation text does not present a risk, the second explanation text is output to a client device.

11. The method according to any one of claims 1 to 10, further comprising: Generate a second label for the second explanation text using the fourth language model host, wherein the second label indicates the type of content described by the second explanation text; and The second explanation text and the second label are output to a client device.

12. A live text generation device based on a large language model, comprising: A first acquisition module is configured to acquire object information of a target object to be explained and a style of a host explaining the target object; A first generating module is configured to generate a first explanation text of the target object having the style based on the explanation template corresponding to the style and the object information; as well as The second generating module is configured to generate a second explanation text for explaining the target object in the live broadcast based on the object information and the first explanation text by using a first language model.

13. The device according to claim 12, wherein: The first acquisition module includes: A first acquisition unit is configured to acquire a description text of the target object; and The structuring unit is configured to structure the description text using the second largest language model to obtain the structured object information.

14. The device according to claim 13, wherein: The description text includes text extracted from the picture of the target object, and wherein the first acquisition unit includes: a recognition subunit, configured to perform optical character recognition on the image to obtain a first text contained in the image; and The extraction subunit is configured to extract a second text related to the target object from the first text by using a third language model.

15. The device according to any one of claims 12 to 14, wherein: The first generation module comprises: A second acquisition unit is configured to acquire the category to which the target object belongs; a third acquisition unit, configured to acquire the explanation template having the style and used for explaining the objects of the category, wherein the explanation template comprises a plurality of first slots to be filled, and the plurality of first slots are respectively used to fill in a plurality of types of object information; and The first filling unit is configured to fill the object information into the corresponding first slot to obtain the first explanation text.

16. The device according to claim 15, wherein: The first filling unit is further configured as: For any first slot of the plurality of first slots: Obtain the type of object information corresponding to the first slot; Extracting a text segment describing object information of the type from the historical live broadcast text of the target object; and Fill the first slot with the text segment.

17. The device according to any one of claims 12 to 16, wherein: The second generating module is further configured to: The second explanation text is generated by using the first language model based on the object information, the first explanation text and the object knowledge of the target object obtained from a preset knowledge base.

18. The apparatus according to claim 17, further comprising: A second acquisition module is configured to acquire a first tag of the first explanation text, wherein the first tag indicates a type of content described by the first explanation text; and The query module is configured to query the knowledge base based on the first tag and the object information to obtain the object knowledge.

19. The device according to claim 17 or 18, wherein: The second generation module comprises: a fourth acquisition unit, configured to acquire a prompt template for guiding the first language model to generate the second explanation text, wherein the prompt template includes a plurality of second slots to be filled; a second filling unit configured to fill the object information, the first explanation text and the object knowledge into corresponding second slots of the prompt template respectively to obtain a prompt text; and The input unit is configured to input the prompt text into the first language model to obtain the second explanation text output by the first language model.

20. The apparatus according to claim 19, further comprising: The first detection module is configured to perform risk detection on the prompt text before inputting the prompt text into the first language model. Wherein, the input unit is further configured as: In response to determining that the prompt text does not present risk, the prompt text is input into the first language model.

21. The apparatus according to any one of claims 12 to 20, further comprising: A second detection module is configured to perform risk detection on the second explanation text; as well as The first output module is configured to output the second explanation text to a client device in response to determining that the second explanation text does not pose a risk.

22. The apparatus according to any one of claims 12 to 21, further comprising: A third generating module is configured to generate a second label of the second explanation text using a fourth language model, wherein the second label indicates a type of content described by the second explanation text; and The second output module is configured to output the second explanation text and the second label to a client device.

23. 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 11.

24. 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-11.

25. A computer program product comprising computer program instructions, wherein: The computer program instructions implement the method of any one of claims 1-11 when executed by a processor.

Citation Information

Cited By

  • Data processing method and device and other equipment

    CN119441258A