A modular digital twin modeling method and system for wastewater treatment plants

By constructing a knowledge graph through modular decomposition and similarity mining, the problem of reusing historical model resources in the digital twin modeling of sewage treatment plants is solved, enabling rapid and flexible modeling and adaptation, and improving modeling efficiency and resource reuse effect.

CN120911108BActive Publication Date: 2026-01-30CHENGDU RONGLIAN HI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511039739.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-28
Publication Date
2026-01-30
Estimated Expiration
2045-07-28

AI Technical Summary

Technical Problem

Existing digital twin modeling methods for wastewater treatment plants lack effective accumulation and reuse of historical model resources, resulting in long modeling cycles and difficulty in meeting renovation and expansion needs. Furthermore, the geometric structures of various functional modules and equipment differ greatly, and the coupling of biochemical reactions is complex, making it difficult to achieve rapid modeling and flexible adaptation.

Method used

By employing modular decomposition and similarity mining methods, we collect digital twin models of multiple wastewater treatment plants, extract geometric, behavioral, and interaction information of the equipment, construct a knowledge graph, and use similarity comparison to establish a digital twin model of the target wastewater treatment system, thereby realizing the reuse of modular resources and rapid modeling.

Benefits of technology

It enables efficient reuse of historical model resources, shortens the modeling cycle, improves the flexibility and adaptability of modular modeling, and supports the rapid construction of digital twin models of target wastewater treatment plants.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120911108B_ABST
    Figure CN120911108B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of digital twin modeling technology, and relates to a modular digital twin modeling method and system for wastewater treatment plants. By collecting digital twin models of multiple plants, effective information such as wastewater treatment processes, functional modules, and equipment geometry, behavior, interaction, and operation processes is extracted to construct a knowledge graph with functional modules as entities, processes as relationships, and effective information as attributes. Then, corresponding processes, modules, and equipment operation processes are extracted from the target system. Adaptive entities are screened through operation process similarity comparison, and complete effective paths containing adaptable entities are extracted. The optimal path is selected through process similarity comparison. Finally, based on the effective information of the path entities, a target model is constructed and corrected according to actual operating conditions, achieving rapid establishment of a modular digital twin model of the target wastewater treatment plant.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of digital twin modeling, and particularly relates to a modular digital twin modeling method and system for a sewage treatment plant. BACKGROUND

[0002] With the continuous improvement of environmental protection requirements and the in-depth promotion of smart water construction, sewage treatment plants, as the core unit of water environment governance, their efficient operation, precise regulation and control and intelligent management have become the key targets of the industry development. Digital twin technology realizes dynamic simulation, state monitoring and optimization decision of the whole process of sewage treatment by constructing real-time mapping of physical entities and virtual models, and provides a new technical path for solving the problems of high energy consumption, difficult operation and maintenance, and process optimization lag in the traditional operation mode.

[0003] Currently, the digital twin modeling of sewage treatment plants is mostly a "one-time project", and lacks effective accumulation and reuse of historical model resources. When establishing a new digital twin model of a sewage treatment plant, the way of re-constructing a three-dimensional model of each functional module and writing the corresponding behavior logic is still adopted. However, sewage treatment plants contain dozens of functional modules such as grating, sedimentation tank, aeration tank and sludge treatment, and the geometric structures of the devices in each functional module are quite different, and there are complex relationships such as physical space constraints and biochemical reaction coupling. If the current modeling method is continued, the modeling cycle will be as long as several months or even several years, and it is difficult to meet the model iteration demand brought by the expansion and reconstruction of sewage treatment plants. SUMMARY

[0004] To solve the above technical problems, the application realizes the following technical scheme:

[0005] In a first aspect, a modular digital twin modeling method for a wastewater treatment plant is provided, comprising the following steps: collecting digital twin models of a plurality of wastewater treatment plants; extracting a wastewater treatment process, a plurality of functional modules, and effective information of each functional module from each digital twin model; the effective information including geometric information, behavior information, interaction information, and operation process of each device; constructing a knowledge graph with the functional modules as entities, the wastewater treatment process as relationships, and the effective information as attributes; extracting the wastewater treatment process, the plurality of functional modules, and the operation process of each device in each functional module from a target wastewater treatment system; comparing the operation process of each device in each functional module of the target wastewater treatment system with the operation process of each device in the effective information of each entity for similarity, to obtain a first similarity; adding a first label to an entity with a first similarity greater than a threshold in the knowledge graph; extracting all effective paths in the knowledge graph and adding a second label to each effective path; one effective path corresponds to one complete wastewater treatment process, and each effective path includes at least one entity with the first label; comparing the wastewater treatment process of the target wastewater treatment system with each effective path with the second label for similarity, to obtain a second similarity; selecting one effective path with the maximum second similarity from all effective paths with the second label; and establishing a digital twin model of the target wastewater treatment system using the effective information of each entity in the selected effective path.

[0006] In a second aspect, a modular digital twin modeling system for a sewage treatment plant is provided, comprising: a model collection module configured to collect digital twin models of a plurality of sewage treatment plants; a first information extraction module configured to extract a sewage treatment process, a plurality of functional modules, and effective information of each functional module from each digital twin model; the effective information comprises geometric information, behavior information, interaction information, and operation process of each device; a knowledge graph construction module configured to construct a knowledge graph taking the functional modules as entities, the sewage treatment process as a relationship, and the effective information as attributes; a second information extraction module configured to extract the sewage treatment process, the plurality of functional modules, and the operation process of each device in each functional module from a target sewage treatment system; a first similarity acquisition module configured to compare the operation process of each device in each functional module of the target sewage treatment system with the operation process of each device in the effective information of each entity, and obtain a first similarity; a first label adding module configured to add a first label to an entity with a first similarity greater than a threshold in the knowledge graph; an effective path extraction module configured to extract all effective paths in the knowledge graph; one effective path corresponds to one complete sewage treatment process, and each effective path contains at least one entity with the first label; a second label adding module configured to add a second label to each effective path; a second similarity acquisition module configured to compare the sewage treatment process of the target sewage treatment system with each effective path with the second label, and obtain a second similarity; an effective path screening module configured to screen one effective path with the largest second similarity from all effective paths with the second label; and a model construction module configured to construct a digital twin model of the target sewage treatment system by using the effective information of each entity in the screened effective path.

[0007] In a third aspect, a computer device is provided, comprising a memory, a processor, and a transceiver connected in sequence, wherein the memory is configured to store a computer program, the transceiver is configured to transceive data, and the processor is configured to read the computer program and execute the method for monitoring a cable force of a cable of a cable-stayed bridge in real time according to the first aspect.

[0008] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores instructions, when the instructions are executed on a computer, the method for monitoring a cable force of a cable of a cable-stayed bridge in real time according to any one of the first aspect is executed.

[0009] In a fifth aspect, a computer program product containing instructions is provided, when the instructions are executed on a computer, the computer is caused to execute the method for monitoring a cable force of a cable of a cable-stayed bridge in real time according to the first aspect; the computer comprises a general-purpose computer, a special-purpose computer, or a programmable device.

[0010] The present application has the following advantages and beneficial effects:

[0011] 1. Adopting the established configuration logic, reconstructing the existing information model, fusing the currently published digital twin model of wastewater treatment plant, establishing the knowledge graph, so as to realize the reuse of the historical accumulated model resources. On this basis, through modularization splitting and similarity mining, the reusable model resources are screened, and then a reuse path highly coinciding with the wastewater treatment process of the target wastewater treatment system is screened out from the knowledge graph, and the model resources of each entity on the reuse path are reused, so as to realize the rapid establishment of the modular digital twin model of the target wastewater treatment plant.

[0012] 2. In the process of constructing the knowledge graph, through modularization splitting, correlation relationship mapping and modularization combination, the currently published digital twin model of wastewater treatment plant is reorganized and expanded, so as to provide more possibilities for screening out the reuse path highly coinciding with the wastewater treatment process of the target wastewater treatment system, and improve the reuse effect of the historical model resources and the flexibility of modular modeling. BRIEF DESCRIPTION OF DRAWINGS

