Information interaction method and device, electronic equipment and medium

By binding multiple information interaction engines and context threads in the information interaction system, request-level resource isolation and dynamic circuit breaking are achieved, which solves the problem of wasted computing resources and improves computing resource utilization and response speed.

CN121116612APending Publication Date: 2025-12-12SHENZHEN STARCAM TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511226968.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-29
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

Existing technologies for information interaction based on AIGC suffer from wasted computing resources, especially in high-concurrency scenarios where redundant computing leads to a decrease in service carrying capacity.

Method used

By launching multiple information interaction engines and binding them to their respective context threads, request-level resource isolation is achieved. Information push strategies are generated based on processing results, triggering dynamic circuit breakers and using interactive content on demand to avoid unnecessary resource consumption.

Benefits of technology

It reduces the waste of computing resources, improves the utilization rate of computing resources, and ensures response speed and stability in high-concurrency scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121116612A_ABST
    Figure CN121116612A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an information interaction method and device, electronic equipment and a storage medium, and the method comprises the steps: starting a plurality of information interaction engines corresponding to an information interaction request and context threads corresponding to the information interaction engines when the information interaction request is received; based on the context thread corresponding to each information interaction engine, processing the information interaction request; obtaining a processing result of each information interaction engine from the context thread, and generating an information pushing strategy based on the processing result of each information interaction engine; according to the information pushing strategy and the interaction content corresponding to each information interaction engine, outputting the target interaction information, and according to the scheme, the waste of computing resources can be reduced, and the utilization rate of the computing resources can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, specifically to an information interaction method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the rapid development of AI-generated content (AIGC) technology, high-concurrency, low-latency demand scenarios such as real-time dialogue systems and online AI services are becoming increasingly common, and users are placing higher demands on the response speed and stability of AIGC services.

[0003] Currently, when exchanging information based on AIGC, the entire engine is activated and the entire process is executed regardless of whether the user request requires internet access or complex calculations. For example, for simple common-sense requests such as "What does 1+1 equal?" that do not require internet access, the tool model is still activated to attempt an internet query, resulting in unnecessary consumption of CPU, memory, and network resources. In high-concurrency scenarios (such as QPS = 5000), redundant calculations lead to a surge in resource consumption and a significant decrease in service capacity. In other words, the current information exchange method wastes computing resources. Summary of the Invention

[0004] This application provides an information interaction method, electronic device, apparatus, and storage medium that can reduce computing resource waste and improve computing resource utilization.

[0005] In a first aspect, embodiments of this application provide an information interaction method, including:

[0006] When an information interaction request is received, multiple information interaction engines corresponding to the information interaction request and the context thread corresponding to each information interaction engine are started.

[0007] The information interaction request is processed based on the context thread corresponding to each information interaction engine.

[0008] The processing results of each information interaction engine are obtained from the context thread, and an information push strategy is generated based on the processing results of each information interaction engine.

[0009] Based on the information push strategy and the corresponding interaction content of each information interaction engine, the target interaction information is output.

[0010] Optionally, in some embodiments of this application, the step of obtaining the processing results of each information interaction engine from the context thread and generating an information push strategy based on the processing results of each information interaction engine includes:

[0011] The processing results of each information interaction engine are obtained from the context thread through a preset statement structure;

[0012] Analyze the processing results of the intent information interaction engine;

[0013] Based on the analysis results and the processing results of each information interaction engine, an information push strategy is generated.

[0014] Optionally, in some embodiments of this application, generating an information push strategy based on the analysis results and the processing results of each information interaction engine includes:

[0015] Based on the analysis results, the network status corresponding to the information interaction request is determined;

[0016] If the network status is connected, the output order of the processing results of each information interaction engine is determined, and an information push strategy is generated based on the output order and the processing results of each information interaction engine.

[0017] If the network status is offline, the networked information interaction engine is disconnected, and an information push strategy is generated based on the processing result of the offline information interaction engine.

[0018] Optionally, in some embodiments of this application, the step of outputting target interaction information according to the information push strategy and the interaction content corresponding to each information interaction engine includes:

[0019] According to the information push strategy, the interactive content to be pushed and the push order are determined from the interactive content corresponding to each information interaction engine.

[0020] Based on the push order, the target interaction information is output by integrating the interactive content to be pushed.

[0021] Optionally, in some embodiments of this application, the step of integrating the interactive content to be pushed based on the push order and outputting target interaction information includes:

[0022] The streaming stitching engine is invoked to merge the interactive content to be pushed according to the push order to obtain the target interactive information;

