Processor operation status monitoring and diagnosis method and device
Through the heterogeneous double self-check polynomial in-machine self-check method of the main processor and co-processor, the problem of reliability and safety monitoring of the main control processor in the rail transit train control system is solved, and the running status of the main processor is realized. Effective diagnosis improves system reliability and safety.
Patent Information
- Application Number
- CN202010559583.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-18
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2040-06-18
AI Technical Summary
In the rail transit train control system, the reliability and safety of the main control processor are difficult to effectively monitor and diagnose, which affects the safety and reliability of train data transmission.
It adopts the dual self-check polynomial in-machine self-test method with heterogeneous main processor and co-processor, performs double calculation and cyclic redundancy check by reading the self-test sequence generated by the co-processor, and compares the calculation results to determine the main processor Running status, if inconsistent, it will be judged as abnormal.
It improves the reliability and safety of the main processor, enhances the overall reliability and safety of the train network control system, and meets the safety requirements of EN50159-2010.
Smart Images

Figure CN113821396B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of rail transit technology, and in particular to a processor operation status monitoring and diagnosis method and device. Background Art
[0002] The train network control platform is the "brain" of the train. Its role is to ensure train data communication, data collection, safety control, on-board information services and other functions. It is an important system to ensure the safe operation of the train. With the diversified development of rail transit train control and service business, the train communication network has continuously improved the security requirements for the credibility and reliability of the control system.
[0003] The processor of the main control part is the core part of the control system, and ensuring its reliability and safety is of great significance. As the core part of the train control system, the main control processor ensures its reliable and safe operation, which also ensures the security and reliability of key data transmission in the train control network.
[0004] Therefore, the present invention provides a method and device for monitoring and diagnosing the operating status of a processor. Summary of the invention
[0005] To solve the above problems, the present invention provides a method for monitoring and diagnosing the operation status of a processor, wherein the main processor and the coprocessor are heterogeneous, and the method comprises the following steps:
[0006] Step 1: The main processor reads two self-test sequences generated by the coprocessor and performs a first calculation result of a built-in self-test calculation of a double self-test polynomial according to the two self-test sequences;
[0007] Step 2: Perform error detection and error correction data verification on the two self-check sequences generated by the coprocessor, and after the verification passes, perform built-in self-check calculation of the dual self-check polynomials by the main processor to obtain a second calculation result;
[0008] Step three: comparing the first calculation result and the second calculation result, if the first calculation result is inconsistent with the second calculation result for more than a preset number of times, determining that there is an abnormality in the operation of the main processor.
[0009] According to one embodiment of the present invention, the built-in self-check calculation of the dual self-check polynomial comprises the following steps:
[0010] Based on a first self-check algorithm, a first self-check sequence of the two self-check sequences is subjected to a self-check calculation to obtain a first data group;
[0011] Based on a second self-test algorithm, a second self-test sequence of the two self-test sequences is calculated in combination with the first data group to obtain a built-in self-test calculation result, wherein the built-in self-test calculation result includes the first calculation result and the second calculation result.
[0012] According to one embodiment of the present invention, the first self-checking algorithm comprises the following formula:
[0013]
[0014] Among them, X n,n=0-9 represents the first data group, Mod represents rounding calculation, D n1 Represents a self-test sequence array in the first self-test sequence.
[0015] According to one embodiment of the present invention, the second self-checking algorithm comprises the following formula:
[0016]
[0017] Among them, Y n,n=0-9 represents the built-in self-test calculation result, D n2 Represents a self-test sequence array in the second self-test sequence.
[0018] According to an embodiment of the present invention, the two self-test sequences both include a self-test cycle number, an inverse code of the self-test cycle number, a self-test sequence array, and a check value.
[0019] According to one embodiment of the present invention, the error detection and correction data verification comprises the following steps:
[0020] The self-check cycle number, the inverse code of the self-check cycle number and the self-check sequence array in the two self-check sequences generated by the coprocessor are checked by using a generator polynomial in a cyclic redundancy check method through a check value.
[0021] According to one embodiment of the present invention, the method comprises the following steps:
[0022] Storing data in the operation status monitoring and diagnosis process via a dual-port memory connected to the main processor and the coprocessor;
[0023] Four storage areas are divided in the dual-port memory, which are two self-test sequence storage areas generated by the coprocessor, a storage area for the built-in self-test calculation results calculated by the coprocessor and the main processor, a receiving and sending data area, and a reserved area.
[0024] According to one embodiment of the present invention, before step 1, the method further includes the following steps:
[0025] Initialize the synchronization state and operation state memory of the main processor and the coprocessor, and perform state synchronization on the main processor and the coprocessor.
[0026] According to an embodiment of the present invention, if the state synchronization of the main processor and the coprocessor is unsuccessful, an abnormal operation flag is given and the process ends.
[0027] According to another aspect of the present invention, there is also provided a processor operation status monitoring and diagnosis device, wherein the main processor and the coprocessor are heterogeneous, and the device comprises:
[0028] A calling module, which is used to read, through the main processor, two self-test sequences generated by the coprocessor and a first calculation result obtained by performing a built-in self-test calculation of a double self-test polynomial according to the two self-test sequences;
[0029] A calculation module, which is used to perform error detection and error correction data verification on the two self-check sequences generated by the coprocessor, and after the verification passes, perform a built-in self-check calculation of a dual self-check polynomial through the main processor to obtain a second calculation result;
[0030] A comparison module is used to compare the first calculation result and the second calculation result, and if the first calculation result is inconsistent with the second calculation result for more than a preset number of times, it is determined that there is an abnormality in the operation of the main processor.
[0031] The processor operation status monitoring and diagnosis method and device provided by the present invention adopt two heterogeneous processors. Compared with the main processor, the coprocessor has a lower cost, and few other functional requirements for the coprocessor are placed on it, so it is easier to monitor and diagnose the main processor without affecting the normal operation of the train. The present invention performs a built-in self-check and adopts a cyclic redundancy check method, which is simple and efficient. It is used in the monitoring and diagnosis of the main processor by the coprocessor of the train network control system, and can improve the reliability and safety of the main processor.
[0032] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0034] Figure 1 A flowchart of a method for monitoring and diagnosing a processor operating state according to an embodiment of the present invention is shown;
[0035] Figure 2 A flow chart of built-in self-check calculation of a dual self-check polynomial according to an embodiment of the present invention is shown;
[0036] Figure 3 Shows an architecture diagram of a processor operation status monitoring and diagnosis system according to an embodiment of the present invention;
[0037] Figure 4 A schematic diagram of storage area division of a dual-port memory according to an embodiment of the present invention is shown;
[0038] Figure 5 A flowchart of a method for monitoring and diagnosing a processor operating state according to another embodiment of the present invention is shown; and
[0039] Figure 6 A structural block diagram of a processor operation status monitoring and diagnosis device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0040] To make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings.
[0041] In the present invention, the main processor and the coprocessor are heterogeneous, such as Figure 3 As shown, the main processor and the coprocessor are connected at two ends of a dual-port memory (DPRAM), and data is exchanged between the main processor and the dual-port memory, and between the coprocessor and the dual-port memory through the local bus of the train.
[0042] In order to diagnose the operating status of the train main control unit processor in real time, two heterogeneous CPUs are designed in the hardware architecture. The built-in self-test method is used to generate a set of self-test polynomials. The two heterogeneous processors (different software) perform calculations separately and compare the final calculation results to realize the diagnosis and detection functions.
[0043] Figure 1 A flow chart of a method for monitoring and diagnosing a processor operating status according to an embodiment of the present invention is shown.
[0044] like Figure 1 In step S101, the main processor reads two self-test sequences generated by the coprocessor and performs a first calculation result of a built-in self-test calculation of a double self-test polynomial based on the two self-test sequences.
[0045] Specifically, the main processor reads from the dual-port memory two self-test sequences of the coprocessor and a first calculation result obtained by the coprocessor performing a built-in self-test calculation of a dual self-test polynomial according to the two self-test sequences.
[0046] like Figure 1 In step S102, error detection and error correction data verification are performed on the two self-check sequences generated by the coprocessor. After the verification passes, the main processor performs a built-in self-check calculation of the dual self-check polynomial to obtain a second calculation result.
[0047] Specifically, firstly, the two self-check sequences generated by the coprocessor read by the main processor need to be checked for error and correction to avoid data transmission errors that occur during data transmission and affect the subsequent monitoring and diagnosis results of the main processor. In one embodiment, error detection and correction are performed by cyclic redundancy check.
[0048] Furthermore, the two self-test sequences each include a self-test cycle number, an inverse code of the self-test cycle number, a self-test sequence array, and a check value.
[0049] In one embodiment, the error detection and correction data verification includes the following steps: the self-test cycle number, the inverse code of the self-test cycle number and the self-test sequence array in the two self-test sequences generated by the coprocessor are verified by using the generator polynomial in the cyclic redundancy check method through the check value.
[0050] Figure 2 A flow chart of built-in self-test calculation of a dual self-test polynomial according to an embodiment of the present invention is shown.
[0051] In the present application, in order to monitor and diagnose the operating status of the main processor, it is necessary to perform two identical built-in self-test calculations based on two self-test sequences, which are completed in the main processor and the coprocessor respectively. The coprocessor calculates to obtain the first calculation result, and the main processor calculates to obtain the second calculation result.
[0052] like Figure 2 Specifically, the built-in self-check calculation of the double self-check polynomial includes the following steps:
[0053] In step S201, based on a first self-check algorithm, a self-check calculation is performed on a first self-check sequence of two self-check sequences to obtain a first data group.
[0054] Specifically, the first self-check algorithm includes the following formula:
[0055]
[0056] Among them, X n,n=0-9 represents the first data group, Mod represents rounding calculation, D n1 Represents a self-test sequence array in the first self-test sequence.
[0057] In step S202, based on the second self-test algorithm, the second self-test sequence of the two self-test sequences is calculated in combination with the first data group to obtain a built-in self-test calculation result, wherein the built-in self-test calculation result includes the first calculation result and the second calculation result.
[0058] Specifically, the second self-check algorithm includes the following formula:
[0059]
[0060] Among them, Y n,n=0-9 Indicates the result of built-in self-test calculation, D n2 Represents a self-test sequence array in the second self-test sequence.
[0061] Specifically, the following Tables 1 and 2 respectively show the meaning of the data in the first self-test sequence and the second self-test sequence:
[0062] Table 1 Meaning of the data in the first self-test sequence
[0063]
[0064]
[0065] Table 2 Meaning of data in the second self-test sequence
[0066]
[0067] In Table 1 and Table 2, $ is the self-test sequence address offset. The self-test sequence consists of a self-test cycle number, the inverse of the self-test cycle number, a self-test sequence array (DATA0-DATA9), a check value (FCS check value), and a reserved byte.
[0068] When performing error detection and correction data verification, the verification range is the self-test cycle number, the inverse code of the self-test cycle number, and the self-test sequence array (DATA0-DATA9). The generating polynomial X is used. 16 +X 12 +X 5 +1, for verification.
[0069] like Figure 1 In step S103, the first calculation result and the second calculation result are compared. If the first calculation result is inconsistent with the second calculation result for more than a preset number of times, it is determined that there is an abnormality in the operation of the main processor.
[0070] Specifically, the main processor and the coprocessor are heterogeneous, and the same two self-test sequences are used to perform the same dual self-test polynomial in-machine self-test calculations to obtain the second calculation result and the first calculation result respectively. In theory, the first calculation result should be the same as the second calculation result. Therefore, in the present application, the main processor and the coprocessor perform multiple calculations, and compare the multiple first calculation results obtained with the multiple second calculation results. If the two are exactly the same in the multiple comparisons, it indicates that the main processor is not operating abnormally, and the abnormal flag is eliminated; if the inconsistency exceeds the preset number of times, it indicates that the main processor is operating abnormally and needs to be identified.
[0071] In one embodiment, before step S101, the synchronization state and operation state memory of the main processor and the coprocessor are initialized, and the state of the main processor and the coprocessor is synchronized. If the state synchronization of the main processor and the coprocessor is unsuccessful, an operation abnormality flag is given and the process ends.
[0072] Specifically, before performing the monitoring and diagnosis of the main processor's operating status, it is necessary to ensure that the main processor and the coprocessor are in a synchronized state. If the states of the two are not synchronized, an abnormal operation mark is performed.
[0073] This application uses a coprocessor on the train to monitor and diagnose the operating status of the main processor, and the safety protection measures taken meet the safety requirements of EN50159-2010 for closed networks. In terms of hardware architecture, a coprocessor that is heterogeneous with the main processor is used. The built-in self-test method is used to generate a set of self-test polynomials. The two heterogeneous processors perform calculations separately and compare the final calculation results to realize the monitoring and diagnosis functions. The reliability and safety of the main processor are improved, thereby improving the reliability and safety of the entire system.
[0074] Figure 4 A schematic diagram of storage area division of a dual-port memory according to an embodiment of the present invention is shown.
[0075] like Figure 4 , the overall data definition in PU600 board is as follows Figure 4 As shown. The dual-port memory storage area is divided into 4 parts, the reserved area, the transceiver data area (RS485 protocol / port transmission), the self-test sequence number area, and the BIT self-test result area. Among them, the reserved area is 512Byte, the self-test sequence number area is 256Byte, and the BIT (in-machine) self-test result area is 256Byte.
[0076] Specifically, the data in the operation status monitoring and diagnosis process is stored in a dual-port memory connected to the main processor and the coprocessor. Four storage areas are divided in the dual-port memory, namely, two self-test sequence storage areas generated by the coprocessor, a storage area for the internal self-test calculation results calculated by the coprocessor and the main processor, a transceiver data area, and a reserved area.
[0077] Furthermore, the two self-test sequence storage areas generated by the coprocessor, namely, the first self-test sequence and the second self-test sequence in the self-test sequence number area, each occupy 128 bytes, and the storage area for the internal self-test calculation results calculated by the coprocessor and the main processor, namely, the BIT (internal) self-test result area, contains the calculation results of the coprocessor and the main processor, each occupying 128 bytes.
[0078] In one embodiment, the main processor reads two self-test sequences from the coprocessor from the dual-port memory to perform built-in self-test calculations of the dual self-test polynomials, writes the calculation results into the DPRAM and compares them with the calculation results of the coprocessor in the DPRAM, and gives the operating status of the main processor according to the comparison results. If the comparison results are consistent, it indicates that the main processor operates normally and continues to process the next cycle. If the comparison results are inconsistent, it indicates that the main processor operates abnormally and gives an abnormal status.
[0079] In the present application, data is stored in a dual-port memory to ensure the efficiency and accuracy of data transmission, and the storage space of the dual-port memory is functionally divided, which makes data retrieval and storage more efficient, thereby ensuring the efficiency of the main processor monitoring the diagnostic process.
[0080] Figure 5 A flow chart of a method for monitoring and diagnosing a processor operating status according to another embodiment of the present invention is shown.
[0081] like Figure 5 After power-on, first initialize the registers of the main processor and the coprocessor in the DPRAM, initialize the synchronization state and the running state of the main processor and the coprocessor, and then synchronize the state of the main processor and the coprocessor. If the synchronization is unsuccessful, an abnormal flag is given and the process ends.
[0082] If the synchronization is successful, the two self-test sequences generated by the coprocessor are read from the dual-port memory after a preset delay (35ms), and the coprocessor's internal self-test calculation result, i.e., the first calculation result, is read. In the main processor, a CRC (cyclic redundancy check) self-check is performed on the two self-test sequences read, and the same internal self-test calculation is performed to obtain a second calculation result which is written into the dual-port memory.
[0083] Afterwards, the first calculation result and the second calculation result are calculated and compared multiple times (preset to 3 comparisons). If the comparison results are inconsistent (more than 3 inconsistencies), the main processor operation abnormality flag is set; if the comparison results are consistent, the main processor operation abnormality flag is cleared, and the next monitoring and diagnostic cycle is entered after a preset delay time (15ms).
[0084] Figure 6 A structural block diagram of a processor operation status monitoring and diagnosis device according to an embodiment of the present invention is shown.
[0085] like Figure 6 The monitoring and diagnosis device 600 includes a calling module 601, a calculation module 602 and a comparison module 603.
[0086] Specifically, the calling module 601 is used to read two self-test sequences generated by the coprocessor through the main processor and perform a first calculation result obtained by a built-in self-test calculation of a double self-test polynomial according to the two self-test sequences.
[0087] Specifically, the calculation module 602 is used to perform error detection and error correction data verification on the two self-check sequences generated by the coprocessor, and after the verification passes, the main processor performs built-in self-check calculation of the dual self-check polynomials to obtain a second calculation result.
[0088] Specifically, the comparison module 603 is used to compare the first calculation result and the second calculation result. If the first calculation result is inconsistent with the second calculation result for more than a preset number of times, it is determined that the main processor is abnormal.
[0089] In summary, the processor operation status monitoring and diagnosis method and device provided by the present invention adopt two heterogeneous processors. Compared with the main processor, the coprocessor has a lower cost, and does not require many other functions of the coprocessor, and does not affect the normal operation of the train, and it is easy to monitor and diagnose the main processor; the present invention performs built-in self-check and adopts a cyclic redundancy check method, which is simple and efficient. It is used in the monitoring and diagnosis of the main processor by the coprocessor of the train network control system, and can improve the reliability and safety of the main processor.
[0090] It should be understood that the embodiments disclosed in the present invention are not limited to the specific structures, processing steps or materials disclosed herein, but should be extended to equivalent substitutions of these features understood by ordinary technicians in the relevant field. It should also be understood that the terms used herein are only used for the purpose of describing specific embodiments and are not meant to be limiting.
[0091] The "one embodiment" or "embodiment" mentioned in the specification means that the specific features, structures or characteristics described in conjunction with the embodiment are included in at least one embodiment of the present invention. Therefore, the phrases "one embodiment" or "embodiment" appearing in various places throughout the specification do not necessarily refer to the same embodiment.
[0092] Although the embodiments disclosed in the present invention are as above, the contents described are only embodiments adopted for facilitating the understanding of the present invention and are not intended to limit the present invention. Any technician in the technical field to which the present invention belongs can make any modifications and changes in the form and details of the implementation without departing from the spirit and scope disclosed in the present invention, but the patent protection scope of the present invention shall still be subject to the scope defined in the attached claims.
Claims
1. A method for monitoring and diagnosing a processor operation status, It is characterized in that The main processor and the coprocessor are heterogeneous, and the method comprises the following steps: Step 1: The main processor reads two self-test sequences generated by the coprocessor and performs a first calculation result of a built-in self-test calculation of a double self-test polynomial according to the two self-test sequences; Step 2: Perform error detection and error correction data verification on the two self-check sequences generated by the coprocessor, and after the verification passes, perform built-in self-check calculation of the dual self-check polynomials by the main processor to obtain a second calculation result; Step 3: comparing the first calculation result and the second calculation result, if the first calculation result is inconsistent with the second calculation result for more than a preset number of times, determining that the main processor is abnormal; The built-in self-check calculation of the dual self-check polynomial comprises the following steps: Based on a first self-check algorithm, a first self-check sequence of the two self-check sequences is subjected to a self-check calculation to obtain a first data group; Based on a second self-test algorithm, in combination with the first data group, a second self-test sequence of the two self-test sequences is calculated to obtain a built-in self-test calculation result, wherein the built-in self-test calculation result includes the first calculation result and the second calculation result; The first self-checking algorithm comprises the following formula: Among them, X n,n=0-9 represents the first data group, Mod represents rounding calculation, D n1 represents a self-test sequence array in the first self-test sequence; The second self-checking algorithm comprises the following formula: Among them, Y n,n=0-9 represents the built-in self-test calculation result, D n2 Represents a self-test sequence array in the second self-test sequence.
2. The method according to claim 1, It is characterized in that Both self-test sequences include a self-test cycle number, the inverse code of the self-test cycle number, a self-test sequence array, and a check value.
3. The method according to claim 2, It is characterized in that The error detection and correction data verification comprises the following steps: The self-check cycle number, the inverse code of the self-check cycle number and the self-check sequence array in the two self-check sequences generated by the coprocessor are checked by using a generator polynomial in a cyclic redundancy check method through a check value.
4. The method according to claim 1, It is characterized in that The method comprises the following steps: Storing data in the operation status monitoring and diagnosis process via a dual-port memory connected to the main processor and the coprocessor; Four storage areas are divided in the dual-port memory, which are two self-test sequence storage areas generated by the coprocessor, a storage area for the built-in self-test calculation results calculated by the coprocessor and the main processor, a receiving and sending data area, and a reserved area.
5. The method according to claim 1, It is characterized in that Before step 1, the method further includes the following steps: Initialize the synchronization state and operation state memory of the main processor and the coprocessor, and perform state synchronization on the main processor and the coprocessor.
6. The method according to claim 5, It is characterized in that If the state synchronization of the main processor and the coprocessor fails, an abnormal operation flag is given and the process ends.
7. A processor operation status monitoring and diagnostic device, It is characterized in that The main processor and the coprocessor are heterogeneous, and the device comprises: A calling module, which is used to read, through the main processor, two self-test sequences generated by the coprocessor and a first calculation result obtained by performing a built-in self-test calculation of a double self-test polynomial according to the two self-test sequences; A calculation module, which is used to perform error detection and error correction data verification on the two self-check sequences generated by the coprocessor, and after the verification passes, perform a built-in self-check calculation of a dual self-check polynomial through the main processor to obtain a second calculation result; a comparison module, configured to compare the first calculation result with the second calculation result, and determine that the operation of the main processor is abnormal if the first calculation result is inconsistent with the second calculation result for more than a preset number of times; The built-in self-check calculation of the dual self-check polynomial comprises the following steps: Based on a first self-check algorithm, a first self-check sequence of the two self-check sequences is subjected to a self-check calculation to obtain a first data group; Based on a second self-test algorithm, in combination with the first data group, a second self-test sequence of the two self-test sequences is calculated to obtain a built-in self-test calculation result, wherein the built-in self-test calculation result includes the first calculation result and the second calculation result; The first self-checking algorithm comprises the following formula: Among them, X n,n=0-9 represents the first data group, Mod represents rounding calculation, D n1 represents a self-test sequence array in the first self-test sequence; The second self-checking algorithm comprises the following formula: Among them, Y n,n=0-9 represents the built-in self-test calculation result, D n2 Represents a self-test sequence array in the second self-test sequence.
