Remote monitoring quality alarm method and system based on large language model
By constructing a knowledge base and calculating similarity in real time through a remote monitoring quality alarm method based on a large language model, the problems of high monitoring adaptability and high cost in existing technologies are solved, and high-precision quality alarms and automated comparison are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ELECTRIC POWER RES INST OF GUANGDONG POWER GRID CO LTD
- Filing Date
- 2026-04-20
- Publication Date
- 2026-07-21
Smart Images

Figure CN122433735A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of production quality management technology, specifically relating to a remote monitoring and quality alarm method and system based on a large language model. Background Technology
[0002] In existing technologies, methods for production quality alarms based on monitoring data include threshold warning, statistical analysis, and intelligent monitoring. Among them, threshold warning includes static threshold monitoring and dynamic threshold monitoring. Static threshold monitoring involves manually setting a fixed threshold, and triggering an alarm when the indicator value exceeds the threshold. However, static threshold monitoring is difficult to adapt to seasonal and periodic fluctuations, requires a large amount of maintenance, needs frequent adjustments, and has weak ability to identify anomaly types, making it difficult to detect atypical problems. Dynamic threshold monitoring automatically analyzes historical data through algorithms and adjusts the threshold in real time, which can more intelligently identify anomalies. However, it has high implementation costs, high requirements for data quality and algorithms, requires a large amount of data accumulation in the initial stage, and has a threshold for algorithm selection and parameter tuning. Summary of the Invention
[0003] The main objective of this invention is to overcome the shortcomings and deficiencies of the prior art and to propose a remote manufacturing quality alarm method and system based on a large language model.
[0004] To achieve the above objectives, the present invention adopts the following technical solution:
[0005] The remote manufacturing quality alarm method based on a large language model includes the following steps:
[0006] S1. Upload and parse the technical specification document, extract its content and convert it into quality specification requirements expressed in natural language;
[0007] S2. The quality specification requirements are divided into blocks to obtain multiple technical specification items. The technical specification items are converted into corresponding embedding vectors using a large language model. The technical specification items and their embedding vectors are stored in pairs to build a knowledge base.
[0008] S3. Collect structured monitoring data of the production environment in real time, and construct data description problems and problem embedding vectors based on the structured monitoring data;
[0009] S4. Calculate the similarity between the question embedding vector and each embedding vector in the knowledge base, and based on the preset similarity threshold, select relevant technical specification items from the knowledge base.
[0010] S5. Combine the data description problem with the relevant technical specifications into a complete prompt, input it into the large language model, and issue an alarm based on the output of the large language model.
[0011] The present invention also includes a remote manufacturing quality alarm system based on a large language model, which adopts the remote manufacturing quality alarm method based on a large language model provided by the present invention. The system includes a document parsing module, a knowledge base construction module, a manufacturing data acquisition module, a retrieval and filtering module, and an alarm module.
[0012] The document parsing module is used to parse uploaded technical specification documents, extract their content, and convert them into quality specification requirements expressed in natural language.
[0013] The knowledge base construction module is used to divide the quality specification requirements into blocks to obtain multiple technical specification items. The large language model is used to convert the technical specification items into corresponding embedding vectors. The technical specification items and their embedding vectors are stored in pairs to build the knowledge base.
[0014] The monitoring data acquisition module is used to collect structured monitoring data of the production environment in real time, and to construct data description problems and problem embedding vectors based on the structured monitoring data.
[0015] The retrieval and filtering module is used to calculate the similarity between the question embedding vector and each embedding vector in the knowledge base, and to filter out relevant technical specification entries from the knowledge base based on a preset similarity threshold.
[0016] The alarm module is used to combine data descriptions of problems with relevant technical specifications into a complete prompt, input it into the large language model, and issue alarms based on the output of the large language model.
[0017] The present invention also includes an electronic device, the electronic device comprising:
[0018] At least one processor; and,
[0019] A memory that is communicatively connected to at least one processor; wherein,
[0020] The memory stores computer program instructions that can be executed by at least one processor, which enables the at least one processor to execute the remote monitoring quality alarm method based on a large language model provided by the present invention.
[0021] The present invention also includes a computer-readable storage medium storing a program that, when executed by a processor, implements the remote manufacturing quality alarm method based on a large language model provided by the present invention.
[0022] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0023] 1. This invention can determine whether the data collected in the production environment meets the requirements of the specifications and issue an alarm based on the user-specified bidding technical specifications and tender documents, realizing the automated comparison of supervision data and document content, i.e., the automation of remote supervision tasks; the method adopts a two-stage prompting prompt to guide the large language model to make judgments; in the first stage, the large language model is prompted to search for technical specification entries related to the data description problem in the knowledge base; in the second stage, the found technical specification entries are compared with the supervision data and the judgment result is output; through document parsing and retrieval enhancement generation, the prediction accuracy of the large language model is improved. Attached Figure Description
[0024] Figure 1 This is a flowchart of the method of the present invention.
[0025] Figure 2 This is a schematic diagram of the system in the embodiment.
[0026] Figure 3 This is a schematic diagram of the electronic device in the embodiment. Detailed Implementation
[0027] Explanation of relevant terms:
[0028] RAG: Retrieval Enhanced Generation, which retrieves relevant knowledge from the knowledge base based on user queries, and then feeds the query and relevant knowledge into a large language model to generate an answer.
[0029] The present invention will be further described in detail below with reference to the embodiments and accompanying drawings, but the embodiments of the present invention are not limited thereto.
[0030] Examples; such as Figure 1 As shown, the remote monitoring quality alarm method based on a large language model includes the following steps:
[0031] S1. Upload and parse the technical specification document, extract its content and convert it into quality specification requirements expressed in natural language;
[0032] In this embodiment, for tables in the technical specification document, the title row and body row of the table are extracted, and the body row is combined with its parent title to generate quality specification requirements expressed in natural language, such as "Name: Power Frequency Voltage; Designated Party: Designated by the Bidder; Specification Requirements: Not less than 230kV...".
[0033] S2. The quality specification requirements are divided into blocks to obtain multiple technical specification items. The technical specification items are converted into corresponding embedding vectors using a large language model. The technical specification items and their embedding vectors are stored in pairs to build a knowledge base.
[0034] The quality specification requirements are divided into blocks to obtain multiple technical specification items s, which are denoted as a set. .
[0035] For example, in this embodiment, for the document shown in Table 1 below, the table is first extracted from the document using magic-PDF and represented as an HTML file for subsequent processing of the text in each cell. Next, each row of the table is traversed, distinguishing between header rows (e.g., "2. Circuit Breaker Standard Technical Parameters," which contains only 3 cells) and body rows (e.g., "2.1.1 Rated Short-Circuit Breaking Current AC Component," which contains more cells). For each body row, its parent heading is combined with its content. Taking the "2.1.1" row as an example, the constructed entry is as follows:
[0036] Indicator Name: Circuit Breaker Standard Technical Parameters, Rated Short-Circuit Breaking Current, AC Component of Rated Short-Circuit Breaking Current (kA);
[0037] Indicator type: Single;
[0038] The tendering party requires: 40;
[0039] Bidder's requirement: 45.
[0040] Table 1. Partial Documentation of Standard Technical Parameters for Circuit Breakers
[0041]
[0042] For a given technical specification item s∈S, its embedding vector e is calculated as follows:
[0043] e = LLM(s);
[0044] Wherein, LLM() represents processing using a large language model;
[0045] For each technical specification item in S, calculate its corresponding embedding vector to obtain the set of embedding vectors. ;
[0046] The final knowledge base is constructed as KB(S)={(s,e)|s∈S,e∈E(S)}.
[0047] S3. Collect structured monitoring data of the production environment in real time, and construct data description problems and problem embedding vectors based on the structured monitoring data;
[0048] In this embodiment, the collected data is represented in JSON format, so it needs to be converted into natural language for the large language model to perform semantic understanding.
[0049] S4. Calculate the similarity between the question embedding vector and each embedding vector in the knowledge base, and based on the preset similarity threshold, select relevant technical specification items from the knowledge base.
[0050] The formula for calculating the similarity between the question embedding vector eq and the embedding vector e in the knowledge base is as follows:
[0051] ;
[0052] Where sim1 represents cosine similarity, sim2 represents distance similarity, and α and β are hyperparameters balancing cosine similarity and distance similarity; cosine similarity is calculated as follows:
[0053] ;
[0054] Distance similarity is calculated as follows:
[0055] .
[0056] Based on a preset similarity threshold, relevant technical specification entries are selected from the knowledge base, specifically:
[0057] A preset similarity threshold t is set. Embedded vectors e with a similarity greater than the threshold t are considered to be related to the data description problem, and then the technical specification items s corresponding to the embedded vector e are selected.
[0058] S5. Combine the data description problem with the relevant technical specifications into a complete prompt, input it into the large language model, and issue an alarm based on the output of the large language model.
[0059] The output of the large language model is a preset identifier, which includes a first identifier Y for indicating compliance, a second identifier N for indicating non-compliance, and a third identifier W for indicating uncertainty.
[0060] In practice, a two-stage prompt is used to guide the large language model in making judgments;
[0061] In the first stage, the large language model is prompted to search the knowledge base for technical specification entries related to the data description problem;
[0062] In the second stage, the found technical specifications are compared with the construction supervision data, and the judgment results are output.
[0063] Table 2 below shows a comparison of the prediction performance of the method of the present invention with some existing technologies.
[0064] Table 2 Comparison of the prediction performance of the method of the present invention and some existing technologies
[0065]
[0066] In this invention, "Ours" represents the method itself; "No-RAG" indicates a scheme that removes RAG; "No-parse" indicates a scheme that removes document structure parsing; and "No-RAG-no-parse" indicates a scheme that removes both modules simultaneously. The method of this invention achieves industrial-grade application standards in the core indicators of remote monitoring data quality assessment.
[0067] The anomaly detection accuracy (precision rate) reaches 96.6%, meaning that 96.6% of the samples identified as anomalies are genuine anomalies, effectively controlling false alarms; the anomaly recall rate is on par with the precision (88.5%), meaning that 88.5% of the genuine anomaly samples in the test set can be accurately identified, avoiding missed alarms; the F1 score calculated based on precision and recall rate reaches 91.7%, achieving a balance between low false alarms and low missed alarms, solving the difficulty of alarm proliferation but lack of effective judgment in quality alarm tasks.
[0068] Experimental results on different large language models show that the core indicators of the method of the present invention have controllable fluctuations. This indicates that the method, through the decoupled design of knowledge processing and semantic judgment, does not depend on a specific model architecture and can maintain stable accuracy, recall and F1 performance on large language models with different parameter scales. It can be flexibly selected according to the resource conditions of industrial scenarios, reducing the application threshold of the method of the present invention.
[0069] Based on the same idea as the remote manufacturing quality alarm method based on a large language model in the above embodiments, this invention also provides a remote manufacturing quality alarm system based on a large language model. This system can be used to execute the aforementioned remote manufacturing quality alarm method based on a large language model. For ease of explanation, the structural diagram of the embodiment of the remote manufacturing quality alarm system based on a large language model only shows the parts related to the embodiments of this invention. Those skilled in the art will understand that the illustrated structure does not constitute a limitation on the device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0070] like Figure 2 As shown, the remote monitoring quality alarm system 100 based on a large language model includes a document parsing module 101, a knowledge base construction module 102, a monitoring data acquisition module 103, a retrieval and filtering module 104, and an alarm module 105.
[0071] Document parsing module 101 is used to parse uploaded technical specification documents, extract their content, and convert them into quality specification requirements expressed in natural language.
[0072] The knowledge base construction module 102 is used to divide the quality specification requirements into blocks to obtain multiple technical specification items. The large language model is used to convert the technical specification items into corresponding embedding vectors. The technical specification items and their embedding vectors are stored in pairs to construct the knowledge base.
[0073] The monitoring data acquisition module 103 is used to collect structured monitoring data of the production environment in real time, and to construct data description problems and problem embedding vectors based on the structured monitoring data.
[0074] The retrieval and filtering module 104 is used to calculate the similarity between the question embedding vector and each embedding vector in the knowledge base, and to filter out relevant technical specification entries from the knowledge base based on a preset similarity threshold.
[0075] The alarm module 105 is used to combine the data description problem with the relevant technical specification items into a complete prompt, input it into the large language model, and issue an alarm based on the output result of the large language model.
[0076] It should be noted that the remote manufacturing quality alarm system based on large language models corresponds one-to-one with the remote manufacturing quality alarm method based on large language models. The technical features and beneficial effects described in the embodiments of the remote manufacturing quality alarm method based on large language models are applicable to the embodiments of the remote manufacturing quality alarm system based on large language models. For details, please refer to the description in the embodiments of the method of this invention, which will not be repeated here.
[0077] Furthermore, in the above implementation of the remote manufacturing quality alarm system based on a large language model, the logical division of each program module is only an example. In actual applications, the above functions can be assigned to different program modules as needed, for example, for the sake of corresponding hardware configuration requirements or software implementation convenience. That is, the internal structure of the remote manufacturing quality alarm system based on a large language model is divided into different program modules to complete all or part of the functions described above.
[0078] like Figure 3 As shown, in another embodiment, an electronic device is provided for implementing a remote manufacturing quality alarm method based on a large language model. The electronic device 200 may include a first processor 201, a first memory 202 and a bus, and may also include a computer program stored in the first memory 202 and executable on the first processor 201, such as a remote manufacturing quality alarm program 203 based on a large language model.
[0079] The first memory 202 includes at least one type of readable storage medium, such as flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the first memory 202 can be an internal storage unit of the electronic device 200, such as the portable hard drive of the electronic device 200. In other embodiments, the first memory 202 can also be an external storage device of the electronic device 200, such as a plug-in portable hard drive, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the electronic device 200. Furthermore, the first memory 202 can include both internal and external storage units of the electronic device 200. The first memory 202 can be used not only to store application software and various types of data installed on the electronic device 200, such as the code of the remote monitoring quality alarm program 203 based on a large language model, but also to temporarily store data that has been output or will be output.
[0080] In some embodiments, the first processor 201 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits packaged with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The first processor 201 is the control unit of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules stored in the first memory 202 and calls data stored in the first memory 202 to perform various functions of the electronic device 200 and process data.
[0081] Figure 3 Only electronic devices with components are shown; it will be understood by those skilled in the art that... Figure 3 The structure shown does not constitute a limitation on the electronic device 200, and may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0082] The remote manufacturing quality alarm program 203 based on a large language model, stored in the first memory 202 of the electronic device 200, is a combination of multiple instructions. When run in the first processor 201, it can achieve the following:
[0083] Parse the uploaded technical specification document, extract its content, and convert it into quality specification requirements expressed in natural language.
[0084] The quality specification requirements are segmented to obtain multiple technical specification items. A large language model is used to convert the technical specification items into corresponding embedding vectors. The technical specification items and their embedding vectors are stored in pairs to build a knowledge base.
[0085] Real-time collection of structured monitoring data from the production environment, and construction of data description problems and problem embedding vectors based on the structured monitoring data;
[0086] Calculate the similarity between the question embedding vector and each embedding vector in the knowledge base, and based on a preset similarity threshold, select relevant technical specification entries from the knowledge base;
[0087] Combine the data description problem with relevant technical specifications into a complete prompt, input it into the large language model, and issue an alarm based on the output of the large language model.
[0088] Furthermore, if the modules / units integrated in the electronic device 200 are implemented as software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).
[0089] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0090] In another embodiment, a computer-readable storage medium is provided, storing a program that, when executed by a processor, implements the remote manufacturing quality alarm method based on a large language model according to the present invention, specifically as follows:
[0091] Parse the uploaded technical specification document, extract its content, and convert it into quality specification requirements expressed in natural language.
[0092] The quality specification requirements are segmented to obtain multiple technical specification items. A large language model is used to convert the technical specification items into corresponding embedding vectors. The technical specification items and their embedding vectors are stored in pairs to build a knowledge base.
[0093] Real-time collection of structured monitoring data from the production environment, and construction of data description problems and problem embedding vectors based on the structured monitoring data;
[0094] Calculate the similarity between the question embedding vector and each embedding vector in the knowledge base, and based on a preset similarity threshold, select relevant technical specification entries from the knowledge base;
[0095] Combine the data description problem with relevant technical specifications into a complete prompt, input it into the large language model, and issue an alarm based on the output of the large language model.
[0096] The computer-readable storage medium may be transient or non-transient. Exemplary examples include, but are not limited to, various media capable of storing computer program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0097] For example, the processor may be a central processing unit (CPU), a microprocessor unit (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), etc.
[0098] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0099] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.
Claims
1. A remote manufacturing quality alarm method based on a large language model, characterized in that, Includes the following steps: S1. Upload and parse the technical specification document, extract its content and convert it into quality specification requirements expressed in natural language; S2. The quality specification requirements are divided into blocks to obtain multiple technical specification items. The technical specification items are converted into corresponding embedding vectors using a large language model. The technical specification items and their embedding vectors are stored in pairs to build a knowledge base. S3. Collect structured monitoring data of the production environment in real time, and construct data description problems and problem embedding vectors based on the structured monitoring data; S4. Calculate the similarity between the question embedding vector and each embedding vector in the knowledge base, and based on the preset similarity threshold, select relevant technical specification items from the knowledge base. S5. Combine the data description problem with the relevant technical specifications into a complete prompt, input it into the large language model, and issue an alarm based on the output of the large language model.
2. The remote manufacturing quality alarm method based on a large language model according to claim 1, characterized in that, In step S1, for tables in the technical specification document, the title row and body row of the table are extracted, and the body row is combined with its parent title to generate quality specification requirements expressed in natural language.
3. The remote manufacturing quality alarm method based on a large language model according to claim 1, characterized in that, In step S2, the quality specification requirements are divided into blocks to obtain multiple technical specification items s, which are denoted as a set. ; For a given technical specification item s∈S, its embedding vector e is calculated as follows: e = LLM(s); Wherein, LLM() represents processing using a large language model; For each technical specification item in S, calculate its corresponding embedding vector to obtain the set of embedding vectors. ; The final knowledge base is constructed as KB(S)={(s,e)|s∈S,e∈E(S)}.
4. The remote manufacturing quality alarm method based on a large language model according to claim 1, characterized in that, In step S4, the formula for calculating the similarity between the question embedding vector eq and the embedding vector e in the knowledge base is as follows: ; Where sim1 represents cosine similarity, sim2 represents distance similarity, and α and β are hyperparameters that balance cosine similarity and distance similarity.
5. The remote manufacturing quality alarm method based on a large language model according to claim 4, characterized in that, The cosine similarity is calculated as follows: ; Distance similarity is calculated as follows: 。 6. The remote manufacturing quality alarm method based on a large language model according to claim 5, characterized in that, In step S4, based on a preset similarity threshold, relevant technical specification entries are selected from the knowledge base, specifically as follows: A preset similarity threshold t is set. Embedded vectors e with a similarity greater than the threshold t are considered to be related to the data description problem, and then the technical specification items s corresponding to the embedded vector e are selected.
7. The remote manufacturing quality alarm method based on a large language model according to claim 1, characterized in that, In step S5, the output of the large language model is a preset identifier, which includes a first identifier for indicating compliance, a second identifier for indicating non-compliance, and a third identifier for indicating uncertainty.
8. A remote manufacturing quality alarm system based on a large language model, characterized in that, The remote monitoring quality alarm method based on a large language model, as described in any one of claims 1-7, includes a document parsing module, a knowledge base construction module, a monitoring data acquisition module, a retrieval and filtering module, and an alarm module. The document parsing module is used to parse uploaded technical specification documents, extract their content, and convert them into quality specification requirements expressed in natural language. The knowledge base construction module is used to divide the quality specification requirements into blocks to obtain multiple technical specification items. The large language model is used to convert the technical specification items into corresponding embedding vectors. The technical specification items and their embedding vectors are stored in pairs to build the knowledge base. The monitoring data acquisition module is used to collect structured monitoring data of the production environment in real time, and to construct data description problems and problem embedding vectors based on the structured monitoring data. The retrieval and filtering module is used to calculate the similarity between the question embedding vector and each embedding vector in the knowledge base, and to filter out relevant technical specification entries from the knowledge base based on a preset similarity threshold. The alarm module is used to combine data descriptions of problems with relevant technical specifications into a complete prompt, input it into the large language model, and issue alarms based on the output of the large language model.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory that is communicatively connected to at least one processor; wherein, The memory stores computer program instructions that can be executed by at least one processor, such that the at least one processor can execute the remote monitoring quality alarm method based on a large language model as described in any one of claims 1-7.
10. A computer-readable storage medium storing a program, characterized in that, When the program is executed by the processor, it implements the remote manufacturing quality alarm method based on a large language model as described in any one of claims 1-7.