Intelligent agent model processing method and device, electronic equipment and storage medium
By obtaining application scenarios and device capability information from the terminal and requesting a matching intelligent model from the server, the dynamic loading and versatility of the intelligent body of the terminal are realized, and the problem that the terminal can only load the intelligent body of the manufacturer in the prior art is solved.
Patent Information
- Application Number
- CN202411642111.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-03-28
AI Technical Summary
In the prior art, terminals can only load the intelligent body of the equipment manufacturer to which they belong, and cannot achieve multi-purpose one machine.
By obtaining application scenario information and terminal device capability information, sending these information to the server. The server determines the matching intelligent model and issues it to the terminal. The terminal saves and loads the corresponding intelligent model and operating parameters.
It realizes that the terminal dynamically loads the required intelligent bodies according to the application scenario and device capabilities, achieving the multi-purpose effect of one machine, solving the problem of insufficient hardware resources.
Smart Images

Figure CN119718456A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a method, device, electronic device and storage medium for processing a model of an intelligent agent. Background Art
[0002] With the rapid development of large model technology, large models with different advanced architectures are constantly emerging. For example, the multimodal large language model (GPT-4) based on the Mixed Expert Models (MoE) has shown excellent performance in generating text content and can achieve high-quality natural language processing tasks such as text generation, dialogue management, and semantic understanding. The visual technology model based on the attention mechanism (Transformer) architecture can generate high-quality, long-duration video content that maintains temporal, spatial, and character consistency.
[0003] AI Agents are based on large model technology and achieve differentiated feature enhancement in segmented scenarios. For example, AI precision education agents use knowledge point retrieval-augmented generation (RAG) and step-by-step analysis to decompose problems into multiple sub-problems and knowledge points for logical questions such as mathematics, physics and chemistry.
[0004] With the rapid popularization of wearable devices and smart home products with low-cost real-time operating systems (RTOS), smart hardware has become the main development direction at the current stage. Among them, due to the different subdivisions of each smart terminal manufacturer, unique integrated hardware and software smart solutions have been formed in their respective fields. For example, the smart hardware of smart terminal manufacturer A can only load the large model intelligent body of manufacturer A, and the smart hardware of smart terminal manufacturer B can only load the large model intelligent body of manufacturer B.
[0005] From this we can see that current terminals can only load the intelligent entities of the device manufacturer to which they belong, and cannot achieve multiple uses of one device. Summary of the invention
[0006] The embodiments of the present application provide a method, device, electronic device and storage medium for processing a model of an intelligent agent to solve the problem in the prior art that a terminal can only load the intelligent agent of the device manufacturer to which it belongs and cannot achieve multiple uses of one device.
[0007] In a first aspect, an embodiment of the present application provides a model processing method of an intelligent agent, which is applied to a terminal, and the method includes:
[0008] Get application scenario information;
[0009] Sending the application scenario information and the device capability information of the terminal to a server;
[0010] Loading a first model of a first agent, wherein the first agent is an agent determined by the server and matches the application scenario information and the device capability information of the terminal;
[0011] Receive the first operating parameter of the first model sent by the server, and save the first operating parameter.
[0012] In a second aspect, an embodiment of the present application further provides a model processing method of an intelligent agent, which is applied to a server, and the method comprises:
[0013] Receiving application scenario information and device capability information of the terminal sent by the terminal;
[0014] Determining a first agent that matches the application scenario information and the device capability information;
[0015] A first model of the first agent and first operating parameters of the first model are sent to the terminal.
[0016] In a third aspect, an embodiment of the present application provides a model processing device of an intelligent agent, applied to a terminal, the device comprising:
[0017] A first acquisition module is used to acquire application scenario information;
[0018] A first sending module, used to send the application scenario information and the device capability information of the terminal to a server;
[0019] A loading module, used to load a first model of a first agent, wherein the first agent is an agent determined by the server and matches the application scenario information and the device capability information of the terminal;
[0020] The first receiving module is used to receive the first operating parameter of the first model sent by the server and save the first operating parameter.
[0021] In a fourth aspect, an embodiment of the present application provides a model processing device of an intelligent agent, applied to a server, the device comprising:
[0022] A second receiving module, used to receive application scenario information and device capability information of the terminal sent by the terminal;
[0023] A determination module, configured to determine a first agent that matches the application scenario information and the device capability information;
[0024] The second sending module is used to send the first model of the first agent and the first operating parameters of the first model to the terminal.
[0025] In a fifth aspect, an embodiment of the present application provides an electronic device, including a memory, a transceiver, and a processor:
[0026] A memory for storing computer programs; a transceiver for sending and receiving data under the control of the processor; a processor for reading the computer program in the memory and executing the model processing method of the intelligent agent described in the first aspect or the model processing method of the intelligent agent described in the second aspect.
[0027] In a sixth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the model processing method of the intelligent agent described in the first aspect above is implemented, or the model processing method of the intelligent agent described in the second aspect above is implemented.
[0028] In the embodiment of the present application, the terminal can obtain application scenario information, and send the application scenario information and the device capability information of the terminal to the server, so that the terminal can load the first model of the first agent matching the application scenario information and the device capability information from the server, and receive the first operating parameters of the first model sent by the server, and save the first operating parameters. It can be seen that in the embodiment of the present application, the terminal can dynamically load the required agent based on the application scenario and the device capability, so as to realize multiple uses of one machine. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0030] Figure 1 One of the flow charts of the model processing method of the intelligent agent provided in the embodiment of the present application;
[0031] Figure 2 The second flowchart of the model processing method of the intelligent agent provided in the embodiment of the present application;
[0032] Figure 3 This is the agent loading process in the embodiment of the present application;
[0033] Figure 4 This is the initialization and verification process of the intelligent agent in the embodiment of the present application;
[0034] Figure 5 The calling process of the intelligent agent in the embodiment of the present application;
[0035] Figure 6 This is a flowchart of a chain call based on text input in an embodiment of the present application;
[0036] Figure 7 This is a flowchart of a chain call based on voice input in an embodiment of the present application;
[0037] Figure 8 This is a flowchart of a chain call based on image input in an embodiment of the present application;
[0038] Fig. 9 A schematic diagram of an agent update process in an embodiment of the present application;
[0039] Fig.10 One of the structural block diagrams of the model processing device of the intelligent agent provided in the embodiment of the present application;
[0040] Fig.11 The second structural block diagram of the model processing device of the intelligent agent provided in the embodiment of the present application;
[0041] Fig.12 A structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0042] In the embodiments of the present application, the term "and / or" describes the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0043] In the embodiments of the present application, the term "plurality" refers to two or more than two, and other quantifiers are similar.
[0044] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0045] The embodiments of the present application provide a method and device for processing a model of an intelligent agent, which is used to solve the problem in the prior art that a terminal can only load the intelligent agent of the device manufacturer to which it belongs and cannot achieve multiple uses of one device.
[0046] Among them, the method and the device are based on the same application concept. Since the method and the device solve the problem in a similar principle, the implementation of the device and the method can refer to each other, and the repeated parts will not be repeated.
[0047] In order to facilitate understanding of the model processing method of the intelligent agent in the embodiment of the present application, the following contents are first introduced:
[0048] RTOS is a computer system management software designed specifically to support real-time applications. Real-time applications are those that must respond or complete tasks within a limited time, usually involving control systems and data processing systems, such as industrial automation, medical equipment, automotive control and other fields.
[0049] Smart Terminal refers to electronic devices with intelligent functions. Such devices usually have certain computing capabilities, networking functions and human-computer interaction interfaces, can independently run operating systems and support the installation of applications. Smart terminals cover a wide range of device types, including but not limited to smartphones, tablets, smart watches, smart home devices (such as smart speakers, smart TVs), wearable devices and various other Internet of Things (IoT) devices.
[0050] A multimodal agent is an artificial intelligence system that can receive and process information through multiple sensory channels or information sources. This agent does not rely solely on a single form of information (such as text or voice), but can use a combination of visual, auditory, tactile and other sensory information to understand and interact.
[0051] Figure 1 A schematic flow chart of a model processing method for an intelligent agent provided in an embodiment of the present application is shown. The model processing method for an intelligent agent can be applied to a terminal (such as the various intelligent terminals listed above). Figure 1 As shown, the method may include the following steps 101 to 104:
[0052] Step 101: Obtain application scenario information.
[0053] In some embodiments, operation controls for different scenes can be displayed in a display interface of the terminal (such as an intelligent agent setting interface). When the terminal detects an operation on a certain operation control (such as a selection operation), the scene information corresponding to the operation control is the acquired scene information.
[0054] Alternatively, in some embodiments, operation controls of different agents may be displayed in a display interface of the terminal (e.g., an agent setting interface). When the terminal detects an operation on a certain operation control (e.g., a selection operation), the application scenario of the agent corresponding to the operation control is the acquired scene information.
[0055] Step 102: Send the application scenario information and the device capability information of the terminal to a server.
[0056] The device capability information includes at least one of the following:
[0057] Chip computing power, memory size, and whether the required hardware (such as camera, microphone, speaker, etc.) is available.
[0058] It is understandable that the capabilities of the terminals are different, and the intelligent entities they can support may be different. For example, a terminal equipped with a camera can support intelligent entities used with the camera, while a terminal without a camera cannot support intelligent entities used with the camera.
[0059] Step 103: Load the first model of the first agent.
[0060] Among them, the first agent is an agent determined by the server and matches the application scenario information and the device capability information of the terminal; that is, it can be understood that: the first agent is suitable for the application scenario indicated by the application scenario information, and the device capability of the terminal supports the first agent.
[0061] Optionally, the first agent also includes a second model deployed on the server side.
[0062] It should be noted that an agent can be considered as an artificial intelligence system, and the operation of an artificial intelligence system often involves multiple models. Therefore, it can be understood that an agent can include multiple models.
[0063] In some embodiments, after the server receives the application scenario information and the device capability information of the terminal sent by the terminal, it can determine the first intelligent agent that matches the application scenario information and the device capability information, and then send the first model of the first intelligent agent and the first operating parameters of the first model to the terminal for storage, so that when the terminal calls the first intelligent agent, it can use the first model based on the first operating parameters; wherein, in addition to the first model running on the terminal side, the first intelligent agent also includes a second model running on the server side, so the server can also store the second operating parameters of the second model.
[0064] It should be noted that in the prior art, intelligent hardware based on the RTOS system has the characteristics of low memory and storage. For example, a common smart watch has 16 megabytes (MB) of random access memory (RAM) and 16MB of read-only memory (ROM). Compared with the operating hardware requirements of large models that are often in units of gigabytes (GB), local deployment cannot be achieved unless distillation is performed.
[0065] In addition, it is very common in daily life for the RTOS system intelligent hardware to call multiple large models at the same time and interact with the results of the large models. For example, a large language model (LLM) is called for text output, and a text to speech (TTS) model is called for text content output by voice. For some long text scenarios (such as children's stories, long text translation, etc.), in order to ensure that multiple large models run in parallel to achieve better user interaction effects, the problem of insufficient hardware resources in the RTOS system is very prominent.
[0066] In some embodiments of the present application, although an intelligent agent may include multiple large models as described above and its operation will take up a lot of resources, when a terminal needs to load an intelligent agent, part of the model required for the operation of the intelligent agent can be loaded on the terminal side, and the other part can be deployed on the server side. In this way, the deployment and operation of the intelligent agent do not need to take up too many resources, thereby solving the problem of insufficient hardware resources mentioned above.
[0067] In addition, in some embodiments, two loading methods, Software Development Kit (SDK) and Application Programming Interface (API), can be provided to achieve the loading of the first model, that is, SDK package access is achieved through the cross-compilation chain of the chip; and the underlying interface library is provided to implement the API interface.
[0068] Step 104: Receive the first operating parameter of the first model sent by the server, and save the first operating parameter.
[0069] From the above steps 101 to 104, it can be seen that in some embodiments of the present application, the terminal can obtain application scenario information and send the application scenario information and the device capability information of the terminal to the server, so that the terminal can load the first model of the first agent matching the application scenario information and the device capability information from the server, receive the first operating parameters of the first model sent by the server, and save the first operating parameters. It can be seen that in the embodiments of the present application, the terminal can dynamically load the required agent based on the application scenario and the device capability, so as to achieve multiple uses of one machine.
[0070] For example, a smart speaker with a camera and a screen can be applied to the following two scenarios:
[0071] Scenario 1, nursing home: Loading a companionship agent, it can detect the large model of the elderly falling based on the camera; or, loading a health care agent, it can use a digital person with the image and voice of a caregiver to remind people to take medicine and chat about daily life through the screen and speakers; or, loading an audio-visual agent, it can play their favorite dramas and TV series at fixed times.
[0072] Scenario 2: Family children's education: Loading the K12 education agent can detect children's sitting posture based on the camera; or, loading the lecture agent can realize the distributed explanation of the subject and AI precision learning; or, loading the oral practice agent can realize English oral pronunciation education, oral scoring and oral simulation exams.
[0073] Optionally, after saving the first operating parameter, the method further includes the following steps A-1 to A-3:
[0074] Step A-1: Obtain first input content;
[0075] Step A-2: interacting with the server, and based on at least one of the first operating parameter and the second operating parameter, calling at least one of the first model and the second model to process the first input content to obtain second content, wherein the second operating parameter includes an operating parameter of the second model, and the plurality of sub-models included in the second model are run in a chained parallel manner;
[0076] Step A-3: Display the second content.
[0077] Among them, the first input content can be the content input by the user in the terminal (such as text, voice, video, etc.), or it can be automatically collected by the hardware on the terminal (such as camera, microphone, etc.) under predetermined conditions (such as the arrival of a scheduled time, detection of a predetermined operation of the user on the terminal).
[0078] It can be seen that in some embodiments of the present application, the terminal can obtain the first input content, and then through the interaction between the terminal and the server, call the first agent to process the first input content to obtain the second content, thereby displaying the second content.
[0079] The first input content may include at least one of text, picture, voice, and video, and the second content may include at least one of text, picture, voice, and video.
[0080] It should be noted that, due to the limited resources of the terminal, the sub-models included in the first model deployed on the terminal side are often small models; and the sub-models included in the second model deployed on the server side are often large models, and the calling process of the large model may be more complicated and time-consuming. For this reason, in some embodiments of the present application, when multiple large models need to be called, chained parallel calls can be used. Among them, chained parallel calls refer to setting the return value of the method in programming so that the return value of each method becomes the object itself, thereby realizing continuous method calls, and these method calls can be executed in parallel. It can be seen that the chained parallel calling method can improve the processing speed of the second model, thereby improving the overall processing speed of the first agent, and thus improving the user experience.
[0081] Optionally, the first model includes an intention analysis sub-model and a plurality of first sub-models with different functions other than the intention analysis sub-model;
[0082] In the above step A-2, interacting with the server, based on at least one of the first operating parameter and the second operating parameter, calling at least one of the first model and the second model to process the first input content to obtain the second content, includes:
[0083] Based on the operating parameters of the intention analysis sub-model in the first operating parameters, calling the intention analysis sub-model to process the first input content, and determining the first target sub-model that needs to be called currently;
[0084] In the case that the first target sub-model exists in the plurality of the first sub-models, based on the operating parameters of the first target sub-model in the first operating parameters, calling the first target sub-model to process the first input content to obtain the second content;
[0085] When the first target sub-model does not exist in multiple first sub-models, the first input content is sent to the server, so that the server calls the first input content of the first target sub-model in the second model in a chained parallel manner based on the operating parameters of the first target sub-model in the second operating parameters to process and obtain the second content; and receives the second content sent by the server.
[0086] Among them, the intention analysis sub-model can determine which function sub-model needs to be called according to the first input content. For example, when a user enters a text "How is the weather today" in the terminal, the first agent can call the Internet to search for the current date, convert it into voice, or call weather data and voice broadcast. Then, the intention analysis sub-model can analyze that the user's current demand is "call weather data and voice broadcast" after the user enters the text "How is the weather today".
[0087] It can be understood that when the intention analysis sub-model determines which function sub-model needs to be called currently based on the first input content, it can also combine the historical calling data of the first agent in the recent period of time (for example, which function sub-models have been called).
[0088] It should be noted that the intent analysis sub-model may be pre-trained based on corresponding training samples. For example, the training sample of the intent analysis sub-model includes input content and annotations of the input content, and the annotations represent the sub-model being called.
[0089] From the above, it can be seen that the intent analysis sub-model can be used to determine which function sub-model currently needs to be called. In this way, according to the functions of the sub-model deployed on the terminal side and the functions of the sub-model deployed on the server side, the first input content can be processed through the first model on the terminal side or the second model on the server side.
[0090] Optionally, after the terminal obtains the above-mentioned first input content, it can trigger the terminal to display an operation interface of the intelligent agent, and the operation interface displays functional operation controls, so that the user can select the corresponding functional operation control, and the function corresponding to the selected operation control is the function of the first target sub-model currently required to be called. In this way, when the first target sub-model exists among multiple first sub-models, based on the operation parameters of the first target sub-model in the first operation parameters, the first target sub-model is called to process the first input content to obtain the second content;
[0091] When the first target sub-model does not exist in multiple first sub-models, the first input content is sent to the server, so that the server calls the first input content of the first target sub-model in the second model in a chained parallel manner based on the operating parameters of the first target sub-model in the second operating parameters to process and obtain the second content; and receives the second content sent by the server.
[0092] It can be seen that in some embodiments, after the terminal obtains the first input content, it may not determine the first target sub-model that needs to be called currently through the intention molecule sub-model, but trigger the display of the function operation control, so that the user can make a selection. In this way, it is possible to select which side's model to process the first input content based on whether the sub-model corresponding to the selected function is deployed on the terminal side or the server side.
[0093] Optionally, the first model further includes a personalized processing sub-model, and before sending the first input content to the server, the method further includes:
[0094] Based on the operating parameters of the personalized processing submodule in the first operating parameters, obtaining user preference information through the personalized processing submodule, and adding the user preference information to the first input content;
[0095] Before displaying the second content, the method further includes:
[0096] Based on the operating parameters of the personalized processing submodule in the first operating parameters, the personalized processing submodule is called to process the second content into content that conforms to the user preference information.
[0097] It can be seen that in some embodiments of the present application, the above-mentioned personalized processing sub-model can be set on the terminal side, so that the user preference information can be obtained through the personalized processing sub-module, and then added to the first input content, and the second content obtained based on the first input content can be more in line with the user's preferences. For example, if the user enters "what places to eat nearby" in the terminal, the personalized processing sub-model can add the information of "user preference for light meals" to the above content, so that the searched food recommendations will meet the user's preferences.
[0098] In addition, the personalized processing sub-model can not only add user preference information to the first input content, but also process the second content into content that conforms to the user preference information. For example, when the second content is voice, if the user prefers the voice of a specific person, the voice can be processed into the voice of the specific person.
[0099] It is understandable that the personalized processing sub-model can regularly collect behavioral data of terminal users, draw user portraits, and thus obtain user preference information.
[0100] It is understandable that the model capable of drawing a user portrait can adopt any model in the existing related technologies.
[0101] Optionally, the method further comprises:
[0102] receiving at least part of the updated first operating parameters sent by the server, and saving at least part of the updated first operating parameters;
[0103] Among them, at least part of the updated first operating parameters are determined according to a predetermined time interval and based on the historical call data of the first agent within the predetermined time interval.
[0104] It can be seen from this that the first agent can be updated at a predetermined time interval, and when updating, it can be updated based on the call data of the first agent collected in the most recent time interval, so that the first agent is more in line with the user's personal habits.
[0105] Optionally, at least one of the first operating parameter and the second operating parameter includes a prompt word (PromptTemplate) of a model, and the prompt words of each model of the first agent can be updated periodically.
[0106] Figure 2 A schematic diagram of a flow chart of a model processing method of an intelligent agent provided in an embodiment of the present application is shown. The model processing method of the intelligent agent can be applied to a server, such as Figure 2 As shown, the method may include the following steps 201 to 203:
[0107] Step 201: Receive application scenario information and device capability information of the terminal sent by a terminal.
[0108] It can be seen from this that the terminal can obtain application scenario information and its device capability information and send it to the server.
[0109] In some embodiments, operation controls for different scenes can be displayed in a display interface of the terminal (such as an intelligent agent setting interface). When the terminal detects an operation on a certain operation control (such as a selection operation), the scene information corresponding to the operation control is the acquired scene information.
[0110] Alternatively, in some embodiments, operation controls of different agents may be displayed in a display interface of the terminal (e.g., an agent setting interface). When the terminal detects an operation on a certain operation control (e.g., a selection operation), the application scenario of the agent corresponding to the operation control is the acquired scene information.
[0111] In addition, the device capability information includes at least one of the following:
[0112] Chip computing power, memory size, and whether the required hardware (such as camera, microphone, speaker, etc.) is available.
[0113] It is understandable that the capabilities of the terminals are different, and the intelligent entities they can support may be different. For example, a terminal equipped with a camera can support intelligent entities used with the camera, while a terminal without a camera cannot support intelligent entities used with the camera.
[0114] Step 202: Determine a first agent that matches the application scenario information and the device capability information.
[0115] Among them, the first agent matches the application scenario information and the device capability information of the terminal; it can be understood that: the first agent is suitable for the application scenario indicated by the application scenario information, and the device capability of the terminal supports the first agent.
[0116] Step 203: Send the first model of the first agent and the first operating parameters of the first model to the terminal.
[0117] Optionally, the server stores second operating parameters of a second model of the first agent.
[0118] It should be noted that an agent can be considered as an artificial intelligence system, and the operation of an artificial intelligence system often involves multiple models. Therefore, it can be understood that an agent can include multiple models.
[0119] It can be seen from this that after the server receives the application scenario information and the device capability information of the terminal sent by the terminal, it can determine the first intelligent agent that matches the application scenario information and the device capability information, and then send the first model of the first intelligent agent and the first operating parameters of the first model to the terminal for storage, so that when the terminal calls the first intelligent agent, it can use the first model based on the first operating parameters; wherein, in addition to the first model running on the terminal side, the first intelligent agent also includes a second model running on the server side, so the server can also store the second operating parameters of the second model.
[0120] It can be seen from the above steps 201 to 203 that in some embodiments of the present application, the terminal can obtain application scenario information and send the application scenario information and the device capability information of the terminal to the server, so that the terminal can load the first model of the first agent that matches the application scenario information and the device capability information from the server, receive the first operating parameters of the first model sent by the server, and save the first operating parameters. It can be seen that in the embodiments of the present application, the terminal can dynamically load the required agent based on the application scenario and the device capability, so that one machine can be used for multiple purposes.
[0121] In addition, although an intelligent agent may include multiple large models and its operation will take up a lot of resources, when the terminal needs to load an intelligent agent, part of the model required for the operation of the intelligent agent can be loaded on the terminal side, and the other part can be deployed on the server side. In this way, the deployment and operation of the intelligent agent do not need to take up too many resources, thereby solving the problem of insufficient hardware resources mentioned above.
[0122] Optionally, after saving the second operating parameter, the method further includes the following steps B-1 to B-3:
[0123] Step B-1: receiving first input content sent by the terminal;
[0124] Step B-2: Based on the operation parameters of the first target sub-model in the second operation parameters, the first target sub-model is called in a chained parallel manner to process the first input content to obtain the second content, wherein the first target sub-model is a sub-model currently required to be called among the sub-models included in the second model and determined according to the first input content;
[0125] Step B-3: Send the second content to the terminal.
[0126] Among them, the first input content can be the content input by the user in the terminal (such as text, voice, video, etc.), or it can be automatically collected by the hardware on the terminal (such as camera, microphone, etc.) under predetermined conditions (such as the arrival of a scheduled time, detection of a predetermined operation of the user on the terminal).
[0127] In addition, the above-mentioned first model loaded by the terminal may include an intent analysis sub-model and multiple first sub-models with different functions other than the intent analysis sub-model; after the terminal obtains the first input content, it can call the intent analysis sub-model to process the first input content based on the operating parameters of the intent analysis sub-model in the first operating parameters, and determine the first target sub-model that needs to be called currently; thereby, when the first target sub-model does not exist among the multiple first sub-models, the first input content is sent to the server, so that the server calls the first target sub-model in a chained parallel manner to process the first input content based on the operating parameters of the first target sub-model in the second operating parameters to obtain the second content; and receives the second content sent by the server.
[0128] The first input content may include at least one of text, picture, voice, and video, and the second content may include at least one of text, picture, voice, and video.
[0129] It should be noted that, due to the limited resources of the terminal, the sub-models included in the first model deployed on the terminal side are often small models; and the sub-models included in the second model deployed on the server side are often large models, and the calling process of the large model may be more complicated and time-consuming. For this reason, in some embodiments of the present application, when multiple large models need to be called, chained parallel calls can be used. Among them, chained parallel calls refer to setting the return value of the method in programming so that the return value of each method becomes the object itself, thereby realizing continuous method calls, and these method calls can be executed in parallel. It can be seen that the chained parallel calling method can improve the processing speed of the second model, thereby improving the overall processing speed of the first agent, and thus improving the user experience.
[0130] In addition, the relevant introduction to the intent analysis sub-model can be found in the previous article and will not be repeated here.
[0131] Optionally, the second model includes a safety detection sub-model and a plurality of second sub-models with different functions except the safety detection sub-model;
[0132] In the above step B-2, based on the second operating parameter, multiple sub-models included in the second model are called in a chained parallel manner to process the first input content to obtain the second content, including:
[0133] Based on the operation parameters of the security detection sub-model in the second operation parameters, calling the security detection sub-model to perform security detection on the first input content to determine whether there is a predetermined target content in the first input content;
[0134] In the case that the target content does not exist in the first input content, based on the operation parameters of the first target sub-model in the second operation parameters, the first target sub-models in a plurality of the second sub-models are called in a chained parallel manner to process the first input content to obtain the second content;
[0135] In the above step B-3, sending the second content to the terminal includes:
[0136] Based on the operation parameters of the security detection sub-model in the second operation parameters, calling the security detection sub-model to perform security detection on the first input content to determine whether there is a predetermined target content in the first input content;
[0137] In a case where it is determined that the target content does not exist in the second content, the second content is sent to the terminal.
[0138] Among them, the above-mentioned target content includes non-compliant content, such as non-compliant text, pictures, audio, video, etc.
[0139] It can be seen from this that in some embodiments of the present application, the above-mentioned security detection sub-model can be set on the terminal side, so that a security check can be performed before calling the first target sub-model on the server side, and after obtaining the second content, a security check can be performed again (i.e., input and output detection) to ensure the output of healthy and safe content.
[0140] It should be noted that the security detection sub-model can be pre-trained based on corresponding training samples. For example, the training samples of the security detection sub-model include input content and annotations of the input content, wherein the annotated parts of the input content indicate which parts belong to the target content.
[0141] Optionally, the second model further includes a data format processing sub-model, and the method further includes:
[0142] Based on the operating parameters of the data format processing sub-model in the second operating parameters, the data format processing sub-model is called to standardize the input and output of each sub-model included in the first target sub-model.
[0143] It can be seen from this that in some embodiments of the present application, the formats of various input and output can be standardized through the data format processing sub-model to solve the data alignment problem of different large models.
[0144] It is understandable that the model capable of standardizing the data format may adopt any model in the existing related technologies. Optionally, the method further includes:
[0145] According to a predetermined time interval, obtaining historical call data of the first agent within the predetermined time interval;
[0146] Update at least part of the first operating parameters and at least part of the second operating parameters according to the historical call data;
[0147] Send at least part of the updated first operating parameters to the terminal.
[0148] It can be seen from this that the first agent can be updated at a predetermined time interval, and when updating, it can be updated based on the call data of the first agent collected in the most recent time interval, so that the first agent is more in line with the user's personal habits.
[0149] Optionally, at least one of the first operating parameter and the second operating parameter includes a prompt word (PromptTemplate) of a model, and the prompt words of each model of the first agent can be updated periodically.
[0150] It should be noted that the various models or sub-models involved in the text can be implemented using existing AI algorithms (such as LLM large model, machine learning algorithm, deep learning algorithm, natural language processing algorithm, etc.).
[0151] In summary, the specific implementation of the model processing method of the agent in the embodiment of the present application can be described as follows:
[0152] First of all, it should be noted that this implementation provides two access methods, SDK and API, to achieve the loading of intelligent agents. The SDK package access is achieved through the cross-compilation chain of the chip; the RTOS system underlying interface library is provided to implement the API interface. Among them, by dynamically loading the SDK, intelligent agent access and dynamic loading, deletion, and control can be achieved.
[0153] 1. Agent download (i.e. loading) process, such as Figure 3 As shown:
[0154] The terminal starts the SDK or API, obtains the current application scenario information, and reports the device capability information and the current application scenario information to the server, wherein the application scenario information can be selected in the display interface of the terminal; the device capability information includes at least one of the following: chip computing power, memory size, and whether predetermined hardware (such as a camera, a microphone, and a speaker) is available; the server determines a first intelligent entity that matches the application scenario information and the device capability information, and sends the first operating parameters of the first model of the first intelligent entity to the terminal, and saves the second operating parameters of the first intelligent entity in the server; both the terminal and the server confirm that the sending is successful and close the SDK or API.
[0155] 2. Agent calling process:
[0156] 1. Initialization and verification process as follows Figure 4 As shown: the terminal initializes the SDK or API, reports the device information (including device ID, CTEI, local log storage type, and reported log type) to the server, and the server associates the first information with the CTEI and returns a success or error code; wherein the first information includes the reported APP ID, KEY ID, SECRET ID, and model address; the first information is used for the terminal to report information to the server; CTEI represents the identification code of the terminal; in cryptography, KEY usually refers to an encryption key used to encrypt and decrypt data; SECRET is usually used to store sensitive information, such as passwords, tokens, connection strings, etc.;
[0157] When the server returns a success code to the terminal, the terminal reports the second information to the server, and the second information is used to indicate the output requirements of the model and complete the initialization process; wherein the second information includes the model set function, the associated product model, the maximum input and output tokens value, the core sampling threshold, the scene model, the role, the prompt, the safety fence version, etc.; the token is the basic unit of text processing in the model; the role of the prompt in the model is mainly to prompt the model with the context of the input information and the parameter information of the input model, so as to guide the model to generate a specific output; the safety fence is used to intercept unreasonable information;
[0158] After the initialization is completed, the server verifies whether the second model of the first agent deployed on the server side can be called at present, that is, the server can verify whether the tokens requirements are met, such as whether the terminal report carries CTEI and the set function value on the terminal side, and verifies the calling order of the large model from the perspective of timestamp (trmestamp) (for example, if the large model is a speech-to-text ASR large model and the current microphone is occupied by multiple services, the result can be returned according to the timestamp);
[0159] 2. After verification, execute Figure 5 The overall calling process shown:
[0160] It should be noted that the first model of the first intelligent agent on the terminal side may include an intent analysis sub-model, a personalization processing sub-model, and multiple first sub-models with different functions; the second model of the first intelligent agent deployed on the server side may include a data format processing sub-model, multiple second sub-models with different functions, and a security detection sub-model; it can be understood that the function of the first sub-model may be different from that of the second sub-model.
[0161] From this, it can be seen that the large model system service of the intelligent body is deployed on the server side, and the terminal side can have the first-layer terminal-side small model (that is, the first model mentioned above) according to the device capabilities to realize the model tool call (FunctionCall) function of the local application.
[0162] The user inputs the first input content (for example, text input, voice input, picture input, etc.) in the terminal, triggering the terminal to call the intention molecule sub-model to determine the first target sub-model to be called currently according to the first input content; and call the personalized processing sub-model to add the user's preference information to the first input content;
[0163] Wherein, if the first target sub-model currently required to be called does not exist on the terminal side, the terminal sends the first input content containing the user preference information to the server, so that the server calls the security detection sub-model to perform a security detection on the first input content. If the security detection is passed, the data format processing sub-model is called to perform a standardized processing on the first input content; thereby calling the first target sub-model on the server side (for example, Figure 5 The first input content is processed by the semantic big model, automatic speech recognition (ASR) big model, text to speech (TTS) big model, text-to-image big model, image-to-image big model, and image-to-video big model) shown in the figure to obtain the second content, and then the security detection sub-model is called to perform a security detection on the second content, and if the security detection is passed, the second content (for example, text output, voice output, and picture output) is returned to the terminal;
[0164] After receiving the second content, the terminal calls the personalized processing sub-model to process the second content into content that conforms to the user preference information, so as to display it on the terminal side.
[0165] In addition, when there is a first target sub-model that needs to be called on the terminal side, the terminal calls the first target sub-model to process the first input content containing user preference information to obtain the second content, and then calls the personalized processing sub-model to process it into content that conforms to the user preference information, so as to be displayed on the terminal side.
[0166] Optionally, the user can also configure personalized parameters for calling the calling process of the above-mentioned personalized processing sub-model, so that the processing result of the intelligent agent is more in line with the personalized needs of the user.
[0167] Optionally, both the server side and the terminal side may store their own FunctionCall tool capability lists to record the tool functions of the deployed sub-models.
[0168] Optionally, the above-mentioned personalized processing sub-model can be stored on the terminal side after distillation, thereby saving storage space of the terminal.
[0169] Furthermore, in order to save more resources, the following processing methods can be adopted:
[0170] (1) For example, for text-to-speech generation applications of long texts, the return URL link is used to reduce the resource consumption on the RTOS terminal side and the parallel scheduling development workflow. The audio data in the URL link is generated and supplemented by the server side in real time, and the system hardware synchronization on the RTOS terminal side only plays the URL link, solving the bottleneck problems of insufficient RTOS system resources, such as difficulty in calling audio and video conversion functions, slow generation speed, and insufficient running space.
[0171] (2) For video generation applications, real-time online calls are implemented through the m3u8 format, so as to achieve real-time terminal-side playback and server-side synchronous generation of multimodal content on the RTOS system. Among them, m3u8 is a video playback standard.
[0172] (3) For digital human interaction applications on the terminal side, a certain number of short video clips are generated in the RTOS system, and then the semantic large model summarizes its own output content, outputs formatted expression, action, demeanor and other driving data, and realizes digital human driving on the RTOS system.
[0173] In addition, in order to facilitate the understanding of the above-mentioned chain parallel call, the following example is given below:
[0174] Example 1: When the first input content is text input, for example, the first target sub-model to be called includes at least one of the following: semantic large model, TTS large model, and text-based image large model, then the chain call process for text input; Figure 6 As shown:
[0175] Determine whether the voice of the text input needs to be output. If so, call the TTS big model to return the voice content generated by the TTS big model to the terminal; if not, call the semantic big model to obtain the result of the voice big model;
[0176] Determine whether a text result needs to be output. If a text result needs to be output, return the text content output by the semantic large model to the terminal; if a text result does not need to be output, determine whether a voice result needs to be output. If a voice result needs to be output, call the TTS large model to convert the result of the semantic large model into voice content, and then return the converted voice content to the terminal;
[0177] If it is not necessary to output the speech result, determine whether it is necessary to output the image result. If it is necessary to output the image result, call the text-image model to convert the result of the semantic model into image content, and then return the converted image content to the terminal.
[0178] It can be seen that if the output of a large model belongs to the input of another large model, the output of the large model can be automatically input into the other large model to realize chain calling; wherein, the process of chain calling is automatically executed, and does not require user intervention, and the user is not aware of it; and in the calling process, the above text input can be processed according to the first predetermined length, that is, a text input with a length of Y can be divided into multiple segments of the first predetermined length in order, and these multiple segments can be divided into multiple segments of the first predetermined length in order. Figure 6 The process shown implements chain calling, and the processing of each fragment can be parallel, so that chain parallel calling of text input can be implemented.
[0179] Example 2: When the first input content is voice input, for example, the first target sub-model to be called includes at least one of the following: semantic large model, ASR large model, and text-based image large model, then the chain call process for voice input; Figure 7 As shown:
[0180] Determine whether the text of the above voice input needs to be output. If so, call the ASR large model to return the text content generated by the ASR large model to the terminal; if not, call the semantic large model to obtain the result of the voice large model;
[0181] Determine whether a text result needs to be output. If a text result needs to be output, return the text content output by the semantic large model to the terminal; if a text result does not need to be output, determine whether a voice result needs to be output. If a voice result needs to be output, call the TTS large model to convert the result of the semantic large model into voice content, and then return the converted voice content to the terminal;
[0182] If it is not necessary to output the speech result, determine whether it is necessary to output the image result. If it is necessary to output the image result, call the text-image model to convert the result of the semantic model into image content, and then return the converted image content to the terminal.
[0183] It can be seen that in the above calling process, if the output of a large model belongs to the input of another large model, the output of the large model can be automatically input into the other large model to realize chain calling; wherein, the process of the chain calling is automatically executed, and does not require user intervention, and the user is not aware of it; and in the calling process, the above voice input can be processed according to the second predetermined length, that is, a voice input with a length of Z can be divided into multiple segments of the second predetermined length in order, and these multiple segments can be divided into multiple segments of the second predetermined length in order. Figure 7 The process shown implements chain calling, and the processing of each fragment can be parallel, so that chain parallel calling of voice input can be implemented.
[0184] Example 3: When the first input content is an image input, for example, the first target sub-model to be called includes at least one of the following: a multimodal large model, an OCR large model, and a text image large model, then the chain call process for voice input; Figure 8 As shown:
[0185] Determine whether the text of the image input needs to be output. If so, call the OCR large model to return the text content generated by the OCR large model to the terminal; if not, call the multimodal large model to obtain the result of the multimodal large model;
[0186] Determine whether a text result needs to be output. If so, return the text content output by the multimodal large model to the terminal. If text result does not need to be output, determine whether a voice result needs to be output. If so, call the TTS large model to convert the result of the multimodal large model into voice content, and return the converted voice content to the terminal.
[0187] If it is not necessary to output the voice result, determine whether it is necessary to output the image result. If it is necessary to output the image result, call the text-image large model to convert the result of the multimodal large model into image content, and then return the converted image content to the terminal.
[0188] It can be seen that in the above calling process, if the output of a large model belongs to the input of another large model, the output of the large model can be automatically input into the other large model to realize chain calling; wherein, the process of chain calling is automatically executed, and no user intervention is required, and the user is not aware of it; and in the calling process, the above image input can be divided into multiple regional segments according to a predetermined size, and these multiple segments can be divided into multiple regional segments according to a predetermined size. Figure 8 The process shown implements chain calling, and the processing of each fragment can be parallel, so that chain parallel calling of image input can be implemented.
[0189] 3. Agent update process, such as Fig. 9 As shown:
[0190] The terminal starts the SDK and reports the device identification code of the terminal and the version, status and personalized information of the first intelligent agent to the server; the server queries the device capability information of the terminal according to the device identification code, and performs personalized summary according to the version information and personalized information of the first intelligent agent in combination with the call data of the first intelligent agent, thereby updating the operating parameters of the first intelligent agent, including the first operating parameters of the first model deployed on the terminal and at least part of the second operating parameters of the second model deployed on the server side, such as updating the PromptTemplate of the model, thereby sending the updated operating parameters of the first model of the new intelligent agent on the terminal side to the terminal through the SDK, and updating the operating parameters of the second model on the server side. After the update is completed, the heartbeat keep-alive can be turned off.
[0191] To sum up, the embodiments of the present application can realize the dynamic loading of intelligent agents, and solve the data alignment problem of different large models by standardizing the formats of various input and output on the server side; at the same time, it solves the data caching and interaction problems between multiple threads in the real-time streaming large model calling process, and solves the problem of not being able to dynamically load AI agents under the low memory and low storage characteristics of the smart terminal RTOS system through dynamic data encoding or URL playback and other transmission technologies.
[0192] The above introduces the model processing method of the intelligent agent provided in the embodiment of the present application. The following will introduce the model processing device of the intelligent agent provided in the embodiment of the present application in conjunction with the accompanying drawings.
[0193] See also Fig.10 The embodiment of the present application also provides a model processing device of an intelligent agent, which is applied to a terminal, and the device includes:
[0194] The first acquisition module 1001 is used to acquire application scenario information;
[0195] A first sending module 1002, configured to send the application scenario information and the device capability information of the terminal to a server;
[0196] A loading module 1003 is used to load a first model of a first agent, wherein the first agent is an agent determined by the server and matches the application scenario information and the device capability information of the terminal;
[0197] The first receiving module 1004 is used to receive the first operating parameter of the first model sent by the server and save the first operating parameter.
[0198] Optionally, the first agent further includes a second model deployed on the server side; the device further includes:
[0199] A second acquisition module, used to acquire the first input content;
[0200] an interactive processing module, interacting with the server, and based on at least one of the first operating parameter and the second operating parameter, calling at least one of the first model and the second model to process the first input content to obtain second content, wherein the second operating parameter includes an operating parameter of the second model, and the second model includes a plurality of sub-models that operate in a chain parallel manner;
[0201] A display module is used to display the second content.
[0202] Optionally, the first model includes an intention analysis sub-model and a plurality of first sub-models with different functions other than the intention analysis sub-model;
[0203] The interaction processing module is specifically used for:
[0204] Based on the operating parameters of the intention analysis sub-model in the first operating parameters, calling the intention analysis sub-model to process the first input content, and determining the first target sub-model that needs to be called currently;
[0205] In the case that the first target sub-model exists in the plurality of the first sub-models, based on the operating parameters of the first target sub-model in the first operating parameters, calling the first target sub-model to process the first input content to obtain the second content;
[0206] When the first target sub-model does not exist in multiple first sub-models, the first input content is sent to the server, so that the server calls the first input content of the first target sub-model in the second model in a chained parallel manner based on the operating parameters of the first target sub-model in the second operating parameters to process and obtain the second content; and receives the second content sent by the server.
[0207] Optionally, the first model further includes a personalized processing sub-model;
[0208] The device also includes:
[0209] a first processing module, configured to obtain user preference information through the personalized processing sub-model based on the operating parameters of the personalized processing sub-module in the first operating parameters, and add the user preference information to the first input content;
[0210] The second processing module is used to call the personalized processing submodule to process the second content into content that conforms to the user preference information based on the operating parameters of the personalized processing submodule in the first operating parameters.
[0211] See also Fig.11 The embodiment of the present application also provides a model processing device of an intelligent agent, which is applied to a terminal, and the device includes:
[0212] The second receiving module 1101 is used to receive application scenario information and device capability information of the terminal sent by the terminal;
[0213] A determination module 1102 is used to determine a first agent that matches the application scenario information and the device capability information;
[0214] The second sending module 1103 is used to send the first model of the first agent and the first operating parameters of the first model to the terminal.
[0215] Optionally, the server stores a second operating parameter of a second model of the first agent; and the device further includes:
[0216] A third receiving module, configured to receive first input content sent by the terminal;
[0217] a third processing module, configured to call the first target sub-model in a chained parallel manner to process the first input content based on the operating parameters of the first target sub-model in the second operating parameters to obtain second content, wherein the first target sub-model is a sub-model currently required to be called in the sub-models included in the second model and determined according to the first input content;
[0218] The third sending module is configured to send the second content to the terminal.
[0219] It should be noted that the division of units in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0220] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a processor-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[0221] It should be noted here that the above-mentioned device provided in the embodiment of the present application can implement all the method steps implemented in the above-mentioned method embodiment, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as those in the method embodiment will not be described in detail here.
[0222] The embodiment of the present application also provides an electronic device, such as Fig.12 As shown, the electronic device includes a memory 1220, a transceiver 1210, and a processor 1200;
[0223] A memory 1220, used for storing computer programs;
[0224] The transceiver 1210 is used to receive and send data under the control of the processor 1200;
[0225] In a first aspect, when the electronic device is used as a terminal, the processor 1200 is used to read the computer program in the memory 1220 and execute the model processing method of the intelligent agent described in the first aspect;
[0226] In the second aspect, when the electronic device acts as a server, the processor 1200 is used to read the computer program in the memory 1220 and execute the model processing method of the intelligent agent described in the second aspect.
[0227] Among them, Fig.12In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by processor 1200 and various circuits of memory represented by memory 1220 are linked together. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 1210 may be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium, which transmission medium may include a wireless channel, a wired channel, an optical cable, and other transmission media. The processor 1200 is responsible for managing the bus architecture and general processing, and the memory 1220 may store data used by the processor 1200 when performing operations.
[0228] The processor 1200 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or a complex programmable logic device (CPLD). The processor 1200 may also adopt a multi-core architecture.
[0229] It should be noted here that the above-mentioned device provided in the embodiment of the present application can implement all the method steps implemented in the above-mentioned method embodiment, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as those in the method embodiment will not be described in detail here.
[0230] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the model processing method of the intelligent agent described in the first aspect above is implemented, or the model processing method of the intelligent agent described in the second aspect above is implemented.
[0231] The computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (Magnet-Optica, MO)), etc.), optical storage (such as Compact Disk (CD), Digital Versatile Disc (DVD), Blu-ray Disc (BD), Holographic Versatile Disc (HVD), etc.), and semiconductor memory (such as Read-Only Memory (ROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read Only Memory (EEPROM), non-volatile memory (NAND FLASH), solid-state drive (Solid State Disk or Solid State Drive, SSD)), etc.
[0232] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.
[0233] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer executable instructions. These computer executable instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0234] These processor executable instructions may also be stored in a processor readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the processor readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0235] These processor-executable instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0236] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A model processing method for an intelligent agent, characterized in that: Applied to a terminal, the method comprises: Get application scenario information; Sending the application scenario information and the device capability information of the terminal to a server; Loading a first model of a first agent, wherein the first agent is an agent determined by the server and matches the application scenario information and the device capability information of the terminal; Receive the first operating parameter of the first model sent by the server, and save the first operating parameter.
2. The method according to claim 1, characterized in that The first agent also includes a second model deployed on the server side; After saving the first operating parameter, the method further includes: Get the first input content; interacting with the server, and based on at least one of the first operating parameter and the second operating parameter, calling at least one of the first model and the second model to process the first input content to obtain second content, wherein the second operating parameter includes an operating parameter of the second model, and the second model includes a plurality of sub-models that run in a chained parallel manner; The second content is displayed.
3. The method according to claim 2, characterized in that The first model includes an intention analysis sub-model and a plurality of first sub-models with different functions other than the intention analysis sub-model; The interacting with the server, based on at least one of the first operating parameter and the second operating parameter, calling at least one of the first model and the second model to process the first input content to obtain the second content, includes: Based on the operating parameters of the intention analysis sub-model in the first operating parameters, calling the intention analysis sub-model to process the first input content, and determining the first target sub-model that needs to be called currently; In the case that the first target sub-model exists in the plurality of the first sub-models, based on the operating parameters of the first target sub-model in the first operating parameters, calling the first target sub-model to process the first input content to obtain the second content; When the first target sub-model does not exist in multiple first sub-models, the first input content is sent to the server, so that the server calls the first input content of the first target sub-model in the second model in a chained parallel manner based on the operating parameters of the first target sub-model in the second operating parameters to process and obtain the second content; and the second content sent by the server is received.
4. The method according to claim 3, characterized in that The first model further includes a personalized processing sub-model. Before sending the first input content to the server, the method further includes: Based on the operating parameters of the personalized processing submodule in the first operating parameters, obtaining user preference information through the personalized processing submodule, and adding the user preference information to the first input content; Before displaying the second content, the method further includes: Based on the operating parameters of the personalized processing submodule in the first operating parameters, the personalized processing submodule is called to process the second content into content that conforms to the user preference information.
5. A model processing method for an intelligent agent, characterized in that: Applied to a server, the method comprises: Receiving application scenario information and device capability information of the terminal sent by the terminal; Determining a first agent that matches the application scenario information and the device capability information; A first model of the first agent and first operating parameters of the first model are sent to the terminal.
6. The method according to claim 5, characterized in that The server stores second operating parameters of the second model of the first agent; After sending the first model of the first agent and the first operating parameter of the first model to the terminal, the method further includes: receiving first input content sent by the terminal; Based on the operation parameters of the first target sub-model in the second operation parameters, calling the first target sub-model in a chained parallel manner to process the first input content to obtain second content, wherein the first target sub-model is a sub-model currently required to be called in the sub-models included in the second model and determined according to the first input content; The second content is sent to the terminal.
7. A model processing device for an intelligent agent, characterized in that: Applied to a terminal, the device comprises: A first acquisition module is used to acquire application scenario information; A first sending module, used to send the application scenario information and the device capability information of the terminal to a server; A loading module, used to load a first model of a first agent, wherein the first agent is an agent determined by the server and matches the application scenario information and the device capability information of the terminal; The first receiving module is used to receive the first operating parameter of the first model sent by the server and save the first operating parameter.
8. A model processing device for an intelligent agent, characterized in that: Applied to a server, the device comprises: A second receiving module, used to receive application scenario information and device capability information of the terminal sent by the terminal; A determination module, configured to determine a first agent that matches the application scenario information and the device capability information; The second sending module is used to send the first model of the first agent and the first operating parameters of the first model to the terminal.
9. An electronic device, characterized in that: Including memory, transceiver, processor: Memory for storing computer programs; a transceiver, for transmitting and receiving data under the control of the processor; A processor, configured to read the computer program in the memory and execute the model processing method of the intelligent agent described in any one of claims 1 to 4, or execute the model processing method of the intelligent agent described in any one of claims 5 to 6.
10. A readable storage medium, characterized in that: The readable storage medium stores programs or instructions, and when the programs or instructions are executed by the processor, the model processing method of the intelligent agent as described in any one of claims 1 to 4 is implemented, or the model processing method of the intelligent agent as described in any one of claims 5 to 6 is implemented.
Citation Information
Cited By
Vehicle control method and device, electronic equipment, vehicle and storage medium
CN120922050A