[0023] The target interaction information is read through the forwarding function and written to the output channel.

[0024] Optionally, in some embodiments of this application, the step of activating multiple information interaction engines corresponding to the information interaction request and the context thread corresponding to each information interaction engine when an information interaction request is received includes:

[0025] When an information interaction request is received, the management controller is activated to create multiple information interaction engines;

[0026] Bind the context thread corresponding to the information interaction request in each information interaction engine.

[0027] Optionally, in some embodiments of this application, binding the context thread corresponding to the information interaction request in each information interaction engine includes:

[0028] In each information interaction engine, a context thread corresponding to the information interaction request is created, and a request identifier corresponding to the information interaction request is added to the created context thread.

[0029] Secondly, embodiments of this application provide an information interaction device, including:

[0030] The startup module is used to start multiple information interaction engines corresponding to the information interaction request and the context thread corresponding to each information interaction engine when an information interaction request is received.

[0031] The processing module is used to process the information interaction request based on the context thread corresponding to each information interaction engine;

[0032] The generation module is used to obtain the processing results of each information interaction engine from the context thread, and generate an information push strategy based on the processing results of each information interaction engine.

[0033] The output module is used to output target interactive information based on the information push strategy and the interactive content corresponding to each information interaction engine.

[0034] Accordingly, this application also provides an electronic device, including a memory, a processor, and a processor program stored in the memory and executable on the processor, wherein the processor executes the program as described in any of the methods above.

[0035] This application also provides a storage medium storing a processor program that, when executed by a processor, implements any of the methods described above.

[0036] This application provides an information interaction method, apparatus, electronic device, and storage medium. When an information interaction request is received, multiple information interaction engines corresponding to the request and their corresponding context threads are activated. Then, the information interaction request is processed based on the context threads of each information interaction engine. Next, the processing results of each information interaction engine are obtained from the context threads, and an information push strategy is generated based on these results. Finally, the target interaction information is output according to the information push strategy and the interaction content corresponding to each information interaction engine. In the information interaction scheme provided in this application, request-level resource isolation is achieved by binding multiple information interaction engines to their corresponding context threads. An information push strategy is generated based on the processing results of each information interaction engine, triggering dynamic circuit breaking. Finally, the interaction content corresponding to each information interaction engine is used as needed according to the information push strategy, avoiding invalid resource occupation and thus solving the problem of resource waste. This reduces computational resource waste and improves computational resource utilization. Attached Figure Description

[0037] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0038] Figure 1 This is a flowchart illustrating the information interaction method provided in an embodiment of this application;

[0039] Figure 2 This is a schematic diagram of the structure of the information interaction device provided in the embodiments of this application;

[0040] Figure 3 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0041] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0042] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, components, features, and elements with the same names in different embodiments of this application may have the same meaning or different meanings, the specific meaning of which must be determined by its interpretation in that specific embodiment or further in conjunction with the context of that specific embodiment.

[0043] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0044] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.

[0045] The following describes in detail the embodiments involved in this application. It should be noted that the order of description of the embodiments in this application is not intended to limit the priority of the embodiments.

[0046] This application provides an information interaction method, apparatus, storage medium, and smart terminal. Specifically, the information interaction method of this application can be executed by a smart terminal or a server, wherein the smart terminal can be a terminal. The terminal can be a smartphone, tablet computer, laptop computer, touch screen, game console, personal computer (PC), personal digital assistant (PDA), or other smart terminal. The terminal may also include a client, which can be a media playback client or an instant messaging client, etc.

[0047] This application provides an information interaction method, which can be executed by an electronic device or a server. This application example illustrates the information interaction method executed by an electronic device. The electronic device includes a touchscreen display and a processor. The touchscreen display is used to present a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. When the user operates the GUI through the touchscreen display, the GUI can control the local content of the electronic device in response to the received operation commands, or it can control the content on the server side in response to the received operation commands.

[0048] The information interaction scheme provided in this application achieves request-level resource isolation by binding multiple information interaction engines to the context threads corresponding to each information interaction engine. Then, it generates an information push strategy based on the processing results of each information interaction engine, triggers dynamic circuit breaking, and finally uses the interaction content corresponding to each information interaction engine as needed according to the information push strategy, avoiding invalid resource occupation and thus solving the problem of resource waste. As a result, it can reduce computing resource waste and improve computing resource utilization.

[0049] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the priority of the embodiments.

