Method, system and electronic device for automatically writing rail transit data verification report

Through the automated rail transit data verification report writing method, human-computer interaction interface and Python library are used for data analysis and integration calculation, which solves the problems of high cost and low efficiency caused by manual writing, achieves efficient and accurate report generation, and improves Improve work efficiency and project cycle.

CN113590006BActive Publication Date: 2024-10-01CASCO SIGNAL LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110850343.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-27
Publication Date
2024-10-01
Estimated Expiration
2041-07-27

AI Technical Summary

Technical Problem

In the existing technology, the writing of rail transit data verification reports relies on manual labor, which results in high cost, low efficiency and unreliable quality. It cannot meet the pressure of rapid updates and intensive manual resources required by the project.

Method used

A method for automatic writing of rail transit data verification reports is designed. By creating a human-computer interaction interface, loading relevant input files, performing data noise reduction preprocessing and business logic integration calculations, and combining data verification report templates and rule documents, automatic calibration is achieved. Writing verification and reports, using Python libraries such as tkinter, win32com and difflib for data analysis and text similarity calculation to generate automated reports.

Benefits of technology

It realizes the automatic writing of data verification reports, significantly reduces writing time and manual error rate, improves work efficiency, completely replaces manual retrieval, assists semantic analysis, and shortens the project cycle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113590006B_ABST
    Figure CN113590006B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, system and electronic device for automatically writing a rail transit data verification report, comprising: creating a human-computer interaction interface according to specific project requirements, loading an input file related to system safety data; parsing the input file, and performing noise reduction preprocessing on the original data of the input file; performing business logic integration calculation on the data after the noise reduction preprocessing; and outputting a data verification report according to the business logic integration calculation result. The present invention realizes the automatic writing of the data verification report, greatly reduces the report writing time, and greatly reduces the manual error rate; realizes the calculation of text language similarity, realizes complete replacement of manual data retrieval, assists manual semantic analysis, improves work efficiency and shortens project cycle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of train data security, and in particular to a method, system and electronic equipment for automatically writing a rail transit data verification report. Background Art

[0002] With the continuous development of urbanization and the increasing requirements for low-carbon energy conservation and emission reduction, public transportation has become the first choice for people to travel. Urban rail transit has become one of the main transportation carriers for large-capacity public transportation in cities with its technical advantages of large capacity, fast speed, safety, reliability, punctuality, comfort and relative environmental protection.

[0003] The data security of urban rail transit systems plays a vital role in today's urban rail transit systems. Train data security verification is currently mainly carried out through manual retrieval, review, and manual report writing. Although manual verification can complete the work to a certain extent, it requires more and more manual input with the continuous increase in projects, and with the continuous updating of project document standards, the intensive labor costs brought about are increasingly stretched by project human resources. The use of manual report writing not only has cost issues, but also has an insurmountable bottleneck in the quality of manual writing. Therefore, in the security assurance work of rail transit projects, how to use tools to realize the automatic writing, updating and optimization of reports is an issue that needs to be solved urgently. Summary of the invention

[0004] The purpose of the present invention is to provide a method, system and electronic device for automatically writing a rail transit data verification report, aiming to solve the problems in the prior art of manually writing a rail transit data verification report, such as high labor costs, inability to ensure writing quality and low work efficiency.

[0005] To achieve the above object, the present invention is implemented through the following technical solutions:

[0006] The present invention provides a method for automatically writing a rail transit data verification report, comprising:

[0007] Create a human-computer interaction interface based on specific project requirements and load input files related to system safety data;

[0008] Parsing the input file and performing noise reduction preprocessing on the original data of the input file;

[0009] Performing business logic integration calculation on the data after the noise reduction preprocessing;

[0010] According to the business logic integrated calculation results, a data verification report is output, and the data format of the output data verification report is modified to obtain the completed data verification report.

[0011] Preferably, the input files include: specific project data documents, data verification report template documents, project data template documents and data rule documents.

[0012] Preferably, the human-computer interaction interface is created using the tkinter standard library of Python.

[0013] Preferably, a text bar is provided behind the input file button in the human-computer interaction interface to determine whether the path information of the input file is displayed in the text bar. If so, the input file is loaded successfully and proceeds to the subsequent steps. If not, the input file loading fails and the input file loading work is performed again.

[0014] Preferably, the parsing of the input file includes: using Python's win32com third-party library to process documents of different formats in the input file to obtain documents in a unified format; using Python's standard library and Python's third-party library to parse the unified format document into data according to business needs.

[0015] Preferably, the business logic integration calculation includes: designing a review algorithm for the data based on the parsed data to automatically verify the data;

[0016] According to the parsed existing text data in the data rule document and the data verification report template document, a text similarity calculation algorithm is designed to review the changed content in the data rule document;

[0017] According to the result of the automatic verification work, the result of the audit work and the parsed project data template document, the project data template document is automatically filled and the data verification report is automatically written.

[0018] The present invention also provides a rail transit data verification report automatic writing system, which is used to implement the rail transit data verification report automatic writing method as described above, comprising:

[0019] The file management layer is used to create a human-computer interaction interface and load the input file;

