Citizen complaint knowledge graph processing method and device based on agent aided training and medium

Through the method of assisted training of the agent, a high-accuracy knowledge graph is generated, which solves the problem of time-consuming and labor-intensive manual drawing and low accuracy in the prior art, and achieves more efficient complaint information processing.

CN120218197AActive Publication Date: 2025-06-27GUANGZHOU YUNDI TECH CO LTD

Patent Information

Application Number
CN202510163715.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-14
Publication Date
2025-06-27
Estimated Expiration
2045-02-14

AI Technical Summary

Technical Problem

In the prior art, drawing a knowledge graph of citizens' complaints by manual means consumes a lot of labor and time costs, and the accuracy is not high.

Method used

Using an agent-assisted training method, the agent calls the parameter file adjustment tool to obtain initial parameters, process complaint work ticket information, generate knowledge graph node labeling data in preset format, and optimize the graph accuracy through the image processing model.

Benefits of technology

Improve the accuracy of the knowledge graph and reduce labor and time costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120218197A_ABST
    Figure CN120218197A_ABST
Patent Text Reader

Abstract

The invention discloses a citizen complaint knowledge graph processing method and device based on agent aided training and a medium, and can be applied to the technical field of knowledge graph processing. The method comprises the following steps: processing complaint work order information in a target graph database to obtain knowledge graph node labeling data in a preset format; after determining target knowledge graph node labeling data according to the target complaint work order event identifier, drawing to obtain a target knowledge graph in a preset format; calling a data reading tool through the intelligent agent to read the target knowledge graph node labeling data, the target knowledge graph and a return result of inputting the target knowledge graph into the image processing model, and finally generating a target parameter of a preset knowledge graph display algorithm based on the intelligent agent. Therefore, the complaint work order information in the target graph database can be reprocessed through the preset knowledge graph display algorithm corresponding to the target parameter, so that the accuracy of the knowledge graph is improved, and the labor cost and the time cost are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of knowledge graph processing, and particularly to a method, device and medium for processing a citizen complaint knowledge graph based on agent-assisted training. Background Art

[0002] In the related art, citizens upload various complaint information through a fixed complaint platform every day, and relevant personnel organize the complaint information into work order files and send them to designated units for processing. When there is concentrated complaint information, it means that a certain problem has a greater impact on citizens' lives and needs to be focused on. In the prior art, all similar complaint work orders are found manually, and their context is sorted out and then drawn into a knowledge graph. This processing method consumes a large amount of human and time costs, and the accuracy of the drawn knowledge graph is not high.

[0003] In summary, the technical problems existing in the related art need to be improved. Summary of the Invention

[0004] The main purpose of the embodiments of the present application is to propose a method, device and medium for processing a citizen complaint knowledge graph based on agent-assisted training, which can improve the accuracy of the knowledge graph and reduce human and time costs.

[0005] To achieve the above object, on the one hand, an embodiment of the present application proposes a method for processing a citizen complaint knowledge graph based on agent-assisted training, the method comprising the following steps:

[0006] Call a parameter file adjustment tool through an agent to obtain initial parameters of a preset knowledge graph display algorithm;

[0007] Process the complaint work order information in the target graph database according to the preset knowledge graph display algorithm corresponding to the initial parameters to obtain a number of preset format knowledge graph node annotation data;

[0008] Determine a target complaint work order event identifier from the target graph database;

[0009] Determine target knowledge graph node annotation data from a number of the preset format knowledge graph node annotation data according to the target complaint work order event identifier;

[0010] Draw a target knowledge graph in a preset format according to the target knowledge graph node annotation data;

[0011] Input the target knowledge graph into a preset image processing model to obtain a return result of the image processing model;

[0012] The intelligent agent is called to invoke a data reading tool to read the labeled data of the target knowledge graph nodes, the target knowledge graph, and the return results of the image processing model;

[0013] Based on the reading results, target parameters of the preset knowledge graph display algorithm are generated by the intelligent agent; the preset knowledge graph display algorithm corresponding to the target parameters is used to reprocess the complaint work order information in the target graph database.

[0014] In some embodiments, processing the complaint work order information in the target graph database according to the preset knowledge graph display algorithm corresponding to the initial parameters to obtain several pieces of labeled data of knowledge graph nodes in a preset format, including:

[0015] Performing a depth - first search on the complaint work order information in the target graph database according to the preset knowledge graph display algorithm corresponding to the initial parameters to obtain all reachable events;

[0016] Determining relevant events from all the reachable events;

[0017] Processing all the nodes of the reachable events according to the relevant events to obtain the labeled data of knowledge graph nodes in the preset format.

[0018] In some embodiments, performing a depth - first search on the complaint work order information in the target graph database according to the preset knowledge graph display algorithm corresponding to the initial parameters includes:

[0019] Pushing the current event node onto the stack, traversing and searching all preset nodes in the target graph database along all relationship directions, and processing the preset nodes based on the initial parameters; the preset nodes include event nodes and subject nodes.

