Recommendation system and electric appliance drawing recommendation method
Through the recommendation system, the automatic generation or recommendation of electrical drawings is solved, and the problems of low design efficiency and high error rate of power switch cabinets are realized, and the efficient and low error rate of electrical drawing design is achieved.
Patent Information
- Application Number
- CN202510526480.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-08-05
AI Technical Summary
The primary system diagram and secondary wiring diagram of existing power switch cabinets are inefficient and have high error rates, which mainly rely on manual drawing to lead to low efficiency and high error rates.
Through the recommendation system, the processor is used to query the database or calculate the similarity, generate or recommend secondary wiring diagrams, combine the combined drawing model and large model, and automatically provide electrical drawings.
It improves the design efficiency of electrical drawings, reduces the design error rate, and realizes automatic drawing generation and recommendation.
Smart Images

Figure CN120429338A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a recommendation system, and in particular to a recommendation system and an electrical appliance drawing recommendation method for recommending electrical appliance drawings. Background Art
[0002] Power switchgear is a device used in power systems. It distributes electrical energy, controls circuits, and protects electrical equipment from overloads, short circuits, and other faults. Generally, power switchgear is designed and maintained based on a primary system diagram and a secondary wiring diagram. These diagrams illustrate the main circuit connections and control circuit connections of the power system, respectively. However, because these diagrams are currently manually drawn, they are inefficient and prone to errors. Summary of the Invention
[0003] An embodiment of the present invention provides a method for recommending electrical appliance drawings, which can automatically recommend or generate drawings, thereby improving the design efficiency of drawings.
[0004] An electrical appliance drawing recommendation method according to an embodiment of the present invention includes the following steps: A processor queries a database based on key data of input data to obtain a query result. The input data includes at least one of a primary system diagram, text data, an equipment list, and keyword data. The processor outputs a secondary wiring diagram drawing as a recommendation result based on the query result, or calculates the similarity between the feature vector of the input data and the database to obtain a secondary similar drawing. The processor outputs a secondary similar drawing that meets a first similarity threshold as a recommendation result, or executes at least one of a combined drawing model and a large model to generate a secondary wiring diagram drawing based on the input data as a recommendation result.
[0005] An embodiment of the present invention also provides another recommendation system. The recommendation system includes a storage device and a processor. The storage device stores a database. The processor is coupled to the storage device. The processor is configured to execute the aforementioned electrical appliance drawing recommendation method.
[0006] Based on the above, the recommendation system and electrical appliance drawing recommendation method of the embodiments of the present invention can query a database based on various forms of input data to obtain matching drawings as recommendation results. Alternatively, based on the calculated similarity, the recommendation system can obtain similar drawings as recommendation results, or generate new drawings based on these similar drawings as recommendation results. In this way, the recommendation system can automatically provide electrical appliance drawings based on user needs, thereby improving design efficiency and reducing error rates.
[0007] In order to make the above features and advantages of the present invention more clearly understood, embodiments are given below with reference to the accompanying drawings for detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 is a block diagram of a recommendation system according to an embodiment of the present invention;
[0009] Figure 2 is a flow chart of a method for recommending electrical appliance drawings according to another embodiment of the present invention;
[0010] Figure 3A is a block diagram of a recommendation system according to another embodiment of the present invention;
[0011] Figure 3B According to the present invention Figure 3A A flow chart of the electrical appliance drawing recommendation method illustrated in the embodiment;
[0012] Figure 4 According to the present invention Figure 3A A flow chart of the electrical appliance drawing recommendation method illustrated in the embodiment;
[0013] Figure 5 According to the present invention Figure 3A A flow chart of the electrical appliance drawing recommendation method illustrated in the embodiment;
[0014] Figure 6 According to the present invention Figure 3A A flow chart of the electrical appliance drawing recommendation method illustrated in the embodiment;
[0015] Figure 7 According to the present invention Figure 3A A flow chart of the electrical appliance drawing recommendation method illustrated in the embodiment;
[0016] Figure 8 According to the present invention Figure 7 A flow chart of the electrical appliance drawing recommendation method illustrated in the embodiment;
[0017] Figure 9 According to the present invention Figure 3A A flow chart of the electrical appliance drawing recommendation method illustrated in the embodiment;
[0018] Figure 10 According to the present invention Figure 9 A flow chart of a method for recommending electrical appliance drawings is shown in the embodiment.
[0019] Explanation of Figure Numbers
[0020] 100, 300: recommendation system;
[0021] 110, 310: processor;
[0022] 120, 320: storage device;
[0023] 121, 321: combined drawing model;
[0024] 122, 322: large model;
[0025] 200: application system;
[0026] 311: original data storage layer;
[0027] 312: data processing layer;
[0028] 313: vector database layer;
[0029] 314: AI model layer;
[0030] 315: Drawing recommendation service layer;
[0031] 316: user interface and interaction layer;
[0032] 323: threshold model;
[0033] 324: Identification and separation model;
[0034] 325: Custom field extraction model;
[0035] 711: Project files;
[0036] 712: Bill of Materials;
[0037] 713: Primary system diagram;
[0038] 714: Secondary wiring diagram;
[0039] 1011: primary system diagram;
[0040] 1012: Project files;
[0041] 1013: Equipment list;
[0042] 1021: primary metadata;
[0043] DB: database;
[0044] DIN: input data;
[0045] DOUT: recommendation results;
[0046] S210-S230, S310-S392, S410-S482, S510-S570, S610-S670, S721-S740, S810-S840, S910-S960, S1021-S1060: steps;
[0047] UR: user. DETAILED DESCRIPTION
[0048] Reference will now be made in detail to exemplary embodiments of the present invention, examples of which are illustrated in the accompanying drawings. Whenever possible, the same reference numerals are used in the drawings and the description to refer to the same or like parts.
[0049] Figure 1 FIG is a block diagram of a recommendation system according to an embodiment of the present invention. Figure 1 , the recommendation system 100 can be applied in industries such as engineering design, construction, and machinery manufacturing. The recommendation system 100 can execute artificial intelligence models 121-122 to recommend electrical drawings (i.e., recommendation results DOUT) based on the input data DIN. The electrical drawings indicate the power layout design of the power switchgear system. The electrical drawings include secondary wiring diagram drawings and / or primary system diagram drawings. The primary system diagram drawings show the physical connection relationship of the main electrical equipment in the high-voltage or low-voltage system, thereby reflecting the basic path of power flow. The secondary wiring diagram drawings show the connection of the internal components of the control system, thereby realizing the monitoring and control of the primary system. The connections include the connections between auxiliary equipment (for example, relays and instruments).
[0050] exist Figure 1 In one embodiment, the recommendation system 100 includes a processor 110 and a storage device 120. The processor 110 is coupled to the storage device 120 and the application system 200. The task management system 100 can be provided in the cloud. The task management system 100 can be, for example, a Platform as a Service (PaaS) server that executes corresponding PaaS applications through an Application Programming Interface (API).
[0051] In this embodiment, a user can operate an electronic device to call the recommendation system 100 via an API, thereby providing appliance drawings (i.e., recommendation results DOUT) through the recommendation system 100. The user can also operate an electronic device to call the application system 200 via an API, thereby executing various business services through the application system 200. The electronic device may be, for example, a mobile phone, tablet computer, laptop computer, or desktop computer. The application system 200 may be, for example, an enterprise resource planning (ERP) system.
[0052] In this embodiment, the storage device 120 stores a database (DB), a combined drawing model 121, and a large language model (LLM) 122. The database (DB) may include, for example, a relational database (e.g., MySQL), a vector database (e.g., Milvus), and a document center (e.g., DMC). The combined drawing model 121 may, for example, be a model using reinforcement learning to generate secondary wiring diagrams. The large model 122 is used to generate secondary wiring diagrams, primary system diagrams, and improvement suggestions for the drawings.
[0053] In this embodiment, the storage device 120 also stores computing software and other related algorithms, programs, and data used to implement the query, training, and inference model functions, various calculations, and software execution functions of the present invention. The storage device 120 may be, for example, dynamic random access memory (DRAM), flash memory, non-volatile random access memory (NVRAM), or a combination of these memories.
[0054] In this embodiment, the processor 110 accesses the storage device 110 and executes various data and models 121-122 stored in the storage device 110, as well as data (e.g., input data DIN) from the application system 200. The processor 110 may be, for example, a signal converter, a field programmable gate array (FPGA), a central processing unit (CPU), or other programmable general-purpose or special-purpose microprocessor, digital signal processor (DSP), programmable controller, application-specific integrated circuit (ASIC), programmable logic device (PLD), or other similar devices or combinations thereof. The processor 110 may load and execute computer program-related firmware or software to perform functions such as querying, training, and inferring models, as well as various computations.
[0055] Figure 2 FIG is a flow chart of a method for recommending electrical drawings according to another embodiment of the present invention. Figure 1 as well as Figure 2The recommendation system 100 executes steps S210 to S230 to implement the electrical appliance drawing recommendation method. The order of these steps S210 to S230 is only for illustration.
[0056] In this embodiment, a user operates an electronic device to provide input data DIN, and the recommendation system 100 is invoked to obtain drawings corresponding to the input data DIN (i.e., recommendation results DOUT). The input data DIN includes at least one of a primary system diagram, text data, a list of equipment, and keyword data. Thus, a user can import a primary system diagram or a list of materials as input data DIN. Alternatively, the user can input text information or keywords as input data DIN.
[0057] In step S210, processor 110 queries database DB based on key data in input data DIN to obtain query results. Specifically, processor 110 analyzes key data in input data DIN. Key data may include, for example, keywords such as the name, model, component name, or component parameters of the electrical device. Based on the key data, processor 110 queries database DB for related data.
[0058] In step S220, the processor 110 outputs a secondary wiring diagram as a recommendation result DOUT based on the query result. Alternatively, based on the query result, the processor 110 calculates the similarity between the feature vector of the input data DIN and the database DB to obtain similar secondary wiring diagrams (hereinafter referred to as secondary similar diagrams).
[0059] Specifically, when the query result indicates that the processor 110 has found data, it means that the database DB has stored all data associated with the key data of the input data DIN. In this way, the processor 110 obtains a secondary wiring diagram that matches the input data DIN.
[0060] On the other hand, if the query result indicates that processor 110 has not found any data, this indicates that database DB does not store all the data associated with the key data of input data DIN. In this case, processor 110 extracts a feature vector of input data DIN. Based on this feature vector, processor 110 searches database DB for a similar vector. In this way, processor 110 retrieves a drawing that matches the similar vector as a secondary similar drawing.
[0061] At step S230, processor 110 outputs secondary similar drawings that meet a first similarity threshold as recommendation result DOUT. Alternatively, for secondary similar drawings that do not meet the first similarity threshold, processor 110 executes at least one of combined drawing model 121 and large model 122 to generate a secondary wiring diagram drawing based on input data DIN as recommendation result DOUT. The first similarity threshold may be, for example, a preset threshold indicating the degree of similarity between the drawing and a preset secondary wiring diagram drawing.
[0062] Specifically, when the secondary similarity diagram meets the first similarity threshold, processor 110 selects the secondary similarity diagram as recommendation result DOUT. On the other hand, when the secondary similarity diagram does not meet the first similarity threshold, processor 110 executes combined diagram model 121 and / or large model 122. By executing artificial intelligence models 121-122, processor 110 generates a secondary wiring diagram that matches input data DIN as recommendation result DOUT.
[0063] It's worth noting that the recommendation system 100 can operate based on input data DIN in various data formats, thereby improving the efficiency and operational flexibility of recommended drawings. By querying the database DB, the recommendation system 100 can obtain matching secondary wiring diagrams as recommendation results DOUT. Alternatively, by calculating similarity, the recommendation system 100 can obtain similar drawings as recommendation results DOUT. The recommendation system 100 can also generate new drawings based on similar drawings as recommendation results DOUT. In this way, the recommendation system 100 can automatically provide electrical appliance drawings based on the user's specific needs, thereby improving design efficiency and reducing error rates.
[0064] Figure 3A FIG is a block diagram of a recommendation system according to another embodiment of the present invention. Figure 3A The recommendation system 300 includes a processor 310 and a storage device 320. The storage device 320 stores a database DB, a combination drawing model 321, and a large model 322. The processor 310 and the storage device 320 can refer to the description of the recommendation system 100 and be analogous thereto.
[0065] Expressed in a framework model, the recommendation system 300 includes an original data storage layer 311 , a data processing layer 312 , a vector database layer 313 , an AI model layer 314 , a drawing recommendation service layer 315 , and a user interface and interaction layer 316 .
[0066] In this embodiment, the original data storage layer 311 is used to construct a data table model and store drawing-related information. This allows the original data storage layer 311 to efficiently and securely store historical drawings and other related information. The original data storage layer 311 provides stored data to upper layers to support various functions of the data processing layer 312, including data processing, querying, model training, and recommendation algorithms.
[0067] In this embodiment, the data processing layer 312 is used to perform operations such as data cleaning, data conversion, vectorization, and data storage on the data (e.g., the data stored in the original data storage layer 311). In this way, the data processing layer 312 provides high-quality data as input for subsequent model training and recommendation algorithms.
[0068] In this embodiment, the vector database layer 313 is used to store vectorized project design files, vectorized bills of materials, and feature data for various vectorized drawings. The vector database layer 313 is also used to construct efficient vector indexes. Thus, the vector database layer 313 provides vector data to support large-scale vector similarity queries.
[0069] In this embodiment, the AI model layer 314 includes models that apply artificial intelligence, such as a combination drawing model (i.e., a secondary wiring drawing generation model) 321, a large model 322, a threshold model 323, a recognition and separation model 324, and a custom field extraction model 325.
[0070] In this embodiment, the drawing recommendation service layer 315 can be used as an API interface. The drawing recommendation service layer 315 is used to process input data (e.g., Figure 1 The drawing recommendation service layer 315 is also used to extract the feature vector of the data and call the vector database layer 313 or the AI model layer 314 according to the feature vector to obtain the drawing information. The drawing recommendation service layer 315 is also used to convert the data according to the drawing information and process it into a result acceptable to the user as a recommendation result (for example, Figure 1 The recommendation result DOUT shown is further returned to the front-end page.
[0071] In this embodiment, the user interface and interaction layer 316 is used to provide an intuitive user interface. Thus, the user can conveniently provide input information through the user interface and interaction layer 316 to implement keyword search, list search, text input search, and drawing import operations, thereby obtaining corresponding drawings.
[0072] Figure 3B According to the present invention Figure 3AFlowchart of the electrical appliance drawing recommendation method shown in the embodiment. Figure 3A as well as Figure 3B , the recommendation system 300 executes steps S310 to S392 to perform the electrical appliance drawing recommendation method.
[0073] In step S310, the user UR provides input data (e.g., Figure 1 The processor 310 receives the input data DIN. The input data may have various formats.
[0074] When the input data includes keyword data, the user interface and interaction layer 316 performs a keyword query function. The keyword data may be, for example, a brand system, device type, or device name. Processor 310 proceeds to step S321. In step S321, processor 310 processes the keyword data (e.g., standardizes the data) and extracts key data from the processed data. Processor 310 proceeds to step S331.
[0075] When the input data includes an equipment list, the user interface and interaction layer 316 performs a list query function. The equipment list can be, for example, a bill of materials in Excel format. Processor 310 proceeds to step S321. In step S321, processor 310 processes the bill of materials and extracts key data from the processed data. This data processing involves processor 310 parsing the bill of materials using a POI function library, extracting parameter data for key components, and performing standardized data processing on the parsed parameter data. Processor 310 proceeds to step S331.
[0076] When the input data includes text data, the user interface and interaction layer 316 performs a text input query function. Processor 310 proceeds to step S321. In step S321, processor 310 processes the text data and extracts key data from the processed data. This data processing includes processor 310 performing word segmentation and named entity recognition on the text data using the spaCy library based on natural language processing (NLP), and performing standardized data processing on the recognized text data. Processor 310 proceeds to step S331.
[0077] When the input data includes a primary system diagram, the user interface and interaction layer 316 performs a drawing import function. The primary system diagram may be, for example, a drawing file in DWG format. The processor 310 proceeds to step S322 or S341. In step S322, the processor 310 processes the primary system diagram and extracts key data from the processed data. The key data conforms to known features such as the name or device model. The data processing includes the processor 310 using the ezdxf function library to read and parse the primary system diagram and extract key data from the parsed drawing file. The processor 310 proceeds to step S331.
[0078] In step S331 , the processor 310 constructs an SQL statement according to the key data in step S321 or S322 , and searches the database DB for data associated with the key data according to the SQL statement to generate a query result.
[0079] In step S332, the processor 310 determines whether any data is found in the query result in step S331. If the determination result is yes, the processor 310 proceeds to step S333.
[0080] In step S333, the processor 310 obtains a secondary wiring diagram that matches the found data (ie, data associated with the key data of the input data) and outputs the secondary wiring diagram as a recommendation result to the electronic device operated by the user UR.
[0081] On the other hand, when the judgment result is no, the processor 310 proceeds to step S334. In step S334, the processor 310 uses a natural language model (eg, an Embedding model) to extract a feature vector of the key data in step S321 or S322. The processor 310 proceeds to step S350.
[0082] In step S350, the processor 310 searches for similar vectors in the database DB according to the feature vector in step S334, and obtains secondary similar drawings accordingly. The processor 310 may, for example, perform an approximate nearest neighbor search (ANN) to implement similarity query. That is, the processor 310 calculates the similarity between the feature vector and various vector data in the database DB. Based on the calculated similarity, the processor 310 accesses the drawing information including the feature vector as a secondary similar drawing. The secondary similar drawings may, for example, be plural and include the top 10 most similar feature vectors. The processor 310 continues with steps S361 to S362.
[0083] In step S361, processor 310 calculates the cosine similarity between the secondary similar drawings in step S350 and the various vector data in database DB to generate a similarity result. The similarity result includes similarity vectors and their corresponding similarity scores. In other words, processor 310 calculates the cosine similarity between each feature vector in the secondary similar drawings and the various vector data in database DB to generate a similarity score.
[0084] In step S362, the processor 310 determines whether the similarity result satisfies the similarity threshold (ie, Figure 2 In other words, the processor 310 determines whether the similarity score of the secondary similar drawings is within a preset range. If the determination result is yes, the processor 310 proceeds to step S363.
[0085] In step S363, the processor 310 outputs the secondary wiring diagram as a recommendation result to the electronic device operated by the user UR and updates the database DB with the secondary wiring diagram.
[0086] On the other hand, when the result of the determination in step S362 is negative, the processor 310 proceeds to step S370 . In step S370 , the processor 310 executes the combined drawing model 321 .
[0087] Specifically, in step S370, the processor 310 executes the combined drawing model 321 to convert the feature vector of the input data into an input parameter format that conforms to the combined drawing model 321 and generates a secondary wiring diagram accordingly. Simultaneously, the processor 310 updates the database DB with the secondary wiring diagram.
[0088] In step S380, the processor 310 determines whether the combined drawing model 321 generates a secondary wiring diagram. If yes, the processor 310 outputs the secondary wiring diagram as a recommendation result to the electronic device operated by the user UR.
[0089] On the other hand, if the result of the judgment is negative, processor 310 proceeds to steps S391-S392. In step S391, processor 310 executes large model 322. Specifically, processor 310 executes large model 322 to generate a secondary wiring diagram drawing using a text-to-image model based on the input data and database DB. The text-to-image model may be, for example, the DALL·E2StableDiffusion model. Simultaneously, processor 310 updates database DB with the secondary wiring diagram drawing.
[0090] In step S392, the processor 310 checks the rules of the secondary wiring diagram generated in step S391 to confirm that it complies with the appliance rules. After confirmation, the processor 310 outputs the secondary wiring diagram as a recommendation result to the electronic device operated by the user UR.
[0091] In this embodiment, when the input data includes a primary system diagram, the processor 310 may proceed to step S341. In step S341, the processor 310 executes computer-aided design (CAD) to derive an input image based on the primary system diagram in the input data. The CAD may be, for example, AutoCAD. Specifically, the processor 310 converts the primary system diagram into a unified image format (e.g., PNG format) using AutoCAD.
[0092] In step S342, the processor 310 executes a neural network model to extract a feature vector of the image input in step S341. The neural network model may be, for example, a Residual Neural Network (ResNet) model based on a Convolutional Neural Network (CNN).
[0093] In step S350, the processor 310 calculates the similarity between the feature vector in step S342 and various vector data in the database DB to obtain a secondary similar drawing. The processor 310 then proceeds to steps S361 to S392.
[0094] Figure 4 According to the present invention Figure 3A Flowchart of the electrical appliance drawing recommendation method shown in the embodiment. Figure 3A as well as Figure 4 , the recommendation system 300 performs steps S410 to S490 to illustrate the Figure 3B The operation details of performing the combined drawing model 321 are described in detail (ie, step S370).
[0095] In step S410, processor 310 accesses data from database DB and performs data cleaning and preprocessing on the data to form a standardized data structure. Specifically, processor 310 retrieves separated related components from database DB. These related components may be, for example, various electrical components. Processor 310 performs missing value processing and outlier detection and processing on these related components to form a standardized data structure.
[0096] In step S420, the processor 310 performs feature engineering based on the data structure in step S410 to retain key data. Specifically, the processor 310 extracts key features of the standardized data structure and performs principal component analysis (PCA) to reduce the dimension of the key features to obtain multiple components.
[0097] In step S430, processor 310 converts the multiple components in step S420 to obtain a dataset and divides the dataset into a training set, a validation set, and a test set. Processor 310 uses the training set to train combined drawing model 321, causing combined drawing model 321 to perform layout initialization, line connection, and layout optimization based on the training set. Processor 310 uses the validation set to adjust and optimize the parameters of combined drawing model 321. Processor 310 uses the test set to evaluate the performance of combined drawing model 321. In this manner, combined drawing model 321 completes training.
[0098] In step S440, the processor 310 executes the combined drawing model 321 to generate a design solution based on the drawings (e.g., the secondary similar drawings in step S362), the appliance rule library DB2, and the dataset DB. The reinforcement learning model can be, for example, a generative adversarial network (GAN) model.
[0099] In this embodiment, the electrical appliance rule base DB2 may be integrated into the database DB. The electrical appliance rule base DB2 includes layout rules such as component rules, cable path rules, grounding system rules, protection device rules, and wiring specification rules.
[0100] Specifically, processor 310 executes combined drawing model 321 to access electrical engineering standards and establish an electrical appliance rule library DB2 based on them. Combined drawing model 321 converts the rules in electrical appliance rule library DB2 into data that it can understand and apply. Combined drawing model 321 uses a GAN model based on electrical appliance rule library DB2 and the dataset in step S430 to generate a design solution that complies with the layout rules based on the secondary similarity drawings. Combined drawing model 321 executes an optimization algorithm (e.g., a genetic algorithm and / or a particle swarm optimization algorithm) to optimize various parameters.
[0101] In step S450, the processor 310 executes the combined drawing model 321 to execute the rule checking engine to calculate the rule checking pass rate of the design solution in step S440 according to the appliance rule base DB2. The rule checking engine may be, for example, a Drools engine.
[0102] In step S460, processor 310 executes combined drawing model 321 to determine whether the rule verification pass rate in step S450 meets the pass rate threshold. The rule verification pass rate is used to verify whether the drawing meets the layout rules. The pass rate threshold can be, for example, a preset threshold and is used to determine whether the coverage ratio between the drawing and drawings that meet the layout rules meets the requirements. If the judgment result is yes, processor 310 proceeds to step S470.
[0103] In step S470, processor 310 executes combined drawing model 321 to simulate the secondary wiring diagram according to the design solution in step S440 to generate a simulation result. Specifically, combined drawing model 321 executes at least one of the ETAP simulation tool, the RMS simulator, and the SIMULIA simulation tool according to the design solution to simulate the secondary wiring diagram corresponding to the design solution.
[0104] In step S480 , when the rule verification pass rate in step S460 satisfies the pass rate threshold, the processor 310 executes the combined drawing model 321 to receive the user UR's improvement suggestions for the simulation result in step S470 .
[0105] At step S490, processor 310 executes combined drawing model 321 to verify the pass rate according to the rule that satisfies the pass rate threshold, and combines the improvement suggestions from step S480 with the components and connections in the design solution from step S440 to generate a secondary wiring diagram (i.e., the secondary wiring diagram recommended in step S380). Simultaneously, combined drawing model 321 stores the generated secondary wiring diagram in database DB to update database DB.
[0106] On the other hand, when the rule check pass rate in step S460 does not meet the pass rate threshold, the processor 310 provides some improvement suggestions for the drawings that do not meet the layout rules. The processor 310 continues to step S470 and step S481 or S482.
[0107] In step S481, the processor 310 executes the combined drawing model 321 to use the preset suggestions as the improvement suggestions in step S480. The combined drawing model 321 proceeds to step S490.
[0108] In step S481, the processor 310 executes the combined drawing model 321 to execute the large model 322 to generate improvement suggestions based on the simulation results in step S470 and the appliance rule base DB2. The combined drawing model 321 uses the improvement suggestions as the improvement suggestions in step S480 and proceeds to step S490.
[0109] That is, if the rule verification pass rate is between 80% and 100% but does not meet the pass rate threshold, for example, the combined drawing model 321 simulates the secondary wiring diagram according to the design solution in step S440 to generate a simulation result. The combined drawing model 321 can access the appliance rule library DB2 to obtain preset improvement suggestions. Alternatively, the combined drawing model 321 inputs the problem information indicated by the simulation results into the large model 322 to generate improvement suggestions.
[0110] Figure 5 According to the present invention Figure 3A Flowchart of the electrical appliance drawing recommendation method shown in the embodiment. Figure 3A as well as Figure 5 , the recommendation system 300 executes steps S510 to S570 through the processor 310 to illustrate Figure 3B The operation details of the large model 322 are executed in (ie, step S391).
[0111] In step S510, the processor 310 executes the large model 322 to access the data in the database DB and obtain project information, drawing information, and equipment list information. The drawing information includes secondary wiring diagrams, primary system diagrams, and text descriptions of various drawings.
[0112] In step S520, the large model 322 performs data cleaning and preprocessing on the various information acquired in step S510 to form a standardized data structure. Furthermore, the large model 322 also performs data cleaning and preprocessing on the input data (e.g., the input data in step S310) to form a standardized data structure. The input data may be, for example, user-provided keyword data, a device list, text data, or a primary system diagram.
[0113] In step S530, the large model 322 executes a text-to-image model (e.g., the DALLE 2Stablediffusion model) based on the data structure standardized in step S520 and the various components in the database DB to generate a secondary wiring diagram. Furthermore, the large model 322 may also execute a text-to-image model based on the standardized data structure and various components to generate a primary system diagram.
[0114] In step S540, the large model 322 loads a pre-trained model. A pre-trained model is a model that has been trained based on a large-scale dataset. The pre-trained model may be, for example, a pre-trained Residual Neural Network (ResNet) model.
[0115] In step S550 , the large model 322 fine-tunes various parameters of the large model 322 according to the training result in step S540 .
[0116] In step S560, the trained large model 322 executes the text-to-image model to generate a drawing based on the standardized data structure and various components in the database DB. Based on the instruction information corresponding to the standardized data structure, the trained large model 322 generates a secondary wiring diagram drawing or a primary system diagram drawing.
[0117] In step S570 , the trained large model 322 is further evaluated and iterated to adjust the parameters of the large model 322 .
[0118] Figure 6 According to the present invention Figure 3A Flowchart of the electrical appliance drawing recommendation method shown in the embodiment. Figure 3A as well as Figure 6 , the recommendation system 300 executes steps S610 to S680 through the processor 310, which is used to illustrate the details of the operation of the processor 310 executing the threshold model 323. The threshold model 323 is used to set Figure 3B The similarity threshold in step S362.
[0119] In step S610 , the processor 310 executes the threshold model 323 to access data such as project files, drawings, and equipment lists in the database DB.
[0120] In step S620, processor 310 executes threshold model 323 to divide the data accessed in step S610 into training data and validation data. Processor 310 uses the training data to train threshold model 323, so that threshold model 323 performs layout optimization based on the training data to determine whether the layout is reasonable. Processor 310 uses the validation data to adjust and optimize the parameters of threshold model 323.
[0121] In step S630 , the threshold model 323 executes the TF-IDF algorithm to extract feature vectors of the training data.
[0122] In step S640 , the threshold model 323 calculates the similarity between the feature vectors of the training data in step S630 .
[0123] In step S650 , the threshold model 323 executes the TF-IDF algorithm to extract feature vectors of the verification data.
[0124] In step S660, the threshold model 323 calculates the similarity (eg, cosine similarity) between the feature vector of the training data and the feature vector of the verification data as a similarity threshold. The similarity threshold may be, for example, Figure 2The first similarity threshold of the embodiment may also be, for example, the similarity threshold in step S362.
[0125] In step S670 , the threshold model 323 receives the user's rating and feedback regarding the first similarity threshold in step S660 .
[0126] In step S680, the threshold model 323 dynamically adjusts the first similarity threshold based on the user feedback in step S670. Specifically, based on the user feedback, the threshold model 323 evaluates and sets the various similarities calculated. The threshold model 323 calculates statistical results, such as the average and standard deviation of the various similarities, and sets the optimal similarity based on the statistical results as the similarity threshold (e.g., the first similarity threshold).
[0127] Figure 7 According to the present invention Figure 3A Flowchart of the electrical appliance drawing recommendation method shown in the embodiment. Figure 3A as well as Figure 7 The recommendation system 300 executes steps S721 to S752 according to various data 711 to 714 through the original data storage layer 311 and the vector database layer 313, so as to illustrate how the recommendation system 300 constructs a data source for the secondary wiring diagram in the database DB.
[0128] In step S721, the processor 310 accesses the project file 711 and converts the project file 711 into project feature information. The project feature information includes project key information, project feature type, equipment name and other information. In detail, the processor 310 converts the project design file into a plain text format. The processor 310 performs text cleaning on the project design file after format conversion. Then, the processor 310 executes a neural network model (e.g., an NLP model or a Word2vec model) to extract keywords from the project design file. The processor 310 performs deduplication and standardized data processing on the keywords as project feature information.
[0129] In step S722, processor 310 accesses bill of materials 712 and converts it into structured data. BOM 712 may, for example, be the BOM corresponding to the secondary wiring diagram and is in Excel format. Specifically, processor 310 organizes BOM 712 according to a bill template and parses it. Processor 310 extracts the names and model numbers of key components from BOM 712 to construct the structured data.
[0130] In step S723, processor 310 accesses secondary wiring diagram 714 and the primary system diagram 713 corresponding to secondary wiring diagram 714, and obtains the storage addresses of these drawings 713-714. Specifically, processor 310 uploads the accessed secondary wiring diagram 714 and primary system diagram 713 to a database (e.g., a document center (DMC)). Processor 310 obtains the storage Uniform Resource Locator (URL) of the secondary wiring diagram and the storage URL of the primary system diagram from the DMC.
[0131] In step S730 , the processor 310 constructs a relationship among the project file 711 , the secondary wiring diagram 714 , the primary system diagram 713 corresponding to the secondary wiring diagram 714 , and the bill of materials 712 to form metadata (hereinafter referred to as secondary metadata).
[0132] In step S740, processor 310 constructs a data table model based on the secondary metadata generated in step S730. The data table model is used to define the entities and entity relationships of the secondary metadata and initialize the data table data definition language (DDL). The data table model includes a project table, a drawing table, a bill of materials table, and a table that relates the drawing to the bill of materials. The data generated in steps S721-S723 is stored in these tables.
[0133] Furthermore, processor 310 extracts feature vectors of the secondary metadata using a natural language model (e.g., an embedding model). Processor 310 stores the feature vectors of the secondary metadata in a database (e.g., Milvus). Processor 310 also constructs a vector index and stores the correspondence between the secondary metadata and the feature vectors of the secondary metadata in the database (e.g., a dictionary table).
[0134] In step S751, the processor 310 accesses the secondary wiring diagram 714 and the primary system diagram 713 corresponding to the secondary wiring diagram 714, and executes a computer-aided design (e.g., AutoCAD) program to derive a corresponding image (hereinafter referred to as a source image) based on the secondary wiring diagram 714 and the primary system diagram 713. The source image has a uniform image format (e.g., PNG format).
[0135] In step S752, processor 310 executes a neural network model to extract feature vectors from the source image in step S751. The neural network model may be, for example, a Residual Neural Network (ResNet) model based on a convolutional neural network (CNN). Processor 310 also stores the feature vectors and identification information from the primary system image in step S752 in a database DB (e.g., Milvus).
[0136] Figure 8 According to the present invention Figure 7 Flowchart of the electrical appliance drawing recommendation method shown in the embodiment. Figure 3A as well as Figure 8 The recommendation system 300 executes steps S810 to S840 via the processor 310 to illustrate how the processor 310 constructs a data source for the secondary wiring diagram in the database DB based on executing the identification and separation model 324. The identification and separation model 324 is used to analyze key components of the secondary wiring diagram.
[0137] In step S810, the processor 310 accesses a secondary wiring diagram (eg, Figure 7 The processor 310 reads and parses the secondary wiring diagram 714 using the ezdxf function library, and identifies and classifies the secondary wiring diagram to generate an image file.
[0138] In step S820 , the processor 310 executes the recognition and separation model 324 to recognize the image file in step S810 according to layers, component blocks, and text labels, thereby separating key component information of the secondary wiring diagram.
[0139] Specifically, the identification and separation model 324 performs data labeling to mark the key components of the secondary wiring diagram in the sample data. The identification and separation model 324 extracts the geometric features, positional features, and attribute features of each entity. The entity refers to a component of the key component and may, for example, be a subset including the model, wiring location, and connection relationship of a current transformer. Based on the key components and various features, the identification and separation model 324 trains at least one of a support vector machine (SVM), a random forest, and a deep learning model (e.g., a convolutional neural network (CNN) model). The identification and separation model 324 executes the trained model to filter, identify, and separate the key component information of the secondary wiring diagram from the image file in step S810 based on layers, blocks, and text labels. In this embodiment, the key component information of the secondary wiring diagram includes information such as device name, location, connection relationship, and model number.
[0140] At step S830, processor 310 executes recognition and separation model 324 to save the key component information from step S820 to a new image file. Processor 310 stores the new image file in a database DB (e.g., DMC). Specifically, recognition and separation model 324 merges the key components filtered by layer, component block, and text label into a new list and removes duplicates from the list to generate a new image file.
[0141] In step S840, the processor 310 constructs the dependency relationships between the components in the key component information in step S820 and the corresponding relationships between the key component information and the secondary wiring diagram to generate relationship information. The processor 310 stores the relationship information in a database DB (eg, MySQL).
[0142] Specifically, processor 310 categorizes the key component information in step S820 into key components such as frame circuit breakers, functional instruments, and integrated protection devices. Processor 310 establishes dependencies between the key components. These dependencies include the combined use of frame circuit breakers, multi-function instruments, and temperature and humidity displays, as well as the combined use of vacuum circuit breakers, integrated protection devices, and live displays. Processor 310 also establishes a correspondence between the key component information and the URL of the secondary wiring diagram. Processor 310 stores the constructed dependencies and correspondence in a database (e.g., MySQL).
[0143] Figure 9 According to the present invention Figure 3A Flowchart of the electrical appliance drawing recommendation method shown in the embodiment. Figure 3A as well as Figure 9 The recommendation system 300 executes steps S910 to S970 to illustrate the operational details of how the recommendation system 300 recommends a wiring diagram drawing.
[0144] In step S910, the user UR provides input data on the front-end page of the recommendation system 300, where the input data includes keyword data. The keyword data may be, for example, keywords such as power distribution classification, project load, drawing classification, drawing voltage level, drawing description, project description, and equipment name, or may be, for example, a text description.
[0145] In step S921 , the processor 310 performs data processing (eg, normalized data processing) on the keyword data, and executes a neural network model (eg, an NLP model) to extract key feature information of the data.
[0146] In step S922, the processor 310 constructs the key feature information in step S921 into an SQL statement. The processor 310 searches the database DB for data associated with the key data of the input data according to the SQL statement to generate a query result.
[0147] In step S930, the processor 310 determines whether any data is found in the query result in step S922. If the determination result is yes, the processor 310 proceeds to step S940.
[0148] In step S940, the processor 310 obtains a primary wiring diagram that matches the found data (ie, data associated with the key data of the input data) and outputs the primary wiring diagram as a recommendation result to the electronic device operated by the user UR.
[0149] On the other hand, when the judgment result is no, the processor 310 proceeds to step S951. In step S951, the processor 310 uses a natural language model (eg, an Embedding model) to extract a feature vector of the key feature information in step S921. The processor 310 proceeds to step S952.
[0150] In step S952, the processor 310 searches for similar vectors in the database DB according to the feature vector in step S951, and obtains similar drawings accordingly. The processor 310 may, for example, perform an approximate nearest neighbor search (ANN) to implement similarity query. That is, the processor 310 calculates the similarity between the feature vector of the keyword data and the various vector data in the database DB. Based on the calculated similarity, the processor 310 accesses the drawing information including the feature vector as a similar drawing, and obtains similar drawings accordingly. A similar drawing may, for example, be plural and include the top 10 most similar feature vectors. The processor 310 continues steps S953 to S954.
[0151] In step S953, processor 310 calculates the cosine similarity between the primary similar drawings in step S952 and the various vector data in database DB to generate a similarity result. The similarity result includes similar vectors and their corresponding similarity scores. In other words, processor 310 calculates the cosine similarity between each feature vector in the primary similar drawings and the various vector data in database DB to generate a similarity score.
[0152] In step S954, processor 310 determines whether the similarity result satisfies a similarity threshold. In other words, processor 310 determines whether the similarity scores of the similar drawings are within a preset range. The similarity threshold may be set by threshold model 323 and may or may not be the same as the similarity threshold set in step S362.
[0153] When the judgment result is yes, the processor 310 outputs the first similar drawing as a recommendation result to the electronic device operated by the user UR. The processor 310 also stores the first similar drawing in a database DB (eg, MySQL) to update the database DB.
[0154] On the other hand, when the judgment result is negative, the processor 310 proceeds to step S960. In step S960, the processor 310 executes the large model 322.
[0155] Specifically, the processor 310 executes the large model 322 to execute a text-to-image model (e.g., DALL·E 2Stablediffusion model) based on the keyword data and the database DB to generate a primary wiring diagram. At the same time, the processor 310 updates the database DB with the primary wiring diagram. The details of the operation of executing the large model 322 can be found in Figure 5 The description of the embodiments and the analogy are given.
[0156] Figure 10 According to the present invention Figure 9 Flowchart of the electrical appliance drawing recommendation method shown in the embodiment. Figure 3A as well as Figure 10 The recommendation system 300 performs steps S1021 to S1070 according to the various data 1011 to 1013 to illustrate how the recommendation system 300 constructs a data source for a primary wiring diagram in the database DB.
[0157] In step S1021, processor 310 accesses primary system diagram 1011 and uses the ezdxf library to read and parse primary system diagram 1011. Processor 310 also filters the parsed primary system diagram 1011 based on layers, component blocks, and text labels to extract key component information from primary system diagram 1011. Key component information includes drawing description, technical specifications, drawing component name, current rating, and equipment cabinet type name.
[0158] In step S1022, the processor 310 accesses the project file 1012 and converts the project file 1012 into project characteristic information, which includes project name, project characteristic description, total project power load, voltage level, and power distribution classification.
[0159] In step S1031, the processor 310 executes the custom field extraction model 325 to extract field information from the primary system diagram 1011, the project file 1012, and the equipment list 1013. The custom field extraction model 325 is used to analyze and identify components of text and drawings to generate corresponding fields.
[0160] Specifically, processor 310 accesses equipment list 1013. Equipment list 1013 is in Excel format. Processor 310 parses equipment list 1013 and extracts device information from equipment list 1013. This device information includes information such as device type, device name, device model, device quantity, and rated capacity. Processor 310 also accesses key component information from primary system diagram 1011 in step S1021 and project feature information from project file 1012 in step S1022. Processor 310 executes custom field extraction model 325 to extract field information for the device information, key component information from primary system diagram 1011, and project feature information, respectively.
[0161] In step S1041, the processor 310 extracts the key feature information of the drawing from the field information in step S1031. The key feature information includes information such as drawing description, device name, and device model.
[0162] In step S1042, processor 310 constructs the relationship between primary system diagram 1011, project file 1012, and equipment list 1013 based on the field information in step S1031 and / or the key feature information in step S1041 to generate metadata 1021 (hereinafter referred to as primary metadata 1021). Primary metadata 1021 includes data such as project key description information, project power distribution classification, overall project load, drawing cabinet type, project equipment list, drawing voltage level, drawing description, and equipment name.
[0163] Furthermore, processor 310 constructs a data table model 1022 based on primary metadata 1021. Data table model 1022 is used to define entities and entity relationships within the primary metadata and initialize the data table data definition language (DDL). Data table model 1022 includes a drawing table, a project table, a device table, and a project-drawing table, and stores the data generated in step S1041 in these tables.
[0164] In this embodiment, the drawing table includes the drawing number, drawing URL, project number, equipment number, and drawing category. The project table includes the project number, project characteristics, power distribution category, total load, voltage level, and project description. The equipment table includes the equipment number, equipment name, equipment model, and equipment quantity. The project-drawing table includes the project type, project location, drawing-related projects, and quality standards.
[0165] In step S1050, the processor 310 uses a natural language model (eg, an Embedding model) to extract a feature vector of the primary metadata 1021. The processor 310 stores the feature vector of the primary metadata 1021 in a database DB (eg, Milvus).
[0166] In step S1060 , the processor 310 constructs a vector index and stores the correspondence between the primary metadata 1021 and the feature vector of the primary metadata 1021 in a database DB (eg, a dictionary table).
[0167] In summary, the recommendation system and electrical drawing recommendation method of the embodiment of the present invention support different forms of data queries and can automatically provide customized drawings according to the specific needs of users. In this way, the recommendation system can improve the efficiency of recommending drawings, while reducing the error rate and saving a lot of time and energy. Based on the calculated similarity, the recommendation system can use similar drawings or newly generated drawings as recommendation results, thereby improving the design efficiency of drawings and avoiding the repeated drawing of the same drawings. Based on the database, the recommendation system can also accumulate a large amount of drawings and related knowledge, thereby accelerating the learning speed of new users.
[0168] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for recommending electrical drawings, characterized in that: include: querying a database to obtain a query result based on key data of input data, wherein the input data includes at least one of a primary system diagram, text data, a device list, and keyword data; Outputting a secondary wiring diagram drawing as a recommendation result according to the query result, or calculating the similarity between the feature vector of the input data and the database to obtain a secondary similar drawing; as well as The secondary similar drawings satisfying a first similarity threshold are output as the recommendation result, or at least one of a combined drawing model and a large model is executed to generate a secondary wiring diagram drawing according to the input data as the recommendation result.
2. The electrical appliance drawing recommendation method according to claim 1, characterized in that: When the input data includes a primary system diagram, it also includes: performing computer-aided design to derive an input image based on the input data; executing a neural network model to extract a feature vector of the input image; and The feature vector of the input image and the similarity of the database are calculated to obtain the secondary similar drawing.
3. The electrical appliance drawing recommendation method according to claim 1, characterized in that: The steps of executing the combined drawing model include: Obtaining a data set based on a plurality of components in the database; Based on the secondary similarity drawing, a reinforcement learning model is executed according to an electrical appliance rule library and the data set to generate a design solution; Calculating the rule verification pass rate of the design scheme according to the electrical appliance rule library; According to the design solution, simulating a secondary wiring diagram to generate a simulation result; and According to the rule verification pass rate, the improvement suggestions of the simulation results, the components in the design scheme and the connection relationships are combined to generate a secondary wiring diagram drawing as the recommendation result.
4. The electrical appliance drawing recommendation method according to claim 3, characterized in that: The step of executing the combined drawing model further includes: When the rule verification pass rate meets the pass rate threshold, receiving the user's improvement suggestions for the simulation result; and When the rule verification pass rate does not meet the pass rate threshold, a preset suggestion is used as the improvement suggestion, or the large model is executed according to the simulation result and the appliance rule base to generate the improvement suggestion.
5. The electrical appliance drawing recommendation method according to claim 3, characterized in that: Also includes: Execute the threshold model to divide the data in the database into training data and validation data; Executing the threshold model to calculate the similarity between the feature vector of the training data and the feature vector of the verification data as the first similarity threshold; as well as The first similarity threshold is adjusted according to user feedback.
6. The electrical appliance drawing recommendation method according to claim 1, characterized in that: Also includes: Constructing a relationship between a project file, a secondary wiring diagram, a primary system diagram corresponding to the secondary wiring diagram, and a bill of materials to combine into secondary metadata; Extracting a feature vector of the secondary metadata; as well as The feature vector of the secondary metadata and the corresponding relationship between the secondary metadata and the feature vector of the secondary metadata are stored in the database.
7. The electrical appliance drawing recommendation method according to claim 6, characterized in that: Also includes: performing computer-aided design to derive a source image based on the primary system diagram and the secondary wiring diagram; executing a neural network model to extract a feature vector of the source image; as well as The feature vector and identification information of the primary system diagram are stored in the database.
8. The electrical appliance drawing recommendation method according to claim 6, characterized in that: Also includes: analyzing the secondary wiring diagram to obtain an image file; executing a recognition and separation model to recognize the image file according to layers, component blocks, and text labels to separate key component information of the secondary wiring diagram; Constructing dependency relationships between multiple components in the key component information and corresponding relationships between the key component information and the secondary wiring diagram to generate relationship information; as well as The relationship information is stored in the database.
9. The electrical appliance drawing recommendation method according to claim 8, characterized in that: Also includes: executing the recognition and separation model to save the key component information to a new image file; as well as The new image file is stored in the database.
10. The electrical appliance drawing recommendation method according to claim 1, characterized in that: When the input data includes keyword data, it also includes: Outputting a wiring diagram as the recommendation result according to the query result, or calculating the similarity between the feature vector of the keyword data and the database to obtain a similar diagram; and The primary similar drawings meeting a second similarity threshold are output as the recommendation result, or the large model is executed to generate a primary system diagram drawing according to the keyword data as the recommendation result.
11. The electrical appliance drawing recommendation method according to claim 10, characterized in that: Also includes: Execute the custom field extraction model to extract field information from the primary system diagram, project file, and equipment list; constructing a relationship between the primary system diagram, the project file, and the equipment list according to the field information to generate primary metadata; extracting a feature vector of the primary metadata; as well as The feature vector of the primary metadata and the corresponding relationship between the primary system metadata and the feature vector of the primary metadata are stored in the database.
12. A recommendation system, characterized in that include: a storage device storing a database; as well as The processor is coupled to the storage device and is configured to execute the electrical appliance drawing recommendation method according to claim 1 .