Data processing method based on multi-agent cooperation and related equipment
Through the data processing and processing method of multi-agent collaboration, the collaboration of data cleaning, information extraction and text generation agents is solved, and the problem of poor flexibility of a single AI model is improved, the accuracy and efficiency of data processing are improved, and the high reporting is ensured. Quality and reliability.
Patent Information
- Application Number
- CN202411333520.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2024-12-27
AI Technical Summary
Traditional single AI models have poor flexibility and adaptability when processing complex information, resulting in the impact of the accuracy and reliability of data information.
The data processing method based on multi-agent collaboration is adopted, including data cleaning agents, information extraction agents and text generation agents, to improve the adaptability and flexibility of the system through collaboration and interaction, and ensure the accuracy and efficiency of data processing.
It improves the accuracy and efficiency of data processing, ensures the high accuracy and reliability of the generated text reports, solves the consistency problem of data annotation, and enhances the system's adaptability.
Smart Images

Figure CN119203945A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a data processing method based on multi-agent collaboration and related equipment. Background Art
[0002] In the modern digital environment, it is essential to accurately process and structure data information. This process faces multiple challenges, including the diversity and complexity of information sources and the consistency of data annotation. Traditional single AI models often perform poorly in dealing with these problems due to lack of sufficient flexibility and adaptability. These models are usually effective in performing specific tasks, but as instrumental entities, they lack the ability to actively respond to environmental changes, affecting the accuracy and reliability of data information. Summary of the invention
[0003] In view of this, the purpose of this application is to propose a data processing method and related equipment based on multi-agent collaboration to solve the problem of poor flexibility and adaptability of traditional single AI models when processing complex information.
[0004] Based on the above objectives, the first aspect of the present application provides a data processing method based on multi-agent collaboration, comprising:
[0005] Determine a text to be processed corresponding to a multi-agent system, wherein the multi-agent system includes a data cleaning agent, an information extraction agent, and a text generation agent;
[0006] Using the data cleaning agent to clean the text to be processed;
[0007] Using the information extraction agent to extract information from the cleaned text to be processed to obtain key information;
[0008] The text generation agent is used to perform statistical analysis on the key information, and a text report is generated according to the statistical analysis results.
[0009] The second aspect of the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, and when the processor executes the program, the method described in the first aspect is implemented.
[0010] The third aspect of the present application further provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method described in the first aspect.
[0011] As can be seen from the above, the data processing method and related equipment based on multi-agent collaboration provided by the present application include determining the text to be processed corresponding to the multi-agent system, wherein the multi-agent system includes a data cleaning agent, an information extraction agent and a text generation agent. The data cleaning agent is used to clean the text to be processed, the information extraction agent is used to extract information from the cleaned text to be processed to obtain key information, the text generation agent is used to perform statistical analysis on the key information, and a text report is generated based on the statistical analysis results. Each agent in the multi-agent system can not only handle specific data tasks, such as data cleaning, information extraction and text generation, but also independently adjust its behavior and strategy according to changes in the environment. Each agent in the multi-agent system exhibits a high degree of autonomy and social ability, can operate autonomously and interact complexly with the environment and other agents. The collaboration and interaction between agents further enhance the adaptability and flexibility of the entire multi-agent system, improve the accuracy and efficiency of data processing, and ensure the high accuracy and reliability of the generated text report. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0013] Figure 1 A flowchart of a data processing method based on multi-agent collaboration according to an embodiment of the present application;
[0014] Figure 2 This is a schematic diagram of the structure of a data processing device based on multi-agent collaboration according to an embodiment of the present application;
[0015] Figure 3 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0016] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0017] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0018] In the related technologies, agent technology is an important concept in the field of artificial intelligence. It refers to a computing system that can perceive the environment, make decisions and perform actions. These agents can be virtual, software-based, or actual, hardware devices. Agent technology has the following technical points:
[0019] Perception: The agent is able to perceive its surroundings. This includes using sensors, cameras, microphones, etc. to obtain information about the outside world. The perception capabilities of agents have been significantly enhanced by technological developments in areas such as computer vision, natural language processing, and voice recognition.
[0020] Decision-making: The agent is able to make decisions based on the information it perceives. This typically involves using techniques such as machine learning, rule engines, or deep reinforcement learning to predict the best action or strategy;
[0021] Execution: The agent is able to take actions to implement its decision. This may include physical actions, such as a robot performing a task, or virtual actions, such as a chatbot generating a text response;
[0022] Learning and adaptation: Agents are usually capable of learning and can continuously improve their performance based on experience. This can be achieved through techniques such as supervised learning, reinforcement learning, or self-supervised learning;
[0023] Interaction: Agents can interact with human users or other agents. This includes understanding and generating natural language, recognizing emotions and sentiments, and communicating in a user-friendly manner.
[0024] In natural language processing, intelligent agents can be driven by large prediction models.
[0025] Deep learning language models with large-scale language model parameters usually contain hundreds of millions, tens of billions, hundreds of billions, trillions, or even more than 10 trillion language model parameters. Large language models can also be called foundation language models / foundation models. Large language models are pre-trained with large-scale unlabeled corpora to produce pre-trained language models with more than 100 million parameters. Such language models can adapt to a wide range of downstream tasks and have good generalization capabilities, such as large-scale language models (LLM) and multi-modal pre-training language models. In actual application, only a small number of samples are needed to fine-tune the pre-trained language model and it can be applied to different tasks. The large language model can be widely used in natural language processing (NLP), computer vision and other fields. Specifically, it can be applied to computer vision tasks such as visual question answering (VQA), image caption (IC), image generation, as well as natural language processing tasks such as text-based sentiment classification, text summary generation, and machine translation. The main application scenarios of the large language model include digital assistants, intelligent robots, search, online education, office software, e-commerce, intelligent design, etc.
[0026] In the face of complex and diverse information sources and inconsistent data annotation, in order to avoid the problem of poor processing effect when using a single AI model, this application introduces a multi-agent system, each agent can not only handle specific data tasks, but also independently adjust its behavior and strategy according to changes in the environment. In terms of data annotation consistency, the agent can also effectively identify and handle the contradictions between different people's different annotations of the same data. Promote communication and discussion between annotation personnel, help annotation personnel reach a consensus, and improve the accuracy and consistency of data annotation. The agent can also identify data classification problems based on the initial understanding of the AI model and the understanding of the annotation personnel. In some cases, the agent may classify the data into different categories from humans based on its training algorithm. These agents can identify such differences and feedback information to the annotation personnel to provide adjustment suggestions. Such a feedback mechanism not only reduces errors and biases, but also continuously optimizes the results of overall data annotation through iterative improvements. The method of introducing a multi-agent system not only improves the accuracy and efficiency of information processing, but also effectively solves the inconsistency between human and AI in information understanding, especially, it can ensure the high accuracy and reliability of data information. By implementing this adaptive and highly interactive system, data processing capabilities in different fields are significantly improved, thereby better coping with complex and dynamically changing information environments.
[0027] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0028] This application provides a data processing method based on multi-agent collaboration. Figure 1 , including the following steps:
[0029] Step 102: determine the text to be processed corresponding to the multi-agent system, wherein the multi-agent system includes a data cleaning agent, an information extraction agent and a text generation agent.
[0030] Specifically, the text to be processed is a natural language text, which contains structural information and unstructured information. The text to be processed can be information text in various fields. Each agent in the multi-agent system is specially designed to process a specific type of data. It can independently perform tasks through built-in algorithms and exchange information and feedback with other agents through a centralized communication network. The data cleaning agent can identify and remove noise and abnormal information in the data, and the information extraction agent can adjust its algorithm according to the cleaning results to more accurately extract key information from the cleaned data. The text generation agent uses all the optimized data to generate high-quality reports or summaries, ensuring the reliability and consistency of the output of the entire system.
[0031] Step 104: Utilize the data cleaning agent to clean the text to be processed.
[0032] Specifically, the data cleaning agent can clean the text to be processed, and process the structured text and the unstructured text separately during the cleaning process to remove noise and abnormal information in the text to be processed. Further, step 104 includes:
[0033] Step 1042: Use a text reading tool to read the text to be processed, and divide the text to be processed into unstructured text and semi-structured text.
[0034] Specifically, the text reading tool is used to read the text to be processed. For example, the text reading tool can be Python's python-docx. The text reading tool can read a word document and access various elements in the document, including unstructured plain text paragraphs and semi-structured data table data. The data cleaning agent can distinguish and extract text and table content in the document.
[0035] Step 1044: remove redundant spaces and special symbols in the unstructured text.
[0036] Specifically, the data cleaning agent traverses each paragraph in the unstructured text, using the paragraphs property. Each paragraph object can access the corresponding text content through its .test property. The extracted text content is preliminarily cleaned, redundant spaces, special symbols, etc. are removed, saved to a string list and stored in a file.
[0037] Step 1046: extract text content from the semi-structured text, and convert the text content into a predetermined format.
[0038] Specifically, the data cleaning agent traverses each table in the semi-structured text using the tables attribute. Each table consists of rows and columns. For each table, further traverse each row, and then traverse each cell in the row, using .text to extract the text in the cell. According to the format requirements, the tabular data is converted into an appropriate structured format, such as CSV, JSON, etc., or directly imported into the database. For example, the data cleaning agent extracts detailed information about individuals such as name, ID number, and contact information, and converts them into CSV or database format for further analysis.
[0039] Through the above data cleaning process, basic data can be provided for subsequent information extraction and report generation, thereby improving the accuracy of information extraction and report generation.
[0040] Step 106: Utilize the information extraction agent to extract information from the cleaned text to be processed to obtain key information.
[0041] Specifically, the information extraction agent includes an information extraction large model and a trained entity relationship extraction model. The information extraction agent uses the information extraction large model and the entity relationship extraction model to accurately identify the time and place information in the text. For example, open source information extraction large models such as chatGLM or Baichuan are used to capture the context of the text to be processed, so as to understand and predict the complex expressions of time and place. For the specific time and place entity extraction, a specially trained small entity relationship extraction model is used, such as the NER (Named Entity Recognition) model. The entity relationship extraction model is optimized to recognize and extract dates, times and places in a specific format. Finally, combined with contextual information, the information extraction large model is used to correct vague or incomplete time and place descriptions, thereby improving the accuracy of key information extraction.
[0042] Further, step 106 includes:
[0043] The cleaned text to be processed is semantically recognized using the information extraction model to determine the first information. The entity relationship extraction model is used to extract entities and relationships that conform to a predetermined format from the cleaned text to be processed to determine the second information; the first information and the second information are verified using the information extraction model, and the verified information is used as the third information; an information association relationship is constructed based on the third information, and the third information and the information association relationship are used as the key information.
[0044] Specifically, in personnel information extraction, the information extraction agent not only extracts a single entity, but also can identify and extract related information related to a specific person, such as ID card number and mobile phone number. This type of extraction is essentially a relationship extraction. The information extraction agent can build a structured information group, such as linking a person's name with its corresponding identity information. In specific implementation, the information extraction model is used to capture the text context and help parse the complex semantics in the person information. The first information is extracted by the information extraction model. For person information extraction, the entity relationship extraction model is used. The entity relationship extraction model is optimized for identifying and extracting task information in a specific format. The second information is extracted by the entity relationship extraction model. The information extraction model has a good understanding of the text, but the returned data format is less standardized. The entity relationship extraction model is specifically used to extract person information in a specific format, and the returned data format is more standardized.
[0045] In the extraction process, by combining context information, the information extraction model can also be used to correct vague or incomplete information descriptions, thereby improving the overall extraction accuracy. Specifically, the first information and the second information are verified using the information extraction model, and the verified information is used as the third information. The information extraction model is used to perform self-checking, and the first information and the second information are returned to the information extraction model. By constructing a suitable prompt word prompt, the information extraction model is used to complete the self-check of the first information and the second information, so as to correct the first information and the second information, and the corrected information is recorded as the third information.
[0046] In addition, the information extraction agent also needs to pay attention to other important dimensions in the text to be processed, such as event types, specific facts related to the event, etc. This requires the information extraction agent to have the ability to extract multi-dimensional information from the text to support more comprehensive data analysis and decision-making. First, a multi-task learning strategy is used, in which the information extraction agent is trained simultaneously to identify and extract multiple information dimensions in the text. Then, data classification techniques are implemented, such as using text classification models to identify and classify different types of events and facts. Finally, all the extracted multi-dimensional information and third information are combined to construct information associations, generate a comprehensive data view, and provide a comprehensive information framework. The third information and information associations are recorded as key information. Key information is structured data, which provides a comprehensive and accurate data foundation for subsequent text generation.
[0047] Through the method of this step, the information extraction agent can not only process and extract basic entity information, but also establish a complex information relationship network, thereby providing strong support for further data analysis report generation and business applications.
[0048] Step 108: Utilize the text generation agent to perform statistical analysis on the key information, and generate a text report based on the statistical analysis results.
[0049] Specifically, the core task of the text generation agent is to generate detailed data analysis reports based on the data extracted and structured from the text by the information extraction agent. These reports are designed to mine and highlight key information in the table, such as the distribution of event types, the characteristics of activities in specific areas, and other statistically significant information. The text generation agent first conducts an in-depth analysis of the structured data to identify patterns and trends in the data. For example, it analyzes the most frequent event types in different cities, or the main event categories across the province. It uses statistical methods to calculate the frequency of various events, identify the number of clustered events with more than 10 participants, and other relevant statistical information. Then, based on the analysis results, the text generation agent constructs a report containing key data points and statistical insights. The text report specifically includes elements such as text description, chart display, and data comparison, making the report rich and easy to understand. The text report will place special emphasis on statistically significant findings, such as the types of events that are particularly prominent in a city or the most common types of events in the province. At the same time, the text generation agent uses natural language generation technology to ensure that the language of the report is accurate, fluent, and professional. This also includes the use of appropriate terminology and style to adapt to, for example, the serious and rigorous expression style of different fields.
[0050] Based on the above steps 102 to 108, the data processing method based on multi-agent collaboration provided in this embodiment includes determining the text to be processed corresponding to the multi-agent system, wherein the multi-agent system includes a data cleaning agent, an information extraction agent and a text generation agent. The data cleaning agent is used to clean the text to be processed, the information extraction agent is used to extract information from the cleaned text to be processed to obtain key information, the text generation agent is used to perform statistical analysis on the key information, and a text report is generated according to the statistical analysis results. Each agent in the multi-agent system can not only process specific data tasks, such as data cleaning, information extraction and text generation, but also independently adjust its behavior and strategy according to changes in the environment. Each agent in the multi-agent system shows a high degree of autonomy and social ability, can operate autonomously and interact complexly with the environment and other agents. The collaboration and interaction between agents further enhance the adaptability and flexibility of the entire multi-agent system, improve the accuracy and efficiency of data processing, and ensure the high accuracy and reliability of the generated text report.
[0051] In this application, each agent can not only focus on different data processing tasks, such as data cleaning, information extraction and text generation, to ensure the professionalism and efficiency of each stage of work. These agents can also independently perform tasks through an efficient communication protocol while performing real-time information exchange and strategy coordination, thereby achieving seamless docking and optimization of the entire data processing process, as explained below through specific embodiments.
[0052] In some embodiments, the process of extracting information from the cleaned text to be processed by using the information extraction agent includes:
[0053] In response to the information extraction agent determining that there is abnormal data in the cleaned text to be processed, first associated information related to the abnormal data is recorded, and the abnormal data and the first associated information are fed back to the data cleaning agent so that the data cleaning agent adjusts its own data cleaning strategy.
[0054] Specifically, the data cleaned by the data cleaning agent is passed to the information extraction agent through a predefined interface, which can be achieved through API calls, message queues or direct writing to a shared database. The data is passed in JSON, XML or direct text string format to ensure that the information extraction agent can easily parse and further process it. The information extraction agent processes the data cleaned by the data cleaning agent. At this stage, the information extraction agent mainly focuses on whether the plain text and semi-structured table data in the data are correctly separated, and whether the redundant and special symbols in the data are removed. These problems will be recorded. Since the main task of the information extraction agent is to extract important information from the data, it does not have the function of directly checking the quality of data cleaning. Therefore, potential problems will be discovered and recorded in an indirect way and fed back to the data cleaning agent. The following takes the question of "whether the data is separated correctly" as an example to explain the feedback mechanism in detail.
[0055] The information extraction agent may experience an Out Of Memory (OOM) when processing data containing unseparated long tables. This situation indicates that the data cleaning agent may not have successfully separated the plain text and table data, resulting in insufficient resources for the information extraction agent to load the entire data set into memory for processing. When the information extraction agent encounters an OOM problem, it records this event (i.e., abnormal data) and related data environment, such as the size and type of the data (i.e., first association information), to help determine whether the resource limitation is caused by the data processing method or the data itself. The information extraction agent sends the OOM event back to the data cleaning agent through a predetermined channel (such as an API call or an error log system) as key feedback. The feedback information includes the specific situation of the data where the OOM occurred, emphasizing the concern about the processing of long table data. After receiving the OOM feedback, the data cleaning agent will re-evaluate its data processing process, especially checking its strategy for separating unstructured and structured data to confirm whether there are any processing deficiencies. The data cleaning agent needs to adopt more sophisticated logic to distinguish between plain text and table data. This might include using more sophisticated pattern recognition algorithms, or considering using visual layout recognition techniques to differentiate between text and tables, rather than relying solely on simple keywords or formatting identifiers.
[0056] Through continuous feedback loops, data cleaning agents and information extraction agents can jointly improve processing strategies and improve the overall data processing quality and efficiency. The monitoring mechanism is implemented through the interaction between data cleaning agents and information extraction agents to track key performance indicators of data processing (such as processing time, success rate, and error rate) to evaluate the interaction effect and overall system performance.
[0057] In addition to the interaction between the data cleaning agent and the information extraction agent in the above embodiment, information interaction and feedback can also be performed between the information extraction agent and the text generation agent, which is explained below through a specific embodiment.
[0058] In some embodiments, the process of analyzing the key information using the text generation agent includes:
[0059] In response to the text generation agent determining that there is abnormal information in the key information, second related information related to the abnormal information is recorded, and the abnormal information and the second related information are fed back to the information extraction agent so that the information extraction agent adjusts its own information extraction strategy.
[0060] Specifically, the interaction between the information extraction agent and the text generation agent is a key link in the data processing process, ensuring the continuity and accuracy from data extraction to report generation. The information extraction agent first extracts key information from the text to be processed, such as event type, location, number of participants, etc., and passes this data to the text generation agent in a structured format. The text generation agent then uses this structured information to generate a detailed analysis report. During the report generation process, the text generation agent may find problems left by the information extraction agent, which may cause contradictions or logical incoherence in the report content. For example: when generating a report on the frequency of various types of events in a province in the past year, the text generation agent found that although the data showed that the total number of traffic accidents decreased significantly compared with the previous year, the number of deaths caused by traffic accidents unexpectedly increased. This contradiction points to possible data extraction or aggregation errors, such as possible confusion of the extracted event categories (traffic accidents are incorrectly classified as non-traffic accidents) or inaccurate number of deaths. After the text generation agent finds the above abnormal information, it records the second related information related to the abnormal information and feeds the second related information back to the information extraction agent in the form of a problem report. The second context information will describe the contradiction in detail, point out the possible source of the error and provide references to the text paragraph so that the information extraction agent can re-evaluate its extraction logic and algorithm. The feedback of the second context information can be delivered through internal API calls, including a detailed description of the contradiction, relevant data indicators, and recommended inspection or correction measures.
[0061] After receiving the feedback, the information extraction agent needs to investigate the problem and analyze the possible causes of the error, such as insufficient model training, insufficient data preprocessing, or improper algorithm parameter settings. Depending on the specific nature of the problem, the information extraction agent may need to retrain the model, adjust the extraction rules, or enhance the processing capabilities of specific types of data. After the optimization is completed, the information extraction agent re-executes the information extraction process and passes the new results back to the text generation agent to verify whether the problem has been solved. Through the information interaction between the information extraction agent and the text generation agent, the accuracy of data extraction can be ensured, the adaptability and interactivity of the multi-agent system can be enhanced, and more reliable decision support can be provided to users.
[0062] During the operation of the multi-agent system, the problem of inconsistent labeling results between different users and between users and agents is often encountered. In order to solve this problem, this application introduces a contradiction resolution agent. This agent can not only assist labelers in improving the accuracy of data labeling, but also has a high degree of autonomy and analytical ability to handle and resolve various types of contradictions and inconsistencies. The working principle of the contradiction resolution agent is described below through a specific embodiment.
[0063] In some embodiments, the multi-agent system further includes a contradiction resolution agent; the method further includes:
[0064] In the process of the multi-agent system processing the text to be processed or training the multi-agent system, in response to the contradiction resolution agent determining that there are different annotation results for the same data item, the different annotation results are recorded as contradictory annotation results and fed back to the user, so that the user can adjust the annotation strategy according to the contradictory annotation results or adjust the data processing strategy of the multi-agent system; wherein the different annotation results are obtained by annotation by different annotation subjects, and the annotation subjects include users and information extraction agents, and the data items are derived from the text to be processed or the training data of the multi-agent system.
[0065] Specifically, whether it is extracting and processing the text to be processed or training the multi-agent system, it involves the process of data annotation by the annotators and the information agent. Different annotators may have different annotation results for the same data due to their different understanding of the same data. At this time, the contradiction agent can accurately identify the different annotation results of the same data by different annotators, and conduct in-depth analysis to identify the existing contradictions. Through this contradiction identification and analysis, the contradiction resolution agent can feed back key contradiction information to the annotator. This feedback mechanism not only stimulates discussion among annotators and promotes the formation of consensus, but also greatly improves the consistency and accuracy of data annotation. In addition to the annotation differences between different annotators, there are also annotation differences between annotators and information extraction agents. This difference comes from the difference in data understanding between the AI model and the annotator. Once the contradiction agent identifies this difference, it will provide modification suggestions in a timely manner, thereby effectively solving the problem of data understanding deviation, and also improving the accuracy of the automatic annotation process of the information extraction agent.
[0066] Furthermore, the contradiction resolution agent can adopt the following method steps in the process of contradiction resolution and adaptive feedback:
[0067] Step 202: Utilize the contradiction resolution agent to count the annotation results corresponding to each annotation category.
[0068] For each labeled category, all the labeling results corresponding to the labeled category are counted, including the labeling results of the labelers and the labeling results of the information extraction agent. For example, if the labeled category is a housing-related category, the labeling results corresponding to the housing-related category are counted, that is, all the data marked as housing-related categories are counted.
[0069] Step 204 : The annotation results corresponding to each annotation category are divided according to the annotation subjects, which include standard annotation subjects and other annotation subjects.
[0070] Specifically, the annotation subjects include standard annotation subjects and other annotation subjects. The standard annotation subjects are pre-selected experienced annotation personnel, and the annotation results of the standard annotation subjects are used as the annotation benchmark. Other annotation subjects include other annotation personnel and information extraction agents. The annotation results of each annotation category are divided according to the annotation subjects, namely the annotation results of the standard annotation subject and the annotation results of other annotation subjects. The contradiction resolution agent can automatically extract the annotation results of different annotation subjects.
[0071] Step 206: Calculate the consistency index of each other annotation subject relative to the standard annotation subject using a statistical method according to the annotation results corresponding to the standard annotation subject and the annotation results corresponding to the other annotation subjects.
[0072] Step 208: Mark the annotation categories corresponding to the consistency index exceeding the preset threshold as high-ambiguity categories, and feed back to the user.
[0073] Specifically, the contradiction analysis agent calculates the consistency ratio of the annotation results of other annotators or information extraction agents and the standard annotators in a specific category through statistical methods (such as chi-square test, Kappa consistency index, etc.). If there are a large number of inconsistencies with the annotations of the standard annotators in a certain category, the contradiction analysis agent will automatically mark these categories as "highly ambiguous" categories.
[0074] The following takes the labeling of two types of data, housing-related and land acquisition and demolition, by standard labeler A and other labeler B as examples to illustrate. Table 1 shows a labeling comparison table.
[0075] Table 1 shows the comparison table of the labeling situation
[0076] category Standard marking staff A Other annotators B total Housing 100 70 170 Land Acquisition and Demolition 50 80 130 total 150 150 300
[0077] As shown in Table 1, the total number of data to be annotated is 150, and the standard annotator A annotates 100 of them as housing-related events and 50 of them as land acquisition and demolition events. Other annotators B annotate 70 of them as housing-related events and 80 of them as land acquisition and demolition events. It can be seen that there are certain differences in the annotation standards between the standard annotator A and the other annotator B. Based on Table 1, the chi-square test method is used to calculate the consistency index P value, and the P value is about 0.00073, which is much smaller than the significance level (that is, the preset threshold), where the significance level is usually 0.05. The calculation method of the above P value is a conventional calculation method in this field, which will not be elaborated here. The smaller P value indicates that the annotation difference between the standard annotator A and the other annotator B is statistically significant, which means that there is a substantial inconsistency between the two in the classification annotation. Therefore, the housing-related category and the land acquisition and demolition category are marked as highly ambiguous categories. For the annotated categories marked as highly ambiguous categories, the contradiction analysis agent will feedback to the user.
[0078] Through the method of this embodiment, the contradiction resolution agent can accurately analyze and calculate the consistency index between different annotation subjects, and then timely and accurately determine the annotation categories with marking ambiguity, and assist the annotation personnel to correct and refine the annotation standards. This dynamic feedback adjustment ensures the continuous optimization of the annotation standards and the gradual improvement of the annotation quality.
[0079] In some embodiments, the method further includes: using the contradiction resolution agent to analyze the annotation results corresponding to the highly ambiguous categories to determine the cause of the ambiguity.
[0080] Specifically, for the annotation categories marked as highly ambiguous, the contradiction resolution agent will further analyze the specific content and possible causes of these ambiguities. For example, it may check whether the ambiguity is caused by unclear annotation instructions or the complexity of the data itself. Afterwards, the contradiction resolution agent will feed back these analysis results and specific annotation examples to all annotators, and may propose suggestions for modifying existing annotation instructions or retraining.
[0081] There are two types of ambiguous situations:
[0082] First, different annotation results are generated due to misunderstandings among annotators.
[0083] When identifying understanding biases, the contradiction resolution agent first uses text similarity analysis and context analysis tools to identify different understandings between different annotators on specific categories. For example, different annotators may have different interpretations of similar or ambiguous terms. Then, analyze whether the annotation instructions are detailed enough and whether they may lead to different interpretations. Compare the annotation results of each annotator and count the frequency and distribution of different results in each category. Use statistical tests to determine which categories have significant differences in annotation results. Feedback categories and specific examples with high understanding biases to the annotation team, and organize discussions to let annotators jointly review ambiguous data and jointly determine the most appropriate annotation strategy. Based on the team's feedback and discussion results, revise the annotation instructions to clarify the annotation standards for ambiguous or confusing annotations. Provide more examples and explanations to help annotators unify their understanding of the standards.
[0084] Second, there are differences between the annotation habits of labelers based on business scenarios and the labeling of information extraction agents based on sentence meaning.
[0085] First, the contradiction resolution agent analyzes the annotation habits of the annotators based on business logic, such as the processing of certain proper nouns or industry terms, and the differences with the pure text analysis of the information extraction agent. Then, identify the contextual information or specific business rules that the information extraction agent ignores when processing specific business scenarios. Compare the annotation results of the annotators and the information extraction agent, paying special attention to the categories with high annotation error rates of the information extraction agent. Use tools such as confusion matrix to analyze the consistency and differences between the annotators and the information extraction agent. Adjust the processing logic of the information extraction agent according to the business logic and habits of the annotators, such as increasing the recognition ability of specific business rules and terms. Integrate business scenario information into the information extraction agent, such as through transfer learning or adding scenario-specific training data. Let the information extraction agent learn business logic and complex decision-making processes from manual annotations to improve the business adaptability and accuracy of the information extraction agent.
[0086] Based on the feedback and discussion results, the contradiction resolution agent not only adjusts its recognition and classification algorithms in subsequent labeling work, but also assists labelers in revising and refining the labeling standards. This dynamic adjustment ensures the continuous optimization of standards and the gradual improvement of labeling quality. During the operation of the multi-agent system, the contradiction resolution agent will continuously monitor the changes in the labeling results and the improvement of consistency, and continuously learn and adjust its algorithm based on new data and feedback, so as to gradually reduce the categories with high ambiguity and improve the overall labeling accuracy and consistency.
[0087] The multi-agent system of the present application achieves efficient execution and optimization of tasks by focusing each agent on a specific data processing task. These agents include data cleaning agents, information extraction agents, and text generation agents, which can perform real-time information exchange and strategy coordination while independently executing tasks through an efficient communication protocol. This approach not only improves the professionalism and efficiency of work at each stage, but also ensures seamless connection and optimization of the entire data processing process.
[0088] In addition, as a key component of the system, the contradiction resolution agent is specifically responsible for identifying and resolving various contradictions and inconsistencies that arise during the data annotation process. By conducting in-depth analysis of the annotation results between different annotators and information extraction agents, the contradiction resolution agent can accurately identify the contradictions in the annotations and feed back these key information to the relevant agents for processing and adjustment. This not only promotes discussion and consensus among annotators, but also greatly improves the consistency and accuracy of data annotation by dynamically adjusting data processing strategies. Through the integrated multi-agent system, it can ensure that the data maintains a high standard of quality and consistency in every step from collection to output, significantly improving the efficiency and output quality of the entire system.
[0089] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.
[0090] It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0091] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a data processing device.
[0092] refer to Figure 2 The data processing device based on multi-agent collaboration includes:
[0093] A determination module 302 is configured to determine a text to be processed corresponding to a multi-agent system, wherein the multi-agent system includes a data cleaning agent, an information extraction agent, and a text generation agent;
[0094] A cleaning module 304 is configured to clean the text to be processed using the data cleaning agent;
[0095] An extraction module 306 is configured to extract information from the cleaned text to be processed using the information extraction agent to obtain key information;
[0096] The generation module 308 is configured to use the text generation agent to perform statistical analysis on the key information and generate a text report based on the statistical analysis results.
[0097] In some embodiments, the information extraction agent includes an information extraction big model and a trained entity relationship extraction model; the extraction module 306 is also configured to use the information extraction big model to perform semantic recognition on the cleaned text to be processed to determine the first information; use the entity relationship extraction model to extract entities and relationships that conform to a predetermined format in the cleaned text to be processed to determine the second information; use the information extraction big model to verify the first information and the second information, and use the verified information as the third information; construct an information association relationship based on the third information, and use the third information and the information association relationship as the key information.
[0098] In some embodiments, a feedback module is also included. The feedback module is configured to record first associated information related to the abnormal data in response to the information extraction agent determining that there is abnormal data in the cleaned text to be processed during the process of extracting information from the cleaned text to be processed using the information extraction agent, and to feed back the abnormal data and the first associated information to the data cleaning agent so that the data cleaning agent can adjust its own data cleaning strategy.
[0099] In some embodiments, the feedback module is also configured to, in response to the text generating agent determining that there is abnormal information in the key information during the process of analyzing the key information using the text generating agent, record second related information related to the abnormal information, and feed back the abnormal information and the second related information to the information extraction agent so that the information extraction agent can adjust its own information extraction strategy.
[0100] In some embodiments, the cleaning module 304 is configured to read the text to be processed using a text reading tool, divide the text to be processed into unstructured text and semi-structured text; remove redundant spaces and special symbols in the unstructured text; extract the text content in the semi-structured text, and convert the text content into a predetermined format.
[0101] In some embodiments, the multi-agent system also includes a contradiction resolution agent; the method also includes a contradiction analysis module, which is configured to, in response to the contradiction resolution agent determining that there are different annotation results for the same data item during the process of the multi-agent system processing the text to be processed or training the multi-agent system, record the different annotation results as contradictory annotation results and feed them back to the user, so that the user can adjust the annotation strategy or adjust the data processing strategy of the multi-agent system according to the contradictory annotation results; wherein the different annotation results are obtained by annotation by different annotation subjects, the annotation subjects include users and information extraction agents, and the data items are derived from the text to be processed or the training data of the multi-agent system.
[0102] In some embodiments, the contradiction analysis module is further configured to use the contradiction resolution agent to respectively count the annotation results corresponding to each annotation category; the annotation results corresponding to each annotation category are divided according to the annotation subjects, and the annotation subjects include standard annotation subjects and other annotation subjects; according to the annotation results corresponding to the standard annotation subject and the annotation results corresponding to the other annotation subjects, a statistical method is used to calculate the consistency index of each other annotation subject relative to the standard annotation subject; the annotation category corresponding to the consistency index exceeding a preset threshold is marked as a high-ambiguity category, and feedback is given to the user.
[0103] In some embodiments, the contradiction analysis module is further configured to use the contradiction resolution agent to analyze the annotation results corresponding to the high-ambiguity category to determine the cause of the ambiguity.
[0104] For the convenience of description, the above device is described in terms of functions divided into various modules. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0105] The device of the above-mentioned embodiment is used to implement the corresponding data processing method based on multi-agent collaboration in any of the aforementioned embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0106] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the data processing method based on multi-agent collaboration described in any of the above embodiments is implemented.
[0107] Figure 3 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.
[0108] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0109] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0110] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0111] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0112] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0113] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0114] The electronic device of the above-mentioned embodiment is used to implement the corresponding data processing method based on multi-agent collaboration in any of the aforementioned embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0115] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the data processing method based on multi-agent collaboration as described in any of the above embodiments.
[0116] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0117] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the data processing method based on multi-agent collaboration as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0118] Based on the same concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a computer program product, including computer program instructions. When the computer program instructions are run on a computer, the computer executes the method described in any of the above embodiments, which has the beneficial effects of the corresponding method embodiments and will not be repeated here.
[0119] It is understandable that before using the technical solutions of each embodiment of the present disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.
[0120] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly remind the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can independently choose whether to provide personal information to software or hardware such as an electronic device, application, server or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0121] As an optional but non-limiting implementation, in response to receiving the user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to the electronic device providing personal information.
[0122] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0123] A person skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0124] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.
[0125] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0126] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the present application. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the protection scope of the present application.
Claims
1. A data processing method based on multi-agent collaboration, characterized in that: include: Determine a text to be processed corresponding to a multi-agent system, wherein the multi-agent system includes a data cleaning agent, an information extraction agent, and a text generation agent; Using the data cleaning agent to clean the text to be processed; Using the information extraction agent to extract information from the cleaned text to be processed to obtain key information; The text generation agent is used to perform statistical analysis on the key information, and a text report is generated according to the statistical analysis results.
2. The method according to claim 1, characterized in that The information extraction agent includes an information extraction model and a trained entity relationship extraction model; the information extraction agent is used to extract information from the cleaned text to be processed to obtain key information, including: Using the information extraction model to perform semantic recognition on the cleaned text to be processed to determine the first information; Extracting entities and relationships that conform to a predetermined format from the cleaned text to be processed using the entity relationship extraction model to determine second information; Using the information extraction macromodel to verify the first information and the second information, and using the verified information as the third information; An information association relationship is constructed according to the third information, and the third information and the information association relationship are used as the key information.
3. The method according to claim 1, characterized in that The process of extracting information from the cleaned text to be processed by using the information extraction agent includes: In response to the information extraction agent determining that there is abnormal data in the cleaned text to be processed, first associated information related to the abnormal data is recorded, and the abnormal data and the first associated information are fed back to the data cleaning agent so that the data cleaning agent adjusts its own data cleaning strategy.
4. The method according to claim 1, characterized in that: The process of analyzing the key information by using the text generating agent includes: In response to the text generation agent determining that there is abnormal information in the key information, second related information related to the abnormal information is recorded, and the abnormal information and the second related information are fed back to the information extraction agent so that the information extraction agent adjusts its own information extraction strategy.
5. The method according to claim 1, characterized in that The step of using the data cleaning agent to clean the text to be processed includes: Using a text reading tool to read the text to be processed, and dividing the text to be processed into unstructured text and semi-structured text; Removing redundant spaces and special symbols from the unstructured text; The text content in the semi-structured text is extracted, and the text content is formatted according to a predetermined format.
6. The method according to claim 1, characterized in that The multi-agent system also includes a contradiction resolution agent; the method also includes: In the process of the multi-agent system processing the text to be processed or training the multi-agent system, in response to the contradiction resolution agent determining that there are different annotation results for the same data item, the different annotation results are recorded as contradictory annotation results and fed back to the user, so that the user can adjust the annotation strategy according to the contradictory annotation results or adjust the data processing strategy of the multi-agent system; wherein the different annotation results are obtained by annotation by different annotation subjects, and the annotation subjects include users and information extraction agents, and the data items are derived from the text to be processed or the training data of the multi-agent system.
7. The method according to claim 6, characterized in that The method further comprises: Utilizing the contradiction resolution agent to count the annotation results corresponding to each annotation category; The annotation results corresponding to each annotation category are divided according to the annotation subjects, which include standard annotation subjects and other annotation subjects; Calculate the consistency index of each other annotation subject relative to the standard annotation subject using a statistical method according to the annotation results corresponding to the standard annotation subject and the annotation results corresponding to the other annotation subjects; The annotation categories corresponding to the consistency index exceeding the preset threshold are marked as high-ambiguity categories and fed back to the user.
8. The method according to claim 7, characterized in that The method further comprises: The contradiction resolution agent is used to analyze the labeling results corresponding to the highly ambiguous categories to determine the cause of the ambiguity.
9. An electronic device 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 program, the method according to any one of claims 1 to 8 is implemented.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 8.
Citation Information
Cited By
Technical document key information extraction method based on intelligent agent
CN120086347A
Disaster reporting method, electronic equipment and computer readable storage medium
CN120104766A
Nuclear power experience feedback abstract generation method based on multi-agent tuning logic expression
CN121351993A