[0013] The drawings described herein are used to provide further understanding of the embodiments of the present application, constitute a part of the present application, and do not constitute a limitation on the embodiments of the present application. In the drawings:

[0014] Figure 1 A wastewater treatment plant modular digital twin modeling method flowchart is provided for the embodiment 1 of the present application.

[0015] Figure 2 A graph structure diagram containing all triplets of data sets is provided for the embodiment 1 of the present application. DETAILED DESCRIPTION

[0016] In order to make the purpose, technical scheme and advantages of the present application more clear and obvious, the present application is further described in detail below, the illustrative embodiments of the present application and the description thereof are used to explain the present application, and do not constitute a limitation on the present application, the following described embodiments are a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor belong to the scope of protection of the present application.

[0017] In the following description, numerous specific details are set forth to provide a thorough understanding of the present application. However, it will be apparent to one skilled in the art that the present application can be practiced without the specific details. In other instances, well-known structures, materials, or processes have not been described in detail in order to avoid obscuring the present application. Materials, instruments, and tools used in the following examples, and throughout the specification, are those that are conventionally employed unless otherwise specified.

[0018] In addition, the terms "first", "second", etc. are used herein only to describe different instances, and do not imply or connote relative importance or a number of indicated technical features. Thus, features defined with "first", "second", etc. can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise specifically limited.

[0019] Embodiment 1: A modular digital twin modeling method for wastewater treatment plants is provided, which solves the problems of low modeling efficiency, resource waste, and insufficient dynamic adaptation through modular decomposition, similarity mining, and information reuse mechanism. The method includes Figure 1 The following steps are shown:

[0020] Step 1: Collect digital twin models of multiple wastewater treatment plants.

[0021] To quickly build a digital twin model of a wastewater treatment plant, one of the most effective ways is to efficiently reuse a large number of digital twin models accumulated in history. At present, there are a large number of digital twin models of wastewater treatment plants in practical application and research results in the field of wastewater treatment, and most of the digital twin models of wastewater treatment systems can be publicly obtained or applied. The digital twin models of wastewater treatment systems that have been publicly available and allowed to use can be collected in the following ways:

[0022] 1. Download model resources through the Kai Yuan platform. For example: (1) BSM2 is a full-process benchmark simulation model of wastewater treatment plants developed by the International Water Association (IWA), which inherits the BSM1 model and covers the complete wastewater treatment process. It can be obtained through the IWA website or the GitHub platform; (2) BioWin Simulator is a full-process dynamic simulation software for wastewater treatment plants developed by EnviroSim Company in Canada, which is one of the industry standard tools for municipal and industrial wastewater plant design, optimization, and scientific research, providing complete wastewater treatment process simulation, which can be obtained by applying through the official website.

[0023] 2. Obtain model resources through academic papers or projects. For example: (1) In 2021, a hybrid twin model (ASM+CNN+LSTM) was released by a Chinese research team to reduce the impact of wastewater treatment ambiguity. The relevant code and model parameters have been disclosed in the paper appendix; (2) The University of Queensland case uses BioWin modeling, and the paper includes model configuration instructions and input and output files.

[0024] 3. Obtain model resources through commercial platforms or corporate cooperation. For example: Siemens SIMATIC PCS neo provides a digital twin module based on S7-1500 PLC, supporting ASM model integration.

[0025] 4. Obtain model resources through the open interface of the city-level digital twin platform. For example: Several cities have provided open API interfaces to support the access of third-party models, and developers can apply for model resources or call by applying for developer rights through the city water bureau.

[0026] It should be noted that this embodiment does not list all the model resource acquisition paths. In addition to the above-mentioned reference paths, wastewater treatment plant digital twin models can also be widely collected through other means.

[0027] Step 2: Extract the wastewater treatment process, multiple functional modules, and effective information for each functional module from each digital twin model.

[0028] The purpose of this step is to modularly disassemble the historical model, to clearly define the functional boundaries, operating rules and collaboration logic of each module, and to transform the historical model from a "non-disintegrable whole" to a "combinable module set", laying the foundation for subsequent construction of a knowledge graph and realization of model reuse and rapid modeling. Specifically, on the one hand, the digital twin model of the wastewater treatment plant is a complex whole, and by extracting the wastewater treatment process, functional modules and effective information of the functional modules, the complex digital twin model can be disassembled into standardized and structured "reusable units", providing a "basic component library" for subsequent model reuse across the plant area. On the other hand, this method realizes the reuse of the historical model by constructing a knowledge graph. The core elements of the knowledge graph (entities, relationships, and attributes) are derived from the functional modules, wastewater treatment processes, and effective information extracted in this step. Among them, the "functional modules" extracted can be directly used as core entities in the knowledge graph, the "wastewater treatment process" extracted can be used to define the logical association between entities, and the "effective information" extracted can be used as attributes of entities to enrich the feature description of entities. On the other hand, the digital twin model of the target wastewater treatment system needs to compare the similarity between the functional modules and the operating logic of the target wastewater treatment system and the existing digital twin model, so as to select reusable modules and processes. The wastewater treatment process, functional modules and effective information extracted in this step can provide "benchmark data" for the similarity matching of the target model and the historical model. Among them, the functional modules of the target wastewater treatment plant need to be compared with the functional modules of the existing digital twin model, relying on the "effective information" extracted; the operating logic of the target wastewater treatment plant needs to be compared with the operating logic of the existing digital twin model, relying on the "wastewater treatment process" extracted.

[0029] The specific method for extracting the wastewater treatment process, functional modules and effective information is as follows:

[0030] 1. Extract the wastewater treatment process

[0031] The wastewater treatment process is the complete process chain of wastewater from entering the plant to reaching the standard discharge or reuse. Based on the pre-set process nodes, node connection relationships, process specification documents and operation time sequence in the collected digital twin model, the structured process chain of the digital twin model is formed based on the physical treatment logic of wastewater treatment, including the names of each node and the sequence between each node. For example, a typical wastewater treatment process is: grid filtering → sand treatment → biochemical reaction → sedimentation tank clarification → disinfection effluent.

[0032] 2. Extract multiple functional modules on the wastewater treatment process

[0033] With the principle of functional independence, a cluster of devices that complete a single wastewater treatment function is defined as a functional module. For example, the "biochemical reaction" corresponding functional module can include aeration equipment, agitator, sludge return pump, etc.

[0034] 3. Extracting effective information of each functional module

[0035] The effective information includes four types of core data: geometric information, behavior information, interaction information, and operation flow of each device. The extraction method is as follows:

[0036] (1) Extracting geometric information of devices

[0037] The collection information of devices is derived from the three-dimensional modeling data of digital twin models, including device size (such as reactor diameter, height), spatial position coordinates, pipeline connection mode, and layout drawings.

[0038] Standardize the extracted geometric information. This includes: unifying the coordinate system of each device and the size unit of each device (such as meters, millimeters), and storing the geometric information as a three-dimensional model file (such as.obj format) or a parameterized data table, etc.

[0039] (2) Extracting behavior information of devices

[0040] The behavior information of devices refers to the dynamic operating characteristics of devices, such as the air volume adjustment range of aeration equipment, the head-flow curve of a water pump, and the opening and closing response time of a valve. Based on the device parameter library, historical operation logs, and device nameplate data in the digital twin model, a quantitative behavior parameter table is formed to obtain the behavior information of devices.

[0041] (3) Extracting interaction information of devices

[0042] The interaction information of devices is the information interaction rules between devices within a functional module and between the functional module and the outside. For example, the signal transmission logic of "dissolved oxygen sensor data → PLC controller → aeration equipment adjustment instruction" in the biochemical module, or the sludge transport quantity associated parameter with the previous sedimentation module. By analyzing the control logic diagram (such as PID control loop), communication protocol (such as Modbus protocol), and interface definition document in the digital twin model, the data interaction nodes and rules are sorted out, and the interaction information of devices is extracted.