[0050] An information interaction method includes: when an information interaction request is received, starting multiple information interaction engines corresponding to the information interaction request and context threads corresponding to each information interaction engine; processing the information interaction request based on the context threads corresponding to each information interaction engine; obtaining the processing results of each information interaction engine from the context threads; generating an information push strategy based on the processing results of each information interaction engine; and outputting target interaction information according to the information push strategy and the interaction content corresponding to each information interaction engine.

[0051] Please see Figure 1 , Figure 1 This application provides a flowchart illustrating the information interaction method. The specific flow of this information interaction method is as follows:

[0052] 101. When an information interaction request is received, start the multiple information interaction engines corresponding to the information interaction request and the context thread corresponding to each information interaction engine.

[0053] Information interaction requests refer to AIGC-related needs initiated by users and requiring system processing, such as real-time dialogue queries and online service commands (e.g., "query real-time weather" or "generate common-sense answers"). The information interaction engine is the core functional module responsible for handling information interaction requests in the system. In this application, each information interaction engine undertakes different tasks. The context thread is an independent resource-isolated environment created by the system for each information interaction engine, injected with a unique identifier (such as KeyModelType) and metadata through Golang's context.WithValue function. Its core function is to achieve "request-level resource isolation," ensuring that parameters do not interfere with each other when each engine processes the same request.

