Data sharing method and system for multi-agent platform
By constructing user profiles and adjusting the positions of intelligent agent nodes, the data sharing method of multi-agent platforms was optimized, solving the problem of low transmission efficiency and achieving efficient data sharing and rapid response.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-16
- Publication Date
- 2026-03-24
AI Technical Summary
In multi-agent platforms, existing technologies fail to effectively share data based on historical communication data, resulting in low transmission efficiency and an inability to meet the rapid response needs of intelligent AI assistants in communicating with users.
By acquiring communication records of each agent in a multi-agent platform, user profiles are constructed and consistent hash ring mapping is performed. The positions of agent nodes are adjusted, and storage adaptability and sharing necessity are calculated to achieve efficient data sharing between agents and the central server.
It improves the efficiency of intelligent AI assistants in multi-agent platforms and their rapid response capability to similar user profiles, optimizes the data sharing process, and reduces the burden on nodes.
Smart Images

Figure CN120832328B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of data transmission, in particular to a data sharing method and system for a multi-agent platform. BACKGROUND
[0002] As an important part of an AI assistant, an agent realizes various intelligent AI assistant functions through powerful workflow, database and tool calling capability. A multi-agent platform is a distributed system composed of multiple agents. The storage space of each agent as a distributed storage node is limited. A large amount of communication record data generated by the agent needs to be shared to a central database in time for storage, so as to reduce the node burden and quickly process user communication. Therefore, the transmission efficiency of data sharing between multi-agent platforms is very important in the process of platform operation.
[0003] The distributed system of the multi-agent platform has a large amount of data. All communication record data of a single agent cannot be stored in the distributed storage node. Meanwhile, the agent undertakes the communication between the intelligent AI assistant and the user. There is user communication data between multi-agents with similar user portraits. Considering the fast working efficiency of the intelligent AI assistant and the fast response of user communication with similar user portraits, the communication record data needs to be shared between the agent and the central database in a targeted manner to realize the fast calling between similar user portraits. SUMMARY
[0004] The application provides a data sharing method and system for a multi-agent platform to solve the problem of low transmission efficiency caused by the fact that the existing multi-agent platform does not share data in a targeted manner according to historical communication data. The technical solution adopted is as follows:
[0005] The application provides a data sharing method and system for a multi-agent platform to solve the problem of low transmission efficiency caused by the fact that the existing multi-agent platform does not share data in a targeted manner according to historical communication data. The technical solution adopted is as follows:
[0006] The communication content and communication record data of several communications of each agent of the multi-agent platform are obtained. The communication record data includes communication time, communication duration, communication data volume, communication content field and user corresponding to the communication record data.
[0007] According to the communication time distribution and communication duration of different communications of the same user, the communication interval of each communication of each user is obtained. The communication data volume and the communication content field are combined to construct the user portrait of each user. The user portraits of each user are mapped on a hash ring through a consistent hash algorithm to obtain the mapping position of each user. In combination with the distribution of the storage node corresponding to each agent on the hash ring, the storage adaptation degree of each agent to each user is obtained.
[0008] Based on the correspondence between the user's communication record data and the agent, combined with the mapping position and the distribution difference of the agent corresponding node on the hash ring, the node position of each agent is adjusted and the updated storage fitness is recalculated; the correspondence between the communication record data of each user and the agent, and the communication frequency of the user and different agents are analyzed, combined with the deviation between the communication record data and the user portrait, the sharing necessity of each agent to each communication record data is obtained based on the updated storage fitness;
[0009] According to the sharing necessity of each agent to each communication record data, it is judged whether the communication record data is shared to the agent or stored in the central server, and the communication content and the communication record data are shared in the multi-agent platform through data transmission.
[0010] Optionally, the specific method for constructing the user portrait of each user includes:
[0011] For the communication record data of several communications of any user, the time interval of each time-adjacent communication record data is obtained, which is obtained based on the communication time and the date corresponding to the communication record data, as the communication interval of adjacent communication record data;
[0012] The communication intervals of all adjacent communication record data are subjected to density clustering, and the distance measurement adopts the absolute value of the difference between the communication intervals, to obtain several clusters, and the communication interval corresponding to the center data point of the cluster with the largest number of communication intervals is taken as the representative value of the communication interval of the user; the communication time, the communication duration and the communication data volume of all communication data of the user are subjected to density clustering respectively to obtain the representative value of the communication time, the representative value of the communication duration and the representative value of the communication data volume;
[0013] Based on the communication content field of the communication record data of the user, the communication content vector of each communication record data and the content representative vector of the user are obtained;
[0014] Based on the communication interval representative value, the communication time representative value, the communication duration representative value, the communication data volume representative value and the content representative vector of the user, a multi-dimensional vector is constructed as the user portrait of the user.
[0015] Optionally, the specific method for obtaining the communication content vector of each communication record data and the content representative vector of the user is:
[0016] For any user's communication record data, word vector transformation is performed on the communication content domain to obtain the communication content vector of each communication record data. Density clustering is performed on the communication content vectors of all communication records data of the user. The distance metric is the difference obtained by subtracting the cosine similarity between communication content vectors from 1 to obtain several clusters. The communication content vector corresponding to the center data point of the cluster with the largest number of communication content vectors is taken as the content representative vector of the user.
[0017] Optionally, the specific method for obtaining the mapping location of each user includes:
[0018] The hash value of each user's profile is calculated using a consistent hashing algorithm. Based on the hash value of each user's profile, each user is mapped on a hash ring, and the mapped position is used as the mapped position of each user.
[0019] Optionally, the specific method for obtaining the storage fit of each intelligent agent to each user includes:
[0020] Obtain the storage nodes of each agent on the hash ring; for any user's mapping position and any agent's storage node, obtain the distance between the user's mapping position and the agent's storage node on the hash ring, obtain the ratio of the distance to the total length of the corresponding partition of the agent's storage node on the hash ring, and subtract the ratio from 1 to obtain the difference as the storage fit degree of the agent for the user.
[0021] Optionally, the specific method for adjusting the node positions of each agent and recalculating the updated storage fit includes:
[0022] For any user's several communication records, obtain the number of communication records corresponding to any intelligent agent, and use the ratio of the number to the total number of communication records of the user as the communication factor between the user and the intelligent agent; obtain the communication factors between all users and the intelligent agent, perform weight normalization on all communication factors, and use the result as the communication weight between each user and the intelligent agent; perform a weighted summation on the mapping positions of each user based on the communication weights, and use the result as the initial adjustment position of the intelligent agent.
[0023] The storage fit of the agent to each user is weighted and summed based on the communication weights. The result is used as the original weight of the agent. The difference between 1 and the original weight is used as the adjustment weight of the agent. The original weight is used to match the node corresponding to the agent. The adjustment weight is used to match the initial adjustment position of the agent. The node corresponding to the agent and the initial adjustment position are weighted and summed. The result is used as the adjustment node position of the agent. The storage fit is recalculated based on the mapping position of each user and the adjustment node position of the agent.
[0024] After recalculating the storage fit, the original weight of the agent is reacquired. If the original weight is greater than or equal to the stopping threshold, the adjusted node position of the agent is used as the updated node of the agent, and the recalculated storage fit is used as the updated storage fit of the agent for each user.
[0025] If the original weight is less than the threshold, the adjustment node position is reacquired, the storage fit is recalculated, and the threshold is judged again. This process is repeated until the original weight obtained under the recalculated storage fit after reacquiring the adjustment node position is greater than or equal to the stopping threshold. Then the iteration stops, and the latest adjustment node position is used as the update node of the agent, and the latest storage fit is used as the updated storage fit of the agent for each user.
[0026] Optionally, the specific method for obtaining the necessity of sharing communication record data by each intelligent agent includes:
[0027] Analyze the correspondence between each user's communication record data and the intelligent agent, and combine the differences between different communication record data of the same user to obtain the storage factor of each intelligent agent for each communication record data;
[0028] For any user and any intelligent agent, the ratio of the number of communication record data corresponding to the user in the intelligent agent to the total number of communication record data of the user is recorded as the communication frequency of the user in the intelligent agent, and the corresponding number of communication record data is used as the corresponding communication data of the user in the intelligent agent.
[0029] For any corresponding communication data, obtain the absolute value of the difference between the communication time of the corresponding communication data and the representative value of the user's communication time, and use the ratio of the absolute value of the difference to the maximum value of the absolute value of the difference in the communication time of all communication records of the user as the time deviation factor of the corresponding communication data.
[0030] Obtain the duration deviation factor and data volume deviation factor of the corresponding communication data; obtain the cosine similarity between the communication content vector of the corresponding communication data and the content representative vector of the user, and map the cosine similarity to the corresponding user's content representative vector through a linear transformation. Within the interval, the result is used as the content similarity factor, and the difference between 1 and the content similarity factor is used as the content deviation factor of the corresponding communication data.
[0031] The average of the time deviation factor, duration deviation factor, data volume deviation factor, and content deviation factor of the corresponding communication data is used as the overall deviation factor of the corresponding communication data; the average of the overall deviation factors of all corresponding communication data of the user in the agent is obtained, and 1 is subtracted from the average of the overall deviation factors to obtain the profile consistency of the user in the agent; the product of the profile consistency and the communication frequency is used as the storage reference of the user in the agent.
[0032] For any user's communication record data and any agent, the product of the agent's storage factor for the communication record data, the user's storage reference value in the agent, and the agent's update storage adaptability to the user is used as the agent's sharing factor for the communication record data.
[0033] The sharing factor of all agents for all communication records of the user is linearly normalized, and the result is used as the necessity for each agent to share each communication record of the user.
[0034] Optionally, the specific method for obtaining the storage factor of each agent for each communication record data includes:
[0035] For any user's communication record data and any intelligent agent, if the communication record data corresponds to the intelligent agent, the storage factor of the intelligent agent for the communication record data is recorded as 1;
[0036] If the communication record data does not correspond to the intelligent agent, obtain several communication record data of the user under the intelligent agent as reference communication data for the communication record data.
[0037] For the communication record data and any of the reference communication data, the communication time of the communication record data and the communication time of the reference communication data are obtained respectively, and the difference between each of them and the representative value of the communication time of the user is used as the ratio of the difference corresponding to the communication record data to the difference corresponding to the reference communication data.
[0038] Obtain the duration similarity and data volume similarity between the communication record data and the reference communication data; use the cosine similarity between the communication content vector of the communication record data and the communication content vector of the reference communication data as the content similarity between the communication record data and the reference communication data.
[0039] The average of the time similarity, duration similarity, data volume similarity, and content similarity between the communication record data and the reference communication data is used as the overall similarity between the communication record data and the reference communication data; the average of the overall similarity between the communication record data and all reference communication data of the agent is used as the storage factor of the agent for the communication record data.
[0040] Optionally, the specific method for determining whether the communication record data is shared to the intelligent agent or stored in the central server includes:
[0041] The sharing threshold and sharing ratio are preset, and the product of the number of agents in the multi-agent platform and the sharing ratio, rounded down, is taken as the sharing quantity.
[0042] For any communication record data, if the necessity for any agent to share the communication record data is greater than the sharing threshold, that agent is designated as the data sharing agent for that communication record data. All data sharing agents for that communication record data are obtained. If the number of data sharing agents is greater than or equal to the sharing limit, the communication record data is stored in the central server. If the number of data sharing agents is less than the sharing limit, the communication record data is shared to the corresponding data sharing agents through data transmission, and the distributed storage nodes of each data sharing agent store it.
[0043] The present invention also proposes a data sharing system for a multi-agent platform, the system comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the steps of the above method.
[0044] The beneficial effects of this invention are as follows: This invention extracts all historical communication records of each agent in a multi-agent platform, constructs user profiles based on the users corresponding to the communication records, and builds user profiles for the corresponding users' communication styles and content domains. A consistent hashing algorithm is used for hash ring mapping, and combined with the initially allocated nodes of the agents on the hash ring, the storage fit of the agents to the users is initially quantified to reflect the correlation between the agent distribution on the hash ring and the user profiles. However, if the agents need to better represent users with high-frequency communication, it is necessary to iteratively adjust the corresponding nodes of the agents, adjusting based on the mapping positions of users with high-frequency communication and the deviation of the initially calculated storage fit, and then re-obtaining a more accurate user profile. The new storage adaptation is used to further analyze the correspondence between user communication records and agents, considering direct correspondence and indirect relationships between similar communication records. The frequency of user communication with agents and the deviation between corresponding communication records and user profiles are used as weights to determine the necessity of agents sharing communication records. This determines the sharing relationship of communication records with agents. If too many agents share the data, it is stored on a central server for easy access by a large number of agents. Communication content is also shared and stored synchronously based on communication records, thereby achieving data sharing across multiple agent platforms and improving the processing efficiency of agents for communication with similar users. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 This is a schematic diagram of a data sharing method for a multi-agent platform provided in an embodiment of the present invention. Detailed Implementation
[0047] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0048] Please see Figure 1 The diagram illustrates a data sharing method for a multi-agent platform according to an embodiment of the present invention, which includes the following steps:
[0049] Step S001: Obtain the communication content and communication record data of several exchanges between the agents of the multi-agent platform.
[0050] The purpose of this embodiment is to improve the efficiency of the intelligent AI assistant and the rapid response of user interactions with similar user profiles. It is necessary to share the interaction record data between the intelligent agents and the central server to enable rapid access between similar user profiles. This requires extracting all interaction record data from each intelligent agent on the multi-agent platform. The interaction record data includes interaction time, interaction duration, interaction data volume, and interaction content domain. At the same time, to facilitate the subsequent construction of user profiles, it is necessary to identify the user corresponding to the interaction record data.
[0051] Specifically, the system collects the communication content and records of all historical interactions between agents in the multi-agent platform. The communication content refers to all the content (data) during the interaction between the corresponding user and the agent. The communication record data includes the communication time of each interaction (in 24-hour format); the communication duration (the length of time a single interaction lasts); the amount of communication data (the storage space occupied by the data generated in a single interaction); and the communication content domain (the domain that the agent autonomously summarizes based on the domains involved in the communication process, expressed in the form of words). Simultaneously, the system records the corresponding users for each communication record, thus each user corresponds to a number of communication record data points for each agent.
[0052] It should be noted that each agent has historically interacted with several users, resulting in a number of interaction records. The agents can analyze the relevant fields involved in each interaction record and, based on the relevant fields and corresponding users involved in each interaction, create user profiles. These user profiles reflect the relevant fields and communication styles involved in the user's overall interaction records. The communication style includes the interaction time (corresponding to the time in 24-hour format), interaction duration, interaction interval, and the amount of data in each interaction. This is used to construct user profiles, and a hash ring is mapped using a hash function to analyze the distribution relationship between the mapped position and the agent's storage nodes on the hash ring.
[0053] Step S002: Based on the communication time distribution and duration of different communications of the same user, obtain the communication interval of each communication for each user. Combine the communication data volume and communication content domain to construct a user profile for each user. Map the user profile of each user to a hash ring using a consistent hashing algorithm to obtain the mapping position of each user. Combine the distribution of the corresponding storage nodes of each agent on the hash ring to obtain the storage fit of each agent to each user.
[0054] Preferably, in one embodiment of the present invention, based on the communication time distribution and duration of different communications of the same user, the communication interval of each user's communication is obtained, and a user profile of each user is constructed by combining the amount of communication data and the domain of communication content. The specific method includes:
[0055] For any user's communication records from several exchanges, the time intervals between adjacent (not just adjacent in time, but adjacent in the entire time series) communication records are obtained, based on the communication time and the corresponding date of the communication record data, and are used as the communication interval between adjacent communication records. DBSCAN clustering is performed on all adjacent communication intervals, using the absolute value of the difference between communication intervals as the distance metric, resulting in several clusters. The communication interval corresponding to the center data point of the cluster with the largest number of communication intervals (the center data point is the data point with the smallest average distance to other data points in the cluster) is used as the representative value of the user's communication interval. Following the above method, DBSCAN clustering is performed on the communication time, communication duration, and communication data volume of all the user's communication data, and representative values for communication time, communication duration, and communication data volume are obtained respectively.
[0056] Furthermore, word vectors are transformed into word vectors for the content domain of any communication record data of the user. The Word2vec model is used for word vector transformation to obtain the communication content vectors of each communication record data. The Word2vec model is an existing technology and will not be described in detail in this embodiment. Different word vectors have the same number of dimensions. DBSCAN clustering is performed on the communication content vectors of all communication record data of the user. The distance metric is the difference obtained by subtracting the cosine similarity between communication content vectors from 1, resulting in several clusters. The communication content vector corresponding to the center data point of the cluster with the largest number of communication content vectors is used as the content representative vector of the user.
[0057] Furthermore, based on the user's representative values for communication interval, communication time, communication duration, and communication data volume, as well as the content representative vector, a multidimensional vector is constructed. The representative value or representative vector corresponding to each dimension is used as an element in the multidimensional vector, and the resulting multidimensional vector is used as the user profile of the user.
[0058] It should be further explained that nodes are initially allocated to the multi-agent platform on the hash ring to realize the construction of a distributed system. Users are mapped on the hash ring through the construction of user profiles and the consistent hashing algorithm. Based on the distribution relationship between the mapped position and the corresponding node of the agent, the storage fit between the user and the agent is initially calculated.
[0059] Preferably, in one embodiment of the present invention, a consistent hashing algorithm is used to perform hash ring mapping on the user profiles of each user to obtain the mapping position of each user. Combined with the distribution of the storage nodes corresponding to each agent on the hash ring, the storage fit of each agent to each user is obtained. The specific method includes:
[0060] The user profiles of each user are used to calculate hash values using a consistent hashing algorithm. The user profiles are in vector form, and the range of the hash values calculated by the consistent hashing algorithm is the entire hash ring. The specific hash function construction process of the consistent hashing algorithm is an existing method of the algorithm, which will not be described in detail in this embodiment. Based on the hash values of each user's user profile, each user is mapped on the hash ring, and the mapped position is used as the mapped position of each user.
[0061] Furthermore, for each agent in the multi-agent platform, the agents are evenly distributed on the hash ring according to the distributed system, and the storage nodes of each agent on the hash ring are obtained. For any user's mapping position and any agent's storage node, the distance between the user's mapping position and the agent's storage node on the hash ring is obtained. The ratio of the distance to the total length of the corresponding partition of the agent's storage node on the hash ring is obtained. The difference obtained by subtracting the ratio from 1 is used as the storage fit degree of the agent for the user (the storage fit degree may be negative, indicating that the agent and the user are not compatible in storage under this case, which does not affect subsequent processing).
[0062] Thus, we obtain the storage fit of each agent to each user, and the mapping position of each user on the hash ring by constructing user profiles.
[0063] Step S003: Based on the correspondence between user communication record data and intelligent agents, and combined with the differences in the distribution of the corresponding nodes of intelligent agents on the hash ring, adjust the node positions of each intelligent agent and recalculate the updated storage fit; analyze the correspondence between each user's communication record data and intelligent agents, as well as the frequency of communication between users and different intelligent agents, and combined with the deviation between communication record data and user profiles, obtain the necessity for each intelligent agent to share each communication record data based on the updated storage fit.
[0064] It should be noted that the storage nodes on the hash ring correspond to the agents, and the distribution of user profiles on the hash ring needs to be analyzed in conjunction with the corresponding agents. In order to improve the agent's rapid response to similar user profiles, the distribution of similar user profiles on the hash ring should be similar, so that the agent corresponding to the node can respond quickly based on user communication with similar user profiles, thereby improving the agent's work response efficiency.
[0065] It should be further noted that the initial node assigned to the agent on the hash ring may differ from the agent it collects. That is, the node may not fully reflect the correspondence between the user's communication data and the agent. In this case, it is necessary to reduce this difference. At the same time, it is necessary to consider whether the node corresponding to the reassigned agent needs to store the corresponding user's communication data. Based on the access frequency of the user profile itself and the deviation between the agent's communication data for the corresponding user and the overall user profile, the necessity for the agent to share the communication record data can be quantified.
[0066] Preferably, in one embodiment of the present invention, based on the correspondence between user communication record data and intelligent agents, and combined with the differences in the distribution of the corresponding nodes of the intelligent agents on the hash ring, the node positions of each intelligent agent are adjusted and the updated storage fit is recalculated. The specific method includes:
[0067] For any user's communication records, obtain the number of communication records corresponding to any intelligent agent. Use the ratio of this number to the total number of communication records for that user as the communication factor between that user and that intelligent agent. Obtain the communication factors between all users and that intelligent agent. Perform weight normalization on all communication factors. Use the result as the communication weight between each user and that intelligent agent. Perform a weighted summation on the mapping positions of each user based on the communication weights. Use the result as the initial adjustment position of that intelligent agent.
[0068] Furthermore, based on the communication weights, the storage fit of the agent to each user is weighted and summed, and the result is used as the original weight of the agent. The difference between 1 and the original weight is used as the adjustment weight of the agent. The original weight is used to correspond to the node corresponding to the agent, and the adjustment weight is used to correspond to the initial adjustment position of the agent. The node corresponding to the agent and the initial adjustment position are weighted and summed, and the result is used as the adjustment node position of the agent. Based on the mapping position of each user and the adjustment node position of the agent, the storage fit is recalculated.
[0069] Furthermore, a stop threshold is preset. In this embodiment, the stop threshold is described as 0.7. After recalculating the storage fit, the original weight of the agent is obtained again according to the above method. If the original weight is greater than or equal to the stop threshold, the adjusted node position of the agent is used as the updated node of the agent, and the recalculated storage fit is used as the updated storage fit of the agent for each user. If the original weight is less than the threshold, the adjusted node position is obtained again according to the above method, the storage fit is recalculated, and the threshold is judged. This process continues until the original weight obtained under the recalculated storage fit after obtaining the adjusted node position is greater than or equal to the stop threshold. Then, the iteration stops, and the latest adjusted node position is used as the updated node of the agent, and the latest storage fit is used as the updated storage fit of the agent for each user.
[0070] It should be noted that the greater the proportion of a user's communication record data belonging to the corresponding agent in the total number of data, the more relevant the mapping position of the user profile is to the agent. At the same time, the initial storage fit needs to be adjusted more. By constructing adjustment node positions and obtaining adjustment weights, the corresponding nodes of the agent on the hash ring are adjusted. Through iterative adjustment, the updated nodes of the agent can be better aligned with the mapping positions of users with larger communication factors on the hash ring, further improving the accuracy of storage fit calculation, and thus obtaining the updated storage fit.
[0071] Furthermore, it is necessary to further analyze the sharing relationship between communication record data and agents, based on updating storage compatibility. For agents that directly correspond to each other, sharing is highly necessary. However, for agents that do not directly correspond to each other, it is necessary to consider the similarity between the user's communication record data under the corresponding agent and the communication record data itself. At the same time, the frequency of the user's communication with the agent and the deviation between the communication record data and the user profile should be considered to further adjust the necessary performance of sharing communication record data with the corresponding agent, and finally obtain the necessity of agents sharing communication record data.
[0072] Preferably, in one embodiment of the present invention, the correspondence between the communication record data of each user and the intelligent agent, as well as the communication frequency between the user and different intelligent agents, are analyzed. Based on the deviation between the communication record data and the user profile, the necessity for each intelligent agent to share each communication record data is obtained by updating the storage fit. The specific method includes:
[0073] For any user's communication record data and any agent, if the communication record data corresponds to the agent, the storage factor of the agent for the communication record data is set to 1; if the communication record data does not correspond to the agent, several communication record data of the user under the agent are obtained as reference communication data for the communication record data. For the communication record data and any reference communication data, the communication time of the communication record data and the communication time of the reference communication data are obtained respectively, and the difference between each of them and the representative value of the user's communication time (the difference is obtained by subtracting the representative value from the communication time of the communication record data). The ratio of the difference corresponding to the communication record data to the difference corresponding to the reference communication data (the ratio is obtained by dividing the smaller value of the two differences by the larger value, and the ratio may be negative) is used as the time similarity between the communication record data and the reference communication data. Following the method for calculating time similarity, the communication time is replaced with communication duration. The similarity is calculated based on the user's representative communication duration value to obtain the duration similarity between the communication record data and the reference communication data. Similarly, based on the amount of communication data, the data volume similarity between the communication record data and the reference communication data is obtained. The cosine similarity between the communication content vector of the communication record data and the communication content vector of the reference communication data is used as the content similarity between the communication record data and the reference communication data. The average of the time similarity, duration similarity, data volume similarity, and content similarity between the communication record data and the reference communication data is used as the overall similarity between the communication record data and the reference communication data. The average of the overall similarity between the communication record data and all reference communication data of the agent is used as the storage factor for the communication record data by the agent.
[0074] Furthermore, for any user and any agent, the ratio of the number of communication records corresponding to that user in the agent to the total number of communication records for that user is denoted as the communication frequency of that user in the agent, and a number of corresponding communication records are taken as a number of corresponding communication data for that user in the agent; for any corresponding communication data, the absolute value of the difference between the communication time of the corresponding communication data and the representative value of the user's communication time is obtained, and the ratio of the absolute value of the difference to the maximum value of the absolute value of the difference among the communication times of all communication records of that user is taken as the time deviation factor of the corresponding communication data. Similarly, based on the communication duration and the amount of communication data, the duration deviation factor and the amount of communication data of the corresponding communication data are obtained respectively; the cosine similarity between the communication content vector of the corresponding communication data and the content representative vector of the user is obtained, and the cosine similarity is mapped to a linear transformation. Within the interval, i.e., with respect to cosine similarity interval linear transformation to The interval is used as the content similarity factor. The difference between 1 and the content similarity factor is used as the content deviation factor of the corresponding communication data. The mean of the time deviation factor, duration deviation factor, data volume deviation factor, and content deviation factor of the corresponding communication data is used as the overall deviation factor of the corresponding communication data. The mean of the overall deviation factor of all corresponding communication data of the user in the agent is obtained. The mean of the overall deviation factor of the user in the agent is subtracted from 1 as the profile consistency of the user in the agent. The product of the profile consistency and the communication frequency is used as the storage reference of the user in the agent.
[0075] Furthermore, for any user's communication record data and any agent, the product of the agent's storage factor for the communication record data, the user's storage reference value in the agent, and the agent's update storage adaptability to the user is used as the agent's sharing factor for the communication record data; the sharing factors of all agents for all communication record data of the user are linearly normalized, and the result is used as the sharing necessity of each agent for each communication record data of the user.
[0076] It should be noted that, based on the agent's storage fit with the user, it is necessary to analyze the communication record data and the communication relationship between the user and the agent. The more times the user communicates with the agent, and the closer the corresponding communication record data is to the representative values and representative vectors of each dimension in the user profile, the greater the consistency between the user and agent profiles. Based on storage fit and storage factor, the greater the possibility that the communication record data needs to be shared. The storage factor directly reflects the correlation between the communication record data and the agent. If there is a direct correspondence, the storage factor is 1. If there is no direct correspondence, the similarity between the communication record data and other corresponding communication record data of the agent and this communication record data in each dimension is considered. The more similar, the larger the storage factor, thus obtaining the necessity of sharing.
[0077] Thus, the necessity for each intelligent agent to share the data of each communication record is established.
[0078] Step S004: Based on the necessity of each agent sharing each communication record data, determine whether the communication record data is shared to the agent or stored in the central server, and share the communication content and communication record data on the multi-agent platform through data transmission.
[0079] It should be noted that the greater the necessity for an agent to share communication record data, the more necessary it is to share the communication record data among the respective agents. At the same time, if the necessity for sharing communication record data is greater for multiple agents, it is necessary to consider storing the corresponding communication record data in a central server to adapt to the calls of multiple agents, thereby realizing data sharing on a multi-agent platform.
[0080] Specifically, a sharing threshold is preset (in this embodiment, the sharing threshold is described as 0.6), and a sharing ratio is preset (in this embodiment, the sharing ratio is described as 40%). The product of the number of agents in the multi-agent platform and the sharing ratio, rounded down, is taken as the sharing quantity. For any communication record data, if the necessity for any agent to share the communication record data is greater than the sharing threshold, then that agent is designated as the data sharing agent for that communication record data. All data sharing agents for the communication record data are acquired. If the number of data sharing agents is greater than or equal to the sharing quantity, the communication record data is stored in the central server so that the corresponding large number of data sharing agents can quickly access it. If the number of data sharing agents is less than the sharing quantity, the communication record data is shared to the corresponding data sharing agents through data transmission. The distributed storage nodes of each data sharing agent store it. The communication record data consists of some feature data of the corresponding communication. At the same time, a large amount of content of the corresponding communication is shared and stored in the central server or the distributed storage nodes of each agent based on the corresponding communication record data, thus realizing data sharing in the multi-agent platform.
[0081] This concludes the embodiment.
[0082] Another embodiment of the present invention provides a data sharing system for a multi-agent platform. The system includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the above-described method steps S001 to S004.
[0083] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A data sharing method for multi-agent platforms, characterized in that, The method includes the following steps: The system acquires communication content and communication record data of several interactions between agents in a multi-agent platform. The communication record data includes communication time, communication duration, communication data volume, communication content domain, and the user corresponding to the communication record data. Based on the time distribution and duration of different interactions of the same user, the interaction interval of each interaction of each user is obtained. Combined with the amount of interaction data and the domain of interaction content, a user profile of each user is constructed. The user profile of each user is mapped to a hash ring using a consistent hashing algorithm to obtain the mapping position of each user. Combined with the distribution of the corresponding storage nodes of each agent on the hash ring, the storage fit of each agent to each user is obtained. Based on the correspondence between user communication record data and intelligent agents, and combined with the differences in the distribution of the corresponding nodes of intelligent agents on the hash ring, the node positions of each intelligent agent are adjusted and the updated storage fit is recalculated; the correspondence between user communication record data and intelligent agents, as well as the frequency of communication between users and different intelligent agents, are analyzed, and the deviation between communication record data and user profiles is combined to obtain the necessity for each intelligent agent to share each communication record data based on the updated storage fit. Based on the necessity of each agent sharing each communication record data, it is determined whether the communication record data is shared to the agent or stored in the central server, and the communication content and communication record data are shared on the multi-agent platform through data transmission; The specific methods for obtaining the storage fit of each agent to each user are as follows: Obtain the storage nodes of each agent on the hash ring; for any user's mapping position and any agent's storage node, obtain the distance between the user's mapping position and the agent's storage node on the hash ring, obtain the ratio of the distance to the total length of the corresponding partition of the agent's storage node on the hash ring, and subtract the ratio from 1 to obtain the difference as the storage fit degree of the agent for the user.
2. The data sharing method for multi-agent platforms according to claim 1, characterized in that, The specific methods for constructing user profiles for each user are as follows: For any user's communication records of several exchanges, the time interval between each time-series adjacent communication records is obtained, based on the communication time and the date corresponding to the communication record data, and is used as the communication interval between adjacent communication records. Density clustering is performed on the communication intervals of all adjacent communication records. The distance metric is the absolute value of the difference between communication intervals, resulting in several clusters. The communication interval corresponding to the center data point of the cluster with the largest number of communication intervals is taken as the representative value of the user's communication interval. Density clustering is also performed on the communication time, communication duration, and communication data volume of all communication data of the user to obtain representative values of communication time, communication duration, and communication data volume. Based on the communication content domain of the user's communication record data, obtain the communication content vector of each communication record data and the content representative vector of the user; Based on the user's communication interval representative value, communication time representative value, communication duration representative value, communication data volume representative value, and content representative vector, a multi-dimensional vector is constructed as the user profile.
3. The data sharing method for multi-agent platforms according to claim 2, characterized in that, The specific method for obtaining the communication content vector of each communication record data and the content representative vector of the user is as follows: For any user's communication record data, word vector transformation is performed on the communication content domain to obtain the communication content vector of each communication record data. Density clustering is performed on the communication content vectors of all communication records data of the user. The distance metric is the difference obtained by subtracting the cosine similarity between communication content vectors from 1 to obtain several clusters. The communication content vector corresponding to the center data point of the cluster with the largest number of communication content vectors is taken as the content representative vector of the user.
4. The data sharing method for multi-agent platforms according to claim 1, characterized in that, The specific methods for obtaining the mapping location of each user are as follows: The hash value of each user's profile is calculated using a consistent hashing algorithm. Based on the hash value of each user's profile, each user is mapped on a hash ring, and the mapped position is used as the mapped position of each user.
5. The data sharing method for multi-agent platforms according to claim 1, characterized in that, The specific methods for adjusting the node positions of each agent and recalculating the updated storage fit are as follows: For any user's several communication records, obtain the number of communication records corresponding to any intelligent agent, and use the ratio of the number to the total number of communication records of the user as the communication factor between the user and the intelligent agent; obtain the communication factors between all users and the intelligent agent, perform weight normalization on all communication factors, and use the result as the communication weight between each user and the intelligent agent. The mapping positions of each user are weighted and summed based on the communication weights, and the result is used as the initial adjustment position of the agent. The storage fit of the agent to each user is weighted and summed based on the communication weights. The result is used as the original weight of the agent. The difference between 1 and the original weight is used as the adjustment weight of the agent. The original weight is used to match the node corresponding to the agent. The adjustment weight is used to match the initial adjustment position of the agent. The node corresponding to the agent and the initial adjustment position are weighted and summed. The result is used as the adjustment node position of the agent. The storage fit is recalculated based on the mapping position of each user and the adjustment node position of the agent. After recalculating the storage fit, the original weight of the agent is reacquired. If the original weight is greater than or equal to the stopping threshold, the adjusted node position of the agent is used as the updated node of the agent, and the recalculated storage fit is used as the updated storage fit of the agent for each user. If the original weight is less than the threshold, the adjustment node position is reacquired, the storage fit is recalculated, and the threshold is judged again. This process is repeated until the original weight obtained under the recalculated storage fit after reacquiring the adjustment node position is greater than or equal to the stopping threshold. Then the iteration stops, and the latest adjustment node position is used as the update node of the agent, and the latest storage fit is used as the updated storage fit of the agent for each user.
6. The data sharing method for multi-agent platforms according to claim 2, characterized in that, The specific methods for determining the necessity of sharing communication record data among various intelligent agents are as follows: Analyze the correspondence between communication record data of each user and intelligent agents. Combined with the differences between different communication record data of the same user, obtain the storage factor of each intelligent agent for each communication record data. This includes: for any communication record data of any user and any intelligent agent, if the communication record data corresponds to that intelligent agent, the storage factor of that intelligent agent for the communication record data is recorded as 1; if the communication record data does not correspond to that intelligent agent, obtain several communication record data of that user under that intelligent agent as reference communication data for the communication record data. For the communication record data and any reference communication data, obtain the communication time of the communication record data and the communication time of the reference communication data respectively, and the difference between each and the representative value of the user's communication time. The ratio of the difference corresponding to the communication record data to the difference corresponding to the reference communication data is used as the ratio of the communication record data to the reference communication data. Based on the time similarity; following the calculation method of time similarity, the communication time is replaced with the communication duration, and the similarity is calculated based on the representative value of the user's communication duration to obtain the duration similarity between the communication record data and the reference communication data; similarly, based on the amount of communication data, the data volume similarity between the communication record data and the reference communication data is obtained; the cosine similarity between the communication content vector of the communication record data and the communication content vector of the reference communication data is used as the content similarity between the communication record data and the reference communication data; the mean of the time similarity, duration similarity, data volume similarity, and content similarity between the communication record data and the reference communication data is used as the overall similarity between the communication record data and the reference communication data; the mean of the overall similarity between the communication record data and all reference communication data of the agent is used as the storage factor of the agent for the communication record data. For any user and any intelligent agent, the ratio of the number of communication record data corresponding to the user in the intelligent agent to the total number of communication record data of the user is recorded as the communication frequency of the user in the intelligent agent, and the corresponding number of communication record data is used as the corresponding communication data of the user in the intelligent agent. For any corresponding communication data, obtain the absolute value of the difference between the communication time of the corresponding communication data and the representative value of the user's communication time, and use the ratio of the absolute value of the difference to the maximum value of the absolute value of the difference in the communication time of all communication records of the user as the time deviation factor of the corresponding communication data. Similarly, based on the communication duration and the amount of communication data, the duration deviation factor and the amount of communication data deviation factor are obtained respectively; the cosine similarity between the communication content vector of the corresponding communication data and the content representative vector of the user is obtained, and the cosine similarity is mapped to a linear transformation. Within the interval, the result is used as the content similarity factor, and the difference between 1 and the content similarity factor is used as the content deviation factor of the corresponding communication data. The average of the time deviation factor, duration deviation factor, data volume deviation factor, and content deviation factor of the corresponding communication data is used as the overall deviation factor of the corresponding communication data; the average of the overall deviation factors of all corresponding communication data of the user in the agent is obtained, and 1 is subtracted from the average of the overall deviation factors to obtain the profile consistency of the user in the agent; the product of the profile consistency and the communication frequency is used as the storage reference of the user in the agent. For any user's communication record data and any agent, the product of the agent's storage factor for the communication record data, the user's storage reference value in the agent, and the agent's update storage adaptability to the user is used as the agent's sharing factor for the communication record data. The sharing factor of all agents for all communication records of the user is linearly normalized, and the result is used as the necessity for each agent to share each communication record of the user.
7. The data sharing method for multi-agent platforms according to claim 6, characterized in that, The specific method for obtaining the storage factor of each agent for each communication record data is as follows: For any user's communication record data and any intelligent agent, if the communication record data corresponds to the intelligent agent, the storage factor of the intelligent agent for the communication record data is recorded as 1; If the communication record data does not correspond to the intelligent agent, obtain several communication record data of the user under the intelligent agent as reference communication data for the communication record data. For the communication record data and any of the reference communication data, the communication time of the communication record data and the communication time of the reference communication data are obtained respectively, and the difference between each of them and the representative value of the communication time of the user is used as the ratio of the difference corresponding to the communication record data to the difference corresponding to the reference communication data. Obtain the duration similarity and data volume similarity between the communication record data and the reference communication data; use the cosine similarity between the communication content vector of the communication record data and the communication content vector of the reference communication data as the content similarity between the communication record data and the reference communication data. The average of the time similarity, duration similarity, data volume similarity, and content similarity between the communication record data and the reference communication data is used as the overall similarity between the communication record data and the reference communication data; the average of the overall similarity between the communication record data and all reference communication data of the agent is used as the storage factor of the agent for the communication record data.
8. The data sharing method for multi-agent platforms according to claim 1, characterized in that, The specific methods for determining whether communication record data is shared with the intelligent agent or stored on a central server are as follows: The sharing threshold and sharing ratio are preset, and the product of the number of agents in the multi-agent platform and the sharing ratio, rounded down, is taken as the sharing quantity. For any communication record data, if the necessity for any agent to share the communication record data is greater than the sharing threshold, that agent is designated as the data sharing agent for that communication record data. All data sharing agents for that communication record data are obtained. If the number of data sharing agents is greater than or equal to the sharing limit, the communication record data is stored in the central server. If the number of data sharing agents is less than the sharing limit, the communication record data is shared to the corresponding data sharing agents through data transmission, and the distributed storage nodes of each data sharing agent store it.
9. A data sharing system for a multi-agent platform, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the data sharing method for a multi-agent platform as described in any one of claims 1-8.
Citation Information
Patent Citations
Task scheduling method and system applied to intelligent agent
CN120723416A