Log analysis method and device based on virtual train formation

By classifying and storing the log files of virtual trains and conducting multi-dimensional analysis, the shortcomings of log data processing of virtual flexible trains are solved, and efficient data management and accurate operation and maintenance decision support are achieved.

CN117922645BActive Publication Date: 2025-09-16TRAFFIC CONTROL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311787458.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-22
Publication Date
2025-09-16
Estimated Expiration
2043-12-22

AI Technical Summary

Technical Problem

The existing technology lacks effective storage and display solutions and cannot effectively process the train log data of virtual flexible trains, resulting in data processing being in the preliminary data collection stage and lacking relevant analysis and management methods.

Method used

A log analysis method based on virtual train formation is provided. By obtaining the log files of the train control equipment, the log files are classified and stored according to the file batch number and log source type. The preset urban rail data multi-dimensional analysis model is used for analysis to parse the target key fields, realize hierarchical storage and multi-dimensional analysis, and finally present the analysis results in a graphical manner.

Benefits of technology

It realizes the effective management and storage of virtual marshaling train log data, improves analysis efficiency, provides more comprehensive and accurate data analysis results, helps users make operation and maintenance decisions, and improves the accuracy and efficiency of train operation and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117922645B_ABST
    Figure CN117922645B_ABST
Patent Text Reader

Abstract

The invention provides a log analysis method and device based on a virtual train formation, comprising: obtaining a train driving log file of at least one train control device; writing the log file corresponding to each train control device into a corresponding log folder according to the file batch number and the log source type, and parsing the target key fields from the log folder; importing the target key fields corresponding to each train control device into a server for hierarchical storage processing, and using a preset urban rail data multi-dimensional analysis model to analyze the target key fields corresponding to each train control device to obtain a multi-dimensional analysis result of the urban rail data, filtering out the target analysis result corresponding to the user indicator analysis request from the multi-dimensional analysis result of the urban rail data, and sending it to the user in a graphical manner. In this way, the present invention realizes the comprehensiveness and intuitive visualization of log analysis based on the virtual train formation, thereby providing data support for train operation and maintenance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a log analysis method and device based on virtual train formation. Background Art

[0002] With the continuous development of urban rail transit construction, the demand for urban rail smart applications is increasing, which brings challenges to the collection, mining, analysis and storage capabilities of urban rail big data.

[0003] In particular, virtual flexible marshaling trains are independent of mechanical connections and rely on technologies such as wireless communication and automatic control to couple multiple (including two) trains together to operate as a single entity and share the same transportation mission. For ease of distinction, the "trains" that constitute a virtual flexible marshaling and have the ability to operate independently are referred to as train units. The train unit located at the front, based on the train's direction of travel, is referred to as the leading train unit, or simply the leading train, while the other train units are referred to as following train units, or simply following trains.

[0004] During the operation of virtual flexible trains, a large amount of train log data is generated, and the leading train log data and the following train log data are generated separately. The train log data is divided into data from station signal equipment, on-board signal equipment, trackside signal equipment, gateway equipment, etc.; the current urban rail field's processing of virtual flexible train log data is in the preliminary data collection stage, and there is a lack of relevant storage and display solutions. Summary of the Invention

[0005] The present invention provides a log analysis method and device based on virtual train formation, which are used to solve the defects in the prior art.

[0006] The present invention provides a log analysis method based on a virtual marshaling train, which is applied to a virtual marshaling train system. The virtual marshaling train system includes at least one group of virtual marshaling trains, each of which includes a leading train and a following train. The method includes:

[0007] Obtaining a train driving log file of at least one train control device received under each log source type, wherein the train driving log file includes driving log data of a leading train and a following train in each virtual formation, and the log source type includes manual upload during the day or scheduled upload at night;

[0008] The log files corresponding to each train control device are written into corresponding log folders according to file batch numbers and log source types, and target key fields are parsed from the log folders according to log information parsing rules corresponding to the train control device to which the train driving log files belong, wherein the log information parsing rules for the leading train driving log data and the following train driving log data are different for different types of train control devices;

[0009] Importing the target key fields corresponding to each train control device into the server for hierarchical storage processing, and using a preset urban rail data multi-dimensional analysis model to analyze the target key fields corresponding to each train control device to obtain a multi-dimensional analysis result of the urban rail data;

[0010] Upon receiving an indicator analysis request from a user, a target analysis result corresponding to the user's indicator analysis request is filtered out from the multi-dimensional analysis results of the urban rail data, and the target analysis result is sent to the user in a graphical manner, so that the user can perform operation and maintenance control of the leading train and the following train in the virtual train formation according to the target analysis result.

[0011] According to a log analysis method based on a virtual train formation provided by the present invention, the log files corresponding to each train control device are written into corresponding log folders according to file batch numbers and log source types, including:

[0012] If the log source type of the log file is manual upload during the day and there is a first history file with the same name as the log file, deleting the first log folder corresponding to the first history file;

[0013] A second log folder is created according to the file batch number of the log file, and the log file is written into the second log folder.