[0043] (4) Extracting operation flow of devices

[0044] The operation flow of the device refers to the starting sequence, cooperative operation steps and fault handling process of each device in the functional module. For example, the operation sequence of the grit module is "grating start → water inlet valve open → grit pump delay start → regular sand discharge". Based on the operation procedures, timing control scripts and emergency plans in the digital twin model, a device flowchart or step-by-step list is formed, thereby extracting the operation flow of the device.

[0045] Step 3: Construct a knowledge graph with functional modules as entities, wastewater treatment processes as relationships, and effective information as attributes.

[0046] Based on the above steps 1 and 2, the purpose of this step is to transform the extracted fragmented information into a structured, correlated and inferable knowledge system, providing support for the rapid matching, reuse and construction of the target digital twin model. The specific method is:

[0047] Step 3.1: Perform steps A1 to A4 for each wastewater treatment process extracted from the digital twin model.

[0048] Step A1: Split the wastewater treatment process into multiple independent wastewater treatment links.

[0049] Based on the wastewater treatment process extracted in step 2, it is split based on the functional division of the device cluster. For example, the independent functional areas of the grid, grit chamber, biochemical reaction tank, sedimentation tank, disinfection room, etc. correspond to an independent wastewater treatment link. Based on the typical wastewater treatment process extracted in step 2, it can be split into 5 independent wastewater treatment links: grid filtration link, grit treatment link, biochemical reaction link, sedimentation tank clarification link, and disinfection effluent link.

[0050] Step A2: Add functional attribute labels to each wastewater treatment link and add correlation relationship parameters to each functional attribute label.

[0051] 1. Add functional attribute labels to each wastewater treatment link

[0052] Functional attribute labels are used to describe the core processing target of the wastewater treatment link, such as "solid-liquid separation" (for the grid link), "organic matter degradation" (for the biochemical reaction link), "sterilization and disinfection" (for the disinfection effluent link), etc.

[0053] (1) Functional label assignment

[0054] For each split wastewater treatment link, assign a label based on its core function, for example: for the sedimentation tank clarification link, the functional attribute label is "solid-liquid deep separation", for the biochemical reaction link, the functional attribute label is "organic matter degradation", and for the grit treatment link, the functional attribute label is "inorganic particle separation".

[0055] (2) Standardized processing of function label

[0056] The label is uniformly named by using English abbreviations or coding forms (such as “solid-liquid separation” is abbreviated as “SLFL”, “solid-liquid deepening separation” is abbreviated as “SLSD”, “inorganic particle separation” is abbreviated as “IPS”, and “biochemical reaction” is abbreviated as “BR”), so as to ensure that the function labels of the sewage treatment links of different sewage treatment processes are consistent and identifiable, facilitating the unified storage and retrieval of subsequent knowledge graphs.

[0057] 2. Add an association relationship parameter to each function attribute label

[0058] The association relationship parameter is used to describe the association relationship between the function attribute label of the current sewage treatment link and the function attribute label of other sewage treatment links. For example, for the biochemical reaction link (the function attribute label is “BR”), it is associated with the sand settling treatment link (the function attribute label is “IPS”) in front and the sedimentation tank clarification link (the function attribute label is “SLSD”) behind, so for the function attribute label “SLSD”, the association relationship parameters added are F-IPS and B-SLSD. Wherein, F is the first letter of Front, indicating the front association IPS; B is the first letter of Behind, indicating the back association SLSD.

[0059] Step A3: Establish a one-to-one mapping relationship between the sewage treatment link and the function module extracted from the digital twin model.

[0060] First, the function attribute label of each sewage treatment link is extracted. For example, the function attribute label of the sand settling treatment link is “IPS (inorganic particle separation)”.

[0061] Then, compare the function attribute label of each sewage treatment link with the running process of the equipment in the effective information of each function module. If the running process of the equipment in a certain function module contains the function attribute label of the current sewage treatment link, a mapping relationship between the current sewage treatment link and the function module is established. For example, for the current sand settling treatment link, compare the function attribute label “IPS (inorganic particle separation)” of the sand settling treatment link with the running process of the equipment in each function module. It is found that only the running process of the equipment in the sand settling module (“inlet water → stirring sand settling → sand-water separation → sand discharge”) contains the function attribute label “IPS (inorganic particle separation)” of the sand settling treatment link, so a mapping relationship is established between the sand settling treatment link and the sand settling treatment module.

[0062] Step A4: According to the mapping relationship, assign the function attribute label and the association relationship parameter of the sewage treatment link to the corresponding function module.

[0063] Step 3.2: Perform steps B1 to B2 for each functional module with a functional attribute label and an association parameter.

[0064] Step B1: Add a unique identity to the functional module.

[0065] The unique identity needs to contain the core attribute information of the module, forming a coding system with uniqueness and readability. The coding elements include:

[0066] 1. Source model number. Used to identify which original digital twin model the functional module comes from, using the abbreviation or serial number of the model unique ID. For example, the module extracted from the 3rd collected digital twin model has a source number of "M03".

[0067] 2. Functional module serial number. Under the same source model and the same type, the functional module is numbered in the order of extraction, using Arabic numerals. For example, the 2nd grit treatment module in a certain model has a serial number of "02".

[0068] Based on the above coding elements, the coding rule of the unique identity of the functional module is "source model number-functional module serial number". For example, the grid filter module comes from the 1st original digital twin model, which is the 1st grid module in that model, and the coding is "M01-01"; the biochemical reaction module comes from the 2nd original digital twin model, which is the 3rd biochemical module in that model, and the coding is "M02-03".

[0069] Step B2: Establish a three-element array with the unique identity as the data header and the functional attribute label and association parameter as the elements.

[0070] In the knowledge graph construction process, the three-element array is the core data form of the structured storage of functional module information, and its goal is to convert the identity information, functional positioning and coordination rules of the module into structured data that can be calculated through the binding of "unique identity-functional attribute label-association parameter", providing a foundation for subsequent data set integration and graph structure establishment.

[0071] The three-element array adopts a fixed structure of "data header + element group". The data header, as the unique identity (generated through step B1), serves as the unique index of the array; the element group contains two types of core data - functional attribute label and association parameter, which together describe the functional characteristics and coordination rules of the module. The standard format of the three-element array can be represented as: [unique identity, functional attribute label, association parameter set].

[0072] Step 3.3: Store all three-element arrays uniformly to obtain the data set.

[0073] Step 3.4: Traverse the dataset to build a graph structure.

[0074] The traversal method is to perform steps C1 to C2 when a ternary array is accessed.

[0075] Step C1: Read the association parameter in the current ternary array.

[0076] Step C2: Query each remaining ternary array, and during the query, determine whether the queried ternary array and the current ternary array have an association relationship according to the function attribute label and the association parameter in the current ternary array, and if so, establish an edge between the function attribute label of the queried ternary array and the function attribute label of the current ternary array.

[0077] For example, the currently read ternary array is [M04-01, BR, (F-IPS, B-SLSD)], and if one of the ternary arrays in the dataset is [M02-03, SLDS, (F-BR, B-DIS)] (DIS is the English abbreviation of the disinfection link), since the function attribute label BR of the current ternary array falls within the association parameter set (F-BR, indicating that SLDS is associated with BR in front) of the queried ternary array, the current ternary array and the queried ternary array have an association relationship, and therefore an edge is established between BR and SLDS.

