Fault diagnosis method, controller, protocol conversion system and storage medium

By introducing fault diagnosis methods in the protocol conversion system, comparing different data types to judge faults, the problem of failure to effectively judge faults in the existing technology is solved, fast and accurate fault detection and positioning is achieved, and the accuracy of data transmission is improved. and system reliability.

CN114928528BActive Publication Date: 2024-11-05XIAMEN KEHUA DIGITAL ENERGY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210346106.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-31
Publication Date
2024-11-05
Estimated Expiration
2042-03-31

AI Technical Summary

Technical Problem

The existing protocol conversion system fails to effectively determine the fault of the data transmission process, which may affect the reliability of subsequent data analysis.

Method used

By introducing a fault diagnosis method in the protocol conversion system, the conversion module is used to obtain and compare data of different data types, determine whether the system is faulty, and locate the fault location to ensure rapid repair.

Benefits of technology

It realizes fast and accurate fault detection and positioning of the protocol conversion system, improves the accuracy of data transmission and system reliability, and ensures the reliability of subsequent data analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114928528B_ABST
    Figure CN114928528B_ABST
Patent Text Reader

Abstract

The present invention provides a fault diagnosis method, a controller, a protocol conversion system and a storage medium. The method is used to perform fault diagnosis on a protocol conversion system, and a conversion module is used to obtain first data from a data module and convert the first data into second data suitable for an application module; wherein the data types of the first data and the second data are different; the method comprises: obtaining the first data and the second data; determining a target set; and judging whether the protocol conversion system is faulty in different ways according to different data in the target set. For example, when the target set only includes the first data, the first data is converted into first standard data of the same data type as the second data, and judging whether the protocol conversion system is faulty according to the comparison result of the first standard data and the second data. The present invention can perform fault diagnosis on a protocol conversion system and improve the reliability of data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of fault diagnosis, and in particular to a fault diagnosis method, a controller, a protocol conversion system and a storage medium. Background Art

[0002] The protocol conversion system enables modules using different transmission protocols on the communication network to transmit data. For example, the modular data center (MDC) monitoring system is used to collect the operating parameters of various devices in the data center according to the collection communication protocol, and upload the parameters to the SNMP module through the upload communication protocol. The SNMP module can use the uploaded data to analyze and manage the operating status of the data center.

[0003] The protocol conversion system generally has two important functions: data collection and data upload. However, the inventors have found that the existing protocol conversion system does not perform fault judgment on the data transmission process. If the protocol conversion system fails, it may affect the reliability of subsequent data analysis. Summary of the invention

[0004] The present invention provides a fault diagnosis method, a controller, a protocol conversion system and a storage medium to solve the problem that the existing data transmission process of the protocol conversion system is not judged for a fault, and if the protocol conversion system fails, the reliability of subsequent data analysis may be affected.

[0005] In a first aspect, the present invention provides a fault diagnosis method for diagnosing a fault in a protocol conversion system, wherein the protocol conversion system comprises a data module, a conversion module and an application module connected in sequence; the conversion module is used to obtain first data from the data module and convert the first data into second data suitable for the application module; wherein the data types of the first data and the second data are different;

[0006] The fault diagnosis method includes:

[0007] Determine the target set;

[0008] When the target set includes only the first data, converting the first data into first standard data of the same data type as the second data, and judging whether the protocol conversion system fails according to a comparison result between the first standard data and the second data;

[0009] When the target set includes only the second data, converting the second data into second standard data of the same data type as the first data, and judging whether the protocol conversion system fails according to a comparison result between the second standard data and the first data;

[0010] When the target set includes first data and second data, the first data and the second data are respectively converted into third standard data and fourth standard data of the same data type, and based on the comparison result of the third standard data and the fourth standard data, it is determined whether the protocol conversion system fails.

[0011] In some implementations, judging whether the protocol conversion system fails according to a comparison result of the first standard data and the second data includes:

[0012] If the first standard data and the second data are not equal, it is determined that the protocol conversion system fails;

[0013] If the first standard data and the second data are equal, it is determined that the protocol conversion system is normal.

[0014] In some implementations, judging whether the protocol conversion system fails according to a comparison result between the second standard data and the first data includes:

[0015] If the second standard data is not equal to the first data, it is determined that the protocol conversion system fails;

[0016] If the second standard data is equal to the first data, it is determined that the protocol conversion system is normal.

