Data processing method and device based on large model, electronic equipment and medium
By concurrently calling a large language model to process multiple paragraphs of response content corresponding to titles, the problem of slow generation of long texts in AI writing products has been solved, achieving efficient and logically coherent content generation and improving user experience.
Patent Information
- Application Number
- CN202511039842.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-11-11
AI Technical Summary
Existing AI writing products suffer from performance bottlenecks when generating long texts, resulting in slow generation speeds and frequent request timeouts due to network issues, which negatively impacts user experience and content generation efficiency.
By employing parallel calls to a large language model, multiple title-related response content paragraphs are processed concurrently through the generation of content outlines. MCP technology is used to achieve parallel processing and resource optimization. Combined with semantic analysis and device parameter adjustment, the generated content is logically coherent and device-compatible.
It significantly reduces user waiting time for generating long articles, improves the efficiency of outputting accurate responses, and enhances both user experience and content generation efficiency.
Smart Images

Figure CN120929596A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence, and in particular to the fields of large models, data processing, and text generation technology, specifically to a data processing method, apparatus, electronic device, computer-readable storage medium, and computer program product based on a large model. Background Technology
[0002] Artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies primarily include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.
[0003] Human-computer interaction (HCI) is a way for humans to interact with machines using natural language. With the continuous development of artificial intelligence technology, machines have become capable of understanding human-generated information, comprehending its inherent meaning, and providing corresponding feedback. In these operations, the accuracy of semantic understanding, the speed of feedback, and the provision of appropriate opinions or suggestions all influence the smoothness of HCI interaction. Summary of the Invention
[0004] This disclosure provides a data processing method, apparatus, electronic device, computer-readable storage medium, and computer program product based on a large model.
[0005] According to one aspect of this disclosure, a data processing method based on a large model is provided, comprising: in response to receiving first instruction information, generating a content outline based on the first instruction information, wherein the content outline includes a plurality of sequentially arranged titles, wherein the content outline is used to generate response content to the instruction information; obtaining response content paragraphs corresponding to each of the plurality of titles by concurrently calling at least one first large language model based on the plurality of titles and the first instruction information; and arranging the obtained response content paragraphs corresponding to each of the plurality of titles in the order provided to obtain the response content.
[0006] According to another aspect of this disclosure, a data processing apparatus based on a large model is provided, comprising: a content outline generation module configured to generate a content outline based on the first instruction information in response to receiving the first instruction information, wherein the content outline includes a plurality of sequentially arranged titles, wherein the content outline is used to generate response content to the instruction information; a response content paragraph generation module configured to obtain response content paragraphs corresponding to each of the plurality of titles by concurrently calling at least one first large language model based on the plurality of titles and the first instruction information; and a response content generation module configured to arrange the obtained response content paragraphs corresponding to each of the plurality of titles in the order provided to obtain the response content.
[0007] According to another aspect of this disclosure, an electronic device is 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 to enable the at least one processor to perform the methods described in this disclosure.
[0008] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions for causing a computer to perform the methods described in this disclosure.
[0009] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the methods described in this disclosure.
[0010] According to one or more embodiments of this disclosure, by calling a large model in parallel and outputting multiple text segments, the user waiting time when generating long texts is shortened, the efficiency of outputting accurate response content is improved, and thus the user experience is enhanced.
[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0012] The accompanying drawings exemplify embodiments and form part of the specification, serving together with the textual description to explain exemplary implementations of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. Throughout the drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0013] Figure 1 A schematic diagram of an exemplary system in which the various methods described herein may be implemented according to embodiments of the present disclosure is shown;
[0014] Figure 2 A flowchart of a data processing method based on a large model according to an embodiment of the present disclosure is shown;
[0015] Figure 3 A schematic diagram of a content outline generation interface according to an embodiment of the present disclosure is shown;
[0016] Figure 4 A schematic diagram of a content outline modification interface according to an embodiment of the present disclosure is shown;
[0017] Figure 5 A structural block diagram of a large-model-based data processing apparatus according to embodiments of the present disclosure is shown; and
[0018] Figure 6 A structural block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation
[0019] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0020] In this disclosure, unless otherwise stated, the use of terms such as "first," "second," etc., to describe various elements is not intended to limit the positional, temporal, or importance relationships of these elements; such terms are merely used to distinguish one element from another. In some examples, the first element and the second element may refer to the same instance of that element, while in other cases, based on the context, they may refer to different instances.
[0021] The terminology used in the description of the various examples described in this disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context explicitly indicates otherwise, an element may be one or more unless the number of elements is specifically limited. Furthermore, the term "and / or" as used in this disclosure covers any one of the listed items and all possible combinations thereof.
[0022] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.
[0023] Figure 1 A schematic diagram of an exemplary system 100 in which the various methods and apparatus described herein can be implemented according to embodiments of this disclosure is shown. Reference Figure 1The 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 can be configured to execute one or more applications.
[0024] In embodiments of this disclosure, server 120 may run one or more services or software applications that enable the execution of data processing methods based on large models.
[0025] In some embodiments, server 120 may also provide other services or software applications, which may include non-virtual and virtual environments. In some embodiments, these services may be provided as web-based services or cloud services, such as to users of client devices 101, 102, 103, 104, 105, and / or 106 under a Software as a Service (SaaS) model.
[0026] exist Figure 1 In the configuration shown, server 120 may include one or more components that implement the functions performed by server 120. These components may include software components, hardware components, or combinations thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 can sequentially interact with server 120 using one or more client applications to utilize the services provided by these components. It should be understood that various different system configurations are possible and may differ from system 100. Therefore, Figure 1 This is an example of a system used to implement the various methods described herein, and is not intended to be limiting.
[0027] Users can use client devices 101, 102, 103, 104, 105, and / or 106 to receive content outlines and obtain responses. The client devices can provide an interface that allows users to interact with them. The client devices can also output information to the user through this interface. Although... Figure 1 Only six client devices are described, but those skilled in the art will understand that this disclosure can support any number of client devices.
[0028] 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 laptops), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors, or other sensing devices. These computer devices can 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 (such as Google Chrome OS); or include various mobile operating systems, such as Microsoft Windows Mobile OS, iOS, Windows Phone, and Android. Portable handheld devices may include cellular phones, smartphones, tablets, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Gaming systems may include various handheld gaming devices, internet-enabled gaming devices, etc. Client devices are capable of executing various applications, such as various internet-related applications, communication applications (such as email applications), short message service (SMS) applications, and can use various communication protocols.
[0029] Network 110 can be any type of network well known to those skilled in the art, and can use any of a variety of available protocols (including but not limited to TCP / IP, SNA, IPX, etc.) to support data communication. By way of example only, one or more networks 110 can be a local area network (LAN), an Ethernet-based network, a token ring network, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a blockchain network, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.
[0030] Server 120 may include one or more general-purpose computers, special-purpose 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 a virtual operating system, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that can be virtualized to maintain virtual storage devices for servers). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.
[0031] The computing unit in server 120 can run one or more operating systems, including any of the aforementioned operating systems and any commercially available server operating system. Server 120 can also run any of a variety of additional server applications and / or middleware applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.
[0032] In some implementations, server 120 may include one or more applications to analyze and merge data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and 106. Server 120 may also include one or more applications to display data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.
[0033] In some implementations, server 120 can be a server for a distributed system or a server integrated with blockchain. Server 120 can 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 the cloud computing service system, designed to address the shortcomings of traditional physical hosts and Virtual Private Server (VPS) services, such as high management difficulty and weak business scalability.
[0034] 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 content outlines, reply content, etc. Databases 130 may reside in various locations. For example, a database used by server 120 may be local to server 120, or it may be located remotely to server 120 and may communicate with server 120 via a network-based or dedicated connection. Databases 130 may be of different types. In some embodiments, the database used by server 120 may be, for example, a relational database. One or more of these databases may store, update, and retrieve data from and from the databases in response to commands.
[0035] In some embodiments, one or more of the databases 130 may also be used by an application to store application data. The databases used by the application may be of different types, such as key-value stores, object stores, or regular stores supported by a file system.
[0036] Figure 1The system 100 can be configured and operated in various ways to enable the application of the various methods and apparatus described in this disclosure.
[0037] For example, many existing AI writing products may encounter performance bottlenecks when generating long texts based on large language models, such as slow generation speed and frequent request timeouts due to network issues. These limitations affect user experience and content generation efficiency. Furthermore, because traditional AI writing products use a full return and page refresh mode, users experience long waiting times when generating long texts.
[0038] Therefore, embodiments of this disclosure provide a data processing method based on a large model. Figure 2 A flowchart of a large-model-based data processing method according to an embodiment of the present disclosure is shown, such as... Figure 2 As shown, method 200 includes: in response to receiving first instruction information, generating a content outline based on the first instruction information, wherein the content outline includes a plurality of sequentially arranged titles, wherein the content outline is used to generate response content to the instruction information (step 210); obtaining response content paragraphs corresponding to each of the plurality of titles by concurrently calling at least one first large language model based on the plurality of titles (step 220); and arranging the obtained response content paragraphs corresponding to each of the plurality of titles in the order to obtain the response content (step 230).
[0039] According to embodiments of this disclosure, by concurrently calling a large model and sequentially outputting multiple text segments, the user waiting time when generating long texts is shortened, the efficiency of outputting accurate responses is improved, and thus the user experience is enhanced.
[0040] In embodiments according to this disclosure, parallel invocation operations can be implemented using MCP technology. The MCP (Multi-Chunk Processing) parallel processing architecture provides functions such as parallel processing, batch operations, monitoring, and exception handling. For example, the MCP Server is responsible for providing various external tools and services, such as database queries, API calls, and data scraping. MCP supports a dynamic tool discovery mechanism, enabling agents to flexibly obtain a list of available tools at runtime. By providing a unified interface standard for agents, MCP allows agents to easily invoke different tools and services according to task requirements, thereby achieving seamless integration with external tools and services. When an agent needs to perform a specific task, it only needs to send a request to the MCP Server through the MCP protocol to invoke the corresponding tool or service to complete the task.
[0041] According to embodiments of this disclosure, the first instruction information may refer to a content generation request input by the user, such as a requirement to write a report; the content outline may be a structured framework information generated based on the request, which may include multiple headings.
[0042] In some embodiments, the multiple headings included in the content outline can be logical breakdowns of the response content, used to transform complex requirements into step-by-step processing units. The generation method can be to output an ordered sequence of headings (i.e., multiple headings arranged in sequence) after parsing the instruction information. In some examples, these ordered headings can be the smallest heading in the content outline (e.g., section 1.1.1), or a combination including the corresponding subheading and its corresponding parent heading (e.g., chapter title) (e.g., section 1-1.1-1.1.1).
[0043] In some embodiments, since the content corresponding to each title is relatively independent, the first large language model can be called concurrently based on the title and instruction, so that the paragraph corresponding to each title can be generated concurrently by the first large language model. Concurrency refers to the simultaneous execution of multiple tasks or processes within the same time. Through concurrent calls, the resources of the computer system can be fully utilized, improving the execution efficiency and response speed of the program. In the scenario of calling a large model, concurrent calls mean sending multiple requests to the large model at the same time, enabling the model to process these requests in parallel, thereby reducing the total processing time and improving the system throughput. Afterwards, the response content paragraphs corresponding to the multiple titles are concatenated according to the original order of the outline titles to ensure the logical coherence of the response content. For example, if the user instruction is "write an article on the development of artificial intelligence", an outline containing "Introduction", "Technological Progress", "Application Areas", and "Future Outlook" can be generated. Then, the model is called concurrently to generate the response content paragraphs corresponding to each title, and they are combined into a complete article in the above order.
[0044] Therefore, by processing responses in segments concurrently, the generation efficiency of long text-type responses is significantly improved, while ensuring the logical integrity of the responses and optimizing the user's waiting experience.
[0045] According to embodiments of this disclosure, the at least one first major language model is a plurality of first language models, and the plurality of first major language models correspond to at least two document types. Obtaining the response content paragraphs corresponding to each of the plurality of titles by concurrently calling at least one first major language model includes: determining the document type corresponding to each of the plurality of titles; and, based on the document type, obtaining the response content paragraphs corresponding to each of the plurality of titles by concurrently calling the first major language model corresponding to the document type.
[0046] In some embodiments, document type can refer to the category attribute of content, such as text (e.g., papers, reports), tables (e.g., statistics, reports), code (e.g., functions, modules), etc. Multiple primary language models can refer to multiple primary language models specifically trained for different document types, such as a primary language model adapted for text content, a primary language model adapted for table content, and a language model adapted for code content. Since different document types may require different specifications for generation—for example, text must conform to semantic coherence, while code must conform to grammatical rules—using different primary language models for different document types can more accurately match the generation requirements of the corresponding types. Specifically, semantic analysis of the title, such as identifying feature words in the title, can clarify its type, providing a basis for subsequently calling the appropriate model.
[0047] Therefore, concurrently calling the corresponding primary language model based on document type can shorten the overall processing time. At the same time, calling the model that matches the type also ensures the quality of each generated segment.
[0048] According to embodiments of this disclosure, obtaining the response content paragraphs corresponding to each of the plurality of titles by concurrently calling at least one first large language model based on the plurality of titles and the first instruction information includes: determining a first relevance between each of the plurality of titles and the first instruction information; and in response to determining that the first relevance corresponding to the plurality of titles is greater than a first preset threshold, obtaining the response content paragraphs corresponding to each of the plurality of titles by concurrently calling at least one first large language model based on the plurality of titles and the first instruction information.
[0049] According to some embodiments, the first relevance can be an indicator measuring the degree of semantic association between each title and the first instruction information. Its level can directly reflect whether the title closely meets the user's needs. The first preset threshold can be a pre-set relevance judgment standard used to quantitatively filter titles that meet the requirements. By determining the first relevance of each title to the first instruction information, it can be ensured that the title does not deviate from the user's content generation requirements, thereby avoiding invalid output. Specifically, the judgment of the first relevance can be achieved through semantic similarity analysis. Only when the first relevance of all titles is greater than the first preset threshold is at least one first large language model concurrently called to generate the corresponding paragraph. Thus, titles that deviate from the instructions can be excluded through pre-relevance verification, reducing resource waste.
[0050] Therefore, the pre-relevance verification ensures the consistency between the title and user needs, laying the foundation for the accuracy of subsequent content, while the concurrent calling of the large model improves the generation efficiency.
[0051] According to embodiments of this disclosure, determining the first relevance between each of the plurality of titles and the first instruction information includes: determining a first vector corresponding to the first instruction information and a second vector corresponding to each of the plurality of titles; and determining the first relevance between each of the plurality of titles and the first instruction information by similarity calculation based on the first vector and the second vector.
[0052] In some embodiments, the first vector can be a numerical representation obtained by semantically encoding the first instruction information, and the second vector can be a numerical representation obtained by semantically encoding each title. The process of determining the first and second vectors can be to convert text information into vectors through a semantic encoding model, so that the semantic features of the text are presented in numerical form, in order to measure the relevance. Since the text semantics corresponding to vectors that are closer in distance in the vector space are more similar, the first relevance can be determined based on vector similarity calculations, such as cosine similarity, Euclidean distance, etc.
[0053] Therefore, by using vectorized semantic representation and similarity calculation, the relevance between the title and the instruction can be accurately quantified, effectively ensuring that the title meets the user's needs.
[0054] According to embodiments of this disclosure, determining the first relevance between each of the plurality of titles and the first instruction information includes: determining the first relevance between each of the plurality of titles and the first instruction information using a second language model based on the plurality of titles and the first instruction information.
[0055] In some examples, the second major language model can be any one of at least one of the first major language models, or it can be a different model; there is no restriction on this. For example, the second major language model can be a language model specifically designed for semantic association analysis, distinct from the model used to generate response content, and it has the ability to determine the semantic matching degree between texts.
[0056] Therefore, by leveraging the professional semantic analysis capabilities of the second language model, accurate judgment of the relevance between the title and the instruction was achieved, effectively ensuring the title's relevance to user needs and providing a reliable prerequisite for the accuracy of subsequent content generation.
[0057] According to an embodiment of this disclosure, arranging the response content paragraphs corresponding to each of the plurality of titles in the order obtained to obtain the response content includes: for each of the plurality of titles, determining a second relevance between the title and its corresponding response content paragraph; and in response to determining that the second relevance corresponding to each title is greater than a second preset threshold, arranging the response content paragraphs corresponding to each of the plurality of titles in the order to form the response content.
[0058] In some embodiments, the second relevance can refer to the semantic connection between each title and its corresponding response content paragraph, used to measure whether the paragraph content closely adheres to the title's theme. The second preset threshold can be a pre-defined relevance criterion used to filter paragraph content that meets the theme requirements. Determining the second relevance ensures consistency between the response content paragraph and its corresponding title, preventing the response content paragraph from deviating from the title's theme and ensuring the overall logical coherence of the response content.
[0059] Specifically, this can be achieved through semantic similarity analysis, such as semantically encoding the titles and response paragraphs and calculating their matching degree in the vector space. Only when the second relevance of all response paragraphs to their corresponding titles is greater than a second preset threshold are the paragraphs arranged in their original title order to form the response content, thus eliminating off-topic paragraphs through post-verification. Arranging them in title order maintains the structure and logic of the response content, ensuring consistency with the content outline.
[0060] Therefore, by verifying the relevance between the paragraphs and the title in the response content, the thematic consistency and logical coherence of the response content are effectively ensured, thereby improving the quality of the final output content.
[0061] According to embodiments of this disclosure, arranging the response content paragraphs corresponding to each of the plurality of titles in the order obtained to obtain the response content includes: in response to determining that the second relevance corresponding to the target title is not greater than the second preset threshold, re-obtaining the response content paragraph corresponding to the target title by calling the at least one first language model, wherein the target title is at least one of the plurality of titles; determining the second relevance between the re-obtained response content paragraph and the target title; and in response to determining that the second relevance corresponding to the target title is greater than the second preset threshold, arranging the content paragraphs corresponding to each of the plurality of titles in the order to form candidate response content.
[0062] In some embodiments, the target title may refer to at least one title among multiple titles whose corresponding response content paragraph has a second relevance to itself that is not greater than a second preset threshold, i.e., a title whose paragraph content deviates from the title's theme. The second relevance may be the degree of semantic association between the title and the corresponding paragraph, and the second preset threshold may be a preset standard for determining whether the association meets the standard.
[0063] In some examples, when the second relevance of the target title does not meet the threshold, the corresponding response content paragraph can be retrieved by re-invoking the first language model, thereby correcting content that deviates from the topic and ensuring that the paragraphs of each title strictly adhere to their own topic. Specifically, when it is detected that the paragraph relevance of the target title does not meet the second preset threshold, the target title and the first instruction information can be re-input into the first language model to trigger a regeneration process to obtain new response content paragraphs; then, the second relevance between the new paragraphs and the target title can be recalculated until the relevance is greater than the second preset threshold, and then all paragraphs are arranged in the original order of the titles to form candidate response content.
[0064] Therefore, by iteratively correcting substandard paragraphs, the thematic relevance of each title's content was effectively ensured, and the accuracy and logic of the candidate responses were improved.
[0065] According to embodiments of this disclosure, obtaining the corresponding response content paragraphs for each of the plurality of titles by concurrently calling at least one first major language model based on the plurality of titles and the first instruction information includes: obtaining device parameter information of a display interface for displaying the response content; and obtaining the corresponding response content paragraphs for each of the plurality of titles by concurrently calling at least one first major language model based on the device parameter information, the plurality of titles, and the first instruction information, wherein the amount of content data corresponding to the response content paragraph is associated with the device parameter information.
[0066] In some embodiments, device parameter information may refer to the attribute data of the terminal device used to display the reply content, such as device type, client type, screen size, hardware environment parameters, etc. These parameters directly affect the display effect of the content and the user's reading experience. Content data volume may refer to the information carrying capacity of the reply content paragraphs, which can usually be reflected in the number of words, characters, etc., and its size is related to the device parameter information.
[0067] Understandably, users' tolerance for content data volume varies across different devices. For example, PC users typically have a higher tolerance for long texts, while mobile users, limited by screen size and other constraints, may have a lower tolerance. By obtaining device parameter information, the generated response content paragraphs can be adapted to the display characteristics of the terminal device, avoiding poor reading experiences caused by a mismatch between content data volume and device requirements. For instance, displaying overly long paragraphs on a mobile device requires frequent scrolling, while displaying overly short paragraphs on a PC results in fragmented information.
[0068] Therefore, by adjusting the amount of content data based on device parameters, precise adaptation between the response content and the display terminal was achieved, significantly improving the user reading experience on different devices while maintaining the high efficiency of content generation.
[0069] According to an embodiment of this disclosure, the first instruction information includes second instruction information and third instruction information. In response to receiving the first instruction information, generating a content outline based on the first instruction information includes: in response to receiving the second instruction information, determining the topic corresponding to the response content to be generated based on the second instruction information; obtaining recommendation information determined based on the topic; and in response to receiving the third instruction information, generating the content outline using a third major language model based on the recommendation information and the third instruction information. The recommendation information and the third instruction information are both used to guide the at least one first major language model to generate the response content.
[0070] In some embodiments, the first instruction information includes second and third instruction information. For example, the second instruction information can be used to indicate the macro-level direction or topic of the user's intent, such as "write an article on the ethics of artificial intelligence." In response to the second instruction information, the instruction content can first be semantically parsed to identify the topic direction of the response content to be generated, such as essays, plans, reports, schemes, summaries, reflections, etc. Then, based on this topic, relevant recommendation information can be extracted from a knowledge base, historical data, or other recommendation mechanisms. Recommendation information can be understood as contextual material that assists in content generation, including but not limited to background information, keyword suggestions, structural templates, or style hints. The third instruction information can be a further refined user input, such as specific requirements for the article structure, the choice of tone and style, or the emphasis on specific paragraphs. In response to this third instruction information, the aforementioned determined topic and recommendation information can be combined as input to guide the third language model to generate a content outline, which in turn guides the first language model to generate the response content.
[0071] Therefore, this approach breaks down complex user needs into multi-stage interactive instructions, enabling large models to reason and generate in a more explicit and structured context, thereby improving the relevance, accuracy, and editability of the output content.
[0072] According to embodiments of this disclosure, at least one of the second instruction information, the recommendation information, and the third instruction information includes word count information of the generated reply content, and wherein generating a content outline based on the first instruction information includes: generating a content outline based on the first instruction information in response to determining that the word count information is greater than a third preset threshold.
[0073] In some embodiments, upon receiving the instruction information, the word count requirement contained therein can be compared with a preset threshold. The preset threshold can be set according to different application scenarios; for example, it may be set to within 1500 words for a short blog post, while it may be more than 5000 words for a detailed research report. If the word count exceeds the preset threshold, the content outline generation process can be initiated to generate a corresponding content outline based on the first instruction information.
[0074] Therefore, through the above embodiments, content outlines are only generated when it is necessary to generate response content such as long texts. This not only significantly improves the generation efficiency of response content such as long texts, but also significantly saves computing resources when it is not necessary to generate response content such as long texts, thus ensuring the generation efficiency of response content of various lengths.
[0075] According to an embodiment of this disclosure, obtaining the corresponding response content paragraphs for each of the plurality of titles by concurrently calling at least one first major language model based on the plurality of titles and the first instruction information includes: in response to receiving a confirmation instruction for the content outline, obtaining the corresponding response content paragraphs for each of the plurality of titles by concurrently calling at least one first major language model based on the plurality of titles and the first instruction information.
[0076] In some embodiments, the confirmation instruction can be an interactive instruction that indicates the user's approval of the outline information, signifying that the user has no objection to the overall framework of the content. By introducing the confirmation instruction as a trigger condition for concurrently calling the first major language model, it can be ensured that the subsequently generated response content paragraphs are based on the framework approved by the user, avoiding invalid subsequent content generation due to the outline not meeting user expectations, and reducing resource waste. Specifically, the generated content outline can be presented to the user first, pending the user's confirmation instruction. For example, after clicking the relevant button, based on multiple titles in the content outline and the first instruction information, at least one first major language model can be concurrently called to generate response content paragraphs corresponding to each title.
[0077] Therefore, by introducing a user interaction verification process, the logical starting point of content generation is highly matched with user needs, ensuring the effectiveness of the content generation framework and improving the efficiency of the overall process and user satisfaction.
[0078] In the above embodiment that includes the operation of determining the first relevance between multiple titles and the first instruction information, for example, after the first relevance detection is passed, the content outline including the multiple titles can be displayed via a display interface, and after receiving the user's confirmation instruction for the displayed content outline, at least one first large language model can be called concurrently to obtain the response content paragraphs corresponding to each of the multiple titles.
[0079] In some examples, Figure 3 A schematic diagram of a content outline generation interface according to an embodiment of the present disclosure is shown. For example... Figure 3 As shown, the generated outline is displayed in area 310. Users can confirm the outline information by clicking the "Generate Article" button 320.
[0080] According to embodiments of this disclosure, obtaining the response content paragraphs corresponding to each of the plurality of titles by concurrently calling at least one first major language model based on the plurality of titles and the first instruction information includes: in response to receiving a modification instruction for the content outline, modifying the content outline based on the modification instruction to obtain a modified content outline; and in response to receiving a confirmation instruction for the modified content outline, obtaining the response content paragraphs corresponding to each of the plurality of titles by concurrently calling at least one first major language model based on the plurality of titles and the first instruction information.
[0081] In some embodiments, a modification instruction can refer to an adjustment instruction issued by the user when they are dissatisfied with the initially generated content outline, such as adding or removing titles, adjusting the order of titles, or modifying the content of titles. A confirmation instruction can be an instruction from the user indicating their approval of the modified content outline. After the modified content outline is confirmed, at least one first major language model can be concurrently invoked to generate corresponding response content paragraphs based on multiple titles in the modified content outline and the first instruction information.
[0082] Therefore, by receiving modification instructions and modifying the content outline accordingly, the content framework can be optimized through user interaction, making the outline more in line with the user's personalized needs and avoiding the subsequent content generation deviating from expectations due to an unreasonable initial outline.
[0083] In some examples, Figure 4 A schematic diagram of a content outline modification interface according to an embodiment of this disclosure is shown. Figure 4 As shown, the generated content outline is displayed in area 310. Users can access it by clicking on a title, such as... Figure 4 The heading "1.1 Target Market Positioning" (430) allows you to select and modify it. After modification, you can confirm the content outline by clicking the "Generate Article" button (320).
[0084] According to an embodiment of this disclosure, arranging the response content paragraphs corresponding to each of the multiple titles in the order obtained to obtain the response content includes: arranging the response content paragraphs corresponding to each of the multiple titles in the order obtained to obtain candidate response content; and fine-tuning the candidate response content using a fourth language model to obtain the response content used to generate the response to the instruction information, wherein the fine-tuned response content has semantic coherence.
[0085] In some embodiments, candidate response content may refer to the preliminary overall content formed by arranging the response content paragraphs corresponding to multiple titles in sequence. When the response content includes text, semantic coherence may refer to, for example, the natural logical connection and consistent expression between paragraphs in the text, without abruptness or discontinuity.
[0086] Because the paragraphs in the response content are generated in parallel, there may be issues such as abrupt transitions between paragraphs and inconsistent terminology. Therefore, fine-tuning can be performed using a large language model. During the fine-tuning process, the large language model can correct the expressions at paragraph transitions based on its understanding of the overall context. For example, it can add transition sentences, standardize the use of technical terms, and adjust the logical order of sentences to enhance overall coherence.
[0087] Therefore, based on the aforementioned large language model, while maintaining the efficiency of segmented parallel generation, the overall semantic coherence of the response content is effectively improved, and the quality of the response content is optimized.
[0088] In some embodiments according to this disclosure, each step (including its sub-steps) in steps 210-230 described above can be processed in parallel, and there is no limitation herein.
[0089] Generating responses, such as those containing text paragraphs, using a large model is a computationally intensive task. Parallel calls allow multiple computational tasks (generating different paragraphs) to execute simultaneously on different computing resources (GPUs / TPUs / model instances), fully utilizing the system's computing power. When there is a response latency in the network or the model itself, the parallel approach allows processing other paragraph generation requests while waiting for one paragraph to return, instead of waiting idly. In this case, the user ultimately waits for the last returned paragraph result, not the sum of all paragraph results returned sequentially. As long as the paragraph generation times are not completely synchronous, the total time is much shorter than the serial approach. Thus, by concurrently calling the large model and outputting multiple text segments sequentially, the user's waiting time is shortened when generating long texts, improving the efficiency of outputting accurate responses and thus enhancing the user experience.
[0090] In this disclosure, the first, second, third, and fourth major language models can be the same model or different models, and no restriction is placed here.
[0091] According to embodiments of this disclosure, such as Figure 5 As shown, a data processing device 500 based on a large model is also provided, including: a content outline generation module 510, configured to generate a content outline based on the first instruction information in response to receiving the first instruction information, wherein the content outline includes a plurality of sequentially arranged titles, wherein the content outline is used to generate response content to the instruction information; a response content paragraph generation module 520, configured to obtain response content paragraphs corresponding to each of the plurality of titles by concurrently calling at least one first large language model based on the plurality of titles and the first instruction information; and a response content generation module 530, configured to arrange the obtained response content paragraphs corresponding to each of the plurality of titles in the order provided to obtain the response content.
[0092] Here, the operation of each of the above units 510 to 530 of the data processing device 500 based on the large model is similar to the operation of steps 210 to 230 described above, and will not be repeated here.
[0093] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0094] According to embodiments of this disclosure, an electronic device, a readable storage medium, and a computer program product are also provided.
[0095] refer to Figure 6 The present invention describes a structural block diagram of an electronic device 600 that can serve as a server or client of the present disclosure, 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, workstations, 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 processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0096] like Figure 6As shown, the electronic device 600 includes a computing unit 601, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. The RAM 603 may also store various programs and data required for the operation of the electronic device 600. The computing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0097] Multiple components in electronic device 600 are connected to I / O interface 605, including: input unit 606, output unit 607, storage unit 608, and communication unit 609. Input unit 606 can be any type of device capable of inputting information to electronic device 600. Input unit 606 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device, and can include, but is not limited to, a mouse, keyboard, touchscreen, trackpad, trackball, joystick, microphone, and / or remote control. Output unit 607 can be any type of device capable of presenting information, and can include, but is not limited to, a monitor, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 608 can include, but is not limited to, disk and optical disk. Communication unit 609 allows electronic device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and can include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth devices, 802.11 devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.
[0098] The computing unit 601 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as method 200. For example, in some embodiments, method 200 may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of method 200 described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform method 200 by any other suitable means (e.g., by means of firmware).
[0099] Various embodiments 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-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0100] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0101] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0102] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, 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 sound input, voice input, or tactile input).
[0103] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), the Internet, and blockchain networks.
[0104] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0105] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0106] While embodiments or examples of this disclosure have been described with reference to the accompanying drawings, it should be understood that the methods, systems, and devices described above are merely exemplary embodiments or examples, and the scope of the invention is not limited by these embodiments or examples, but only by the granted claims and their equivalents. Various elements in the embodiments or examples may be omitted or replaced by their equivalents. Furthermore, the steps may be performed in a different order than that described in this disclosure. Further, various elements in the embodiments or examples may be combined in various ways. Importantly, as the technology evolves, many elements described herein can be replaced by equivalents that appear after this disclosure.
Claims
1. A data processing method based on a large model, comprising: In response to receiving a first instruction message, a content outline is generated based on the first instruction message, wherein the content outline includes multiple headings arranged in sequence, and the content outline is used to generate response content to the instruction message; Based on the multiple titles and the first instruction information, the response content paragraphs corresponding to each of the multiple titles are obtained by concurrently calling at least one first large language model; and The obtained response content paragraphs corresponding to each of the multiple titles are arranged in the order described above to obtain the response content.
2. The method as described in claim 1, wherein, The at least one first major language model can be multiple first major language models, and the multiple first major language models correspond to at least two document types. The process of obtaining the response content paragraphs corresponding to each of the multiple titles by concurrently calling at least one primary language model includes: Determine the document type corresponding to each of the multiple headings; and Based on the document type, the response content paragraphs corresponding to each of the multiple titles are obtained by concurrently calling the first major language model corresponding to the document type.
3. The method as described in claim 1, wherein, Based on the multiple titles and the first instruction information, the response content paragraphs corresponding to each of the multiple titles are obtained by concurrently calling at least one first large language model, including: Determine a first relevance between each of the plurality of headings and the first instruction information; and In response to determining that the first relevance corresponding to the plurality of titles is greater than a first preset threshold, based on the plurality of titles and the first instruction information, the response content paragraphs corresponding to each of the plurality of titles are obtained by concurrently calling at least one first large language model.
4. The method of claim 3, wherein, Determining the first relevance between each of the plurality of headings and the first instruction information includes: Determine the first vector corresponding to the first instruction information, and the second vector corresponding to each of the plurality of titles; and Based on the first vector and the second vector, a first relevance between each of the plurality of titles and the first instruction information is determined by similarity calculation.
5. The method of claim 3, wherein, Determining the first relevance between each of the plurality of headings and the first instruction information includes: Based on the plurality of titles and the first instruction information, a first correlation between each of the plurality of titles and the first instruction information is determined using a second language model.
6. The method as described in claim 1 or 3, wherein, The obtained response content paragraphs corresponding to each of the multiple titles are arranged in the specified order to obtain the response content, which includes: For each of the plurality of headings, determine a second relevance between that heading and its corresponding response content paragraph; and In response to determining that the second relevance corresponding to each title is greater than the second preset threshold, the paragraphs of the response content corresponding to each of the plurality of titles are arranged in the order to form the response content.
7. The method as described in claim 6, wherein, The obtained response content paragraphs corresponding to each of the multiple titles are arranged in the specified order to obtain the response content, which includes: In response to determining that the second relevance corresponding to the target title is not greater than the second preset threshold, the response content paragraph corresponding to the target title is obtained again by calling the at least one first language model, wherein the target title is at least one of the plurality of titles; Determine the second relevance between the re-acquired response content paragraph and the target title; and In response to determining that the second relevance corresponding to the target title is greater than the second preset threshold, the content paragraphs corresponding to each of the plurality of titles are arranged in the order to form candidate response content.
8. The method as described in claim 1 or 3, wherein, Based on the multiple titles and the first instruction information, the response content paragraphs corresponding to each of the multiple titles are obtained by concurrently calling at least one first large language model, including: Obtain device parameter information for the display interface used to display the reply content; and Based on the device parameter information, the multiple titles, and the first instruction information, the response content paragraphs corresponding to each of the multiple titles are obtained by concurrently calling at least one first large language model, wherein the amount of content data corresponding to the response content paragraph is associated with the device parameter information.
9. The method of claim 1, wherein, The first instruction information includes second instruction information and third instruction information, wherein, in response to receiving the first instruction information, generating a content outline based on the first instruction information includes: In response to receiving the second instruction information, the topic corresponding to the response content to be generated is determined based on the second instruction information; Obtain recommendation information determined based on the topic; and In response to receiving the third instruction information, the content outline is generated using a third major language model based on the recommendation information and the third instruction information, wherein the recommendation information and the third instruction information are both used to guide the at least one first major language model to generate the response content.
10. The method of claim 9, wherein, At least one of the second instruction information, the recommendation information, and the third instruction information includes word count information of the generated reply content, and wherein generating a content outline based on the first instruction information includes: In response to determining that the number of words is greater than a third preset threshold, a content outline is generated based on the first instruction information.
11. The method as claimed in claim 1 or 3, wherein, Based on the multiple titles and the first instruction information, the response content paragraphs corresponding to each of the multiple titles are obtained by concurrently calling at least one first large language model, including: In response to receiving a confirmation instruction for the content outline, based on the plurality of titles and the first instruction information, the system obtains the corresponding response content paragraphs for each of the plurality of titles by concurrently calling at least one first major language model.
12. The method of claim 11, wherein, Based on the multiple titles and the first instruction information, the response content paragraphs corresponding to each of the multiple titles are obtained by concurrently calling at least one first large language model, including: In response to receiving a modification instruction for the content outline, the outline information is modified based on the modification instruction to obtain a modified content outline; In response to receiving a confirmation instruction for the modified content outline, based on the multiple titles and the first instruction information, the system obtains the corresponding response content paragraphs for each of the multiple titles by concurrently calling at least one first major language model.
13. The method of claim 1, wherein, The obtained response content paragraphs corresponding to each of the multiple titles are arranged in the aforementioned order to obtain the response content, which includes: The obtained response content paragraphs corresponding to each of the multiple titles are arranged in the specified order to obtain candidate response content; and The candidate response content is fine-tuned using a fourth language model to obtain the response content used to generate the response to the instruction information, wherein the fine-tuned response content has semantic coherence.
14. A data processing apparatus based on a large model, comprising: The content outline generation module is configured to generate a content outline based on the first instruction information in response to receiving the first instruction information, wherein the content outline includes multiple titles arranged in sequence, and the content outline is used to generate reply content to the instruction information; The response content paragraph generation module is configured to obtain the response content paragraphs corresponding to each of the multiple titles by concurrently calling at least one first large language model, based on the multiple titles and the first instruction information; and The response content generation module is configured to arrange the response content paragraphs corresponding to the multiple obtained titles in the order specified, so as to obtain the response content.
15. An electronic device comprising: At least one processor; as well as A memory that is communicatively connected to the at least one processor; in The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-13.
16. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-13.
17. A computer program product comprising a computer program, wherein, When the computer program is executed by a processor, it implements the method of any one of claims 1-13.
Citation Information
Patent Citations
Powerpoint content generation method and device, electronic equipment and storage medium
CN117951290A
Long text generation method and device, electronic equipment and storage medium
CN119886064A
Systems and methods for orchestration of parallel generative artificial intelligence pipelines
US12039263B1
Comparing document contents using a constructed topic model
US20150310096A1