[0014] According to a log analysis method based on a virtual train formation provided by the present invention, the log files corresponding to each train control device are written into corresponding log folders according to file batch numbers and log source types, including:

[0015] When the log source type of the log file is scheduled upload at night and there is a second history file with the same name as the log file, the log file is written into a third log folder corresponding to the second history file.

[0016] According to a log analysis method based on a virtual train formation provided by the present invention, the step of parsing target key fields from the log folder includes:

[0017] Parsing candidate key fields from the log folder according to the preset regular expressions of key fields of the leading train driving log and the preset regular expressions of key fields of the following train driving log corresponding to each train control device;

[0018] The candidate key fields are screened based on preset field rules to obtain target key fields.

[0019] According to a log analysis method based on a virtual train formation provided by the present invention, the candidate key fields are parsed from the log folder according to the preset key field regular expressions corresponding to each train control device, and the method also includes:

[0020] Initialize static resources, where the static resources include at least one of train electronic map information, log data dictionary, and log configuration information.

[0021] According to a log analysis method based on a virtual train formation provided by the present invention, the preset urban rail data multi-dimensional analysis model includes at least one of a structured data analysis model, a formation performance analysis model, a safety performance analysis model, and an indicator data analysis model.

[0022] The present invention also provides a log analysis device based on a virtual marshaling train, which is applied to a virtual marshaling train system. The virtual marshaling train system includes at least one group of virtual marshaling trains, each of which includes a leading train and a following train. The device includes:

[0023] a log data acquisition module, configured to acquire a train driving log file of at least one train control device received under each log source type, wherein the train driving log file includes driving log data of a leading train and a following train in each virtual formation, and the log source type includes manual upload during the day or scheduled upload at night;

[0024] a log data parsing module, configured to write the log files corresponding to each train control device into a corresponding log folder according to the file batch number and log source type, and parse target key fields from the log folder according to the log information parsing rules corresponding to the train control device to which the train driving log files belong, wherein the log information parsing rules for the leading train driving log data and the following train driving log data are different for different types of train control devices;

[0025] A log analysis module is used to import the target key fields corresponding to each train control device into the server for hierarchical storage processing, and use a preset urban rail data multi-dimensional analysis model to analyze the target key fields corresponding to each train control device to obtain the urban rail data multi-dimensional analysis results;

[0026] The display module is used to, upon receiving an indicator analysis request sent by a user, filter out a target analysis result corresponding to the user's indicator analysis request from the multi-dimensional analysis results of the urban rail data, and send the target analysis result to the user in a graphical manner, so that the user can perform operation and maintenance control of the leading train and the following train in the virtual train formation according to the target analysis result.

[0027] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the log analysis method based on virtual train formation as described above is implemented.

[0028] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program implements any of the above-described log analysis methods based on virtual train formation.

[0029] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-described log analysis methods based on virtual train formation.

[0030] The log analysis method and device based on virtual marshaling trains provided by the present invention are applied to a virtual marshaling train system, wherein the virtual marshaling train system includes at least one group of virtual marshaling trains, and the virtual marshaling trains include a leading train and a following train. Specifically, a train driving log file of at least one train control device received under each log source type is obtained, and the train driving log file includes the driving log data of the leading train and the driving log data of the following train in each virtual marshaling. The log source type includes manual uploading during the day or scheduled uploading at night. The log file corresponding to each train control device is written into the corresponding log folder according to the file batch number and the log source type, so as to facilitate subsequent parsing and analysis operations. The target key fields are parsed from the log folder according to the log information parsing rules corresponding to the train control device to which the train driving log file belongs, and the required key fields can be extracted according to the log information parsing rules of the leading train driving log data and the following train driving log data of different types of train control devices. The key information of the leading train and the following train that need to be paid attention to can reduce the interference of redundant data and improve the analysis efficiency; finally, the target key fields corresponding to each train control device are imported into the server for hierarchical storage processing, so that the data can be effectively managed and stored, and the preset urban rail data multi-dimensional analysis model is used to analyze the target key fields corresponding to each train control device to obtain the multi-dimensional analysis results of the urban rail data, realizing multi-dimensional analysis and mining of the data, providing more comprehensive and accurate data analysis results, and when receiving the indicator analysis request sent by the user, the target analysis results corresponding to the user's indicator analysis request are filtered out from the multi-dimensional analysis results of the urban rail data, and the target analysis results are sent to the user in a graphical manner, so that the user can perform operation and maintenance control of the leading train and the following train in the virtual train according to the target analysis results. The data analysis results can be presented intuitively, helping users to better understand and utilize the analysis results, and improve the accuracy and efficiency of the train operation and maintenance decisions of the virtual train. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0032] Figure 1 A flow chart of a log analysis method based on a virtual train formation provided by the present invention;

[0033] Figure 2 A schematic structural diagram of a log analysis device based on a virtual train set provided by the present invention;

[0034] Figure 3 An index curve analysis diagram of two virtual marshaling trains provided by the present invention;

[0035] Figure 4 This is a schematic structural diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0036] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0037] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.