[0017] In some implementations, judging whether the protocol conversion system fails according to the comparison result between the third standard data and the fourth standard data includes:

[0018] If the third standard data and the fourth standard data are not equal, it is determined that the protocol conversion system fails;

[0019] If the third standard data and the fourth standard data are equal, it is determined that the protocol conversion system is normal.

[0020] In some embodiments, the conversion module is further used to convert the first data into third data suitable for the conversion module, and convert the first data and the second data into third standard data and fourth standard data of the same data type, respectively, including:

[0021] The first data and the second data are converted into third standard data and fourth standard data having the same data type as the third data, respectively.

[0022] In some implementations, the fault diagnosis method further includes:

[0023] obtaining third data;

[0024] If the third standard data and the fourth standard data are not equal, it is determined that the protocol conversion system fails;

[0025] When determining that the protocol conversion system fails, if the fourth standard data and the third data are not equal, then it is determined that the upload channel of the protocol conversion system fails; if the fourth standard data and the third data are equal, then it is determined that the acquisition channel of the protocol conversion system fails; the upload channel is the protocol conversion channel between the conversion module and the application module; the acquisition channel is the protocol conversion channel between the data module and the conversion module;

[0026] When determining that the uploading channel of the protocol conversion system is faulty, if the third standard data and the third data are not equal, it is determined that the collecting channel of the protocol conversion system is faulty.

[0027] In some embodiments, the first data includes a first flag bit for representing the content of the first data, and the second data includes a second flag bit for representing the content of the second data; and converting the first data and the second data into third standard data and fourth standard data of the same data type, respectively, comprises:

[0028] The first flag bit and the second flag bit are respectively converted into third standard data and fourth standard data having the same data type.

[0029] In a second aspect, the present invention provides a fault diagnosis device for performing fault diagnosis on a protocol conversion system, wherein the protocol conversion system comprises a data module, a conversion module and an application module connected in sequence; the conversion module is used to obtain first data from the data module and convert the first data into second data suitable for the application module; wherein the data types of the first data and the second data are different; the fault diagnosis device comprises:

[0030] An acquisition module, used for acquiring first data and second data;

[0031] A criterion module, used to determine the target set;

[0032] A first judgment module, configured to, when the target set includes only the first data, convert the first data into first standard data of the same data type as the second data, and judge whether the protocol conversion system fails according to a comparison result between the first standard data and the second data;

[0033] A second judgment module is used for, when the target set includes only the second data, converting the second data into second standard data of the same data type as the first data, and judging whether the protocol conversion system fails according to a comparison result between the second standard data and the first data;

[0034] The third judgment module is used to convert the first data and the second data into third standard data and fourth standard data of the same data type respectively when the target set includes the first data and the second data, and judge whether the protocol conversion system fails based on the comparison result of the third standard data and the fourth standard data.

[0035] In a third aspect, the present invention provides a controller comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, and when the processor executes the computer program, the steps of the fault diagnosis method as described in the first aspect or any possible implementation method of the first aspect are implemented.

[0036] In a fourth aspect, the present invention provides a protocol conversion system, comprising the controller, data module, conversion module and application module as described in the third aspect above; the data module, conversion module and application module are all controlled by the controller.

[0037] In a fifth aspect, the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the fault diagnosis method as described in the first aspect or any possible implementation method of the first aspect.

[0038] The present invention provides a fault diagnosis method, a controller, a protocol conversion system and a storage medium, which are used for performing fault diagnosis on a protocol conversion system. By acquiring first data in a data module and second data in an application module, a target set is determined, and the target set is used to provide a criterion. According to the different data included in the target set, different data are converted, and then compared with the first data and the second data, so as to judge whether the protocol conversion system has a fault. The judgment method is fast and accurate, which can ensure that the fault of the protocol conversion system is detected in time, and then quickly repaired, thereby improving the accuracy of data transmission of the protocol conversion system and ensuring the reliability of subsequent data analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, 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 only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0040] Figure 1 is a schematic diagram of scene connection of a conversion module provided in an embodiment of the present invention;

[0041] Figure 2 is a flow chart of an implementation of a fault diagnosis method provided by an embodiment of the present invention;

[0042] Figure 3 is a schematic diagram of the structure of a fault diagnosis device provided by an embodiment of the present invention;

