Content generation method and device based on large model
By deploying large models and preference calibration models in electronic devices or servers, and combining user-input query text and preference information, content that matches user preferences can be generated. This solves the problem of high training costs for personalized large models and achieves improved user experience and reduced costs in personalized content generation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2026-03-13
AI Technical Summary
In real-world business scenarios, different users have different personalized needs for the content generated by large models. Existing technical solutions for personalized large models have high training costs and are difficult to maintain.
By deploying large models and preference calibration models in electronic devices or servers, and combining user-input query text and preference information, content that matches user preferences is generated. The preference calibration model is used to calibrate the probability parameters of candidate sub-content generated by the large model, reducing the training burden of terminal models, and providing pause, deletion, and adjustment functions for the content generation process.
This has improved the user experience of personalized content generation, reduced model training and maintenance costs, met users' personalized needs, and reduced the computational burden on electronic devices.
Smart Images

Figure CN121658580A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a content generation method and device based on a large model. Background Technology
[0002] Large models refer to machine learning models with massive parameters and complex computational structures. Typically built from deep neural networks, they possess billions or even hundreds of billions of parameters to enhance expressive power and predictive performance, enabling them to handle more complex tasks and data. Large models have wide applications across various fields, including natural language processing, computer vision, speech recognition, and recommendation systems. By training on massive amounts of data to learn complex patterns and features, large models possess stronger generalization capabilities and can make accurate predictions. For example, a large language model is a natural language processing model with massive parameters and computational power. Trained on large amounts of data and parameters, it can generate text similar to human-written text or answer questions in natural language. Large language models have wide applications in natural language processing, text generation, and intelligent dialogue.
[0003] However, in real-world business scenarios, different users have different personalized needs for the content generated by large models, and how to achieve personalized content creation has become an important issue in the field of large models. Summary of the Invention
[0004] This application provides a content generation method and device based on a large model, which is used to provide a content generation method that meets users' personalized needs.
[0005] Firstly, this application provides a content generation method based on a large model, which can be executed by an electronic device. In this method, the electronic device displays a query interface, receives query text and preference information input by a user on the query interface, wherein the query text is text used to describe the user's needs, and the preference information is used to indicate the preference type and / or the degree of preference corresponding to the preference type; determines content based on the query text and the preference information; and displays the content on the query interface.
[0006] In the above method, the electronic device can receive the query text input by the user and the user's set preference information. Then, the electronic device can generate content that is more in line with the user's preferences based on the query text, thereby meeting the user's personalized needs.
[0007] In one possible design, the content includes multiple sub-contents. Determining the content based on the query text and the preference information includes: generating multiple candidate sub-contents based on a large model using the query text; determining target probability parameters for the multiple candidate sub-contents based on a preference calibration model using the preference information; and determining a target sub-content from the multiple candidate sub-contents based on the target probability parameters corresponding to each candidate sub-content using the large model. The target sub-content is any one of the multiple sub-contents. With this design, when generating content, the electronic device can sequentially generate multiple sub-contents. When generating each sub-content, the electronic device can generate multiple candidate sub-contents based on a large model, then determine the probability parameters of each candidate sub-content based on a preference calibration model, and finally determine the sub-content that best matches the user's preferences from the multiple candidate sub-contents. This method can generate content that satisfies user preferences while ensuring content coherence.
[0008] In one possible design, the step of generating multiple candidate sub-contents based on a large model according to the query text, and determining the target probability parameters of the multiple candidate sub-contents based on a preference calibration model according to the preference information, includes: generating multiple candidate sub-contents and a first probability parameter corresponding to each candidate sub-content based on the large model according to the query text; generating a second probability parameter corresponding to each candidate sub-content based on the preference information, the multiple candidate sub-contents, and the first probability parameter corresponding to each candidate sub-content based on the preference calibration model; and fusing the first probability parameter and the second probability parameter corresponding to each candidate sub-content based on the preference calibration module to generate the target probability parameter corresponding to each candidate sub-content. Through this design, the electronic device can calibrate the probability parameters of the multiple candidate sub-contents generated by the large model based on the preference calibration model. The calibrated probability parameters take into account the user's preference information, thus the sub-contents determined based on the calibrated probability parameters can better meet the user's personalized needs.
[0009] In one possible design, determining the content based on the query text and the preference information includes: sending the query text and the preference information to a server, and receiving the content sent by the server, wherein the content is generated by the server based on the query text and the preference information using the large model and the preference calibration model. Through this design, the electronic device can also send the query text and preference information to the server, which will then perform the content generation process, thereby reducing the computational burden on the electronic device.
[0010] In one possible design, the method further includes pausing the content generation process in response to a user's first action. This design provides a pause function during content generation, allowing users to pause the process at any time. For example, if a user is dissatisfied with the generated content or needs to adjust preferences, they can pause the content generation process, thus improving the user experience.
[0011] In one possible design, the method further includes: deleting the user-selected content from the generated content in response to a second user operation; wherein the second operation is the user deleting a portion of the generated content after selecting it. This design provides the electronic device with the function of deleting portions of generated content. When a user is dissatisfied with the generated content, they can operate the electronic device to delete the unsatisfactory content, thus solving the problem in existing content generation schemes where users cannot edit the content being generated.
[0012] In one possible design, the method further includes: responding to a third user action by obtaining adjusted preference information corresponding to the third action; wherein the third action is the user's action of adjusting the preference type and / or the preference level corresponding to the preference type on the query interface. Through this design, users can adjust their preference information at any time during the content generation process of the electronic device, making the generated content more tailored to user needs and further improving the user experience.
[0013] In one possible design, the method further includes: responding to a fourth user action by continuing to generate content at the end of the currently generated content; and continuing to display the subsequently generated content in the query interface. With this design, the electronic device can continue generating content at the end of the currently generated content. For example, if the user deletes part of the content or adjusts their preferences, the electronic device can continue generating content without regenerating all the content, thus improving content generation efficiency.
[0014] In one possible design, the content is text or video.
[0015] Secondly, this application provides an electronic device comprising multiple functional modules; the multiple functional modules interact to implement the methods performed by the electronic device in any of the above aspects and their respective embodiments. The multiple functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the multiple functional modules can be arbitrarily combined or divided based on specific implementations.
[0016] Thirdly, this application provides an electronic device including at least one processor and at least one memory, wherein the at least one memory stores computer program instructions, and when the electronic device is running, the at least one processor executes any of the above aspects and the methods executed by the electronic device in its various embodiments.
[0017] Fourthly, this application also provides a computer program product containing instructions that, when the computer program product is run on a computer, cause the computer to perform any of the above aspects and their respective embodiments, or the method performed by an electronic device.
[0018] Fifthly, this application also provides a computer-readable storage medium storing a computer program that, when executed by a computer, causes the computer to perform the method executed by the electronic device in any of the above aspects and embodiments.
[0019] Sixthly, this application also provides a chip for reading a computer program stored in a memory and executing the method executed by the electronic device in any of the above aspects and embodiments.
[0020] Seventhly, this application also provides a chip system including a processor for supporting a computer device in implementing the methods executed by electronic devices in any of the above aspects and their embodiments. In one possible design, the chip system further includes a memory for storing programs and data necessary for the computer device. The chip system may be composed of chips or may include chips and other discrete devices. Attached Figure Description
[0021] Figure 1 A schematic diagram illustrating a scenario applicable to a content generation method based on a large model provided in this application embodiment;
[0022] Figure 2 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0023] Figure 3 A software structure block diagram of an electronic device provided in an embodiment of this application;
[0024] Figure 4 A schematic diagram of a system architecture applicable to a content generation method based on a large model provided in this application embodiment;
[0025] Figure 5 A schematic diagram of a query interface provided in an embodiment of this application;
[0026] Figure 6 A schematic diagram illustrating content generation based on a large model and a preference calibration model, provided for an embodiment of this application;
[0027] Figure 7 A schematic diagram of a query interface provided in an embodiment of this application;
[0028] Figure 8 A flowchart illustrating a content generation method based on a large model, provided in an embodiment of this application;
[0029] Figure 9 A flowchart illustrating a content generation method based on a large model, provided in an embodiment of this application. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the embodiments of this application will be further described in detail below with reference to the accompanying drawings. In the description of the embodiments of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined with "first" and "second" may explicitly or implicitly include one or more of that feature.
[0031] It should be understood that in the embodiments of this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, a and b, a and c, b and c, or a, b, and c, where a, b, and c can be single or multiple.
[0032] With the development of artificial intelligence technology, large models have become an important tool in content creation tasks. They have wide applications in various fields, including natural language processing, computer vision, speech recognition, and recommendation systems. Large models learn complex patterns and features by training on massive amounts of data, possessing stronger generalization capabilities and the ability to make accurate predictions based on the data.
[0033] In real-world business scenarios, different users have different personalized needs for the content generated by large models. In order to achieve personalized content generation by large models, some implementations involve electronic devices collecting user profile data and then fusing the user profile data with the model parameters of the large model for training. This allows the content generated by the trained large model to meet user preferences. However, in this approach, the personalized large model is only applicable to a single user, which requires deploying a model for each user, thus greatly increasing the training cost and resulting in high costs.
[0034] In other implementations, a large model can be trained on the server side, while a user-personalized small model can be trained on the terminal side. This allows for the deployment of the large model and the personalized small model on the server and terminal sides respectively. When a user generates content using the large model, the content generated by the server-side large model and the content generated by the terminal-side small model can be merged to obtain content that matches the user's preferences. However, this approach requires training a small model on each user's terminal, resulting in significant training costs. Furthermore, when the server-side model is updated, the personalized models on all users' terminals need to be retrained, which is detrimental to model maintenance and iterative updates.
[0035] To address the aforementioned problems, embodiments of this application provide a content generation method and apparatus based on a large model, such as... Figure 1 This diagram illustrates a scenario applicable to the content generation method based on a large model provided in this application embodiment. (Reference) Figure 1 This scenario may include server 101 and electronic device 102. Optionally, server 101 may be a cluster of computing devices including multiple computing devices, which may work together to achieve the functions performed by server 101 in this embodiment.
[0036] In some examples, a large model and a preference calibration model can be deployed in electronic device 102. Electronic device 102 can display a query interface in which users can enter query text and preference information. Electronic device 102 can generate content based on the large model and preference calibration model according to the query text and preference information, and display the content in the query interface.
[0037] In other examples, server 101 can deploy a large model and a preference calibration model, and electronic device 102 can display a query interface. Users can enter query text and preference information in the query interface. Electronic device 102 can send the query text and preference information to server 101. Server 101 can generate content based on the query text and preference information using the large model and preference calibration model. Server 101 sends the generated content to electronic device 102, and electronic device 102 can display the content in the query interface.
[0038] Optionally, server 101 can also be used to train the large model and preference calibration model. In this embodiment, when the large model and preference calibration model are deployed in electronic device 102, the training and updating of the large model and preference calibration model can also be completed by server 101. After training or updating the large model and preference calibration model, server 101 can publish the large model and preference calibration model to electronic device 102. For example, server 101 can send the updated data of the large model and preference calibration model to electronic device 102. In this way, model updates and maintenance can be performed on the server side, reducing the model maintenance cost on the electronic device side.
[0039] The following describes an electronic device and embodiments for using such an electronic device. The electronic device in this application embodiment can be a tablet computer, mobile phone, in-vehicle device, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), wearable device, etc. This application embodiment does not limit the specific type of electronic device.
[0040] In some embodiments of this application, the electronic device may also be a portable terminal device that includes other functions such as a personal digital assistant and / or a music player. Exemplary embodiments of the portable terminal device include, but are not limited to, devices equipped with... Or portable terminal devices with other operating systems.
[0041] Figure 2 This is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of this application. Figure 2 As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
[0042] Processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. The controller may serve as the central nervous system and command center of the electronic device 100. The controller can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. Processor 110 may also include memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that processor 110 has recently used or is repeatedly used. If processor 110 needs to reuse an instruction or data, it can directly retrieve it from the memory. This avoids repeated access, reduces the waiting time of processor 110, and thus improves system efficiency.
[0043] USB interface 130 is a USB standard compliant interface, specifically a Mini USB interface, Micro USB interface, USB Type-C interface, etc. USB interface 130 can be used to connect a charger to charge electronic device 100, and can also be used for data transfer between electronic device 100 and peripheral devices. Charging management module 140 receives charging input from the charger. Power management module 141 connects battery 142, charging management module 140, and processor 110. Power management module 141 receives input from battery 142 and / or charging management module 140, providing power to processor 110, internal memory 121, external memory, display 194, camera 193, and wireless communication module 160, etc.
[0044] The wireless communication function of electronic device 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0045] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0046] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0047] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).
[0048] The display screen 194 is used to display the display interface of an application, such as the display page of an application installed on the electronic device 100. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.
[0049] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0050] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system and software code for at least one application program. The data storage area may store data generated during the use of electronic device 100 (e.g., captured images, recorded videos, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0051] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, images, videos, and other files can be saved on the external memory card.
[0052] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0053] The sensor module 180 may include a pressure sensor 180A, an acceleration sensor 180B, a touch sensor 180C, etc.
[0054] The pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194.
[0055] Touch sensor 180C, also known as a "touch panel," can be located on display screen 194. The touch sensor 180C and display screen 194 together form a touchscreen, also known as a "touch screen." Touch sensor 180C detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180C may also be located on the surface of electronic device 100, in a different position than display screen 194.
[0056] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch buttons. Electronic device 100 can receive button inputs and generate key signal inputs related to user settings and function control. Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, touch operations applied to different applications (such as taking photos, audio playback, etc.) can correspond to different vibration feedback effects. Touch vibration feedback effects can also be customized. Indicator 192 can be an indicator light, used to indicate charging status, battery level changes, or to indicate messages, missed calls, notifications, etc. SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with electronic device 100.
[0057] Understandable, Figure 2The components shown do not constitute a specific limitation on the electronic device 100. The electronic device may also include more or fewer components than shown, or combine some components, or separate some components, or have different component arrangements. Furthermore, Figure 2 The combination / connection relationships between the components can also be adjusted and modified.
[0058] Figure 3 This is a software structure block diagram of an electronic device provided in an embodiment of this application. For example... Figure 3 As shown, the software architecture of an electronic device can be a layered architecture. For example, the software can be divided into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the operating system is divided into four layers, from top to bottom: the application layer, the application framework layer (framework, FWK), the runtime and system libraries, and the kernel layer.
[0059] The application layer can include a series of application packages. For example... Figure 3 As shown, the application layer may include a camera, settings, skin modules, a user interface (UI), and third-party applications. These third-party applications may include a gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS. In this embodiment, the application layer may include a target installation package of a target application that the electronic device requests to download from a server. The function files and layout files in this target installation package are adapted to the electronic device.
[0060] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer can include some predefined functions. For example... Figure 3 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, and notification manager.
[0061] The window manager is used to manage windowed applications. It can obtain the screen size, determine if a status bar is present, lock the screen, and capture screenshots. The content provider stores and retrieves data, making this data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.
[0062] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
[0063] A phone manager is used to provide communication functions for electronic devices. For example, it manages call status (including connection and disconnection).
[0064] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0065] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.
[0066] The runtime includes the core libraries and the virtual machine. The runtime is responsible for the scheduling and management of the operating system.
[0067] The core library consists of two parts: one part contains the functionalities that the Java language needs to call, and the other part contains the core libraries of the operating system. The application layer and application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0068] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), image processing libraries, etc.
[0069] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
[0070] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0071] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0072] A 2D graphics engine is a graphics engine for 2D drawing.
[0073] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.
[0074] The hardware layer can include various types of sensors, such as accelerometers, gyroscopes, and touch sensors.
[0075] It should be noted that, Figure 2 and Figure 3 The structure shown is merely an example of an electronic device provided in this application embodiment and is not intended to limit the electronic device provided in this application embodiment in any way. In specific implementations, the electronic device may have more than Figure 2 or Figure 3 The structure shown may contain more or fewer devices or modules.
[0076] The following describes the content generation method based on a large model provided in the embodiments of this application.
[0077] Figure 4 This is a schematic diagram of a system architecture applicable to a content generation method based on a large model provided in an embodiment of this application. (Reference) Figure 4 The system includes a large model 410, a preference calibration model 420, an interaction module 430, and a breakpoint continuation module 440. The interaction module 430 may include a preference input module 431, and the breakpoint continuation module 440 may include a selection / deletion module 441 and a generation control module 442. Optionally, the system may also include a preference calibration model training module 450. Optionally, the large model 410, the preference calibration model 420, and the preference calibration model training module 450 may belong to... Figure 1 In the scenario shown, server 101, interaction module 430, and breakpoint resume module 440 can belong to... Figure 1 Electronic device 102 in the scene shown; or Figure 4 The modules shown can all belong to Figure 1 The electronic device 102 in the scene shown. The function of each module is described below.
[0078] The preference calibration model 420 is used to generate preference calibration results based on the candidate content generated by the large model 410 and the preference information input by the user. For example, in this embodiment, the preference calibration model 420 can be a fine-grained Q function, which can be trained by the preference calibration model training module 450 based on preference sample data. For example, the preference calibration model training module 450 can include reward models with multiple preference dimensions. During the training process, the reward model can be used to give positive incentives to content that meets the preference and negative incentives to content that does not meet the preference.
[0079] The large model 410 is used to generate candidate content based on the query text input by the user, and to fuse the preference calibration results generated by the preference calibration model 420 with the candidate content to generate the final content.
[0080] The preference input module 431 is used to receive preference information input by the user. The preference information input by the user can be preference type, preference type and preference degree.
[0081] The deletion module 441 is used to receive unsatisfactory content selected by the user from the generated content and to delete the content selected by the user.
[0082] The generation control module 442 is used to pause or start content generation based on user operation. When the user selects to delete part of the generated content, the generation control module 442 can be used to continue generating subsequent content at the breakpoint after the deletion.
[0083] In the content generation method based on a large model provided in this application embodiment, the content generation function of the electronic device can be a function provided by an application installed on the electronic device, or a function provided by a webpage accessed by the electronic device. When a user uses the content generation function of the electronic device, the electronic device can display a query interface, where the user can enter query text, which can be text entered by the user to describe their needs. For example, Figure 5 A schematic diagram of a query interface provided in an embodiment of this application, with reference to... Figure 5 The query interface includes an input box control 501, in which users can enter query text, such as: "Who are you?".
[0084] In this embodiment of the application, the query interface displayed by the electronic device may further include preference adjustment controls 502, such as... Figure 5As shown, the query interface includes adjustment controls corresponding to multiple preference types, and can include two different styles of preference adjustment controls 5021 and 5022. Preference adjustment control 5021 can be used to adjust the preference level corresponding to the preference type. The preference level can be any value between 0 and 1, such as... Figure 5 The preference adjustment control 5021 can slide within a set range. When the preference adjustment control 5021 is at the left endpoint of the set range, the preference level of that preference type is 0; when the preference adjustment control 5021 is at the right endpoint of the set range, the preference level of that preference type is 1. The electronic device can determine the preference level corresponding to the preference type based on the position of the adjustment control after user adjustment. The preference adjustment control 5022 can be used by the user to select a preference type from multiple candidate preference types, such as the user selecting the preference type as "daily conversation". Optionally, Figure 5 The query interface shown may also include a pause control 504 and a start control 505. The pause control 504 can be used to pause the content generation process, and the start control can be used to start or resume the content generation process after pausing. Optionally, the pause control and the start control in the query interface may also be the same control.
[0085] After receiving the query text and preference information entered by the user on the query interface, the electronic device can generate content based on a large model and a preference calibration model. In this embodiment, the content generated by the electronic device based on the user's query text and preference information is serialized content. The electronic device can sequentially generate each sub-content that constitutes the serialized content based on the large model and the preference calibration model. For example, when the serialized content is text content, the electronic device can sequentially generate each character; or, for example, when the serialized content is video, the electronic device can sequentially generate each sub-frame.
[0086] Optionally, the electronic device can input the query text entered by the user into the large model and obtain the first sub-content output by the large model. Then, the electronic device can input the query text and the generated sub-content into the large model and obtain the next sub-content output by the large model. For example, taking the production of text content as an example, the electronic device can input the query text entered by the user into the large model and obtain the first character output by the large model. Then, the electronic device can input the query text and the first character into the large model and obtain the second character output by the large model, and so on, until the complete text content is finally generated.
[0087] In one optional implementation, after the electronic device obtains the query text and preference information input by the user, it can input the query text into a large model and obtain multiple candidate sub-contents output by the large model and a first probability parameter corresponding to each candidate sub-content. For example, the first probability parameter can be obtained by performing a logarithmic operation on the probability value corresponding to each candidate sub-content. The electronic device can input the user's input preference information into a preference calibration model, and input the multiple candidate sub-contents output by the large model and the first probability parameter corresponding to each candidate sub-content into the preference calibration model. The electronic device then obtains a second probability parameter output by the preference calibration model, which is the result of the preference calibration model calibrating the probability parameters of the multiple candidate sub-contents based on the user's preference information. Optionally, the preference calibration model includes weight parameters corresponding to multiple preference types. After the electronic device inputs the user's preference information into the preference calibration model, it can adjust the weight parameters corresponding to multiple preference types in the preference calibration model according to the preference degree of at least one preference type in the preference information. After the electronic device inputs multiple candidate sub-contents output by the large model and the first probability parameter corresponding to each candidate sub-content into the preference calibration model, the preference calibration model, after adjusting the weight parameters corresponding to the preference types, can output a second probability parameter after calibrating the probability parameters of the multiple candidate sub-contents. The preference calibration model can also perform fusion processing based on the first probability parameter and the second probability parameter of each candidate sub-content to obtain the target probability parameter corresponding to each candidate sub-content.
[0088] For example, Figure 6 This is a schematic diagram illustrating content generation based on a large model and a preference calibration model, provided as an embodiment of this application. (Reference) Figure 6, the user can input query text in the query interface of the electronic device. For example, the query text input by the user is "Who are you?", and the user can also input user preference information in the query interface. For example, the preference information input by the user can be "Humorous style: 1.0", "Concise content: 0.7", "Preference type 3: Daily conversation". Assume that the currently generated content is "I am yours", then at this time, the large model needs to generate the next word after "yours". The large model determines multiple candidate words for the next word based on the query text "Who are you?" input by the user and the currently generated content "I am yours". For example, the candidate words determined by the large model include "little", "friend", and "wise", and the first probability parameter of "little" is 3, the first probability parameter of "friend" is "2", and the probability parameter of "wise" is "5". The large model sends the generated multiple candidate words and the first probability parameter corresponding to each candidate word to the preference calibration model. The electronic device inputs the preference information input by the user into the preference calibration model. The preference calibration model determines the second probability parameter corresponding to each candidate word based on the preference information input by the user, the multiple candidate words generated by the large model, and the first probability parameter corresponding to each candidate word. For example, the preference calibration model can determine that the second probability parameter of "little" is "5", the second probability parameter of "friend" is "4", and the second probability parameter of "wise" is "0". The preference calibration model can perform a fusion process based on the first probability parameter and the second probability parameter corresponding to each candidate word to obtain the target probability parameter corresponding to each candidate word. For example, the target probability parameter, the first probability parameter, and the second probability parameter can satisfy the following relationship:
[0089] T = P1 + β(P2 - a)
[0090] Among them, T is the target probability parameter corresponding to the candidate word, P1 is the first probability parameter corresponding to the candidate word, P2 is the second probability parameter corresponding to the candidate word, β is a fusion hyperparameter used to control the intensity of the preference influence, and a is the average value calculated based on the second probability parameters corresponding to the multiple candidate words determined by the preference calibration model, which is used to prevent the value of the second probability parameter output by the preference calibration model from being too large and causing a large perturbation to the large model. For example, when the preference calibration model can determine that the second probability parameter of "little" is "5", the second probability parameter of "friend" is "4", and the second probability parameter of "wise" is "0", the value of a is 3.
[0091] After the preference calibration model determines the target probability parameter corresponding to each candidate word among the multiple candidate words, it can send the target probability parameter corresponding to each candidate word to the large model. The large model can determine the finally output word based on the target probability parameter corresponding to each candidate word.
[0092] In this embodiment, the electronic device can repeatedly execute the process of generating sub-content based on the large model and the preference calibration model until the complete content is completed. The method of generating each sub-content based on the large model and the preference calibration model can be referred to the above embodiments, and the repeated parts will not be described again.
[0093] In some examples of this application, after receiving the query text and preference information entered by the user in the query interface, the electronic device can also send the query text and preference information to the server. The server can generate content based on the large model and preference calibration model according to the query text and preference information entered by the user. The server can send the generated content to the electronic device, and the electronic device displays the content in the query interface. In this example, the way the server generates content can refer to the way the electronic device generates content in the above embodiments, and the repeated parts will not be described again.
[0094] As can be seen from the description of the query interface displayed on the electronic device in the foregoing embodiments, the query interface may also include pause and start controls, such as... Figure 5 The query interface shown includes a pause control 504 and a start control 505. When the electronic device displays the query interface and is generating content, the content can be displayed sequentially in the query interface as it is continuously generated. If the user is not satisfied with the currently generated content, or if the user wants to change their preferences for subsequent content, the user can trigger a first operation in the pause control of the query interface. For example, the first operation can be a click operation by the user on the pause control. In response to this first operation, the electronic device can pause the generation of content.
[0095] In this embodiment, when a user is dissatisfied with the generated content, the user can select a portion of the generated content and trigger the deletion of that portion. When the electronic device generates content, for each sub-content generated, the pointer of the serialized content generation process moves forward one position. When the user selects to delete a portion of the content, the electronic device can rewind the pointer to the last sub-content remaining after the user's deletion, so that content can be generated from that last sub-content.
[0096] In response to the user's fourth action, the electronic device continues to generate content from the end of the remaining content after the user has deleted it. Optionally, the fourth action is an operation triggered by the user in the query interface to restart the content generation, such as a user clicking the "Start" control in the query interface.
[0097] In one optional implementation, after the electronic device detects the user's fourth operation, the electronic device can input the query text entered by the user and the remaining content after the user deletes the content into the large model. Thus, the large model can continue to generate content at the end of the remaining content after the user deletes the content. The specific method of generating content can be referred to the foregoing embodiments, and repeated details will not be described again.
[0098] In some examples, after pausing content generation, users can adjust their preferences in the query interface. For instance, a user can trigger a third operation in the query interface, which can be an operation to adjust the preference type and / or the preference level corresponding to the preference type. The electronic device can obtain the adjusted preference information based on the user's third operation. Then, when the user triggers a fourth operation in the query interface, the electronic device can input the user's adjusted preference information into the preference calibration model. Thus, the electronic device can continue generating content at the end of the currently generated content based on the user's adjusted preference information.
[0099] For example, Figure 7 A schematic diagram of a query interface provided in an embodiment of this application, with reference to... Figure 7 In (a) of the query, the user inputs the query text "Who are you?", and the user can also input user preference information in the query interface, such as "Humorous Style: 1.0", "Concise Content: 0.7", and "Preference Type 3: Daily Conversation". During the process of generating content based on the user's input query text and preference information, the electronic device can display the generated content in the query interface. When the user clicks the "Pause" control in the query interface, the electronic device pauses content generation. (See reference) Figure 7 In section (b), users can select to delete portions of the generated content, such as the portion selected by the user. Figure 7 The text in (b) is shaded, and users can adjust their preferences in the query interface. For example, adjusted preferences could be "Humorous Style: 0.5", "Concise Content: 1.0", and "Preference Type 5: Popular Science". After deleting content and adjusting preferences, users can click the "Start" control in the query interface. The electronic device will then append content to the end of the remaining content after the deletion. (Reference) Figure 7 In (c), the electronic device can generate content sequentially according to the adjusted preference information.
[0100] It should be noted that the above embodiments use the generation of text content as an example for illustration, but the embodiments of this application do not limit the type of content to be generated. The method for generating content based on a large model provided in this application can also be used to generate other serialized content, such as videos, code, etc. When the generated content is video, the large model can generate the image encoding of each image frame, the preference adjustment model can adjust the probability parameters of the image encoding of each image frame, and then the large model can decode the determined image encoding of the image frame to generate the image frame. For specific implementation, please refer to the above embodiments, and repeated parts will not be described again.
[0101] Based on the above embodiments, Figure 8 A flowchart illustrating a content generation method based on a large model, provided in an embodiment of this application. Figure 8 The following description uses an electronic device to illustrate the content generation method based on a large model provided in the embodiments of this application. Figure 8 The method includes the following steps:
[0102] S801: The electronic device receives query text and preference information input by the user.
[0103] For example, users can Figure 5 Enter the query text in the query interface shown, and in Figure 5 Adjust your preferences in the query interface shown.
[0104] Alternatively, S801 can be... Figure 4 The interaction module 430 shown is executed, wherein the step of receiving user input preference information can be executed by the preference input module 431.
[0105] S802: Electronic devices generate content based on a large model and a preference calibration model, according to the query text and preference information input by the user.
[0106] Alternatively, S802 can be... Figure 4 The large model 410 and preference calibration model 420 shown are executed.
[0107] S803: In response to the user's first action, the electronic device pauses content generation.
[0108] Optionally, the first operation can be an action triggered by the user in the query interface to pause the content generation process, such as the first operation being triggered by the user in the query interface. Figure 5 The click operation triggered on the pause control 504 in the query interface shown.
[0109] Alternatively, S803 can be... Figure 4 The breakpoint continuation module 440 shown is executed, but it can be specifically executed by the generation control module 442.
[0110] S804: In response to a second user action, the electronic device deletes the user-selected content from the generated content.
[0111] Optionally, the second operation can be that the user selects part of the generated content and then deletes it.
[0112] Alternatively, S804 can be... Figure 4 The breakpoint continuation module 440 shown is executed, but it can be specifically executed by the selection deletion module 441.
[0113] S805: In response to a third operation by the user, the electronic device obtains the adjusted preference information corresponding to the third operation.
[0114] The third operation can be an operation whereby the user adjusts the preference type and / or the preference level corresponding to the preference type on the query interface. For example, the third operation can be an operation where the user... Figure 5 The operation triggered by the adjustment control 502 in the query interface shown.
[0115] Alternatively, the S805 can be... Figure 4 The interaction module 430 shown is executed, specifically by the preference input module 431.
[0116] S806: In response to the user's fourth operation, the electronic device continues to generate content at the end of the currently generated content.
[0117] Optionally, the fourth operation is an operation triggered by the user in the query interface to restart content generation. For example, the fourth operation can be an action performed by the user on... Figure 5 The click operation of the start control 505 in the query interface shown.
[0118] Alternatively, S806 can be... Figure 4 The breakpoint continuation module 440, large model 410, and preference calibration model 420 shown are executed.
[0119] It should be noted that the content generated by the electronic device based on the user's input query text and preference information is serialized content. Therefore, in S802, the electronic device can repeatedly execute the process of generating sub-content based on the large model and the preference calibration model until the complete content is completed. Furthermore, Figure 8 In the illustrated embodiment, steps S803-S806 are optional. In practice, the corresponding process can be executed according to the operation actually triggered by the user. If the user does not trigger any operation related to any step S803-S806, then this step does not need to be executed.
[0120] This application also provides a training method for a preference calibration model. Taking the training of a preference calibration model by an electronic device as an example, in this application embodiment, the preference calibration model can be a fine-grained Q function. The electronic device can train the fine-grained Q function through a fine-grained reward model. The training methods of the fine-grained reward model and the fine-grained Q function are described below.
[0121] 1. Training methods for fine-grained reward models.
[0122] When training a fine-grained reward model, an electronic device can acquire a training sample set for each preference type. The model is then trained separately based on each training sample set to obtain a fine-grained reward model for each preference type. The training sample set includes multiple training samples, each containing query text, content labeled as conforming to the preference, and content labeled as not conforming to the preference. The electronic device can perform preference learning based on the training sample set, thereby training multiple fine-grained reward models corresponding to multiple preference types. These multiple fine-grained reward models can score the content generated for the query text from different preference dimensions; a higher score indicates that the content better meets the requirements of the preference type.
[0123] 2. Training method for fine-grained Q function.
[0124] In this embodiment, the electronic device can train a fine-grained Q-function based on the Q-learning algorithm. The electronic device can acquire multiple query texts and input them into a large model to obtain the response output by the large model for each query text. The electronic device can score the query text and the response output by the large model based on a fine-grained reward model, thereby obtaining (query, response, score_preference1, socre_preference2, ..., socre_preferenceK), where score_preference1 to score_preferencek are the scores obtained by the reward models corresponding to k different preference types for (query, response), and k is a positive integer. The target score is obtained by weighted summation of the K scores, and the target score can satisfy the following relationship:
[0125] sCore=SCorepreference1*w1+SCopreference2*w2+…+score_preferencek*wk
[0126] Where score is the target score, and w1, w2, ... wk are weight values obtained by random sampling from 0 to 1.
[0127] After obtaining the target score, the Q function can be updated according to the following formula:
[0128] Q(s,aw1*0preference1(S,a)ten..+wk*Q_preferenceK(s,a)
[0129] In other words, the Q function is a weighted sum of the various dimensions of the fine-grained Q function.
[0130] Q(s,a)←Q(s,a)+α[score+ymaxa'Q(s',a′)-Q(s,a)]
[0131] Here, α is the learning rate, used to control the weight of new information during the learning process, 0 < α ≤ 1. The score is the immediate reward obtained when taking action a from state s, where s is the current state (for example, generating text content), s is the data input into the large model (e.g., s is the query text and the currently generated text content), and a is the action taken in the current state s (for example, generating text content), a is the next word generated by the large model. γ is a discount factor used to balance the importance of immediate and future rewards, 0 ≤ γ < 1. s′ is the new state after taking action a from state s, and a′ is the possible candidate action to take in state s′.
[0132] The fine-grained Q-function trained in the above manner can score each candidate content, thereby calculating the second probability parameter corresponding to each candidate content. The higher the score of the candidate content that satisfies the user's preferences, the larger the value of the second probability parameter corresponding to the candidate content that satisfies the user's preferences.
[0133] It should be noted that the above embodiments use the electronic device executing the content generation method based on the large model provided in the embodiments of this application as an example. In practice, the server and the electronic device can also coordinate to execute the content generation method based on the large model provided in the embodiments of this application. For example, the training process of the large model and the preference calibration model can be carried out on the server, and the large model and the preference calibration model can be deployed on the server. After receiving the query text and preference information input by the user, the electronic device can send the query text and preference information to the server. After the server generates the content, it sends the content to the electronic device. The electronic device displays the received content in the query interface. For specific implementation, please refer to the above embodiments. Repeated parts will not be described again.
[0134] Based on the same concept, embodiments of this application also provide a content generation method based on a large model, which can be executed by an electronic device, such as... Figure 9A flowchart for content generation based on a large model is provided as an embodiment of this application, with reference to... Figure 9 The method includes the following steps:
[0135] S901: Electronic device displays a query interface.
[0136] For example, the query interface displayed on an electronic device can be like... Figure 5 As shown, the query interface may include a control 501 for inputting query text and a control 502 for setting user preferences.
[0137] S902: The electronic device receives the query text and preference information entered by the user on the query interface.
[0138] The query text is the text used to describe the user's needs, and the preference information is used to indicate the preference type and / or the degree of preference corresponding to the preference type.
[0139] For example, users can Figure 5 Enter the query text and adjust your preferences in the query interface shown.
[0140] S903: Electronic devices determine content based on query text and preference information.
[0141] Optionally, the electronic device can determine multiple sub-contents based on the query text and preference information. When generating each sub-content, the electronic device can generate multiple candidate sub-contents based on a large model according to the query text, and determine the target probability parameters of the multiple candidate sub-contents based on a preference calibration model according to the preference information. The electronic device then determines the sub-content from the multiple candidate sub-contents based on the target probability parameters corresponding to each candidate sub-content in the large model.
[0142] S904: Content displayed on the query interface by electronic devices.
[0143] After generating content, the electronic device can display the generated content on the query interface to show the user the query results. For example, the electronic device can... Figure 5 The generated content is displayed in control 503 of the query interface shown.
[0144] It should be noted that this application Figure 9 The content generation method based on the large model shown can be referred to in the above embodiments of this application for specific implementation, and repeated parts will not be described again.
[0145] Based on the above embodiments, this application also provides an electronic device, which includes multiple functional modules; the multiple functional modules interact to realize the functions performed by the electronic device in the methods described in the embodiments of this application. For example, [the following is an example of implementation]. Figure 8 or Figure 9The illustrated embodiment provides a content generation method based on a large model. The multiple functional modules can be implemented using software, hardware, or a combination of both, and these modules can be arbitrarily combined or divided based on specific implementations.
[0146] Based on the above embodiments, this application also provides an electronic device, which includes at least one processor and at least one memory, wherein the at least one memory stores computer program instructions. When the electronic device is running, the at least one processor executes the functions performed by the electronic device in the methods described in the embodiments of this application. For example, when executing... Figure 8 or Figure 9 The embodiment shown provides a content generation method based on a large model.
[0147] Based on the above embodiments, this application also provides a computer program product containing instructions, which, when run on a computer, causes the computer to perform the methods described in the embodiments of this application.
[0148] Based on the above embodiments, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a computer, causes the computer to perform the methods described in the embodiments of this application.
[0149] Based on the above embodiments, this application also provides a chip for reading computer programs stored in a memory to implement the methods described in the embodiments of this application.
[0150] Based on the above embodiments, this application provides a chip system including a processor for supporting a computer device in implementing the methods described in the embodiments of this application. In one possible design, the chip system further includes a memory for storing necessary programs and data of the computer device. This chip system may be composed of chips or may include chips and other discrete devices.
[0151] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0152] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0153] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0154] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0155] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the scope of protection of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A content generation method based on a large model, characterized in that, Applied to electronic devices, the method includes: Display the query interface; The system receives query text and preference information input by the user on the query interface. The query text is text used to describe the user's needs, and the preference information is used to indicate the preference type and / or the degree of preference corresponding to the preference type. The content is determined based on the query text and the preference information; The content is displayed on the query interface.
2. The method as described in claim 1, characterized in that, The content includes multiple sub-contents, and the step of determining the content based on the query text and the preference information includes: Based on the query text, multiple candidate sub-contents are generated using a large model; Based on the preference information, the target probability parameters of the multiple candidate sub-contents are determined using a preference calibration model. Based on the large model, a target sub-content is determined from the multiple candidate sub-contents according to the target probability parameter corresponding to each candidate sub-content. The target sub-content is any one of the multiple sub-contents.
3. The method as described in claim 2, characterized in that, The query text is used to generate multiple candidate sub-contents based on a large model; Based on the preference information, the target probability parameters of the multiple candidate sub-contents are determined using a preference calibration model, including: Based on the query text, multiple candidate sub-contents and a first probability parameter corresponding to each candidate sub-content are generated according to the large model; Based on the preference information, the plurality of candidate sub-contents, and the first probability parameter corresponding to each candidate sub-content among the plurality of candidate sub-contents, a second probability parameter corresponding to each candidate sub-content among the plurality of candidate sub-contents is generated based on the preference calibration model; Based on the preference calibration module, the first probability parameter corresponding to each candidate sub-content in the plurality of candidate sub-contents and the second probability parameter corresponding to each candidate sub-content in the plurality of candidate sub-contents are fused to generate the target probability parameter corresponding to each candidate sub-content in the plurality of candidate sub-contents.
4. The method as described in claim 1, characterized in that, The step of determining the content based on the query text and the preference information includes: The query text and the preference information are sent to the server, and the content sent by the server is received. The content is generated by the server based on the query text and the preference information, using the large model and the preference calibration model.
5. The method according to any one of claims 1-4, characterized in that, The method further includes: In response to the user's first action, the content generation process is paused.
6. The method as described in claim 5, characterized in that, The method further includes: In response to the user's second action, delete the content selected by the user from the generated content; The second operation is the user selecting and deleting a portion of the generated content.
7. The method as described in claim 5 or 6, characterized in that, The method further includes: In response to the user's third action, obtain the adjusted preference information corresponding to the third action; The third operation is the user's operation of adjusting the preference type and / or the preference level corresponding to the preference type on the query interface.
8. The method as described in claim 6 or 7, characterized in that, The method further includes: In response to the user's fourth action, continue generating content at the end of the currently generated content; The generated content continues to be displayed on the query interface.
9. The method according to any one of claims 1-8, characterized in that, The content can be text or video.
10. An electronic device, characterized in that, The method includes at least one processor coupled to at least one memory, the at least one processor being configured to read a computer program stored in the at least one memory to perform the method as described in any one of claims 1-9.
11. A computer program product containing instructions, characterized in that, When the computer program product is run on a computer, it causes the computer to perform the method as described in any one of claims 1-9.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1-9.