A Construction Method and Device for a Knowledge-Driven Digital Twin Basin Agent
By building a knowledge-driven digital twin river basin agent, using the needs of service requesters to convert it into parameter sequences, combining the agent to query the knowledge graph, select the optimal service combination solution, and by performing the interaction between the agent and the water conservancy knowledge graph, the problem of virtual and real interaction optimization of the digital twin river basin is solved, and efficient interaction and optimization of the physical and digital river basins is achieved.
Patent Information
- Application Number
- CN202211172896.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-26
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2042-09-26
AI Technical Summary
At this stage, the digital twin basins have shortcomings in the iterative optimization of virtual and real interactions, and it is difficult to achieve efficient interaction and optimization between physical and digital basins.
By constructing a knowledge-driven digital twin river basin agent, using the needs of the service requester to convert it into a parameter sequence, combining the agent to query the knowledge graph to perceive the basin situation, select the optimal service combination solution, and realize interactive optimization of the physical and digital river basin by performing the interaction between the agent and the water conservancy knowledge graph.
It realizes efficient interaction and iterative optimization of physical and digital river basins, assists in decision-making and judgment of water conservancy affairs in physical river basins, and provides dynamic evolution and loose coupling.
Smart Images

Figure CN115544266B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of digital twin basins, and particularly relates to a method and device for constructing a knowledge-driven digital twin basin intelligent body. Background Art
[0002] Digital twin takes the integrated fusion of data and models as the core, and realizes the impact on real-space decision-making through real-time simulation, prediction, deduction, etc. in the digital space, and finally forms an optimized closed loop of real and virtual intelligent decision-making. At present, the digital twin basin is driven by water conservancy knowledge to realize the digital mapping simulation of all elements of the physical basin and the whole process of water conservancy management affairs. However, there are still many challenges in realizing the virtual-real interaction with the physical basin and iterative optimization.
[0003] Aiming at the virtual-real interaction iterative optimization of the digital twin basin, the present invention proposes a construction method of a digital twin basin intelligent body based on knowledge drive, which has strong dynamic evolution and loose coupling to realize the interaction optimization of physical and digital basins. Summary of the Invention
[0004] Object of the Invention: The technical problem to be solved by the present invention is to provide a construction method of a digital twin basin intelligent body with strong dynamic evolution and loose coupling in view of the deficiencies of the current virtual-real interaction iterative optimization of the digital twin basin.
[0005] Technical Solution: The present invention provides a method for constructing a knowledge-driven digital twin basin intelligent body, including the following steps:
[0006] (1) Convert the requirements described in the natural language of the service requester into a parameter sequence required for intelligent body processing;
[0007] (2) The combined intelligent body perceives the basin situation by querying the knowledge graph and obtains the workflow of the current request;
[0008] (3) The combined intelligent body selects appropriate candidate services from multiple service categories of the water conservancy knowledge graph according to the workflow of the current request, and plans and designs an optimal service combination scheme that meets the requirements of the service requester;
[0009] (4) Design an execution intelligent body. The execution intelligent body sends a query request to the water conservancy knowledge graph according to the optimal service combination scheme planned by the combined intelligent body, runs the models in sequence, and transmits the execution results of the models;
[0010] (5) Feed back the final result of the execution intelligent body to the service requester to realize the request of the service requester.
[0011] Further, the implementation process of the step (2) is as follows:
[0012] (21)Construct a query request. Based on the abstract parameter sequence, determine the parameters to be queried in this query request and the known parameters provided by the parameter sequence, and construct a knowledge graph query statement.
[0013] (22)Send the query request. Send the constructed request statement to the knowledge graph: Monitor the status change through the function discover_change. If the status changes, trigger the function discover_workflow. The parameters required for this function are the changed status parameters. After querying in the knowledge graph, find the workflow triggered by the status change.
[0014] (23)Return the query result. The knowledge graph returns the query result in the format required by the agent.
[0015] Furthermore, the implementation process of step (3) is as follows:
[0016] (31)Based on the workflow returned by the knowledge graph, select the required services in the water conservancy knowledge graph, obtain the addresses of the currently available services, combine the services required in the agent subscription workflow, and receive the changes that occur to the current services in a timely manner.
[0017] (32)Based on the addresses of the available services, find the candidate services with specific service functions among them.
[0018] (33)By calculating the value functions of different combination schemes, select the optimal service combination scheme with the highest score that meets the needs of the service requester.
[0019] Furthermore, there are two ways to select the required services in step (31), namely the Web selection model based on the workflow and the automated service selection model based on semantic Web services. The implementation process of the Web selection model based on the workflow is as follows: The combined agent obtains all the basin workflows from the knowledge graph and records them; establish a streamlined service processing process based on the interaction relationships between the basin workflows; seamlessly integrate the services required in the currently requested basin workflow into the entire service process and monitor and evaluate the service execution process of the workflow.
[0020] The implementation process of the automated service selection model based on semantic Web services is as follows: Input the basin information provided by the service requester; use semantic inference technology to find and match a set of Web service collections combined in a specific execution order.
[0021] Furthermore, step (32) includes the following steps:
[0022] (321)Establish a set of water conservancy services with the same functional attributes but different service performances.
[0023] (322) Set up a syntax structure tree and search layer by layer for candidate services that meet the requirements to implement specific service functions:
[0024] Denote the set of candidate services as S = {S1, S2, S3,..., S n}, denote the set of basin situation as F = {F1, F2, F3,..., F n}, denote the set of query conditions as C = {C1, C2, C3,..., C n}; when , traverse the set of candidate services S in sequence, compare the candidate services with the set of basin situation conditions F. If S i == F j , then S i is a candidate service that meets the requirements;
[0025] (323) Determine whether the selected candidate service matches the query conditions and the services in the service library to be queried: Traverse the set of basin situation conditions F and the set of query conditions C, compare S i + C k == F j , then it is considered that S i is a candidate service that meets the query conditions and the service library to be queried, and S i is the finally selected candidate service to implement specific service functions.
[0026] Further, the implementation process of step (4) is as follows:
[0027] (41) Based on the basic information of the candidate services in the composite service solution provided by the composite agent, execute the information requested by the agent to call the water conservancy knowledge graph: Format conversion, through the internal mapping of the agent, convert the upstream result into a parameter sequence acceptable to the downstream agent; Construct a request, determine the parameters provided by the candidate service and the data that the candidate service needs to obtain in the knowledge graph, and construct an Http request with key-value pairs; Send the request, send an Http request to the knowledge graph;
[0028] (42) Denote the set of execution agents as A = {A1, A2, A3,..., A n}, traverse the set of execution agents. Each execution agent is responsible for a part of the work according to the assignment of the composite agent, such as input state perception, basin state change, model parameter correction, model configuration scheme optimization, etc.; Each execution agent corresponds to a specific processing function. The input of the function is the basic information of the service request. Inside the function, by querying the corresponding basin situation and model parameters in the knowledge graph, through model calculation, the execution agent obtains the calculation result and transmits it back to the composite agent for storage.
[0029] Based on the same inventive concept, the present invention provides a construction device for a knowledge-driven digital twin watershed intelligent agent, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the computer program is loaded into the processor, it implements the above-mentioned construction method of a knowledge-driven digital twin watershed intelligent agent.
[0030] Beneficial effects: Compared with the prior art, the beneficial effects of the present invention are as follows: Through the interaction between the intelligent agent and the water conservancy knowledge graph, the present invention drives the decision-making of the intelligent agent with water conservancy knowledge to achieve the interaction between the physical and digital watersheds; by designing a combined intelligent agent, the present invention globally coordinates and perceives the watershed situation, continuously explores and judges, and plans and designs the optimal service combination plan that meets the needs of service requesters; the present invention uses the execution intelligent agent to deeply interact with the knowledge graph, layer by layer executes calls, and returns the final execution result to the service requester, realizing the analysis and prediction, simulation and verification of the knowledge-driven twin watershed intelligent agent, and assisting the decision-making judgment of water conservancy affairs in the physical watershed. Brief Description of the Drawings
[0031] Figure 1 It is the specific flowchart of the present invention;
[0032] Figure 2 It is the flowchart of the combined intelligent agent sending a flood feature query request to the knowledge graph;
[0033] Figure 3 It is the schematic diagram of the Web selection model based on the workflow;
[0034] Figure 4 It is the schematic diagram of the automated service composition model based on the semantic Web service;
[0035] Figure 5 It is the service selection for constructing a flood forecasting scheme based on the workflow,
[0036] Figure 6 It is the flowchart of finding candidate services for the runoff generation model by relying on the syntax structure tree;
[0037] Figure 7 It is the schematic diagram of the interaction structure between the intelligent agent and the water conservancy knowledge graph. Detailed Embodiments
[0038] The present invention will be further described in detail below with reference to the accompanying drawings.
[0039] The present invention provides a construction method of a knowledge-driven digital twin watershed intelligent agent, with the water conservancy knowledge graph as the driving force, and the digital twin watershed intelligent agent realizes the intelligent simulation mapping with the physical watershed, as Figure 1 shown, and specifically includes the following steps:
[0040] Step 1: Convert the requirements described in the natural language of the service requester into a sequence of parameters required for agent processing.
[0041] Step 2: The composite agent perceives the basin situation by querying the knowledge graph and obtains the workflow for the current request.
[0042] The steps to query the current basin situation and workflow in the knowledge graph are as follows:
[0043] (1) Construct a query request. According to the abstract parameter sequence, determine the parameters to be queried in this query request and the known parameters provided by the parameter sequence, and construct a knowledge graph query statement.
[0044] (2) Send the query request. Send the constructed request statement to the knowledge graph.
[0045] (3) Return the query result. The knowledge graph returns the query result in the format required by the agent.
[0046] The specific workflow of the composite agent: Input the service request of the user and construct the user request in the form of a string; then monitor the state change through the function discover_change. If the state changes, trigger the function discover_workflow. The parameters required for this function are the changed state parameters. After querying in the knowledge graph, find the workflow triggered by the state change. This function outputs the specific workflow. Next, according to the workflow, the composite agent constructs an execution agent.
[0047] As Figure 2 shown, it is the process of the composite agent sending a request to the knowledge graph to query the flood characteristics of the Hongqi rainfall station in the Yangshi - Shijiao - Dongxi - interval sub - basin in July. The known parameters are the basin name, rainfall station name, and evaporation station name; the parameters to be queried are the flood time floodTime, flood occurrence frequency floodFrequence, and flood duration floodLastTime; the query address is the flood module under the ontology: http: / / basinontologe.com / flood#; the query restriction condition is to query the flood data in July; finally, return the query result in JSON format.
[0048] Step 3: The composite agent selects appropriate candidate services from multiple service classes in the water conservancy knowledge graph according to the workflow of the current request, and plans and designs the optimal service combination plan that meets the needs of the service requester.
[0049] First, according to the workflow returned by the knowledge graph, select the required services in the water conservancy knowledge graph, obtain the addresses of the currently available services, combine the agents to subscribe to the services required in the workflow, and receive the changes that occur to the current services in a timely manner.
[0050] Among them, there are two ways to select the required services, namely the Web selection model based on the workflow and the automated service selection model based on the semantic Web service.
[0051] The implementation process of the Web selection model based on the workflow is as Figure 3 shown. The service set with the same functional attributes but different service performances is the service class, and the service entity that can implement a specific service function is the candidate service: The combined agent obtains all the basin workflows from the knowledge graph and records them; A streamlined service processing process is established according to the interaction relationships between the basin workflows; The services required in the currently requested basin workflow are seamlessly integrated into the entire service process, and the service execution process of the workflow is monitored and evaluated.
[0052] The implementation process of the automated service selection model based on the semantic Web service is as Figure 4 shown: Input the basin information provided by the service requester; Use semantic inference technology to find and match a set of Web services combined in a specific execution order. Among them, ABCD are the candidate services that meet the requirements found, JKL is the expected output result, and A'B' etc. represent the services in W i that have a semantic similarity relationship with the input, and the letters on the right side of the service represent the output generated by the service meeting the input.
[0053] The selection reference for the flood forecasting scheme construction service based on the workflow is as Figure 5 shown. The service classes for flood forecasting scheme construction can be divided into 6 categories according to the workflow steps, namely the analysis of the water conservancy distribution in the basin, the analysis of the basic characteristics of the basin, the selection of the evaporation model in the forecasting modeling, the selection of the runoff generation model, the selection of the overland flow concentration model, and the selection of the river channel flow concentration model. Among them, some service classes have only a single candidate service and do not require the selection of candidate services. Service classes such as the runoff generation model have multiple candidate services, and each candidate service corresponds to a type of calculation model. The required service entity needs to be determined through the selection of candidate services.
[0054] Then, according to the addresses of the available services, search for candidate services with specific service functions among them. Establish a set of water conservancy services with the same functional attributes but different service performances; Set up a syntax structure tree and search layer by layer for candidate services that meet the requirements to implement specific service functions; Judge whether the selected candidate service matches the query conditions and the services in the queried service library.
[0055] Specific workflow for candidate service selection: Denote the set of candidate services as S = {S1, S2, S3,..., S n}, the set of basin situation as F = {F1, F2, F3,..., F n}, and the set of query conditions as C = {C1, C2, C3,..., C n}. When , traverse the set of candidate services S in sequence, compare the candidate services with the set of basin situation conditions F. If S i == F j , then S i is a candidate service that meets the requirements; then traverse the set of basin situation conditions F and the set of query conditions C, compare S i + C k == F j , and it is considered that S i is a candidate service that meets the query conditions and the service library to be queried. In summary, S i is the candidate service finally selected to implement the specific service function.
[0056] As Figure 6 shown, it is the process of candidate service selection for the runoff generation model. First, select the specific service class, that is, the service set formed by the models for calculating runoff generation. Then, according to the characteristic parameters such as the terrain and landform of the basin, screen the candidate services. Through layer-by-layer selection, finally determine the candidate service under the basin conditions, that is, the runoff generation calculation model. Then verify whether the selected candidate service meets the basin conditions to determine the final candidate service.
[0057] Finally, by calculating the value functions of different combination schemes, select the optimal service combination scheme with the maximum score that meets the needs of the service requester.
[0058] Step 4: Design the execution agent. According to the optimal service combination scheme planned by the combination agent, the execution agent sends a query request to the water conservancy knowledge graph, runs the models in sequence, and transfers the execution results of the models.
[0059] First, based on the basic information of the candidate services in the combination service scheme provided by the combination agent, the execution agent sends a request call message to the water conservancy knowledge graph. Then, the execution agent performs actions in sequence according to the results returned by the knowledge graph; finally, the execution agent transfers the model execution results through actions such as query calculation. Here, the models refer to the hydrological model, water environment model, hydrodynamic model, water resources model, and machine learning model in the knowledge graph.
[0060] The process of the execution agent sending a request call to the service provider is as follows: Format conversion, through the internal mapping of the agent, convert the upstream result into a parameter sequence acceptable to the downstream agent; Construct the request, determine the parameters provided by the candidate service and the data that the candidate service needs to obtain in the knowledge graph, and construct an Http request with key-value pairs; Send the request, send an Http request to the knowledge graph.
[0061] The specific workflow of the execution agent: The set of execution agents is denoted as A = {A1, A2, A3,..., A n}, Traverse the set of execution agents. Each execution agent is responsible for a part of the work according to the assignment of the combined agent, such as input state perception, basin state change, model parameter correction, model configuration scheme optimization, etc. Each execution agent corresponds to a specific processing function. The input of the function is the basic information of the service request. Inside the function, by querying the corresponding basin situation and model parameters in the knowledge graph, after model calculation, the execution agent obtains the calculation result and transmits it back to the combined agent for storage. For the processing function of model parameter correction, first directly adjust the parameters according to the hydraulic model; then associate with the basin data and perform calculation and adjustment using empirical algorithms; finally, perform manual intervention and adjustment. Through coarse adjustment to fine adjustment, and finally manual intervention and adjustment, the model parameters are corrected.
[0062] As Figure 7 shown, it is the process of interaction between the agent and the knowledge graph. Among them, the combined agent C is responsible for overall coordination. The execution agents 1-6 are responsible for in-depth interaction with the knowledge graph, using the water conservancy knowledge graph to represent the physical basin characteristics. The combined agent perceives the basin situation and makes overall judgment and decision; The execution agent realizes specific services according to the combined scheme provided by the combined agent, interacts with the knowledge graph in depth in turn, and transmits the operation results. The agent realizes the virtual-real interaction and iterative optimization of the physical basin and the digital basin through interaction with the knowledge graph.
[0063] Step 5: Feed back the final result of the execution agent to the service requester to fulfill the request of the service requester.
[0064] Based on the same inventive concept, the present invention provides a construction device for a knowledge-driven digital twin basin agent, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the computer program is loaded into the processor, it implements the above-mentioned construction method of a knowledge-driven digital twin basin agent.
Claims
1. A construction method of a knowledge-driven digital twin watershed agent, characterized in that It includes the following steps: (1) Convert the requirements described in the natural language of the service requester into a parameter sequence required for agent processing; (2) The combined agent perceives the basin situation by querying the knowledge graph and obtains the workflow of the current request; (3) The combined agent selects appropriate candidate services from multiple service classes of the water conservancy knowledge graph according to the workflow of the current request, and plans and designs an optimal service combination plan that meets the needs of the service requester; (4) Design an execution agent. According to the optimal service combination plan planned by the combined agent, the execution agent sends a query request to the water conservancy knowledge graph, runs the models in sequence, and transmits the execution results of the models; (5) Feed back the final result of the execution agent to the service requester to fulfill the request of the service requester; The implementation process of the step (2) is as follows: (21) Construct a query request. According to the abstract parameter sequence, determine the parameters to be queried in this query request and the known parameters provided by the parameter sequence, and construct a knowledge graph query statement; (22) Send a query request. Send the constructed request statement to the knowledge graph: Monitor the status change through the function discover_change. If the status changes, trigger the function discover_workflow. The parameters required for this function are the changed status parameters. After querying in the knowledge graph, find the workflow triggered by the status change; (23) Return the query result. The knowledge graph returns the query result in the format required by the agent; The implementation process of the step (4) is as follows: (41) Based on the basic information of the candidate services in the combined service plan provided by the combined agent, the execution agent sends the information required for request invocation to the water conservancy knowledge graph: Format conversion, through the internal mapping in the agent, convert the upstream result into a parameter sequence acceptable to the downstream agent; Construct a request, determine the parameters provided by the candidate service and the data that the candidate service needs to obtain in the knowledge graph, and construct an Http request with key-value pairs; Send the request, and send the Http request to the knowledge graph; (42) The set of execution agents is denoted as A = {A1, A2, A3,..., A n}, traverse the set of execution agents, and each execution agent is responsible for a part of the work according to the allocation of the combined agent, including input state perception, basin state change, model parameter correction, and model configuration scheme; each execution agent corresponds to a specific processing function, the input of the function is the basic information of the service request, and inside the function, the corresponding basin situation and model parameters are queried in the knowledge graph. After model calculation, the execution agent obtains the calculation result and transmits it back to the combined agent for storage.
2. The construction method of a knowledge-driven digital twin watershed agent according to claim 1, wherein The implementation process of the step (3) is as follows: (31) Select the required services in the water conservancy knowledge graph according to the workflow returned by the knowledge graph, obtain the addresses of the currently available services, and the combined agent subscribes to the services required in the workflow to receive the changes that occur to the current services in a timely manner; (32) Search for candidate services with specific service functions among the available service addresses; (33) Select the optimal service combination plan with the maximum score that meets the needs of the service requester by calculating the value functions of different combination plans.
3. The construction method of a knowledge-driven digital twin watershed agent according to claim 2, wherein The methods for selecting the required services in step (31) include two types, namely the Web selection model based on the workflow and the automated service selection model based on the semantic Web service; The implementation process of the Web selection model based on the workflow is as follows: The combined agent obtains all the basin workflows from the knowledge graph and records them; Establish a streamlined service processing process according to the interaction relationships between the basin workflows; Seamlessly integrate the services required in the current requested basin workflow into the entire service process, and monitor and evaluate the service execution process of the workflow; The implementation process of the automated service selection model based on semantic Web services is as follows: Input the basin information provided by the service requester; Use semantic inference technology to find and match a set of Web services combined in a specific execution order.
4. A method for constructing a knowledge-driven digital twin watershed agent according to claim 2, characterized in that, Step (32) includes the following steps: (321) Establish a set of water conservancy services with the same functional attributes but different service performances; (322) Set up a syntax structure tree and layer by layer search for candidate services that meet the requirements to implement specific service functions: Denote the candidate service set as S = {S1, S2, S3,..., S n}, the basin situation set as F = {F1, F2, F3,..., F n}, and the query condition set as C = {C1, C2, C3,..., C n}; when , traverse the candidate service set S in sequence, compare the candidate service with the basin situation condition set F. If S i == F j , then S i is a candidate service meeting the requirements. (323) Determine whether the selected candidate service matches the query conditions and the services in the service library to be queried: Traverse the basin situation condition set F and the query condition set C, and compare S i +C k ==F j If so, it is considered that S i is a candidate service that meets the query conditions and the service library to be queried, and S i is the candidate service finally selected to implement the specific service function.
5. An apparatus for constructing a knowledge-driven digital twin watershed agent, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the computer program is loaded into the processor, it implements a method for constructing a knowledge-driven digital twin basin intelligent agent according to any one of claims 1 to 4.
Citation Information
Patent Citations
Long tunnel digital twin system and method based on BIM + GIS technology
CN114201798A
Method for short-term optimal scheduling of multi-agent hydropower station group
WO2017071230A1