[0020] In some embodiments, processing the preset node based on the initial parameters includes:

[0021] If the preset node is a node that has been seen or the path length to the reachable event node exceeds the limited depth in the initial parameters, the element information of the reachable event node is popped from the top of the stack, and the element information includes the node type and the path information;

[0022] If the preset node is an event node, record the event node and the path information passed by the event node, and pop the element information of the event node from the top of the stack; the event node includes the reachable event node;

[0023] If the preset node is the main node, determine whether the regular information, degree information, and attribute information of the main node meet the preset conditions according to the initial parameters. If they meet, record the main node and push the main node onto the stack.

[0024] In some embodiments, determining the relevant events from all the reachable events includes:

[0025] If the path length to the reachable event is the path length threshold, obtain the attributes of the path nodes and the path attributes for reaching the reachable event, and generate a relevance score for the reachable event according to the attributes of the path nodes and the path attributes;

[0026] If the path length of the reachable event is greater than the path length threshold, obtain the attributes of the path nodes, the path attributes, and the path overlap index for reaching the reachable event, and generate a relevance score for the reachable event according to the attributes of the path nodes, the path attributes, and the path overlap index;

[0027] Determine the relevant events among the reachable events according to the relevance score.

[0028] In some embodiments, processing all the nodes of the reachable event according to the relevant events to obtain the node annotation data of the knowledge graph in the preset format includes:

[0029] Judge the importance of all the nodes of the reachable event to obtain the event bottleneck;

[0030] Perform a merging process on all the nodes according to the relevant events and the event bottleneck to obtain a node list;

[0031] Add attribute information to the nodes in the node list and process the edges corresponding to the nodes to obtain the node annotation data of the knowledge graph in the preset format.

[0032] In some embodiments, determining the target complaint work order event identifier from the target graph database includes:

[0033] Use the community detection algorithm to detect all the complaint work order events in the target graph database to determine the target complaint work order event;

[0034] Obtain the target complaint work order event identifier corresponding to the target complaint work order event.

[0035] To achieve the above object, on the other hand, an embodiment of the present application proposes a citizen complaint knowledge graph processing device based on agent-assisted training, and the device includes:

[0036] The first module is used to call a parameter file adjustment tool through an agent to obtain initial parameters of a preset knowledge graph display algorithm;

[0037] The second module is used to process the complaint work order information in the target graph database according to the preset knowledge graph display algorithm corresponding to the initial parameters, and obtain several pieces of knowledge graph node annotation data in a preset format;

[0038] The third module is used to determine a target complaint work order event identifier from the target graph database;

[0039] The fourth module is used to determine target knowledge graph node annotation data from several pieces of the preset format knowledge graph node annotation data according to the target complaint work order event identifier;

[0040] The fifth module is used to draw a target knowledge graph in a preset format according to the target knowledge graph node annotation data;

[0041] The sixth module is used to input the target knowledge graph into a preset image processing model to obtain a return result of the image processing model;

[0042] The seventh module is used to call a data reading tool through the agent to read the target knowledge graph node annotation data, the target knowledge graph and the return result of the image processing model;

[0043] The eighth module is used to generate target parameters of the preset knowledge graph display algorithm based on the agent according to the reading result; the preset knowledge graph display algorithm corresponding to the target parameters is used to reprocess the complaint work order information in the target graph database.

[0044] To achieve the above object, another aspect of the embodiments of the present application proposes a computer device, including:

[0045] At least one processor;

[0046] At least one memory for storing at least one program;

[0047] When the at least one program is executed by the at least one processor, the at least one processor implements the method as described above.

[0048] To achieve the above object, another aspect of the embodiments of the present application proposes a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method as described above is implemented.

[0049] The embodiments of the present application at least include the following beneficial effects: The present application provides a method, an apparatus and a medium for processing a citizen complaint knowledge graph based on agent-assisted training. In this solution, the agent calls a parameter file adjustment tool to obtain the initial parameters of a preset knowledge graph display algorithm, and then processes the complaint work order information in the target graph database according to the preset knowledge graph display algorithm corresponding to the initial parameters to obtain several pieces of knowledge graph node annotation data in a preset format. Then, after determining the target complaint work order event identifier from the target graph database, the target knowledge graph node annotation data is determined from several pieces of the preset format knowledge graph node annotation data according to the target complaint work order event identifier; and the target knowledge graph in a preset format is drawn according to the target knowledge graph node annotation data; then the target knowledge graph is input into a preset image processing model to obtain the return result of the image processing model; the agent calls a data reading tool to read the target knowledge graph node annotation data, the target knowledge graph and the return result of the image processing model, and generates the target parameters of the preset knowledge graph display algorithm based on the agent according to the reading result, so that the complaint work order information in the target graph database can be reprocessed according to the preset knowledge graph display algorithm corresponding to the target parameters, thereby improving the accuracy of the knowledge graph and reducing the labor cost and time cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 is a flowchart of a method for processing a citizen complaint knowledge graph based on agent-assisted training provided by an embodiment of the present application;