[0054] For example, after an information interaction request (such as a user's real-time dialogue query or online AI service command) is received by the system, it is first passed to the output management controller. This controller, as the process entry point, is responsible for initiating the subsequent creation process of multiple engines and context threads, ensuring the orderly triggering of request processing. Then, the context injection module is called to create a dedicated context thread for each information interaction engine. Next, based on Golang's goroutine mechanism, multiple information interaction engines are started concurrently. Finally, a dedicated result output channel is configured for each engine, associating the context thread with engine execution.

[0055] Optionally, in some embodiments of this application, the step "when an information interaction request is received, start multiple information interaction engines corresponding to the information interaction request and the context thread corresponding to each information interaction engine" may specifically include:

[0056] When an information interaction request is received, the management controller is activated to create multiple information interaction engines;

[0057] Bind the context thread corresponding to the information interaction request in each information interaction engine.

[0058] When the system receives an information interaction request initiated by a user (such as a real-time dialogue query or an online AI service instruction), the request is first passed to the management controller, which serves as the entry point for the process and triggers the creation and startup of subsequent multi-information interaction engines.

[0059] Optionally, in some embodiments of this application, the management controller synchronously creates three core information interaction engines—an intent model (M1), a lightweight model (M2), and a tool model (M3)—based on a preset three-engine architecture. Each engine undertakes the tasks of intent analysis, lightweight response generation, and execution of complex operations (such as networking), and concurrent startup is achieved through Golang's goroutine mechanism. Then, the management controller triggers the context injection module, which generates an independent context (i.e., the context thread corresponding to the information interaction request) for each created information interaction engine (M1, M2, M3) through Golang's context.WithValue function, and injects a unique identifier and metadata.

[0060] Optionally, in some embodiments of this application, the step "binding the context thread corresponding to the information interaction request in each information interaction engine" may specifically include:

[0061] Create a context thread corresponding to the information interaction request in each information interaction engine, and add the request identifier corresponding to the information interaction request to the created context thread.

[0062] For example, specifically, the context injection module uses Golang's `context.WithValue` function to create independent context threads for M1, M2, and M3. During creation, `KeyModelType` is used as the core key-value pair to inject an engine type identifier into each context thread, thus binding it to the corresponding information interaction engine, as follows:

[0063] When creating a context thread for M1, inject the KeyModelType key value and the identifier model_type="intent" to clearly identify it as the context corresponding to the intent analysis engine;

[0064] When creating a context thread for M2, inject the KeyModelType key value and the identifier model_type="small", and attach metadata with search_flag=false (indicating no network connection is required), clearly defining it as the context corresponding to the lightweight response engine;

[0065] When creating a context thread for M3, inject the KeyModelType key value and the identifier model_type="tool" to clearly identify it as the context corresponding to a tool-type engine.

[0066] The `model_type` (e.g., "intent", "small", "tool") and additional metadata (e.g., `search_flag`) injected via `context.WithValue` together constitute the request identifier corresponding to the information interaction request. These identifiers are strongly associated with the current request. For example, `search_flag = false` directly corresponds to the processing requirement of a "no network connection required" type request. `model_type` corresponds to the processing role of the request in different engines, ensuring that each engine processes the corresponding task only based on the request identifier in its own context thread, avoiding parameter pollution and resource mismatch.

[0067] The created context threads with attached request identifiers are bound one by one to the corresponding information interaction engines (M1, M2, M3). This ensures that each engine can only access the request identifier and metadata in its own context thread when processing information interaction requests, thereby guaranteeing the independence and accuracy of each engine's task processing from the bottom up and laying a stable foundation for subsequent concurrent execution.

[0068] 102. Process information interaction requests based on the context thread corresponding to each information interaction engine.

[0069] For example, leveraging Golang's lightweight goroutine threading capabilities, M1, M2, and M3 can process information interaction requests in parallel within their respective isolated context threads. Specifically, M1 uses intent analysis logic in its context thread to perform semantic understanding and intent determination on the request content (e.g., recognizing "query real-time weather" as a request requiring internet access and "calculate 1+1" as a request not requiring internet access), and generates intent analysis results. M2 uses lightweight computation logic in its context thread to quickly generate real-time interactive content related to the request (e.g., "querying the weather for you" and "the result of 1+1 is 2"), without waiting for results from other engines. When there is no termination signal in its context thread, M3 first initializes the resources required for internet access or complex computations. Once M1 determines that internet access is required, it immediately executes the corresponding operation (e.g., calling the weather API). If M1 determines that internet access is not required, it waits for a dynamic circuit breaker signal to terminate execution.

[0070] After each engine completes request processing, it outputs the results through a dedicated channel to avoid confusion between the processing results of different engines and to maintain the independence of the context thread. Optionally, in some embodiments of this application, M1 outputs the intent analysis results through intentChannel; M2 outputs the immediate response content through smallChannel; and M3 outputs the results of complex operations (such as real-time data obtained from the network) through toolChannel. The channel type is chan string, which ensures the directionality of result transmission and provides a basis for subsequent zero-copy forwarding, avoiding parameter pollution of the context thread during processing.

[0071] 103. Obtain the processing results of each information interaction engine from the context thread, and generate an information push strategy based on the processing results of each information interaction engine.

[0072] Among them, the information push strategy is a set of rules that determine the "output content and output order of the target interactive information" based on the processing results of each information interaction engine (especially the intent determination result of M1), the context thread status (such as whether a network connection is required) and the engine output status (such as whether M3 is ready or has timed out). Its core function is to ensure that the output content is coherent and adaptable to the current request scenario while ensuring response speed.

[0073] For example, specifically, a for-select loop listens to a dedicated channel, the associated context thread captures the processing results, then a dedicated processing function is called to parse the results, and the validity is verified in conjunction with the context thread's metadata. Next, based on the M1 intent result, the engine state is dynamically determined and the circuit breaker is triggered. Finally, the response scheduler integrates the results from multiple engines to generate an information push strategy.

[0074] Optionally, in some embodiments of this application, the step "obtaining the processing results of each information interaction engine from the context thread and generating an information push strategy based on the processing results of each information interaction engine" may specifically include:

[0075] The processing results of each information interaction engine are obtained from the context thread through a preset statement structure;

[0076] Analyze the processing results of the intent information interaction engine;

[0077] Based on the analysis results and the processing results of each information interaction engine, an information push strategy is generated.

[0078] Preset statement structures refer to fixed code logic frameworks designed to retrieve engine results from the context thread. They primarily consist of the following two types of structures:

[0079] Channel monitoring structure: Based on a for-select loop, fixed case branches correspond to dedicated channels of each engine to ensure real-time capture of engine results associated with the context thread, such as the fixed statement "case result:=<-intentChannel:handleIntentResponse(result)";

[0080] Result parsing structure: Each engine is matched with a dedicated processing function, forming a fixed logical chain of channel data - function parsing - context verification. For example, the M1 result needs to be parsed by the handleIntentResponse function and the context model_type identifier needs to be verified in a fixed process.

[0081] The core function of this structure is to standardize the result acquisition process, ensuring that the processing results of each engine are extracted efficiently and accurately from the context thread, thus avoiding logical confusion.

[0082] Specifically, a for-select loop can be used as the core framework to continuously monitor the dedicated channels bound to each information interaction engine: intentChannel (exclusive to intent engine M1), smallChannel (exclusive to lightweight engine M2), and toolChannel (exclusive to tool engine M3). This loop ensures that the results received by the channel are strongly correlated with the context thread of the corresponding engine by using the model_type identifier injected into the context thread (e.g., "intent" for M1, "small" for M2, and "tool" for M3), thus avoiding result confusion. When intentChannel has data, the handleIntentResponse function is called to parse the M1 result, while simultaneously verifying the consistency between the result and the M1 context model_type="intent". When smallChannel has data, the handleSmallResponse function is called to process the M2 result, combining its context search_flag metadata to confirm scenario adaptability. When toolChannel has data, the handleToolResponse function is called to parse the M3 result, matching its context model_type="tool" identifier to ensure validity.

[0083] Next, based on the processing result of M1, and combined with the metadata and system modules in its context thread, the key decisions for subsequent strategies are generated. Specifically, the intent analysis result output by M1 is parsed through the handleIntentResponse function to extract the core decision information of whether network access is required (such as NeedsNetwork=true / false). This result directly corresponds to the core function positioning (intent determination) of the M1 context thread model_type="intent".

[0084] Based on the analysis results of M1, engine lifecycle instructions are generated through a dynamic circuit breaker controller. When no network connection is required, the context thread and execution flow of M3 are terminated immediately to reduce redundant calculations. When a network connection is required, the context thread of M3 is retained to wait for the network connection result, providing a decision basis for subsequent push strategies. Based on this, an information push strategy is generated.

[0085] Optionally, in some embodiments of this application, the step of "generating an information push strategy based on the analysis results and the processing results of each information interaction engine" may specifically include:

[0086] Based on the analysis results, determine the network status corresponding to the information exchange request;

[0087] If the network status is connected, the output order of the processing results of each information interaction engine is determined, and an information push strategy is generated based on the output order and the processing results of each information interaction engine.

[0088] If the network status is offline, the network-connected information interaction engine is disconnected, and an information push strategy is generated based on the processing result of the offline information interaction engine.

[0089] Among them, the network status refers to whether the information interaction request needs to obtain external data through the network. It is determined by the analysis results of the intent engine (M1) and is divided into two categories: Network status: NeedsNetwork=true, the request requires the tool engine (M3) to perform network operations (such as querying real-time weather, network data); Non-network status: NeedsNetwork=false, the request does not require the network, and the lightweight engine (M2) can complete the response through local logic (such as common sense questions, simple calculations).

[0090] Output order refers to the presentation order of the results processed by multiple engines. For example, "M2 prompts first, followed by M3 results" means that the real-time prompts of M2 are output first (to enhance the user's immediate perception), and then the core network results of M3 are output (to ensure information accuracy). Uninterrupted response is achieved through streaming splicing.

[0091] Specifically, based on the processing results of the intent engine (M1), the network status of the information interaction request is analyzed and determined. If the analysis result of M1 is NeedsNetwork=true, the network status corresponding to the information interaction request is determined to be "networked," indicating that the request requires the tool engine (M3) to perform network operations to obtain data. If the result is NeedsNetwork=false, it is determined to be "non-networked," indicating that the request only requires the lightweight engine (M2) to complete the response and does not require network access.

[0092] When a network connection is established, the output order of the processing results from each engine is determined: the Lightweight Engine (M2) prompts are given priority, followed by the Tool Engine (M3) results. That is, M2 outputs the immediate prompt (such as "querying real-time data for you") first, and after M3 completes the network connection and outputs the results through toolChannel, the network data of M3 is seamlessly connected. The response scheduler integrates the prompts of M2 and the network results of M3, combined with the readiness status of M3 fed back by the channel status monitor (such as whether toolChannel has data), and generates a strategy: M2's prompts are output first through the main pipeline. When M3's results are ready, the forwardChannel function is used to stream-concatenate the M3 results to the prompts to form a complete response output to the user end.

[0093] When the system is determined to be offline, the dynamic circuit breaker controller, based on the NeedsNetwork=false result of M1, immediately terminates the context thread and execution flow of the tool engine (M3), releases the CPU, memory, network and other resources occupied by M3, avoids it from performing invalid network operations, and reduces redundant computing by 68%. The response scheduler only obtains the processing results (such as common sense answers and local data responses) output by the lightweight engine (M2) from the smallChannel, generates a push strategy for the complete output of M2 response, and directly outputs the results of M2 to the user end through the main pipeline, ensuring efficient response and no redundant resource consumption.

[0094] 104. Output the target interactive information according to the information push strategy and the interactive content corresponding to each information interaction engine.

[0095] Interactive content refers to the specific response data generated by each information interaction engine in response to information interaction requests. It is strongly related to the engine's functions. For example, the interactive content of the lightweight engine (M2) includes instant prompts (used to quickly respond to users in online scenarios) and complete response content (directly answering user requests in offline scenarios). Its characteristics are fast generation speed, low resource consumption, and generation based on local logic or lightweight computing.

[0096] If the information push strategy is a network scenario strategy, the interactive content includes the instant prompts from the lightweight engine (M2) (such as "querying real-time data for you") and the network result data from the tool engine (M3) (such as real-time weather, stock market information, etc.). Following the order of M2 prompts first and M3 results continuation, the prompts from M2 are first written to the main output channel, and then the network results from M3 are read from the toolChannel through the forwardChannel function and directly streamed and concatenated to the prompts. This function utilizes the Golang channel's feature of passing memory addresses to avoid serialization / deserialization overhead, achieves zero-copy fusion, and ensures uninterrupted content connection.

[0097] For offline scenarios, the interaction content is simply the complete response from the lightweight engine (M2) (such as the common-sense answer "1+1=2", local data response, etc.); the complete response from M2 is directly output through the main output channel without additional splicing, reducing redundant operations.

[0098] Optionally, in some embodiments of this application, the step "outputting target interaction information according to the information push strategy and the interaction content corresponding to each information interaction engine" may specifically include:

[0099] Based on the information push strategy, determine the interactive content to be pushed and the push order from the interactive content corresponding to each information interaction engine;

[0100] Based on the order of push notifications, the interactive content to be pushed is merged to output the target interactive information.

[0101] Optionally, in some embodiments of this application, the step "integrating the interactive content to be pushed based on the push order and outputting the target interactive information" may specifically include:

[0102] The streaming stitching engine is invoked to merge the interactive content to be pushed in the order of push to obtain the target interactive information;

[0103] The target interaction information is read through the forwarding function and written to the output channel.

[0104] The streaming stitching engine is activated to seamlessly integrate interactive content according to the preset push order. For network scenarios, the streaming stitching engine first reads the M2's prompts and uses them as the basis for integration. Then, by monitoring the toolChannel in real time, once the M3's network result is ready, it directly appends it to the prompts to form a coherent content combining the prompts and the network result. For offline scenarios, the streaming stitching engine directly reads the complete response content of M2 without additional stitching, maintaining the integrity of the content.

[0105] Furthermore, the forwardChannel function is called. This function uses the target interaction information output by the streaming splicing engine as the source data. Through the logic of reading the source data in a loop (forvalue:=range source), it directly obtains the memory reference of the target interaction information (avoiding serialization / deserialization overhead). The target interaction information is then written to the output channel: the forwardChannel function directly writes the read target interaction information to the system's main output channel (such as "main pipe output G" in the document) by passing the memory address directly. The channel type is chan string, ensuring that there is no extra copying during data transmission.

[0106] This process utilizes zero-copy channel forwarding technology to reduce two memory copy operations, ensuring efficient transmission of target interactive information to the output channel.

[0107] The information interaction method provided in this application, upon receiving an information interaction request, initiates multiple information interaction engines corresponding to the request and their respective context threads. Then, based on the context threads of each information interaction engine, the request is processed. Next, the processing results of each engine are obtained from the context threads, and an information push strategy is generated based on these results. Finally, the target interaction information is output according to the information push strategy and the interaction content corresponding to each engine. In this information interaction scheme, request-level resource isolation is achieved by binding multiple information interaction engines to their respective context threads. An information push strategy is generated based on the processing results of each engine, triggering dynamic circuit breaking. Finally, the interaction content corresponding to each engine is used as needed according to the information push strategy, avoiding invalid resource occupation and thus solving the problem of resource waste. This reduces computational resource waste and improves computational resource utilization.

[0108] To facilitate better implementation of the information interaction method of this application embodiment, this application embodiment also provides an information interaction device. The meanings of the terms used are the same as in the information interaction system described above, and specific implementation details can be found in the description of the system embodiment.

[0109] Please see Figure 2 , Figure 2 The diagram below illustrates the structure of an information interaction device provided in an embodiment of this application. Specifically, the information interaction device may include a startup module 201, a processing module 202, a generation module 203, and an output module 204, as follows:

[0110] The startup module 201 is used to start multiple information interaction engines corresponding to the information interaction request and the context thread corresponding to each information interaction engine when an information interaction request is received.

[0111] Processing module 202 is used to process information interaction requests based on the context thread corresponding to each information interaction engine;

[0112] The generation module 203 is used to obtain the processing results of each information interaction engine from the context thread, and generate an information push strategy based on the processing results of each information interaction engine.

[0113] The output module 204 is used to output target interactive information based on the information push strategy and the interactive content corresponding to each information interaction engine.

[0114] Optionally, in some embodiments of this application, the generation module 203 may specifically include:

[0115] The acquisition unit is used to retrieve the processing results of each information interaction engine from the context thread through a preset statement structure;

[0116] The analysis unit is used to analyze the processing results of the intent information interaction engine;

[0117] The generation unit is used to generate information push strategies based on the analysis results and the processing results of each information interaction engine.

[0118] Optionally, in some embodiments of this application, the generating unit is specifically used for:

[0119] Based on the analysis results, determine the network status corresponding to the information exchange request;

[0120] If the network status is connected, the output order of the processing results of each information interaction engine is determined, and an information push strategy is generated based on the output order and the processing results of each information interaction engine.

[0121] If the network status is offline, the network-connected information interaction engine is disconnected, and an information push strategy is generated based on the processing result of the offline information interaction engine.

[0122] Optionally, in some embodiments of this application, the output module 204 may specifically include:

[0123] The determining unit is used to determine the interactive content to be pushed and the pushing order from the interactive content corresponding to each information interaction engine according to the information push strategy.

[0124] The output unit is used to merge the interactive content to be pushed based on the push order and output the target interactive information.

[0125] Optionally, in some embodiments of this application, the output unit may specifically be used for:

[0126] The streaming stitching engine is invoked to merge the interactive content to be pushed in the order of push to obtain the target interactive information;

[0127] The target interaction information is read through the forwarding function and then written to the output channel.

[0128] Optionally, in some embodiments of this application, the startup module 201 may specifically be used for:

[0129] When an information interaction request is received, the management controller is activated to create multiple information interaction engines;

[0130] Bind the context thread corresponding to the information interaction request in each information interaction engine.

[0131] Optionally, in some embodiments of this application, the startup module 201 may also be used for:

[0132] Create a context thread corresponding to the information interaction request in each information interaction engine, and add the request identifier corresponding to the information interaction request to the created context thread.

[0133] This application provides an information interaction device. When a startup module 201 receives an information interaction request, it starts multiple information interaction engines corresponding to the request and their corresponding context threads. Then, a processing module 202 processes the information interaction request based on the context threads of each information interaction engine. Next, a generation module 203 obtains the processing results of each information interaction engine from the context threads and generates an information push strategy based on these results. Finally, an output module 204 outputs the target interaction information according to the information push strategy and the interaction content corresponding to each information interaction engine. In the information interaction scheme provided in this application, request-level resource isolation is achieved by binding multiple information interaction engines to their corresponding context threads. An information push strategy is then generated based on the processing results of each information interaction engine, triggering dynamic circuit breaking. Finally, the interaction content corresponding to each information interaction engine is used as needed according to the information push strategy, avoiding invalid resource occupation and thus solving the problem of resource waste. This reduces computational resource waste and improves computational resource utilization.

[0134] Furthermore, embodiments of this application also provide an electronic device, such as... Figure 3 As shown, it illustrates a structural schematic diagram of the electronic device involved in the embodiments of this application, specifically:

[0135] The electronic device may include components such as a processor 301 with one or more processing cores, a memory 302 with one or more processor-readable storage media, a power supply 303, and an input unit 304. Those skilled in the art will understand that... Figure 3 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:

[0136] The processor 301 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 302, and by calling data stored in the memory 302, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. Optionally, the processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 301.

[0137] The memory 302 can be used to store software programs and modules. The processor 301 executes various functional applications and information interaction methods by running the software programs and modules stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 302 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, or other volatile solid-state storage device. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.

[0138] The electronic device also includes a power supply 303 that supplies power to various components. Preferably, the power supply 303 can be logically connected to the processor 301 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 303 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0139] The electronic device may also include an input unit 304, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0140] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 301 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 302 according to the following instructions, and the processor 301 runs the applications stored in the memory 302 to realize various functions, as follows:

