AI Agent implementation method for social contact and related device
By constructing a multimodal feature matrix and reinforcement learning model of social groups, dynamically update the social relationship status, the problem of AI Agent's recommendation decision lag in complex social scenarios is solved, and the speed and accuracy of social response are improved.
Patent Information
- Application Number
- CN202510663030.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-05-22
AI Technical Summary
Existing AI Agents cannot dynamically predict relationship status in complex social scenarios, resulting in lagging recommendation decisions.
Construct the current behavior sequence of the target object in the social group, encoded as a multimodal feature matrix, perform semantic analysis and intention recognition through LLM, update the relationship state matrix, and use reinforcement learning models to generate decision instructions.
It realizes dynamic prediction of social relationship status, timely updates recommendation decisions, and improves social response speed and accuracy.
Smart Images

Figure CN120256876A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software technology, and in particular, to a method for implementing an AI Agent for social interaction and related devices. Background Art
[0002] With the breakthrough of LLM (Large Language Model) technology, AI Agents (AI intelligent agents) based on LLM have gradually become the core tools in the social field. Although existing AI Agents have made progress in natural language interaction and task automation, their applications in complex social scenarios mainly rely on static label matching and cannot dynamically predict relationship states (such as stranger → deep cooperation), resulting in a lag in recommendation decisions. Summary of the Invention
[0003] In view of the above problems, this application provides a method for implementing an AI Agent for social interaction and related devices to achieve the purpose of dynamically predicting relationship states and timely updating recommendation decisions. The specific solutions are as follows:
[0004] In a first aspect of this application, a method for implementing an AI Agent for social interaction is provided. The method for implementing an AI Agent for social interaction includes:
[0005] Construct a current behavior sequence of a target object in a social group and encode the current behavior sequence into a multi-modal feature matrix;
[0006] Based on a first LLM, perform semantic parsing and intent recognition on the multi-modal feature matrix to obtain a current semantic map, which can indicate the probability distribution of the target object in multiple social directions;
[0007] Update the relationship state matrix of the social group according to the current semantic map. The relationship state matrix can represent the probability distribution of the target object and other objects in the social group under multiple relationship states;
[0008] Based on a reinforcement learning model, perform decision generation on the current semantic map and the updated relationship state matrix to issue a decision instruction to the target object.
[0009] In a possible implementation, the constructing of the current behavior sequence of the target object in the social group includes:
[0010] Collect first behavior data of the target object in the current time window;
[0011] Based on the first behavior data, determine multiple first behavior events of the target object;
[0012] Spatially and temporally align the multiple first behavior events to obtain the current behavior sequence.
[0013] In a possible implementation, encoding the current behavior sequence into a multi-modal feature matrix includes:
[0014] For each first behavior event in the current behavior sequence, obtain the event content of multiple modalities in this first behavior event; extract the corresponding modality features according to the modality to which the event content belongs, and splice the modality features of the multiple modalities to obtain the first multi-modal feature matrix corresponding to this first behavior event;
[0015] Combine the first multi-modal feature matrices of the multiple first behavior events to obtain a second multi-modal feature matrix.
[0016] In a possible implementation, updating the relationship status matrix of the social group according to the current semantic graph includes:
[0017] Retrieve the historical relationship status matrix of the social group that is closest to the current time;
[0018] Input the historical relationship status matrix and the current semantic graph into a graph model network, so that the graph model network adjusts the relationship weights of the multiple relationship statuses in the historical relationship status matrix based on the current semantic graph;
[0019] Obtain the current relationship status matrix output by the graph model network based on the adjusted relationship weights.
[0020] In a possible implementation, making a decision generation based on the reinforcement learning model for the current semantic graph and the updated relationship status matrix to issue a decision instruction to the target object includes:
[0021] Predict a decision direction that matches the current semantic graph and the updated relationship status matrix based on the reinforcement learning model;
[0022] Generate a policy instruction in the decision direction based on a second LLM, and issue the decision instruction to the target object;
[0023] Collect the second behavior data generated by the target object in response to the decision instruction;
[0024] Determine the second behavior event of the target object in response to the decision instruction based on the second behavior data;
[0025] Adjust the model parameters of the reinforcement learning model according to the second line for the event, and return to the step of executing the current behavior sequence of the target object in the constructed social group until the end instruction is issued by the second LLM.
[0026] In a possible implementation, the method for implementing the AI Agent for social interaction further includes:
[0027] Write the current semantic graph into a distributed graph database.
[0028] The second aspect of the present application provides an apparatus for implementing an AI Agent for social interaction, where the apparatus for implementing the AI Agent for social interaction includes:
[0029] A behavior sequence construction module, configured to construct the current behavior sequence of the target object in the social group and encode the current behavior sequence into a multi-modal feature matrix;
[0030] A semantic parsing and intention recognition module, configured to perform semantic parsing and intention recognition on the multi-modal feature matrix based on the first LLM to obtain the current semantic graph, and the current semantic graph can indicate the probability distribution of the target object in multiple social directions;
[0031] A relationship state matrix update module, configured to update the relationship state matrix of the social group according to the current semantic graph, and the relationship state matrix can characterize the probability distribution of the target object and other objects in the social group under multiple relationship states;
[0032] A decision generation module, configured to generate a decision based on the reinforcement learning model for the current semantic graph and the updated relationship state matrix, so as to issue a decision instruction to the target object.
[0033] The third aspect of the present application provides a computer program product, including computer-readable instructions, which when running on an electronic device, enable the electronic device to implement the method for implementing the AI Agent for social interaction according to the first aspect or any implementation manner of the first aspect.
[0034] The fourth aspect of the present application provides an electronic device, including at least one processor and a memory connected to the processor, where:
[0035] The memory is used to store a computer program;
[0036] The processor is configured to execute the computer program so that the electronic device can implement the method for implementing the AI Agent for social interaction according to the first aspect or any implementation manner of the first aspect.
[0037] The fifth aspect of the present application provides a computer storage medium carrying one or more computer programs, which can enable an electronic device to implement the method for implementing an AI Agent for social interaction according to the first aspect or any implementation manner of the first aspect when the one or more computer programs are executed by the electronic device.
[0038] With the above technical solutions, the present application provides a method for implementing an AI Agent for social interaction and related devices, which constructs the current behavior sequence of a target object in a social group and encodes the current behavior sequence into a multi-modal feature matrix; performs semantic parsing and intention recognition on the multi-modal feature matrix based on the first LLM to obtain the current semantic map, and the current semantic map can indicate the probability distribution of the target object in multiple social directions; updates the relationship state matrix of the social group according to the current semantic map, and the relationship state matrix can represent the probability distribution of the target object and other objects in the social group in multiple relationship states; performs decision-making generation on the current semantic map and the updated relationship state matrix based on the reinforcement learning model to issue a decision instruction to the target object. The present application can perform semantic parsing and intention recognition on social behaviors through the LLM, thereby updating the relationship state between social objects in the social group, and then issuing a decision instruction based on the reinforcement learning model, which can dynamically predict the relationship state, timely update the recommendation decision, and improve the speed of social response. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In combination with the accompanying drawings and with reference to the following specific embodiments, the above and other features, advantages and aspects of the various embodiments of the present disclosure will become more obvious. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the original elements and elements are not necessarily drawn to scale.
[0040] Figure 1 It is a schematic flowchart of a method for implementing an AI Agent for social interaction provided by an embodiment of the present application;
[0041] Figure 2 It is a partial schematic flowchart of a method for implementing an AI Agent for social interaction provided by an embodiment of the present application;
[0042] Figure 3 It is another partial schematic flowchart of a method for implementing an AI Agent for social interaction provided by an embodiment of the present application;
[0043] Figure 4 It is another schematic flowchart of a method for implementing an AI Agent for social interaction provided by an embodiment of the present application;
[0044] Figure 5Schematic structural diagram of an AI Agent implementation device for social interaction provided by an embodiment of the present application;
[0045] Figure 6 Schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0046] The embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. The terms used in the embodiments of the present application are only used to explain the specific embodiments of the present application, rather than intended to limit the present application.
[0047] The embodiments of the present application will be described below with reference to the accompanying drawings. Those of ordinary skill in the art will understand that with the development of technology and the emergence of new scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.
[0048] The terms "first", "second", etc. in the specification, claims and above-mentioned drawings of the present application are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances, which is only a way of distinguishing when describing objects with the same attributes in the embodiments of the present application. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion, so that a process, method, system, product or device comprising a series of units does not have to be limited to those units, but may include other units not clearly listed or inherent to these processes, methods, products or devices.
[0049] See Figure 1 , Figure 1 Flow chart of a method for implementing an AI Agent for social interaction provided by an embodiment of the present application. As Figure 1 shown, a method for implementing an AI Agent for social interaction provided by an embodiment of the present application may include steps S101 to S104, which will be described in detail below.
[0050] S101, construct the current behavior sequence of the target object in the social group, and encode the current behavior sequence into a multi-modal feature matrix.
[0051] In the embodiments of the present application, the social group is a set of social objects managed by the AI Agent, and the target object is the social object that interacts with the AI Agent. For example, when the AI Agent is applied to campus social interaction, the social group may consist of students and teachers. For the target object, by monitoring its social behavior, behavior events at different times are determined, and then the consecutive multiple behavior events closest to the current time are combined to form the current behavior sequence.
[0052] In addition, for the behavior events in the current behavior sequence, the corresponding multimodal feature matrix can be obtained through multimodal coding. It should be noted that the multimodal feature matrix can include the identification information of the target object, the timestamp of each behavior event and the modal feature vector of the event content.
[0053] In one possible implementation, data collection and preprocessing can be performed to construct the current behavior sequence. Figure 2 , Figure 2 A partial flow chart of a method for implementing an AI Agent for social interaction provided in an embodiment of the present application. Figure 2 As shown, an embodiment of the present application provides an AI Agent implementation method for social interaction, wherein "constructing the current behavior sequence of the target object in the social group" in step S101 may include steps S201 to S203, and these steps are described in detail below.
[0054] S201, collecting the first behavior of the target object in the current time window as data.
[0055] In the embodiment of the present application, a sliding time window can be set to collect the behavior data (i.e., the first behavior data) of the target object in the current time window in real time. The first behavior data may include explicit behavior data, implicit behavior data, and environmental perception data, etc. Continuing to use the example of AI Agent applied to campus social networking and the target object being a student, the explicit behavior data, implicit behavior data, and environmental perception data of the target object in the current time window can be collected; wherein, explicit behavior data can be collected through a structured data interface, and specifically can include social content such as publishing, forwarding, commenting, and rating, campus registration information, course schedules, skill certificates, etc.; implicit behavior data can be collected through the front-end embedding SDK, and specifically include the click coordinates of the interactive hot zone, the length of stay, the response speed of the interactive message, etc.; environmental perception data can be collected through edge computing nodes, and specifically include GPS positioning information (PIO identification of libraries, laboratories, etc.) and the motion state detected by the gyroscope, etc.
[0056] In addition, for the first behavior data collected from the data source, in order to ensure the validity of the data, the first behavior data can be cleaned to remove abnormal values, for example, invalid data with a single stay of more than 1 hour can be removed.
[0057] S202: Determine a plurality of first behavior events of the target object based on the first behavior data.
[0058] In the embodiments of the present application, based on the first behavioral data, multiple discrete behavioral events (i.e., the first behavioral events) of the target object in the current time window can be determined. Each first behavioral event can specifically include the timestamp when the event occurs, the event content, etc. For example, multiple first behavioral events such as (t1, click on "study group", laboratory location), (t2, post a dynamic, text content) can be determined.
[0059] S203. Align the multiple first behavioral events in space and time to obtain the current behavior sequence.
[0060] In the embodiments of the present application, by splicing the above-mentioned multiple discrete first behavioral events along the time axis, the current behavior sequence can be obtained. For example, the current behavior sequence = [(t1, click on "study group", laboratory location), (t2, post a dynamic, text content)...].
[0061] On this basis, an AI Agent implementation method for social interaction provided in the embodiments of the present application, wherein, in step S101, "encoding the current behavior sequence into a multi-modal feature matrix" can be performed by the following steps:
[0062] For each first behavioral event in the current behavior sequence, obtain the event content of multiple modalities in this first behavioral event; extract the corresponding modality features according to the modality to which the event content belongs, and splice the modality features of the multiple modalities to obtain the first multi-modal feature matrix corresponding to this first behavioral event; combine the first multi-modal feature matrices of the multiple first behavioral events to obtain the second multi-modal feature matrix.
[0063] Specifically, in the embodiments of the present application, for each first behavioral event, the event content of each modality in this first behavioral event can be obtained, and then the corresponding modality features can be extracted according to the modality to which the event content belongs. For example, text data can generate 768-dimensional text features through Sentence-BERT, image data can extract visual features through the CLIP model, and spatio-temporal data can be converted into a 32-bit string through GeoHash encoding. Further, the modality features of the multiple modalities are spliced to obtain the multi-modal feature matrix (i.e., the first multi-modal feature matrix) corresponding to this first behavioral event.
[0064] Finally, according to the time sequence of the multiple first behavioral events in the current behavior sequence, the first multi-modal feature matrices corresponding to each first behavioral event are spliced to obtain the multi-modal feature matrix (i.e., the second multi-modal feature matrix) corresponding to the current behavior sequence.
[0065] S102. Semantically parse and identify the intent of the multimodal feature matrix based on the first LLM to obtain the current semantic graph, which can indicate the probability distribution of the target object in multiple social directions.
[0066] In the embodiments of this application, the basic LLM (i.e., the first LLM) can be fine-tuned so that the first LLM can perform semantic parsing and intent recognition. Specifically, the semantic parsing and intent recognition process can include surface parsing, sentiment mapping, and intent reasoning. Among them, surface parsing is used to extract at least one topic tag (such as machine learning), sentiment mapping is used to calculate the emotional intensity of each topic tag (a continuous value from 0 to 1), and intent reasoning is used to output a semantic graph, in which the concept distribution of different social directions can be indicated (for example, the probability of the knowledge collaboration direction is 0.7, and the probability of the emotional support direction is 0.2).
[0067] For this, the multimodal feature matrix of the current behavior sequence can be input into the first LLM so that the first LLM outputs the corresponding current semantic graph, which can indicate the probability distribution of the target object in different social directions.
[0068] In a possible implementation, the current semantic graph can also be input and written into a distributed graph database so that the current semantic graph can be applied to other social scenarios.
[0069] S103. Update the relationship status matrix of the social group according to the current semantic graph. The relationship status matrix can characterize the probability distribution of the target object and other objects in the social group under multiple relationship states.
[0070] In the embodiments of this application, the relationship status matrix of the social group can be updated with the current semantic graph in the manner of a relationship state machine. Among them, the relationship status matrix can characterize the probability distribution of the target object and other objects under multiple relationship states. For example, the relationship status between the target object and a certain social object in the social group includes the degree of trust and the degree of interest overlap.
[0071] In a possible implementation, the relationship status matrix of the social group can be updated through a graph model network. See Figure 3 , Figure 3 which is another part of the flowchart of an implementation method of an AI Agent for social use provided by the embodiments of this application. As Figure 3 shown, for an implementation method of an AI Agent for social use provided by the embodiments of this application, in step S103, "update the relationship status matrix of the social group according to the current semantic graph", it can include steps S301 to S303, which will be described in detail below.
[0072] S301, retrieve the historical relationship status matrix of the social group that is closest to the current time.
[0073] In the embodiments of the present application, the latest relationship status matrix (i.e., the historical relationship status matrix) of the social group is retrieved from the database, and the historical relationship status matrix contains the probability distributions of the target object and other objects in multiple relationship states at historical times.
[0074] S302, input the historical relationship status matrix and the current semantic graph into the graph model network, so that the graph model network adjusts the relationship weights of multiple relationship states in the historical relationship status matrix based on the current semantic graph.
[0075] In the embodiments of the present application, the historical relationship status matrix and the current semantic graph can be input into the graph model network, and the graph model network adjusts the relationship weights of multiple relationship states between the target object and other objects in the historical relationship matrix. The adjusted relationship weight = the pre-adjusted relationship weight × the decay factor + the current interaction quality × the gain coefficient, where the decay factor and the gain coefficient are pre-specified, and the current interaction quality is evaluated by the graph model network based on the current semantic graph.
[0076] S303, obtain the current relationship status matrix output by the graph model network based on the adjusted relationship weights.
[0077] In the embodiments of the present application, after the graph model network adjusts the relationship weights of multiple relationship states in the historical relationship status matrix, it can recalculate the probability distributions of the target object and other objects in multiple relationship states at the current time based on the adjusted relationship weights, so as to obtain the current relationship status matrix of the social group. For example, in the historical relationship status matrix, the probability of the target object and a certain social object in the social group under the trust degree is 0.7, and the probability under the interest overlap degree is 0.3. After adjusting the relationship weights based on the current semantic graph, the probability of the target object and the social object in the current relationship status matrix under the trust degree is 0.85, and the probability under the interest overlap degree is 0.15.
[0078] S104, perform decision generation on the current semantic graph and the updated relationship status matrix based on the reinforcement learning model, so as to send a decision instruction to the target object.
[0079] In the embodiments of the present application, decision generation can be performed on the current semantic graph and the updated relationship status matrix based on the reinforcement learning Q-value decision, so as to determine the social decision of the target object and a certain social object in the social group, and send a decision instruction to the target object accordingly.
[0080] In a possible implementation, decision generation can be achieved through a reinforcement learning model and an LLM. See Figure 4 , Figure 4Another flowchart diagram of an AI Agent implementation method for social interaction provided by an embodiment of this application. As Figure 4 shown, an AI Agent implementation method for social interaction provided by an embodiment of this application, wherein step S104, "Generate a decision based on the reinforcement learning model for the current semantic graph and the updated relationship state matrix, and issue a decision instruction to the target object", may include steps S401 to S405, which will be described in detail below.
[0081] S401, Predict a decision direction that matches the current semantic graph and the updated relationship state matrix based on the reinforcement learning model.
[0082] In an embodiment of this application, the current semantic graph and the updated relationship state matrix can be input into the reinforcement learning model so that the reinforcement learning model predicts the decision direction with the highest reward score. For example, the decision direction can be any one of ice-breaking, adjustment, and maintenance.
[0083] S402, Generate a policy instruction in the decision direction based on the second LLM, and issue the decision instruction to the target object.
[0084] In an embodiment of this application, after determining the decision direction, the prompt word corresponding to the decision direction can be input into the LLM (i.e., the second LLM) so that the LLM determines a social decision that matches the decision direction, outputs a decision instruction accordingly, and sends the decision instruction to the target object via the message queue.
[0085] It should be noted that the decision instruction can be in JSON format, which may include recommended actions, execution parameters, expected goals, etc., and this application does not limit this. For example, the recommended instruction can be "You and classmate xx are both interested in the AI competition. Would you like to form a team to participate?", and another example is that the recommended instruction can be "Automatically generate a shared document and invite members."
[0086] S403, Collect the second behavior data generated by the target object in response to the decision instruction.
[0087] In an embodiment of this application, collect the behavior data (i.e., the second behavior data) generated by the target object in response to the decision instruction. The second behavior data can include explicit feedback data and implicit feedback data. For example, the explicit feedback data can include social content such as publishing, forwarding, commenting, and rating, and the implicit feedback data can include message open rate, session duration, and secondary sharing behavior, etc.
[0088] S404, Determine the second behavior event of the target object in response to the decision instruction based on the second behavior data.
[0089] In the embodiments of the present application, based on the second behavioral data, a behavioral event in which the target object responds to the decision-making instruction (i.e., the second behavioral event) can be determined. The second behavioral event may specifically include the time stamp of the occurrence time, the event content, etc.
[0090] S405. Adjust the model parameters of the reinforcement learning model according to the second behavioral event, and return to execute the construction step S101 until the second LLM issues an end instruction.
[0091] In the embodiments of the present application, the reinforcement learning reward is calculated based on the second behavioral event. For example, the reinforcement learning reward = 0.4 × message opening rate + 0.3 × number of conversation turns + 0.3 × score. Furthermore, based on the reinforcement learning reward, the model parameters of the reinforcement learning model are adjusted. Specifically, the PPO algorithm can be used to adjust once every 10 minutes. After the adjustment of the model parameters is completed, return to execute step S101 until the second LLM no longer issues decision-making instructions. This can achieve real-time feedback based on reinforcement learning, driving the adaptive optimization and online update of social decisions.
[0092] It should be noted that before using the technical solutions disclosed in the embodiments of the present application, the types, usage scopes, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0093] Through the above description, a method for implementing an AI Agent for social interaction provided by the embodiments of the present application can accurately capture social intentions, thereby effectively identifying the implicit needs of social objects. Moreover, the dynamic state machine that integrates semantic features and social graph structures can predict the evolution path of social relationships from shallow interaction to deep cooperation. In addition, the real-time feedback mechanism based on reinforcement learning enables the system to quickly adjust social decisions when the scenario changes suddenly, realizing the self-evolution ability.
[0094] The above introduces a method for implementing an AI Agent for social interaction provided by the embodiments of the present application. The following will introduce the device for executing the above method for implementing an AI Agent for social interaction.
[0095] See Figure 5 , Figure 5 which is a schematic structural diagram of a device for implementing an AI Agent for social interaction provided by the embodiments of the present application. As Figure 5 shown, a device for implementing an AI Agent for social interaction provided by the embodiments of the present application includes:
[0096] A behavior sequence construction module 501, configured to construct the current behavior sequence of the target object in the social group and encode the current behavior sequence into a multi-modal feature matrix;
[0097] The semantic parsing and intent recognition module 502 is used to perform semantic parsing and intent recognition on the multimodal feature matrix based on the first large language model (LLM) to obtain the current semantic graph, and the current semantic graph can indicate the probability distribution of the target object in multiple social directions;
[0098] The relationship status matrix update module 503 is used to update the relationship status matrix of the social group according to the current semantic graph, and the relationship status matrix can represent the probability distribution of the target object and other objects in the social group under multiple relationship statuses;
[0099] The decision generation module 504 is used to generate a decision based on the reinforcement learning model for the current semantic graph and the updated relationship status matrix, so as to issue a decision instruction to the target object.
[0100] In a possible implementation, the behavior sequence construction module 501 for constructing the current behavior sequence of the target object in the social group is specifically used for:
[0101] Collect the first behavior data of the target object in the current time window; determine multiple first behavior events of the target object based on the first behavior data; perform spatio-temporal alignment on the multiple first behavior events to obtain the current behavior sequence.
[0102] In a possible implementation, the behavior sequence construction module 501 for encoding the current behavior sequence into a multimodal feature matrix is specifically used for:
[0103] For each first behavior event in the current behavior sequence, obtain the event content of multiple modalities in the first behavior event; extract the corresponding modality features according to the modality to which the event content belongs, and splice the modality features of the multiple modalities to obtain the first multimodal feature matrix corresponding to the first behavior event; combine the first multimodal feature matrices of the multiple first behavior events to obtain the second multimodal feature matrix.
[0104] In a possible implementation, the relationship status matrix update module 503 for updating the relationship status matrix of the social group according to the current semantic graph is specifically used for:
[0105] Retrieve the historical relationship status matrix of the social group that is closest to the current time; input the historical relationship status matrix and the current semantic graph into the graph model network, so that the graph model network adjusts the relationship weights of multiple relationship statuses in the historical relationship status matrix based on the current semantic graph; obtain the current relationship status matrix output by the graph model network based on the adjusted relationship weights.
[0106] In a possible implementation, the decision generation module 504 is specifically used for:
[0107] Predict a decision direction that matches the current semantic graph and the updated relationship state matrix based on the reinforcement learning model; generate a policy instruction in the decision direction based on the second LLM, and send the decision instruction to the target object; collect the second behavior data generated by the target object in response to the decision instruction; determine the second behavior event of the target object in response to the decision instruction based on the second behavior data; adjust the model parameters of the reinforcement learning model according to the second behavior event, and return to the step of constructing the current behavior sequence of the target object in the social group until the second LLM generates and sends an end instruction.
[0108] In a possible implementation, the semantic parsing and intent recognition module 502 is further configured to:
[0109] Write the current semantic graph into the distributed graph database.
[0110] It should be noted that the detailed functions of each module in the embodiments of the present application can be referred to the corresponding disclosed parts of the above-mentioned AIAgent implementation method for social use, which will not be elaborated here.
[0111] An electronic device is also provided in the embodiments of the present application. Refer to Figure 6 , Figure 6 which is a schematic structural diagram of an electronic device provided in the embodiments of the present application. The electronic device in the embodiments of the present application may include, but is not limited to, fixed terminals such as mobile phones, laptop computers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), desktop computers, and the like. Figure 6 The electronic device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present application.
[0112] As Figure 6 shown, the electronic device may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 602 or the program loaded from the storage device 608 into the random access memory (RAM) 603. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. The input / output (I / O) interface 605 is also connected to the bus 604.
[0113] Typically, the following devices can be connected to the I / O interface 605: input devices 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 608 including, for example, a memory card, a hard disk, etc.; and a communication device 609. The communication device 609 can allow the electronic device to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 6 an electronic device with various devices is shown, it should be understood that it is not required to implement or have all the shown devices. Instead, more or fewer devices can be implemented or had.
[0114] An embodiment of the present application also provides a computer program product including computer-readable instructions. When the computer-readable instructions run on an electronic device, the electronic device is enabled to implement any one of the AI Agent implementation methods for social interaction provided by the embodiments of the present application.
[0115] An embodiment of the present application also provides a computer-readable storage medium. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device is enabled to implement any one of the AI Agent implementation methods for social interaction provided by the embodiments of the present application.
[0116] In addition, it should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the drawings of the device embodiments provided in the present application, the connection relationships between the modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines.
[0117] Through the description of the above embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general hardware. Of course, it can also be implemented by dedicated hardware including application-specific integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. Generally, functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structures for implementing the same function can also be diverse, such as analog circuits, digital circuits, or dedicated circuits. However, for this application, software program implementation is a better embodiment in more cases. Based on such an understanding, the technical solution of this application, in essence, or the part that makes a contribution to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disc of a computer, and includes several instructions to enable a computer device (which can be a personal computer, training device, or network device, etc.) to execute the methods described in various embodiments of this application.
[0118] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product.
[0119] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are generated in whole or in part. The computer can be a general computer, a dedicated computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, training device, or data center to another website, computer, training device, or data center in a wired manner (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or a wireless manner (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store, or a data storage device such as a training device or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)).
Claims
1. A method for implementing an AI Agent for social interaction, characterized in that, The method for implementing an AI Agent for social interaction includes: Construct the current behavior sequence of a target object in a social group and encode the current behavior sequence into a multi-modal feature matrix; Based on a first large language model (LLM), perform semantic parsing and intention recognition on the multi-modal feature matrix to obtain a current semantic graph, which can indicate the probability distribution of the target object in multiple social directions; Update the relationship status matrix of the social group according to the current semantic graph, where the relationship status matrix can characterize the probability distribution of the target object and other objects in the social group under multiple relationship statuses; Based on a reinforcement learning model, generate a decision for the current semantic graph and the updated relationship status matrix, and issue a decision instruction to the target object.
2. The method for implementing an AI Agent for social interaction according to claim 1, wherein The construction of the current behavior sequence of a target object in a social group includes: Collect the first behavior data of the target object in the current time window; Determine multiple first behavior events of the target object based on the first behavior data; Perform spatio-temporal alignment on the multiple first behavior events to obtain the current behavior sequence.
3. The method for implementing an AI Agent for social interaction according to claim 2, wherein, The encoding of the current behavior sequence into a multi-modal feature matrix includes: For each first behavior event in the current behavior sequence, obtain the event content of multiple modalities in the first behavior event; extract the corresponding modality features according to the modality to which the event content belongs, and splice the modality features of the multiple modalities to obtain the first multi-modal feature matrix corresponding to the first behavior event; Combine the first multi-modal feature matrices of the multiple first behavior events to obtain a second multi-modal feature matrix.
4. The method for implementing an AI Agent for social interaction according to claim 1, wherein The update of the relationship status matrix of the social group according to the current semantic graph includes: Retrieve the historical relationship status matrix of the social group that is closest to the current time; Input the historical relationship status matrix and the current semantic graph into a graph model network, so that the graph model network adjusts the relationship weights of the multiple relationship statuses in the historical relationship status matrix based on the current semantic graph; Obtain the current relationship status matrix output by the graph model network based on the adjusted relationship weights.
5. The method for implementing an AI Agent for social interaction according to claim 1, wherein The generation of a decision based on a reinforcement learning model for the current semantic graph and the updated relationship status matrix, and issuing a decision instruction to the target object, includes: Based on the reinforcement learning model, predict a decision direction that matches the current semantic graph and the updated relationship status matrix; Generate a policy instruction in the decision direction based on a second LLM, and issue the decision instruction to the target object; Collect the second behavior data generated by the target object in response to the decision instruction; Determine the second behavior event of the target object in response to the decision instruction based on the second behavior data; Adjust the model parameters of the reinforcement learning model according to the second behavior event, and return to execute the step of constructing the current behavior sequence of the target object in the social group until the second LLM generates an end instruction and issues it.
6. The method for implementing an AI Agent for social interaction according to claim 1, wherein, The method for implementing an AI Agent for social interaction further includes: Write the current semantic graph into a distributed graph database.
7. An AI Agent implementation device for social interaction, characterized in that, The AI Agent implementation device for social use includes: A behavior sequence construction module, configured to construct the current behavior sequence of a target object in a social group and encode the current behavior sequence into a multi-modal feature matrix; A semantic parsing and intention recognition module, configured to perform semantic parsing and intention recognition on the multi-modal feature matrix based on a first LLM to obtain a current semantic graph, where the current semantic graph can indicate the probability distribution of the target object in multiple social directions; A relationship status matrix update module, configured to update the relationship status matrix of the social group according to the current semantic graph, where the relationship status matrix can represent the probability distribution of the target object and other objects in the social group under multiple relationship statuses; A decision generation module, configured to generate a decision based on a reinforcement learning model for the current semantic graph and the updated relationship status matrix, so as to issue a decision instruction to the target object.
8. A computer program product, characterized in that, It includes computer-readable instructions, which when running on an electronic device, cause the electronic device to implement the AI Agent implementation method for social use according to any one of claims 1 to 6.
9. An electronic device, characterized in that, It includes at least one processor and a memory connected to the processor, where: The memory is used to store a computer program; The processor is used to execute the computer program so that the electronic device can implement the AI Agent implementation method for social use according to any one of claims 1 to 6.
10. A computer storage medium, characterized in that, The storage medium carries one or more computer programs, which when executed by an electronic device, can cause the electronic device to implement the AI Agent implementation method for social use according to any one of claims 1 to 6.
Citation Information
Patent Citations
Data-driven swarm intelligence interaction relationship inference and evolution calculation method
CN112269931A
User social behavior representation method and system, electronic equipment and storage medium
CN119046540A
Urban safety knowledge graph construction method based on AI large model and related device
CN119623603A
Organization decision-making method and equipment based on time sequence prediction and knowledge graph, and medium
CN119623607A
Link prediction method and device and model training method and device
CN119692443A
Cited By
Observation method and device of intelligent agent, storage medium and electronic equipment
CN120706464A