[0051] Figure 2 is a schematic structural diagram of an apparatus for processing a citizen complaint knowledge graph based on agent-assisted training provided by an embodiment of the present application;

[0052] Figure 3 is a schematic hardware structure diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0053] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the embodiments of the present application. They are only examples of devices and methods that are consistent with some aspects of the embodiments of the present application.

[0054] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if", "when" as used herein may be interpreted as "when...", "while...", or "in response to determining".

[0055] The terms "at least one", "a plurality of", "each", "any one", etc. used in this application, at least one includes one, two or more than two, a plurality of includes two or more than two, each refers to each one of the corresponding plurality, and any one refers to any one of the plurality.

[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0057] Before elaborating on the embodiments of this application in detail, some nouns and terms involved in the embodiments of this application are first explained. The nouns and terms involved in the embodiments of this application are applicable to the following explanations:

[0058] Citizen Complaint Work Order: An electronic record of help requests, consultations, complaints, suggestions, reports, or praises submitted by citizens through government channels.

[0059] Knowledge Graph: A technology that uses graph theory to abstractly model and analyze concepts, entities, events, and their relationships in the objective world.

[0060] Intelligent Agent: An entity or program that can act autonomously, perceive the environment, make decisions, and execute actions in a specific environment.

[0061] Backend Tool Library: A collection of backend tools and software used to support the operation of intelligent agents or other systems.

[0062] Graph Database: A database system that stores data (such as nodes, edges, and attributes) in a graph structure.

[0063] Current Event: An event that serves as the core or starting point in the knowledge graph.

[0064] Event Node: A node in the knowledge graph that represents an event.

[0065] Subject Node: A node in the knowledge graph that represents a subject (such as a person, organization, location, etc.).

[0066] Path: A sequence of edges connecting two nodes in a graph database.

[0067] Degree: The number of edges directly connected to a node, representing the degree of connection of the node.

[0068] Reachable event: An event node that can be reached from the current event node through a path.

[0069] Stack: A last-in-first-out (LIFO) data structure used to store data and allow insertion and deletion operations at the top.

[0070] Depth-first search: A graph traversal algorithm that searches nodes as deep as possible along the depth of the graph until a given target is reached or no further progress can be made.

[0071] Breadth-first search: A graph traversal algorithm that starts from the starting node, first visits all its neighbor nodes, and then repeats this process for each neighbor node.

[0072] Regular information: Rules or patterns used to match specific patterns in a string.

[0073] Relevance score: A numerical value measuring the degree of correlation between two events or nodes.

[0074] Path overlap index: An index measuring the degree to which two paths share nodes or edges.

[0075] JSON format: A lightweight data interchange format that is easy for humans to read and write, and also easy for machines to parse and generate.

[0076] Community detection algorithm: An algorithm used to identify tightly connected node sets (communities) in graph data.

[0077] In the related art, citizens upload various complaint information through a fixed complaint platform every day. Relevant personnel organize the complaint information into work order files and send them to designated units for processing. When there is concentrated complaint information, it indicates that a certain problem has a greater impact on citizens' lives and needs to be focused on. In the prior art, by using a manual method to find all similar complaint work orders and sort out their context and then draw a knowledge graph, this processing method will consume a large amount of labor costs and time costs, and the accuracy of the drawn knowledge graph is not high.

[0078] In view of this, in the embodiments of the present application, a method, device and medium for processing a citizen complaint knowledge graph based on agent-assisted training are provided. The present application can effectively improve the accuracy of the knowledge graph and reduce labor costs and time costs.

[0079] The method for processing a knowledge graph of citizen complaints based on agent-assisted training provided by an embodiment of the present application relates to the technical field of knowledge graph processing. The method for processing a knowledge graph of citizen complaints based on agent-assisted training provided by an embodiment of the present application can be applied to a terminal, or to a server, or can be software running on a terminal or a server. In some embodiments, the terminal may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a vehicle-mounted terminal, etc., but is not limited thereto; the server side can be configured as an independent physical server, or can be configured as a server cluster or a distributed system composed of multiple physical servers, or can be configured as a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network; the software can be an application that implements the method for processing a knowledge graph of citizen complaints based on agent-assisted training, etc., but is not limited to the above forms.

[0080] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and so on. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in a distributed computing environment where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0081] The following specifically describes the embodiments of the present application with reference to the accompanying drawings:

[0082] Figure 1 is an optional flowchart of the method for processing a knowledge graph of citizen complaints based on agent-assisted training provided by an embodiment of the present application, Figure 1 The method in may include but is not limited to steps S110 to S180:

[0083] Step S110, call a parameter file adjustment tool through an agent to obtain initial parameters of a preset knowledge graph display algorithm;