[0020] A data parsing layer, connected to the file management layer, for parsing the loaded input file;

[0021] A logic operation layer, connected to the data analysis layer, and used to calculate the data output by the data analysis layer;

[0022] The file output layer is connected to the logic operation layer and is used for outputting the data verification report.

[0023] Preferably, the file output layer is also used to output logs, which include all calculation details, error reports and time records in the system.

[0024] Preferably, it also includes a "START" button, which is used to activate the system with one click. After the input file in the file management layer is loaded, the "START" button is an inoperable button. After the system completes all calculations, the "START" button is an operable button.

[0025] Preferably, the log column of the human-computer interaction interface displays the information of the "START" button and the calculation progress of the system.

[0026] The present invention also provides an electronic device, including a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the method for automatically writing a rail transit data verification report described above is implemented.

[0027] The present invention also provides a readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method for automatically writing a rail transit data verification report described above is implemented.

[0028] Compared with the prior art, the present invention has the following beneficial effects:

[0029] 1. The automatic writing method of data verification report designed by the present invention realizes the automatic writing of data verification report, greatly reduces the report writing time, and greatly reduces the manual error rate;

[0030] 2. The data audit and text similarity calculation designed by the present invention realizes the calculation of text language similarity, completely replaces manual data retrieval, assists manual semantic analysis, improves work efficiency and shortens project cycle. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for the description. Obviously, the drawings described below are an embodiment of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work:

[0032] Figure 1 A schematic diagram of the structure of a system for automatically writing a rail transit data verification report provided by an embodiment of the present invention;

[0033] Figure 2 A flowchart of a method for automatically writing a rail transit data verification report provided by an embodiment of the present invention;

[0034] Figure 3 A diagram of the human-computer interaction interface of a method for automatically writing a rail transit data verification report provided in one embodiment of the present invention. DETAILED DESCRIPTION

[0035] The following is combined with Figure 1-3 The method, system and electronic device for automatically writing rail transit data verification reports proposed in the present invention are further described in detail with specific implementation methods. According to the following description, the advantages and features of the present invention will be clearer. It should be noted that the drawings are in a very simplified form and use non-precise proportions, which are only used to conveniently and clearly assist in explaining the purpose of the implementation methods of the present invention. In order to make the purposes, features and advantages of the present invention more obvious and easy to understand, please refer to the drawings. It should be noted that the structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the limiting conditions for the implementation of the present invention, so they have no technical substantive significance. Any structural modification, change in proportional relationship or adjustment of size, without affecting the effects that can be produced by the present invention and the purposes that can be achieved, should still fall within the scope of the technical content disclosed by the present invention.

[0036] In view of the shortcomings of the existing manually written rail transit data verification report, in order to realize the automatic writing of the rail transit data verification report, this embodiment provides a method for automatically writing the rail transit data verification report, including:

[0037] Step S1: Create a human-computer interaction interface according to specific project requirements and load input files related to system safety data;

[0038] Step S101: The input files include: a specific project data document (Excel format), a data verification report template document (Excel format), a project data template document (Excel format) and a data rule document (Word format).

[0039] Step S102: A text bar is provided behind the input file button in the human-computer interaction interface, and it is determined whether the path information of the input file is displayed in the text bar. If so, the input file is loaded successfully and the subsequent steps are entered. If not, the input file loading fails and the input file loading work is repeated.

[0040] Step S2: parsing the input file and performing noise reduction preprocessing on the original data of the input file.

[0041] Step S201: According to the specific project data document, project data template document and data verification report template document loaded in step S2101, use the os, openpyxl, win32com and time function libraries supported by Python to convert the Excel document format, process all Excel files into .xlsx format, and start marking the processing time.

[0042] Step S202: According to the data rule document loaded in step S101, the word document is parsed into plain text data in .txt format using function libraries such as win32com and re supported by Python and saved locally, thereby removing various formats and special characters in the document and not having to write the text into memory, thereby improving the reading and writing speed.

[0043] Step S3: performing business logic integration calculation on the data after the noise reduction preprocessing for data output;

[0044] Step 301: extract the formulas in the specific project data document and the project data template document (Excel), perform a character string comparison between the two, record the changed formula content and write it into a report.

[0045] Step S302: Design an Excel document content screening algorithm based on business logic, filter out content that is not related to report writing, write the remaining content into the report, and revise the format of the report content, including but not limited to document formats such as fonts, comments, and colors.

[0046] Step S303: Based on the existing data rule text in the verification report template parsed in S201 and the latest data rule text obtained in step S202, the text language similarity of the two is calculated. In this process, Python's third-party library difflib is used to automatically fill in the verification report with the obtained text similarity results and text language difference information according to business needs.

[0047] Among them, steps S301, S302, and S303 use multi-threaded concurrent operations, which saves a lot of running time and ensures the independence between tasks, greatly simplifying user operations. Figure 3 The user interface is shown.

[0048] Step S4: Integrate the calculation results according to the business logic, output a data verification report, and complete the writing of the data verification report by modifying the data format of the data verification report.