[0043] Figure 4 is a schematic diagram of a controller provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0044] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.

[0045] In order to make the purpose, technical solutions and advantages of the present invention more clear, specific embodiments will be described below in conjunction with the accompanying drawings.

[0046] See also Figure 1 , which shows a schematic diagram of scene connection of the conversion module provided by an embodiment of the present invention. Figure 1 As shown, in this scenario, a data module 10, a conversion module 11 and an application module 12 are connected in sequence.

[0047] The conversion module 11 and the data module 10 are connected via an acquisition channel, which is also a protocol conversion channel between the data module 10 and the conversion module 11. The number of acquisition channels may be N, and each acquisition channel may correspond to a data conversion protocol. For example, the acquisition channel may correspond to the first protocol.

[0048] The conversion module 11 and the application module 12 are connected via an upload channel, which is also a protocol conversion channel between the data module 11 and the application module 12. The number of upload channels may be M, and each upload channel may correspond to a data conversion protocol. In general, M=1. For example, the conversion channel may correspond to the second protocol.

[0049] The data module 10 can be used to generate data. The conversion module 11 is used to obtain the data in the data module 10 and convert the obtained data into data suitable for the application module 12. The application module 12 can be used to process the data, such as data analysis or data monitoring, so as to control the operation of the device.

[0050] Optionally, the data module 10 may be a data module of a data center, the conversion module 11 may be an MDC monitoring module, and the application module 12 may be an SNMP module. The MDC monitoring module is used to obtain data in the data module and convert the obtained data into data suitable for the SNMP module. The SNMP module is used to analyze and monitor the data, thereby controlling the operation of the data center equipment.

[0051] Specifically, the data module 10 stores the operating parameters of each device in the data center, such as the various electrical parameters (voltage, current, power, etc.) of the data center's uninterruptible power supply (UPS), the temperature of the data center's air conditioning equipment, and the parameters and data modules of other devices. The data module 10 can also be a simulation module for simulating the operating parameters of each device in the data center to verify whether the MDC monitoring module is faulty.

[0052] based on Figure 1 The scene connection diagram of the conversion module shown in FIG. Figure 2 , which shows a flowchart of the implementation of the fault diagnosis method provided by the embodiment of the present invention. Figure 2 As shown, a fault diagnosis method may include:

[0053] S101, obtaining first data and second data.

[0054] Optionally, the first data is target data in the data module, and the second data is target data uploaded to the application module. The first data and the second data are data of two different data types containing the same information. The first data may be data stored in the data module, and the second data may be data stored in the application module.

[0055] The target data may be a single data value or a data table including multiple data values. For example, the target data may be a simulation data value or a simulation data table, such as a simulation voltage value or a simulation voltage value table, a simulation current value or a simulation current value table, a simulation temperature value or a simulation temperature value table, etc.

[0056] Specifically, the conversion module obtains first data from the data module, and converts the first data into second data suitable for the application module.

[0057] Exemplarily, the conversion module obtains the first data from the data module through the acquisition channel using the first conversion protocol, and uploads the first data to the application module through the upload channel using the second conversion protocol. The protocol types of the first conversion protocol and the second conversion protocol are different.

[0058] S102, determining a target set.

[0059] Optionally, the target set is a data set used to provide different criteria. The target set includes three situations: the target set includes only the first data and does not include the second data. The target set includes only the second data and does not include the first data. The target set includes the first data and the second data.

[0060] By converting data of different data types in the target set to the same data type and comparing them under the same type, it is possible to determine whether the information they contain is the same. Depending on the data included in the target set, different judgment methods can be used to diagnose faults in the protocol conversion system, as follows:

[0061] S103, when the target set includes only the first data, converting the first data into first standard data having the same data type as the second data, and judging whether the protocol conversion system fails based on a comparison result between the first standard data and the second data.

[0062] Optionally, when the target set includes only the first data, the first data is converted into first standard data of the same data type as the second data through a first standard conversion protocol, and the first standard conversion protocol is a communication conversion protocol for converting data into the same data type as the second data. By comparing the first standard data and the second data of the same data type, it can be determined whether the information included in the first standard data and the second data is the same, and further it can be determined whether the protocol conversion system is normal.

[0063] Specifically, if the first standard data and the second data are not equal, it can be determined that the protocol conversion system is faulty; if the first standard data and the second data are equal, it can be determined that the protocol conversion system is normal.

