Component automatic numbering method and device, equipment, storage medium and product
By automatically generating serial numbers for substation equipment components, the problems of time-consuming and error-prone traditional serial numbering have been solved, achieving standardization and efficiency improvement in component management.
Patent Information
- Application Number
- CN202511259830.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-04
- Publication Date
- 2026-01-23
AI Technical Summary
Traditional substation equipment component numbering is time-consuming, has a high error rate, and suffers from a chaotic management structure, resulting in low component management efficiency and difficulty in achieving standardized management.
By determining the desired spatial coordinates and type of the target component, a preset mapping relationship is queried to generate an identification code. Combined with coordinate analysis, horizontal and vertical coordinate identification codes are generated, a component number is automatically generated, and the association between the number and the installation location is established.
The system automates and standardizes component numbering, improves the efficiency of component management, reduces human error, and ensures the accuracy of component positioning.
Smart Images

Figure CN121391284A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of digital modeling technology for power systems, and in particular to a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for automatic component numbering. Background Technology
[0002] In the current process of modeling substation equipment, it is generally necessary to number a large number of components (used to make up the equipment) in order to manage the components more effectively and thus ensure the orderly progress of the modeling work.
[0003] In traditional techniques, a large number of components are usually manually numbered, but this may have the following problems: 1. Time-consuming: Large substations usually contain thousands of components to model the equipment in the substation, and manual numbering can take tens of hours; 2. High error rate: It is easy to have problems such as duplicate numbering and inconsistent numbering rules due to human error; 3. Chaotic management structure: There is no correlation between the component number and the installation location, which makes it difficult to locate the component in the later operation and maintenance.
[0004] Therefore, the traditional method of numbering components has shortcomings in terms of timeliness, accuracy, and structure, which is not conducive to achieving standardized component management and reduces the efficiency of using components for modeling. Summary of the Invention
[0005] Therefore, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium, and computer program product for automatically numbering components that can achieve standardized component management and improve the efficiency of component modeling, in order to address the above-mentioned technical problems.
[0006] Firstly, this application provides a method for automatically numbering components, including:
[0007] The target component is determined from multiple components, and the desired spatial coordinates of the target component in the modeling space, the target component type of the target component, and the target device type of the target device created from the target component are determined.
[0008] By querying the preset mapping relationship, the first identifier code corresponding to the target device type and the second identifier code corresponding to the target component type are determined;
[0009] Generate horizontal coordinate identifiers and vertical coordinate identifiers based on the desired spatial coordinates;
[0010] Combine the first identifier, the second identifier, the horizontal coordinate identifier, and the vertical coordinate identifier to generate the number of the target component.
[0011] In one embodiment, determining the first identifier code corresponding to the target device type and the second identifier code corresponding to the target component type by querying a preset mapping relationship includes:
[0012] Obtain the first mapping relationship between device type and prefix identification code, and the second mapping relationship between component type and prefix identification code;
[0013] Based on the target equipment type and the first mapping relationship, a first identification code is determined, and based on the target component type and the second mapping relationship, a second identification code is determined.
[0014] In one embodiment, generating a horizontal coordinate identifier code and a vertical coordinate identifier code based on the desired spatial coordinates includes:
[0015] Perform coordinate analysis on the desired spatial coordinates to determine the desired horizontal and vertical coordinates;
[0016] Based on the desired horizontal coordinates, determine the region identifier of the desired area in the modeling space where the target component is located;
[0017] Based on the desired vertical coordinates, determine the hierarchical identifier of the target component in the modeling space at the desired level;
[0018] If there is no equivalent component whose desired region and desired level are the same as the target component, generate a horizontal coordinate identifier code based on the region identifier and a vertical coordinate identifier code based on the level identifier.
[0019] In one embodiment, the automatic component numbering method further includes:
[0020] If there exists an equivalent component that is in the same desired region and desired level as the target component, sort the target component and the equivalent components to obtain the sorting result;
[0021] Based on the sorting results, assign serial numbers to the target component and its equivalent components respectively;
[0022] Based on the region identifier and sequence number corresponding to the target component, generate the horizontal coordinate identifier code of the target component, and based on the level identifier and sequence number corresponding to the target component, generate the vertical coordinate identifier code of the target component.
[0023] In one embodiment, the automatic component numbering method further includes:
[0024] Collect the individual numbers of multiple components;
[0025] The individual component numbers are hierarchically segmented to determine the hierarchical paths of each component.
[0026] Establish a hierarchical component tree based on the hierarchical paths of multiple components.
[0027] In one embodiment, the automatic component numbering method further includes:
[0028] Receive editing instructions triggered for a hierarchical component tree; the editing instructions are used to indicate: edit the hierarchical path associated with the first component, the first component belongs to the first component type, and is used to create a first device belonging to the first device type, the first component corresponds to the first spatial coordinates in the modeling space;
[0029] Based on the first equipment type, the first component type, and the first spatial coordinates, locate and display the first-level path of the first component in the hierarchical component tree;
[0030] Based on the edit operation performed on the first-level path, the first-level path is deleted, and the first updated level path is generated in the hierarchical component tree.
[0031] Secondly, this application also provides an automatic component numbering device, comprising:
[0032] The target component determination module is used to determine the target component from multiple components, and to determine the target component's expected spatial coordinates in the modeling space, the target component type of the target component, and the target device type of the target device created from the target component;
[0033] The prefix identification code determination module is used to determine the first identification code corresponding to the target device type and the second identification code corresponding to the target component type by querying a preset mapping relationship;
[0034] The coordinate identification code determination module is used to generate horizontal coordinate identification codes and vertical coordinate identification codes based on the desired spatial coordinates.
[0035] The numbering generation module is used to combine the first identifier code, the second identifier code, the horizontal coordinate identifier code, and the vertical coordinate identifier code to generate the number of the target component.
[0036] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-mentioned automatic component numbering method.
[0037] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described automatic component numbering method.
[0038] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described automatic component numbering method.
[0039] The aforementioned automatic component numbering method, apparatus, computer equipment, computer-readable storage medium, and computer program product first identify the target component from multiple components, and determine the target component's expected spatial coordinates in the modeling space, the target component type, and the target device type of the target device created from the target component. Further, by querying a preset mapping relationship and based on a unified numbering rule, a first identifier code corresponding to the target device type and a second identifier code corresponding to the target component type are determined. Even further, based on the expected spatial coordinates, horizontal and vertical coordinate identifier codes are generated, establishing a correlation between the target component's number and its installation location (expected spatial coordinates), avoiding difficulties in later maintenance and component location. Finally, the target component's number is generated by combining the first identifier code, the second identifier code, the horizontal coordinate identifier code, and the vertical coordinate identifier code. Using this method, manual numbering is unnecessary; the first and second identifier codes are automatically determined according to a unified rule (preset mapping relationship) through a preset mapping relationship, and the target component's number is automatically generated by associating the target component's number with its installation location. Based on this, standardized component management can be achieved through automatically generated numbers, thereby improving the efficiency of component modeling. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 This is a diagram illustrating the application environment of the automatic component numbering method in one embodiment;
[0042] Figure 2 This is a flowchart illustrating an automatic component numbering method in one embodiment;
[0043] Figure 3 This is a flowchart illustrating the automatic component numbering process based on a first mapping relationship and a second mapping relationship in one embodiment.
[0044] Figure 4 This is a flowchart illustrating the automatic component numbering method in another embodiment;
[0045] Figure 5 This is a flowchart illustrating the process of establishing a hierarchical component tree in one embodiment;
[0046] Figure 6 This is a flowchart illustrating the process of editing a hierarchical component tree in one embodiment;
[0047] Figure 7 This is a structural block diagram of an automatic component numbering device in one embodiment;
[0048] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0049] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0050] The automatic component numbering method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server. Users can trigger an automatic numbering command using terminal 102. Server 104 can receive and respond to the automatic numbering command, determine the target component from multiple components, and determine the target component's expected spatial coordinates in the modeling space, the target component type, and the target device type of the target device created from the target component. Furthermore, server 104 can determine the first identifier code corresponding to the target device type and the second identifier code corresponding to the target component type by querying a preset mapping relationship. It can also generate a horizontal coordinate identifier code and a vertical coordinate identifier code based on the expected spatial coordinates. Even further, server 104 can combine the first identifier code, the second identifier code, the horizontal coordinate identifier code, and the vertical coordinate identifier code to generate the target component's number. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and IoT devices. Server 104 can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services.
[0051] In one exemplary embodiment, such as Figure 2 As shown, an automatic component numbering method is provided, which can be applied to... Figure 1 Taking server 104 as an example, the explanation includes the following steps 202 to 208. Wherein:
[0052] Step 202: Determine the target component from multiple components, and determine the target component's expected spatial coordinates in the modeling space, the target component type of the target component, and the target device type of the target device created through the target component.
[0053] Spatial modeling involves using coordinate systems, geometric elements such as points, lines, and surfaces, combined with computer technology, to abstract, analyze, and visualize three-dimensional entities or phenomena. The modeling space is a simulated three-dimensional space created by a computer, configured with a spatial coordinate system (including X, Y, and Z axes). In practical applications, a simulation model of a substation can be created within this modeling space. Specifically, in the modeling space, various devices in the substation need to be created through modeling, and each device is created from at least one component. Component types can include: electric valves, non-electric valves, pipes, switches, wires, transformers, sensors, photovoltaic panels, distribution cabinets, control cabinets, etc. Equipment types can include: power generation equipment, cooling equipment, energy storage equipment, transmission equipment, compression equipment, thermal equipment, etc. The above component and equipment types are only examples; the component and equipment types involved in a substation include, but are not limited to, the above.
[0054] Optionally, to achieve automatic numbering, information on multiple components to be numbered can be pre-entered into the server. The server can then determine the target component from among these components. Furthermore, the server can determine the desired spatial coordinates of the target component in the modeling space, the target component type, and the target device type of the target device created from the target component from the entered information.
[0055] For example, the server can traverse the N components to be numbered in order of arrangement, determine the electric butterfly valve used to build the cooling equipment as the target component, and further determine the expected spatial coordinates (representing the planned placement position in the modeling space) of the target component as (x, y, z), the target component type of the target component is "electric valve", and the target equipment type of the target component is "cooling equipment".
[0056] Step 204: By querying the preset mapping relationship, determine the first identifier code corresponding to the target device type and the second identifier code corresponding to the target component type.
[0057] The preset mapping relationships include: the mapping relationship between device type and identifier code, and the mapping relationship between component type and identifier code. These preset mapping relationships can be stored in the server as a mapping relationship table for easy querying.
[0058] Optionally, the server can use the target device type as an index and query a preset mapping relationship to determine the first identifier code corresponding to the target device type. At the same time, the server can also use the target component type as an index and query a preset mapping relationship to determine the second identifier code corresponding to the target component type.
[0059] For example, if the preset mapping relationship stores "electric valve → EBV" and "cooling equipment - CWS", the server can determine that the first identifier of the target component "electric butterfly valve" is "CWS" and the second identifier is "EBV".
[0060] It should be noted that if the first or second identifier is not found in the preset mapping relationship, the terminal will be prompted with the message "Identifier missing". The numbering process for the current target component will be temporarily skipped, and the next component will be traversed and used as the target component.
[0061] Step 206: Generate horizontal coordinate identifier code and vertical coordinate identifier code according to the desired spatial coordinates.
[0062] The expected spatial coordinates represent the planned placement of the target component in the modeling space. The expected spatial coordinates include the expected horizontal coordinates (composed of the X-axis and Y-axis coordinates of the target component) and the expected vertical coordinates (the Z-axis coordinate of the target component).
[0063] Optionally, the server can generate a horizontal coordinate identifier code based on the desired horizontal coordinate in the desired spatial coordinates, and can also generate a vertical coordinate identifier code based on the desired vertical coordinate in the desired spatial coordinates.
[0064] For example, taking the desired spatial coordinates of the target component as (121, 90, 60), the server can generate the horizontal coordinate identification code of the target component based on the desired horizontal axis coordinate (121, 90) and generate the vertical coordinate identification code of the target component based on the desired vertical coordinate (60).
[0065] Step 208: Combine the first identifier code, the second identifier code, the horizontal coordinate identifier code, and the vertical coordinate identifier code to generate the number of the target component.
[0066] Optionally, the server can use the first identifier as the first level, the second identifier as the second level, the horizontal coordinate identifier as the third level, and the vertical coordinate identifier as the fourth level. Then, according to the level order, the server can combine the first identifier, the second identifier, the horizontal coordinate identifier, and the vertical coordinate identifier to generate the target component's number "first identifier - second identifier - horizontal coordinate identifier - vertical coordinate identifier".
[0067] The aforementioned automatic component numbering method first identifies the target component from multiple components, determining its expected spatial coordinates in the modeling space, its target component type, and the target device type of the target device created from it. Further, by querying a preset mapping relationship and based on a unified numbering rule, it determines the first identifier code corresponding to the target device type and the second identifier code corresponding to the target component type. Even further, based on the expected spatial coordinates, it generates horizontal and vertical coordinate identifier codes, establishing a correlation between the target component's number and its installation location (expected spatial coordinates), avoiding difficulties in later maintenance and component location. Finally, by combining the first identifier code, second identifier code, horizontal coordinate identifier code, and vertical coordinate identifier code, the target component's number is generated. Using this method, manual numbering is unnecessary; the first and second identifier codes are automatically determined according to a unified rule (preset mapping relationship) through a preset mapping relationship, and the target component's number is automatically generated by associating it with its installation location. Based on this, standardized component management can be achieved through automatically generated numbers, thereby improving the efficiency of component modeling.
[0068] In one exemplary embodiment, in Figure 2 On the basis of, such as Figure 3 As shown, step 204 includes steps 302 to 304. Wherein:
[0069] Step 302: Obtain the first mapping relationship between device type and prefix identification code, and the second mapping relationship between component type and prefix identification code.
[0070] The first mapping relationship and the second mapping relationship can be stored in the server in the form of a mapping table. The first mapping relationship can be stored in a separate first sub-mapping table, and the second mapping relationship can be stored in a separate second sub-mapping table.
[0071] Optionally, the server can obtain a first mapping relationship between device type and prefix identifier from the first sub-mapping table, and a second mapping relationship between component type and prefix identifier from the second sub-mapping table.
[0072] For example, in the mapping table, the device type and identifier, and the component type and identifier can correspond one-to-one in the form of key-value pairs. The first mapping relationship is as follows: Key = Device type (string), Value = First identifier (string), and the second mapping relationship is as follows: Key = Component type (string), Value = Second identifier (string).
[0073] Step 304: Determine the first identification code based on the target device type and the first mapping relationship, and determine the second identification code based on the target component type and the second mapping relationship.
[0074] Optionally, the server can use the target device type as an index to query the first mapping relationship and determine the first identifier code corresponding to the target device type. Simultaneously, the server can also use the target component type as an index to query the second mapping relationship and determine the second identifier code corresponding to the target component type.
[0075] For example, the first mapping relationship may include the following mapping relationships: cooling equipment - CWS; power generation equipment - FDS; energy storage equipment - CNS; transmission equipment - CDS; compression equipment - YSS; thermal equipment - RLS. The second mapping relationship may include the following mapping relationships: electric valve - EBV; sensor - PS; transformer - CT.
[0076] It should be noted that the first mapping relationship and the second mapping relationship in this embodiment can be flexibly configured according to the needs of the actual application scenario, and are not limited to the above types.
[0077] In this embodiment, the generation rules for the first and second identifier codes of components can be standardized and unified according to the first and second mapping relationships. This facilitates the automatic generation of the first and second identifier codes according to unified rules (preset mapping relationships). Based on this, standardized component management can be achieved through automatically generated numbers, improving the efficiency of component modeling.
[0078] In one embodiment, Figure 2 On the basis of, such as Figure 4 As shown, step 206 includes steps 402 to 414. Wherein:
[0079] Step 402: Perform coordinate analysis on the desired spatial coordinates to determine the desired horizontal and vertical coordinates.
[0080] Optionally, the server can determine the X-axis and Y-axis coordinates of the target component planned for placement in the modeling space by performing coordinate analysis on the desired spatial coordinates, thus obtaining the desired lateral coordinates (composed of the X-axis and Y-axis coordinates of the target component). The server can also determine the Z-axis coordinate of the target component planned for placement in the modeling space by performing coordinate analysis on the desired spatial coordinates, thus obtaining the desired longitudinal coordinates (the Z-axis coordinates of the target component).
[0081] Step 404: Determine the region identifier of the target component in the desired area of the modeling space based on the desired horizontal coordinate.
[0082] Optionally, the server can pre-divide the horizontal plane of the modeling space into multiple grids according to the X and Y axes. Each grid region in the horizontal plane has a unique region identifier, and each grid region includes a portion of the X and Y coordinates. Based on this, the server can determine the desired region of the target component in the modeling space according to the desired lateral coordinates of the target component (composed of the target component's X and Y coordinates), and determine the region identifier of that desired region.
[0083] For example, taking the desired spatial coordinates of the target component as (120, 85, 16), the server can determine the desired area (area A5) of the target component in the horizontal direction of the modeling space based on the desired horizontal coordinates (120, 85) of the target component, and the corresponding area is identified as "A5".
[0084] Step 406: Determine the level identifier of the target component in the modeling space according to the desired vertical coordinate.
[0085] Optionally, the server can pre-divide the modeling space into multiple levels along the vertical direction perpendicular to the horizontal plane, based on the Z-axis. Each level region in the modeling space has a unique level identifier, and each level region includes a portion of the Z-axis coordinates. The server can determine the desired level of the target component in the modeling space based on the desired longitudinal coordinates (Z-axis coordinates of the target component) and determine the level identifier of that desired level.
[0086] For example, taking the expected spatial coordinates of the target component as (120, 85, 16), the server can determine that the target component is in the expected level (level B1) based on the expected vertical coordinate (16) of the target component, and the corresponding level identifier is "B1".
[0087] If there is no equivalent component whose desired region and desired level are the same as the target component, proceed to step 408 to generate a horizontal coordinate identifier code based on the region identifier and a vertical coordinate identifier code based on the level identifier.
[0088] Optionally, if there is no equivalent component to the target component, the server can directly use the region identifier of the target component as the horizontal coordinate identifier and the level identifier of the target component as the vertical coordinate identifier.
[0089] If there is an equivalent component that is in the same desired region and desired level as the target component, in order to distinguish between the target component and the equivalent component that are close in position, step 410 is executed to sort the target component and the equivalent component to obtain the sorting result.
[0090] Optionally, the server can randomly sort the target component and at least one equivalent component.
[0091] After executing step 410, execute step 412 to assign serial numbers to the target component and equivalent components according to the sorting results.
[0092] Then execute step 414 to generate the horizontal coordinate identification code of the target component based on the area identifier and sequence number corresponding to the target component, and generate the vertical coordinate identification code of the target component based on the level identifier and sequence number corresponding to the target component.
[0093] Optionally, the server can combine the region identifier and sequence number corresponding to the target component to generate the horizontal coordinate identifier code "region identifier-sequence number" of the target component, and combine the level identifier and sequence number corresponding to the target component to generate the vertical coordinate identifier code "level identifier-sequence number" of the target component.
[0094] In this embodiment, a horizontal coordinate identifier and a vertical coordinate identifier can be generated based on the desired spatial coordinates of the target component. This establishes a correlation between the target component's number and its installation location (desired spatial coordinates), avoiding difficulties in locating the component during later maintenance. Based on this, standardized component management can be achieved through automatically generated numbers, improving the efficiency of component modeling.
[0095] In one embodiment, such as Figure 5 The diagram shows a flowchart for building a hierarchical component tree, which mainly includes the following steps:
[0096] Step 502: Collect the individual numbers of the multiple components.
[0097] Optionally, the server can aggregate the individual numbers of all components, with each component's number in the format of "first identifier - second identifier - horizontal coordinate identifier - vertical coordinate identifier". The horizontal coordinate identifier can be either "region identifier" or "region identifier - serial number", and the vertical coordinate identifier can be either "hierarchy identifier" or "hierarchy identifier - serial number".
[0098] Step 504: Perform hierarchical segmentation on the individual numbers of multiple components to determine the hierarchical path of each component.
[0099] Optionally, the server can hierarchically segment the individual numbers of multiple components, assigning the "first identifier" to the first level, the "second identifier" to the second level (a sub-level of the first level), the "horizontal coordinate identifier" to the third level (a sub-level of the second level), and the "vertical coordinate identifier" to the fourth level (a sub-level of the third level). Based on this, the server can construct a hierarchical path for each component, with each path in the form of "first identifier → second identifier → horizontal coordinate identifier → vertical coordinate identifier".
[0100] Step 506: Establish a hierarchical component tree according to the hierarchical paths of the multiple components.
[0101] Optionally, the server can establish a hierarchical component tree, including a first level, a second level, a third level, and a fourth level, according to the hierarchical paths of the multiple components. The first level includes: the first identifier code of each component; the second level includes: the second identifier code of each component; the third level includes: the horizontal coordinate identifier code of each component; and the fourth level includes: the vertical coordinate identifier code of each component.
[0102] In this embodiment, a real-time and expandable hierarchical component tree can be constructed based on the individual numbers of multiple components. This facilitates hierarchical management of components and improves the efficiency of component modeling.
[0103] In some embodiments, such as Figure 6 The diagram shows a flowchart of editing a hierarchical component tree, which mainly includes the following steps:
[0104] Step 602: Receive an editing instruction triggered for the hierarchical component tree; the editing instruction is used to indicate: edit the hierarchical path associated with the first component, the first component belongs to the first component type, and is used to create a first device belonging to the first device type, and the first component corresponds to the first spatial coordinates in the modeling space.
[0105] Optionally, if a component needs to change its position in the modeling space, or if the equipment to be constructed needs to be changed, in order to manage the components in the modeling space in real time and accurately, the user can use the terminal to trigger editing commands for the hierarchical component tree to achieve synchronous updates of the hierarchical component tree. Based on this, the server can receive editing commands triggered by the user using the terminal for the hierarchical component tree.
[0106] Step 604: Based on the first equipment type, the first component type, and the first spatial coordinates, locate and display the first level path of the first component in the hierarchical component tree.
[0107] Optionally, the server can query a first mapping relationship based on the first device type to determine the first identifier of the first component, and query a second mapping relationship based on the first component type to determine the second identifier of the first component. Furthermore, the server can also determine the region identifier corresponding to the horizontal coordinate of the first component and the hierarchy identifier corresponding to the vertical coordinate of the first component based on the first spatial coordinates of the first component (including the horizontal and vertical coordinates of the first component), thereby determining the horizontal and vertical coordinate identifiers of the first component. Based on this, the server can locate and display the first-level path of the first component in the hierarchical component tree: first identifier of the first component → second identifier of the first component → horizontal identifier of the first component → vertical identifier of the first component.
[0108] Step 606: Based on the editing operation performed on the first-level path, delete the first-level path and generate the first updated level path in the hierarchical component tree.
[0109] Optionally, after the server performs an edit operation on the first-level path, the server can delete the first-level path and generate the first updated level path of the first component in the hierarchical component tree.
[0110] In this embodiment, the hierarchical paths of each component in the hierarchical component tree can be edited in real time, so that components can be managed hierarchically in real time and accurately through the hierarchical component tree, thereby improving the efficiency of component modeling.
[0111] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0112] Based on the same inventive concept, this application also provides an automatic component numbering device for implementing the automatic component numbering method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more embodiments of the automatic component numbering device provided below can be found in the limitations of the automatic component numbering method described above, and will not be repeated here.
[0113] In one exemplary embodiment, such as Figure 7 As shown, an automatic component numbering device is provided, including: a target component determination module 702, a prefix identification code determination module 704, a coordinate identification code determination module 706, and a number generation module 708, wherein:
[0114] The target component determination module is used to determine the target component from multiple components, and to determine the target component's expected spatial coordinates in the modeling space, the target component type of the target component, and the target device type of the target device created from the target component;
[0115] The prefix identification code determination module is used to determine the first identification code corresponding to the target device type and the second identification code corresponding to the target component type by querying a preset mapping relationship;
[0116] The coordinate identification code determination module is used to generate horizontal coordinate identification codes and vertical coordinate identification codes based on the desired spatial coordinates.
[0117] The numbering generation module is used to combine the first identifier code, the second identifier code, the horizontal coordinate identifier code, and the vertical coordinate identifier code to generate the number of the target component.
[0118] The aforementioned automatic component numbering device first identifies the target component from multiple components, determining its desired spatial coordinates in the modeling space, its target component type, and the target device type of the target device created from it. Further, by querying a preset mapping relationship and based on a unified numbering rule, it determines the first identifier code corresponding to the target device type and the second identifier code corresponding to the target component type. Even further, based on the desired spatial coordinates, it generates horizontal and vertical coordinate identifier codes, establishing a correlation between the target component's number and its installation location (desired spatial coordinates), avoiding difficulties in later maintenance and component location. Finally, by combining the first identifier code, second identifier code, horizontal coordinate identifier code, and vertical coordinate identifier code, the target component's number is generated. Using this method, manual numbering is unnecessary; the first and second identifier codes are automatically determined according to a unified rule (preset mapping relationship) through a preset mapping relationship, and the target component's number is automatically generated by associating it with its installation location. Based on this, standardized component management can be achieved through automatically generated numbers, thereby improving the efficiency of component modeling.
[0119] In one embodiment, the prefix identifier determination module further includes:
[0120] The mapping relationship acquisition unit is used to acquire the first mapping relationship between device type and prefix identification code, and the second mapping relationship between component type and prefix identification code;
[0121] The prefix identification code determination unit is used to determine the first identification code according to the target device type and the first mapping relationship, and to determine the second identification code according to the target component type and the second mapping relationship.
[0122] In one embodiment, the coordinate identification code determination module further includes:
[0123] The coordinate analysis unit is used to perform coordinate analysis on the desired spatial coordinates to determine the desired horizontal and vertical coordinates.
[0124] The region identifier determination unit is used to determine the region identifier of the target component in the desired region of the modeling space based on the desired lateral coordinates.
[0125] The hierarchy identifier determination unit is used to determine the hierarchy identifier of the target component in the modeling space according to the desired vertical coordinate.
[0126] The coordinate identification code generation unit is used to generate a horizontal coordinate identification code based on the region identifier and a vertical coordinate identification code based on the level identifier if there is no equivalent component whose desired region and desired level are the same as the target component.
[0127] In one embodiment, the coordinate identification code determination module further includes:
[0128] The component sorting unit is used to sort the target component and the equivalent components if there are identical components in the same desired region and desired level as the target component, and obtain the sorting result.
[0129] The serial number configuration unit is used to configure serial numbers for the target component and equivalent components according to the sorting results;
[0130] The coordinate identification code generation unit is used to generate the horizontal coordinate identification code of the target component based on the area identification and sequence number corresponding to the target component, and to generate the vertical coordinate identification code of the target component based on the level identification and sequence number corresponding to the target component.
[0131] In one embodiment, the automatic component numbering device further includes a hierarchical component tree building module, which includes:
[0132] Number aggregation unit, used to aggregate the numbers of multiple components;
[0133] The hierarchical path determination unit is used to hierarchically divide the numbering of multiple components and determine the hierarchical path of each component.
[0134] The component tree creation unit is used to create a hierarchical component tree according to the hierarchical paths of multiple components.
[0135] In one embodiment, the automatic component numbering device further includes a hierarchical component tree editing module, which includes:
[0136] The editing instruction receiving unit is used to receive editing instructions triggered by the hierarchical component tree; the editing instructions are used to indicate: to edit the hierarchical path associated with the first component, the first component belongs to the first component type, to create a first device belonging to the first device type, and the first component corresponds to the first spatial coordinates in the modeling space;
[0137] The hierarchical path positioning unit is used to locate and display the first level path of the first component in the hierarchical component tree based on the first device type, the first component type and the first spatial coordinates.
[0138] The hierarchical path update unit is used to delete the first-level path based on the edit operation performed on the first-level path and generate the first updated hierarchical path in the hierarchical component tree.
[0139] Each module in the aforementioned automatic component numbering device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0140] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores automatic component numbering data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements an automatic component numbering method.
[0141] Those skilled in the art will understand that Figure 8The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0142] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0143] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0144] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0145] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0146] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0147] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this application. The above embodiments only illustrate several implementation methods of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of this application. It should be noted that for those skilled in the art, several modifications and improvements can be made without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for automatically numbering components, characterized in that, The method includes: The target component is determined from multiple components, and the desired spatial coordinates of the target component in the modeling space, the target component type of the target component, and the target device type of the target device created by the target component are determined. By querying a preset mapping relationship, the first identifier code corresponding to the target device type and the second identifier code corresponding to the target component type are determined; Generate horizontal coordinate identifiers and vertical coordinate identifiers based on the desired spatial coordinates; The first identifier, the second identifier, the horizontal coordinate identifier, and the vertical coordinate identifier are combined to generate the number of the target component.
2. The method according to claim 1, characterized in that, The step of determining the first identifier code corresponding to the target device type and the second identifier code corresponding to the target component type by querying a preset mapping relationship includes: Obtain the first mapping relationship between device type and prefix identification code, and the second mapping relationship between component type and prefix identification code; A first identifier is determined based on the target device type and the first mapping relationship, and a second identifier is determined based on the target component type and the second mapping relationship.
3. The method according to claim 1, characterized in that, The step of generating horizontal coordinate identifiers and vertical coordinate identifiers based on the desired spatial coordinates includes: The desired spatial coordinates are analyzed to determine the desired horizontal and vertical coordinates; Based on the desired lateral coordinates, determine the region identifier of the desired area where the target component is located in the modeling space; Based on the desired vertical coordinates, determine the hierarchical identifier of the target component in the desired level of the modeling space; If there is no equivalent component whose desired region and desired level are the same as the target component, the horizontal coordinate identifier code is generated based on the region identifier, and the vertical coordinate identifier code is generated based on the level identifier.
4. The method according to claim 3, characterized in that, The method further includes: If there exists an equivalent component that is in the same desired region and desired level as the target component, sort the target component and the equivalent component to obtain a sorting result; According to the sorting results, assign serial numbers to the target component and the equivalent component respectively; Based on the region identifier and sequence number corresponding to the target component, a horizontal coordinate identifier code for the target component is generated, and based on the level identifier and sequence number corresponding to the target component, a vertical coordinate identifier code for the target component is generated.
5. The method according to claim 1, characterized in that, The method further includes: Collect the individual numbers of the multiple components; The individual numbers of the multiple components are hierarchically segmented to determine the hierarchical paths of the multiple components; A hierarchical component tree is established according to the hierarchical paths of each of the aforementioned components.
6. The method according to claim 5, characterized in that, The method further includes: Receive an editing instruction triggered for the hierarchical component tree; the editing instruction is used to instruct: edit the hierarchical path associated with the first component, the first component belongs to the first component type, and is used to create a first device belonging to the first device type, the first component corresponds to the first spatial coordinates in the modeling space; Based on the first device type, the first component type, and the first spatial coordinates, locate and display the first-level path of the first component in the hierarchical component tree; Based on the editing operation performed on the first-level path, the first-level path is deleted, and a first updated-level path is generated in the hierarchical component tree.
7. An automatic component numbering device, characterized in that, The device includes: The target component determination module is used to determine a target component from multiple components, and to determine the expected spatial coordinates of the target component in the modeling space, the target component type of the target component, and the target device type of the target device created by the target component; The prefix identification code determination module is used to determine the first identification code corresponding to the target device type and the second identification code corresponding to the target component type by querying a preset mapping relationship; The coordinate identification code determination module is used to generate a horizontal coordinate identification code and a vertical coordinate identification code based on the desired spatial coordinates. The number generation module is used to combine the first identifier code, the second identifier code, the horizontal coordinate identifier code, and the vertical coordinate identifier code to generate the number of the target component.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.