[0038] Figure 1 The flow chart of the log analysis method based on virtual train formation provided by the present invention is as follows: Figure 1 As shown, the present invention provides a log analysis method based on a virtual marshaling train, which is applied to a virtual marshaling train system. The virtual marshaling train system includes at least one group of virtual marshaling trains, and the virtual marshaling trains include a leading train and a following train, including:

[0039] Step 101: Acquire a train log file of at least one train control device received under each log source type, wherein the train log file includes the log data of the leading train and the following trains in each virtual formation, and the log source type includes manual upload during the day or scheduled upload at night;

[0040] In this embodiment, a large amount of multi-vehicle signal data will be generated during the operation of urban traffic. From the source, it can be divided into data generated by various types of train control equipment such as station signal equipment, on-board signal equipment, trackside signal equipment, gateway equipment, etc. These data will be cached in the log system in the form of logs. In actual application, the log acquisition service can be set according to needs, and these data can be downloaded from the log system at regular intervals.

[0041] The log acquisition service in this embodiment adopts the MVC three-tier architecture, namely the view layer View, which receives the request code submitted by the user and is used to interact with the user. For example, the user can configure the log acquisition rules through the view layer, such as a daily or weekly full scan of all train driving log data cached by the log system in the current data cache cycle; the business logic layer Service, which is used to process the business logic of the system and is responsible for coordinating the operation data between various modules, and the access layer DAO, which directly operates the database code and is responsible for reading and writing data.

[0042] Specifically, the log type and log source types are divided into "manually uploaded logs" and "nightly scheduled incremental logs". "Manually uploaded logs" refer to the log data of train control equipment that can be manually uploaded by operation and maintenance personnel or developers. "Nightly scheduled incremental logs" refer to the system automatically exporting incremental log data from the train control equipment at preset time intervals (such as every 2 hours) through automation.

[0043] In this embodiment, based on the log acquisition rules configured by the user in the view layer, the train driving log data generated by each train control device can be scanned comprehensively and regularly, the scanned train driving log data can be downloaded, and according to the source of the train driving log data (that is, which type of train control device the data belongs to), each type of train driving log data can be classified into multiple train driving log files according to time batches, and the corresponding log source attributes can be identified to facilitate subsequent log analysis based on virtual train formation.

[0044] Step 102: Write the log files corresponding to each train control device into corresponding log folders according to file batch numbers and log source types, and parse the target key fields from the log folders;

[0045] Because log source types are divided into "manually uploaded logs" and "nightly scheduled incremental logs," and the leading train's and following train's log data within the same train formation are stored in two different files, in this scenario, the corresponding log files for each train control device are written to the corresponding log folders based on file batch number and log source type. The required important information is then parsed from these log folders.

[0046] For example, a train control device generates a large number of log files every day, including "manually uploaded logs" and "nightly scheduled incremental logs." In this scenario, these log files need to be categorized by file batch number and log source type, stored in corresponding log folders, and the target key fields need to be parsed from these log files.

[0047] For "manually uploaded logs", the operation and maintenance personnel or developers will manually upload log files. These log files can be classified and stored in corresponding folders according to the file batch number and log source type. For example, the "manually uploaded logs" files uploaded in the first hour of December 8, 2021 are stored in the folder " / upload_logs / 20211208 / hour_01 / manually uploaded logs / ".

[0048] For "nightly scheduled incremental logs", the system will automatically export incremental log data from the train control equipment at a preset time interval (such as every 2 hours). Similarly, these log files can be classified and stored in corresponding folders according to the file batch number and log source type. For example, the "nightly scheduled incremental logs" files automatically exported in the first hour of December 8, 2021 are stored in the folder " / auto_logs / 20211208 / hour_01 / nightly scheduled incremental logs / ".

[0049] In addition, it should be noted that since the leading train and the following trains in the same formation start at the same time and perform the same operation tasks, for the convenience of management and recording, usually the file batch numbers of the leading train and the following trains in the same formation are the same.

[0050] Finally, the target key fields are parsed from these log files according to the log information parsing rules of the leading train operation log data and the following train operation log data of each type of train control equipment. These target key fields may be abnormal alarm information, performance index data, or operation records, etc. Specifically, corresponding tools and methods, such as regular expressions, log analysis tools for virtual formation trains, etc., can be used to extract the required target key fields from these log files for operation and maintenance or development processing and analysis.

[0051] Step 103, import the target key fields corresponding to each train control equipment into the server for hierarchical storage processing, and use a preset multi-dimensional analysis model for urban rail data to analyze the target key fields corresponding to each train control equipment to obtain a multi-dimensional analysis result of urban rail data.

[0052] Specifically, the hierarchical storage processing solution in this embodiment is implemented on three data layers: the source data layer (ODS), the data details layer (DWD), and the data application layer (ADS).

[0053] Among them, the ODS layer is the layer closest to the data in the data source. The data in the data source is extracted, cleaned, and transmitted and loaded into this layer. The data in this layer is the original data of the target key fields corresponding to various train control equipment;