[0084] Step S120: Process the complaint work order information in the target graph database according to the preset knowledge graph display algorithm corresponding to the initial parameters, and obtain several pieces of knowledge graph node annotation data in a preset format;

[0085] Step S130: Determine the target complaint work order event identifier from the target graph database;

[0086] Step S140: Determine the target knowledge graph node annotation data from several pieces of knowledge graph node annotation data in a preset format according to the target complaint work order event identifier;

[0087] Step S150: Draw a target knowledge graph in a preset format according to the target knowledge graph node annotation data;

[0088] Step S160: Input the target knowledge graph into a preset image processing model to obtain the return result of the image processing model;

[0089] Step S170: Call the data reading tool through the intelligent agent to read the target knowledge graph node annotation data, the target knowledge graph, and the return result of the image processing model;

[0090] Step S180: Generate the target parameters of the preset knowledge graph display algorithm based on the intelligent agent according to the reading result; wherein, the preset knowledge graph display algorithm corresponding to the target parameters is used to reprocess the complaint work order information in the target graph database.

[0091] It can be understood that the processing process of step S120 includes but is not limited to the following steps:

[0092] Perform a depth-first search on the complaint work order information in the target graph database according to the preset knowledge graph display algorithm corresponding to the initial parameters to obtain all reachable events;

[0093] Determine relevant events from all reachable events;

[0094] Process all nodes of the reachable events according to the relevant events to obtain knowledge graph node annotation data in a preset format.

[0095] In the embodiment of the present application, the process of performing a depth-first search on the complaint work order information may be to push the current event node onto the stack, traverse and search all preset nodes in the target graph database along all relationship directions, and process the preset nodes based on the initial parameters; wherein, the preset nodes include event nodes and subject nodes.

[0096] Specifically, the process of processing the preset nodes based on the initial parameters includes but is not limited to the following steps:

[0097] If the preset node is a node that has been seen or the path length to reach the reachable event node exceeds the limited depth in the initial parameters, then pop the element information of the reachable event node from the top of the stack, where the element information includes the node type and the path information;

[0098] If the preset node is an event node, record the event node and the path information passed by the event node, and pop the element information of the event node from the top of the stack; among them, the event node includes the reachable event node;

[0099] If the preset node is a subject node, judge whether the regular information, degree information, and attribute information of the subject node meet the preset conditions according to the initial parameters. If they meet, record the subject node and push the subject node onto the stack.

[0100] Exemplarily, the process of initially finding all reachable events by performing a depth-first search with a given depth in the target graph database may include, but is not limited to, the following steps:

[0101] Step 1.1, Depth-first search: In the existing graph database, use the working stack to perform a depth-first search. Push the current event node onto the stack, traverse and search along all relationship directions, and make judgments in turn.

[0102] Step 1.1.1, If a node that has been seen is encountered, or the path length exceeds the limited depth, pop the element from the top of the stack. Among them, when initializing, the limited depth is recommended to be set to 3.

[0103] Step 1.1.2, If an event node is encountered, record the event and the passed path, including all node information and relationship information, and then pop the element from the top of the stack. The same event node may be encountered multiple times, and all passed paths need to be recorded.

[0104] Step 1.1.3, If a new subject node is encountered, judge the regular information, degree information, and attribute information of the subject node. If the conditions are not met, exit; otherwise, record the node and push the node onto the stack. When initializing, the restrictions on regular information, degree information, and attribute information will be ignored.

[0105] Step 1.2, After completing a stack search, start a new search from the top element of the stack.

[0106] It is understandable that after all reachable events are searched, it is determined whether each reachable event is a relevant event. Specifically, if the path length to the reachable event is the path length threshold, obtain the attributes of the path nodes and the path attributes for reaching the reachable event, and generate a relevance score for the reachable event based on the path node attributes and the path attributes; if the path length of the reachable event is greater than the path length threshold, obtain the attributes of the path nodes, the path attributes, and the path overlap index for reaching the reachable event, and generate a relevance score for the reachable event based on the path node attributes, the path attributes, and the path overlap index; finally, determine the relevant events among the reachable events according to the relevance score.

[0107] Exemplarily, the process of determining whether each reachable event is a relevant event includes, but is not limited to, the following steps:

[0108] Step 2.1. Process all the relevant event nodes obtained by the search: For each event node, traverse all the paths.

[0109] Step 2.1.1. If the path length is 2, assign a relevance score according to the attributes of the path nodes and the attributes of the two relationships. For example, if the attributes of the path nodes belong to "specific organization", this path will be assigned a higher relevance score. Initially, the relevance score will be simply inversely proportional to the path length.

[0110] Step 2.1.2. If the path length exceeds 2, not only the attributes of all the path nodes and relationships need to be calculated, but also the information of the path nodes needs to be retained. When calculating the number of paths between two events later, the problem of path overlap needs to be considered comprehensively. If the nodes of a path have been reused by other paths, its relevance score needs to be reduced proportionally, and the path overlap index of this path needs to be modified. Initially, the reduction ratio is 50%.