[0141] When an information interaction request is received, multiple information interaction engines corresponding to the information interaction request and the context thread corresponding to each information interaction engine are started. The information interaction request is processed based on the context thread corresponding to each information interaction engine. The processing results of each information interaction engine are obtained from the context thread, and an information push strategy is generated based on the processing results of each information interaction engine. The target interaction information is output according to the information push strategy and the interaction content corresponding to each information interaction engine.

[0142] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0143] In this embodiment, when an information interaction request is received, multiple information interaction engines corresponding to the request and their respective context threads are activated. Then, the information interaction request is processed based on the context threads of each engine. Next, the processing results of each engine are obtained from the context threads, and an information push strategy is generated based on these results. Finally, the target interaction information is output according to the information push strategy and the interaction content corresponding to each engine. In the information interaction scheme provided in this application, request-level resource isolation is achieved by binding multiple information interaction engines to their respective context threads. An information push strategy is then generated based on the processing results of each engine, triggering dynamic circuit breaking. Finally, the interaction content corresponding to each engine is used as needed according to the information push strategy, avoiding invalid resource occupation and thus solving the problem of resource waste. This reduces computational resource waste and improves computational resource utilization.

[0144] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a processor-readable storage medium and loaded and executed by a processor.

[0145] Therefore, embodiments of this application provide a storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the information interaction methods provided in embodiments of this application. For example, the instructions can execute the following steps:

