Interaction method and device, equipment and storage medium

Organize and coordinate agents through graph structure and build state diagrams using a large language model library, solving the problem of insufficient decision-making flexibility in complex task scenarios by existing agent systems, and achieving efficient independent decision-making and execution.

CN120011477APending Publication Date: 2025-05-16SHANDONG INSPUR SCI RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510140155.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-08
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

Existing agent systems are difficult to deal with in complex and changeable task scenarios due to the lack of flexible collaboration mechanisms and unified task planning and resource scheduling mechanisms.

Method used

Organize and coordinate multiple agents through a graph structure, use the preset large language model library to build an initial state diagram, and build a target state diagram through message delivery relationships, and execute preset interactive tasks to achieve independent decision-making and execution.

Benefits of technology

It realizes independent decision-making and execution of complex tasks, improves the flexibility of the agent's decision-making, and can more effectively deal with complex and changeable task scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120011477A_ABST
    Figure CN120011477A_ABST
Patent Text Reader

Abstract

The invention discloses an interaction method and device, equipment and a storage medium, and relates to the technical field of artificial intelligence, and the method comprises the steps: building an initial state diagram based on a preset large language model library, and defining the state of the initial state diagram; defining nodes in the initial state diagram according to the state of the initial state diagram, and determining a routing function of each node, so as to determine a message passing relationship among the nodes according to the routing functions; and loading a preset large model to each node, constructing a target state diagram based on the message passing relationship according to the current initial state diagram, and executing a preset interaction task by using the preset large model through the target state diagram. According to the method, multiple agents can be organized and coordinated in a graph structuring mode, autonomous decision making and execution of complex tasks are achieved, and the decision making flexibility of the agents is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an interaction method, device, equipment and storage medium. Background Art

[0002] Current intelligent agent systems usually organize multiple agents in a linear or parallel manner, lacking a flexible collaboration mechanism. As a result, they may have difficulty coping with complex and changing task scenarios due to the single interaction mode between agents and the lack of a unified task planning and resource scheduling mechanism. Therefore, improving the interaction effect of intelligent agents is a problem to be solved in this field. Summary of the invention

[0003] In view of this, the purpose of the present invention is to provide an interactive method, device, equipment and storage medium, which can organize and coordinate multiple intelligent agents in a graph-structured manner, realize autonomous decision-making and execution of complex tasks, and flexibility of intelligent agent decision-making. The specific scheme is as follows:

[0004] In a first aspect, the present application provides an interaction method, comprising:

[0005] Constructing an initial state graph based on a preset large language model library, and defining states of the initial state graph;

[0006] Defining nodes in the initial state graph according to the states of the initial state graph, and determining a routing function of each of the nodes, so as to determine a message transmission relationship between the nodes according to the routing function;

[0007] The preset large model is loaded into each of the nodes, a target state diagram is constructed based on the message passing relationship according to the current initial state diagram, and the preset interaction task is performed using the preset large model through the target state diagram.

[0008] Optionally, after performing a preset interactive task using the preset large model through the target state diagram, the method further includes:

[0009] After the preset interactive task is executed, determining the node parameters corresponding to each node in the target state diagram;

[0010] The attribute value of the state is updated according to the node parameter.

[0011] Optionally, updating the attribute value of the state according to the node parameter includes:

[0012] Update the corresponding attribute value in the state based on the annotation information in the node parameter;

[0013] Or, the annotation information in the node parameters is added to the state.

[0014] Optionally, after determining the routing function of each of the nodes, the method further includes:

[0015] The edge conditions of each of the nodes during operation are determined, so as to determine the message transmission relationship between the nodes according to the edge conditions and the routing function.

[0016] Optionally, the process of executing a preset interactive task by using the preset large model through the target state diagram includes:

[0017] Determine a target node according to the edge condition through the target state diagram; the target node is a node running when executing the preset interactive task;

[0018] The preset interactive task is performed using the preset large model corresponding to the target node.

[0019] Optionally, the process of executing a preset interactive task by using the preset large model through the target state diagram further includes:

[0020] Generate a random weight corresponding to the message passing relationship between the nodes by a quantum random number generator;

[0021] Correspondingly, determining the target node according to the edge condition through the target state diagram includes:

[0022] The target node is determined according to the edge condition and the random weight through the target state diagram.

[0023] Optionally, the process of executing the preset interactive task by using the preset large model corresponding to the target node includes:

[0024] After the preset large model corresponding to the current target node is run, determining the running result output by the current target node;

[0025] The next target node is determined according to the running result, so as to continue running the preset large model corresponding to the next target node to perform the preset interactive task.

[0026] In a second aspect, the present application provides an interactive device, including:

[0027] A state definition module, used to construct an initial state diagram based on a preset large language model library and define the state of the initial state diagram;

[0028] A function determination module, used to define nodes in the initial state graph according to the states of the initial state graph, and determine a routing function of each of the nodes, so as to determine a message transmission relationship between each of the nodes according to the routing function;

[0029] The task interaction module is used to load the preset large model to each of the nodes, construct a target state diagram based on the message passing relationship according to the current initial state diagram, and execute the preset interaction task using the preset large model through the target state diagram.

[0030] In a third aspect, the present application provides an electronic device, comprising a processor and a memory; wherein the memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement the aforementioned interaction method.

[0031] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program, which implements the aforementioned interaction method when executed by a processor.

[0032] The present application can first construct an initial state graph based on a preset large language model library and define the state of the initial state graph, then define the nodes in the initial state graph according to the state of the initial state graph, and determine the routing function of each node, so as to determine the message passing relationship between each node according to the routing function, and then load the preset large model to each node, and construct a target state graph based on the message passing relationship according to the current initial state graph, so as to perform the preset interactive task through the target state graph using the preset large model. Through the above technical scheme, the present application can design a graph data flow, and then after the nodes in the graph obtain valid information through the parameters in the state, the state graph can determine the path that needs to be currently adopted according to the output of the node, and in the present application, before the node runs, the path adopted is unknown and needs to be determined by the large model. In this way, multiple intelligent agents can be organized and coordinated in a graph-structured manner to achieve autonomous decision-making and execution of complex tasks, which helps to improve the flexibility of intelligent agent decision-making. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0034] Figure 1 A flow chart of an interactive method provided for this application;

[0035] Figure 2 A LangGraph-based agent interaction flow chart provided for this application;

[0036] Figure 3 A specific interactive method flow chart provided for this application;

[0037] Figure 4 A schematic diagram of the structure of an interactive device provided in this application;

[0038] Figure 5 A structural diagram of an electronic device provided for this application. DETAILED DESCRIPTION

[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0040] Current intelligent agent systems usually organize multiple intelligent agents in a linear or parallel manner. Due to the single interaction mode between intelligent agents and the lack of a unified task planning and resource scheduling mechanism, it may be difficult to cope with complex and changeable task scenarios. However, the present application can design a graph data flow, and then the nodes in the graph obtain effective information through the parameters in the state. The state graph can determine the current path to be taken based on the output of the node. Multiple intelligent agents can be organized and coordinated in a graph-structured manner to achieve autonomous decision-making and execution of complex tasks, which helps to improve the flexibility of intelligent agent decision-making.

[0041] See also Figure 1 As shown, an embodiment of the present invention discloses an interaction method, including:

[0042] Step S11: construct an initial state graph based on a preset large language model library, and define the state of the initial state graph.

[0043] It should be pointed out that the preset large language model library in this embodiment mainly refers to LangGraph, which can be used to organize and coordinate multiple agents in a graph-structured manner to achieve autonomous decision-making and execution of complex tasks. First, an initial state graph can be constructed based on LangGraph, and the state of the initial state graph can be defined. Specifically, it can be understood that in this embodiment, the graph state mode of LangGraph needs to be defined first, and each node in the graph is set to obtain valid information through the parameters in State, so the parameters in State need to be defined first.

[0044] Step S12: defining nodes in the initial state graph according to the states of the initial state graph, and determining a routing function of each of the nodes, so as to determine a message passing relationship between the nodes according to the routing function.

[0045] In this embodiment, the nodes in the initial state diagram can be defined according to the state of the initial state diagram (parameters in State), and the routing function of each node can be determined to determine the message passing relationship between each node according to the routing function. In other words, each node in the diagram obtains valid information through the parameters in State, and then the routing function of each node can be determined to determine the message passing relationship between each node according to the routing function. And after executing the internal logic of the node, the value in the corresponding State state of the node can be updated. It should be pointed out that in different state modes, specific attributes of the state can be set or added to existing attributes through annotations.