[0111] Step 2.2. Relevant event screening: Conduct a new breadth-first search. The regular information, degree information, and attribute information searched in this step tend to display more nodes. Use the above-mentioned relevance score and path overlap index to judge all the relevant events, and determine the number of relevant events to be retained in combination with the scale of the breadth-first search full quantum graph of the current event in the graph database. Initially, at most 5 relevant events are fixedly displayed.

[0112] It is understandable that after the determination of the relevant events is completed, in this embodiment, the preset format knowledge graph node annotation data is obtained by processing all the nodes of the reachable events according to the relevant events. The preset format can be the json format. The execution process of this embodiment includes, but is not limited to, the following steps:

[0113] Judge the importance of all the nodes of the reachable events to obtain the event bottleneck points;

[0114] Merge all nodes according to relevant events and the bottlenecks of the events to obtain a list of nodes;

[0115] Add attribute information to the nodes in the node list and process the edges corresponding to the nodes to obtain knowledge graph node annotation data in a preset format.

[0116] Exemplarily, taking the generation of knowledge graph node annotation data in json format as an example, this embodiment includes but is not limited to the following steps:

[0117] Step 3.1. Judge the importance of nodes and merge nodes;

[0118] Step 3.1.1. Importance determination: Perform two node information judgments similar to the mechanism in Step 1.1.3, but use different thresholds to divide the nodes into two importance levels. Obtain the bottleneck of the event through the node importance index, which is related to all attributes, relationships of the node, and attributes of the neighbor nodes. When initializing, this index will be proportional to the degree of the node.

[0119] Step 3.1.2. Merge nodes: Judge whether the nodes need to be merged. Traverse the node list in two layers of loops. If the similarity of two nodes exceeds the threshold, then delete one of the nodes and add the information it carries to the other node, including modifying the display name of the other node. When initializing, only when the node attributes, relationship types, and neighbor nodes are exactly the same will the two nodes be judged as similar.

[0120] Step 4.1. Design the output of knowledge graph node annotation data in json format according to the results:

[0121] Step 4.1.1. According to the obtained node list, query the subgraph from the graph database to construct an edge list;

[0122] Step 4.1.2. Add similar node attributes to the nodes;

[0123] Step 4.1.3. Merge the edges with the same endpoints and modify the names of the edges to obtain knowledge graph node annotation data in json format.

[0124] It can be understood that before the knowledge graph is displayed in this embodiment, the intelligent agent assistant role is set according to the display tendency of the knowledge graph. Specifically, the setting process includes but is not limited to the following steps:

[0125] Step 1. Locally deploy a large language model or apply for an online api:

[0126] Specifically, in the test stage of this embodiment, GPT-4o can be used as the basic multimodal large language model used by the intelligent agent.

[0127] Step 2: Write the prompt for the agent's role goal:

[0128] Exemplarily, the prompt template: "You are a professional data annotator. Your work goal is to assist in the training of knowledge graph algorithms. I will give you a piece of data, including a knowledge graph in jpg format, a knowledge graph node annotation data in json format, and a result returned by an image processing model in json format. Your criteria for judging an excellent knowledge graph are: appropriate details, highlighting key and useful information. Your work process is: 1. Call the data reading tool 2. Judge whether the data is an excellent knowledge graph 3. Propose suggestions for parameter modification and call the parameter file adjustment tool"

[0129] Since the agent can make appropriate judgments for various different requirements, the tendency to change parameters is achieved by modifying the criteria for judging an excellent knowledge graph in the prompt.

[0130] Step 3: Add tools to the agent: Write script tools for the agent to call, including a data reading tool and a parameter file adjustment tool. Among them, the parameter file adjustment tool will read the iteration times and algorithm parameters in the parameter file and determine the update of the algorithm parameters according to the iteration times. The agent will be able to provide standardized input for the parameter file adjustment tool, including suggestions for modifying all parameters. Among them, all parameter suggestions include but are not limited to the following:

[0131] 1. Depth limit: When performing depth-first and breadth-first searches, respectively, how many steps to search at most. The agent will be required to give a suggested value within the range of 2 to 6, and its call to the parameter file adjustment tool will move this parameter towards the value suggested by the agent.

[0132] 2. Regular information restriction: When performing depth-first and breadth-first searches, the regular information restriction set for the names of nodes. For example, the agent may judge that nodes with the suffix "relevant department" carry too much redundant information and suggest not pushing them onto the stack. The possible values of this restriction will be freely judged by the agent, and the agent's call to the parameter file adjustment tool will modify the regular information restriction list according to the agent's suggestions, including the prefix list, suffix list, and inclusion list.

