Logic relation graph generation method and device, equipment and medium
By establishing multiple relationship diagram templates and setting usage conditions, and matching the target template to generate logical relationship diagrams according to project requirements, the problem of insufficient adaptability and readability caused by different numbers of device instances in existing technologies is solved, and the logical relationship diagrams of projects of different sizes are adapted and clearly displayed.
Patent Information
- Application Number
- CN202511095834.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-06
- Publication Date
- 2025-11-21
AI Technical Summary
The existing logical relationship diagram generation process cannot generate logical relationship diagrams with different expressions according to different numbers of device instances, resulting in insufficient adaptability and readability.
By creating multiple relationship diagram templates and setting the usage conditions for each template, the target relationship diagram template is matched based on the project's equipment type, number of instances, and requirement list, and a logical relationship diagram is instantiated and generated.
It enables the generation of highly adaptable and readable logical relationship diagrams based on different levels of the number of device instances, preserving the details of devices in small-scale projects, highlighting the system control logic of large-scale projects, and avoiding information overload.
Smart Images

Figure CN120997340A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, device, and medium for generating logical relationship diagrams. Background Technology
[0002] A logic diagram is a graphical representation that visually presents the logical relationships between multiple objects.
[0003] In the existing logical relationship diagram generation process, multiple relationship diagram templates are created in advance. Then, based on the data information delivered by the project, the equipment type of the project and the connection relationship between the equipment are determined, and the corresponding relationship diagram template is automatically matched.
[0004] When multiple projects deliver data with identical device types and connections, regardless of the number of device instances, these projects can only be matched to the same relationship diagram template for representation, resulting in significant limitations in the representation format. Summary of the Invention
[0005] This invention provides a method, apparatus, device, and medium for generating logical relationship diagrams, which can match relationship diagram templates according to the number of device instances in a project, thereby generating logical relationship diagrams with different expression forms when the number of device instances in a project is different, thus improving the adaptability and readability of logical relationship diagrams.
[0006] According to one aspect of the present invention, a method for generating a logic diagram is provided, comprising:
[0007] Create multiple relationship diagram templates and set the usage conditions for each template;
[0008] Based on the project's relationship diagram requirement list, the project's equipment types, the number of each equipment instance, and the usage conditions of each relationship diagram template, match the target relationship diagram template;
[0009] Instantiate the target relationship diagram template to generate the logical relationship diagram of the project.
[0010] Optionally, multiple relationship diagram templates can be created, and usage conditions for each template can be set, including:
[0011] Create multiple relationship diagram templates, and generate relationship diagram template identifiers based on the base object type and relationship diagram type corresponding to the relationship diagram templates;
[0012] Add at least one device type to each baseline object in the relationship diagram template, and assign a number to each device type;
[0013] Set the usage conditions of the relationship diagram template based on the device type number and the device instance limit in the relationship diagram template.
[0014] Optionally, based on the device type IDs and device instance limit in the relationship diagram template, the usage conditions of the relationship diagram template can be set, including:
[0015] Determine the equipment type combination based on the equipment type numbers in the relationship diagram template;
[0016] Based on the combination of device types, the limit on the number of device instances, and the relation symbols, an instantiation formula is generated, and the instantiation formula is set as a condition for the use of the relation graph template.
[0017] Optionally, based on the project's relationship diagram requirement list, the equipment types in the project, the number of instances of each equipment, and the usage conditions of each relationship diagram template, a target relationship diagram template is matched, including:
[0018] Read the project's relationship diagram requirement list in sequence to determine the target baseline object type and target relationship diagram type for the logical relationship diagram to be generated;
[0019] The target baseline object type and target relationship diagram type are matched with the identifiers of each relationship diagram template. At the same time, the device type and the number of device instances in the project are matched with the usage conditions of each relationship diagram template. Based on the matching results, the target relationship diagram template is determined.
[0020] Optionally, the target baseline object type and target relationship diagram type are matched with the identifiers of each relationship diagram template, and the device types and the number of device instances in the project are matched with the usage conditions of each relationship diagram template. Based on the matching results, the target relationship diagram template is determined, including:
[0021] Identify the identifiers of each relationship diagram template and determine the relationship diagram template that simultaneously contains the target baseline object type and the target relationship diagram type as candidate templates;
[0022] Based on the corresponding IDs of each device type in the candidate templates and the number of each device instance, the candidate template that satisfies the instantiation formula is selected as the target relationship graph template.
[0023] Optionally, when at least two first relationship diagram templates have the same base object type and relationship diagram type, the expression forms of the first relationship diagram templates are different; the expression forms include pure device form and control group form.
[0024] Optionally, an instantiation formula is generated based on the combination of device types, the limit on the number of device instances, and the relational notation, including:
[0025] If the first relationship graph template is expressed in pure device form, then the instantiation formula is: the combination of device types is less than or equal to the limit value of the number of device instances;
[0026] If the first relationship diagram template is expressed in the form of a control group, then the instantiation formula is: the combination of device types is greater than the limit for the number of device instances.
[0027] According to another aspect of the present invention, an apparatus for generating a logic diagram is provided, comprising:
[0028] The relationship diagram template creation module is used to create multiple relationship diagram templates and set the usage conditions for each relationship diagram template;
[0029] The relationship diagram template matching module is used to match the target relationship diagram template based on the project's relationship diagram requirement list, the equipment type in the project, the number of each equipment instance, and the usage conditions of each relationship diagram template.
[0030] The instantiation module is used to instantiate the target relationship diagram template and generate the logical relationship diagram of the project.
[0031] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0032] At least one processor; and
[0033] A memory communicatively connected to the at least one processor; wherein,
[0034] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the logic diagram generation method according to any embodiment of the present invention.
[0035] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the method for generating a logic diagram according to any embodiment of the present invention.
[0036] The technical solution of this invention establishes multiple relationship diagram templates and sets usage conditions for each template. Based on the project's relationship diagram requirement list, the project's equipment types, the number of each equipment instance, and the usage conditions of each template, a target relationship diagram template is matched and instantiated to generate the project's logical relationship diagram. This method allows for matching relationship diagram templates according to the number of equipment instances in the project. Consequently, when the number of equipment instances in a project varies, different forms of logical relationship diagrams are generated. For small-scale projects, pure equipment representation preserves equipment details, facilitating maintenance personnel in locating the relationships between individual devices. For large-scale projects, control groups simplify the structure through aggregation, highlighting the overall system control logic, avoiding information overload, and improving the adaptability and readability of the logical relationship diagram.
[0037] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 This is a flowchart of a method for generating a logic diagram according to Embodiment 1 of the present invention;
[0040] Figure 2 This is a schematic diagram of a relationship diagram template provided according to an embodiment of the present invention;
[0041] Figure 3 This is a schematic diagram illustrating the setting of template usage conditions according to an embodiment of the present invention;
[0042] Figure 4 This is a flowchart of another method for generating a logic diagram according to Embodiment 2 of the present invention;
[0043] Figure 5 This is a schematic diagram of a logic diagram generation device according to Embodiment 3 of the present invention;
[0044] Figure 6 This is a schematic diagram of the structure of an electronic device that implements the logic diagram generation method of the embodiments of the present invention. Detailed Implementation
[0045] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0046] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0047] Example 1
[0048] Figure 1 This is a flowchart illustrating a method for generating a logical relationship diagram according to Embodiment 1 of the present invention. This embodiment is applicable to situations where a relationship diagram template matching the number of device instances in a project is selected, and a logical relationship diagram is generated. This method can be executed by a logical relationship diagram generation device, which can be implemented in hardware and / or software, and is generally configured in a computer or processor with image and data processing capabilities. Figure 1 As shown, the method includes:
[0049] S110. Create multiple relationship diagram templates and set the usage conditions for each relationship diagram template.
[0050] Optionally, a relationship diagram template can refer to a predefined, reusable logical relationship diagram framework, which includes a base object, a preset layout, legend rules, and related logic.
[0051] This includes creating multiple relationship diagram templates and setting the usage conditions for each template, which may include:
[0052] Create multiple relationship diagram templates, and generate relationship diagram template identifiers based on the base object type and relationship diagram type corresponding to the relationship diagram templates;
[0053] Add at least one device type to each baseline object in the relationship diagram template, and assign a number to each device type;
[0054] Set the usage conditions of the relationship diagram template based on the device type number and the device instance limit in the relationship diagram template.
[0055] Optionally, the baseline object type can be used to describe the core system object category defined in the relationship diagram template. It is the highest-level identifier for matching the template with the project and determines the applicable system scope of the template. For example, the baseline object type can be the entire central air conditioning cooling system. The relationship diagram type is a subclass under the baseline object type and can be used to describe the display dimension of the relationship diagram template to clarify the functional positioning of the logical relationship diagram. When the baseline object type can be the entire central air conditioning cooling system, the relationship diagram type can be the cooling overview diagram. This is only an example.
[0056] Optionally, the relationship diagram template identifier may include the base object type, relationship diagram type, relationship diagram representation format, and version number corresponding to the relationship diagram template.
[0057] Figure 2 This is a schematic diagram of an optional relationship diagram template. For example... Figure 2 As shown, the rectangles used to represent the water distributor, water collector, general air conditioning terminal, and air conditioning control zone can be regarded as a reference object in the relationship diagram template.
[0058] Optionally, the equipment type can refer to a specific equipment category under the base object type, and can be divided based on the equipment's function or model; the number assigned to each equipment type in the template can be used to simplify the combination logic and quantity calculation of equipment types, and the number can be a combination of letters and numbers.
[0059] Figure 3 This is a diagram illustrating the settings for one of the optional template usage conditions. For example... Figure 3 As shown, the dictionary content set under each base object is the added device type, and the corresponding number after the dictionary, such as a2 and b2, is the device type number.
[0060] Optionally, the device instance quantity limit can refer to the threshold of the number of device instances applicable to the relationship diagram template, which is used to distinguish the project size. Projects of different sizes can correspond to different types of relationship diagram templates.
[0061] When at least two first relationship diagram templates have the same base object type and relationship diagram type, the expression forms of the first relationship diagram templates are different; the expression forms include pure device form and control group form.
[0062] Understandably, when the project's equipment type and connection relationships are the same but the number of instances varies greatly, a fixed representation format can lead to the following: if a small-scale project is represented using a control group format, the diagram will be overly simplified and lose equipment details; if a large-scale project is represented using a pure equipment format, the equipment nodes will be dense and the connections will be messy, making it impossible to clearly show the core logic.
[0063] Optionally, the first relationship diagram template can refer to any template where the base object type and the relationship diagram type are the same. When the base object type and the relationship diagram type are the same, it can represent that the device types and device connection relationships covered in the relationship diagram template are consistent. However, projects of different sizes can be expressed through different forms of relationship diagram templates. Therefore, different expression forms can be set for the first relationship diagram template.
[0064] Optionally, the pure equipment format uses independent physical equipment as the display unit. The template directly presents specific equipment instances and shows the direct relationships between the equipment. It is suitable for projects with a small number of equipment instances and can clearly show the details and relationships of individual equipment. The control group format uses aggregated control units as the display unit. The template integrates multiple functionally related pure equipment into control groups, such as chilled water pump control groups, cooling tower control groups, and thermal storage tank control groups, and shows the logical relationships between control groups. It is suitable for projects with a large number of equipment instances and simplifies the graphic structure through aggregation.
[0065] The advantages of this setup are: for small-scale projects, retaining equipment details through pure equipment means makes it easier for maintenance personnel to locate the relationships between individual devices; for large-scale projects, simplifying the structure through aggregation by using control groups highlights the overall system control logic and avoids information overload.
[0066] S120. Match the target relationship diagram template based on the project's relationship diagram requirement list, the equipment types in the project, the number of each equipment instance, and the usage conditions of each relationship diagram template.
[0067] This includes matching target relationship diagram templates based on the project's relationship diagram requirement list, the project's equipment types, the number of each equipment instance, and the usage conditions of each relationship diagram template. This can include:
[0068] Read the project's relationship diagram requirement list in sequence to determine the target baseline object type and target relationship diagram type for the logical relationship diagram to be generated;
[0069] The target baseline object type and target relationship diagram type are matched with the identifiers of each relationship diagram template. At the same time, the device type and the number of device instances in the project are matched with the usage conditions of each relationship diagram template. Based on the matching results, the target relationship diagram template is determined.
[0070] Optionally, the project's relationship diagram requirement list can refer to the project's specific requirements for logical relationship diagrams. The list can contain core information such as the relationship diagram type and base object type for multiple logical relationship diagrams. By sequentially reading the relationship diagram requirement list, the relationship diagram type and base object type corresponding to each logical relationship diagram can be obtained.
[0071] Optionally, the device types and the number of device instances in the project can be obtained from the project's data information.
[0072] Optionally, by reading the project's relationship diagram requirement list, the target baseline object type and target relationship diagram type can be determined. Then, based on the target baseline object type and target relationship diagram type, the identifiers of the relationship diagram templates are matched to filter out candidate templates for the target baseline object type and target relationship diagram type in the identifiers. For the candidate templates, the total number of device instances corresponding to each specified device type in the usage conditions is further calculated to see if it meets the template quantity limit. The template that meets the above requirements is taken as the target template.
[0073] S130. Instantiate the target relationship diagram template to generate the logical relationship diagram of the project.
[0074] Optionally, instantiating the target relationship diagram template can refer to replacing the abstract elements in the matched target relationship diagram template with specific equipment instances in the project, and supplementing details such as equipment attributes and connection relationships according to the template rules to finally generate a complete diagram. For example, if the base object in the relationship diagram template is a chilled water pump, after instantiation, it can be replaced with chilled water pump-LDK77-01. This is only an example.
[0075] The technical solution of this invention establishes multiple relationship diagram templates and sets usage conditions for each template. Based on the project's relationship diagram requirement list, the project's equipment types, the number of each equipment instance, and the usage conditions of each template, a target relationship diagram template is matched and instantiated to generate the project's logical relationship diagram. This method allows for matching relationship diagram templates according to the number of equipment instances in the project. Consequently, when the number of equipment instances in a project varies, different forms of logical relationship diagrams are generated. For small-scale projects, pure equipment representation preserves equipment details, facilitating maintenance personnel in locating the relationships between individual devices. For large-scale projects, control groups simplify the structure through aggregation, highlighting the overall system control logic, avoiding information overload, and improving the adaptability and readability of the logical relationship diagram.
[0076] Example 2
[0077] Figure 4 This is a flowchart illustrating a method for generating a logic diagram according to Embodiment 2 of the present invention. Based on the above embodiments, this embodiment specifically describes the method for generating a logic diagram. For example... Figure 4 As shown, the method includes:
[0078] S210. Create multiple relationship diagram templates and generate relationship diagram template identifiers based on the base object type and relationship diagram type corresponding to the relationship diagram template.
[0079] S220. Add at least one device type to each baseline object in the relationship diagram template and assign a number to each device type.
[0080] S230. Based on the device type number and device instance quantity limit in the relationship diagram template, set the usage conditions of the relationship diagram template.
[0081] The usage conditions for the relationship diagram template are set based on the device type numbers and the limit on the number of device instances in the template. These conditions may include:
[0082] Determine the equipment type combination based on the equipment type numbers in the relationship diagram template;
[0083] Based on the combination of device types, the limit on the number of device instances, and the relation symbols, an instantiation formula is generated, and the instantiation formula is set as a condition for the use of the relation graph template.
[0084] Optionally, the device type combination expression is an expression formed based on the device type number, representing the sum of the specified device types in the relationship diagram template, used to count the total number of device instances covered by the specified device type; the relationship symbol can be a symbol used to represent the quantitative relationship between the device type combination expression and the limit value, and can include symbols such as less than or equal to, greater than, etc.
[0085] Optionally, the instantiation formula is an expression composed of a combination of device types, relational symbols, and a limit on the number of device instances. It serves as a quantitative criterion for determining the conditions for template use.
[0086] The instantiation formula, generated based on the combination of device types, the limit on the number of device instances, and the relational symbols, may include:
[0087] If the first relationship graph template is expressed in pure device form, then the instantiation formula is: the combination of device types is less than or equal to the limit value of the number of device instances;
[0088] If the first relationship diagram template is expressed in the form of a control group, then the instantiation formula is: the combination of device types is greater than the limit for the number of device instances.
[0089] by Figure 3 For example, it can be based on Figure 3Set the device type combination formula to a2+b2+c2+d2+e3 and the device instance count limit to 8. Then, the pure device template formula is a2+b2+c2+d2+e3≤8, and the control group template formula is a2+b2+c2+d2+e3>8. That is, if two different first relationship diagram templates are matched simultaneously based on the project's baseline object type and relationship diagram type, when the total number of device instances numbered a2, b2, c2, d2, and e3 in the project is less than or equal to 8, the pure device first relationship diagram template is selected; when the total number of device instances numbered a2, b2, c2, d2, and e3 in the project is greater than 8, the control group first relationship diagram template is selected.
[0090] S240. Read the project's relationship diagram requirement list in sequence to determine the target baseline object type and target relationship diagram type of the logical relationship diagram to be generated.
[0091] S250. Match the target baseline object type and target relationship diagram type with the identifiers of each relationship diagram template, and at the same time match the device type and the number of device instances in the project with the usage conditions of each relationship diagram template. Based on the matching results, determine the target relationship diagram template.
[0092] This involves matching the target baseline object type and target relationship diagram type with the identifiers of each relationship diagram template, and simultaneously matching the device type and the number of device instances in the project with the usage conditions of each relationship diagram template. Based on the matching results, the target relationship diagram template is determined, which may include:
[0093] Identify the identifiers of each relationship diagram template and determine the relationship diagram template that simultaneously contains the target baseline object type and the target relationship diagram type as candidate templates;
[0094] Based on the corresponding IDs of each device type in the candidate templates and the number of each device instance, the candidate template that satisfies the instantiation formula is selected as the target relationship graph template.
[0095] Optionally, a candidate template can refer to a relationship diagram template that contains both the target baseline object type and the target relationship diagram type after matching through template identifiers. The candidate templates have different expressions for devices, thereby distinguishing the expression forms of large-scale projects and small-scale projects.
[0096] Optionally, based on the device type combination formula in the instantiation formula of the candidate template, the target project type is determined, and then the total number of device instances of each target project type is determined in the project. It is then determined whether the total number of device instances satisfies the size relationship specified in the candidate template with the device instance quantity limit value, and the target candidate template that satisfies the size relationship is determined as the target relationship graph template.
[0097] S260. Instantiate the target relationship diagram template to generate the logical relationship diagram of the project.
[0098] Optionally, after instantiating the target relationship diagram template, if the target relationship diagram template is expressed in a pure device form, then the illustration in the logical project relationship diagram is a device image; if the target relationship diagram template is expressed in a control group form, then the illustration in the logical project relationship diagram is a control group image.
[0099] The technical solution of this invention establishes multiple relationship diagram templates and sets usage conditions for each template. Based on the project's relationship diagram requirement list, the project's equipment types, the number of each equipment instance, and the usage conditions of each template, a target relationship diagram template is matched and instantiated to generate the project's logical relationship diagram. This method allows for matching relationship diagram templates according to the number of equipment instances in the project. Consequently, when the number of equipment instances in a project varies, different forms of logical relationship diagrams are generated. For small-scale projects, pure equipment representation preserves equipment details, facilitating maintenance personnel in locating the relationships between individual devices. For large-scale projects, control groups simplify the structure through aggregation, highlighting the overall system control logic, avoiding information overload, and improving the adaptability and readability of the logical relationship diagram.
[0100] Example 3
[0101] Figure 5 This is a schematic diagram of a logic diagram generation device provided in Embodiment 3 of the present invention. Figure 5 As shown, the device includes: a relationship graph template creation module 310, a relationship graph template matching module 320, and an instantiation module 330.
[0102] The relationship diagram template creation module 310 is used to create multiple relationship diagram templates and set the usage conditions for each relationship diagram template.
[0103] The relationship diagram template matching module 320 is used to match the target relationship diagram template based on the project's relationship diagram requirement list, the equipment type in the project, the number of each equipment instance, and the usage conditions of each relationship diagram template.
[0104] Instantiation module 330 is used to instantiate the target relationship diagram template and generate the logical relationship diagram of the project.
[0105] The technical solution of this invention establishes multiple relationship diagram templates and sets usage conditions for each template. Based on the project's relationship diagram requirement list, the project's equipment types, the number of each equipment instance, and the usage conditions of each template, a target relationship diagram template is matched and instantiated to generate the project's logical relationship diagram. This method allows for matching relationship diagram templates according to the number of equipment instances in the project. Consequently, when the number of equipment instances in a project varies, different forms of logical relationship diagrams are generated. For small-scale projects, pure equipment representation preserves equipment details, facilitating maintenance personnel in locating the relationships between individual devices. For large-scale projects, control groups simplify the structure through aggregation, highlighting the overall system control logic, avoiding information overload, and improving the adaptability and readability of the logical relationship diagram.
[0106] Based on the above embodiments, the relationship diagram template creation module 310 may include:
[0107] The identifier generation unit is used to create multiple relationship diagram templates and generate relationship diagram template identifiers based on the base object type and relationship diagram type corresponding to the relationship diagram template.
[0108] The device type configuration unit is used to add at least one device type to each baseline object in the relationship diagram template and assign a number to each device type.
[0109] The usage condition setting unit is used to set the usage conditions of the relationship diagram template based on the device type number and the device instance quantity limit in the relationship diagram template.
[0110] Based on the above embodiments, the condition setting unit can be specifically used for:
[0111] Determine the equipment type combination based on the equipment type numbers in the relationship diagram template;
[0112] Based on the combination of device types, the limit on the number of device instances, and the relation symbols, an instantiation formula is generated, and the instantiation formula is set as a condition for the use of the relation graph template.
[0113] Based on the above embodiments, the relationship graph template matching module 320 may include:
[0114] The relational diagram type information acquisition unit is used to read the project's relational diagram requirement list in sequence and determine the target baseline object type and target relational diagram type of the logical relational diagram to be generated.
[0115] The target relationship diagram template matching unit is used to match the target baseline object type and the target relationship diagram type with the identifiers of each relationship diagram template, and at the same time match the device type and the number of device instances in the project with the usage conditions of each relationship diagram template. Based on the matching results, the target relationship diagram template is determined.
[0116] Based on the above embodiments, the target relationship graph template matching unit can be specifically used for:
[0117] Identify the identifiers of each relationship diagram template and determine the relationship diagram template that simultaneously contains the target baseline object type and the target relationship diagram type as candidate templates;
[0118] Based on the corresponding IDs of each device type in the candidate templates and the number of each device instance, the candidate template that satisfies the instantiation formula is selected as the target relationship graph template.
[0119] Based on the above embodiments, when at least two first relationship diagram templates have the same base object type and relationship diagram type, the expression forms of the first relationship diagram templates are different; wherein, the expression forms include pure device form and control group form.
[0120] Based on the above embodiments, the condition setting unit can be further specifically used for:
[0121] If the first relationship graph template is expressed in pure device form, then the instantiation formula is: the combination of device types is less than or equal to the limit value of the number of device instances;
[0122] If the first relationship diagram template is expressed in the form of a control group, then the instantiation formula is: the combination of device types is greater than the limit for the number of device instances.
[0123] The logic diagram generation apparatus provided in this embodiment of the invention can execute the logic diagram generation method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0124] Example 4
[0125] Figure 6A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0126] like Figure 6 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0127] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0128] Processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, central processing unit (CPU), graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the method for generating logic diagrams as described in embodiments of the present invention. That is:
[0129] Create multiple relationship diagram templates and set the usage conditions for each template;
[0130] Based on the project's relationship diagram requirement list, the project's equipment types, the number of each equipment instance, and the usage conditions of each relationship diagram template, match the target relationship diagram template;
[0131] Instantiate the target relationship diagram template to generate the logical relationship diagram of the project.
[0132] In some embodiments, the method for generating the logic diagram may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the logic diagram generation method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the logic diagram generation method by any other suitable means (e.g., by means of firmware).
[0133] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0134] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0135] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0136] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0137] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0138] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0139] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0140] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for generating a logical relationship diagram, characterized in that, include: Create multiple relationship diagram templates and set the usage conditions for each template; Based on the project's relationship diagram requirement list, the project's equipment types, the number of each equipment instance, and the usage conditions of each relationship diagram template, match the target relationship diagram template; Instantiate the target relationship diagram template to generate the logical relationship diagram of the project.
2. The method according to claim 1, characterized in that, Create multiple relationship diagram templates and set the usage conditions for each template, including: Create multiple relationship diagram templates, and generate relationship diagram template identifiers based on the base object type and relationship diagram type corresponding to the relationship diagram templates; Add at least one device type to each baseline object in the relationship diagram template, and assign a number to each device type; Set the usage conditions of the relationship diagram template based on the device type number and the device instance limit in the relationship diagram template.
3. The method according to claim 2, characterized in that, Based on the device type IDs and device instance limit in the relationship diagram template, set the usage conditions for the relationship diagram template, including: Determine the equipment type combination based on the equipment type numbers in the relationship diagram template; Based on the combination of device types, the limit on the number of device instances, and the relation symbols, an instantiation formula is generated, and the instantiation formula is set as a condition for the use of the relation graph template.
4. The method according to claim 1, characterized in that, Based on the project's relationship diagram requirement list, the equipment types in the project, the number of instances of each equipment, and the usage conditions of each relationship diagram template, match the target relationship diagram template, including: Read the project's relationship diagram requirement list in sequence to determine the target baseline object type and target relationship diagram type for the logical relationship diagram to be generated; The target baseline object type and target relationship diagram type are matched with the identifiers of each relationship diagram template. At the same time, the device type and the number of device instances in the project are matched with the usage conditions of each relationship diagram template. Based on the matching results, the target relationship diagram template is determined.
5. The method according to claim 4, characterized in that, The target baseline object type and target relationship diagram type are matched with the identifiers of each relationship diagram template. Simultaneously, the device types and the number of device instances in the project are matched with the usage conditions of each relationship diagram template. Based on the matching results, the target relationship diagram template is determined, including: Identify the identifiers of each relationship diagram template and determine the relationship diagram template that simultaneously contains the target baseline object type and the target relationship diagram type as candidate templates; Based on the corresponding IDs of each device type in the candidate templates and the number of each device instance, the candidate template that satisfies the instantiation formula is selected as the target relationship graph template.
6. The method according to claim 3, characterized in that, When there are at least two first relationship diagram templates with the same base object type and relationship diagram type, the expression forms of the first relationship diagram templates are different; among them, the expression forms include pure device form and control group form.
7. The method according to claim 6, characterized in that, Based on the combination of device types, the limit on the number of device instances, and the relational symbols, an instantiation formula is generated, including: If the first relationship graph template is expressed in pure device form, then the instantiation formula is: the combination of device types is less than or equal to the limit value of the number of device instances; If the first relationship diagram template is expressed in the form of a control group, then the instantiation formula is: the combination of device types is greater than the limit for the number of device instances.
8. A device for generating a logic diagram, characterized in that, include: The relationship diagram template creation module is used to create multiple relationship diagram templates and set the usage conditions for each relationship diagram template; The relationship diagram template matching module is used to match the target relationship diagram template based on the project's relationship diagram requirement list, the project's equipment types, the number of each equipment instance, and the usage conditions of each relationship diagram template. The instantiation module is used to instantiate the target relationship diagram template and generate the logical relationship diagram of the project.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the method for generating the logic diagram according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the method for generating the logical relationship diagram according to any one of claims 1-7.