[0054] The DWD layer and the ADS layer are key processes in the log analysis of the entire virtual marshaling train. The present invention loads the parsed original target key fields into the ODS layer, and then lands them in the DWD layer after data cleaning. The DWD layer is configured with a preset multi-dimensional analysis model for urban rail data. Various business indicators are calculated through the preset multi-dimensional analysis model for urban rail data, and finally the calculation results are landed in the ADS layer.

[0055] Specifically, the pre-designed multi-dimensional urban rail transit data analysis model refers to a pre-designed model for analyzing urban rail transit data, including but not limited to a structured data analysis model, a marshaling performance analysis model, a safety performance analysis model, and an indicator data analysis model. This model incorporates various indicators, dimensions, and metrics to describe and analyze the characteristics, correlations, and trends of urban rail transit data.

[0056] For example, the structured data analysis model is used to convert the log data of various train control devices into structured data, including but not limited to analyzing urban rail data by different dimensions such as time, location, line, vehicle, and equipment. Each dimension can contain multiple levels, for example, time can include levels such as year, month, day, and hour.

[0057] The marshaling performance analysis model evaluates and verifies various key indicators of the virtual marshaling train during operation, including but not limited to verifying whether the virtual marshaling train meets the operating curve requirements on a global scale, evaluating the consistency between the actual operating curve of the train under the tracking control algorithm and the expected reference curve, examining the safe tracking distance maintained by the train between different stations under the tracking control algorithm, evaluating the accuracy of the train during the stopping process under the tracking control algorithm, analyzing the time difference when the virtual marshaling train departs from different platforms, evaluating the difference between the time when the train enters the station and stops under the tracking control algorithm and the expected time, ensuring that unnecessary emergency braking does not occur during the operation of the train under the tracking control algorithm, evaluating the stability and reliability of the tracking control algorithm under different conditions, evaluating the operating time of the virtual marshaling train between different sections, analyzing the maximum difference between the actual operating speed of the virtual marshaling train and the set speed of the train's electronic braking system (EBI), evaluating whether the following trains in the virtual marshaling train can maintain an appropriate following distance according to the preset electronic braking system (EBI) after the leading train in the virtual marshaling train enters the station and stops, and determining the minimum spacing that the virtual marshaling train needs to maintain during the stopping phase.

[0058] The safety performance analysis model is used to evaluate and verify the safety performance of virtual marshaling trains during operation, including but not limited to calculating relevant indicators of train emergency braking (including braking distance, braking acceleration, etc.), statistical analysis of train emergency braking in high gear (higher speed), statistical analysis of train emergency braking in low gear (lower speed), statistical analysis of train emergency braking in default gear, verification of the train's maximum traction acceleration and common braking rate, statistics and evaluation of the delay performance of the train communication system, verification of the train's maximum impact rate in the traction phase, determination of the minimum spacing that the virtual marshaling train needs to maintain during the parking phase, etc.

[0059] The indicator data analysis model analyzes various user-defined indicators, such as stopping accuracy, travel time, travel speed, departure time difference, stop time difference, and the stopping distance between the lead and following trains in a virtual train formation. By analyzing these indicators, the efficiency, safety, stability, and accuracy of the virtual train formation can be evaluated.

[0060] In this embodiment, a pre-set multi-dimensional analysis model for urban rail data is used to analyze the target key fields corresponding to each train control device. This results in multi-dimensional analysis of urban rail data, which may include the operating status, fault statistics, performance indicators, and more of the virtual train formation. These analysis results can help operations personnel and decision makers understand the operating status of virtual train formations, optimize resource allocation, and improve efficiency and safety.

[0061] Step 104: Upon receiving the indicator analysis request sent by the user, a target analysis result corresponding to the user's indicator analysis request is filtered out from the multi-dimensional analysis results of the urban rail data, and the target analysis result is sent to the user in a graphical form, so that the user can perform operation and maintenance control of the leading train and the following train in the virtual train formation according to the target analysis result.

[0062] Among them, the indicator analysis request is an indicator analysis request for the leading train and the following train of a certain train formation. After receiving the indicator analysis request sent by the user, the system will first filter out the target analysis results corresponding to the user's indicator analysis request from the multi-dimensional analysis results of the urban rail data.

[0063] Finally, to better demonstrate the target analysis results of the virtual train formation, graphical presentations can be used. This can include generating charts, statistical graphs, and real-time monitoring dashboards. Graphical presentations make data more intuitive and easier to understand, helping users quickly access key information.

