Natural language-based electromechanical system model end device statistics method and apparatus
By acquiring BIM models of electromechanical systems using natural language-based methods, receiving user instructions and performing semantic parsing, and recursively searching along component connection relationships, the problem of low statistical efficiency and insufficient accuracy of end-point equipment in electromechanical systems is solved, achieving automated and efficient output of statistical results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GLODON CO LTD
- Filing Date
- 2026-03-17
- Publication Date
- 2026-05-26
AI Technical Summary
In existing technologies, the statistical efficiency of terminal equipment in electromechanical system models is low, the accuracy is difficult to guarantee, the model operation is cumbersome, and the statistical results are difficult to update in a coordinated manner.
By acquiring the BIM model of the electromechanical system, receiving natural language statistical instructions input by the user, performing semantic parsing using a preset knowledge base, determining the starting object limiting parameters, and recursively searching along the component connection relationship to filter out end devices that meet the conditions, and outputting statistical results.
It has enabled automated statistics on terminal equipment of electromechanical systems, reduced the workload in scenarios involving multiple floors and dispersed locations, improved statistical efficiency and accuracy, and reduced omissions and duplicate counts.
Smart Images

Figure CN121859417B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electromechanical system data processing technology, and in particular to a statistical method and apparatus for end-device data processing in electromechanical system models based on natural language. Background Technology
[0002] In the field of architectural engineering design, Building Information Modeling (BIM) software tools can be used to achieve model design for mechanical and electrical (MEP) systems. For certain MEP systems, due to safety and performance requirements, relevant regulations often impose limits on the number of terminal devices connected to a single piping network, loop, or control unit. For example,
[0003] In sprinkler systems, automatic fire alarm systems, and some electrical systems, it is often necessary to count the number of end devices such as sprinklers, detectors, lamps, and low-voltage equipment connected to a specific pipeline or circuit in order to determine whether they meet the requirements of the specifications.
[0004] During and after model creation, the sheer size of the MEP model, the numerous terminal points, and the potential for it to span multiple floors create a significant workload for designers in terms of judgment and verification. Existing methods typically require designers to manually identify the areas or systems requiring statistical analysis through BIM software interfaces, then individually examine connected pipe networks, loops, and terminal equipment using methods such as box selection, point selection, or highlighting of connected objects, and manually record the statistical results before comparing them with standard requirements. This approach suffers from low statistical efficiency, difficulty in guaranteeing accuracy, cumbersome model operations, and difficulty in updating statistical results in conjunction with model modifications.
[0005] Therefore, improving the efficiency and accuracy of statistics on end devices in electromechanical system models has become a crucial technology that needs to be addressed in this field. Summary of the Invention
[0006] The purpose of this invention is to provide a method and apparatus for statistical analysis of end devices in electromechanical system models based on natural language, in order to solve the aforementioned technical problems in the prior art.
[0007] On the one hand, to achieve the above objectives, the present invention provides a statistical method for end-devices of electromechanical system models based on natural language.
[0008] The natural language-based method for statistical analysis of end-devices in an electromechanical system model includes: acquiring a BIM model of the electromechanical system, wherein the BIM model includes components, the connection relationships between components, and the attribute information of the components; receiving natural language statistical instructions input by the user; performing semantic parsing of the natural language statistical instructions according to a preset knowledge base to obtain statistical parameters, wherein the statistical parameters include the target system type, the starting object screening range, and the end-device statistical conditions; determining the starting object constraint parameters corresponding to the target system type according to the target system type and preset business rules; screening starting objects in the BIM model that meet the starting object constraint parameters within the starting object screening range to obtain a set of starting objects; establishing a search branch for each starting object in the set of starting objects, in which the search recursively searches for connected components in the BIM model based on the connection relationships, terminating when an end component is found or a duplicate component is found, to obtain a set of candidate components, and recording the connection paths found by the search branch; screening components that meet the end-device statistical conditions from the set of candidate components to obtain the target end devices; and outputting statistical results based on the screened target end devices.
[0009] Furthermore, the steps for determining the starting object limitation parameters corresponding to the target system type based on the target system type and preset business rules include: determining the profession to which the target system type belongs; calling the starting object determination rules corresponding to the profession; and determining the starting object limitation parameters according to the starting object determination rules.
[0010] Furthermore, the steps for determining the starting object limiting parameters according to the starting object determination rules include: when the target system type is a high-voltage system, determining the parameters corresponding to the distribution cabinet or distribution box as the starting object limiting parameters; when the target system type is a low-voltage system, determining the parameters corresponding to the low-voltage distribution cabinet as the starting object limiting parameters; when the target system type is an automatic fire alarm system, determining the parameters corresponding to the fire alarm cabinet as the starting object limiting parameters; when the target system type is a plumbing system, receiving the user-specified component, determining the parameters corresponding to the connection point between the specified component and the water pipe as the starting object limiting parameters.
[0011] Furthermore, the steps for semantically parsing natural language statistical instructions based on a preset knowledge base to obtain statistical parameters include: extracting system type description, scope description, device description, and output requirements from the natural language statistical instructions; using the preset knowledge base to perform terminology normalization, synonym mapping, and default completion on the extracted results to obtain statistical parameters; and the steps for outputting statistical results based on the selected target terminal devices include: counting the total number of target terminal devices; counting the number of target terminal devices corresponding to each connection path; and outputting the statistical results according to the output requirements.
[0012] Furthermore, in the search branch, the steps of recursively searching for connected components in the BIM model based on connection relationships, starting from the initial object, include: establishing a set of visited component identifiers; when searching for the next component connected to the current component, if the component identifier of the next component does not exist in the set of visited component identifiers, then the component identifier of the next component is added to the set of visited component identifiers and the current connection path, and the search continues; and if the next component is an end component, or the component identifier of the next component already exists in the set of visited component identifiers, then the current search branch is terminated.
[0013] Furthermore, the statistical conditions for terminal devices include at least one of the following: target terminal device category, spatial range of the target terminal device, system classification of the target terminal device, and statistical criteria determined based on preset business rules; the step of selecting components that meet the statistical conditions for terminal devices from the candidate component set includes: filtering the candidate component set according to the component's attribute information and removing components whose attribute information does not meet the statistical conditions for terminal devices.
[0014] Furthermore, the natural language-based electromechanical system model end-device statistics method includes: after obtaining statistical parameters, generating a statistical tool and descriptive information for the statistical tool; outputting the descriptive information of the statistical tool; when receiving a user's confirmation operation on the descriptive information of the statistical tool, running the statistical tool, wherein running the statistical tool performs the steps of performing end-device statistics based on statistical parameters and outputting statistical results; when receiving a user's confirmation operation on the statistical results, storing the statistical tool and generating a control that triggers the running of the statistical tool; and when receiving a user's operation on the control, running the statistical tool.
[0015] On the other hand, in order to achieve the above objectives, the present invention provides a statistical device for end-devices of electromechanical system models based on natural language.
[0016] The natural language-based electromechanical system model end-device statistical device includes: an acquisition module for acquiring the BIM model of the electromechanical system, wherein the BIM model includes components, the connection relationships between components, and the attribute information of the components; a receiving module for receiving natural language statistical instructions input by the user; a parsing module for semantically parsing the natural language statistical instructions according to a preset knowledge base to obtain statistical parameters, wherein the statistical parameters include the target system type, the starting object screening range, and the end-device statistical conditions; a first determination module for determining the starting object limitation parameters corresponding to the target system type according to the target system type and preset business rules; and a first screening module for filtering the BIM model... The system comprises the following modules: a first module for selecting starting objects within the specified range that meet the parameters of the starting objects; a second module for selecting starting objects within the set and recursively searching for connected components in the BIM model based on their connection relationships, terminating when an end component or duplicate component is found, to obtain a set of candidate components and record the connection paths found by the search branch; a third module for selecting components that meet the statistical conditions for end devices from the set of candidate components to obtain the target end devices; and a fourth module for outputting statistical results based on the selected target end devices.
[0017] On the other hand, to achieve the above objectives, the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above method.
[0018] On the other hand, to achieve the above objectives, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above method.
[0019] The present invention provides a method and apparatus for statistical analysis of end-devices in an electromechanical system model based on natural language. First, a BIM model of the electromechanical system is acquired, and a natural language statistical command input by the user is received. Then, the natural language statistical command is semantically parsed according to a preset knowledge base to obtain the target system type, the starting object filtering range, and the end-device statistical conditions. Next, the corresponding starting object limiting parameters are determined according to the target system type and preset business rules. Starting objects that meet the starting object limiting parameters are filtered within the starting object filtering range. Subsequently, a recursive search is performed along the connection relationships between components for each starting object, terminating when an end component is found or a duplicate component is found, resulting in a candidate component set and recording the connection path. Then, components that meet the end-device statistical conditions are filtered from the candidate component set to obtain the target end-device. Finally, statistical results are output based on the target end-device. With this invention, users no longer need to manually select, point, view items, and record data to count the end devices in electromechanical systems. Instead, the system can automatically identify the connection network of the target system and output statistical results based on natural language, thereby reducing the workload of statistics in scenarios involving multiple floors, dispersed locations, and complex connections. Furthermore, it can achieve multi-dimensional statistics from different perspectives, improving statistical efficiency and accuracy. At the same time, by terminating the search when an end component is found or a duplicate component is found, it helps to reduce omissions and duplicate counts. Attached Figure Description
[0020] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0021] Figure 1 A flowchart illustrating the statistical method for end-devices in an electromechanical system model based on natural language, provided in Embodiment 1 of the present invention;
[0022] Figure 2 This is a block diagram of the end-device statistical device for an electromechanical system model based on natural language, provided in Embodiment 2 of the present invention.
[0023] Figure 3 This is a hardware structure diagram of a computer device provided in Embodiment 3 of the present invention. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention.
[0025] Example 1
[0026] This invention provides a method for statistically analyzing end-devices in an electromechanical system model based on natural language processing. This method can automatically count the number of end-devices in an electromechanical system BIM model, categorized by system type and connection relationship, and provide statistical results for subsequent quantity checks and verifications. Specifically, Figure 1 The flowchart of the statistical method for end-devices of an electromechanical system model based on natural language provided in Embodiment 1 of the present invention is as follows: Figure 1 As shown, the method for statistical analysis of end-devices in an electromechanical system model based on natural language provided in this embodiment includes the following steps S101 to S108. The overall technical solution is implemented in the form of an AI assistant software. The system architecture may include a natural language processing module, a knowledge base module, a model parsing module, a search and statistics module, and a result display module. The natural language processing module is used to parse user commands and identify statistical intent and parameters. The knowledge base module is used to store knowledge such as business rules, specification requirements, and system classifications. The model parsing module is used to parse the BIM model structure and identify components, component attributes, system types, and connection relationships. The search and statistics module is used to perform recursive searches to count the number of devices. The result display module is used to generate statistical reports and provide visual displays.
[0027] Step S101: Obtain the BIM model of the electromechanical system.
[0028] The BIM model includes components, the connection relationships between components, and the attribute information of the components.
[0029] In this embodiment, the BIM model of the electromechanical system can be an existing electromechanical professional model in the building project, such as a water supply and drainage model, HVAC model, electrical model, fire protection model, or intelligent system model, or it can be a comprehensive electromechanical model formed by combining multiple professional models. A BIM (Building Information Modeling) model is a digital information model built based on geometric, physical, functional, and management information throughout the entire lifecycle of a building project. Components in the electromechanical system model include equipment, pipes, ducts, cable trays, fittings, valves, cabinets, and end-point equipment facing the usable space. End-point equipment refers to the equipment and devices in the electromechanical system that directly face the usable space and complete the final functional output, such as sprinkler heads, lighting fixtures, switches, sockets, air vents, and fan coil units. Connection relationships are used to characterize the physical and functional connections between various components, equipment, and pipelines, and can include pipe and fitting connections, duct connections, cable tray connections, electrical circuit connections, and equipment-pipeline interface connections. Attribute information includes component name, component category, system classification, floor area, object identifier, installation space, and equipment parameters, used for subsequent object filtering and statistical processing. By acquiring the BIM model of the electromechanical system containing the above information, a data foundation is provided for subsequent determination of the starting object based on the target system type, recursive search along the connection relationship, and screening of target end equipment based on statistical conditions.
[0030] Step S102: Receive natural language statistical instructions input by the user.
[0031] In this embodiment, the user inputs natural language statistical commands through the interactive interface of the electromechanical AI assistant to express their statistical needs. For example, the user can input "count the number of all low-voltage terminals connected to cabinet A in the low-voltage system of this floor", "count the number of sprinkler heads connected to the sprinkler system in area B", "count the number of all lamps under distribution box C in the lighting system", etc. The natural language statistical commands can be in text form or in text form converted from speech recognition. Compared with the existing technology that relies on manual selection, clicking, or repeated highlighting of connected objects, this embodiment receives statistical requests through natural language interaction, reducing the operational complexity of electromechanical model statistics and facilitating the rapid initiation of statistical tasks in scenarios with multiple floors, dispersed locations, and complex connection relationships.
[0032] Step S103: Perform semantic parsing of natural language statistical instructions based on a preset knowledge base to obtain statistical parameters.
[0033] The statistical parameters include the target system type, the initial object screening range, and the statistical conditions for the end devices.
[0034] In this embodiment, the preset knowledge base can store business rules, specifications, system classification knowledge, professional division knowledge, and common object naming methods. By calling mature natural language model technology and combining it with the preset knowledge base, semantic parsing is performed on the user's natural language statistical commands to identify key parameters involved in the statistical task. The target system type indicates the electromechanical system targeted by this statistic, including water supply and drainage systems, HVAC systems, electrical systems, fire protection systems, intelligent systems, etc., or further subdivided into system types such as lighting systems, power supply and distribution systems, low-voltage systems, and automatic fire alarm systems. The starting object filtering range is used to limit the scope of the search starting point, which can be the entire project, a specified floor, a specified area, etc. The end device statistical conditions are used to limit the scope of the final statistical object, which can include the target end device category, the system classification, the spatial range, and the statistical scope conditions determined based on business rules. For example, when the user inputs "statistics on the number of lamps connected to the distribution box in the three-story lighting system", the semantic parsing result can include: the target system type is lighting system, the starting object filtering range is three floors, and the end device statistical conditions are lamps connected to the distribution box on the three floors. For example, when a user inputs "count the number of all low-voltage equipment points in the low-voltage system of area D", the semantic parsing results may include: the target system type is low-voltage system, the starting object filtering range is area D, and the end device statistical condition is all low-voltage equipment in area D.
[0035] Optionally, in one implementation, a pre-defined knowledge base can be used to perform terminology normalization, synonym mapping, and default completion on the intermediate results obtained from natural language parsing. For example, expressions such as "lamp," "lighting fixture," and "lighting fixture location" can be uniformly mapped to "lighting fixture"; expressions such as "this floor" and "current floor" can be uniformly mapped to specific floor ranges; or, when the user does not fully describe the device category, the default terminal device statistical conditions can be completed by combining the system type and business rules. This improves the parsing accuracy of natural language statistical instructions and the consistency of subsequent statistical processing. The knowledge base can also store knowledge about the number of terminals in different systems as specified in the standard, which can be used for quantity checks and judgments of subsequent statistical results.
[0036] Step S104: Determine the starting object limitation parameters corresponding to the target system type based on the target system type and preset business rules.
[0037] In this embodiment, the starting object limiting parameter is used to characterize the object features that can serve as the starting point for searching a connection network or loop. It can be a component category parameter, connection point parameter, user-specified object parameter, or a combination thereof. Specifically, the relevant discipline can be determined first based on the target system type, and then the corresponding starting object limiting parameter can be determined according to preset business rules. For electrical disciplines, the mapping relationship between system type and the component category of the search starting point is used. For example, lighting systems correspond to distribution cabinets (boxes), power supply and distribution systems correspond to distribution cabinets (boxes), low-voltage systems correspond to low-voltage cabinets, and automatic fire alarm systems correspond to fire protection cabinets. For plumbing disciplines, the user can specify a component, and the connection points of that component connected to water pipes in its own connection relationship can be used as the starting point for loop searches. The starting object limiting parameter is not limited to a fixed object type, but can be converted into an applicable starting object limiting form according to different disciplines and system types through preset business rules.
[0038] Optionally, in one implementation, the starting object constraint parameters may further include additional constraints on object attributes, such as limiting the system category to which the starting object belongs, its spatial range, object name keywords, or object identifiers, in order to more accurately filter target starting objects in the model. For example, for the scenario of "counting the number of lamps connected to distribution box A in the five-story lighting system," the starting object constraint parameters may include: the starting object category is distribution box, the system type is lighting system, and the floor is the fifth floor, etc. In this way, the target system type and business rules can be further transformed into parameter expressions that can perform object filtering in the BIM model.
[0039] Step S105: Filter the starting objects in the BIM model that meet the starting object constraint parameters within the filtering range to obtain the starting object set.
[0040] In this embodiment, the candidate region for the search starting point is first determined using the starting object filtering range. Then, within this range, the corresponding starting objects are filtered according to the starting object limiting parameters to form a set of starting objects. The starting object filtering range can be the entire project, a specified floor, a specified area, etc., so this step is mainly used to limit where to start the search. For example, when the starting object filtering range is "a certain floor", starting objects that meet the starting object limiting parameters can be filtered within that floor range; when the starting object filtering range is "a certain local area", starting objects can be filtered within that area. It should be understood that the starting object filtering range is mainly used to determine the range of the search starting point, while the subsequent recursive search based on connection relationships can continue to unfold along the component connection network. Therefore, in some scenarios, even if the starting object is located on a certain floor, the actual end devices connected to it may be distributed on other floors or in other areas, and the end points may span multiple floors, solving the problem of large workload and easy error in manual statistics in such scenarios.
[0041] Optionally, in one implementation, when there is more than one starting object obtained from the filtering, multiple starting objects can be used as the common search starting point to carry out statistics separately; when there is only one starting object obtained from the filtering, a connection search can be carried out directly based on the starting object; when no starting object is found, the user can be returned with the information that no starting object was found, or the user can be prompted to adjust the system type, range conditions or object description in the natural language statistics command.
[0042] Step S106: For each starting object in the starting object set, establish a search branch. In the search branch, starting from the starting object, recursively search for connected components in the BIM model based on the connection relationship. The search terminates when the end component is found or a duplicate component is found, so as to obtain a set of candidate components and record the connection path found by the search branch.
[0043] In this embodiment, a search branch can be established for each starting object, and the search recursively searches for connected components along the connection relationships in the BIM model starting from that starting object. Recursive search can be understood as traversing connected objects layer by layer downstream or to the end along the connection network or loop. During the search, the identifiers of currently visited components are recorded to determine if duplicate visits occur; simultaneously, the component sequence or connection order corresponding to the current search branch is recorded, thus forming the connection path corresponding to that search branch. For each search branch, when the search reaches an end component, it indicates that the path has reached the connection endpoint; when a duplicate component is found, it indicates that the path has formed a duplicate return visit or has a risk of circular connection, at which point the search branch is terminated. Each search branch recursively searches all connected components from the starting point, stopping the search when reaching the end or encountering the same component, and recording the search path, equipment, and their quantity.
[0044] In terms of implementation, end components can refer to end objects that no longer connect to target components in the current system connection path, such as sprinkler heads, light fixtures, switches, sockets, air vents, and low-voltage terminals; repeating components can refer to components whose object identifier has already appeared in the currently visited component set. By setting two types of termination conditions—end device termination and repeat termination—infinite traversal of complex connection relationships is avoided, redundant calculations caused by repeated searches are reduced, and the risk of duplicate counting caused by loop paths is lowered.
[0045] Optionally, in one implementation, each search branch can form its own set of candidate components. After all search branches are completed, the candidate component sets of each search branch are aggregated to obtain the overall set of candidate components for subsequent unified screening of target end devices. Furthermore, the connection path information of each search branch can be retained to output the number of end devices corresponding to each connection path. For electrical systems, the connection path can be represented as a loop path; for water supply and drainage, HVAC, and other disciplines, the connection path can be represented as a pipe network path.
[0046] Step S107: Select components that meet the statistical conditions of the end device from the candidate component set to obtain the target end device.
[0047] In this embodiment, the candidate component set obtained through recursive search typically includes multiple components connected to the starting object. These components may not all belong to the target terminal device that needs to be statistically analyzed; therefore, further filtering is required based on terminal device statistical conditions. These conditions may include the target terminal device category, its system classification, its spatial range, and statistical criteria determined based on preset business rules. In other words, the filtering step transforms the candidate components obtained through connection search into target terminal devices that conform to the user's statistical intent.
[0048] Specifically, the statistical criteria for end-devices can be determined based on the component's attribute information. For example, when the end-device statistical criteria limit the target device category to lighting fixtures, objects belonging to the lighting fixture category in the candidate component set can be filtered out; when the end-device statistical criteria limit the target device category to sprinkler heads, sprinkler head objects can be filtered out; when the end-device statistical criteria also include spatial range conditions, further filtering can be performed by combining the component's floor, region, or spatial attributes. In some implementations, the filtered components can also be cleaned and organized according to business rules, such as deduplicating duplicate occurrences of the same object, standardizing category expressions, and grouping similar target objects scattered in different search branches, thereby generating a structured set of target end-devices for subsequent quantity statistics and result display.
[0049] Step S108: Output statistical results based on the selected target terminal devices.
[0050] In this embodiment, based on the target terminal devices selected in step S107, statistical results such as the total number, the number of connection paths, and the number of categories can be generated and output to the user. The output method can include text, tables, or a combination of text and tables. If the user's instruction description clearly specifies the output requirements, the output will be strictly in accordance with the instruction requirements; if the user's instruction description is vague, the output will prioritize the general requirements of business rules; by default, multi-dimensional display is performed according to parameters such as system type, device category, and quantity. For low-voltage systems in electrical engineering, the statistical results are displayed by circuit, and the total number of components and the number of various types of components in each circuit are displayed in the statistical results for use in conjunction with electrical system diagram drawing or quantity verification.
[0051] Optionally, in one implementation, when outputting statistical results, the target end devices corresponding to the statistical results are highlighted in the BIM model, making it easier for designers to view the spatial distribution and connection positions of the corresponding objects in the model interface. Further, optionally, the statistical results are synchronized with the BIM model in real time; when model objects are modified, the statistical results are triggered to update accordingly, ensuring the timeliness and accuracy of the statistical data.
[0052] In the natural language-based electromechanical system model end-device statistics method provided in this embodiment, the BIM model of the electromechanical system is first acquired, and the natural language statistics instructions input by the user are received. Then, the natural language statistics instructions are semantically parsed according to a preset knowledge base to obtain the target system type, the starting object screening range, and the end-device statistics conditions. Next, the corresponding starting object limiting parameters are determined according to the target system type and preset business rules, and starting objects that meet the starting object limiting parameters are screened within the starting object screening range. Then, a recursive search is performed on each starting object along the connection relationship between components, and the search terminates when an end component is found or a duplicate component is found, to obtain a candidate component set and record the connection path. Then, components that meet the end-device statistics conditions are screened from the candidate component set to obtain the target end device. Finally, the statistics results are output according to the target end device. The natural language-based electromechanical system model end-device statistics method provided in this embodiment eliminates the need for users to manually select, point, view items, and record data to count end-devices in the electromechanical system. Instead, it automatically identifies the connection network of the target system and outputs statistical results based on natural language, thereby reducing the workload of statistics in scenarios involving multiple floors, dispersed locations, and complex connections. Furthermore, it enables multi-dimensional statistics from different perspectives, improving statistical efficiency and accuracy. At the same time, by terminating the search when an end-device component is found or a duplicate component is discovered, it helps reduce omissions and duplicate counts.
[0053] Optionally, in one embodiment, the natural language-based electromechanical system model end-device statistics method includes: after obtaining statistical parameters, generating a statistical tool and descriptive information for the statistical tool; outputting the descriptive information of the statistical tool; when receiving a user's confirmation operation on the descriptive information of the statistical tool, running the statistical tool, wherein running the statistical tool performs the steps of performing end-device statistics based on statistical parameters and outputting statistical results; when receiving a user's confirmation operation on the statistical results, storing the statistical tool and generating a control that triggers the running of the statistical tool; and when receiving a user's operation on the control, running the statistical tool.
[0054] Specifically, in this embodiment, the statistical tool is used to implement steps S104 to S108 as described above. That is, the statistical tool is an executable statistical unit formed by encapsulating the starting object determination logic, connection relationship search logic, end-device filtering logic, and result output logic. This statistical tool can manifest as a script program, workflow configuration, callable functional module, task template, Agent execution unit, or other statistical processing entity that can be invoked again. The descriptive information is used to explain the function and scope of application of the statistical tool to the user. It may include the tool name, applicable system type, starting object filtering range, end-device statistical conditions, output method, and statistical purpose. For example, when a user inputs "count the number of all low-voltage end devices in a three-layer low-voltage system and output by path," the corresponding statistical tool is automatically generated, and descriptive information such as "Low-voltage system end-device statistical tool (three-layer, output by path)" is output for user confirmation.
[0055] After obtaining the statistical parameters, they can be mapped to the execution configuration of the statistical tool, forming the statistical tool and its descriptive information. The descriptive information is then output for the user to check if the tool's statistical scope meets their expectations. When the user confirms the descriptive information, it indicates that the user approves of the statistical scope, system type, and statistical conditions corresponding to the statistical tool. At this point, the statistical tool can be run to perform the aforementioned steps of statistical analysis of end devices based on the statistical parameters and outputting the results. If the user is dissatisfied with the descriptive information, they can further interact and add commands. Based on the user's added commands, semantic parsing is performed again to obtain the statistical parameters, and the statistical tool and its descriptive information are regenerated. The user can interact multiple times until they confirm the statistical tool's descriptive information.
[0056] Furthermore, when a user confirms the statistical results after viewing them, the statistical tool can be stored in the tool library, and a control to trigger its operation can be generated. This control can be a button, menu item, shortcut, graphical interface component, or other interactive object that triggers the tool's execution. When a user needs to correct the statistical results, they can add commands. Based on these commands, semantic parsing is performed again to obtain statistical parameters, and the statistical tool and its description are regenerated. The description is then output again, allowing the user to check if the tool's statistical scope meets their expectations until the final statistical results are confirmed. After storing the statistical tool, when the BIM model is updated and requires re-statistics, the user does not need to re-enter complete natural language commands and reconfigure statistical parameters. Instead, they can directly call and run the stored statistical tool by manipulating the controls.
[0057] Optionally, when the statistical tool is run again, it can directly use the system type, starting object determination logic, and end-device statistical conditions from the initial generation. Alternatively, users can fine-tune some parameters before calling the tool, such as adjusting the starting object filtering range, switching the output format, or updating the path statistical caliber. Multiple statistical tools and their corresponding controls can also be created for different projects, professions, or statistical scenarios, forming a reusable collection of statistical tools.
[0058] The natural language-based electromechanical system model end-device statistical method provided in this embodiment transforms a one-time statistical process into a reusable statistical processing capability by generating statistical tools, outputting descriptive information, running and storing the statistical tools after user confirmation, and triggering the statistical tools again via controls. This reduces the burden of repeatedly inputting statistical commands and configuring statistical parameters, improving the execution efficiency of similar statistical tasks. Furthermore, it allows user-confirmed statistical definitions to be stored as reusable tools, improving execution consistency and result stability in repetitive statistical scenarios, thereby enhancing the applicability of this method in practical design verification, batch statistics, and high-frequency statistical tasks.
[0059] Optionally, in one embodiment, the step of determining the starting object limitation parameters corresponding to the target system type according to the target system type and preset business rules includes: determining the profession to which the target system type belongs; calling the starting object determination rule corresponding to the profession; and determining the starting object limitation parameters according to the starting object determination rule.
[0060] Specifically, in this embodiment, the target system type refers to the type information used to characterize the system to be statistically analyzed, obtained through parsing natural language statistical instructions. Examples include lighting systems, power supply and distribution systems, low-voltage systems, automatic fire alarm systems, water supply and drainage systems, and HVAC systems. "Specialty" refers to the professional affiliation within the electromechanical BIM model, such as electrical engineering, plumbing, and HVAC. Since different specialties differ in their connection topology, starting object forms, and statistical path rules, this embodiment first determines the specialty based on the target system type, and then calls the starting object determination rule corresponding to that specialty. This transforms the statistical requirements expressed by the user in natural language into starting point determination logic that can be executed within the BIM model.
[0061] First, a table mapping system types to disciplines is established. For example, lighting systems, power supply and distribution systems, low-voltage systems, and automatic fire alarm systems are assigned to the electrical discipline, while water supply and drainage systems and HVAC-related water systems are assigned to the plumbing discipline. Then, based on the determined disciplines, the corresponding starting object determination rules are invoked. These rules can be understood as a set of rules used to transform abstract statistical intentions into specific search starting point constraints; they can be pre-configured by a business rule library. For example, rules under the electrical discipline are used to determine the starting cabinet category matching the system type, while rules under the plumbing discipline are used to determine the user-specified components and their connection points to water pipes as the search starting point. Finally, based on the invoked rules, starting object constraint parameters are obtained. These parameters can be component category parameters, connection point parameters, object identifier parameters, or combinations thereof, used for subsequent selection of starting objects in the BIM model.
[0062] The starting object constraint parameters also include auxiliary constraint information related to spatial range, object name keywords, object number, or component installation location. For example, when a user's natural language statistical command includes descriptions such as "a certain distribution box on a certain floor" or "a certain control box in a certain area," the floor or area conditions and object name characteristics can be included as part of the starting object constraint parameters to improve the accuracy of starting object screening.
[0063] The natural language-based electromechanical system model end-device statistics method provided in this embodiment, by first determining the specialty and then invoking the corresponding starting object determination rules, structurally expresses the differentiated starting object determination logic under different electromechanical specialties. This allows the same natural language statistical framework to adapt to the search starting point determination requirements of different specialty systems. This improves the targeting and accuracy of starting object determination, thereby enhancing the effectiveness of subsequent connection searches and end-device statistics.
[0064] Optionally, in one embodiment, the step of determining the starting object limiting parameters according to the starting object determination rule includes: when the target system type is a high-voltage system, determining the parameters corresponding to the distribution cabinet or distribution box as the starting object limiting parameters; when the target system type is a low-voltage system, determining the parameters corresponding to the low-voltage distribution cabinet as the starting object limiting parameters; when the target system type is an automatic fire alarm system, determining the parameters corresponding to the fire alarm cabinet as the starting object limiting parameters; when the target system type is a plumbing system, receiving the user-specified component, and determining the parameters corresponding to the connection point between the specified component and the water pipe as the starting object limiting parameters.
[0065] Specifically, in this embodiment, the high-voltage system includes lighting systems and power distribution systems, which typically use distribution cabinets or boxes as the upstream power supply starting point. For this type of system, the category parameters, system affiliation parameters, and object identification parameters corresponding to the distribution cabinet or box can be determined as the starting object limiting parameters, and a target starting object that meets the above parameters can be found within the starting object screening range. For the low-voltage system, since its circuits or lines usually extend from the low-voltage cabinet to the downstream terminal, the parameters corresponding to the low-voltage cabinet can be determined as the starting object limiting parameters. For the automatic fire alarm system, the parameters corresponding to the fire alarm cabinet can be determined as the starting object limiting parameters. For the plumbing system, this embodiment adopts a different starting point determination method than the electrical system. Specifically, the system can first receive the components specified by the user, such as a section of main pipe, a device interface, a valve, or other key components connected to the water system. Then, based on the connection relationship of the specified components, the connection points connected to the water pipes are identified, and the parameters corresponding to these connection points are determined as the starting object limiting parameters. At this time, the starting object limiting parameters are no longer just the category parameters of a certain type of cabinet, but the connection point parameters associated with the user-specified components. For electrical systems, additional conditions such as the floor, area, system name, or object number of the object are added to the starting object limitation parameters to avoid misselection when multiple similar cabinets exist within the same filtering range. For plumbing systems, multiple connection points connected to water pipes are used as multiple starting objects, thereby establishing multiple search branches to support the statistics of terminal equipment in complex pipe networks.
[0066] The statistical method for end devices of electromechanical system models based on natural language provided in this embodiment is beneficial to transform the differences in connection structure of different electromechanical systems into a clear starting point determination strategy, improve the accuracy of searching for the starting point, reduce the risk of omissions and errors in statistics caused by incorrect selection of the starting point, and enhance the adaptability of the solution to two typical connection networks: electrical circuits and water and heating pipe networks.
[0067] Optionally, in one embodiment, the step of semantically parsing the natural language statistical instructions according to a preset knowledge base to obtain statistical parameters includes: extracting system type description, scope description, device description, and output requirements from the natural language statistical instructions; using the preset knowledge base to perform terminology normalization, synonym mapping, and default completion on the extracted results to obtain statistical parameters; and the step of outputting statistical results according to the selected target terminal devices includes: counting the total number of target terminal devices; counting the number of target terminal devices corresponding to each connection path; and outputting statistical results according to the output requirements.
[0068] Specifically, in this embodiment, the system type description is used to characterize the target system that the user wants to statistically analyze, such as a lighting system, a low-voltage system, or a sprinkler system; the scope description is used to characterize the starting object filtering range that the user wants to limit, such as the entire project, a certain floor, or a certain area; the device description is used to characterize the category of the target end device, such as lamps, sprinklers, or low-voltage equipment; and the output requirements are used to characterize the display method or display scope that the user wants to obtain the statistical results, such as outputting only the total, outputting separately by path, outputting text descriptions, or outputting tables. Natural language statistical commands often contain various colloquial, industry-specific, and even incomplete expressions. Therefore, in this embodiment, a preset knowledge base is introduced to perform secondary processing on the parsed results.
[0069] Among them, terminology normalization is used to unify different expressions into predefined standard terms in the knowledge base, such as unifying "lamp", "lamp location", and "lamp fixture location" into "lamp fixture"; synonym mapping is used to map different user habit expressions to the same business object, such as mapping "circuit", "line", and "connection path" to the path statistics concept in the system in a specific context; default completion is used to complete missing items when the user does not fully express the parameters, combined with system type, professional rules and general statistical requirements. For example, if the user only enters "statistics of three-layer weak current equipment", the knowledge base can automatically infer that the output requirement is the total number and optionally output the number of each connection path.
[0070] In the output phase, this embodiment further performs total quantity statistics and quantity statistics for each connection path of the target terminal devices. The total quantity reflects the summary result of all target terminal devices under this statistical task; the quantity of target terminal devices corresponding to each connection path reflects the distribution of terminal devices on different loops or paths. For cases where output requirements are clearly defined, output can be strictly in accordance with user requirements; for cases where output requirements are not clear or are vaguely described, output can be performed according to preset business rules in the knowledge base, such as defaulting to outputting the total quantity and displaying it in multiple dimensions by system type, device category, and quantity, or outputting statistical results by loop in the low-voltage system.
[0071] The natural language-based electromechanical system model end-device statistics method provided in this embodiment extracts system type descriptions, scope descriptions, device descriptions, and output requirements. Combined with a knowledge base, it performs terminology normalization, synonym mapping, and default completion. This ensures that colloquial, diverse, and even incomplete statistical instructions can be stably converted into executable statistical parameters. Furthermore, by outputting the total number of target end devices and the number corresponding to each connection path, the statistical results satisfy both overall quantity statistics and refined statistical needs for individual paths and loops. This improves the robustness of natural language interaction and the relevance and flexibility of statistical result display.
[0072] Optionally, in one embodiment, the step of recursively searching for connected components in the BIM model based on connection relationships, starting from the initial object, in the search branch includes: establishing a set of visited component identifiers; when searching for the next component connected to the current component, if the component identifier of the next component does not exist in the set of visited component identifiers, then adding the component identifier of the next component to the set of visited component identifiers and the current connection path, and continuing the search; and if the next component is an end component, or the component identifier of the next component already exists in the set of visited component identifiers, then terminating the current search branch.
[0073] Specifically, in this embodiment, a set of visited component identifiers is set to record the identifiers of component objects that have been visited during the current search process, so as to determine whether repeated visits have occurred in subsequent search processes; the current connection path is used to record the sequence of components or connection sequences traversed by the current search branch, in order to form the path information corresponding to the search branch. Since the connection network in the electromechanical system may be long and complex, and may even have closed loops, repeated paths, or local ring connections in some scenarios, this embodiment ensures that the search process can be correctly terminated and that the search path can be completely recorded by jointly maintaining the set of visited component identifiers and the current connection path.
[0074] When searching for the next component from the current component, the system first checks if the component identifier of the next component already exists in the set of visited component identifiers. If it does not exist, it means that the next component has not been visited by the current search branch. In this case, its component identifier is added to the set of visited component identifiers and appended to the current connection path. Then, the recursive search continues along the next component. If the next component is an end component, it means that the current connection path has reached the end, and there is no need to continue searching downwards. If the component identifier of the next component already exists in the set of visited component identifiers, it means that the current search branch has reached a component that has already been visited. To avoid infinite loops and duplicate counting, the current search branch should be terminated.
[0075] End components are identified by having no downstream connections, belonging to the end device category set, or meeting preset end-device determination rules. The current connection path can be stored as a sequence of component objects, a sequence of component numbers, or a hierarchical sequence of "starting object, intermediate connecting components, and end components". The number of components, target end devices, or intermediate nodes on each path can also be recorded synchronously during the search process to directly generate path-level statistical results later.
[0076] The end-device statistics method based on natural language electromechanical system model provided in this embodiment establishes a set of visited component identifiers and maintains the current connection path. This enables the search process to not only identify and terminate repeated visits in complex connection networks, but also to completely save the path information corresponding to each search branch. This reduces the risk of redundant calculations and duplicate counting caused by cyclic searches, improves statistical efficiency, and provides basic data for subsequent quantity statistics and result display by connection path, thereby enhancing the accuracy and interpretability of end-device statistics results.
[0077] Optionally, in one embodiment, the statistical conditions for terminal devices include at least one of the following: target terminal device category, spatial range to which the target terminal device belongs, system classification to which the target terminal device belongs, and statistical criteria determined based on preset business rules; the step of screening components that meet the statistical conditions for terminal devices from the candidate component set includes: filtering the candidate component set according to the component's attribute information and removing components whose attribute information does not meet the statistical conditions for terminal devices.
[0078] Specifically, in this embodiment, the statistical conditions for terminal devices are used to define which candidate components should be included in the final statistical results, and can be composed of multiple dimensions. Target terminal device categories include sprinklers, lamps, low-voltage electrical equipment, sockets, air vents, etc.; the spatial range to which the target terminal device belongs can be a certain floor, a certain area, a certain room, or a certain functional space; the system classification to which the target terminal device belongs can be used to limit the statistical object to belong to a specific system, such as lamps in a lighting system rather than electrical equipment in other systems; the statistical caliber conditions can be determined by preset business rules, such as whether to exclude certain non-designed statistical objects, whether to merge similar objects according to a certain standard caliber, etc.
[0079] The system can read the attribute information of each component in the candidate component set and compare it item by item with the statistical conditions for end devices. For example, when the statistical conditions for end devices limit the target end device category to lighting fixtures, lighting fixtures can be selected based on the component's category attribute; when the statistical conditions limit the spatial range to a certain floor, objects within that floor can be selected based on the component's spatial attribute, floor attribute, or installation location attribute; when the statistical conditions limit the system classification to a low-voltage system, objects within the low-voltage system can be selected based on the component's system classification attribute. Components that do not meet the statistical conditions for end devices are removed from the candidate component set to converge the set of generalized connected components obtained through connection search into a target end device set that truly meets the statistical intent.
[0080] Furthermore, after the components have completed the conditional filtering, data cleaning and organization can be performed according to preset business rules. For example, duplicate objects can be removed, the category representation of similar objects can be standardized, and objects belonging to the same path in different search branches can be grouped and merged, thereby facilitating the generation of total and sub-path quantity statistics.
[0081] The end-device statistics method based on natural language electromechanical system model provided in this embodiment, by setting end-device statistics conditions and filtering based on component attribute information, ensures that the objects participating in the statistics not only meet the connection relationship requirements, but also meet the conditions such as equipment category, spatial range, system classification, or business statistics scope. This effectively reduces the risk of mistakenly including non-target objects in the statistics results and improves the consistency between end-device statistics results and user statistical intentions.
[0082] Example 2
[0083] Corresponding to Embodiment 1 above, Embodiment 2 of the present invention provides a statistical device for end-devices of electromechanical system models based on natural language. The technical features and corresponding technical effects can be referred to Embodiment 1 above, and will not be repeated in this embodiment. Figure 2 This is a block diagram of the end-device statistical device for an electromechanical system model based on natural language provided in Embodiment 2 of the present invention, as shown below. Figure 2 As shown, the device includes: an acquisition module 201, a receiving module 202, a parsing module 203, a first determination module 204, a first filtering module 205, a search module 206, a second filtering module 207, and a first output module 208.
[0084] The acquisition module 201 is used to acquire the BIM model of the electromechanical system, wherein the BIM model includes components, the connection relationships between components, and the attribute information of the components; the receiving module 202 is used to receive natural language statistical instructions input by the user; the parsing module 203 is used to perform semantic parsing on the natural language statistical instructions according to a preset knowledge base to obtain statistical parameters, wherein the statistical parameters include target system type, starting object screening range, and end device statistical conditions; the first determining module 204 is used to determine the starting object limiting parameters corresponding to the target system type according to the target system type and preset business rules; the first filtering module 205 is used to filter the starting object within the specified range in the BIM model. A set of starting objects is obtained by identifying starting objects that meet the specified parameters. A search module 206 establishes a search branch for each starting object in the set. Within this search branch, starting from the starting object, a recursive search is performed on connected components in the BIM model based on the connection relationships. The search terminates when an end component or a duplicate component is found, resulting in a set of candidate components. The connection paths found by the search branch are recorded. A second filtering module 207 filters components from the candidate component set that meet the statistical conditions for end devices, obtaining target end devices. A first output module 208 outputs statistical results based on the filtered target end devices.
[0085] Optionally, in one embodiment, the first determining module includes: a first determining unit, configured to determine the major to which the target system type belongs; a calling unit, configured to call the starting object determining rule corresponding to the major; and a second determining unit, configured to determine the starting object limiting parameters according to the starting object determining rule.
[0086] Optionally, in one embodiment, when the second determining unit determines the starting object limiting parameters according to the starting object determination rule, the specific steps include: when the target system type belongs to a high-voltage system, determining the parameters corresponding to the distribution cabinet or distribution box as the starting object limiting parameters; when the target system type belongs to a low-voltage system, determining the parameters corresponding to the low-voltage distribution cabinet as the starting object limiting parameters; when the target system type belongs to an automatic fire alarm system, determining the parameters corresponding to the fire alarm distribution cabinet as the starting object limiting parameters; when the target system type belongs to a plumbing system, receiving a user-specified component, and determining the parameters corresponding to the connection point between the specified component and the water pipe as the starting object limiting parameters.
[0087] Optionally, in one embodiment, the statistical conditions for the terminal device include at least one of the following: target terminal device category, spatial range to which the target terminal device belongs, system classification to which the target terminal device belongs, and statistical criteria determined based on preset business rules; when the second filtering module filters components that meet the statistical conditions for the terminal device, the specific steps it performs include: filtering the candidate component set according to the attribute information of the component, and removing components whose attribute information does not meet the statistical conditions for the terminal device.
[0088] Optionally, in one embodiment, the statistical tool includes a first determining module, a first filtering module, a search module, a second filtering module, and a first output module. After the parsing module obtains the statistical parameters, the statistical tool and its description information are generated. The device further includes: a second output module for outputting the description information of the statistical tool; a generation module for generating the statistical tool when a user confirms the description information of the statistical tool; a first response module for storing the statistical tool and generating a control to trigger the execution of the statistical tool when a user confirms the statistical result; and a second response module for running the statistical tool when a user operates on the control.
[0089] Optionally, in one embodiment, the search module specifically performs the following steps: establishing a set of visited component identifiers; when searching for the next component connected to the current component, if the component identifier of the next component does not exist in the set of visited component identifiers, then adding the component identifier of the next component to the set of visited component identifiers and the current connection path, and continuing the search; and if the next component is an end component, or the component identifier of the next component already exists in the set of visited component identifiers, then terminating the current search branch.
[0090] Optionally, in one embodiment, the parsing module includes: an extraction unit, used to extract system type description, range description, device description, and output requirements from the natural language statistical instructions; a processing unit, used to perform terminology normalization, synonym mapping, and default completion on the extraction results using the preset knowledge base to obtain the statistical parameters; the first output module includes: a first statistics unit, used to count the total number of target terminal devices; a second statistics unit, used to count the number of target terminal devices corresponding to each connection path; and an output unit, used to output the statistical results according to the output requirements.
[0091] Example 3
[0092] This embodiment also provides a computer device, such as a smartphone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server, or cabinet server (including a standalone server or a server cluster composed of multiple servers), etc., capable of executing programs. Figure 3 As shown, the computer device 01 in this embodiment includes, but is not limited to, a memory 012 and a processor 011 that can be interconnected via a system bus, such as... Figure 3 As shown. It should be noted that, Figure 3 Only a computer device 01 with component memory 012 and processor 011 is shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0093] In this embodiment, the memory 012 (i.e., the readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 012 may be an internal storage unit of the computer device 01, such as the hard disk or memory of the computer device 01. In other embodiments, the memory 012 may also be an external storage device of the computer device 01, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 01. Of course, the memory 012 may include both the internal storage unit and its external storage device of the computer device 01. In this embodiment, the memory 012 is typically used to store the operating system and various reference software installed on the computer device 01, such as the program code of the end device statistical device of the electromechanical system model based on natural language in Embodiment 2. In addition, memory 012 can also be used to temporarily store various types of data that have been output or will be output.
[0094] In some embodiments, processor 011 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. Processor 011 is typically used to control the overall operation of computer device 01. In this embodiment, processor 011 is used to run program code stored in memory 012 or process data, such as statistical methods for end-device devices based on natural language electromechanical system models.
[0095] Example 4
[0096] This embodiment also provides a computer-readable storage medium, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, server, App reference store, etc., which stores a computer program. When the program is executed by a processor, it implements the corresponding function. The computer-readable storage medium of this embodiment is used to store a natural language-based electromechanical system model end-device statistics device. When executed by a processor, it implements the natural language-based electromechanical system model end-device statistics method of Embodiment 1.
[0097] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0098] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0099] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0100] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A statistical method for end-devices in an electromechanical system model based on natural language, characterized in that, include: Obtain the BIM model of the electromechanical system, wherein the BIM model includes components, the connection relationships between components, and the attribute information of the components; Receive natural language statistical commands input by the user; The natural language statistical instructions are semantically parsed according to a preset knowledge base to obtain statistical parameters, wherein the statistical parameters include target system type, starting object screening range and end device statistical conditions; Based on the target system type and preset business rules, determine the starting object limitation parameters corresponding to the target system type; In the BIM model, select starting objects that meet the starting object limiting parameters within the starting object selection range to obtain a set of starting objects; For each starting object in the set of starting objects, a search branch is established. In the search branch, starting from the starting object, the connected components in the BIM model are recursively searched according to the connection relationship. The search terminates when the end component is found or the duplicate component is found, so as to obtain a set of candidate components and record the connection path found by the search branch. Components that meet the statistical conditions of the end device are selected from the candidate component set to obtain the target end device; and Statistical results are output based on the selected target terminal devices.
2. The statistical method for end-devices in an electromechanical system model based on natural language as described in claim 1, characterized in that, The steps for determining the starting object constraint parameters corresponding to the target system type based on the target system type and preset business rules include: Determine the major to which the target system type belongs; Invoke the starting object determination rule corresponding to the major; The starting object limiting parameters are determined according to the starting object determination rules.
3. The statistical method for end-devices of electromechanical system models based on natural language according to claim 2, characterized in that, The steps for determining the starting object limiting parameters according to the starting object determination rules include: When the target system type is a high-voltage system, the parameters corresponding to the distribution cabinet or distribution box are determined as the starting object limiting parameters; When the target system type belongs to a low-voltage system, the parameters corresponding to the low-voltage cabinet are determined as the starting object limiting parameters; When the target system type is an automatic fire alarm system, the parameters corresponding to the fire cabinet are determined as the starting object limiting parameters; When the target system type is a water heating system, the system receives a user-specified component and determines the parameters corresponding to the connection point between the specified component and the water pipe as the starting object limiting parameters.
4. The statistical method for end-devices of electromechanical system models based on natural language as described in claim 1, characterized in that, The statistical conditions for the terminal devices include at least one of the following: target terminal device category, spatial range of the target terminal device, system classification of the target terminal device, and statistical criteria determined based on preset business rules; The step of selecting components that meet the statistical conditions of the end device from the candidate component set includes: filtering the candidate component set according to the attribute information of the component, and removing components whose attribute information does not meet the statistical conditions of the end device.
5. The statistical method for end-devices in an electromechanical system model based on natural language as described in claim 1, characterized in that, The method includes: After obtaining the statistical parameters, a statistical tool and descriptive information for the statistical tool are generated; Output the description information of the statistical tool; When a user confirms the description information of the statistical tool, the statistical tool is run, wherein the steps of performing end-device statistics based on the statistical parameters and outputting the statistical results are executed by running the statistical tool; When a user confirms the statistical results, the statistical tool is stored and a control is generated to trigger its operation; and When a user interacts with the control, the statistics tool is run.
6. The statistical method for end-devices in an electromechanical system model based on natural language as described in claim 1, characterized in that, In the search branch, the step of recursively searching for connected components in the BIM model based on the connection relationship, starting from the initial object, includes: Establish a set of visited component identifiers; When the next component connected to the current component is found, if the component identifier of the next component does not exist in the set of visited component identifiers, then the component identifier of the next component is added to the set of visited component identifiers and the current connection path, and the search continues; and If the next component is an end component, or the component identifier of the next component already exists in the set of visited component identifiers, then the current search branch is terminated.
7. The statistical method for end-devices in an electromechanical system model based on natural language as described in claim 1, characterized in that, The steps of semantically parsing the natural language statistical instructions according to the preset knowledge base to obtain statistical parameters include: extracting system type description, range description, device description and output requirements from the natural language statistical instructions; and using the preset knowledge base to perform terminology normalization, synonym mapping and default completion on the extracted results to obtain the statistical parameters. The steps for outputting statistical results based on the selected target terminal devices include: counting the total number of target terminal devices; counting the number of target terminal devices corresponding to each connection path; and outputting the statistical results according to the output requirements.
8. A statistical device for end-devices in an electromechanical system model based on natural language, characterized in that, include: The acquisition module is used to acquire the BIM model of the electromechanical system, wherein the BIM model includes components, the connection relationships between components, and the attribute information of the components; The receiving module is used to receive natural language statistical instructions input by the user; The parsing module is used to perform semantic parsing on the natural language statistical instructions according to a preset knowledge base to obtain statistical parameters, wherein the statistical parameters include target system type, starting object screening range and end device statistical conditions; The first determining module is used to determine the starting object limiting parameters corresponding to the target system type based on the target system type and preset business rules; The first filtering module is used to filter the starting objects in the BIM model that meet the starting object limiting parameters within the starting object filtering range, and obtain a set of starting objects. The search module is used to establish a search branch for each starting object in the set of starting objects. In the search branch, starting from the starting object, the connected components in the BIM model are recursively searched according to the connection relationship. The search terminates when the end component is found or the duplicate component is found, so as to obtain a set of candidate components and record the connection path found by the search branch. The second filtering module is used to filter components that meet the statistical conditions of the end device from the candidate component set to obtain the target end device; and The first output module is used to output statistical results based on the selected target terminal devices.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, 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 7.
10. 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 7.