[0046] Step S13, loading the preset large model into each of the nodes, constructing a target state diagram based on the message passing relationship according to the current initial state diagram, and executing the preset interactive task using the preset large model through the target state diagram.

[0047] In this embodiment, the preset large model can be loaded to each node, and then the target state diagram can be constructed based on the message passing relationship according to the current initial state diagram, and the preset interactive task can be performed using the preset large model through the target state diagram. Based on all the above components, a graph structure can be constructed to perform corresponding interactive tasks. That is, in this embodiment, before executing the interactive task, the interactive function of the large model corresponding to each node can be constructed, that is, the large model that the user wants to use can be loaded through the node function corresponding to each node, wherein the above large model needs to meet the following conditions:

[0048] 1. Large models should be used with messages, because the state of the graph is mainly a list of messages;

[0049] 2. Large models need to be used with tool calls, which use pre-built ToolNodes internally.

[0050] In addition, in this embodiment, after the preset interactive task is executed, the node parameters corresponding to each node in the target state diagram can be determined, and the attribute value of the state can be updated according to the node parameters. The specific operation of updating the attribute value includes but is not limited to: updating the corresponding attribute value in the state based on the annotation information in the node parameters; or, adding the annotation information in the node parameters to the state.

[0051] In this embodiment, an initial state graph can be constructed based on a preset large language model library, and the state of the initial state graph can be defined. Then, nodes in the initial state graph can be defined according to the state of the initial state graph, and the routing function of each node can be determined to determine the message passing relationship between each node according to the routing function. Then, the preset large model can be loaded to each node, and a target state graph can be constructed based on the message passing relationship according to the current initial state graph, so as to perform the preset interactive task using the preset large model through the target state graph. Through the above technical solution, a graph data flow can be designed, and then after the nodes in the graph obtain valid information through the parameters in the state, the state graph can determine the path that needs to be currently adopted according to the output of the node, and before the node runs, the adopted path is unknown and needs to be determined by the large model. In this way, multiple intelligent agents can be organized and coordinated in a graph-structured manner to achieve autonomous decision-making and execution of complex tasks, which helps to improve the flexibility of intelligent agent decision-making.

[0052] Based on the previous embodiment, it can be seen that the present application can organize and coordinate intelligent agents in a graph-structured manner to achieve the interaction of complex tasks. Next, the interaction process of the task will be described in detail in this embodiment. Figure 3 As shown, the embodiment of the present application discloses a specific interaction method, including:

[0053] Step S21: construct an initial state graph based on a preset large language model library, and define the state of the initial state graph.

[0054] Step S22: define nodes in the initial state graph according to the states of the initial state graph, and determine the routing function of each node.

[0055] Step S23: determining edge conditions of each of the nodes during operation, so as to determine a message transmission relationship between the nodes according to the edge conditions and the routing function.

[0056] In this embodiment, when determining the edges between the nodes in the graph, that is, the routing function, the edge conditions of each node when running can be determined, so as to determine the message passing relationship between the nodes based on the edge conditions and the routing function. That is to say, in this embodiment, the edge conditions of each node can be set, that is, according to the output of the node, one of the multiple paths corresponding to the node can be adopted. In this way, before the node runs, the path adopted is unknown, which can further enhance the flexibility and unpredictability of the agent's decision-making. Regarding the conditional edges corresponding to some nodes, after calling the agent, if the agent says that it wants to take action, then the function of the preset calling tool should be called. If the agent indicates that it has been completed, then the corresponding action of the node is set to complete; the normal edges in the corresponding graph should always be returned to the agent after calling the tool to decide what to do next.

[0057] Step S24, load the preset large model to each of the nodes, build a target state diagram based on the message passing relationship according to the current initial state diagram, and determine the target node according to the edge condition through the target state diagram, so as to use the preset large model corresponding to the target node to perform the preset interaction task.

[0058] In this embodiment, based on the above-mentioned edge conditions, after loading the preset large model to each node, the target state diagram can be constructed based on the message passing relationship according to the current initial state diagram, and the target node can be determined according to the edge conditions through the target state diagram, so as to use the preset large model corresponding to the target node to perform the preset interactive task. Correspondingly, in the process of performing the preset interactive task using the preset large model through the target state diagram, the target node can be determined according to the edge conditions through the target state diagram, where the target node is the node running when the preset interactive task is performed; then the preset large model corresponding to the target node is used to perform the preset interactive task. Specifically, in the process of performing the preset interactive task using the preset large model corresponding to the target node, after the preset large model corresponding to the current target node is completed, the running result output by the current target node can be determined, and the next target node can be determined according to the running result, so as to continue to run the preset large model corresponding to the next target node to perform the preset interactive task.