[0064] Exemplarily, A represents the data type of the first data, and B represents the data type of the second data, both of which contain current value information M and N. The first data is represented as A-MA, and the second data is represented as B-NA.

[0065] When the protocol conversion system is normal, M=N, that is, the information contained is the same; when the protocol conversion system fails, M≠N. The following judgment method can be obtained:

[0066] When only A-MA is included in the target set, A-MA is converted into first standard data B-MA of the same data type as the second data through the first standard conversion protocol. B-MA is compared with B-NA. If B-MA=B-NA, it is determined that the protocol conversion system is normal; if B-MA≠B-NA, it is determined that the protocol conversion system is faulty.

[0067] S104, when the target set includes only the second data, converting the second data into second standard data having the same data type as the first data, and judging whether the protocol conversion system fails based on a comparison result between the second standard data and the first data.

[0068] Optionally, when the target set includes only the second data, the second data is converted into second standard data of the same data type as the first data through a second standard conversion protocol, and the second standard conversion protocol is a communication conversion protocol for converting data into the same data type as the first data. By comparing the second standard data of the same data type with the first data, it can be determined whether the information included in the second standard data and the first data is the same, and further it can be determined whether the protocol conversion system is normal.

[0069] Specifically, if the second standard data is not equal to the first data, it can be determined that the protocol conversion system is faulty; if the second standard data is equal to the first data, it can be determined that the protocol conversion system is normal.

[0070] Exemplarily, A represents the data type of the first data, and B represents the data type of the second data, both of which contain current value information, the first data is represented as A-MA, and the second data is represented as B-NA.

[0071] When only B-NA is included in the target set, B-NA is converted into second standard data A-NA of the same data type as the first data through the second standard conversion protocol. A-NA is compared with A-MA. If A-NA=A-MA, it is determined that the protocol conversion system is normal; if A-NA≠A-MA, it is determined that the protocol conversion system is faulty.

[0072] S105, when the target set includes first data and second data, respectively convert the first data and the second data into third standard data and fourth standard data of the same data type, and determine whether the protocol conversion system fails based on the comparison result of the third standard data and the fourth standard data.

[0073] Optionally, when the target set includes the first data and the second data, the first data is converted into the third standard data and the second data is converted into the fourth standard data respectively through the third standard conversion protocol, and the data types of the third standard data and the fourth standard data are the same. By comparing the third standard data and the fourth standard data, it can be determined whether the information included in the third standard data and the fourth standard data is the same, and then it can be determined whether the protocol conversion system is faulty.

[0074] Specifically, if the third standard data and the fourth standard data are not equal, it is determined that the protocol conversion system fails; if the third standard data and the fourth standard data are equal, it is determined that the protocol conversion system is normal.

[0075] Exemplarily, A represents the data type of the first data, and B represents the data type of the second data, both of which contain current value information, the first data is represented as A-MA, and the second data is represented as B-NA.

[0076] When the target set includes A-MA and B-NA, A-MA and B-NA are converted to P-MA and P-NA respectively through the third standard conversion protocol. P-NA is compared with P-MA. If P-NA=P-MA, the protocol conversion system is judged to be normal; if P-NA≠P-MA, the protocol conversion system is judged to be faulty.

[0077] In practical applications, by using different criteria and selecting corresponding methods to determine whether the protocol conversion system is faulty, the selectivity of the fault diagnosis method of the protocol conversion system can be improved, which is conducive to promptly reminding the staff to repair the fault or adopt corresponding fault protection measures when a fault occurs, thereby increasing the working reliability of the protocol conversion system.

[0078] In some embodiments of the present invention, the conversion module is further used to convert the first data into third data suitable for the conversion module, and convert the first data and the second data into third standard data and fourth standard data of the same data type, respectively, including:

[0079] The first data and the second data are converted into third standard data and fourth standard data having the same data type as the third data, respectively.

[0080] Optionally, the third data may be stored in a conversion module. The conversion module converts the first data into the third data through a first conversion protocol, and converts the third data into the second data through a second conversion protocol. The first data, the second data, and the third data are data of different data types containing the same information.

[0081] Optionally, the fourth standard conversion protocol may be a communication conversion protocol for converting data into the same data type as the third data. The fourth standard conversion protocol is used to convert the first data into the third standard data and the second data into the fourth standard data. By comparing the third standard data with the fourth standard data, it can be determined whether the protocol conversion system fails.