[0146] When an information interaction request is received, multiple information interaction engines corresponding to the information interaction request and the context thread corresponding to each information interaction engine are started. The information interaction request is processed based on the context thread corresponding to each information interaction engine. The processing results of each information interaction engine are obtained from the context thread, and an information push strategy is generated based on the processing results of each information interaction engine. The target interaction information is output according to the information push strategy and the interaction content corresponding to each information interaction engine.

[0147] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0148] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0149] Since the instructions stored in the storage medium can execute the steps of any of the information interaction methods provided in the embodiments of this application, the beneficial effects that any of the information interaction methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.

[0150] The above provides a detailed description of an information interaction method, apparatus, electronic device, and storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. An information exchange method, characterized in that, include: When an information interaction request is received, multiple information interaction engines corresponding to the information interaction request and the context thread corresponding to each information interaction engine are started. The information interaction request is processed based on the context thread corresponding to each information interaction engine. The processing results of each information interaction engine are obtained from the context thread, and an information push strategy is generated based on the processing results of each information interaction engine. Based on the information push strategy and the corresponding interaction content of each information interaction engine, the target interaction information is output.

2. The information interaction method according to claim 1, characterized in that, The step of obtaining the processing results of each information interaction engine from the context thread and generating an information push strategy based on the processing results of each information interaction engine includes: The processing results of each information interaction engine are obtained from the context thread through a preset statement structure; Analyze the processing results of the intent information interaction engine; Based on the analysis results and the processing results of each information interaction engine, an information push strategy is generated.