[0059] It should also be pointed out that in the above process, the random weight corresponding to the message passing relationship between each node can also be generated by a quantum random number generator, so as to determine the target node according to the edge conditions and random weights through the target state diagram. In this embodiment, in the decision-making process of the intelligent agent, a dynamic path selection mechanism based on quantum random number generation is introduced, through which a quantum random number generator (QRNG, Quantum Random Number Generator) can be used to provide a random weight for the path selection of each node. In this way, when making decisions, the large model not only considers the output of the node and the preset edge conditions, but also combines the random weights provided by the quantum random number generator to dynamically select the optimal path. By introducing a dynamic path selection mechanism based on quantum random number generation in the decision-making process of the intelligent agent, the flexibility and unpredictability of the intelligent agent's decision can be significantly improved, which is particularly suitable for task scenarios that require high dynamics and randomness, such as autonomous navigation and game confrontation in complex environments.

[0060] For more specific processing procedures of the above steps S21 and S22, reference may be made to the corresponding contents disclosed in the above embodiments, which will not be described in detail here.

[0061] In this embodiment, a graph data flow can be designed, and each node obtains valid information through the parameters in the State. After executing the internal logic of the node, the value in the State state is updated, and edge conditions can be defined. According to the output of the node, one of multiple paths can be adopted. In addition, a dynamic path selection mechanism based on quantum random number generation is introduced to further improve the flexibility and unpredictability of the agent's decision-making. Specifically based on the above technical solution, LangGraph is used to introduce a dynamic path selection mechanism based on quantum random number generation in the agent design. The unpredictability and high entropy characteristics of quantum random numbers can be used to provide dynamic random weights for the agent's path selection, thereby achieving more flexible and unpredictable decisions in complex task scenarios. In this way, not only the autonomy and adaptability of the agent are improved, but also a new technical solution is provided for random decision-making in the field of artificial intelligence.

[0062] See also Figure 4 As shown, the embodiment of the present application also discloses an interactive device, including:

[0063] A state definition module 11 is used to construct an initial state diagram based on a preset large language model library and define the state of the initial state diagram;

[0064] A function determination module 12, used to define nodes in the initial state diagram according to the states of the initial state diagram, and determine a routing function of each of the nodes, so as to determine a message transmission relationship between the nodes according to the routing function;

[0065] The task interaction module 13 is used to load the preset large model to each of the nodes, construct a target state diagram based on the message passing relationship according to the current initial state diagram, and execute the preset interaction task using the preset large model through the target state diagram.

[0066] This embodiment can first build an initial state graph based on a preset large language model library and define the state of the initial state graph, then define the nodes in the initial state graph according to the state of the initial state graph, and determine the routing function of each node, so as to determine the message passing relationship between each node according to the routing function, and then load the preset large model to each node, and build a target state graph based on the message passing relationship according to the current initial state graph, so as to perform the preset interactive task through the target state graph using the preset large model. Through the above technical scheme, the graph data flow can be designed, and then the nodes in the graph obtain valid information through the parameters in the state. The state graph can determine the path that needs to be taken at present according to the output of the node, and before the node runs, the path taken is unknown and needs to be determined by the large model. In this way, multiple intelligent agents can be organized and coordinated in a graph-structured manner to achieve autonomous decision-making and execution of complex tasks, which helps to improve the flexibility of intelligent agent decision-making.

[0067] In some specific embodiments, the interaction device further includes:

[0068] A parameter determination module, used to determine the node parameters corresponding to each node in the target state diagram after the preset interactive task is executed;

[0069] A parameter updating module is used to update the attribute value of the state according to the node parameter.

[0070] In some specific embodiments, the parameter updating module specifically includes:

[0071] A parameter updating unit, configured to update the corresponding attribute value in the state based on the annotation information in the node parameter;

[0072] A parameter adding unit is used to add the annotation information in the node parameter to the state.

[0073] In some specific embodiments, the interaction device further includes:

[0074] The relationship determination module is used to determine the edge conditions of each node during operation, so as to determine the message transmission relationship between each node according to the edge conditions and the routing function.