[0082] Specifically, if the third standard data and the fourth standard data are not equal, it is determined that the protocol conversion system fails; if the third standard data and the fourth standard data are equal, it is determined that the protocol conversion system is normal.

[0083] Exemplarily, A represents the data type of the first data, B represents the data type of the second data, and C represents the data type of the third data. The three contain current value information. The first data is represented as A-MA, the second data is represented as B-NA, and the third data is represented as C-OA.

[0084] A-MA and B-NA are converted into C-MA and C-NA respectively through the fourth standard conversion protocol. C-NA is compared with C-MA. If C-NA=C-MA, it is determined that the protocol conversion system is normal; if C-NA≠C-MA, it is determined that the protocol conversion system is faulty.

[0085] In addition, the fault position of the protocol conversion system can be located according to the third standard data, the fourth standard data and the third data, specifically including:

[0086] obtaining third data;

[0087] If the third standard data and the third data are not equal, it is determined that the acquisition channel of the protocol conversion system is faulty; if the third standard data and the third data are equal, it is determined that the acquisition channel of the protocol conversion system is normal.

[0088] If the fourth standard data is not equal to the third data, it is determined that the upload channel of the protocol conversion system is faulty; if the fourth standard data is equal to the third data, it is determined that the upload channel of the protocol conversion system is normal.

[0089] Among them, the acquisition channel is the protocol conversion channel between the data module and the conversion module, and the upload channel is the protocol conversion channel between the conversion module and the application module.

[0090] Exemplarily, A represents the data type of the first data, B represents the data type of the second data, and C represents the data type of the third data. The three contain current value information. The first data is represented as A-MA, the second data is represented as B-NA, and the third data is represented as C-OA.

[0091] A-MA and B-NA are converted into C-MA and C-NA respectively through the fourth standard conversion protocol.

[0092] Compare C-MA with C-OA. If C-MA=C-OA, it is determined that the acquisition channel of the protocol conversion system is normal; if C-MA≠C-OA, it is determined that the acquisition channel of the protocol conversion system is faulty.

[0093] Compare C-NA with C-OA. If C-NA=C-OA, it is determined that the upload channel of the protocol conversion system is normal; if C-NA≠C-OA, it is determined that the upload channel of the protocol conversion system is faulty.

[0094] Generally, the protocol conversion system includes multiple acquisition channels and one upload channel. To improve the efficiency of fault diagnosis and maintenance, we can first determine whether the protocol conversion system is faulty as a whole, then determine whether the upload channel is faulty, and finally determine whether the acquisition channel is faulty.

[0095] In the embodiment of the present invention, the faults of the protocol conversion system are divided into three types: the acquisition channel fails and the upload channel is normal, the acquisition channel is normal and the upload channel fails, and the acquisition channel fails and the upload channel fails.

[0096] When determining the fault of the protocol conversion system, if the upload channel is normal, then the acquisition channel can be determined to be faulty; if the upload channel is faulty, it is necessary to further determine whether the acquisition channel is also faulty. The specific judgment methods include:

[0097] obtaining third data;

[0098] If the third standard data and the fourth standard data are not equal, it is determined that the protocol conversion system fails;

[0099] When determining that the protocol conversion system fails, if the fourth standard data and the third data are not equal, it is determined that the upload channel of the protocol conversion system fails; if the fourth standard data and the third data are equal, it is determined that the acquisition channel of the protocol conversion system fails.

[0100] When determining that the uploading channel of the protocol conversion system is faulty, if the third standard data and the third data are not equal, it is determined that the collecting channel of the protocol conversion system is faulty.

[0101] Similarly, if the fault diagnosis efficiency is not considered, when judging the fault of the protocol conversion system, if the acquisition channel is normal, then the upload channel can be judged to be faulty; if the acquisition channel is faulty, it is necessary to further judge whether the upload channel is also faulty. The specific judgment methods include:

[0102] obtaining third data;

[0103] If the third standard data and the fourth standard data are not equal, it is determined that the protocol conversion system fails;

[0104] When determining that the protocol conversion system fails, if the third standard data and the third data are not equal, it is determined that the upload channel of the protocol conversion system fails; if the third standard data and the third data are equal, it is determined that the acquisition channel of the protocol conversion system fails.