[0078] According to the method described in step 3.4, an association relationship can be established between each ternary array in the dataset and each of the remaining ternary arrays, thereby obtaining a graph structure containing all ternary arrays in the dataset, as shown in Figure 2 . Figure 2 In the graph structure, SCR represents the grid filter link, IPS represents the sand settling treatment link, BR represents the biochemical reaction link, SLDS represents the sedimentation tank clarification link, and DIS represents the disinfection effluent link. It should be noted that Figure 2 the graph structure does not contain all ternary arrays in the dataset, but only provides a reference for understanding the graph structure. In addition, the function attribute label of each link can be associated with multiple function attribute labels corresponding to function modules from different digital twin models in front or behind. Therefore, by modularizing, mapping association relationships, and modularizing, the current publicly disclosed digital twin model of the wastewater treatment plant is reorganized and expanded, thereby providing more possibilities for screening a reuse path that highly coincides with the wastewater treatment process of the target wastewater treatment system, and improving the reuse effect of historical model resources and the flexibility of modular modeling.

[0079] Step 3.5: According to the unique identity, associate the corresponding valid information with each node in the graph structure to obtain a knowledge graph.

[0080] Step 4: Extract the wastewater treatment process, multiple functional modules, and the operation process of each device in each functional module from the target wastewater treatment system.

[0081] The extraction operation of this step needs to collect the core data of the target system based on the actual process design and operation logic of the target wastewater treatment system, including: process design drawings (such as CAD flowchart, BIM model), operation procedures, equipment account, and operation management manual, etc. According to the core data, the wastewater treatment process and multiple functional modules are extracted from the target wastewater treatment system by referring to the method described in step 2 above.

[0082] The device operation process extraction needs to clearly define the start-up sequence, operation steps, and coordination rules of the devices in the module. First, list all the devices in the functional module. Then, based on the operation procedures, PLC control program, and field operation records of the target system, the device operation process is divided into continuous steps. For example: for the grid functional module, the device operation process is: coarse grid starts → fine grid starts → liquid level sensor monitoring → when the liquid level difference before the grid is > 50mm, start the cleaner → the cleaner runs for 3 minutes and then stops → the belt conveyor runs in linkage; for the secondary sedimentation tank functional module, the device operation process is: the inlet valve is opened → the mud scraper starts at low speed → the sludge return pump adjusts the frequency according to the mud level meter data → when the sludge concentration is > 8g / L, the sludge discharge valve is opened.

[0083] Step 5: Compare the operation process of each device in each functional module of the target wastewater treatment system with the operation process of each device in the effective information of each entity, and obtain the first similarity.

[0084] The purpose of this step is to locate the functionally adapted entity modules in the knowledge graph. Since the entities (functional modules) in the knowledge graph come from different digital twin models, even if the functional models realize the same function, the operation logic between the internal devices will also differ. In order to efficiently reuse historical model resources, this embodiment first performs module-level similarity comparison to filter out functional modules with high matching degree from the knowledge graph for each functional module in the target wastewater treatment system, and eliminate some functional modules with the same function but large differences in internal device operation logic. The specific method is:

[0085] Step 5.1: Perform steps D1 to D2 for each functional module of the target wastewater treatment system.

[0086] Step D1: Split the functional module into multiple independent devices, and standardize the naming of each device.

[0087] 1. Functional module splitting

[0088] The equipment split of the functional module needs to follow the principles of "physical independence" and "function recognizable", and the equipment in the module is split into independent units according to the physical form and functional role. For the grid functional module, the "grid machine" (core processing equipment), "belt conveyor" (auxiliary conveying equipment), "liquid level sensor" (monitoring equipment), "control box" (control equipment) and other equipment can be split; for the biochemical reaction module, the "aerator", "stirrer", "dissolved oxygen sensor", "sludge return pump" and other equipment can be split.

[0089] 2. Equipment naming

[0090] The standardized naming of the equipment needs to follow the principles of "uniqueness, readability, functionality", and give each piece of equipment a unique identifier through unified coding rules to avoid confusion of equipment with the same name. The specific implementation is as follows:

[0091] (1) Type code for the equipment.

[0092] Use English abbreviations or Chinese character initials to represent the functional category of the equipment, for example: the equipment type code of the sludge return pump is "WRP" (corresponding to "Wastewater Return Pump"); the equipment type code of the dissolved oxygen sensor is "DOS" (corresponding to "Dissolved Oxygen Sensor").

[0093] (2) Add module identification

[0094] Associate the functional module where the equipment is located, use the core code of the unique identity of the module to ensure that the ownership relationship between the equipment and the module can be traced back. The unique identity of the module generated in the above step B1 can be directly used.

[0095] (3) Add a serial number to the equipment

[0096] In the same module, the same type of equipment is assigned an Arabic numeral serial number (such as 01, 02) according to the installation position or number order to distinguish the same type of equipment.

[0097] Based on the above unified coding rules, the general format of the standardized naming of the equipment is: [equipment type code]-[unique identity of the module it belongs to]-[serial number]. For example, the first grid machine of the grid functional module (with a unique identity of "M01-01") is named "GG-(M01-01)-01".

[0098] Step D2: Arrange the names of each equipment according to the running process of each equipment in the functional module to establish a first sequence.

[0099] The running flow timing within the functional module is the core basis for the arrangement of the device name, which needs to be based on the actual running logic of the functional module to sort out the starting sequence, coordination relationship and operation steps of the device. Based on the operation procedure of the functional module, the PLC control program or the historical running record, the device running flow is split into continuous operation steps, and the trigger condition and the execution subject (device) of each step are marked. For example, the running flow of the "grating functional module" is split into: Step 1, coarse grating machine starts (trigger condition: water inlet valve opens); Step 2, fine grating machine starts (trigger condition: coarse grating machine runs normally); Step 3, liquid level sensor starts monitoring (trigger condition: 30 seconds after the fine grating machine starts); Step 4, trash cleaner starts (trigger condition: liquid level difference > 50 mm); Step 5, belt conveyor linkage starts (trigger condition: trash cleaner starts).

[0100] Based on the sorted running flow timing, the devices with standardized names are arranged in step order to form the first sequence. Specifically, taking time sequence as the only arrangement basis, the device name corresponding to each step is taken as an element of the sequence, and the sequence is written in the order of Step 1→ Step 2→…→ Step n. For example, the first sequence construction order of the "grating functional module" is: the standardized name of the device in Step 1 (coarse grating machine) "GG- (M01-01) -01", the standardized name of the device in Step 2 (fine grating machine) "GG- (M03-01) -02", the standardized name of the device in Step 3 (liquid level sensor) "LT- (M03-02) -01", the standardized name of the device in Step 4 (trash cleaner) "CQ- (M01-03) -01", and the standardized name of the device in Step 5 (belt conveyor) "PD- (M04-01) -01". The final first sequence is: [GG- (M01-01) -01, GG- (M03-01) -02, LT- (M03-02) -01, CQ- (M01-03) -01, PD- (M04-01) -01].

[0101] Step 5.2: Perform steps E1 to E2 for each entity.

[0102] Step E1: Split the functional module corresponding to the entity into multiple independent devices, and standardize the name of each device.

[0103] Refer to step D1 above.

[0104] Step E2: Arrange the names of the devices according to the running flow of each device in the valid information to establish the second sequence.

[0105] Refer to step D2 above.

[0106] Step 5.3: Obtain the cosine similarity and the longest common subsequence similarity between each first sequence and each second sequence.

[0107] Furthermore, the method for obtaining the cosine similarity between two sequences is as follows:

[0108] First, convert the two sequences into corresponding word frequency vectors. For example, convert the first sequence into a word frequency vector A=[1,1,1,0] and the second sequence into a word frequency vector B=[0,1,1,1].