[0064] like Figure 3The figure shows the analysis results of the SBI and EBI speeds of a virtual train in a new curve analysis format. The SBI speed refers to the train's starting braking command speed, i.e., the speed at which the train begins braking; while the EBI speed refers to the train's emergency braking command speed, i.e., the speed at which the train applies an emergency brake. In a virtual train, there is a fixed distance between the lead and following cars, known as the train marshaling distance. When the lead car receives the braking command, it begins to decelerate and transmits the braking command backward until the last following car also receives the braking command and begins to decelerate. Therefore, the settings of the SBI and EBI speeds have a significant impact on the braking performance of the entire train. If the SBI and EBI speeds are set improperly, the distance between the lead and following cars may be too large or too small during braking, affecting the braking performance and safety performance of the entire train. The log analysis method based on virtual marshalling trains provided by the present invention obtains a train driving log file of at least one train control device received under each log source type, wherein the train driving log file includes the driving log data of the leading train and the driving log data of the following train in each virtual marshalling, and the log source type includes manual uploading during the day or scheduled uploading at night, and the log file corresponding to each train control device is written into the corresponding log folder according to the file batch number and the log type and log source type, so as to facilitate subsequent parsing and analysis operations, and parse the target key fields from the log folder according to the log information parsing rules corresponding to the train control device to which the train driving log file belongs, and extract the key information of the leading train and the following train that need to be paid attention to according to the log information parsing rules of the leading train driving log data and the following train driving log data of each different type of train control device, thereby reducing the interference of redundant data and improving the analysis efficiency; Then, the target key fields corresponding to each train control device are imported into the server for hierarchical storage processing, so that the data can be effectively managed and stored. The preset urban rail data multi-dimensional analysis model is used to analyze the target key fields corresponding to each train control device to obtain the multi-dimensional analysis results of the urban rail data, realizing multi-dimensional analysis and mining of the data, providing more comprehensive and accurate data analysis results, and when receiving the indicator analysis request sent by the user, the target analysis results corresponding to the user indicator analysis request are screened out from the multi-dimensional analysis results of the urban rail data, and the target analysis results are sent to the user in a graphical manner, so that the user can perform operation and maintenance control of the leading train and the following train in the virtual train formation according to the target analysis results. The multi-dimensional analysis results of the urban rail data are displayed in a graphical manner, which can intuitively present the data analysis results, help users better understand and utilize the analysis results, and improve the accuracy and efficiency of the train operation and maintenance decisions of the virtual train formation.

[0065] In some embodiments, writing the log files corresponding to each train control device into corresponding log folders according to file batch numbers and log source types includes:

[0066] If the log source type of the log file is manual upload during the day and there is a first history file with the same name as the log file, deleting the first log folder corresponding to the first history file;

[0067] A second log folder is created according to the file batch number of the log file, and the log file is written into the second log folder.

[0068] Multiple log files with the same name may exist in the log system, differing in the time periods they correspond to. For example, operations personnel may upload multiple files to a particular train control device during a single log acquisition phase. This can occur due to duplicate file uploads or re-uploading due to missing or incorrect data. This can lead to a log file named "log.txt" corresponding to multiple versions of the log file, such as "log_A.txt" and "log_B.txt." Log file "log_A.txt" is the first upload at time A, and log file "log_B.txt" is the second upload at time B.

[0069] Therefore, in this embodiment, in order to avoid duplication and redundancy of data due to human factors, when it is identified that the log source type of the log file is manually uploaded during the day, the previously obtained log files are traversed to see whether there is a first historical file with the same name as the log file. If so, it indicates that the log file needs to be updated, and the first log folder corresponding to the first historical file is deleted, the old data is cleaned up in time, and a new second log folder is created based on the file batch number of the current log file, and the updated log file is written into the new second log folder for subsequent log analysis based on virtual train assembly.

[0070] In some embodiments, writing the log files corresponding to each train control device into corresponding log folders according to file batch numbers and log source types includes:

[0071] When the log source type of the log file is scheduled upload at night and there is a second history file with the same name as the log file, the log file is written into a third log folder corresponding to the second history file.

[0072] In this embodiment, logs uploaded at night are typically uploaded all at once at a fixed time. Therefore, when a log file's source type is identified as a nighttime scheduled upload, the system checks to see if a second historical file with the same name as the log file exists in previously acquired log files. If so, the third log folder corresponding to the previously created second historical file does not need to be deleted. Instead, the new log file is appended to the existing log file. This ensures that the data corresponding to each batch number of the nighttime scheduled upload is always the latest and complete data, while maintaining data continuity.

[0073] The log analysis method based on virtual train formation provided by the present invention adopts different log storage strategies for log files of different log source types, thereby avoiding the duplication and redundancy of log data manually uploaded during the day due to human factors, and ensuring the integrity of log data uploaded regularly at night.

[0074] In some embodiments, parsing the target key field from the log folder includes:

[0075] Parsing candidate key fields from the log folder according to the preset regular expressions of key fields of the leading train driving log and the preset regular expressions of key fields of the following train driving log corresponding to each train control device;

[0076] The candidate key fields are screened based on preset field rules to obtain target key fields.

[0077] In this embodiment, each type of log has its own specific format and content, so it is necessary to define a corresponding preset key field regular expression based on each type of log. Specifically, the preset key field regular expression refers to a set of regular expression patterns that are pre-defined for each train control device. These patterns are used to match the content in the log file to identify and extract key information related to the train control device. For example, assume that the preset key fields of the ATO (Automatic Train Operation) train control device include train speed, control mode, and target position, etc. Then, a regular expression pattern can be defined for each field, such as r'Speed:(\d+)' for matching the train speed field, r'Mode:(\w+)' for matching the control mode field, and r'Target:(\d+)' for matching the target position field.