[0133] 3. Degree limit: When performing depth-first and breadth-first searches, the limit set for the degree of nodes. For example, the agent may judge that for the current graph database structure, the data is rather redundant, and if the degree of a node is less than 2 or greater than 200, it is recommended not to push it onto the stack. The possible values will be freely judged by the agent, and the agent's call to the parameter file adjustment tool will move the critical values of this parameter towards the values suggested by the agent.

[0134] 4. Regression Coefficient of Relevance Scoring: Each path existing between two events enhances the relevance between the two events, and this independent variable and coefficient indicate which attributes of the path have a greater impact on the relevance. The independent variables include path length, labels of intermediate nodes, and degrees of nodes. For example, the agent may determine that the label of the one-hot encoded intermediate node is more important, so the coefficient should be larger, and the coefficient is the largest when the label is "specific organization". The agent calls the parameter file adjustment tool to move each coefficient towards the value suggested by the agent.

[0135] 5. Proportion Coefficient of Path Overlap Relevance Scoring: If a path shares an intermediate node with other paths, then it provides relatively less information, and the relevance score needs to be multiplied by a proportion coefficient of path overlap relevance scoring. The agent will be required to give a suggested value within the range of 10% to 100%, and its call to the parameter file adjustment tool will move this parameter towards the value suggested by the agent.

[0136] 6. Independent Variables and Coefficients of the Number of Relevant Events to be Displayed: How many relevant events to display will be linearly related to many independent variables, including, macroscopically, the total number of event nodes, the total number of relationships, the total number of paths, the number of each label type, the proportion of each label type, and the degree of the event, the number of relevant paths of the current event, and the labels of adjacent nodes of the current event in the dimension of the top k potentially relevant events sorted in descending order of relevance scoring. All possible independent variables are listed in the parameter file, including the values of k from 1 to 5. The actually selected independent variables and coefficients will be determined by the agent, and the agent's call to the parameter file adjustment tool will select the independent variables for linear regression and move the coefficients towards the values suggested by the agent.

[0137] 7. Regression Coefficient of Node Importance Level: The importance level of a node will be determined by the label of the node, the degree of the node, and the labels of the node's neighbors. The agent calls the parameter file adjustment tool to move the regression coefficient towards the value suggested by the agent.

[0138] 8. Regression Coefficient and Threshold of Node Similarity: The independent variables affecting whether two nodes are similar include the label of the node itself, the relationship label, the labels of neighbor nodes, and the number of common neighbor nodes. If the regression result exceeds a pre-set threshold, the two nodes will be judged to be similar and merged. For example, the agent may determine that two nodes that are both complainants and have exactly the same complaint relationship can be merged into one complainant node. The agent calls the parameter file adjustment tool to move the regression coefficient and the final threshold towards the values suggested by the agent.

[0139] It can be understood that when the work order is stored in the library in this embodiment, since the same nodes obtained by the large model judgment will be automatically merged into the same node, event clustering can be automatically achieved. Related events will tend to be located in the same area, are reachable events to each other and have a short connection path. Therefore, this embodiment can use a community detection algorithm to detect all complaint work order events in the target graph database, determine the target complaint work order events, and then obtain the target complaint work order event identifiers corresponding to the target complaint work order events. Specifically, the community detection algorithm can randomly find a typical time from the target graph database and return the event ID (the target complaint work order event identifier). Then, based on the target complaint work order event identifier, the target knowledge graph node annotation data is determined from the multiple json-format knowledge graph node annotation data generated above, and then a knowledge graph in jpg format is drawn using a knowledge graph drawing tool as the target knowledge graph. Next, the pre-trained image processing model of the target knowledge graph is used for inference, and the image is labeled to a certain extent, including image segmentation tasks and image detection tasks. Further post-processing is performed on the output of the model, and the shape feature information of the text-format graph is integrated by returning the size and position of the annotation box. Specifically, the basic model used in this embodiment is the mask rcnn model, and other image processing models can also be used. Finally, the original jpg-format knowledge graph, json-format knowledge graph node annotation data, and the return result of the image processing model are integrated and placed in a specified path folder for subsequent calls in the optimization process of the knowledge graph display algorithm.

[0140] In the embodiment of the present application, when optimizing the knowledge graph display algorithm, the agent can be used to call the data reading tool to read three knowledge graph data from the specified path folder, and then determine whether the knowledge graph is excellent, and output the thinking process and modification opinions on the parameters. Then, the parameter file adjustment tool is called through the agent. If there are current modification opinions, after the modification is completed, the context information is retained, and the currently used database id (or the target complaint work order event identifier) is fixed; otherwise, the horizontal analysis algorithm is called again to obtain a new database id. This embodiment can use the database id determined by the agent to loop through the processes of knowledge graph construction, training of the image processing model, and integration of the three data to complete the training process of the knowledge graph display algorithm in the embodiment of the present application, so as to determine the target parameters corresponding to the preset knowledge graph display algorithm in the embodiment of the present application. Furthermore, the knowledge graph display algorithm corresponding to the target parameters can be used to process similar complaint work order information, effectively improving the accuracy of the knowledge graph and reducing labor costs and time costs.

