Communication engineering safety disclosure content generation method based on large language model
Through the safety disclosure generation method based on the large language model, we build a knowledge vector library and integrate construction tasks and environmental data, which solves the manual confirmation problem in the existing safety disclosure methods, achieves efficient and automated safety disclosure output, and improves construction safety management. efficiency and interactivity.
Patent Information
- Application Number
- CN202411004737.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-10-25
AI Technical Summary
The existing safety disclosure method relies on manual confirmation, and it is difficult to effectively recruit construction workers with diverse types of work and high mobility of workers. This results in incomplete safety training, and it is easy to miss the best opportunity for preventive measures, affecting the timely discovery of hidden dangers.
A communication engineering safety disclosure content generation method based on a large language model is adopted. By building a knowledge vector library, construction tasks and environmental data are acquired and quantified, and the sorting method is integrated to generate safety disclosures, reducing manual dependence and improving automated output.
It achieves efficient and automated safety disclosure generation, reduces manual errors, improves the timely discovery of potential hazards and the pertinence of preventive measures, and significantly improves the efficiency of safety inspections and management interactivity before construction.
Smart Images

Figure CN118838985A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of engineering safety technology, and in particular to a method for generating communication engineering safety briefing content based on a large language model. Background Art
[0002] As my country's urbanization process advances, the scale of construction projects continues to expand, and the safety production situation in the construction field is very severe. Safety briefing is a key point in engineering production. Safety technical briefing refers to the training of the construction manager on the safety operating procedures and precautions of the operation to the direct production workers before the production operation, and it is confirmed in written documents.
[0003] The current safety disclosure has the following problems:
[0004] 1) The safety officer actively gathers the workers, manually confirms their presence, conducts active training, and records the safety briefing. However, in the actual operation of safety technical briefing, the workers are highly mobile, there are many labor subcontracts, and the types of work are numerous and complex. It is difficult for the safety officer to effectively gather the workers of the corresponding types of work to centrally prepare the safety technical briefing.
[0005] 2) Safety briefings need to be conducted orally or in writing by personnel with rich technical experience. Not only does it rely on personnel experience, but the process is also cumbersome. If human factors are not fully considered, safety accidents may occur, which not only affects the timeliness of hidden danger discovery, but may also miss the best time to take preventive measures. Summary of the invention
[0006] The purpose of the present invention is to provide a method for generating safety briefing content for communication engineering based on a large language model, which can efficiently and automatically output safety briefing documents, reduce dependence on personnel experience and reduce errors caused by subjective factors in tasks, and promptly discover potential safety hazards.
[0007] In order to achieve the above object, a method for generating communication engineering safety briefing content based on a large language model is provided, comprising the following steps:
[0008] S1. Steps for building a knowledge vector library: collect and organize relevant documents and case materials in the communication engineering industry, perform text semantic slicing and vectorization operations, use a large language model to build a knowledge graph, and then store the knowledge graph information in the knowledge vector library;
[0009] S2, input data processing step: obtaining the current work task input by the construction personnel according to the prompt, and obtaining the work environment data of the factors affecting the construction at the current location, and then converting the work task and work environment data from text data into vector form;
[0010] S3, data fusion step: using a sorting method based on the fusion of knowledge vector library, job task and job environment data, retrieving candidate text data whose similarity with the job task vector reaches a threshold from the knowledge vector library, optimizing the weight of text data related to the job environment data vector, and then sorting out text data whose similarity reaches the threshold and is ranked in the top N; inputting the obtained text data whose similarity is ranked in the top N, as well as the job task and job environment data input by the user into a preset prompt word template to combine into a prompt text;
[0011] S4, safety briefing output step: input the prompt text into the large language model to generate the communication engineering safety briefing.
[0012] Further, the step S1 specifically includes the following steps:
[0013] S11: Collect relevant documents and case materials of the communication engineering industry, including security-related systems, operational specifications, safety risks, laws, regulations and policy documents of the communication engineering industry;
[0014] S12: Segmenting the collected relevant documents and case materials by using text segmentation technology; the text segmentation technology is: dividing the text into large paragraphs and small paragraphs, making each paragraph within the maximum length limit, with complete sentences as units, and setting a set overlap between adjacent paragraphs to capture the logical coherence between the paragraphs;
[0015] S13: Identify entities in the text through a large language model, identify various professional terms and key entities in the text, extract the relationships between entities, analyze the interactions and dependencies between different entities, and extract the attributes of the entities. Then, vectorize the text and build a knowledge vector library.
[0016] Furthermore, before obtaining the current work task input by the construction personnel according to the prompt in step S2, a preset work project content list is provided for the user to select, and each project contains a fixed work process and required resources. The work process includes the work time and the number of workers, and the required resources include work equipment; and then the user feedback is collected and organized into work tasks.
[0017] Furthermore, when obtaining the working environment data of the factors affecting the construction at the current location in step S2, the working location is obtained through GPS positioning, and then the working environment data is obtained by searching the weather website on the Internet. The working environment data includes precipitation information, wind direction information, cloud cover information, wind speed information and temperature information.
[0018] Furthermore, in step S2, the inputted work task and work environment data are vectorized by using the word2Vec tool, and a vector model of the work task and work environment is constructed, so that the textual content of the work task and work environment is simplified into a series of vectors in an N-dimensional vector space.
[0019] Further, the acquisition of text data in step S3 specifically includes the following steps:
[0020] S31: define the knowledge vector library as the knowledge vector library K, the operation task vector as T and the operation environment data vector as E, calculate the similarity between the vector in the knowledge vector library K and the operation task vector T, and the similarity calculation formula is as follows:
[0021]
[0022] S32: retrieving candidate text data whose similarity reaches a threshold from the knowledge vector library, wherein the candidate text data is a text block S;
[0023] S33: Integrate environmental factors and calculate the similarity between the environmental vector E and the text block S. The similarity calculation formula is as follows:
[0024]
[0025] S34: The similarity calculated in step S33 is applied to the text block S as a weight. The weight calculation formula is as follows:
[0026]
[0027] Assign the previously obtained weight a to the corresponding V value and sum them up. The expression is as follows:
[0028]
[0029] Where V is the score a of different text blocks S i , L is the number of vectors, and the final score V value is updated according to the weight of the operation environment data vector;
[0030] S34: sorting by V value to select text data whose similarity reaches the threshold and is ranked in the top N.
[0031] Furthermore, the large language model in step S4 is a large language model based on LLAMA3-8B and fine-tuned, and the fine-tuning method is: fine-tuning the model using a communication engineering industry dataset.
[0032] Principles and advantages:
[0033] The present invention combines system documents and accident cases to construct a knowledge vector library through corpus division and knowledge extraction, and uses the knowledge vector library, work tasks and work environment data for in-depth analysis to provide potential safety hazards, preventive measures and emergency measures;
[0034] The present invention graphically displays the operation process of the operation task, which is more vivid and can respond to the questions of the safety management personnel in real time, and has strong interactivity;
[0035] The present invention is specifically implemented in the field of safe production of communication engineering. From the knowledge vector library construction module to the safety briefing generation module, each module works closely together, which significantly improves the efficiency of safety inspections, reduces the time and economic costs before construction, and forms an efficient workflow. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 A flowchart of a method for generating communication engineering safety briefing content based on a large language model according to an embodiment of the present invention;
[0037] Figure 2 Flowchart for constructing the knowledge vector library. DETAILED DESCRIPTION
[0038] The following is further described in detail through specific implementation methods:
[0039] Example
[0040] A method for generating communication engineering safety briefing content based on a large language model, basically as follows Figure 1 As shown, the following steps are included:
[0041] S1, knowledge vector library construction step: collect and organize relevant documents and case materials of the communication engineering industry, perform text semantic slicing and vectorization operations, use a large language model to construct a knowledge graph, and then store the knowledge graph information in the knowledge vector library; the step S1 specifically includes the following steps:
[0042] S11: Collect relevant documents and case materials of the communication engineering industry, including security-related systems, operational specifications, safety risks, laws, regulations and policy documents of the communication engineering industry;
[0043] S12: Segment the collected relevant documents and case materials using text segmentation technology; Figure 2As shown, the text segmentation technology is: dividing the text into large paragraphs and small paragraphs, making each paragraph within the maximum length limit, with complete sentences as units, and setting a set overlap between adjacent paragraphs to capture the logical coherence between paragraphs; such as PDF files, using unstructured tools to identify valid elements such as text, pictures, links, etc., converting the content into structured data, and then segmenting the document by paragraph blocks to retain the semantic information of the text, using shorter corpus to accurately capture subtle semantic differences, and longer corpus to retain richer contextual information, thereby presenting a more comprehensive viewpoint.
[0044] S13: Identify entities in the text through a large language model, identify various professional terms and key entities in the text, extract the relationship between entities, analyze the interaction and dependency between different entities, and extract the attributes of the entities, then vectorize the text to build a knowledge vector library. First, use named entity recognition (NER) technology to identify candidate entities in the text, such as equipment models, operating procedures, safety standards, etc. Then build prompt words to understand the text content, and let the large language model extract key entities such as professional terms and the relationship between entities from the document and candidate entities through the prompt words, and use the graph structure to store entities and relationships. For example, in communication engineering, a certain device may have a direct connection with a specific operating procedure or safety standard. At the same time, extract the attributes of the entity, such as the service life of the equipment, the scope of application of the operating procedure, the background of the formulation of the safety standard, etc. Finally, use the community detection algorithm to divide multiple entities with close relationships into a community, so as to obtain a specific theme and concept. For each community, use the large language model to generate a summary to provide a basis for the answer. Use the embedding model to convert each entity and relationship in the knowledge graph into a vector and store it in the vector library. Obtain a knowledge vector library related to communications industry security.
[0045] S2, input data processing step: obtain the current work task input by the construction personnel according to the prompt, and obtain the work environment data of the factors affecting the construction at the current location, and then convert the work task and work environment data from text data to vector form; before obtaining the current work task input by the construction personnel according to the prompt in step S2, provide a preset work project content list for users to choose, each project contains a fixed work process and required resources, the work process includes the work time and the number of workers, and the required resources include work equipment; and then collect user feedback and organize it into work tasks. In step S2, the input work task and work environment data are vectorized from text data through the word2Vec tool, and a vector model of the work task and work environment is constructed, so that the text content of the work task and work environment is simplified into a series of vectors in the N-dimensional vector space.
[0046] In this embodiment, the construction safety manager determines the content of the work task, and can select regular items according to the prompt words, or can customize the input, and then select the work time, number of workers, work equipment and other information. Secondly, use GPS to locate the work location and obtain the weather conditions of the current location during the work time. Then, the data of the work task and the work environment are converted into text, and the text is pre-processed by cleaning, word segmentation, and stop word removal. The Word2Vec algorithm is used to map each word to a unique point in a high-dimensional vector space by learning the co-occurrence relationship between words, and the text data that has been preliminarily processed is converted into vector form.
[0047] S3, data fusion step: using a sorting method based on the fusion of knowledge vector library, job tasks and job environment data, candidate text data whose similarity with the job task vector reaches a threshold value are retrieved from the knowledge vector library, the weights of the text data related to the job environment data vector are optimized, and then the text data whose similarity reaches a threshold value and is ranked in the top N are screened out through sorting; the obtained text data whose similarity is ranked in the top N items, as well as the job task and job environment data input by the user are input into a preset prompt word template to form a prompt text, so that the large language model can understand it more accurately.
[0048] The sorting method in step S3 specifically comprises the following steps:
[0049] S31: define the knowledge vector library as the knowledge vector library K, the operation task vector as T and the operation environment data vector as E, calculate the similarity between the vector in the knowledge vector library K and the operation task vector T, and the similarity calculation formula is as follows:
[0050]
[0051] S32: retrieving candidate text data whose similarity reaches a threshold from the knowledge vector library, wherein the candidate text data is a text block S;
[0052] S33: Integrate environmental factors and calculate the similarity between the environmental vector E and the text block S. The similarity calculation formula is as follows:
[0053]
[0054] S34: The similarity calculated in step S33 is applied to the text block S as a weight. The weight calculation formula is as follows:
[0055]
[0056] The previously obtained weight a i , assigned to the corresponding V value and weighted summed, the expression is as follows;
[0057]
[0058] Among them, V is the score of different text blocks S, L is the number of vectors, and the final score V value is updated according to the weight of the operation environment data vector; the calculated weight a i The larger the value, the more important it is, and the more similar the environmental features are to a candidate text.
[0059] S34: sorting by V value to select text data whose similarity reaches the threshold and is ranked in the top N.
[0060] S4, safety briefing output step: input the prompt text into the large language model to generate a communication engineering safety briefing. The large language model in step S4 is a large language model based on LLAMA3-8B and fine-tuned, and the fine-tuning method is: use the communication engineering industry data set to fine-tune the model to enhance the model's understanding of the terms, scenarios and processes in this field. The large language model then provides potential safety hazards, preventive measures and emergency measures, and graphically displays the operating procedures of the task. In the safety briefing book, the operating procedures and safety matters are displayed according to the task to facilitate the understanding and viewing of construction safety managers; intelligently display dangerous factors, preventive measures, etc. according to the working environment to ensure construction safety, and generate countermeasures and suggestions in real time according to the nature, severity and on-site environment of the dangerous event; when encountering dangerous events, construction safety managers ask questions through text or voice, quickly generate effective answers and response strategies, and continuously optimize the model based on feedback data and historical data to improve the pertinence and practicality of the response measures.
[0061] After understanding the contextual information, the large language model returns the safety briefing required by the construction safety manager and provides effective emergency suggestions. Moreover, after fine-tuning, the large language model has improved the understanding of the safety of the communication engineering industry's operational tasks, and is built into an instantly available model dialogue service, which generates answers in real time and accurately, outputs the safety briefing, and returns it to the construction safety manager. The output safety briefing mainly includes the sources of danger at the construction site, the specific preventive measures corresponding to the specific operation links, the safety matters that should be paid attention to during construction, the production operation specifications and processes based on them, and the emergency measures that should be taken when an accident occurs. If the construction safety manager encounters an emergency, he can also enter questions. The large language model will output answers based on the user's questions and the sorting results of the previous module and return them to the construction safety manager.
[0062] The above is only an embodiment of the present invention. The common sense such as the known specific structure and characteristics in the scheme is not described in detail here. The ordinary technicians in the relevant field know all the common technical knowledge in the technical field of the invention before the application date or priority date, can obtain all the existing technologies in the field, and have the ability to apply the conventional experimental means before that date. The ordinary technicians in the relevant field can improve and implement this scheme in combination with their own abilities under the enlightenment given by this application. Some typical known structures or known methods should not become obstacles for ordinary technicians in the relevant field to implement this application. It should be pointed out that for those skilled in the art, without departing from the structure of the present invention, several deformations and improvements can be made, which should also be regarded as the protection scope of the present invention, which will not affect the effect of the implementation of the present invention and the practicality of the patent. The protection scope required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to interpret the content of the claims.
Claims
1. A method for generating communication engineering safety briefing content based on a large language model, characterized in that: The following steps are involved: S1. Steps for building a knowledge vector library: collect and organize relevant documents and case materials in the communication engineering industry, perform text semantic slicing and vectorization operations, use a large language model to build a knowledge graph, and then store the knowledge graph information in the knowledge vector library; S2, input data processing step: obtaining the current work task input by the construction personnel according to the prompt, and obtaining the work environment data of the factors affecting the construction at the current location, and then converting the work task and work environment data from text data into vector form; S3, data fusion step: using a sorting method based on the fusion of knowledge vector library, job task and job environment data, retrieving candidate text data whose similarity with the job task vector reaches a threshold from the knowledge vector library, optimizing the weight of text data related to the job environment data vector, and then sorting out text data whose similarity reaches the threshold and is ranked in the top N; inputting the obtained text data whose similarity is ranked in the top N, as well as the job task and job environment data input by the user into a preset prompt word template to combine into a prompt text; S4, safety briefing output step: input the prompt text into the large language model to generate the communication engineering safety briefing.
2. According to claim 1, a method for generating communication engineering safety briefing content based on a large language model is characterized by: The step S1 specifically includes the following steps: S11: Collect relevant documents and case materials of the communication engineering industry, including security-related systems, operational specifications, safety risks, laws, regulations and policy documents of the communication engineering industry; S12: Segmenting the collected relevant documents and case materials by using text segmentation technology; the text segmentation technology is: dividing the text into large paragraphs and small paragraphs, making each paragraph within the maximum length limit, with complete sentences as units, and setting a set overlap between adjacent paragraphs to capture the logical coherence between the paragraphs; S13: Identify entities in the text through a large language model, identify various professional terms and key entities in the text, extract the relationships between entities, analyze the interactions and dependencies between different entities, and extract the attributes of the entities. Then, vectorize the text and build a knowledge vector library.
3. According to claim 2, a method for generating communication engineering safety disclosure content based on a large language model is characterized by: Before obtaining the current work task input by the construction personnel according to the prompt in step S2, a preset work project content list is provided for the user to choose, each project contains a fixed work process and required resources, the work process includes the work time and the number of workers, and the required resources include work equipment; and then the user feedback is collected and organized into work tasks.
4. According to claim 3, a method for generating communication engineering safety briefing content based on a large language model is characterized in that: When obtaining the working environment data of the factors affecting the construction at the current location in step S2, the working location is obtained through GPS positioning, and then the working environment data is obtained by searching the weather website on the Internet. The working environment data includes precipitation information, wind direction information, cloud cover information, wind speed information and temperature information.
5. According to claim 4, a method for generating communication engineering safety disclosure content based on a large language model is characterized in that: In step S2, the inputted work task and work environment data are vectorized by using the word2Vec tool, and a vector model of the work task and work environment is constructed, so that the textual content of the work task and work environment is simplified into a series of vectors in an N-dimensional vector space.
6. According to claim 5, a method for generating communication engineering safety disclosure content based on a large language model is characterized in that: The sorting method in step S3 specifically comprises the following steps: S31: define the knowledge vector library as the knowledge vector library K, the operation task vector as T and the operation environment data vector as E, calculate the similarity between the vector in the knowledge vector library K and the operation task vector T, and the similarity calculation formula is as follows: S32: retrieving candidate text data whose similarity reaches a threshold from the knowledge vector library, wherein the candidate text data is a text block S; S33: Integrate environmental factors and calculate the similarity between the environmental vector E and the text block S. The similarity calculation formula is as follows: S34: The similarity calculated in step S33 is applied to the text block S as a weight. The weight calculation formula is as follows: The previously obtained weight a i , assigned to the corresponding V value and weighted summed, the expression is as follows; Where V is the score a of different text blocks S i , L is the number of vectors, and the final score V value is updated according to the weight of the operation environment data vector; S34: sorting by V value to select text data whose similarity reaches the threshold and is ranked in the top N.
7. The method for generating communication engineering safety briefing content based on a large language model according to claim 6 is characterized by: The large language model in step S4 is a large language model based on LLAMA3-8B and fine-tuned, and the fine-tuning method is: fine-tuning the model using a communication engineering industry data set, and the large language model provides potential safety hazards, preventive measures and emergency measures, and graphically displays the operation process of the task.
Citation Information
Cited By
Knowledge graph construction system and method based on cue words
CN119443253A
Large language model cue word generation method and system for power supply service scene
CN119761363A