[0075] In some specific embodiments, the task interaction module 13 specifically includes:

[0076] A node determination submodule, used to determine a target node according to the edge condition through the target state diagram; the target node is a node running when executing the preset interactive task;

[0077] The task execution submodule is used to execute the preset interactive task using the preset large model corresponding to the target node.

[0078] In some specific embodiments, the interaction device further includes:

[0079] A weight determination unit, configured to generate a random weight corresponding to the message transmission relationship between the nodes through a quantum random number generator;

[0080] Correspondingly, the node determination submodule specifically includes:

[0081] The first node determination unit is used to determine the target node according to the edge condition and the random weight through the target state diagram.

[0082] In some specific embodiments, the task interaction module 13 specifically includes:

[0083] A result determination unit, used to determine the operation result output by the current target node after the preset large model corresponding to the current target node is completed;

[0084] The second node determination unit is used to determine the next target node according to the operation result, so as to continue to run the preset large model corresponding to the next target node to perform the preset interactive task.

[0085] Furthermore, the present application also discloses an electronic device. Figure 5 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.

[0086] Figure 5 A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the interaction method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0087] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0088] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0089] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, and may be Windows Server, Netware, Unix, Linux, etc. In addition to computer programs that can be used to complete the interactive method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 may further include computer programs that can be used to complete other specific tasks.

[0090] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned disclosed interactive method. The specific steps of the method can refer to the corresponding contents disclosed in the aforementioned embodiments, and will not be repeated here.

[0091] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0092] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0093] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0094] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0095] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. An interactive method, characterized in that: include: Building an initial state graph based on a preset large language model library, and defining states of the initial state graph; Defining nodes in the initial state graph according to the states of the initial state graph, and determining a routing function of each of the nodes, so as to determine a message transmission relationship between the nodes according to the routing function; The preset large model is loaded into each of the nodes, a target state diagram is constructed based on the message passing relationship according to the current initial state diagram, and the preset interaction task is performed using the preset large model through the target state diagram.

2. The interactive method according to claim 1, characterized in that: After the preset interactive task is performed by the preset large model through the target state diagram, the method further includes: After the preset interactive task is executed, determining the node parameters corresponding to each node in the target state diagram; The attribute value of the state is updated according to the node parameter.

3. The interactive method according to claim 2, characterized in that: The updating of the attribute value of the state according to the node parameter includes: Update the corresponding attribute value in the state based on the annotation information in the node parameter; Or, the annotation information in the node parameters is added to the state.

4. The interactive method according to any one of claims 1 to 3, characterized in that: After determining the routing function of each node, the method further includes: The edge conditions of each of the nodes during operation are determined, so as to determine the message transmission relationship between the nodes according to the edge conditions and the routing function.

5. The interactive method according to claim 4, characterized in that: The process of executing the preset interactive task by using the preset large model through the target state diagram includes: Determine a target node according to the edge condition through the target state diagram; the target node is a node running when executing the preset interactive task; The preset interactive task is performed using the preset large model corresponding to the target node.

6. The interactive method according to claim 5, characterized in that: The process of executing the preset interactive task by using the preset large model through the target state diagram also includes: Generate a random weight corresponding to the message passing relationship between the nodes by a quantum random number generator; Correspondingly, determining the target node according to the edge condition through the target state diagram includes: The target node is determined according to the edge condition and the random weight through the target state diagram.

7. The interactive method according to claim 5, characterized in that: The process of executing the preset interactive task by using the preset large model corresponding to the target node includes: After the preset large model corresponding to the current target node is run, determining the running result output by the current target node; The next target node is determined according to the running result, so as to continue running the preset large model corresponding to the next target node to perform the preset interactive task.

8. An interactive device, characterized in that: include: A state definition module, used to construct an initial state diagram based on a preset large language model library and define the state of the initial state diagram; A function determination module, used to define nodes in the initial state graph according to the states of the initial state graph, and determine a routing function of each of the nodes, so as to determine a message transmission relationship between each of the nodes according to the routing function; The task interaction module is used to load the preset large model to each of the nodes, construct a target state diagram based on the message passing relationship according to the current initial state diagram, and execute the preset interaction task using the preset large model through the target state diagram.

9. An electronic device, characterized in that: The electronic device comprises a processor and a memory; wherein the memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement the interaction method as claimed in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed by a processor, implements the interaction method according to any one of claims 1 to 7.