[0109] Then, calculate the angle between the two word frequency vectors, and obtain the cosine pixel value = 2 / ( × =0.667.

[0110] Furthermore, the longest common subsequence (LCS) similarity is calculated by finding the longest continuous or non-continuous common subsequence between two sequences and then calculating the proportion of the common subsequence length. The higher the proportion, the higher the similarity. For example, if sequence A = [grit screen, grit chamber, aeration tank] and sequence B = [grit screen, aeration tank, secondary sedimentation tank], and the longest common subsequence is "grit screen → aeration tank" (length = 2), then the longest common subsequence similarity = 2 / max(3,3) = 0.667.

[0111] Step 5.4: Based on cosine similarity and longest common subsequence similarity, calculate the first similarity between the operation flow of each device in each functional module of the target wastewater treatment system and the operation flow of each device in the effective information of each entity.

[0112] First similarity = a ×Cosine similarity+ b ×Longest common subsequence similarity; a The weighting coefficients for cosine similarity are... b is the weighting coefficient for the longest common subsequence similarity.

[0113] Step 6: In the knowledge graph, add a first label to entities with a first similarity greater than the threshold.

[0114] The threshold is determined based on the actual working conditions; for example, the threshold can be set to 0.5.

[0115] Step 7: Extract all valid paths from the knowledge graph and add a second tag to each valid path.

[0116] The effective path mentioned in this step refers to a complete wastewater treatment process, and the effective path contains at least one entity with a first label.

[0117] The knowledge graph stores the modular digital twin model information of multiple sewage treatment plants, including a large number of functional modules (entities) and the association relationship between the modules (based on the sewage treatment process). The extraction of the effective path needs to meet the requirements of "corresponding to a complete sewage treatment process" and "containing at least one entity with a first label", and the core purpose is to filter out the path that covers the complete sewage treatment process and contains the matched adaptive module (entity with the first label) of the target system from the complex graph structure of the knowledge graph, exclude isolated modules or incomplete processes that have no reuse value, and reduce the calculation amount of subsequent process similarity comparison. Further, the second label is a special identifier for the effective path, which divides the paths in the knowledge graph into "effective candidate paths" and "invalid paths" through the second label, so that the subsequent step (similarity comparison between the target process and the effective path) only needs to focus on the path with the second label, avoiding redundant calculation of irrelevant paths and improving modeling efficiency.

[0118] Step 8: Perform similarity comparison between the sewage treatment process of the target sewage treatment system and each effective path with the second label to obtain a second similarity. It includes:

[0119] Step 8.1: Split the target sewage treatment system into multiple independent functional modules, and standardize the naming of each functional module.

[0120] Refer to step 2 above for splitting the functional modules, and refer to step D1 above for standardizing the naming of the functional modules.

[0121] Step 8.2: Arrange the name of each functional module of the target sewage treatment system according to the sewage treatment process to establish a third sequence.

[0122] Refer to step D2 above.

[0123] Step 8.3: Perform steps F1 to F2 for each effective path with the second label.

[0124] Step F1: Split the multiple entities on the effective path, and standardize the naming of each entity corresponding to the functional module.

[0125] Refer to step D1 above.

[0126] Step F2: Arrange the name of each functional module corresponding to the entity according to the effective path to establish a fourth sequence.

[0127] Refer to step D2 above.

[0128] Step 8.4: Obtain the cosine similarity and the longest common subsequence similarity between each third sequence and each fourth sequence.

[0129] Refer to step 5.3 above.

[0130] Step 8.5: Calculate the second similarity between the wastewater treatment process of the target wastewater treatment system and each valid path with the second label according to the cosine similarity and the longest common subsequence similarity.

[0131] Reference the above step 5.4.

[0132] This step of the second similarity comparison between the target process and the valid path is the core link of realizing "process-level optimal matching". The goal is to filter out the most suitable complete process template from the valid paths of the knowledge graph for the target system by quantitatively comparing the consistency of the overall process, and to provide accurate process-level reference for the final target model construction.

[0133] Further, by sorting the valid paths according to the second similarity value, the abstract "process similarity" is converted into a comparable numerical indicator, ensuring that the selected path is closest to the target system in terms of overall process logic and link correlation, avoiding path selection bias caused by subjective experience, and ensuring that the final selected valid path not only adapts to the target system in key modules (entities with the first label), but also highly consistent with the target system in terms of overall process link connection and parameter correlation (such as flow matching and timing linkage between links), thereby quickly constructing a logically complete and parameter-compatible target digital twin model by reusing the effective information (geometry, behavior, and interaction information) of all entities on the path, reducing modeling complexity and error risk.

[0134] Step 8.6: Select the path with the largest second similarity from all valid paths with the second label.

[0135] For example, Figure 2 The path indicated by the bold arrow in the figure represents the selected path with the largest second similarity.

[0136] It should be noted that the valid paths with the second label all meet the condition of "complete wastewater treatment process + containing first label entities (module-level adapted entities)", but different paths still have differences in overall process logic, link combination, and module correlation. The purpose of selecting the path with the largest second similarity is to accurately locate the path that is most consistent with the target system in terms of "overall process structure" (such as link order and link combination integrity) and "core module cooperation" (such as the association rules of entities with the first label) from the candidate set through the quantitative second similarity value (such as the path with the highest similarity), ensuring that the path can be directly used as a basic template for target model construction.

[0137] Further, the second most similar path is screened to ensure that the reused path not only adapts to the target system on the local module (with the first labeled entity), but also highly compatible with the target system on the whole process link connection and parameter transmission (such as the flow matching coefficient between links, timing linkage rules), avoiding running conflicts (such as link order error, parameter mismatch) caused by process logic differences after model construction, and ensuring the reliability of the target model.

[0138] Step 9: Establish a digital twin model of the target wastewater treatment system using the effective information of each entity on the screened effective path.

[0139] First, based on the second most similar effective path screened out, the unique identity of all entities (functional modules) on the effective path is extracted to form an entity sequence, ensuring that all links of the complete wastewater treatment process of the target system are covered.

[0140] Then, based on the mapping relationship of step A3, the correspondence between the entity sequence and the functional modules of the target system is checked to ensure that each target link is supported by an adaptive entity.

[0141] Next, the effective information of each entity is called from the knowledge graph, including: 1, geometric information - device three-dimensional size (such as reactor diameter, height), spatial coordinates, pipeline connection layout, etc. Parameterized data; 2, behavior information - device operating parameters (such as aeration device gas volume range, water pump head-flow curve), dynamic response characteristics (such as valve opening and closing time); 3, interaction information - signal transmission rules between devices within the module (such as "DO sensor → PLC → aeration device adjustment" logic), interface parameters with other modules (such as the matching relationship between effluent flow and subsequent module influent threshold); 4, operation process - device start-up sequence, cooperative operation steps (such as "gritter → cleaner → conveyor" linkage timing).

[0142] Finally, based on the effective information of the entity, the core module of the target model is constructed.

[0143] 1. Construct a geometric model. Based on the geometric information of the entity, restore the physical form of each functional module in the three-dimensional modeling platform (such as Unity, Blender). Including: (1) Build a three-dimensional model according to the device size parameters (such as the length × width × depth of the grit chamber); (2) According to the spatial coordinates and layout information, complete the position assembly of the devices within the module (such as the distribution density of the aeration device in the biochemical tank) and the pipeline connection between modules (such as the docking of the sedimentation tank effluent pipeline and the disinfection module inlet); (3) Unified model coordinate system and target wastewater treatment system actual plant coordinate system, ensure the spatial mapping accuracy.

[0144] 2. Constructing behavior model. Based on the entity's behavior information, construct the device dynamic operation model. Including: (1) Convert the device operation parameters into model callable algorithms (such as aeration device air volume regulation algorithm associated with DO value feedback); (2) Implant device start-stop logic, fault response rules (such as automatic shutdown protection when the water pump is overloaded), simulate the dynamic behavior characteristics of the device; (3) Associate the running process of the entity, trigger the device action in sequence (such as starting the corresponding module device in the order of "grating → grit → biochemical").

[0145] 3. Constructing interaction model. Based on the interaction information of the entity, establish the logical association within the module and between the modules. Including: (1) Intra-module interaction - connect device models through data interfaces (such as sensor model transmitting data to PLC model in real time, and PLC model sending instructions to actuator model); (2) Inter-module interaction - based on the association relationship parameters (such as flow matching coefficient, pressure loss value), establish the dynamic association between the output of the previous module and the input of the subsequent module (such as grit module water flow fluctuation triggering biochemical module aeration parameter adjustment).

[0146] Step 10: According to the actual working condition, correct the geometric information, behavior information, and interaction information of each device in the digital twin model of the target wastewater treatment system.

[0147] 1. Geometric information correction. If there is a difference between the target system device layout and the entity geometric information (such as the actual size of the sedimentation tank is different), fine-tune the model size parameters or layout position. Including:

[0148] (1) Three-dimensional model size calibration. On the one hand, compare the measured device size with the geometric information of the knowledge graph entity, if there is a deviation (such as the design reactor height is 5m, the actual height is 4.8m), adjust the model parameters in the three-dimensional modeling software, update the length, width, height and key structure size of the device. On the other hand, correct the pipe diameter, wall thickness, flange size and other details to ensure that the fluid simulation in the model (such as pipe resistance calculation) is consistent with the actual situation. (2) Space layout and position correction. On the one hand, based on the device coordinates measured on site, adjust the spatial position of the device in the model (such as the actual installation offset of the grid machine is 0.5m, correct the model coordinates). On the other hand, correct the pipe connection node position to ensure that the intersection and turning position of the virtual pipe is consistent with the actual layout on site, avoid errors in process simulation caused by geometric deviation (such as virtual pipe collision, water flow path not available).

[0149] 2. Behavior information correction. According to the actual operation data of the on-site device (such as the actual head of the water pump), optimize the behavior parameters in the model to improve the simulation accuracy. Including:

[0150] (1) Running parameter calibration. On the one hand, replace the theoretical parameters of the knowledge graph entity with the actual running parameters, for example: if the theoretical air volume range of the aerator is 50-200 m³ / h, and the actual running is stable at 60-180 m³ / h, the air volume adjustment range of the aerator in the model is corrected; if the actual head-flow curve of the sludge pump deviates from the design curve by 10%, update the pump performance curve parameters in the model. On the other hand, calibrate the dynamic response parameters of the equipment, such as the actual opening and closing time of the valve is 15 seconds (the theoretical value is 10 seconds), and the action timing parameters of the valve in the model are corrected.

[0151] (2) Performance degradation and constraint correction. On the one hand, for old equipment, correct the behavior model according to the actual performance degradation, such as correcting the actual wind pressure of the fan by 15% of the degradation rate to simulate its actual output. On the other hand, supplement the actual existing operation constraints, such as a water pump whose actual maximum flow is limited to 80 m³ / h due to pipeline resistance, add a flow upper limit constraint in the model.

[0152] 3. Interactive information correction. If there are special linkage rules in the target system (such as manual intervention processes), supplement them to the interaction model to ensure that the model is consistent with the actual operation logic. Including:

[0153] (1) Correction of device interaction rules within the module. Compare the actual control logic with the interaction information of the knowledge graph entity to correct the trigger conditions. For example: theoretically, "liquid level difference > 50 mm starts the cleaning machine", in actual operation, it is adjusted to "liquid level difference > 60 mm starts", update the control algorithm in the model; correct the signal transmission delay between devices (such as the actual delay of sensor data transmission to PLC is 2 seconds, correct the interaction timing in the model).

[0154] (2) Correction of inter-module association. On the one hand, based on the actual measured inter-module parameter association (such as the actual head loss from the sand trap to the biochemical tank is 0.3 m, not the theoretical 0.2 m), correct the hydraulic loss parameters between modules in the model. On the other hand, adjust the flow matching coefficient, such as the actual running water flow of the biochemical tank needs to be 90% of the sand trap water flow (the theoretical value is 95%), update the flow distribution rule between modules.

[0155] (3) Abnormal condition response correction. On the one hand, supplement the actual existing emergency interaction logic, such as the site "aerator failure automatically starts standby fan", add fault trigger conditions and standby device linkage rules in the model. On the other hand, correct the overload protection parameters (such as the actual overload current threshold of the water pump is 10 A, correct the protection trigger value in the model).

[0156] Embodiment 2: Corresponding to the method provided in Embodiment 1 above, the present embodiment provides a wastewater treatment plant modular digital twin modeling system, comprising:

[0157] A model collection module is configured to collect digital twin models of a plurality of sewage treatment plants.

[0158] A first information extraction module is configured to extract a sewage treatment process, a plurality of functional modules, and effective information of each functional module from each digital twin model; the effective information includes geometric information, behavior information, interaction information, and a running process of each device.

[0159] A knowledge graph construction module is configured to construct a knowledge graph taking the functional modules as entities, the sewage treatment process as a relationship, and the effective information as attributes.

[0160] A second information extraction module is configured to extract a sewage treatment process, a plurality of functional modules, and a running process of each device in each functional module from a target sewage treatment system.

[0161] A first similarity acquisition module is configured to compare the running process of each device in each functional module of the target sewage treatment system with the running process of each device in the effective information of each entity, to obtain a first similarity.

[0162] A first label adding module is configured to add a first label to an entity with a first similarity greater than a threshold in the knowledge graph.

[0163] An effective path extraction module is configured to extract all effective paths in the knowledge graph; one effective path corresponds to one complete sewage treatment process, and each effective path includes at least one entity with a first label.

[0164] A second label adding module is configured to add a second label to each effective path.

[0165] A second similarity acquisition module is configured to compare the sewage treatment process of the target sewage treatment system with each effective path with a second label, to obtain a second similarity.

[0166] An effective path screening module is configured to screen one effective path with a maximum second similarity from all effective paths with a second label.

[0167] A model construction module is configured to construct a digital twin model of the target sewage treatment system by using the effective information of each entity in the screened effective path.

[0168] Further, the knowledge graph construction module includes:

[0169] A first process splitting unit is configured to split the sewage treatment process into a plurality of independent sewage treatment links.

[0170] A first label adding unit is configured to add a functional attribute label to each sewage treatment link.

[0171] The first parameter adding unit is configured to add a correlation parameter for each functional attribute label;

[0172] The first relationship mapping unit is configured to establish a one-to-one mapping relationship between the sewage treatment link and the functional module extracted from the digital twin model;

[0173] The first data assignment unit is configured to assign the functional attribute label and the correlation parameter of the sewage treatment link to the corresponding functional module according to the mapping relationship;

[0174] The identity adding unit is configured to add a unique identity to the functional module;

[0175] The ternary array construction unit is configured to establish a ternary array with the unique identity as a data header and the functional attribute label and the correlation parameter as elements;

[0176] The ternary array storage unit is configured to store all ternary arrays uniformly to obtain a data set;

[0177] The data set traversal unit is configured to traverse the data set to establish a graph structure;

[0178] The data set traversal unit includes:

[0179] The data reading subunit is configured to read the correlation parameter in the current ternary array;

[0180] The data query subunit is configured to query each of the remaining ternary arrays, and in the query process, the correlation parameter in the current ternary array is used as a query condition;

[0181] The data analysis subunit is configured to determine whether the functional attribute label in the queried ternary array and the functional attribute label in the current ternary array have a correlation relationship, and if so, control the relationship creation subunit to work;

[0182] The relationship creation subunit is configured to establish an edge between the unique identity in the queried ternary array and the unique identity in the current ternary array;

[0183] The effective information association unit is configured to associate corresponding effective information for each node in the graph structure to obtain a knowledge graph.

[0184] Further, the first similarity obtaining module includes:

[0185] The first module splitting unit is configured to split the functional module into multiple independent devices, and standardize the naming of each device;

[0186] The first sequence establishing unit is configured to arrange the names of the devices according to the operation process of the devices in the functional module to establish a first sequence;

[0187] The second module splitting unit is configured to split the function modules corresponding to the entities into a plurality of independent devices, and to name each device in a standardized manner.

[0188] The second sequence establishing unit is configured to arrange the names of the devices according to the operation flow of each device in the valid information, and to establish a second sequence.

[0189] The similarity obtaining unit is configured to obtain the cosine similarity and the longest common subsequence similarity between each first sequence and each second sequence. a The first similarity is a weighted sum of the cosine similarity and the longest common subsequence similarity. b The first similarity is a weighted sum of the cosine similarity and the longest common subsequence similarity. a The cosine similarity is a weight coefficient. b The longest common subsequence similarity is a weight coefficient.

[0190] Further, the second similarity obtaining module includes:

[0191] The system splitting unit is configured to split the target sewage treatment system into a plurality of independent function modules, and to name each function module in a standardized manner.

[0192] The third sequence establishing unit is configured to arrange the names of each function module of the target sewage treatment system according to the sewage treatment flow, and to establish a third sequence.

[0193] The path splitting unit is configured to split a plurality of entities on the valid path, and to name the function modules corresponding to each split entity in a standardized manner.

[0194] The fourth sequence creating unit is configured to arrange the names of the function modules corresponding to the entities according to the valid path, and to establish a fourth sequence.

[0195] The similarity obtaining unit is configured to obtain the cosine similarity and the longest common subsequence similarity between each third sequence and each fourth sequence. a The second similarity is a weighted sum of the cosine similarity and the longest common subsequence similarity. b The second similarity is a weighted sum of the cosine similarity and the longest common subsequence similarity. a The cosine similarity is a weight coefficient. b The longest common subsequence similarity is a weight coefficient.

[0196] Further, the similarity obtaining unit includes:

[0197] The term frequency vector conversion subunit is configured to convert the two sequences into corresponding term frequency vectors, respectively.

[0198] The cosine vector calculation subunit is configured to obtain the vector angle between the two term frequency vectors.

[0199] Further, the system further comprises a model correction module configured to correct the geometric information, behavior information and interaction information of each device in the digital twin model of the target wastewater treatment system according to actual working conditions.

[0200] Embodiment 3: Based on the method provided in Embodiment 1 and the system provided in Embodiment 2, this embodiment provides a computer device for executing the method described in Embodiment 1 or any possible method related to the method described in Embodiment 1, which comprises a memory, a processor and a transceiver connected in sequence, wherein the memory is configured to store a computer program, the transceiver is configured to transceive messages, and the processor is configured to read the computer program and execute the method described in Embodiment 1 or any possible method related to the method described in Embodiment 1. Specifically, the memory can include, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a flash memory, a first-in first-out memory (FIFO) and / or a first-in last-out memory (FILO), etc.; and the processor can be, but is not limited to, a microprocessor of STM32F105 series. In addition, the computer device can further include, but is not limited to, a power module, a display screen and other necessary components.

[0201] The working process, working details and technical effects of the aforementioned computer device provided in this embodiment can be referred to the method described in Embodiment 1 or any possible method related to the method described in Embodiment 1, which will not be repeated here.

[0202] Embodiment 4: This embodiment provides a computer readable storage medium containing the method described in Embodiment 1 or any possible method related to the method described in Embodiment 1, i.e. the computer readable storage medium stores instructions, which, when executed on a computer, execute the method described in Embodiment 1 or any possible method related to the method described in Embodiment 1. The computer readable storage medium refers to a carrier storing data, which can include, but is not limited to, floppy disks, optical discs, hard disks, flash memories, USB flash drives and / or memory sticks, etc. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices.

[0203] The working process, working details and technical effects of the aforementioned computer readable storage medium provided in this embodiment can be referred to the method described in Embodiment 1 or any possible method related to the method described in Embodiment 1, which will not be repeated here.

[0204] Example 5: This example provides a computer program product containing instructions that, when executed on a computer, cause the computer to perform the method described in Example 1 or any method that may involve the method described in Example 1. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.

[0205] It should be understood that the terms "system," "device," "unit," and / or "module" as used in this specification are a method of distinguishing different components, elements, parts, sections, or assemblies at different levels. However, if other terms can achieve the same purpose, they may be replaced by other expressions.

[0206] As indicated in this specification and claims, unless the context clearly indicates otherwise, the words "a," "an," "an," and / or "the" do not specifically refer to the singular and may also include the plural. Generally speaking, the terms "comprising" and "including" only indicate the inclusion of expressly identified steps and elements, which do not constitute an exclusive list, and the method or apparatus may also include other steps or elements.

[0207] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

[0208] It should be noted that the structures, proportions, sizes, etc., illustrated in the accompanying drawings are merely for illustrative purposes to aid those skilled in the art and to facilitate understanding and reading. They are not intended to limit the scope of the invention and therefore have no substantial technical significance. Any modifications to the structure, changes in proportions, or adjustments to size, without affecting the effectiveness and objectives of the invention, should still fall within the scope of the technical content disclosed herein. Furthermore, terms such as "upper," "lower," "left," "right," and "middle" used in this specification are merely for clarity and not intended to limit the scope of the invention. Changes or adjustments to their relative relationships, without substantially altering the technical content, should also be considered within the scope of the invention.

Claims

1. A modular digital twin modeling method for wastewater treatment plants, characterized by, The method comprises the following steps: Collecting digital twin models of a plurality of sewage treatment plants; Extracting a sewage treatment process, a plurality of functional modules and effective information of each functional module from each digital twin model; The effective information comprises geometric information, behavior information, interaction information and operation process of each device; Constructing a knowledge graph taking the functional modules as entities, the sewage treatment process as a relationship and the effective information as attributes; Extracting a sewage treatment process, a plurality of functional modules and an operation process of each device in each functional module from a target sewage treatment system; Comparing the operation process of each device in each functional module of the target sewage treatment system with the operation process of each device in the effective information of each entity to obtain a first similarity; and adding a first label to an entity with a first similarity greater than a threshold in the knowledge graph; Extracting all effective paths in the knowledge graph and adding a second label to each effective path; each effective path corresponds to a complete sewage treatment process, and each effective path comprises at least one entity with the first label; Comparing the sewage treatment process of the target sewage treatment system with each effective path with the second label to obtain a second similarity; and selecting an effective path with the maximum second similarity from all effective paths with the second label; Establishing a digital twin model of the target sewage treatment system by using the effective information of each entity in the selected effective path; The method for constructing the knowledge graph comprises the following steps: Steps A1 to A4 are performed on each sewage treatment process extracted from the digital twin model; step A1: the sewage treatment process is divided into a plurality of independent sewage treatment links; step A2: a functional attribute label is added to each sewage treatment link, and an associated relationship parameter is added to each functional attribute label; step A3: a one-to-one mapping relationship is established between the sewage treatment link and the functional module extracted from the digital twin model; and step A4: the functional attribute label and the associated relationship parameter of the sewage treatment link are assigned to the corresponding functional module according to the mapping relationship; Steps B1 to B2 are performed on each functional module with the functional attribute label and the associated relationship parameter; step B1: a unique identity is added to the functional module; and step B2: a triple array is established, taking the unique identity as a data header and taking the functional attribute label and the associated relationship parameter as elements; All triple arrays are uniformly stored to obtain a data set; The data set is traversed to establish a graph structure; the traversal method comprises the following steps: steps C1 to C2 are performed when each triple array is accessed; step C1: the associated relationship parameter in the current triple array is read; and step C2: each remaining triple array is queried; in the query process, whether the queried triple array and the current triple array have an associated relationship is determined according to the functional attribute label and the associated relationship parameter in the current triple array, and if yes, an edge is established between the functional attribute label of the queried triple array and the functional attribute label of the current triple array; According to the unique identity, the effective information of each node in the graph structure is associated to obtain the knowledge graph.

2. The modular digital twin modeling method for a wastewater treatment plant of claim 1, wherein, The method for obtaining the first similarity comprises the following steps: Steps D1 to D2 are performed for each functional module of the target sewage treatment system; step D1: the functional module is split into multiple independent devices, and each device is standardizedly named; step D2: the names of the devices are arranged according to the running process of the devices in the functional module, and a first sequence is established; Steps E1 to E2 are performed for each entity; step E1: the functional module corresponding to the entity is split into multiple independent devices, and each device is standardizedly named; step E2: the names of the devices are arranged according to the running process of the devices in the effective information, and a second sequence is established; Cosine similarity and longest common subsequence similarity between each first sequence and each second sequence are obtained; the first similarity = a x cosine similarity + b x longest common subsequence similarity; a is a weight coefficient of the cosine similarity, b is a weight coefficient of the longest common subsequence similarity.

3. The modular digital twin modeling method for a wastewater treatment plant of claim 1, wherein, The method for obtaining the second similarity is: The target sewage treatment system is split into multiple independent functional modules, and each functional module is standardizedly named; the names of each functional module of the target sewage treatment system are arranged according to the sewage treatment process, and a third sequence is established; Steps F1 to F2 are performed for each effective path with the second label; Step F1: the multiple entities on the effective path are split, and the functional module corresponding to each split entity is standardizedly named; step F2: the names of the functional modules corresponding to the entities are arranged according to the effective path, and a fourth sequence is established; Cosine similarity and longest common subsequence similarity between each third sequence and each fourth sequence are obtained; the second similarity = a x cosine similarity + b x longest common subsequence similarity; a is a weight coefficient of the cosine similarity, b is a weight coefficient of the longest common subsequence similarity.

4. The modular digital twin modeling method of a wastewater treatment plant according to claim 2 or 3, characterized in that, The cosine similarity between two sequences is obtained by the following steps: The two sequences are respectively converted into corresponding term frequency vectors; The vector angle between the two term frequency vectors is obtained.

5. The modular digital twin modeling method of a wastewater treatment plant of claim 1, wherein, Further comprising the following steps: According to the actual working condition, the geometric information, behavior information and interaction information of each device in the digital twin model of the target sewage treatment system are corrected.

6. A modular digital twin modeling system for a wastewater treatment plant, characterized in that, It comprises: A model collection module is configured to collect digital twin models of multiple sewage treatment plants; A first information extraction module is configured to extract a sewage treatment process, multiple functional modules and effective information of each functional module from each digital twin model; The effective information includes geometric information, behavior information, interaction information and running process of each device; A knowledge graph construction module is configured to construct a knowledge graph taking functional modules as entities, a sewage treatment process as a relationship and effective information as attributes; A second information extraction module is configured to extract a sewage treatment process, multiple functional modules and running process of each device in each functional module from the target sewage treatment system; A first similarity obtaining module is configured to compare the running process of each device in each functional module of the target sewage treatment system with the running process of each device in the effective information of each entity, and obtain a first similarity; A first label adding module is configured to add a first label to an entity with a first similarity greater than a threshold in the knowledge graph; An effective path extraction module is configured to extract all effective paths in the knowledge graph; one effective path corresponds to one complete sewage treatment process, and each effective path contains at least one entity with a first label; A second label adding module is configured to add a second label to each effective path. The second similarity obtaining module is configured to compare the sewage treatment process of the target sewage treatment system with each valid path having the second label for similarity, and obtain a second similarity; The valid path screening module is configured to screen one valid path having the maximum second similarity from all valid paths having the second label; The model creating module is configured to establish a digital twin model of the target sewage treatment system by using the valid information of each entity in the screened valid path; The knowledge graph creating module comprises: The first process splitting unit is configured to split the sewage treatment process into a plurality of independent sewage treatment links; The first label adding unit is configured to add a functional attribute label to each sewage treatment link; The first parameter adding unit is configured to add an association relationship parameter to each functional attribute label; The first relationship mapping unit is configured to establish a one-to-one mapping relationship between the sewage treatment link and the functional module extracted from the digital twin model; The first data assignment unit is configured to assign the functional attribute label and the association relationship parameter of the sewage treatment link to the corresponding functional module according to the mapping relationship; The identity adding unit is configured to add a unique identity to the functional module; The triple array constructing unit is configured to establish a triple array with the unique identity as a data header and the functional attribute label and the association relationship parameter as elements; The triple array storing unit is configured to store all the triple arrays uniformly to obtain a data set; The data set traversing unit is configured to traverse the data set to establish a graph structure; The data set traversing unit comprises: The data reading subunit is configured to read the association relationship parameter in the current triple array; The data querying subunit is configured to query each of the remaining triple arrays, and the querying process is based on the functional attribute label and the association relationship parameter in the current triple array; The data analyzing subunit is configured to determine whether the queried triple array and the current triple array have an association relationship, and if so, control the relationship creating subunit to work; The relationship creating subunit is configured to establish an edge between the functional attribute label of the queried triple array and the functional attribute label of the current triple array; The valid information associating unit is configured to associate the corresponding valid information to each node in the graph structure to obtain a knowledge graph.

7. A modular digital twin modeling system for a wastewater treatment plant according to claim 6, wherein, The first similarity obtaining module comprises: The first module splitting unit is configured to split the functional module into a plurality of independent devices, and standardize the naming of each device; The first sequence establishing unit is configured to arrange the names of the devices according to the operation process of the devices in the functional module, and establish a first sequence; The second module splitting unit is configured to split the functional module corresponding to the entity into a plurality of independent devices, and standardize the naming of each device; The second sequence establishing unit is configured to arrange the names of the devices according to the operation process of the devices in the valid information, and establish a second sequence; a similarity obtaining unit, configured to obtain a cosine similarity and a longest common subsequence similarity between each first sequence and each second sequence; a × cosine similarity b × longest common subsequence similarity; a is a weight coefficient of the cosine similarity, b is a weight coefficient of the longest common subsequence similarity.

8. The modular digital twin modeling system for a wastewater treatment plant of claim 6, wherein, The second similarity obtaining module comprises: The system splitting unit is configured to split the target sewage treatment system into a plurality of independent functional modules, and standardize the naming of each functional module; The third sequence establishing unit is configured to arrange the names of each functional module of the target sewage treatment system according to the sewage treatment process, and establish a third sequence; The path splitting unit is configured to split a plurality of entities on the effective path, and to perform standardized naming on a function module corresponding to each of the split entities; The fourth sequence creating unit is configured to arrange the names of the function modules corresponding to the entities according to the effective path, and to establish a fourth sequence; a similarity obtaining unit, configured to obtain a cosine similarity and a longest common subsequence similarity between each third sequence and each fourth sequence; a x the cosine similarity b x the longest common subsequence similarity; a is a weight coefficient of the cosine similarity, b is a weight coefficient of the longest common subsequence similarity.

9. A modular digital twin modelling system for a wastewater treatment plant according to claim 7 or 8, wherein, The similarity obtaining unit comprises: The word frequency vector conversion subunit is configured to convert the two sequences into corresponding word frequency vectors respectively; The cosine vector calculation subunit is configured to obtain a vector included angle between the two word frequency vectors.

10. The modular digital twin modeling system for a wastewater treatment plant of claim 6, wherein, Further comprising: The model correction module is configured to correct the geometric information, behavior information and interaction information of each device in the digital twin model of the target sewage treatment system according to an actual working condition.

11. A computer device, comprising: The computer readable storage medium has instructions stored thereon, and when the instructions are executed on the computer, the method of claim 1-5 is executed.

12. A computer-readable storage medium, characterized in that, The computer readable storage medium has instructions stored thereon, and when the instructions are executed on the computer, the method of claim 1-5 is executed.

13. A computer program product comprising instructions, characterized in that, When the instructions are executed on the computer, the computer executes the method of claim 1-5. The computer comprises a general-purpose computer, a special-purpose computer or a programmable device.

Citation Information

Patent Citations

  • Software UML class graph similarity calculation method based on knowledge graph

    CN116204685A

  • Three-dimensional process digitization method and system based on knowledge graph

    CN118863048A