[0105] When determining that the uplink channel of the protocol conversion system is faulty, if the fourth standard data and the third data are not equal, it is determined that the uplink channel of the protocol conversion system is faulty.

[0106] In some embodiments of the present invention, the protocol conversion system includes at least one acquisition channel, each acquisition channel corresponds to a conversion protocol, and multiple conversion protocols are in parallel, so that multiple different types of data can be collected.

[0107] When determining that the acquisition channel of the protocol conversion system fails, the method further includes:

[0108] For each acquisition channel, the target data collected through the acquisition channel is converted into target standard data through the standard conversion protocol corresponding to the acquisition channel; the target standard data is compared with the target conversion data suitable for the conversion module converted through the acquisition channel; if the target standard data and the target conversion data are not equal, the acquisition channel is determined to be faulty; if the target standard data and the target conversion data are equal, the acquisition channel is determined to be normal.

[0109] By making the above judgment on each acquisition channel, the amount of faulty data of the acquisition channel can be obtained, and then the failure rate of the acquisition channel can be obtained. When the failure rate of the acquisition channel is greater than the first preset failure rate, there may be an impact between the acquisition channels, and all the acquisition channels can be repaired or replaced; when the failure rate of the acquisition channel is not greater than the first preset failure rate, the faulty acquisition channel is an isolated point failure, and only the failed acquisition channel needs to be repaired or replaced. Among them, the first preset failure rate can be set according to actual needs.

[0110] Selecting different maintenance methods based on the failure rate can improve maintenance efficiency, reduce the probability of subsequent failures, and improve the working reliability of the protocol conversion system.

[0111] The above only illustrates the case where the protocol conversion system includes at least one acquisition channel. The same is true for the case where the protocol conversion system includes at least one upload channel, which will not be described in detail in the present invention.

[0112] In some embodiments of the present invention, for a protocol conversion system including at least one upload channel and at least one acquisition channel, after obtaining the failure rate of the acquisition channel and the failure rate of the upload channel in the above manner, the failure rate of the protocol conversion system can be obtained.

[0113] If the failure rate of the protocol conversion system is greater than the second preset failure rate, all upload channels and all acquisition channels of the protocol conversion system are repaired or replaced; if the failure rate of the protocol conversion system is not greater than the second preset rate, the faulty upload channels and faulty acquisition channels are repaired or replaced. The second preset failure rate can be set according to actual needs.

[0114] In some embodiments of the present invention, the first data includes a first flag bit for representing the content of the first data, and the second data includes a second flag bit for representing the content of the second data. The first flag bit and the second flag bit represent the same information.

[0115] When the target set includes first data and second data, the third standard conversion protocol can be used to convert the first flag bit into third standard data and the second flag bit into fourth standard data. The data types of the third standard data and the fourth standard data are the same, and then by comparing the third standard data and the fourth standard data, it can be determined whether the protocol conversion system is faulty.

[0116] The embodiment of the present invention determines whether the protocol conversion system is faulty by comparing representative flag bits in the first data and the second data, without converting all the first data and the second data, which can reduce resource occupancy and ensure the accuracy of fault diagnosis.

[0117] The embodiment of the present invention can realize fault diagnosis for the protocol conversion system and locate the fault position. The embodiment of the present invention performs fault judgment from the back end to the front end, first judges the upload channel, and then judges the acquisition channel, which can improve the efficiency of fault location, thereby improving the efficiency of fault repair, reducing the fault repair time, and improving the working stability of the protocol conversion system.

[0118] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0119] The following is an embodiment of the device of the present invention. For details not described in detail therein, reference may be made to the corresponding method embodiment described above.

[0120] Figure 3 The structure diagram of the fault diagnosis device provided by the embodiment of the present invention is shown. For the convenience of description, only the part related to the embodiment of the present invention is shown, which is described in detail as follows:

[0121] like Figure 3 As shown, a fault diagnosis device 20 is used to perform fault diagnosis on a protocol conversion system, wherein the protocol conversion system includes a data module, a conversion module, and an application module connected in sequence; the conversion module is used to obtain first data from the data module and convert the first data into second data suitable for the application module; wherein the data types of the first data and the second data are different; the fault diagnosis device 20 includes:

[0122] An acquisition module 201 is used to acquire first data and second data;

[0123] A judgment module 202, used to determine a target set;