[0078] It should be noted that in a virtual train formation, multiple trains automatically coordinate their operations through wireless communication technology, so the information that needs to be exchanged between the lead train and the following trains is different. The key information that the lead train needs to record mainly includes its current position, speed, braking status, and instructions to the following trains; while the key information that the following train needs to record mainly includes the distance between it and the preceding train, acceleration, signal strength, and feedback information to the lead train. Therefore, when extracting key data from the virtual train formation log, the regular expressions for the key fields of the lead train and the following train log need to be set separately to ensure that the key information required by the virtual train formation can be extracted.

[0079] By using these preset key field regular expression patterns, you can search and match the content that matches these patterns in the log folder and extract it as candidate key fields. In this way, you can obtain important information related to train control equipment from the log based on the preset key field regular expression.

[0080] The extracted candidate key fields are then aggregated and validated. Data that does not conform to the preset field rules is discarded. For example, the train location link_id is not in the range of 1-9, the train set number train_id is 0, the main control vehicle flag main_state is not 1, 2, or 3, and the array length extracted by the keyword is not in compliance with the rules.

[0081] The log analysis method based on virtual marshaling train provided by the present invention can parse candidate key fields related to train control equipment from the log folder by using regular expressions of preset key fields. Based on preset field rules, the parsed candidate key fields can be screened and processed to filter out irrelevant or invalid fields, thereby improving analysis efficiency and accuracy.

[0082] In some embodiments, the step of parsing candidate key fields from the log folder according to the preset key field regular expressions corresponding to each train control device further includes:

[0083] Initialize static resources, where the static resources include at least one of train electronic map information, log data dictionary, and log configuration information.

[0084] Specifically, static resources can be predefined data structures, parameters, or configuration information that are initialized and remain unchanged during the parsing process. These static resources play a fixed role throughout the parsing process and do not change with each data batch or log source type.

[0085] Among them, electronic map information may include location information such as stations, lines, and areas, which is used to parse and process data related to locations in the log.

[0086] The log data dictionary includes a coding comparison table and a parameter mapping table, which are used to map specific codes or identifiers in the log into easy-to-read text or other forms to facilitate subsequent processing and analysis.

[0087] Log configuration information includes configuration information such as the log file path, format, and parsing rules. During the data parsing process, configuration information is needed to guide the program on how to obtain, parse, and store log data to ensure that the entire parsing process proceeds as expected.

[0088] Taking electronic map information as an example, initialization usually means loading the electronic map information from the data source into the memory when the system starts up so that it can be used in the subsequent log parsing process.

[0089] The log analysis method based on virtual train formation provided by the present invention ensures the accuracy and efficiency of analysis by initializing static resources before parsing log data to support subsequent data parsing and processing processes.

[0090] The following describes a log analysis device based on a virtual marshaling train provided by the present invention. The log analysis device based on a virtual marshaling train described below and the log analysis method based on a virtual marshaling train described above can refer to each other.

[0091] Figure 3 This is a structural diagram of the log analysis device based on virtual train formation provided by the present invention, as shown in FIG. Figure 3 As shown, the present invention provides a log analysis device based on a virtual marshaling train, which is applied to a virtual marshaling train system. The virtual marshaling train system includes at least one group of virtual marshaling trains, and the virtual marshaling trains include a leading train and a following train, including:

[0092] The log data acquisition module 310 is configured to acquire a train driving log file of at least one train control device received under each log source type, wherein the train driving log file includes the driving log data of the leading train and the following trains in each virtual formation, and the log source type includes manual upload during the day or scheduled upload at night;

[0093] The log data parsing module 320 is configured to write the log files corresponding to each train control device into a corresponding log folder according to the file batch number and log source type, and parse the target key fields from the log folder according to the log information parsing rules corresponding to the train control device to which the train driving log files belong, wherein the log information parsing rules for the leading train driving log data and the following train driving log data are different for different types of train control devices;

[0094] The daily log analysis module 230 is used to import the target key fields corresponding to each train control device into the server for hierarchical storage processing, and use a preset urban rail data multi-dimensional analysis model to analyze the target key fields corresponding to each train control device to obtain the urban rail data multi-dimensional analysis results;

[0095] The display module 240 is used to, upon receiving an indicator analysis request sent by a user, filter out a target analysis result corresponding to the user's indicator analysis request from the multi-dimensional analysis results of the urban rail data, and send the target analysis result to the user in a graphical manner, so that the user can perform operation and maintenance control of the leading train and the following train in the virtual train formation according to the target analysis result.