[0049] like Figure 1As shown, this embodiment also provides a rail transit data verification report automatic writing system, which is used to implement the rail transit data verification report automatic writing method as described above, including:

[0050] The file management layer is used to create a human-computer interaction interface and load the input file;

[0051] A data parsing layer, connected to the file management layer, for parsing the loaded input file;

[0052] A logic operation layer, connected to the data analysis layer, and used to calculate the data output by the data analysis layer;

[0053] The file output layer is connected to the logic operation layer and is used for outputting the data verification report.

[0054] The file output layer also outputs logs, which include all calculation details, error reports and time records in the system.

[0055] It can be understood that the file management layer can be a file management module; the data analysis layer can be a data analysis module, the logic operation layer can be a logic operation module, and the file output layer can be a file output module; but the present invention is not limited thereto.

[0056] The system also includes a "START" button, which is used to activate the system with one click. After the input file in the file management layer is loaded, the "START" button becomes an inoperable button. After the system completes all calculations, the "START" button becomes an operable button.

[0057] The log bar of the human-computer interaction interface displays the information of the "START" button and the calculation progress of the system, the loading and parsing of files, the logical operation process and error information, all of which are displayed in the log bar, which is convenient for real-time viewing, concise and light, and saves memory.

[0058] This embodiment also provides an electronic device, including a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the method for automatically writing a rail transit data verification report described above is implemented.

[0059] This embodiment also provides a readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method for automatically writing a rail transit data verification report described above is implemented.

[0060] To sum up, the automatic writing method of data verification report designed in this embodiment realizes the automatic writing of data verification report, greatly reduces the report writing time, and greatly reduces the human error rate; the data review and text similarity calculation designed in this embodiment realizes the calculation of text language similarity, completely replaces manual data retrieval, assists manual semantic analysis, improves work efficiency and shortens project cycle.

[0061] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0062] It should be noted that the devices and methods disclosed in the embodiments of this article can also be implemented in other ways. The device implementation described above is only schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of this article. In this regard, each box in the flowchart or block diagram can represent a part of a module, program or code, and the module, program segment or part of the code contains one or more executable instructions for implementing the specified logical function, and the module, program segment or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented by a dedicated hardware-based system for performing a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0063] In addition, the functional modules in the various embodiments of this document may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0064] Although the content of the present invention has been described in detail through the above preferred embodiments, it should be appreciated that the above description should not be considered as a limitation of the present invention. After reading the above content, it will be apparent to those skilled in the art that various modifications and substitutions of the present invention will occur. Therefore, the protection scope of the present invention should be limited by the appended claims.

Claims

1. A method for automatically writing a rail transit data verification report, characterized in that: include: According to the specific project requirements, create a human-computer interaction interface and load input files related to system safety data, including: specific project data documents, data verification report template documents, project data template documents and data rule documents; Parsing the input file and performing noise reduction preprocessing on the original data of the input file; Performing business logic integration calculation on the data after the noise reduction preprocessing; Integrate the calculation results according to the business logic, output a data verification report, modify the data format of the output data verification report, and obtain the completed data verification report. The human-computer interaction interface is created using the Python standard library. The parsing of the input file includes: using a third-party Python library to process documents of different formats in the input file to obtain documents of a unified format; Use the Python standard library and the Python third-party library to parse the unified format document into data according to business needs. The business logic integration calculation includes: designing a data audit algorithm based on the parsed data to automatically verify the data; According to the parsed existing text data in the data rule document and the data verification report template document, a text similarity calculation algorithm is designed to review the changed content in the data rule document; According to the result of the automatic verification work, the result of the audit work and the parsed project data template document, the project data template document is automatically filled and the data verification report is automatically written.

2. The method for automatically writing a rail transit data verification report according to claim 1, characterized in that: A text bar is provided behind the input file button in the human-computer interaction interface to determine whether the path information of the input file is displayed in the text bar. If so, the input file is loaded successfully and proceeds to the subsequent steps. If not, the input file fails to load and the input file is loaded again.

3. A rail transit data verification report automatic writing system, used to implement the rail transit data verification report automatic writing method according to any one of claims 1 to 2, characterized in that: Include: The file management layer is used to create a human-computer interaction interface and load the input file; A data parsing layer, connected to the file management layer, for parsing the loaded input file; A logic operation layer, connected to the data analysis layer, and used to calculate the data output by the data analysis layer; The file output layer is connected to the logic operation layer and is used for outputting the data verification report.

4. The rail transit data verification report automatic writing system according to claim 3, characterized in that: The file output layer is also used to output logs, which include all calculation details, error reports and time records in the system.

5. The rail transit data verification report automatic writing system according to claim 3, characterized in that: It also includes a "START" button, which is used to activate the system with one click. After the input file in the file management layer is loaded, the "START" button becomes an inoperable button. After the system completes all calculations, the "START" button becomes an operable button.

6. The rail transit data verification report automatic writing system according to claim 5, characterized in that: The log column of the human-computer interaction interface displays the information of the "START" button and the calculation progress of the system.

7. An electronic device, characterized in that: The method comprises a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the method according to any one of claims 1 to 2 is implemented.

8. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 2 is implemented.