[0124] A first judgment module 203 is used for, when the target set includes only the first data, converting the first data into first standard data of the same data type as the second data, and judging whether the protocol conversion system fails according to a comparison result between the first standard data and the second data;

[0125] A second judgment module 204 is used for, when the target set includes only the second data, converting the second data into second standard data of the same data type as the first data, and judging whether the protocol conversion system fails according to a comparison result between the second standard data and the first data;

[0126] The third judgment module 205 is used to convert the first data and the second data into third standard data and fourth standard data of the same data type respectively when the target set includes the first data and the second data, and judge whether the protocol conversion system fails according to the comparison result of the third standard data and the fourth standard data.

[0127] In some embodiments of the present invention, the first determination module 203 may include:

[0128] A first judging unit, configured to judge that the protocol conversion system fails if the first standard data and the second data are not equal;

[0129] The second judgment unit is used to judge that the protocol conversion system is normal if the first standard data and the second data are equal.

[0130] In some embodiments of the present invention, the second determination module 204 may include:

[0131] A third judgment unit, configured to judge that the protocol conversion system fails if the second standard data is not equal to the first data;

[0132] The fourth judgment unit is used to judge that the protocol conversion system is normal if the second standard data is equal to the first data.

[0133] In some embodiments of the present invention, the third determination module 205 may include:

[0134] a fifth judgment unit, configured to judge that the protocol conversion system fails if the third standard data and the fourth standard data are not equal;

[0135] The sixth judgment unit is used to judge that the protocol conversion system is normal if the third standard data and the fourth standard data are equal.

[0136] In some embodiments of the present invention, the conversion module is further used to convert the first data into third data suitable for the conversion module, and the third judgment module 205 is further used to convert the first data and the second data into third standard data and fourth standard data having the same data type as the third data, respectively.

[0137] In some embodiments of the present invention, the third determination module 205 may further include:

[0138] An acquiring unit, configured to acquire third data;

[0139] a seventh judgment unit, configured to judge that the protocol conversion system fails if the third standard data and the fourth standard data are not equal;

[0140] The eighth judgment unit is used to, when judging the failure of the protocol conversion system, if the fourth standard data and the third data are not equal, then judge the failure of the upload channel of the protocol conversion system; if the fourth standard data and the third data are equal, then judge the failure of the acquisition channel of the protocol conversion system; the upload channel is the protocol conversion channel between the conversion module and the application module; the acquisition channel is the protocol conversion channel between the data module and the conversion module;

[0141] The ninth judgment unit is used to judge that the uploading channel of the protocol conversion system has a fault if the third standard data and the third data are not equal when judging that the uploading channel of the protocol conversion system has a fault.

[0142] In some embodiments of the present invention, the first data includes a first flag bit for representing the content of the first data, and the second data includes a second flag bit for representing the content of the second data; the third judgment module 205 is also used to convert the first flag bit and the second flag bit into third standard data and fourth standard data of the same data type, respectively.

[0143] Figure 4 is a schematic diagram of a controller provided by an embodiment of the present invention. Figure 4 As shown, the controller 30 of this embodiment includes: a processor 300 and a memory 301, and the memory 300 stores a computer program 302 that can be run on the processor 300. When the processor 300 executes the computer program 302, the steps in the above-mentioned various fault diagnosis method embodiments are implemented, such as Figure 2 Alternatively, when the processor 300 executes the computer program 302, the functions of each module / unit in the above-mentioned device embodiments are implemented, for example Figure 3 Functionality of modules / units 201 to 205 is shown.

[0144] Exemplarily, the computer program 302 may be divided into one or more modules / units, one or more modules / units are stored in the memory 301 and executed by the processor 300 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments that can implement specific functions, and the instruction segments are used to describe the execution process of the computer program 302 in the controller 30. For example, the computer program 302 may be divided into Figure 3 Modules / units 201 to 203 are shown.

[0145] The controller 30 may be a DSP chip, or a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The controller 30 may include, but is not limited to, a processor 300 and a memory 301. Those skilled in the art will appreciate that Figure 4This is only an example of the controller 30 and does not constitute a limitation of the controller 30. The controller 30 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the controller may also include input and output devices, network access devices, buses, etc.