3. The information interaction method according to claim 2, characterized in that, The information push strategy is generated based on the analysis results and the processing results of each information interaction engine, including: Based on the analysis results, the network status corresponding to the information interaction request is determined; If the network status is connected, the output order of the processing results of each information interaction engine is determined, and an information push strategy is generated based on the output order and the processing results of each information interaction engine. If the network status is offline, the networked information interaction engine is disconnected, and an information push strategy is generated based on the processing result of the offline information interaction engine.

4. The information interaction method according to claim 1, characterized in that, The step of outputting target interaction information based on the information push strategy and the interaction content corresponding to each information interaction engine includes: According to the information push strategy, the interactive content to be pushed and the push order are determined from the interactive content corresponding to each information interaction engine. Based on the push order, the target interaction information is output by integrating the interactive content to be pushed.

5. The information interaction method according to claim 4, characterized in that, The step of integrating the interactive content to be pushed based on the push order and outputting target interaction information includes: The streaming stitching engine is invoked to merge the interactive content to be pushed according to the push order to obtain the target interactive information; The target interaction information is read through the forwarding function and written to the output channel.

6. The information interaction method according to claim 1, characterized in that, When an information interaction request is received, starting multiple information interaction engines corresponding to the information interaction request and the context thread corresponding to each information interaction engine includes: When an information interaction request is received, the management controller is activated to create multiple information interaction engines; Bind the context thread corresponding to the information interaction request in each information interaction engine.

7. The information interaction method according to claim 6, characterized in that, The step of binding the context thread corresponding to the information interaction request in each information interaction engine includes: In each information interaction engine, a context thread corresponding to the information interaction request is created, and a request identifier corresponding to the information interaction request is added to the created context thread.

8. An information interaction device, characterized in that, include: The startup module is used to start multiple information interaction engines corresponding to the information interaction request and the context thread corresponding to each information interaction engine when an information interaction request is received. The processing module is used to process the information interaction request based on the context thread corresponding to each information interaction engine; The generation module is used to obtain the processing results of each information interaction engine from the context thread, and generate an information push strategy based on the processing results of each information interaction engine. The output module is used to output target interactive information based on the information push strategy and the interactive content corresponding to each information interaction engine.

9. An electronic device, characterized in that, include: A memory, a processor, and a processor program stored in the memory and executable on the processor, wherein the processor executes the program as steps of the information interaction method as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The computer processing program is stored and can be loaded by a processor and executed as described in any one of claims 1 to 7.