Editable intelligent safety monitoring report generation method and system
By dividing the safety monitoring report template into fixed and variable parts, and using the safety monitoring text generation model, the problems of high editing cost and difficulty in intelligent updating of the safety monitoring report generation method in the existing technology are solved, and an efficient and intelligent Generate customized safety monitoring reports.
Patent Information
- Application Number
- CN202410725628.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-06
- Publication Date
- 2024-09-27
AI Technical Summary
Existing safety monitoring report generation methods have problems such as high template editing costs, inability to update intelligently, and unintelligent data analysis, making it difficult to meet the informatization and intelligence needs of water conservancy projects.
Adopt an editable and intelligent security monitoring report generation method by dividing the security monitoring report template into a fixed part and a variable part, update the variable part using tag configuration, and use a pre-built security monitoring text generation model for data processing when necessary and intelligent updates of text descriptions.
It improves the quality and efficiency of safety monitoring reports, realizes intelligent updating and generation of data without manual analysis, and reduces report generation time and editing complexity.
Smart Images

Figure CN118709673A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of engineering safety monitoring, and in particular to an editable intelligent safety monitoring report generation method and system. Background Art
[0002] During the construction and operation management of water conservancy projects, safety monitoring is an effective means and method to grasp the safety status of the project and control risks, and it is also a key link affecting the safety of the project. Safety monitoring weekly, monthly, and annual reports are important work contents in dam safety monitoring and management, and are also important business tasks of relevant management units. However, the content of the safety monitoring report covers a wide range, with the characteristics of diverse data types, huge data volume, and strong professionalism in report compilation and production. With the continuous development of automated dam safety monitoring, the traditional way of manually writing reports can no longer meet the needs of today's water conservancy informationization and intelligence. Therefore, it is urgent to develop a technology for automatically generating safety monitoring reports.
[0003] The basic process of the existing safety monitoring report generation method is: first customize the report template according to the label definition in the method, replace and update the data and charts of the labels in the report based on the database, and finally generate a safety monitoring report. However, the existing safety monitoring report generation method has problems such as high template editing cost and inability to update intelligently.
[0004] The invention patent publication document with the publication number of 112052659A discloses a method for generating a safety monitoring report based on data self-adaptation. First, the element attributes are defined, including "element type", "selection method", "project location", "measurement point", "physical quantity", "unit quantity" and "ID". Based on this set of element attributes, the text and charts that need to be dynamically updated in the report are replaced, the attribute group is saved to the database and the ID is inserted into the report to form a report template. The ID of the entire report is traversed, and the corresponding element attributes are found in the database. Then, the corresponding curves, reports and texts are generated according to the time and replaced in the template, so as to finally form a complete safety monitoring report. The above method has the following shortcomings: (1) The template making process uses the ID to mark the part to be replaced, which is not intuitive enough. The template editor cannot intuitively understand the true meaning of this ID and the user is required to save the attribute group to the database. The template making process is too cumbersome and the user's use cost is high. In addition, when generating the report, it is necessary to access the database at least twice, first to obtain the attribute group and then to obtain the data, which increases the report generation time. (2) The monitoring data cannot be analyzed intelligently. For text that needs to be dynamically updated, only the updated part of the data can be replaced. When the monitoring data changes, the corresponding text description cannot be generated intelligently.
[0005] The invention patent publication document with the publication number of 114492357A discloses a method for automatically generating a water project safety monitoring report based on template customization. First, the report content is divided according to the safety monitoring business needs, and the text and charts that need to be dynamically updated are marked to make a template; then the template is assembled to form a report template, the text and chart marks are associated with relevant measurement points and the relevant configuration of data acquisition is completed; finally, according to the marks in the report template, the corresponding data is extracted from the database and replaced to form a safety monitoring report. The above method has the following shortcomings: (1) Since the scheme is based on the B / S architecture, the fixed part of the template needs to be HTML-encoded when the template is made. The safety monitoring report has the characteristics of variability, so the fixed part of the report may also be modified according to the project needs, and its corresponding HTML code must also be changed accordingly, which increases the complexity of template editing; at the same time, the HTML coding needs to be completed by the developer, so it is impossible for the engineering designer to make the template independently. (2) The monitoring data cannot be intelligently analyzed, and the text part in the report can only be updated.
[0006] Therefore, it is necessary to develop an editable intelligent safety monitoring report generation method and system to solve the defect that the report cannot be updated intelligently in the prior art. Summary of the invention
[0007] The purpose of the present invention is to provide an editable intelligent safety monitoring report generation method and system, based on the data generated during the construction and operation management of water conservancy projects collected by various instruments, and storing the data in a database, obtaining data from the database based on the labels in the safety monitoring report template, and selecting whether to use the safety monitoring text generation model for updating according to the update type of the variable part in the safety monitoring report template, and finally generating a safety monitoring report. The present invention can intelligently update and generate safety monitoring reports without manual data analysis, thereby improving the quality of safety monitoring reports.
[0008] The technical solution for achieving the purpose of the present invention is as follows: In one aspect, the present invention provides an editable intelligent safety monitoring report generation method, comprising: Step 1: Create a safety monitoring report template; Among them, when making, the safety monitoring report template is divided into a fixed part and a variable part according to the update status of the safety monitoring report in the intelligent safety monitoring report generation method. The fixed part is the safety monitoring report content that does not need to be changed when the safety monitoring report is updated, and the variable part is the safety monitoring report content that needs to be changed when the safety monitoring report is updated. The variable part is divided into multiple types, and the multiple types at least include a data part type that needs to be updated and a text description part type that needs to be updated. The data part type that needs to be updated includes updating the characteristic value diagram, characteristic value table or installation information table, and process line diagram in the safety monitoring report. The text description part type that needs to be updated includes updating the data in the text of the safety monitoring report, fixed sentences, and text descriptions corresponding to the data; the variable part is updated only after the label configuration; Step 2: Generate a safety monitoring report in an intelligent safety monitoring report generation method based on the safety monitoring report template of step 1; Specifically, first, determine the time range for updating the safety monitoring report, and traverse the labels in the safety monitoring report template that have not been replaced in step 1; secondly, obtain data from the database according to the time range and the information corresponding to the label configuration; next, in the process of updating the variable part, determine whether to use the safety monitoring text generation model that has been built and trained in advance according to the content of the label; then, update the variable part in the safety monitoring report corresponding to the replaced label according to the determination result and the data obtained from the database; finally, generate a safety monitoring report; Among them, secondly, determining whether to use the security monitoring text generation model that has been built and trained in advance when updating the variable part includes at least one of the following situations: Update the data type that needs to be updated in combination with the time range; In combination with the time range, the data in the text and the fixed sentences in the text description part type that needs to be updated are updated; In combination with the time range and the security monitoring text generation model constructed and trained in advance, the text description corresponding to the data in the type of text description part that needs to be updated is updated.
[0009] Based on one aspect, as a preferred embodiment of the present invention, the safety monitoring report template is prepared in step 1, specifically: When making the safety monitoring report template, the safety monitoring report template is divided into a fixed part and a variable part according to the update status of the safety monitoring report in the intelligent safety monitoring report generation method, wherein the fixed part is the content of the safety monitoring report that has been edited in advance and does not need to be changed, and the variable part includes text, images and tables; the text of the variable part in the safety monitoring report template is divided into two categories, one is to update the text description corresponding to the safety monitoring report according to the changes in the monitoring data, and the other is to update the data in the text in the safety monitoring report; In the step 1, the data types that need to be updated include updating the characteristic value graph, characteristic value table or installation information table, and process line graph in the safety monitoring report, specifically: If the updated part is a characteristic value graph, a characteristic value table or an installation information table in the safety monitoring report, the unconfigured tag is configured according to the project site, section name, instrument name and insertion type selected during the construction and operation management of the water conservancy project, wherein the insertion type includes a characteristic value graph, a characteristic value table or an installation information table; If the updated part is a process line diagram in the safety monitoring report, first determine whether the process line diagram corresponds to a single-point process line, a full-point process line or a partial-point process line; if it is determined to be a single-point process line, the unconfigured label is configured according to the project site, instrument type, measuring point name and the single-point process line selected during the construction and operation management of the water conservancy project; if it is determined to be a full-point process line, the unconfigured label is configured according to the project site, instrument type and the full-point process line selected during the construction and operation management of the water conservancy project; if it is determined to be a partial-point process line, the unconfigured label is configured in sequence according to the measuring point names selected during the construction and operation management of the water conservancy project; when updating the image and the table in the safety monitoring report, first determine the process line type in the process line diagram corresponding to the updated part according to the definition of the label configuration, and then draw the process line diagram according to the process line type; If the updated part is the text in the safety monitoring report, the update status of the corresponding text is divided into multiple types, among which the first type includes: if the data in the text needs to be updated, the definition of the unconfigured label corresponding to the data is configured according to the project site, section name, instrument name and insertion type selected during the construction and operation management of the water conservancy project; the insertion type includes maximum value, minimum value, latest time, latest value, maximum amplitude and minimum amplitude; the second type includes: if the fixed sentence in the text needs to be updated, if the fixed sentence is a sentence pre-set in the safety monitoring report and the overall structure of the sentence remains unchanged, then the sentence contains the water conservancy project. One or more of the maximum value, minimum value, latest time, latest value, maximum amplitude and minimum amplitude updated monthly during the construction and operation management; if the fixed sentence is monthly amplitude, the definition of the label corresponding to the monthly amplitude is "project location + instrument type + monthly amplitude"; the third type includes: if the text description corresponding to the monitoring data needs to be updated, the definition of the label in the paragraph corresponding to the text description is configured according to the project location, instrument name and insertion type selected during the construction and operation management of the water conservancy project; when the insertion type of the text is text description, the safety monitoring text generation model built and trained in advance is used to update the text description in the safety monitoring report.
[0010] Based on one aspect, as a preferred embodiment of the present invention, the step 1 of preparing a safety monitoring report template further includes inserting a drawing or visualization when making a table in the process of preparing the safety monitoring report template, specifically: View the characteristic value graph, characteristic value table or installation information table corresponding to the data obtained from the database according to the time range, project location, and instrument name selected when configuring the label; view the process line graph corresponding to the data obtained from the database according to the time range, project location, instrument name, and measuring point name selected when configuring the label; view the drawing or tabulation of the section corresponding to the section name according to the section name selected when configuring the label; If you need to insert a drawing or tabulation in the safety monitoring report template, double-click the drawing or tabulation in the interface of the safety monitoring report template, and the drawing or tabulation and the label corresponding to the drawing or tabulation can be inserted into the safety monitoring report template at the same time; if you need to update the data or text of a paragraph in the safety monitoring report template, select the data area corresponding to the data or text, and select the engineering part, instrument name, section name and insertion type corresponding to the data area in the interface of the safety monitoring report template, and click Insert in the interface to define the label corresponding to the data or text; if the safety monitoring report template does not need to draw or tabulate according to the section, the section name selected when configuring the label is empty; When the safety monitoring report template subsequently generates a safety monitoring report, a different generation method is selected according to the content of the label in the safety monitoring report template and the label in the safety monitoring report template is replaced.
[0011] Based on one aspect, as a preferred embodiment of the present invention, in the step one, there is no need to understand the definition rules of the label in the process of making the safety monitoring report template. The process of the engineering designer editing the intelligent safety monitoring report for the first time is also the process of defining the safety monitoring report template.
[0012] Based on one aspect, as a preferred embodiment of the present invention, the step 2, generating a security monitoring report in the intelligent security monitoring report generation method based on the security monitoring report template of the step 1, includes: First, according to the needs of the safety monitoring report, the time range for its update is selected. If the characteristic graph corresponding to the safety monitoring report template in the safety monitoring report needs to include average value, amplitude and elevation information, then the engineering designer checks the basic settings column in the characteristic graph in the safety monitoring report; traverses the labels that have not been replaced in the step 1 in the entire safety monitoring report template, and updates the safety monitoring report in combination with the selection of the label configuration by the engineering designer in the safety monitoring report template; Next, according to the engineering location, section name, instrument name contained in the configured tag and the time range for updating according to the requirements of the safety monitoring report, the monitoring data corresponding to the time range is extracted from the database; Next, the updated part in the variable part is classified according to the insertion type in the content of the replaced label. If the replaced label includes a single measuring point name, the updated part in the variable part is determined to be a single measuring point process line diagram; if the replaced label includes multiple measuring point names, the updated part in the variable part is determined to be a multi-measurement point combined process line diagram; if the replaced label includes a characteristic value diagram, a characteristic value table or an installation information table, the updated part in the variable part is determined to be an image or table that generates a corresponding characteristic value diagram, characteristic value table or installation information table; if the replaced label includes a maximum value, a minimum value, a latest time, a latest value, a maximum value of a variation range or a minimum value of a variation range, the updated part in the variable part is determined to be a single measuring point process line diagram; if the replaced label includes a characteristic value diagram, a characteristic value table or an installation information table, the updated part in the variable part is determined to be an image or table that generates a corresponding characteristic value diagram, a characteristic value table or an installation information table; The updated part in the variable part is to generate a corresponding text value; if the replaced label includes the monthly fluctuation range, the updated part in the variable part is determined to be a fixed statement generated corresponding to the replaced label; if the replaced label includes a text description, the updated part in the variable part is determined to be a description statement generated corresponding to the replaced label; if the updated part in the variable part is determined to be a process line diagram, a characteristic value diagram, a characteristic value table, an installation information table, or various numerical values or fixed statements included in the label, then based on the monitoring data within the time range corresponding to the replaced label extracted from the database, drawing, tabulating, generating values or fixed statements are inserted into the corresponding place of the label in the safety monitoring report to complete the replacement.
[0013] Based on one aspect, as a preferred embodiment of the present invention, the step 2, generating the security monitoring report in the intelligent security monitoring report generation method based on the security monitoring report template in the step 1, further includes: Next, if it is determined that the updated part in the variable part of the safety monitoring report template is a description statement, firstly, data cleaning is performed based on the monitoring data corresponding to the time range extracted from the database with the replaced label, random errors in the monitoring data corresponding to the time range extracted from the database with the replaced label are filtered, and normal data in the monitoring data are retained; then, based on the cleaned normal data, a two-dimensional monitoring sequence is constructed to be input into the safety monitoring text generation model. , the two-dimensional monitoring sequence constructed It is a data sequence with time as the first dimension and monitoring items as the second dimension, wherein when constructing the data sequence, the monitoring items corresponding to the second dimension are determined according to the monitoring data of each instrument, and the monitoring data according to each instrument is composed of the original data measured by each instrument and the result data calculated based on the original data; based on the monitoring items, the two-dimensional monitoring sequence is Divide into ,in is the number of monitoring items, To monitor the time series of the project; Based on the two-dimensional monitoring sequence with time as the first dimension and monitoring items as the second dimension The input is input into the safety monitoring text generation model constructed and trained in advance, and the encoder in the safety monitoring text generation model extracts the two-dimensional monitoring sequence based on the two-dimensional monitoring sequence. The effective features of the monitoring data are used to obtain a feature vector, and the feature vector is input into the decoder in the security monitoring text generation model. The classifier in the decoder first generates classified text information corresponding to the monitoring data according to the feature vector, and the text generator in the decoder generates a text description corresponding to the monitoring data according to the classified text information and the feature vector. Finally, the text description corresponding to the monitoring data generated by the text generator in the decoder is inserted into the place corresponding to the replaced label in the security monitoring report to complete the replacement of the description sentence; Repeat the following steps until the traversal of the safety monitoring report is completed, and finally generate a complete safety monitoring report by replacing the tag.
[0014] Based on one aspect, as a preferred embodiment of the present invention, the second step in the step 2, in the process of updating the variable part, determines whether to use the safety monitoring text generation model that has been built and trained in advance, wherein before determining whether to use the safety monitoring text generation model that has been built and trained in advance, it includes: constructing a safety monitoring data set for safety monitoring during the construction and operation management of water conservancy projects, constructing a safety monitoring text generation model based on the variable part in the updated intelligent safety monitoring report, and training the safety monitoring text generation model based on the safety monitoring data set; The next step in the step 2 is to update the text description corresponding to the updated monitoring data in the text description part type that needs to be updated in combination with the time range and the safety monitoring text generation model that has been built and trained in advance, including: when training the safety monitoring text generation model based on the safety monitoring data set or using the safety monitoring text generation model in the process of updating the variable part, the updated monitoring data corresponding to the time range in the text description part type that needs to be updated is input into the safety monitoring text generation model that has been built and trained in advance, and the safety monitoring text generation model outputs the text description corresponding to the updated monitoring data, and the text description is the text description inserted or replaced in the safety monitoring report.
[0015] Based on one aspect, as a preferred embodiment of the present invention, the step 2 of constructing a safety monitoring data set for safety monitoring during the construction and operation management of a water conservancy project includes: A large number of monitoring data samples are obtained based on safety monitoring during the construction and operation management of water conservancy projects. The large number of monitoring data samples are composed of monitoring data of various safety monitoring collected by various monitoring instruments in water conservancy projects. The monitoring data generated by various safety monitoring of the multiple monitoring instruments are composed of original data measured by each instrument and result data calculated based on the original data; based on the observation method, the data sequence of the large number of monitoring data samples is marked and classified, and a manually annotated text description is attached when marking and classifying the data sequence, and the data sequence of the marked classification and the text description is formed into a labeled monitoring sample data set; Preprocessing the monitoring data, eliminating gross errors based on the monitoring data collected by the multiple monitoring instruments in the large number of monitoring data samples, filtering the random errors in the monitoring data after the gross errors are eliminated, and retaining normal data in the monitoring data; Text preprocessing, data cleaning based on the text descriptions with manual annotations in the large amount of monitoring data samples obtained; the data cleaning process includes: first correcting typos in the text descriptions with manual annotations; then unifying the text descriptions after the typos are corrected, and the unified expression includes: replacing and unifying the text descriptions of the same event in the text descriptions after the typos are corrected; and finally segmenting the text descriptions after the unified expression to form a dictionary; Dividing the monitoring sample data set after the monitoring data preprocessing and the text preprocessing are completed, and dividing the monitoring sample data set into a monitoring sample training data set and a monitoring sample test data set; The construction in step 2 is based on updating the safety monitoring text generation model of the variable part in the intelligent safety monitoring report, including: A safety monitoring text generation model based on updating the variable part in the intelligent safety monitoring report is constructed, which consists of two parts: an encoder and a decoder. The structure of the encoder of the safety monitoring text generation model is constructed based on a convolutional neural network. During training and use, the encoder extracts effective features of data collected during the construction and operation management of water conservancy projects, and performs feature encoding on the effective features to obtain feature encoding information. The structure of the decoder of the safety monitoring text generation model is divided into two parts: a classifier and a text generator. The classifier obtains a classification result based on the collected data based on the feature encoding information obtained by the encoder, and the text generator decodes the feature encoding information and the classification result to generate text information corresponding to the collected data. The text generator completes the mapping of the collected data to the text description.
[0016] Based on one aspect, as a preferred embodiment of the present invention, the step 2 of training the security monitoring text generation model based on the security monitoring data set includes: Initializing the security monitoring text generation model; The monitoring data of the monitoring sample training data set in the monitoring sample data set is input into the encoder of the security monitoring text generation model. For each monitoring sample M corresponding to the monitoring data in the monitoring sample training data set, it is first input into the encoder of the security monitoring text generation model to obtain feature coding information ,
[0017] The classifier of the decoder in the security monitoring text generation model is based on the feature encoding information obtained by the encoder Classify and obtain the feature coding information The corresponding probability vector , the probability vector The classified text information S is obtained by matching the classification label of the classifier; then the classified text information S is converted into a vector representation as a classified text vector based on the word embedding method. , the classified text vector Combined with the feature encoding information obtained by the encoder in the security monitoring text generation model Get classification results , the classification results The text generator part input to the decoder generates the sentence corresponding to the monitoring data. The final sentence generation process is described as follows:
[0018]
[0019] in, Represents the output of LSTM at time t-1, and uses the cross entropy loss function to calculate the loss value based on its prediction results; The parameters of the security monitoring text generation model are updated by using a gradient descent method, and the iterative training is repeated until a preset number of iterations of the security monitoring text generation model is reached; The monitoring sample test data set is used as the input of the pre-trained security monitoring text generation model for forward propagation, and the trained security monitoring text generation model is input for prediction to obtain a prediction result. Based on the prediction result, the security monitoring text generation model is trained again or the training is terminated to obtain the security monitoring text generation model to be used.
[0020] On the other hand, the present invention also provides an editable intelligent safety monitoring report generation system, comprising: A template making unit, the template making unit is used to make a safety monitoring report template. When making the template, the template making unit divides the safety monitoring report template into a fixed part and a variable part according to the safety monitoring report update situation in the intelligent safety monitoring report generation method. The fixed part is the safety monitoring report content that does not need to be changed when the safety monitoring report is updated. The variable part is the safety monitoring report content that needs to be changed when the safety monitoring report is updated. The variable part is divided into multiple types, and the multiple types at least include a data part type that needs to be updated and a text description part type that needs to be updated. The data part type that needs to be updated includes updating a characteristic value diagram, a characteristic value table or an installation information table, and a process line diagram in the safety monitoring report. The text description part type that needs to be updated includes updating data in the text of the safety monitoring report, fixed sentences, and text descriptions corresponding to the data; the variable part is updated only after being configured by a tag; A report generation unit, wherein the report generation unit generates a safety monitoring report in an intelligent safety monitoring report generation method based on the safety monitoring report template generated by the template making unit; the report generation unit determines a time range for updating the safety monitoring report, and traverses the labels in the safety monitoring report template that have not been replaced in step one; the report generation unit obtains data from a database according to the information corresponding to the time range and the label configuration; during the process of updating the variable part, the report generation unit determines whether to use a safety monitoring text generation model that has been constructed and trained in advance according to the content of the label; the report generation unit updates the variable part in the safety monitoring report corresponding to the replaced label according to the judgment result and the data obtained from the database; the report generation unit finally generates a safety monitoring report.
[0021] Compared with the prior art, the present invention has the following beneficial effects: 1. The present invention is based on the data generated during the construction and operation management of water conservancy projects collected by various instruments, and the data is stored in a database. The data is obtained from the database based on the labels in the safety monitoring report template. In the safety monitoring report template, according to the update type of the variable part, whether to use the safety monitoring text generation model for updating is selected, and finally a safety monitoring report is generated. The present invention can not only intelligently update the variable part according to the data, but also generate a safety monitoring report without manual analysis of the data, thereby improving the quality of the safety monitoring report.
[0022] 2. The safety monitoring text generation model constructed and trained by the present invention can intelligently analyze the monitoring data collected during the safety monitoring management process of various instruments used during the construction and operation management of water conservancy projects. The constructed and trained safety monitoring text generation model can be used for the collected monitoring data to obtain the text description corresponding to the monitoring data, and the text description can be updated and replaced in the safety monitoring report. There is no need for manual analysis of the monitoring data. At the same time, it can also improve the quality of the safety monitoring report, which is of great significance for improving the efficiency of analysis of safety monitoring data of water conservancy projects.
[0023] 3. The security monitoring report template editing method in the intelligent security monitoring report generation method of the present invention does not require engineering designers to understand label configuration rules. It can realize the synchronous insertion of labels while inserting images and tables according to the needs of the security monitoring report. At the same time, the visualization of inserting drawings or tables also makes the entire security monitoring report template production process more convenient. The process of editing the security monitoring report template is also the process of editing the security monitoring report. It has a low threshold for use, is friendly to engineering designers, and greatly improves work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A flowchart of an editable intelligent security monitoring report generation method provided by an embodiment of the present invention; Figure 2 A diagram of the editing interface of the security monitoring report template provided in an embodiment of the present invention; Figure 3 A flowchart of generating a safety monitoring report in a practical application in step 2 provided in an embodiment of the present invention; Figure 4 A diagram of a process for constructing a security monitoring data set provided by an embodiment of the present invention; Figure 5 A principle block diagram of an editable intelligent safety monitoring report generation system provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0025] The present invention is described in detail below in conjunction with the various embodiments shown in the accompanying drawings, but it should be noted that these embodiments are not limitations of the present invention, and any equivalent transformations or substitutions in functions, methods, or structures made by ordinary technicians in the field based on these embodiments are all within the scope of protection of the present invention.
[0026] See also Figure 1 , Figure 1A flowchart of an editable intelligent security monitoring report generation method provided in an embodiment of the present invention is provided. An editable intelligent security monitoring report generation method in an embodiment of the present invention includes: step one, making a security monitoring report template; step two, generating a security monitoring report in the intelligent security monitoring report generation method based on the security monitoring report template in step one.
[0027] Some technical key points of the embodiment of the present invention lie in the editing method when making a security monitoring report template. The editing when making a security monitoring report template is visualized, what you see is what you get, user-friendly, and has a low threshold for use. Moreover, there is no need to update the code when the security monitoring report template of the embodiment of the present invention changes.
[0028] In step one of the embodiments of the present invention, a safety monitoring report template is prepared. Specifically, during preparation, the safety monitoring report template is divided into a fixed part and a variable part according to the safety monitoring report update status in the intelligent safety monitoring report generation method. The fixed part is the safety monitoring report content that does not need to be changed when the safety monitoring report is updated, and the variable part is the safety monitoring report content that needs to be changed when the safety monitoring report is updated. The variable part is divided into multiple types, and the multiple types include at least a data part type that needs to be updated and a text description part type that needs to be updated. The data part type that needs to be updated includes updating the characteristic value diagram, characteristic value table or installation information table, and process line diagram in the safety monitoring report. The text description part type that needs to be updated includes updating the data in the text of the safety monitoring report, fixed sentences, and text descriptions corresponding to the data; the variable part is updated only after the label configuration.
[0029] On the basis of the technical solution disclosed in the above-mentioned invention embodiment, a safety monitoring report template is prepared in step 1 of the embodiment of the present invention, specifically: when preparing the safety monitoring report template, the safety monitoring report template is divided into a fixed part and a variable part according to the update status of the safety monitoring report in the intelligent safety monitoring report generation method, wherein the fixed part is the content of the safety monitoring report that is edited in advance and does not need to be changed, and the variable part includes text, images and tables; the text of the variable part in the safety monitoring report template is divided into two categories, one is to update the text description corresponding to the safety monitoring report according to the changes in the monitoring data, and the other is to update the data in the text in the safety monitoring report; In the above step 1 of the embodiment of the present invention, the types of data parts that need to be updated include updating the characteristic value graph, characteristic value table or installation information table, and process line graph in the safety monitoring report, specifically: If the updated part is the characteristic value diagram, characteristic value table or installation information table in the safety monitoring report, the unconfigured label is configured according to the project site, section name, instrument name and insertion type selected during the construction and operation management of the water conservancy project. The insertion type includes the characteristic value diagram, characteristic value table or installation information table, for example, "Characteristic value diagram of anchor stress gauge in section 2-2 of the access tunnel to the factory". If the section name is empty, it will not be displayed during label configuration.
[0030] If the updated part is a process line diagram in the safety monitoring report, first determine whether the process line diagram corresponds to a single-point process line, a full-point process line, or a partial-point process line; if it is determined to be a single-point process line, the unconfigured tags are configured according to the project site, instrument type, measurement point name, and single-point process line selected during the construction and operation management of the water conservancy project, such as "R201-JCD single-point process line of anchor stress gauge in the plant access tunnel"; if it is determined to be a full-point process line, the unconfigured tags are configured according to the project site, instrument type, measurement point name, and single-point process line selected during the construction and operation management of the water conservancy project. The process part, instrument type and all measuring point process lines are configured, such as "all measuring point process lines of anchor stress gauges in the traffic tunnel entering the factory"; if it is judged to be a partial measuring point process line, the unconfigured tags are connected and configured in sequence according to the measuring point names selected during the construction and operation management of the water conservancy project, such as "R201-JCD, R202-JCD, R203-JCD"; when updating the images and tables in the safety monitoring report, first determine the process line type in the process line diagram corresponding to the updated part according to the definition of the tag configuration, and then draw the process line diagram according to the process line type.
[0031] If the updated part is the text in the safety monitoring report, the update of the corresponding text is divided into multiple types, among which the first type includes: if the data in the text needs to be updated, the definition of the unconfigured label corresponding to the data is configured according to the project site, section name, instrument name and insertion type selected during the construction and operation management of the water conservancy project; the insertion types include maximum value, minimum value, latest time, latest value, maximum amplitude and minimum amplitude, such as "maximum value of the anchor stress gauge in the 2-2 section of the traffic tunnel entering the factory"; the second type includes: if the fixed sentence in the text needs to be updated, if the fixed sentence is a sentence preset in the safety monitoring report and the overall structure of the sentence remains unchanged, then the sentence contains the water conservancy project construction. One or more of the maximum value, minimum value, latest time, latest value, maximum amplitude of variation and minimum amplitude of variation updated monthly during the construction and operation management period; if the fixed sentence is monthly amplitude of variation, the definition of the label corresponding to the monthly amplitude of variation is "project location + instrument type + monthly amplitude of variation"; the third type includes: if the text description corresponding to the monitoring data needs to be updated, the definition of the label in the paragraph corresponding to the text description is configured according to the project location, instrument name and insertion type selected during the construction and operation management of the water conservancy project; when the insertion type of the text is a text description, such as "text description of the anchor stress gauge in the 2-2 section of the traffic tunnel entering the factory", the safety monitoring text generation model built and trained in advance is used to update the text description in the safety monitoring report.
[0032] Since the types of images and tables that need to be inserted into the safety monitoring report template are not known in advance when making the safety monitoring report template, it is necessary to check the types of images and tables before inserting them into the safety monitoring report template, which reflects the importance of visualization in the process of making the safety monitoring report template. Based on this, making the safety monitoring report template in the above step 1 of the embodiment of the present invention also includes visualization when inserting drawings or tables in the process of making the safety monitoring report template, specifically: See also Figure 2 , Figure 2 The illustration of the editing interface of the safety monitoring report template provided in the embodiment of the present invention allows you to view the characteristic value graph, characteristic value table or installation information table corresponding to the data obtained from the database according to the time range, project location, and instrument name selected when configuring the label; and view the process line graph corresponding to the data obtained from the database according to the time range, project location, instrument name, and measuring point name selected when configuring the label. It should be further pointed out that the editing interface of the safety monitoring report template in the embodiment of the present invention can also view the drawing or tabulation of the section corresponding to the section name according to the section name selected when configuring the label.
[0033] If you need to insert a drawing or tabulation in the safety monitoring report template, double-click the drawing or tabulation in the interface of the safety monitoring report template to insert the drawing or tabulation and the corresponding label of the drawing or tabulation into the safety monitoring report template at the same time; if you need to update the data or text of a paragraph in the safety monitoring report template, select the data area corresponding to the data or text, and select the engineering part, instrument name, section name and insertion type corresponding to the data area in the interface of the safety monitoring report template, and click Insert in the interface to define the label corresponding to the data or text; if the safety monitoring report template does not need to draw or tabulate according to the section, the section name selected when configuring the label is empty. Please continue to refer to Figure 3 In actual applications, if the safety monitoring report needs to draw a stress-free characteristic value diagram of the reinforced concrete panel of a certain project, select the project part as reinforced concrete panel and the instrument type as stress-free gauge on the left, click to draw the characteristic value diagram, view the corresponding image on the right, double-click the image to insert the image and label at the same time, and the label is defined as "Reinforced concrete panel stress-free characteristic value diagram"; and when the user (such as engineering designers) needs to insert a stress-free process line diagram of the reinforced concrete panel of a certain project, the monitoring instrument corresponding to the reinforced concrete panel of a certain project has multiple measuring points. Since the user does not know which measuring point should be inserted in advance, after selecting the project part and instrument type on the left, select the single-point process line and then draw it, you can view all the measuring point process line diagrams of the monitoring instrument corresponding to the reinforced concrete panel of a certain project, select the appropriate double-click to insert, and the above process reflects the importance of visualization when making a safety monitoring report template.
[0034] When the safety monitoring report template subsequently generates a safety monitoring report, different generation methods are selected according to the content of the label in the safety monitoring report template and the label in the safety monitoring report template is replaced.
[0035] It should be further explained that in the above step 1 of the embodiment of the present invention, there is no need to understand the label definition rules in the process of making the safety monitoring report template. The process of engineering designers editing the intelligent safety monitoring report for the first time is also the process of defining the safety monitoring report template.
[0036] Step two in the embodiment of the present invention generates a security monitoring report in an intelligent security monitoring report generation method based on the security monitoring report template of step one; specifically, first, determine the time range for updating the security monitoring report, and traverse the labels that have not been replaced in step one in the security monitoring report template; secondly, obtain data from a database based on the information corresponding to the time range and label configuration, and then, in the process of updating the variable part, determine whether to use a security monitoring text generation model that has been constructed and trained in advance based on the content of the label; then, based on the judgment result and the data obtained from the database, update the variable part of the security monitoring report corresponding to the replaced label; finally, generate a security monitoring report.
[0037] Among them, the above secondly, judging whether to use the security monitoring text generation model built and trained in advance when updating the variable part includes at least one of the following situations: Update the data types that need to be updated based on the time range; Update the data and fixed sentences in the text of the text description part that needs to be updated according to the time range; Based on the time range and the security monitoring text generation model that has been built and trained in advance, the text descriptions corresponding to the data in the types that need to be updated are updated.
[0038] See also Figure 3 , Figure 3 A flowchart of generating a safety monitoring report in actual application in step 2 provided in an embodiment of the present invention, Figure 3 In the process, determine whether the safety monitoring report template label is a text description. When the safety monitoring report template label is not a text description, replace the template label after generating the corresponding graph, table, value or statement based on the extracted data. When the safety monitoring report template label is a text description, perform data clearing, sequence construction, safety monitoring text generation model, and replace the template label after generating the text description. More specifically: Please continue reading Figure 3 In the above-mentioned step 2 of the embodiment of the present invention, the security monitoring report in the intelligent security monitoring report generation method based on the security monitoring report template of step 1 is generated, including: First, according to the needs of the safety monitoring report, select the time range for its update. If the characteristic graph of the safety monitoring report template in the safety monitoring report needs to include average value, amplitude and elevation information, then the engineering designer checks the basic settings column in the characteristic graph of the safety monitoring report; traverse the labels that have not been replaced in step 1 in the entire safety monitoring report template, and update the safety monitoring report in combination with the selection of label configuration by the engineering designer in the safety monitoring report template; Next, according to the engineering location, section name, instrument name contained in the configured tag and the update time range selected according to the requirements of the safety monitoring report, the monitoring data within the corresponding time range is extracted from the database; Next, the updated part in the variable part is classified according to the insertion type in the content of the replaced label. If the replaced label includes a single measuring point name, the updated part in the variable part is determined to be a single measuring point process line diagram; if the replaced label includes multiple measuring point names, the updated part in the variable part is determined to be a multi-measurement point combined process line diagram; if the replaced label includes a characteristic value diagram, a characteristic value table or an installation information table, the updated part in the variable part is determined to be an image or table that generates the corresponding characteristic value diagram, characteristic value table or installation information table; if the replaced label includes a maximum value, a minimum value, a latest time, a latest value, a maximum value of a variation or a minimum value of a variation, the updated part in the variable part is determined to be a corresponding text value; if the replaced label includes a monthly variation, the updated part in the variable part is determined to be a fixed statement generated corresponding to the replaced label; if the replaced label includes a text description, the updated part in the variable part is determined to be a description statement generated corresponding to the replaced label; If it is determined that the updated part in the variable part is a process line diagram, a characteristic value diagram, a characteristic value table, an installation information table, or various numerical values or fixed statements included in the label, then the monitoring data within the corresponding time range of the replaced label is extracted from the database to draw a picture, tabulate, generate values or fixed statements, and then insert them into the corresponding place of the label in the safety monitoring report to complete the replacement.
[0039] In the above-mentioned step 2 of the embodiment of the present invention, the security monitoring report in the intelligent security monitoring report generation method based on the security monitoring report template in step 1 is generated, and further includes: Next, if it is determined that the updated part in the variable part of the safety monitoring report template is a description statement, the monitoring data within the time range corresponding to the replaced label is first extracted from the database for data cleaning, and the random errors in the monitoring data within the time range corresponding to the replaced label are filtered out from the database, and the normal data in the monitoring data is retained; then, based on the cleaned normal data, a two-dimensional monitoring sequence is constructed to be input into the safety monitoring text generation model. , the constructed two-dimensional monitoring sequence It is a data sequence with time as the first dimension and monitoring items as the second dimension. When constructing the data sequence, the monitoring items in the corresponding second dimension are determined according to the monitoring data of each instrument. The monitoring data of each instrument is composed of the original data measured by each instrument and the result data calculated based on the original data. Divide into ,in is the number of monitoring items, To monitor the time series of the project; Based on a two-dimensional monitoring sequence with time as the first dimension and monitoring items as the second dimension The input is sent to the pre-built and trained security monitoring text generation model, and the encoder in the security monitoring text generation model extracts the two-dimensional monitoring sequence. The effective features of the monitoring data are used to obtain a feature vector, and the feature vector is input into the decoder in the safety monitoring text generation model. The classifier in the decoder first generates the classified text information corresponding to the monitoring data according to the feature vector. The text generator in the decoder generates the text description corresponding to the monitoring data according to the classified text information and the feature vector. Finally, the text description corresponding to the monitoring data generated by the text generator in the decoder is inserted into the place corresponding to the replaced label in the safety monitoring report to complete the replacement of the description sentence. Repeat the following steps until the security monitoring report traversal is completed, and finally a complete security monitoring report is generated by the replaced tags.
[0040] The next step in the above step 2 of the embodiment of the present invention is to determine whether to use the safety monitoring text generation model that has been constructed and trained in advance during the process of updating the variable part. Before determining whether to use the safety monitoring text generation model that has been constructed and trained in advance, it includes: constructing a safety monitoring data set for safety monitoring during the construction and operation management of water conservancy projects, constructing a safety monitoring text generation model based on the variable part in the updated intelligent safety monitoring report, and training the safety monitoring text generation model based on the safety monitoring data set.
[0041] The next step in the above-mentioned step 2 of the embodiment of the present invention is to update the text description corresponding to the updated monitoring data in the part type of the text description that needs to be updated in combination with the time range and the security monitoring text generation model constructed and trained in advance, including: when training the security monitoring text generation model based on the security monitoring data set or using the security monitoring text generation model in the process of updating the variable part, the updated monitoring data corresponding to the time range in the part type of the text description that needs to be updated is input into the security monitoring text generation model constructed and trained in advance, and the security monitoring text generation model outputs the text description corresponding to the updated monitoring data, and the text description is the text description inserted or replaced in the security monitoring report.
[0042] See also Figure 4 , Figure 4 The diagram of the construction process of the safety monitoring data set provided by the embodiment of the present invention is as follows. The construction of the safety monitoring data set for safety monitoring during the construction and operation management of the water conservancy project in the above step 2 includes: Obtain a large number of monitoring data samples. A large number of monitoring data samples are obtained based on safety monitoring during the construction and operation management of water conservancy projects. A large number of monitoring data samples are composed of monitoring data collected by various monitoring instruments in water conservancy projects for various safety monitoring. The monitoring data generated by various safety monitoring of various monitoring instruments are composed of the original data measured by each instrument and the result data calculated based on the original data; mark and classify the data sequences of a large number of monitoring data samples based on the observation method, and attach manually annotated text descriptions when marking and classifying the data sequences, and form a labeled monitoring sample data set with the marked classification and text description data sequences. For example: Suppose there is a set of two-dimensional monitoring sequences as data sequences , the average value is , the standard deviation is , which is calculated as follows:
[0043]
[0044] in, is the number of measurements, that is, the length of the two-dimensional monitoring sequence. Suppose a certain measurement value in the two-dimensional monitoring sequence , calculate its residual error , the calculation method is as follows:
[0045] Determine the residual error with 3 If the size Greater than 3 , then the measured value is judged as abnormal data and is removed, otherwise it is retained.
[0046] Monitoring data preprocessing, based on obtaining a large number of monitoring data samples from monitoring data collected by multiple monitoring instruments to eliminate gross errors, filter out random errors in the monitoring data after gross errors are eliminated, and retain normal data in the monitoring data; Text preprocessing, data cleaning is performed based on obtaining text descriptions with manual annotations from a large number of monitoring data samples; the data cleaning process includes: first correcting typos in the text descriptions with manual annotations; then unifying the text descriptions after the typos are corrected, and the unified expression includes: replacing and unifying the text descriptions of the same event in the text descriptions after the typos are corrected; finally, segmenting the text descriptions after the unified expression to form a dictionary. It should be pointed out that in the embodiment of the present invention, since the manually annotated text descriptions are manually input, errors are inevitably present. Therefore, only after the typos are corrected can unified expressions be performed based on the text descriptions, and the descriptions of the same event in the text descriptions are replaced and unified, such as "no obvious changes", "no obvious abnormalities", "no obvious development trends" and other descriptions are unified into "no obvious abnormalities", providing a good data basis for the subsequent prediction of the security monitoring text generation model, and ensuring that the security monitoring text generation model learning process is effective. In practical applications, the embodiment of the present invention preferably uses the jieba tool to segment the manually annotated text descriptions to form a dictionary. At the same time, in order to facilitate the security monitoring text generation model to better recognize the text, " <start>", add " at the end <end>", the sentence separator in the text description is marked with "#", and for words that do not appear in the above dictionaries, " <unk>” for identification.
[0047] Furthermore, in the process of generating a safety monitoring report, in addition to the need for quantitative description of the monitoring data, the embodiments of the present invention usually also need to conduct a qualitative analysis of the data within a certain time period, such as descriptive statements such as "large displacement variation" and "stable overall change". The safety monitoring report generation method in the prior art can only update and replace the data in fixed text, and when the overall amplitude of the monitoring value changes, it is impossible to perform intelligent analysis and give a text description. However, the embodiments of the present invention can not only realize the update of the monitoring data, images and tables in the paragraphs in the safety monitoring report, but also generate corresponding text descriptions according to the monitoring values in the monitoring data and update them in the safety monitoring report.
[0048] After the monitoring data preprocessing and text preprocessing are completed, the monitoring sample data set is divided into a monitoring sample training data set and a monitoring sample test data set. In practical applications, it is preferred that 70% of the monitoring sample data set is a monitoring sample training data set and 30% is a monitoring sample test data set.
[0049] The construction of the security monitoring text generation model based on the variable part in the intelligent security monitoring report in the above step 2 of the embodiment of the present invention includes: The safety monitoring text generation model based on the variable part of the updated intelligent safety monitoring report consists of two parts: an encoder and a decoder. The structure of the encoder of the safety monitoring text generation model is based on a convolutional neural network. During training and use, the encoder extracts the effective features of the data collected during the construction and operation management of water conservancy projects, and encodes the effective features to obtain feature coding information. The structure of the decoder of the safety monitoring text generation model is divided into two parts: a classifier and a text generator. The classifier obtains a classification result based on the collected data based on the feature coding information obtained by the encoder. The text generator decodes the feature coding information and the classification result to generate text information corresponding to the collected data. The text generator completes the mapping of collected data to text description.
[0050] In practical applications, the encoder of the above-mentioned security monitoring text generation model of the embodiment of the present invention is composed of sequentially connected convolution layer 1, convolution layer 2, normalization layer, and activation layer, wherein the convolution kernel size of convolution layer 1 is 4*4, the step size is 2, the convolution kernel size of convolution layer 2 is 3*3, the step size is 1, and the activation layer is set to ReLU function. The decoder of the above-mentioned security monitoring text generation model of the embodiment of the present invention is composed of a classifier and a text generator, wherein the classifier includes a maximum pooling layer, a ReLu activation layer, and a fully connected layer, and the text generator includes a double-layer LSTM structure, and the hidden dimension is set to 128. In order to avoid overfitting problems, a dropout layer is added.
[0051] In the above step 2 of the embodiment of the present invention, the security monitoring text generation model is trained based on the security monitoring data set, including: Initialize the security monitoring text generation model. Specifically, when initializing the security monitoring text generation model, the weight parameter of the security monitoring text generation model is , the number of iterations is , the maximum number of iterations is , 500, p. The weight parameter of the online handwritten signature authentication network model for this iteration is: , and order 1.
[0052] The monitoring data of the monitoring sample training data set in the monitoring sample data set is input into the encoder of the safety monitoring text generation model. For each monitoring sample M corresponding to the monitoring data in the monitoring sample training data set, it is first input into the encoder of the safety monitoring text generation model to obtain feature encoding information ,
[0053] The decoder classifier in the security monitoring text generation model encodes the feature information obtained by the encoder Classify and obtain feature encoding information The corresponding probability vector , the probability vector The classified text information S is obtained by matching the classification label of the matching classifier; then the classified text information S is converted into a vector representation as a classified text vector based on the word embedding method. , categorical text vector Combined with the feature encoding information obtained by the encoder in the security monitoring text generation model Get classification results , the classification results The text generator part of the decoder is input to generate the final sentence corresponding to the monitoring data. The final sentence generation process is described as follows:
[0054]
[0055] in, Represents the output of LSTM at time t-1, and uses the cross entropy loss function to calculate the loss value based on its prediction results; The parameters of the safety monitoring text generation model are updated using the gradient descent method, and the iterative training is repeated until the preset number of iterations of the safety monitoring text generation model is reached; The monitoring sample test data set is used as the input of the pre-trained safety monitoring text generation model for forward propagation, and the trained safety monitoring text generation model is input for prediction to obtain the prediction result. Based on the prediction result, the safety monitoring text generation model is trained again or the training is terminated to obtain the safety monitoring text generation model to be used.
[0056] Based on the above disclosed method for generating an editable intelligent safety monitoring report, please refer to Figure 5 , Figure 5 The present invention provides a principle block diagram of an editable intelligent safety monitoring report generation system. The present invention also discloses an editable intelligent safety monitoring report generation system, including a template making unit and a report generating unit.
[0057] Among them: the template making unit is used to make a safety monitoring report template. When making the template, the template making unit divides the safety monitoring report template into a fixed part and a variable part according to the safety monitoring report update status in the intelligent safety monitoring report generation method. The fixed part is the safety monitoring report content that does not need to be changed when the safety monitoring report is updated, and the variable part is the safety monitoring report content that needs to be changed when the safety monitoring report is updated. The variable part is divided into multiple types, and the multiple types include at least a data part type that needs to be updated and a text description part type that needs to be updated. The data part type that needs to be updated includes updating the characteristic value diagram, characteristic value table or installation information table, and process line diagram in the safety monitoring report. The text description part type that needs to be updated includes updating the data in the text of the safety monitoring report, fixed sentences, and text descriptions corresponding to the data; the variable part is updated only after the label configuration.
[0058] The report generation unit generates a safety monitoring report in the intelligent safety monitoring report generation method based on the safety monitoring report template produced by the template production unit; the report generation unit determines the time range for updating the safety monitoring report, and traverses the labels in the safety monitoring report template that have not been replaced in step one; the report generation unit obtains data from the database according to the information corresponding to the time range and the label configuration; in the process of updating the variable part, the report generation unit determines whether to use the safety monitoring text generation model that has been built and trained in advance according to the content of the label; the report generation unit updates the variable part in the safety monitoring report corresponding to the replaced label according to the judgment result and the data obtained from the database; the report generation unit finally generates the safety monitoring report.
[0059] The series of detailed descriptions listed above are only specific descriptions of feasible implementation methods of the present invention. They are not intended to limit the scope of protection of the present invention. Any equivalent implementation methods or changes that do not deviate from the technical spirit of the present invention should be included in the scope of protection of the present invention.
[0060] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
[0061] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.< / unk> < / end> < / start>
Claims
1. An editable intelligent safety monitoring report generation method, characterized in that: include: Step 1: Create a safety monitoring report template; Among them, when making, the safety monitoring report template is divided into a fixed part and a variable part according to the update status of the safety monitoring report in the intelligent safety monitoring report generation method. The fixed part is the safety monitoring report content that does not need to be changed when the safety monitoring report is updated, and the variable part is the safety monitoring report content that needs to be changed when the safety monitoring report is updated. The variable part is divided into multiple types, and the multiple types at least include a data part type that needs to be updated and a text description part type that needs to be updated. The data part type that needs to be updated includes updating the characteristic value diagram, characteristic value table or installation information table, and process line diagram in the safety monitoring report. The text description part type that needs to be updated includes updating the data in the text of the safety monitoring report, fixed sentences, and text descriptions corresponding to the data; the variable part is updated only after the label configuration; Step 2: Generate a safety monitoring report in an intelligent safety monitoring report generation method based on the safety monitoring report template of step 1; Specifically, first, determine the time range for updating the safety monitoring report, and traverse the labels in the safety monitoring report template that have not been replaced in step 1; secondly, obtain data from the database according to the time range and the information corresponding to the label configuration; next, in the process of updating the variable part, determine whether to use the safety monitoring text generation model that has been built and trained in advance according to the content of the label, and then update the variable part in the safety monitoring report corresponding to the replaced label according to the determination result combined with the data obtained from the database; finally, generate a safety monitoring report; Among them, secondly, determining whether to use the security monitoring text generation model that has been built and trained in advance when updating the variable part includes at least one of the following situations: Update the data type that needs to be updated in combination with the time range; In combination with the time range, the data in the text and the fixed sentences in the text description part type that needs to be updated are updated; In combination with the time range and the security monitoring text generation model constructed and trained in advance, the text description corresponding to the data in the type of text description part that needs to be updated is updated.
2. The method for generating an editable intelligent safety monitoring report according to claim 1, characterized in that: The safety monitoring report template is prepared in step 1, specifically: When making the safety monitoring report template, the safety monitoring report template is divided into a fixed part and a variable part according to the update status of the safety monitoring report in the intelligent safety monitoring report generation method, wherein the fixed part is the content of the safety monitoring report that has been edited in advance and does not need to be changed, and the variable part includes text, images and tables; the text of the variable part in the safety monitoring report template is divided into two categories, one is to update the text description corresponding to the safety monitoring report according to the changes in the monitoring data, and the other is to update the data in the text in the safety monitoring report; In the step 1, the data types that need to be updated include updating the characteristic value graph, characteristic value table or installation information table, and process line graph in the safety monitoring report, specifically: If the updated part is a characteristic value graph, a characteristic value table or an installation information table in the safety monitoring report, the unconfigured tag is configured according to the project site, section name, instrument name and insertion type selected during the construction and operation management of the water conservancy project, wherein the insertion type includes a characteristic value graph, a characteristic value table or an installation information table; If the updated part is a process line diagram in the safety monitoring report, first determine whether the process line diagram corresponds to a single-point process line, a full-point process line or a partial-point process line; if it is determined to be a single-point process line, the unconfigured label is configured according to the project site, instrument type, measuring point name and the single-point process line selected during the construction and operation management of the water conservancy project; if it is determined to be a full-point process line, the unconfigured label is configured according to the project site, instrument type and the full-point process line selected during the construction and operation management of the water conservancy project; if it is determined to be a partial-point process line, the unconfigured label is configured in sequence according to the measuring point names selected during the construction and operation management of the water conservancy project; when updating the image and the table in the safety monitoring report, first determine the process line type in the process line diagram corresponding to the updated part according to the definition of the label configuration, and then draw the process line diagram according to the process line type; If the updated part is the text in the safety monitoring report, the update status of the corresponding text is divided into multiple types, among which the first type includes: if the data in the text needs to be updated, the definition of the unconfigured label corresponding to the data is configured according to the project site, section name, instrument name and insertion type selected during the construction and operation management of the water conservancy project; the insertion type includes maximum value, minimum value, latest time, latest value, maximum amplitude and minimum amplitude; the second type includes: if the fixed sentence in the text needs to be updated, if the fixed sentence is a sentence pre-set in the safety monitoring report and the overall structure of the sentence remains unchanged, then the sentence contains the water conservancy project. One or more of the maximum value, minimum value, latest time, latest value, maximum amplitude and minimum amplitude updated monthly during the construction and operation management; if the fixed statement is monthly amplitude, the definition of the label corresponding to the monthly amplitude is "project location + instrument type + monthly amplitude"; the third type includes: if the text description corresponding to the monitoring data needs to be updated, the definition of the label in the paragraph corresponding to the text description is configured according to the project location, instrument name and insertion type selected during the construction and operation management of the water conservancy project; when the insertion type of the text is text description, the safety monitoring text generation model constructed and trained in advance is used to update the text description in the safety monitoring report.
3. The editable intelligent safety monitoring report generation method according to claim 2 is characterized in that: The step 1 of making a safety monitoring report template also includes inserting a drawing or visualization when making a table in the process of making the safety monitoring report template, specifically: View the characteristic value graph, characteristic value table or installation information table corresponding to the data obtained from the database according to the time range, project location, and instrument name selected when configuring the label; view the process line graph corresponding to the data obtained from the database according to the time range, project location, instrument name, and measuring point name selected when configuring the label; view the drawing or tabulation of the section corresponding to the section name according to the section name selected when configuring the label; If you need to insert a drawing or tabulation into the safety monitoring report template, double-click the drawing or tabulation in the interface of the safety monitoring report template to insert the drawing or tabulation and the corresponding label of the drawing or tabulation into the safety monitoring report template at the same time; If you need to update the data or text of a paragraph in the safety monitoring report template, select the data area corresponding to the data or text, and select the engineering part, instrument name, section name and insertion type corresponding to the data area in the interface of the safety monitoring report template. Click Insert on the interface to define the label corresponding to the data or text; if the safety monitoring report template does not need to be drawn or tabulated by section, the section name selected when configuring the label is empty; When the safety monitoring report template subsequently generates a safety monitoring report, a different generation method is selected according to the content of the label in the safety monitoring report template and the label in the safety monitoring report template is replaced.
4. An editable intelligent safety monitoring report generation method according to claim 2 or 3, characterized in that: In the step 1, there is no need to understand the definition rules of the labels during the process of making the safety monitoring report template. The process of engineering designers editing the intelligent safety monitoring report for the first time is also the process of defining the safety monitoring report template.
5. The editable intelligent safety monitoring report generation method according to claim 1 is characterized in that: The step 2, generating a safety monitoring report in an intelligent safety monitoring report generation method based on the safety monitoring report template in the step 1, comprises: First, according to the needs of the safety monitoring report, the time range for its update is selected. If the characteristic graph corresponding to the safety monitoring report template in the safety monitoring report needs to include average value, amplitude and elevation information, then the engineering designer checks the basic settings column in the characteristic graph in the safety monitoring report; traverses the labels that have not been replaced in the step 1 in the entire safety monitoring report template, and updates the safety monitoring report in combination with the selection of the label configuration by the engineering designer in the safety monitoring report template; Next, according to the engineering location, section name, instrument name contained in the configured tag and the time range for updating according to the requirements of the safety monitoring report, the monitoring data corresponding to the time range is extracted from the database; Next, the updated part in the variable part is classified according to the insertion type in the content of the replaced label. If the replaced label includes a single measuring point name, the updated part in the variable part is determined to be a single measuring point process line diagram; if the replaced label includes multiple measuring point names, the updated part in the variable part is determined to be a multi-measurement point combined process line diagram; if the replaced label includes a characteristic value diagram, a characteristic value table or an installation information table, the updated part in the variable part is determined to be an image or table that generates a corresponding characteristic value diagram, characteristic value table or installation information table; if the replaced label includes a maximum value, a minimum value, a latest time, a latest value, a maximum value of a variation range or a minimum value of a variation range, the updated part in the variable part is determined to be a single measuring point process line diagram; if the replaced label includes a characteristic value diagram, a characteristic value table or an installation information table, the updated part in the variable part is determined to be an image or table that generates a corresponding characteristic value diagram, a characteristic value table or an installation information table; The updated part in the variable part is to generate a corresponding text value; if the replaced label includes the monthly fluctuation range, the updated part in the variable part is determined to be a fixed statement generated corresponding to the replaced label; if the replaced label includes a text description, the updated part in the variable part is determined to be a description statement generated corresponding to the replaced label; if the updated part in the variable part is determined to be a process line diagram, a characteristic value diagram, a characteristic value table, an installation information table, or various numerical values or fixed statements included in the label, then based on the monitoring data within the time range corresponding to the replaced label extracted from the database, drawing, tabulating, generating values or fixed statements are inserted into the corresponding place of the label in the safety monitoring report to complete the replacement.
6. The editable intelligent safety monitoring report generation method according to claim 5 is characterized in that: The step 2, generating a safety monitoring report in the intelligent safety monitoring report generation method based on the safety monitoring report template in the step 1, further includes: Next, if it is determined that the updated part in the variable part of the safety monitoring report template is a description statement, firstly, data cleaning is performed based on the monitoring data corresponding to the time range extracted from the database with the replaced label, random errors in the monitoring data corresponding to the time range extracted from the database with the replaced label are filtered, and normal data in the monitoring data are retained; then, based on the cleaned normal data, a two-dimensional monitoring sequence is constructed to be input into the safety monitoring text generation model. , the two-dimensional monitoring sequence constructed It is a data sequence with time as the first dimension and monitoring items as the second dimension, wherein when constructing the data sequence, the monitoring items corresponding to the second dimension are determined according to the monitoring data of each instrument, and the monitoring data according to each instrument is composed of the original data measured by each instrument and the result data calculated based on the original data; based on the monitoring items, the two-dimensional monitoring sequence is Divide into ,in is the number of monitoring items, To monitor the time series of the project; Based on the two-dimensional monitoring sequence with time as the first dimension and monitoring items as the second dimension The input is input into the safety monitoring text generation model constructed and trained in advance, and the encoder in the safety monitoring text generation model extracts the two-dimensional monitoring sequence based on the two-dimensional monitoring sequence. The effective features of the monitoring data are used to obtain a feature vector, and the feature vector is input into the decoder in the security monitoring text generation model. The classifier in the decoder first generates classified text information corresponding to the monitoring data according to the feature vector, and the text generator in the decoder generates a text description corresponding to the monitoring data according to the classified text information and the feature vector. Finally, the text description corresponding to the monitoring data generated by the text generator in the decoder is inserted into the place corresponding to the replaced label in the security monitoring report to complete the replacement of the description sentence; Repeat the following steps until the traversal of the safety monitoring report is completed, and finally generate a complete safety monitoring report by replacing the tag.
7. The editable intelligent safety monitoring report generation method according to claim 1 is characterized in that: The second step in step 2 is to determine whether to use the safety monitoring text generation model that has been built and trained in advance during the process of updating the variable part, wherein before determining whether to use the safety monitoring text generation model that has been built and trained in advance, it includes: constructing a safety monitoring data set for safety monitoring during the construction and operation management of water conservancy projects, constructing a safety monitoring text generation model based on the variable part in the updated intelligent safety monitoring report, and training the safety monitoring text generation model based on the safety monitoring data set; The next step in the step 2 is to update the text description corresponding to the updated monitoring data in the text description part type that needs to be updated in combination with the time range and the safety monitoring text generation model that has been built and trained in advance, including: when training the safety monitoring text generation model based on the safety monitoring data set or using the safety monitoring text generation model in the process of updating the variable part, the updated monitoring data corresponding to the time range in the text description part type that needs to be updated is input into the safety monitoring text generation model that has been built and trained in advance, and the safety monitoring text generation model outputs the text description corresponding to the updated monitoring data, and the text description is the text description inserted or replaced in the safety monitoring report.
8. The editable intelligent safety monitoring report generation method according to claim 7 is characterized in that: The step 2 of constructing a safety monitoring data set for safety monitoring during the construction and operation management of a water conservancy project includes: A large number of monitoring data samples are obtained based on safety monitoring during the construction and operation management of water conservancy projects. The large number of monitoring data samples are composed of monitoring data of various safety monitoring collected by various monitoring instruments in water conservancy projects. The monitoring data generated by various safety monitoring of the multiple monitoring instruments are composed of original data measured by each instrument and result data calculated based on the original data; based on the observation method, the data sequence of the large number of monitoring data samples is marked and classified, and a manually annotated text description is attached when marking and classifying the data sequence, and the data sequence of the marked classification and the text description is formed into a labeled monitoring sample data set; Preprocessing the monitoring data, eliminating gross errors based on the monitoring data collected by the multiple monitoring instruments in the large number of monitoring data samples, filtering the random errors in the monitoring data after the gross errors are eliminated, and retaining normal data in the monitoring data; Text preprocessing, data cleaning based on the text descriptions with manual annotations in the large amount of monitoring data samples obtained; the data cleaning process includes: first correcting typos in the text descriptions with manual annotations; then unifying the text descriptions after the typos are corrected, and the unified expression includes: replacing and unifying the text descriptions of the same event in the text descriptions after the typos are corrected; and finally segmenting the text descriptions after the unified expression to form a dictionary; Dividing the monitoring sample data set after the monitoring data preprocessing and the text preprocessing are completed, and dividing the monitoring sample data set into a monitoring sample training data set and a monitoring sample test data set; The construction in step 2 is based on updating the safety monitoring text generation model of the variable part in the intelligent safety monitoring report, including: A safety monitoring text generation model based on updating the variable part in the intelligent safety monitoring report is constructed, which consists of two parts: an encoder and a decoder. The structure of the encoder of the safety monitoring text generation model is constructed based on a convolutional neural network. During training and use, the encoder extracts effective features of data collected during the construction and operation management of water conservancy projects, and performs feature encoding on the effective features to obtain feature encoding information. The structure of the decoder of the safety monitoring text generation model is divided into two parts: a classifier and a text generator. The classifier obtains a classification result based on the collected data based on the feature encoding information obtained by the encoder, and the text generator decodes the feature encoding information and the classification result to generate text information corresponding to the collected data. The text generator completes the mapping of the collected data to the text description.
9. The editable intelligent safety monitoring report generation method according to claim 8, characterized in that: The step 2 of training the security monitoring text generation model based on the security monitoring data set includes: Initializing the security monitoring text generation model; The monitoring data of the monitoring sample training data set in the monitoring sample data set is input into the encoder of the security monitoring text generation model. For each monitoring sample M corresponding to the monitoring data in the monitoring sample training data set, it is first input into the encoder of the security monitoring text generation model to obtain feature coding information , The classifier of the decoder in the security monitoring text generation model is based on the feature encoding information obtained by the encoder Classify and obtain the feature coding information The corresponding probability vector , the probability vector The classified text information S is obtained by matching the classification label of the classifier; then the classified text information S is converted into a vector representation as a classified text vector based on the word embedding method. , the classified text vector Combined with the feature encoding information obtained by the encoder in the security monitoring text generation model Get classification results , the classification results The text generator part input to the decoder generates the sentence corresponding to the monitoring data. The final sentence generation process is described as follows: in, Represents the output of LSTM at time t-1, and uses the cross entropy loss function to calculate the loss value based on its prediction results; The parameters of the security monitoring text generation model are updated by using a gradient descent method, and the iterative training is repeated until a preset number of iterations of the security monitoring text generation model is reached; The monitoring sample test data set is used as the input of the pre-trained security monitoring text generation model for forward propagation, and the trained security monitoring text generation model is input for prediction to obtain a prediction result. Based on the prediction result, the security monitoring text generation model is trained again or the training is terminated to obtain the security monitoring text generation model to be used.
10. An editable intelligent safety monitoring report generation system, characterized in that: include: A template making unit, the template making unit is used to make a safety monitoring report template. When making the template, the template making unit divides the safety monitoring report template into a fixed part and a variable part according to the safety monitoring report update situation in the intelligent safety monitoring report generation method. The fixed part is the safety monitoring report content that does not need to be changed when the safety monitoring report is updated. The variable part is the safety monitoring report content that needs to be changed when the safety monitoring report is updated. The variable part is divided into multiple types, and the multiple types at least include a data part type that needs to be updated and a text description part type that needs to be updated. The data part type that needs to be updated includes updating a characteristic value diagram, a characteristic value table or an installation information table, and a process line diagram in the safety monitoring report. The text description part type that needs to be updated includes updating data in the text of the safety monitoring report, fixed sentences, and text descriptions corresponding to the data; the variable part is updated only after being configured by a tag; A report generation unit, wherein the report generation unit generates a safety monitoring report in an intelligent safety monitoring report generation method based on the safety monitoring report template generated by the template making unit; the report generation unit determines a time range for updating the safety monitoring report, and traverses the labels in the safety monitoring report template that have not been replaced in step one; the report generation unit obtains data from a database according to the information corresponding to the time range and the label configuration; during the process of updating the variable part, the report generation unit determines whether to use a safety monitoring text generation model that has been constructed and trained in advance according to the content of the label; the report generation unit updates the variable part in the safety monitoring report corresponding to the replaced label according to the judgment result and the data obtained from the database; the report generation unit finally generates a safety monitoring report.