[0096] The log analysis device based on virtual marshalling train provided by the present invention obtains the train driving log file of at least one train control device received under each log source type, the train driving log file includes the driving log data of the leading train and the following train in each virtual marshalling, the log source type includes manual uploading during the day or scheduled uploading at night, the log file corresponding to each train control device is written into the corresponding log folder according to the file batch number and the log source type, so as to facilitate subsequent parsing and analysis operations, and parses the target key field from the log folder according to the log information parsing rule corresponding to the train control device to which the train driving log file belongs, and can extract the key information of the leading train and the following train that need to be paid attention to according to the log information parsing rule of the leading train driving log data and the following train driving log data of each different type of train control device, thereby reducing the interference of redundant data. Improve analysis efficiency; finally, import the target key fields corresponding to each train control device into the server for hierarchical storage processing, so as to effectively manage and store the data, and use the preset urban rail data multi-dimensional analysis model to analyze the target key fields corresponding to each train control device to obtain the multi-dimensional analysis results of the urban rail data, realize multi-dimensional analysis and mining of data, provide more comprehensive and accurate data analysis results, and when receiving the indicator analysis request sent by the user, filter out the target analysis results corresponding to the user's indicator analysis request from the multi-dimensional analysis results of the urban rail data, and send the target analysis results to the user in a graphical manner, so that the user can perform operation and maintenance control of the leading train and the following train in the virtual train according to the target analysis results. The data analysis results can be presented intuitively, helping users to better understand and utilize the analysis results, and improve the accuracy and efficiency of the train operation and maintenance decisions of the virtual train.

[0097] In some embodiments, the log data parsing module is also used to delete the first log folder corresponding to the first historical file when the log source type of the log file is manual upload during the day and there is a first historical file with the same name as the log file; create a second log folder according to the file batch number of the log file, and write the log file into the second log folder.

[0098] In some embodiments, the log data parsing module is also used to write the log file into a third log folder corresponding to the second historical file when the log source type of the log file is nighttime scheduled upload and there is a second historical file with the same name as the log file.

[0099] In some embodiments, the log analysis module is also used to parse candidate key fields from the log folder according to the preset leading train driving log key field regular expression and the preset following train driving log key field regular expression corresponding to each train control device; and filter the candidate key fields based on the preset field rules to obtain the target key fields.

[0100] In some embodiments, the log analysis module is further used to initialize static resources, where the static resources include at least one of train electronic map information, log data dictionary, and log configuration information.

[0101] In some embodiments, the preset urban rail data multi-dimensional analysis model includes at least one of a structured data analysis model, a formation performance analysis model, a safety performance analysis model, and an indicator data analysis model.

[0102] The device provided by the present invention is used to execute the above-mentioned method embodiments. Please refer to the above-mentioned embodiments for the specific processes and detailed contents, which will not be repeated here.

[0103] Figure 4 A schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 4 As shown, the electronic device may include: a processor (Processor) 401, a communication interface (Communications Interface) 402, a memory (Memory) 403 and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 communicate with each other via the communication bus 404. The processor 401 may call the logic instructions in the memory 403 to execute the log analysis method based on the virtual train formation, which includes:

[0104] Obtaining a train driving log file of at least one train control device received under each log source type, wherein the train driving log file includes driving log data of a leading train and a following train in each virtual formation, and the log source type includes manual upload during the day or scheduled upload at night;

[0105] The log files corresponding to each train control device are written into corresponding log folders according to file batch numbers and log types and log source types, and target key fields are parsed from the log folders according to log information parsing rules corresponding to the train control device to which the train driving log files belong, wherein the log information parsing rules for the leading train driving log data and the following train driving log data are different for different types of train control devices;

[0106] Importing the target key fields corresponding to each train control device into the server for hierarchical storage processing, and using a preset urban rail data multi-dimensional analysis model to analyze the target key fields corresponding to each train control device to obtain the urban rail data multi-dimensional analysis results;

[0107] In addition, the logic instructions in the above-mentioned memory 403 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0108] On the other hand, the present invention further provides a computer program product, comprising a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program comprises program instructions. When the program instructions are executed by a computer, the computer is capable of performing the log analysis method based on virtual train formation provided by the above methods, the method comprising:

[0109] Obtaining a train driving log file of at least one train control device received under each log source type, wherein the train driving log file includes driving log data of a leading train and a following train in each virtual formation, and the log source type includes manual upload during the day or scheduled upload at night;

[0110] The log files corresponding to each train control device are written into corresponding log folders according to file batch numbers and log source types, and target key fields are parsed from the log folders according to log information parsing rules corresponding to the train control device to which the train driving log files belong, wherein the log information parsing rules for the leading train driving log data and the following train driving log data are different for different types of train control devices;

[0111] Importing the target key fields corresponding to each train control device into the server for hierarchical storage processing, and using a preset urban rail data multi-dimensional analysis model to analyze the target key fields corresponding to each train control device to obtain a multi-dimensional analysis result of the urban rail data;

[0112] The target analysis result corresponding to the user indicator analysis request is sent to the user in a graphical manner, so that the user can perform operation and maintenance control on the leading train and the following train in the virtual train formation according to the target analysis result.

[0113] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for analyzing logs based on a virtual train assembly provided in the above embodiments is implemented. The method includes:

[0114] Obtaining a train driving log file of at least one train control device received under each log source type, wherein the train driving log file includes driving log data of a leading train and a following train in each virtual formation, and the log source type includes manual upload during the day or scheduled upload at night;

[0115] The log files corresponding to each train control device are written into corresponding log folders according to file batch numbers and log source types, and target key fields are parsed from the log folders according to log information parsing rules corresponding to the train control device to which the train driving log files belong, wherein the log information parsing rules for the leading train driving log data and the following train driving log data are different for different types of train control devices;