[0141] Referring to Figure 2 , the embodiment of the present application also provides a citizen complaint knowledge graph processing device based on agent-assisted training. The device includes:

[0142] The first module 210 is used to call a parameter file adjustment tool through an agent to obtain initial parameters of a preset knowledge graph display algorithm;

[0143] The second module 220 is used to process the complaint work order information in the target graph database according to the preset knowledge graph display algorithm corresponding to the initial parameters to obtain several pieces of knowledge graph node annotation data in a preset format;

[0144] The third module 230 is used to determine a target complaint work order event identifier from the target graph database;

[0145] The fourth module 240 is used to determine target knowledge graph node annotation data from several pieces of the knowledge graph node annotation data in the preset format according to the target complaint work order event identifier;

[0146] The fifth module 250 is used to draw a target knowledge graph in a preset format according to the target knowledge graph node annotation data;

[0147] The sixth module 260 is used to input the target knowledge graph into a preset image processing model to obtain a return result of the image processing model;

[0148] The seventh module 270 is used to call a data reading tool through an agent to read the target knowledge graph node annotation data, the target knowledge graph and the return result of the image processing model;

[0149] The eighth module 280 is used to generate target parameters of the preset knowledge graph display algorithm based on the agent according to the reading result; wherein, the preset knowledge graph display algorithm corresponding to the target parameters is used to reprocess the complaint work order information in the target graph database.

[0150] It can be understood that the content in the above method embodiments is applicable to the device embodiments of the present application. The functions specifically implemented by the device embodiments of the present application are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those of the above method embodiments.

[0151] The embodiments of the present application further provide a computer device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the above method is implemented. The computer device can be any intelligent terminal including a tablet computer, an in-vehicle computer, etc.

[0152] It can be understood that the content in the above method embodiments is applicable to the device embodiments of the present application. The functions specifically implemented by the device embodiments of the present application are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those of the above method embodiments.

[0153] Please refer toFigure 3 , Figure 3 illustrates the hardware structure of a computer device according to another embodiment. The computer device includes:

[0154] A processor 310, which can be implemented in ways such as 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 the present application;

[0155] A memory 320, which can be implemented in forms such as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 320 can store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 320 and are called by the processor 310 to execute the above methods of the embodiments of the present application;

[0156] An input / output interface 330, which is used to implement information input and output;

[0157] A communication interface 340, which is used to implement communication interaction between this device and other devices, and can implement communication through a wired method (such as USB, network cable, etc.) or through a wireless method (such as a mobile network, WIFI, Bluetooth, etc.);

[0158] A bus 350, which transmits information between various components of the device (such as the processor 310, the memory 320, the input / output interface 330, and the communication interface 340);

[0159] Among them, the processor 310, the memory 320, the input / output interface 330, and the communication interface 340 achieve communication connections with each other inside the device through the bus 350.

[0160] The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above methods are implemented.

[0161] It can be understood that the content in the above method embodiments is applicable to the embodiments of this storage medium. The functions specifically implemented by the embodiments of this storage medium are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those of the above method embodiments.

[0162] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory may optionally include a memory remotely located relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0163] The embodiments described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art will know that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.

[0164] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than those shown in the figures, or combine certain steps, or different steps.

[0165] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0166] Those of ordinary skill in the art can understand that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices can be implemented as software, firmware, hardware, and appropriate combinations thereof.

[0167] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0168] It should be understood that in this application, "at least one (item)" means one or more, and "a plurality" means two or more. "And / or" is used to describe the association relationship of associated objects and indicates that there can be three relationships. For example, "A and / or B" can mean: only A exists, only B exists, and both A and B exist at the same time. Among them, A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one (item) of the following" or its similar expression refers to any combination of these items, including any combination of single item (item) or plural items (items). For example, at least one (item) of a, b, or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0169] In several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the above division of units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of devices or units can be in electrical, mechanical or other forms.

[0170] The units described above as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or they can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0171] In addition, each functional unit in various embodiments of this application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.

[0172] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of various embodiments of this application. The foregoing storage medium includes: various media that can store programs such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs.

[0173] The preferred embodiments of the embodiments of this application have been described above with reference to the accompanying drawings, which does not limit the scope of the rights of the embodiments of this application. Any modifications, equivalent replacements, and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of this application shall fall within the scope of the rights of the embodiments of this application.

Claims