[0146] The processor 300 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0147] The memory 301 may be an internal storage unit of the controller 30, such as a hard disk or memory of the controller 30. The memory 301 may also be an external storage device of the controller 30, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the controller 30. Further, the memory 301 may also include both an internal storage unit of the controller 30 and an external storage device. The memory 301 is used to store computer programs and other programs and data required by the controller. The memory 301 may also be used to temporarily store data that has been output or is to be output.

[0148] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0149] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0150] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0151] In some embodiments of the present invention, a protocol conversion system includes the above controller 30, a data module, a conversion module and an application module; the data module, the conversion module and the application module are all controlled by the controller.

[0152] In the embodiments provided by the present invention, it should be understood that the disclosed devices / controllers and methods can be implemented in other ways. For example, the device / controller embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0153] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0154] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0155] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various fault diagnosis method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.

[0156] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.

Claims

1. A fault diagnosis method, characterized in that: Used to perform fault diagnosis on a protocol conversion system, the protocol conversion system comprising a data module, a conversion module and an application module connected in sequence; the conversion module is used to obtain first data from the data module and convert the first data into second data suitable for the application module; wherein the data types of the first data and the second data are different; The fault diagnosis method comprises: Acquire the first data and the second data; Determine the target set; When the target set includes only the first data, converting the first data into first standard data of the same data type as the second data, and judging whether the protocol conversion system fails according to a comparison result between the first standard data and the second data; When the target set includes only the second data, converting the second data into second standard data of the same data type as the first data, and judging whether the protocol conversion system fails according to a comparison result between the second standard data and the first data; When the target set includes the first data and the second data, respectively converting the first data and the second data into third standard data and fourth standard data of the same data type, and judging whether the protocol conversion system fails according to a comparison result between the third standard data and the fourth standard data; The conversion module is further used to convert the first data into third data suitable for the conversion module, and the converting of the first data and the second data into third standard data and fourth standard data of the same data type respectively includes: Respectively converting the first data and the second data into third standard data and fourth standard data having the same data type as the third data; The fault diagnosis method further comprises: Acquiring the third data; If the third standard data and the fourth standard data are not equal, determining that the protocol conversion system fails; When determining that the protocol conversion system fails, if the fourth standard data and the third data are not equal, then it is determined that the upload channel of the protocol conversion system fails; if the fourth standard data and the third data are equal, then it is determined that the acquisition channel of the protocol conversion system fails; the upload channel is the protocol conversion channel between the conversion module and the application module; the acquisition channel is the protocol conversion channel between the data module and the conversion module; When determining that the upload channel of the protocol conversion system is faulty, if the third standard data and the third data are not equal, it is determined that the acquisition channel of the protocol conversion system is faulty.

2. The fault diagnosis method according to claim 1, characterized in that: The step of judging whether the protocol conversion system fails according to a comparison result between the first standard data and the second data includes: If the first standard data and the second data are not equal, determining that the protocol conversion system fails; If the first standard data and the second data are equal, it is determined that the protocol conversion system is normal.

3. The fault diagnosis method according to claim 1, characterized in that: The step of judging whether the protocol conversion system fails according to a comparison result between the second standard data and the first data includes: If the second standard data is not equal to the first data, determining that the protocol conversion system fails; If the second standard data is equal to the first data, it is determined that the protocol conversion system is normal.

4. The fault diagnosis method according to claim 1, characterized in that: The step of judging whether the protocol conversion system fails according to the comparison result between the third standard data and the fourth standard data includes: If the third standard data and the fourth standard data are not equal, determining that the protocol conversion system fails; If the third standard data and the fourth standard data are equal, it is determined that the protocol conversion system is normal.

5. The fault diagnosis method according to any one of claims 1 to 4, characterized in that: The first data includes a first flag bit for representing the content of the first data, and the second data includes a second flag bit for representing the content of the second data; and the converting the first data and the second data into third standard data and fourth standard data of the same data type respectively includes: The first flag bit and the second flag bit are respectively converted into third standard data and fourth standard data of the same data type.

6. A controller comprising a memory and a processor, wherein: The memory stores a computer program that can be run on the processor, wherein the processor implements the steps of the fault diagnosis method as described in any one of claims 1 to 5 when executing the computer program.

7. A protocol conversion system, characterized in that: It comprises the controller, data module, conversion module and application module as described in claim 6; the data module, the conversion module and the application module are all controlled by the controller.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the fault diagnosis method as described in any one of claims 1 to 5 are implemented.