[0116] Importing the target key fields corresponding to each train control device into the server for hierarchical storage processing, and using a preset urban rail data multi-dimensional analysis model to analyze the target key fields corresponding to each train control device to obtain a multi-dimensional analysis result of the urban rail data;

[0117] The target analysis result corresponding to the user indicator analysis request is sent to the user in a graphical manner, so that the user can perform operation and maintenance control on the leading train and the following train in the virtual train formation according to the target analysis result.

[0118] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0119] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.

[0120] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A log analysis method based on virtual train formation, characterized in that: Applied to a virtual marshaling train system, the virtual marshaling train system includes at least one set of virtual marshaling trains, the virtual marshaling trains including a leading train and a following train, the method comprising: Obtaining a train driving log file of at least one train control device received under each log source type, wherein the train driving log file includes driving log data of a leading train and a following train in each virtual formation, and the log source type includes manual upload during the day or scheduled upload at night; The log files corresponding to each train control device are written into corresponding log folders according to file batch numbers and log source types, and target key fields are parsed from the log folders according to log information parsing rules corresponding to the train control device to which the train driving log files belong, wherein the log information parsing rules for the leading train driving log data and the following train driving log data are different for different types of train control devices; Importing the target key fields corresponding to each train control device into the server for hierarchical storage processing, and using a preset urban rail data multi-dimensional analysis model to analyze the target key fields corresponding to each train control device to obtain a multi-dimensional analysis result of the urban rail data; Upon receiving an indicator analysis request from a user, a target analysis result corresponding to the user's indicator analysis request is filtered out from the multi-dimensional analysis results of the urban rail data, and the target analysis result is sent to the user in a graphical manner, so that the user can perform operation and maintenance control of the leading train and the following train in the virtual train formation according to the target analysis result.

2. The log analysis method based on virtual train formation according to claim 1 is characterized in that: The log files corresponding to each train control device are written into corresponding log folders according to file batch numbers and log source types, including: If the log source type of the log file is manual upload during the day and there is a first history file with the same name as the log file, deleting the first log folder corresponding to the first history file; A second log folder is created according to the file batch number of the log file, and the log file is written into the second log folder.

3. The log analysis method based on virtual train formation according to claim 1 is characterized in that: The log files corresponding to each train control device are written into corresponding log folders according to file batch numbers and log source types, including: When the log source type of the log file is scheduled upload at night and there is a second history file with the same name as the log file, the log file is written into a third log folder corresponding to the second history file.

4. The log analysis method based on virtual train formation according to claim 1, characterized in that: The step of parsing the target key field from the log folder includes: Parsing candidate key fields from the log folder according to the preset regular expressions of key fields of the leading train driving log and the preset regular expressions of key fields of the following train driving log corresponding to each train control device; The candidate key fields are screened based on preset field rules to obtain target key fields.

5. The log analysis method based on virtual train formation according to claim 4 is characterized in that: The candidate key fields are parsed from the log folder according to the preset key field regular expressions corresponding to each train control device, and the method also includes: Initialize static resources, where the static resources include at least one of train electronic map information, log data dictionary, and log configuration information.

6. The log analysis method based on virtual train formation according to claim 1, characterized in that: The preset urban rail data multi-dimensional analysis model includes at least one of a structured data analysis model, a marshaling performance analysis model, a safety performance analysis model, and an indicator data analysis model.

7. A log analysis device based on virtual train formation, characterized in that: Applied to a virtual marshaling train system, the virtual marshaling train system includes at least one group of virtual marshaling trains, the virtual marshaling trains including a leading train and a following train, the device includes: a log data acquisition module, configured to acquire a train driving log file of at least one train control device received under each log source type, wherein the train driving log file includes driving log data of a leading train and a following train in each virtual formation, and the log source type includes manual upload during the day or scheduled upload at night; a log data parsing module, configured to write the log files corresponding to each train control device into a corresponding log folder according to the file batch number and log source type, and parse target key fields from the log folder according to the log information parsing rules corresponding to the train control device to which the train driving log files belong, wherein the log information parsing rules for the leading train driving log data and the following train driving log data are different for different types of train control devices; A log analysis module is used to import the target key fields corresponding to each train control device into the server for hierarchical storage processing, and use a preset urban rail data multi-dimensional analysis model to analyze the target key fields corresponding to each train control device to obtain the urban rail data multi-dimensional analysis results; The display module is used to, upon receiving an indicator analysis request sent by a user, filter out a target analysis result corresponding to the user's indicator analysis request from the multi-dimensional analysis results of the urban rail data, and send the target analysis result to the user in a graphical manner, so that the user can perform operation and maintenance control of the leading train and the following train in the virtual train formation according to the target analysis result.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the log analysis method based on the virtual train formation according to any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the log analysis method based on a virtual train assembly as claimed in any one of claims 1 to 6 is implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the log analysis method based on a virtual train assembly as claimed in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Big data fusion analysis method applied to massive logs of automatic train control system

    CN107256219A

  • Log monitoring method and device, computer equipment and storage medium

    CN114398239A