1. A method for processing citizen complaint knowledge graph based on agent-assisted training, characterized in that: The method comprises the following steps: Call the parameter file adjustment tool through the intelligent agent to obtain the initial parameters of the preset knowledge graph display algorithm; Process the complaint work order information in the target graph database according to the preset knowledge graph display algorithm corresponding to the initial parameters to obtain several sets of preset format knowledge graph node annotation data; Determine a target complaint work order event identifier from the target graph database; Determine the target knowledge graph node annotation data from a plurality of the preset format knowledge graph node annotation data according to the target complaint work order event identifier; Draw a target knowledge graph in a preset format according to the target knowledge graph node annotation data; Input the target knowledge graph into a preset image processing model to obtain a return result of the image processing model; Calling a data reading tool through the agent to read the target knowledge graph node annotation data, the target knowledge graph and the return result of the image processing model; According to the reading result, the target parameters of the preset knowledge graph display algorithm are generated based on the intelligent agent; the preset knowledge graph display algorithm corresponding to the target parameters is used to reprocess the complaint work order information in the target graph database.

2. The method according to claim 1, characterized in that The preset knowledge graph display algorithm corresponding to the initial parameters processes the complaint work order information in the target graph database to obtain several sets of preset format knowledge graph node annotation data, including: Perform a depth-first search on the complaint work order information in the target graph database according to the preset knowledge graph display algorithm corresponding to the initial parameters to obtain all reachable events; determining a relevant event from among all said reachable events; All nodes of the reachable event are processed according to the related event to obtain the knowledge graph node annotation data in the preset format.

3. The method according to claim 2, characterized in that The preset knowledge graph display algorithm corresponding to the initial parameters performs a depth-first search on the complaint work order information in the target graph database, including: The current event node is pushed into the stack, all preset nodes in the target graph database are traversed and searched along all relationship directions, and the preset nodes are processed based on the initial parameters; the preset nodes include event nodes and subject nodes.

4. The method according to claim 3, characterized in that The processing of the preset node based on the initial parameter includes: If the preset node is a node that has been seen or the path length to the reachable event node exceeds the limited depth in the initial parameter, the element information of the reachable event node is pushed out from the top of the stack, and the element information includes the node type and path information; If the preset node is an event node, the event node and the path information of the event node are recorded, and the element information of the event node is pushed out from the top of the stack; the event node includes a reachable event node; If the preset node is a main node, determine whether the regularity information, degree information and attribute information of the main node meet the preset conditions according to the initial parameters. If so, record the main node and push the main node into the stack.

5. The method according to claim 2, characterized in that: The determining of the relevant events from all the reachable events comprises: If the path length to the reachable event is a path length threshold, obtaining the path node attributes and path attributes to the reachable event, and generating a relevance score of the reachable event according to the path node attributes and the path attributes; If the path length of the reachable event is greater than the path length threshold, obtaining the way node attributes, path attributes and path overlap index to reach the reachable event, and generating a relevance score of the reachable event according to the way node attributes, the path attributes and the path overlap index; Determine relevant events among the reachable events according to the relevance scores.

6. The method according to claim 2, characterized in that The step of processing all nodes of the reachable event according to the related event to obtain the knowledge graph node annotation data in the preset format includes: Determine the importance of all nodes of the reachable event and obtain the event blocking point; Merging all nodes according to the related events and the event blocking points to obtain a node list; Add attribute information to the nodes in the node list, and process the edges corresponding to the nodes to obtain the knowledge graph node annotation data in the preset format.

7. The method according to claim 1, characterized in that Determining a target complaint work order event identifier from the target graph database includes: A community detection algorithm is used to detect all complaint work order events in the target graph database to determine the target complaint work order event; Get the target complaint work order event identifier corresponding to the target complaint work order event.

8. A citizen complaint knowledge graph processing device based on agent-assisted training, characterized in that: The device comprises: The first module is used to call the parameter file adjustment tool through the intelligent agent to obtain the initial parameters of the preset knowledge graph display algorithm; The second module is used to process the complaint work order information in the target graph database according to the preset knowledge graph display algorithm corresponding to the initial parameters to obtain several sets of preset format knowledge graph node annotation data; The third module is used to determine the target complaint work order event identifier from the target graph database; The fourth module is used to determine the target knowledge graph node annotation data from a plurality of the preset format knowledge graph node annotation data according to the target complaint work order event identifier; A fifth module is used to draw a target knowledge graph in a preset format according to the target knowledge graph node annotation data; The sixth module is used to input the target knowledge graph into a preset image processing model to obtain a return result of the image processing model; The seventh module is used to call a data reading tool through the intelligent agent to read the target knowledge graph node annotation data, the target knowledge graph and the return result of the image processing model; The eighth module is used to generate the target parameters of the preset knowledge graph display algorithm based on the intelligent agent according to the reading results; the preset knowledge graph display algorithm corresponding to the target parameters is used to reprocess the complaint work order information in the target graph database.

9. A computer device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Visual question and answer method and device, visual question and answer model training method and device, electronic equipment and storage medium

    CN117892140A

  • Smart space system management method and device, equipment and storage medium

    CN118627759A

  • Government affair hotline appeal knowledge graph construction method based on agent technology

    CN119357406A

  • Artificial intelligence enhanced knowledge framework

    US20240296352A1

Cited By

  • Government affair complaint dispatching system and method based on dynamic knowledge graph and decision engine

    CN121352502A