An automatic pre-check method, system and storage medium for industrial keyboard failure
By periodically collecting and analyzing the changing trends of electrical parameters of industrial keyboard keys and dynamically adjusting the detection frequency, the problem of not being able to identify keyboard degradation in advance in existing technologies is solved, enabling predictive maintenance and resource optimization.
Patent Information
- Application Number
- CN202610744955.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-27
- Publication Date
- 2026-08-25
AI Technical Summary
Existing fault detection technologies for industrial keyboards cannot identify in advance the slow deterioration of electrical performance caused by water ingress, corrosion, oxidation, or mechanical wear, thus failing to enable predictive maintenance. Furthermore, existing detection mechanisms lack the ability to analyze the changing trends of key electrical parameters.
By periodically collecting the electrical parameters of the buttons, using a DAC to output a sinusoidal signal and an ADC to collect voltage and current to calculate impedance, and combining data queue analysis to analyze the changing trends, the detection frequency is dynamically adjusted to generate fault reports, thereby achieving early warning of button deterioration trends and resource optimization.
It enables the identification of progressive degradation trends before keys completely fail, improving the predictive maintenance capabilities and system reliability of industrial keyboards and reducing resource waste.
Smart Images

Figure CN122633484A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automatic detection technology for industrial keyboards, and more specifically, to an automatic pre-detection method, system, and storage medium for industrial keyboard malfunctions. Background Technology
[0002] With the development of industrial automation and intelligent manufacturing, industrial keyboards are increasingly used in high-reliability environments. For example, power control rooms, rail transit dispatch centers, and equipment control consoles all place stringent requirements on the long-term stable operation of keyboards. Key failures often directly impact the safety and efficiency of the entire system.
[0003] However, existing fault detection technologies for industrial keyboards have significant shortcomings. Specifically, firstly, existing self-testing schemes primarily assess the complete short-circuit or open-circuit state of the keys. In other words, an alarm is only triggered after a key has completely failed. This approach cannot identify the slow degradation of electrical performance caused by water ingress, corrosion, oxidation, or mechanical wear before a fault occurs. Secondly, existing detection mechanisms lack the ability to analyze the changing trends of key electrical parameters. For non-complete short-circuit faults, such as a gradual decrease in resistance after water ingress or a gradual increase in resistance after contact surface oxidation, existing technologies cannot provide early warnings. Maintenance personnel can only intervene passively after the keys have completely failed, often leading to the risk of sudden downtime. Thirdly, existing technologies use a uniform, fixed detection frequency for all keys. This prevents focused monitoring of abnormal keys and wastes system resources. Therefore, there is an urgent need in this field for an automatic pre-detection technology for industrial keyboard faults that can detect progressive key degradation in advance and enable predictive maintenance. Summary of the Invention
[0004] In view of the above problems, the purpose of this invention is to provide an automatic pre-detection method, system and storage medium for industrial keyboard faults. By periodically collecting the electrical parameters of the keys and storing them in a data queue, the current detection value is compared with a first threshold to determine obvious faults, and then the changing trend is calculated through historical data and compared with a second threshold to identify the deterioration trend, ultimately achieving early warning of faults.
[0005] Specifically, firstly, by using a DAC to output a sinusoidal test signal and then using an ADC to collect voltage and current to calculate impedance, the accuracy and independence of electrical parameter acquisition are ensured. Secondly, by calculating the average rate of change or cumulative offset of adjacent changes as trend information, the direction and rate of gradual degradation such as button corrosion and water ingress can be accurately captured. Thirdly, by dynamically adjusting the detection frequency, the sampling density is increased for warning buttons to closely track the degradation process, while the frequency is reduced for stable buttons to save resources, achieving a balance between detection efficiency and reliability. Finally, by fully recording the warning time, abnormal time, trend change sequence, and final abnormal value, a fault report containing the complete evolution process is generated, providing maintenance personnel with accurate location and traceability information. Furthermore, through a learning mode and background calibration mechanism, the threshold range is automatically set and dynamically updated to effectively compensate for the impact of button aging and environmental drift on detection accuracy.
[0006] The first aspect of this invention provides an automatic pre-detection method for industrial keyboard malfunctions, the method comprising: The first electrical parameters of each button are collected based on a preset time period and stored in the data queue of each button in chronological order. Determine whether the first electrical parameter is within a preset first threshold range; If not located, an immediate abnormal alarm will be triggered and the button number will be located. If it is located, then the most recent preset number of electrical parameter values are extracted from the data queue, and the first trend information is calculated; Determine whether the first trend information exceeds a preset second threshold; If not, maintain or reduce the detection frequency of the corresponding button; If so, a degradation trend warning will be triggered, and the detection frequency of the corresponding button will be increased; After triggering the degradation trend warning, the second electrical parameter is continuously monitored and the second trend information is calculated. If the second trend information continues to exceed the second threshold and the second electrical parameter exceeds the first threshold range, a complete fault report is generated.
[0007] In this solution, the step of collecting the first electrical parameters of each button based on a preset time period and storing them in the data queue of each button in chronological order specifically includes: Based on a preset time period, a first test signal is output to the key path under test via a DAC, wherein the first test signal includes at least a sine wave signal; The voltage or current of the key path under test is collected by the ADC connected to the key path under test, and the first electrical parameter is calculated. The second electrical parameter is obtained using the same acquisition method as the first electrical parameter; The data queue is retrieved based on the key number, and the data queue adopts a first-in-first-out storage structure.
[0008] In this scheme, the calculation of the first trend information specifically includes: Extract the electrical parameter values from the data queue that have been most recently preset, and calculate the change between two consecutive electrical parameter values; The average rate of change of the electrical parameters per unit time is determined based on the amount of change. Alternatively, the cumulative offset and offset direction of the electrical parameters can be determined based on the difference between the first and last electrical parameter values in the data queue and the corresponding time span. The average rate of change or the cumulative offset is used as the first trend information.
[0009] This plan includes: The increase in the detection frequency of the corresponding button is specifically achieved by shortening the detection cycle of the button that triggers the degradation trend warning by a preset ratio. The method of maintaining or reducing the detection frequency of the corresponding button is as follows: when the first trend information does not exceed the second threshold in multiple consecutive detections, the detection frequency is restored to the default frequency; when no warning is triggered within a preset time period and the trend information of all buttons is lower than the second threshold, the detection frequency is reduced to below the default frequency.
[0010] This plan includes: After triggering a deterioration trend warning, record the warning trigger time and the first trend information at the time of the warning; During continuous testing, the second electrical parameters and second trend information for each test are recorded. When the second electrical parameter exceeds the first threshold range, record the abnormal trigger time and the specific range of the threshold range exceeded. The warning trigger time, the abnormality trigger time, the corresponding button number, the trend change sequence after the warning, and the final abnormal value are combined to generate a complete fault report; If, after triggering a degradation trend warning, the second trend information is continuously lower than the second threshold multiple times and the second electrical parameter recovers to the first threshold range, then the warning state of the button is lifted, the default detection frequency is restored, and the warning event is recorded as a recoverable fluctuation.
[0011] This plan also includes: The keyboard enters learning mode when it is first used or when a calibration command is received. In the learning mode, the reference electrical parameters of each button in the unpressed state are collected, and the first threshold range and the second threshold are automatically set according to the reference electrical parameters of each button. During periodic testing, if no warning or abnormality is triggered for several consecutive tests of all buttons, background calibration will be triggered. In response to the background calibration, the current electrical parameters of each button are reacquired as new reference electrical parameters, and the first threshold range and the second threshold are updated according to the new reference electrical parameters.
[0012] A second aspect of the present invention provides an automatic pre-detection system for industrial keyboard malfunctions, including an automatic pre-detection method program for industrial keyboard malfunctions, wherein the automatic pre-detection method program for industrial keyboard malfunctions, when executed by the processor, performs the following steps: The first electrical parameters of each button are collected based on a preset time period and stored in the data queue of each button in chronological order. Determine whether the first electrical parameter is within a preset first threshold range; If not located, an immediate abnormal alarm will be triggered and the button number will be located. If it is located, then the most recent preset number of electrical parameter values are extracted from the data queue, and the first trend information is calculated; Determine whether the first trend information exceeds a preset second threshold; If not, maintain or reduce the detection frequency of the corresponding button; If so, a degradation trend warning will be triggered, and the detection frequency of the corresponding button will be increased; After triggering the degradation trend warning, the second electrical parameter is continuously monitored and the second trend information is calculated. If the second trend information continues to exceed the second threshold, and the second electrical parameter exceeds the first threshold range, a complete fault report is generated. A third aspect of the present invention provides a computer-readable storage medium including an automatic pre-detection method program for industrial keyboard faults. When executed by a processor, the automatic pre-detection method program for industrial keyboard faults implements the steps of the automatic pre-detection method for industrial keyboard faults as described in any of the preceding claims.
[0013] This invention provides an automatic pre-detection method, system, and storage medium for industrial keyboard faults. First, electrical parameters of each key are collected and stored in a corresponding data queue according to a preset time period. The current detected value is compared with a first threshold range. If it exceeds the range, an immediate anomaly alarm is triggered, and the faulty key is located. If it is within the range, the trend is calculated based on the data queue. This trend is compared with a second threshold. If it does not exceed the threshold, the detection frequency is maintained or reduced. If it exceeds the threshold, a degradation trend warning is triggered, and the detection frequency for that key is increased. During the warning state, second electrical parameters are continuously collected, and second trend information is calculated. If the trend continuously exceeds the second threshold and the electrical parameters eventually exceed the first threshold range, a complete fault report including the warning and the time of the anomaly is generated. This invention can identify progressive degradation trends before the keys completely fail, effectively improving the predictive maintenance capability and system reliability of industrial keyboards. Attached Figure Description
[0014] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope.
[0015] Figure 1 A flowchart of an automatic pre-detection method for industrial keyboard faults according to the present invention is shown; Figure 2 The diagram shows the modular structure of an automatic pre-detection system for industrial keyboard malfunctions according to the present invention. Figure 3 A circuit diagram of a key matrix provided in an embodiment of the present invention is shown; Figure 4 A circuit diagram of the analog portion of a key detection circuit provided in an embodiment of the present invention is shown; Figure 5 A block diagram of an automatic pre-detection system for industrial keyboard malfunctions according to the present invention is shown. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] Unless otherwise defined, all terms (including technical and scientific terms) used in embodiments of this invention shall have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in a common dictionary shall be interpreted as having a meaning consistent with their meaning in the context of the relevant art, and not as being interpreted in an idealized or highly formalized sense, unless expressly defined in this embodiment of the invention.
[0018] The terms "first," "second," and similar words used in the embodiments of this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "an," "a," or "the" do not indicate a quantity limitation, but rather indicate the presence of at least one. Similarly, terms such as "including" or "comprising" mean that the element or object preceding the word encompasses the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. The steps preceding or following the steps in the method of the embodiments of this invention are not necessarily performed precisely in sequence. Instead, various steps can be processed in reverse order or simultaneously. Furthermore, other operations can be added to these processes, or one or more steps can be removed from these processes.
[0019] In addition, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0020] Figure 1 A flowchart of an automatic pre-detection method for industrial keyboard faults according to the present invention is shown.
[0021] like Figure 1 As shown, the first aspect of this invention discloses an automatic pre-detection method for industrial keyboard faults, the method comprising: S102, collect the first electrical parameters of each button based on a preset time period, and store them in the data queue of each button in time order; S104, determine whether the first electrical parameter is within a preset first threshold range; S106, if not located, trigger an immediate abnormal alarm and locate the key number; S108, if it is located, then extract the most recent preset number of electrical parameter values from the data queue and calculate the first trend information; S110, determine whether the first trend information exceeds a preset second threshold; S112, if not, maintain or reduce the detection frequency of the corresponding button; S114, if so, trigger a degradation trend warning and increase the detection frequency of the corresponding button; S116, after triggering the deterioration trend warning, continuously monitor the second electrical parameters and calculate the second trend information; S118, if the second trend information continues to exceed the second threshold and the second electrical parameter exceeds the first threshold range, then a complete fault report is generated.
[0022] Wherein, the first electrical parameter is the electrical value of each button, such as the initial impedance value; the first trend information is the changing trend of the electrical value of each button; the second electrical parameter is the electrical value of each button after the degradation trend warning is executed, such as the initial impedance value; and the second trend information is the changing trend of the electrical value of each button after the degradation trend warning is executed.
[0023] It should be noted that in this embodiment, the detection microcontroller first applies analog test signals to each key path in the keyboard matrix sequentially according to a preset time period. After the analog test signal passes through the key circuit under test, the analog-to-digital conversion module inside the detection microcontroller synchronously collects the voltage and current responses in the circuit, and calculates the impedance value that reflects the electrical health status of the key, which is used as the first electrical parameter. Each impedance value collected is stored in an independent data queue pre-assigned to that key according to the key number. This data queue adopts a first-in-first-out storage mechanism, retaining only the most recent historical measurement results. Subsequently, the detection microcontroller compares the currently collected impedance value with a preset first threshold range. If the current impedance value is within this range, it indicates that the key has not yet shown a significant fault. Then, it further extracts the most recent historical impedance values from the key's data queue, calculates its trend over time, and obtains the first trend information. If the intensity of this trend exceeds a preset second threshold, it is determined that the key is in the process of performance degradation. At this time, the system immediately triggers a degradation trend warning and automatically increases the subsequent detection frequency of the key to closely track its degradation rate. In the warning state, the system continuously collects the second electrical parameter of the button and calculates its changing trend. If the trend continues to exceed the second threshold and the electrical parameter eventually exceeds the first threshold range, a fault report is generated, including the warning time, the abnormal trigger time, and the complete change sequence. If the trend reverses after the warning and returns to the normal range, the warning is automatically lifted. Through the above pre-inspection implementation process, this embodiment can identify the progressive degradation of the button before it completely fails, thereby achieving predictive maintenance.
[0024] According to an embodiment of the present invention, the step of collecting the first electrical parameters of each button based on a preset time period and storing them in the data queue of each button in chronological order specifically includes: Based on a preset time period, a first test signal is output to the key path under test via a DAC, wherein the first test signal includes at least a sine wave signal; The voltage or current of the key path under test is collected by the ADC connected to the key path under test, and the first electrical parameter is calculated. The second electrical parameter is obtained using the same acquisition method as the first electrical parameter; The data queue is retrieved based on the key number, and the data queue adopts a first-in-first-out storage structure.
[0025] It should be noted that in this embodiment, the digital-to-analog converter (DAC) integrated within the microcontroller outputs a first test signal sequentially to each key path under test according to a set time period. This first test signal is preferably in the form of a sine wave to cover a wider impedance spectrum response. During the application of the test signal, the analog-to-digital converter (ADC) connected to the same key path synchronously starts sampling, acquiring the voltage or current signal on that path to calculate the impedance value of the key in its current state. This impedance value serves as the first electrical parameter. For the second electrical parameter, which is continuously monitored after triggering a degradation trend warning, the same acquisition method as the first electrical parameter is used to ensure data consistency. After acquiring the electrical parameters, the system retrieves a pre-allocated data queue based on the currently scanned key number. This data queue is organized in memory using a first-in, first-out (FIFO) storage structure. Each time new data is written, the oldest data at the head of the queue is automatically discarded, ensuring that the queue always retains the most recent valid historical measurement values.
[0026] According to an embodiment of the present invention, the calculation of the first trend information specifically includes: Extract the electrical parameter values from the data queue that have been most recently preset, and calculate the change between two consecutive electrical parameter values; The average rate of change of the electrical parameters per unit time is determined based on the amount of change. Alternatively, the cumulative offset and offset direction of the electrical parameters can be determined based on the difference between the first and last electrical parameter values in the data queue and the corresponding time span. The average rate of change or the cumulative offset is used as the first trend information.
[0027] It should be noted that, in this embodiment, as an optional implementation, the electrical parameter values of the most recent preset number of times are first extracted from the data queue corresponding to the button. Then, the change between two adjacent electrical parameter values is calculated sequentially according to time order, thereby obtaining a series of differences reflecting the magnitude of successive changes. Based on these differences and the fixed time interval between two adjacent acquisitions, the system further calculates the average rate of change of the electrical parameter per unit time. This rate can intuitively reflect the speed of the degradation process. As another optional implementation, the system can also directly take the electrical parameter values at the beginning and end of the data queue, calculate the absolute value of their difference, and then divide it by the total time span between the beginning and end acquisition points. This yields a total rate of change reflecting the cumulative offset within the entire historical window period, and the sign of the difference can determine whether the offset direction is decreasing or increasing. The average rate of change or cumulative offset calculated above serves as the first trend information described in this method.
[0028] According to an embodiment of the present invention, it includes: The increase in the detection frequency of the corresponding button is specifically achieved by shortening the detection cycle of the button that triggers the degradation trend warning by a preset ratio. The method of maintaining or reducing the detection frequency of the corresponding button is as follows: when the first trend information does not exceed the second threshold in multiple consecutive detections, the detection frequency is restored to the default frequency; when no warning is triggered within a preset time period and the trend information of all buttons is lower than the second threshold, the detection frequency is reduced to below the default frequency.
[0029] It should be noted that in this embodiment, when a key triggers a degradation trend warning, the system increases the detection frequency for that key. Specifically, the subsequent detection cycle is adjusted by a preset shortening ratio, for example, reducing the default detection every second to once every 0.8 seconds, thereby capturing subtle changes in the key's electrical parameters with higher time resolution. When the calculated first trend information for a key does not exceed a preset second threshold in multiple consecutive detections, it indicates that the key's current state is stable. At this time, the system restores the detection frequency for that key to the system's default standard frequency. Furthermore, when the entire keyboard does not trigger any warnings or abnormal alarms for a preset extended period, and the trend information of all keys is significantly lower than a preset lower limit of the second threshold, the system determines that all keys are currently in a highly stable state. At this time, the overall detection frequency can be reduced to below the default frequency, for example, by doubling the detection cycle, to reduce the system's computational load and power consumption. The above frequency adjustment strategy ensures timely fault detection while achieving dynamic optimization of system resources.
[0030] According to an embodiment of the present invention, after triggering a degradation trend warning, the warning trigger time and the first trend information at the time of the warning are recorded; During continuous testing, the second electrical parameters and second trend information for each test are recorded. When the second electrical parameter exceeds the first threshold range, record the abnormal trigger time and the specific range of the threshold range exceeded. The warning trigger time, the abnormality trigger time, the corresponding button number, the trend change sequence after the warning, and the final abnormal value are combined to generate a complete fault report; If, after triggering a degradation trend warning, the second trend information is continuously lower than the second threshold multiple times and the second electrical parameter recovers to the first threshold range, then the warning state of the button is lifted, the default detection frequency is restored, and the warning event is recorded as a recoverable fluctuation.
[0031] It should be noted that in this embodiment, when the system triggers a degradation trend warning based on the first trend information, it immediately records the timestamp of the trigger moment and the value of the first trend information used at the time of triggering, using this information as the starting node of the fault report. Subsequently, in the warning state, the system performs continuous detection on the button. After each acquisition of the second electrical parameter, the second trend information is calculated synchronously, and the time of each detection, the electrical parameter value, and the trend information are recorded sequentially in the buffer. When the detected second electrical parameter exceeds the first threshold range at a certain moment, the system records the abnormal trigger time and the specific direction of exceeding the threshold range, such as whether it is below the lower limit or above the upper limit. After completing the above recording, the system merges and packages the warning trigger time, abnormal trigger time, the corresponding button number, the entire trend change sequence after the warning, and the final abnormal electrical parameter value to generate a complete fault report. At the same time, if after triggering the degradation trend warning, the system detects that the second trend information is below the second threshold multiple times consecutively, and the second electrical parameter also recovers to within the first threshold range, then the abnormal fluctuation of the button is determined to be a recoverable event. At this point, the warning status of the button is deactivated, the detection frequency is restored to the default value, and this warning event is marked as a recoverable fluctuation and recorded in the log, thereby avoiding unnecessary maintenance intervention.
[0032] According to an embodiment of the present invention, it further includes: The keyboard enters learning mode when it is first used or when a calibration command is received. In the learning mode, the reference electrical parameters of each button in the unpressed state are collected, and the first threshold range and the second threshold are automatically set according to the reference electrical parameters of each button. During periodic testing, if no warning or abnormality is triggered for several consecutive tests of all buttons, background calibration will be triggered. In response to the background calibration, the current electrical parameters of each button are reacquired as new reference electrical parameters, and the first threshold range and the second threshold are updated according to the new reference electrical parameters.
[0033] It should be noted that in this embodiment, when the industrial keyboard is first installed and powered on, the system automatically enters learning mode. This mode can also be manually triggered by the user through specific commands. In learning mode, the system requires all keys to be in a non-pressed state, and then sequentially collects the electrical parameters of each key as the reference electrical parameters for that key. Based on the reference values collected for each key, the system automatically sets a first threshold range for each key. For example, a preset tolerance range is extended above and below the reference value as a normal operating range. At the same time, the system also sets a second threshold to determine the sensitivity to abnormal trends. During subsequent normal periodic testing, if the system detects that all keys have not triggered any warnings or abnormal alarms for several consecutive tests, it automatically triggers background calibration. In response to this background calibration event, the system re-collects the electrical parameters of each key under the current environment and operating state as new reference values, and dynamically updates the first threshold range and second threshold for each key based on the new reference values. This self-calibration mechanism can effectively compensate for reference drift caused by long-term key aging or slow environmental changes, thereby maintaining the accuracy of fault detection.
[0034] It is worth mentioning that it also includes: When a button triggers a degradation trend warning, if the direction of change of the second trend information is opposite to the trend direction of the first trend information when the warning was triggered in subsequent consecutive detections, and the strength of the reverse trend exceeds the preset stabilization threshold, then it is determined to be a trend reversal. After determining that a trend reversal has occurred, the deterioration trend warning status of the button will be deactivated, and the default detection frequency will be restored. Mark the data during the warning period in the historical data queue of this button as a fluctuation record, and lower the second threshold of this button.
[0035] It should be noted that in this embodiment, when a button triggers a degradation trend warning, the system continues to perform high-frequency detection on that button and continuously calculates the second trend information and its direction of change obtained from each detection. If the direction of trend change is reversed, for example, from a continuous decline to a continuous rise, the strength value of the reverse trend is further calculated. The system has a preset stabilization threshold to determine whether the reverse trend is sufficient to indicate that the degradation process has stopped and begun to recover. If the strength of the reverse trend exceeds the stabilization threshold, it is determined to be a trend reversal event. After determining that the trend has reversed, the system immediately cancels the degradation trend warning state of that button and restores its detection frequency to the default frequency, thereby avoiding continuous occupation of detection resources due to occasional fluctuations. At the same time, the system marks the electrical parameter data stored in the button's historical data queue during the warning period with a special mark and archives it as a fluctuation record for subsequent analysis. In addition, the system automatically lowers the second threshold of that button, making it less sensitive to similar fluctuations in future detections, thereby reducing redundant warnings caused by repeated recoverable fluctuations of the same button.
[0036] It is worth mentioning that it also includes: Real-time monitoring of temperature and humidity parameters of the keyboard's surrounding environment; When the temperature parameter exceeds the preset upper temperature limit or falls below the preset lower temperature limit, the temperature offset is calculated, and the upper and lower limits of the first threshold interval are widened. When the humidity parameter exceeds the preset humidity threshold, the humidity compensation mode is activated; In response to the humidity compensation mode, the second threshold is increased, and the detection cycle of each button is shortened to a preset ratio of the default cycle. After the environmental parameters return to the normal range, restore the original settings of the first threshold range and the second threshold.
[0037] It should be noted that in this embodiment, the system uses integrated temperature and humidity sensors to collect real-time temperature and humidity parameters of the keyboard's operating environment at preset time intervals. When the detected temperature parameter exceeds the preset maximum operating temperature limit or falls below the preset minimum operating temperature limit, the system dynamically widens the upper and lower limits of the first threshold range for each key based on the offset between the actual temperature and the standard temperature to compensate for the drift of electrical parameter references caused by temperature changes. When the detected humidity parameter exceeds the preset humidity threshold, the system determines that there is a risk of humidity in the current environment and immediately activates the humidity compensation mode. In this compensation mode, the system temporarily increases the value of the second threshold, making the judgment standard for the change trend more lenient, thereby reducing false alarms caused by temporary parameter fluctuations due to humidity. At the same time, the system uniformly shortens the detection cycle of all keys to a preset proportion of the default cycle in order to monitor rapid degradation that may be caused by water ingress or condensation at a higher sampling frequency. When the environmental parameters return to the normal range, the system automatically restores the first threshold range, the second threshold, and the detection frequency to the original settings and records the environmental compensation event in the log.
[0038] It is worth mentioning that it also includes: When multiple keys trigger degradation trend warnings simultaneously within the same scan cycle, extract the coordinate position information of the warning keys in the keyboard matrix. Based on the coordinate information of the warning buttons, determine whether there is an adjacent position relationship; If multiple warning buttons form a continuous adjacent area, a regional fault warning will be generated, and all buttons in the area will be included in the accelerated detection list. If the warning buttons are discretely distributed, each button will maintain its independent warning state; the regional fault warning has a higher priority than the deterioration trend warning of a single button.
[0039] It should be noted that in this embodiment, after completing the detection and judgment of all keys in each scanning cycle, the system collects information on all keys that triggered degradation trend warnings within that cycle. For each warning key, the system extracts its corresponding coordinate position information based on its row and column wiring in the keyboard matrix. Subsequently, the system performs spatial clustering analysis on the coordinates of all warning keys to determine whether there is an adjacent position relationship between them, i.e., whether they share edges or corners. If the analysis results show that multiple warning keys form a continuous adjacent area, such as a two-row, two-column rectangular area or a continuous row and column line segment, the system determines that a regional fault has occurred. At this time, a regional fault warning is generated, and all keys in the adjacent area (including those adjacent keys that have not yet triggered a warning but are in the same area) are included in the accelerated detection list, and the detection frequency of these keys is uniformly increased. If the warning keys are discretely distributed and there is no adjacent relationship between them, the system maintains the independent warning state of each key and does not intervene in other keys. In the above processing, the display priority of regional fault warnings is higher than that of individual key degradation trend warnings, the purpose of which is to remind maintenance personnel to pay attention to regional damage that may be caused by liquid splashes or mechanical impacts.
[0040] Figure 2 The diagram shows the modular structure of an automatic pre-detection system for industrial keyboard malfunctions according to the present invention.
[0041] like Figure 2 As shown, the system modules include: a detection processor 21, a key matrix 22, a strobe switch 23, and an alarm interface 24.
[0042] The detection processor 21 includes: DAC module 211 is used to apply analog test signals to the button under test; ADC module 212 is used to convert the acquired analog quantities into digital electrical parameter values; Data queue storage area 213 is used to store the historical electrical parameter values of each button in chronological order; The comparison and calculation unit 214 internally includes a first threshold comparator and a second threshold comparator; the first threshold comparator is used to determine whether the current electrical parameter exceeds the first threshold range, and the second threshold comparator is used to determine whether the change trend calculated from historical data exceeds the second threshold. The report generation unit 215 is used to generate corresponding signals when an immediate abnormal alarm or a deterioration trend warning is triggered, and to generate a fault report when the conditions for a complete fault report are met.
[0043] The key matrix 22 consists of multiple keys arranged in rows and columns, such as... Figure 3 As shown; in addition, each button path is connected in series with a corresponding sampling resistor.
[0044] The selector switch 23 is used to sequentially select each button path and transmit the voltage / current signal of the selected path to the ADC module.
[0045] Alarm interface 24 is used to transmit fault reports.
[0046] Figure 4 The diagram shows a circuit diagram of the analog part of a key detection circuit provided in an embodiment of the present invention.
[0047] Figure 5 A block diagram of an automatic pre-detection system for industrial keyboard malfunctions according to the present invention is shown.
[0048] like Figure 5 As shown, a second aspect of the present invention discloses an automatic pre-detection system 5 for industrial keyboard malfunctions, including a memory 51 and a processor 52. The memory includes an automatic pre-detection method program for industrial keyboard malfunctions. When the automatic pre-detection method program for industrial keyboard malfunctions is executed by the processor, it performs the following steps: The first electrical parameters of each button are collected based on a preset time period and stored in the data queue of each button in chronological order. Determine whether the first electrical parameter is within a preset first threshold range; If not located, an immediate abnormal alarm will be triggered and the button number will be located. If it is located, then the most recent preset number of electrical parameter values are extracted from the data queue, and the first trend information is calculated; Determine whether the first trend information exceeds a preset second threshold; If not, maintain or reduce the detection frequency of the corresponding button; If so, a degradation trend warning will be triggered, and the detection frequency of the corresponding button will be increased; After triggering the degradation trend warning, the second electrical parameter is continuously monitored and the second trend information is calculated. If the second trend information continues to exceed the second threshold and the second electrical parameter exceeds the first threshold range, a complete fault report is generated.
[0049] Wherein, the first electrical parameter is the electrical value of each button, such as the initial impedance value; the first trend information is the changing trend of the electrical value of each button; the second electrical parameter is the electrical value of each button after the degradation trend warning is executed, such as the initial impedance value; and the second trend information is the changing trend of the electrical value of each button after the degradation trend warning is executed.
[0050] It should be noted that in this embodiment, the detection microcontroller first applies analog test signals to each key path in the keyboard matrix sequentially according to a preset time period. After the analog test signal passes through the key circuit under test, the analog-to-digital conversion module inside the detection microcontroller synchronously collects the voltage and current responses in the circuit, and calculates the impedance value that reflects the electrical health status of the key, which is used as the first electrical parameter. Each impedance value collected is stored in an independent data queue pre-assigned to that key according to the key number. This data queue adopts a first-in-first-out storage mechanism, retaining only the most recent historical measurement results. Subsequently, the detection microcontroller compares the currently collected impedance value with a preset first threshold range. If the current impedance value is within this range, it indicates that the key has not yet shown a significant fault. Then, it further extracts the most recent historical impedance values from the key's data queue, calculates its trend over time, and obtains the first trend information. If the intensity of this trend exceeds a preset second threshold, it is determined that the key is in the process of performance degradation. At this time, the system immediately triggers a degradation trend warning and automatically increases the subsequent detection frequency of the key to closely track its degradation rate. In the warning state, the system continuously collects the second electrical parameter of the button and calculates its changing trend. If the trend continues to exceed the second threshold and the electrical parameter eventually exceeds the first threshold range, a fault report is generated, including the warning time, the abnormal trigger time, and the complete change sequence. If the trend reverses after the warning and returns to the normal range, the warning is automatically lifted. Through the above pre-inspection implementation process, this embodiment can identify the progressive degradation of the button before it completely fails, thereby achieving predictive maintenance.
[0051] According to an embodiment of the present invention, the step of collecting the first electrical parameters of each button based on a preset time period and storing them in the data queue of each button in chronological order specifically includes: Based on a preset time period, a first test signal is output to the key path under test via a DAC, wherein the first test signal includes at least a sine wave signal; The voltage or current of the key path under test is collected by the ADC connected to the key path under test, and the first electrical parameter is calculated. The second electrical parameter is obtained using the same acquisition method as the first electrical parameter; The data queue is retrieved based on the key number, and the data queue adopts a first-in-first-out storage structure.
[0052] It should be noted that in this embodiment, the digital-to-analog converter (DAC) integrated within the microcontroller outputs a first test signal sequentially to each key path under test according to a set time period. This first test signal is preferably in the form of a sine wave to cover a wider impedance spectrum response. During the application of the test signal, the analog-to-digital converter (ADC) connected to the same key path synchronously starts sampling, acquiring the voltage or current signal on that path to calculate the impedance value of the key in its current state. This impedance value serves as the first electrical parameter. For the second electrical parameter, which is continuously monitored after triggering a degradation trend warning, the same acquisition method as the first electrical parameter is used to ensure data consistency. After acquiring the electrical parameters, the system retrieves a pre-allocated data queue based on the currently scanned key number. This data queue is organized in memory using a first-in, first-out (FIFO) storage structure. Each time new data is written, the oldest data at the head of the queue is automatically discarded, ensuring that the queue always retains the most recent valid historical measurement values.
[0053] According to an embodiment of the present invention, the calculation of the first trend information specifically includes: Extract the electrical parameter values from the data queue that have been most recently preset, and calculate the change between two consecutive electrical parameter values; The average rate of change of the electrical parameters per unit time is determined based on the amount of change. Alternatively, the cumulative offset and offset direction of the electrical parameters can be determined based on the difference between the first and last electrical parameter values in the data queue and the corresponding time span. The average rate of change or the cumulative offset is used as the first trend information.
[0054] It should be noted that, in this embodiment, as an optional implementation, the electrical parameter values of the most recent preset number of times are first extracted from the data queue corresponding to the button. Then, the change between two adjacent electrical parameter values is calculated sequentially according to time order, thereby obtaining a series of differences reflecting the magnitude of successive changes. Based on these differences and the fixed time interval between two adjacent acquisitions, the system further calculates the average rate of change of the electrical parameter per unit time. This rate can intuitively reflect the speed of the degradation process. As another optional implementation, the system can also directly take the electrical parameter values at the beginning and end of the data queue, calculate the absolute value of their difference, and then divide it by the total time span between the beginning and end acquisition points. This yields a total rate of change reflecting the cumulative offset within the entire historical window period, and the sign of the difference can determine whether the offset direction is decreasing or increasing. The average rate of change or cumulative offset calculated above serves as the first trend information described in this method.
[0055] According to an embodiment of the present invention, it includes: The increase in the detection frequency of the corresponding button is specifically achieved by shortening the detection cycle of the button that triggers the degradation trend warning by a preset ratio. The method of maintaining or reducing the detection frequency of the corresponding button is as follows: when the first trend information does not exceed the second threshold in multiple consecutive detections, the detection frequency is restored to the default frequency; when no warning is triggered within a preset time period and the trend information of all buttons is lower than the second threshold, the detection frequency is reduced to below the default frequency.
[0056] It should be noted that in this embodiment, when a key triggers a degradation trend warning, the system increases the detection frequency for that key. Specifically, the subsequent detection cycle is adjusted by a preset shortening ratio, for example, reducing the default detection every second to once every 0.8 seconds, thereby capturing subtle changes in the key's electrical parameters with higher time resolution. When the calculated first trend information for a key does not exceed a preset second threshold in multiple consecutive detections, it indicates that the key's current state is stable. At this time, the system restores the detection frequency for that key to the system's default standard frequency. Furthermore, when the entire keyboard does not trigger any warnings or abnormal alarms for a preset extended period, and the trend information of all keys is significantly lower than a preset lower limit of the second threshold, the system determines that all keys are currently in a highly stable state. At this time, the overall detection frequency can be reduced to below the default frequency, for example, by doubling the detection cycle, to reduce the system's computational load and power consumption. The above frequency adjustment strategy ensures timely fault detection while achieving dynamic optimization of system resources.
[0057] According to an embodiment of the present invention, after triggering a degradation trend warning, the warning trigger time and the first trend information at the time of the warning are recorded; During continuous testing, the second electrical parameters and second trend information for each test are recorded. When the second electrical parameter exceeds the first threshold range, record the abnormal trigger time and the specific range of the threshold range exceeded. The warning trigger time, the abnormality trigger time, the corresponding button number, the trend change sequence after the warning, and the final abnormal value are combined to generate a complete fault report; If, after triggering a degradation trend warning, the second trend information is continuously lower than the second threshold multiple times and the second electrical parameter recovers to the first threshold range, then the warning state of the button is lifted, the default detection frequency is restored, and the warning event is recorded as a recoverable fluctuation.
[0058] It should be noted that in this embodiment, when the system triggers a degradation trend warning based on the first trend information, it immediately records the timestamp of the trigger moment and the value of the first trend information used at the time of triggering, using this information as the starting node of the fault report. Subsequently, in the warning state, the system performs continuous detection on the button. After each acquisition of the second electrical parameter, the second trend information is calculated synchronously, and the time of each detection, the electrical parameter value, and the trend information are recorded sequentially in the buffer. When the detected second electrical parameter exceeds the first threshold range at a certain moment, the system records the abnormal trigger time and the specific direction of exceeding the threshold range, such as whether it is below the lower limit or above the upper limit. After completing the above recording, the system merges and packages the warning trigger time, abnormal trigger time, the corresponding button number, the entire trend change sequence after the warning, and the final abnormal electrical parameter value to generate a complete fault report. At the same time, if after triggering the degradation trend warning, the system detects that the second trend information is below the second threshold multiple times consecutively, and the second electrical parameter also recovers to within the first threshold range, then the abnormal fluctuation of the button is determined to be a recoverable event. At this point, the warning status of the button is deactivated, the detection frequency is restored to the default value, and this warning event is marked as a recoverable fluctuation and recorded in the log, thereby avoiding unnecessary maintenance intervention.
[0059] According to an embodiment of the present invention, it further includes: The keyboard enters learning mode when it is first used or when a calibration command is received. In the learning mode, the reference electrical parameters of each button in the unpressed state are collected, and the first threshold range and the second threshold are automatically set according to the reference electrical parameters of each button. During periodic testing, if no warning or abnormality is triggered for several consecutive tests of all buttons, background calibration will be triggered. In response to the background calibration, the current electrical parameters of each button are reacquired as new reference electrical parameters, and the first threshold range and the second threshold are updated according to the new reference electrical parameters.
[0060] It should be noted that in this embodiment, when the industrial keyboard is first installed and powered on, the system automatically enters learning mode. This mode can also be manually triggered by the user through specific commands. In learning mode, the system requires all keys to be in a non-pressed state, and then sequentially collects the electrical parameters of each key as the reference electrical parameters for that key. Based on the reference values collected for each key, the system automatically sets a first threshold range for each key. For example, a preset tolerance range is extended above and below the reference value as a normal operating range. At the same time, the system also sets a second threshold to determine the sensitivity to abnormal trends. During subsequent normal periodic testing, if the system detects that all keys have not triggered any warnings or abnormal alarms for several consecutive tests, it automatically triggers background calibration. In response to this background calibration event, the system re-collects the electrical parameters of each key under the current environment and operating state as new reference values, and dynamically updates the first threshold range and second threshold for each key based on the new reference values. This self-calibration mechanism can effectively compensate for reference drift caused by long-term key aging or slow environmental changes, thereby maintaining the accuracy of fault detection.
[0061] It is worth mentioning that it also includes: When a button triggers a degradation trend warning, if the direction of change of the second trend information is opposite to the trend direction of the first trend information when the warning was triggered in subsequent consecutive detections, and the strength of the reverse trend exceeds the preset stabilization threshold, then it is determined to be a trend reversal. After determining that a trend reversal has occurred, the deterioration trend warning status of the button will be deactivated, and the default detection frequency will be restored. Mark the data during the warning period in the historical data queue of this button as a fluctuation record, and lower the second threshold of this button.
[0062] It should be noted that in this embodiment, when a button triggers a degradation trend warning, the system continues to perform high-frequency detection on that button and continuously calculates the second trend information and its direction of change obtained from each detection. If the direction of trend change is reversed, for example, from a continuous decline to a continuous rise, the strength value of the reverse trend is further calculated. The system has a preset stabilization threshold to determine whether the reverse trend is sufficient to indicate that the degradation process has stopped and begun to recover. If the strength of the reverse trend exceeds the stabilization threshold, it is determined to be a trend reversal event. After determining that the trend has reversed, the system immediately cancels the degradation trend warning state of that button and restores its detection frequency to the default frequency, thereby avoiding continuous occupation of detection resources due to occasional fluctuations. At the same time, the system marks the electrical parameter data stored in the button's historical data queue during the warning period with a special mark and archives it as a fluctuation record for subsequent analysis. In addition, the system automatically lowers the second threshold of that button, making it less sensitive to similar fluctuations in future detections, thereby reducing redundant warnings caused by repeated recoverable fluctuations of the same button.
[0063] It is worth mentioning that it also includes: Real-time monitoring of temperature and humidity parameters of the keyboard's surrounding environment; When the temperature parameter exceeds the preset upper temperature limit or falls below the preset lower temperature limit, the temperature offset is calculated, and the upper and lower limits of the first threshold interval are widened. When the humidity parameter exceeds the preset humidity threshold, the humidity compensation mode is activated; In response to the humidity compensation mode, the second threshold is increased, and the detection cycle of each button is shortened to a preset ratio of the default cycle. After the environmental parameters return to the normal range, restore the original settings of the first threshold range and the second threshold.
[0064] It should be noted that in this embodiment, the system uses integrated temperature and humidity sensors to collect real-time temperature and humidity parameters of the keyboard's operating environment at preset time intervals. When the detected temperature parameter exceeds the preset maximum operating temperature limit or falls below the preset minimum operating temperature limit, the system dynamically widens the upper and lower limits of the first threshold range for each key based on the offset between the actual temperature and the standard temperature to compensate for the drift of electrical parameter references caused by temperature changes. When the detected humidity parameter exceeds the preset humidity threshold, the system determines that there is a risk of humidity in the current environment and immediately activates the humidity compensation mode. In this compensation mode, the system temporarily increases the value of the second threshold, making the judgment standard for the change trend more lenient, thereby reducing false alarms caused by temporary parameter fluctuations due to humidity. At the same time, the system uniformly shortens the detection cycle of all keys to a preset proportion of the default cycle in order to monitor rapid degradation that may be caused by water ingress or condensation at a higher sampling frequency. When the environmental parameters return to the normal range, the system automatically restores the first threshold range, the second threshold, and the detection frequency to the original settings and records the environmental compensation event in the log.
[0065] It is worth mentioning that it also includes: When multiple keys trigger degradation trend warnings simultaneously within the same scan cycle, extract the coordinate position information of the warning keys in the keyboard matrix. Based on the coordinate information of the warning buttons, determine whether there is an adjacent position relationship; If multiple warning buttons form a continuous adjacent area, a regional fault warning will be generated, and all buttons in the area will be included in the accelerated detection list. If the warning buttons are discretely distributed, each button will maintain its independent warning state; the regional fault warning has a higher priority than the deterioration trend warning of a single button.
[0066] It should be noted that in this embodiment, after completing the detection and judgment of all keys in each scanning cycle, the system collects information on all keys that triggered degradation trend warnings within that cycle. For each warning key, the system extracts its corresponding coordinate position information based on its row and column wiring in the keyboard matrix. Subsequently, the system performs spatial clustering analysis on the coordinates of all warning keys to determine whether there is an adjacent position relationship between them, i.e., whether they share edges or corners. If the analysis results show that multiple warning keys form a continuous adjacent area, such as a two-row, two-column rectangular area or a continuous row and column line segment, the system determines that a regional fault has occurred. At this time, a regional fault warning is generated, and all keys in the adjacent area (including those adjacent keys that have not yet triggered a warning but are in the same area) are included in the accelerated detection list, and the detection frequency of these keys is uniformly increased. If the warning keys are discretely distributed and there is no adjacent relationship between them, the system maintains the independent warning state of each key and does not intervene in other keys. In the above processing, the display priority of regional fault warnings is higher than that of individual key degradation trend warnings, the purpose of which is to remind maintenance personnel to pay attention to regional damage that may be caused by liquid splashes or mechanical impacts.
[0067] A third aspect of the present invention provides a computer-readable storage medium including an automatic pre-detection method program for industrial keyboard failures, wherein when the automatic pre-detection method program for industrial keyboard failures is executed by a processor, it implements the steps of the automatic pre-detection method for industrial keyboard failures as described in any of the preceding claims.
[0068] In summary, this invention provides an automatic pre-detection method, system, and storage medium for industrial keyboard faults. First, electrical parameters of each key are collected and stored in a corresponding data queue according to a preset time period. The current detected value is compared with a first threshold range. If it exceeds the range, an immediate anomaly alarm is triggered, and the faulty key is located. If it is within the range, the trend is calculated based on the data queue. This trend is compared with a second threshold. If it does not exceed the threshold, the detection frequency is maintained or reduced. If it exceeds the threshold, a degradation trend warning is triggered, and the detection frequency for that key is increased. During the warning state, second electrical parameters are continuously collected, and second trend information is calculated. If the trend continuously exceeds the second threshold and the electrical parameters eventually exceed the first threshold range, a complete fault report including the warning and the anomaly time is generated. This invention can identify progressive degradation trends before the key completely fails, effectively improving the predictive maintenance capability and system reliability of industrial keyboards.
[0069] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0070] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. An automatic pre-detection method for industrial keyboard faults, characterized in that, The method includes: The first electrical parameters of each button are collected based on a preset time period and stored in the data queue of each button in chronological order. Determine whether the first electrical parameter is within a preset first threshold range; If not located, an immediate abnormal alarm will be triggered and the button number will be located. If it is located, then the most recent preset number of electrical parameter values are extracted from the data queue, and the first trend information is calculated; Determine whether the first trend information exceeds a preset second threshold; If not, maintain or reduce the detection frequency of the corresponding button; If so, a degradation trend warning will be triggered, and the detection frequency of the corresponding button will be increased; After triggering the degradation trend warning, the second electrical parameter is continuously monitored and the second trend information is calculated. If the second trend information continues to exceed the second threshold and the second electrical parameter exceeds the first threshold range, a complete fault report is generated.
2. The automatic pre-detection method for industrial keyboard faults according to claim 1, characterized in that, The process of collecting the first electrical parameters of each button based on a preset time period and storing them in the data queue of each button in chronological order specifically includes: Based on a preset time period, a first test signal is output to the key path under test via a DAC, wherein the first test signal includes at least a sine wave signal; The voltage or current of the key path under test is collected by the ADC connected to the key path under test, and the first electrical parameter is calculated. The second electrical parameter is obtained using the same acquisition method as the first electrical parameter; The data queue is retrieved based on the key number, and the data queue adopts a first-in-first-out storage structure.
3. The automatic pre-detection method for industrial keyboard faults according to claim 1, characterized in that, The calculation yields the first trend information, specifically including: Extract the electrical parameter values from the data queue that have been most recently preset, and calculate the change between two consecutive electrical parameter values; The average rate of change of the electrical parameters per unit time is determined based on the amount of change. Alternatively, the cumulative offset and offset direction of the electrical parameters can be determined based on the difference between the first and last electrical parameter values in the data queue and the corresponding time span. The average rate of change or the cumulative offset is used as the first trend information.
4. The automatic pre-detection method for industrial keyboard faults according to claim 1, characterized in that, include: The increase in the detection frequency of the corresponding button is specifically achieved by shortening the detection cycle of the button that triggers the degradation trend warning by a preset ratio. The method of maintaining or reducing the detection frequency of the corresponding button is as follows: when the first trend information does not exceed the second threshold in multiple consecutive detections, the detection frequency is restored to the default frequency; when no warning is triggered within a preset time period and the trend information of all buttons is lower than the second threshold, the detection frequency is reduced to below the default frequency.
5. The automatic pre-detection method for industrial keyboard faults according to claim 1, characterized in that, include: After triggering a deterioration trend warning, record the warning trigger time and the first trend information at the time of the warning; During continuous testing, the second electrical parameters and second trend information for each test are recorded. When the second electrical parameter exceeds the first threshold range, record the abnormal trigger time and the specific range of the threshold range exceeded. The warning trigger time, the abnormality trigger time, the corresponding button number, the trend change sequence after the warning, and the final abnormal value are combined to generate a complete fault report; If, after triggering a degradation trend warning, the second trend information is continuously lower than the second threshold multiple times and the second electrical parameter recovers to the first threshold range, then the warning state of the button is lifted, the default detection frequency is restored, and the warning event is recorded as a recoverable fluctuation.
6. The automatic pre-detection method for industrial keyboard faults according to claim 1, characterized in that, Also includes: The keyboard enters learning mode when it is first used or when a calibration command is received. In the learning mode, the reference electrical parameters of each button in the unpressed state are collected, and the first threshold range and the second threshold are automatically set according to the reference electrical parameters of each button. During periodic testing, if no warning or abnormality is triggered for all buttons in several consecutive tests, background calibration will be triggered. In response to the background calibration, the current electrical parameters of each button are reacquired as new reference electrical parameters, and the first threshold range and the second threshold are updated according to the new reference electrical parameters.
7. An automatic pre-detection system for industrial keyboard malfunctions, characterized in that, The system includes a memory and a processor. The memory includes an automatic pre-detection method program for industrial keyboard malfunctions. When the processor executes the automatic pre-detection method program for industrial keyboard malfunctions, it performs the following steps: The first electrical parameters of each button are collected based on a preset time period and stored in the data queue of each button in chronological order. Determine whether the first electrical parameter is within a preset first threshold range; If not located, an immediate abnormal alarm will be triggered and the button number will be located. If it is located, then the most recent preset number of electrical parameter values are extracted from the data queue, and the first trend information is calculated; Determine whether the first trend information exceeds a preset second threshold; If not, maintain or reduce the detection frequency of the corresponding button; If so, a degradation trend warning will be triggered, and the detection frequency of the corresponding button will be increased; After triggering the degradation trend warning, the second electrical parameter is continuously monitored and the second trend information is calculated. If the second trend information continues to exceed the second threshold and the second electrical parameter exceeds the first threshold range, a complete fault report is generated.
8. The automatic pre-detection system for industrial keyboard faults according to claim 7, characterized in that, The process of collecting the first electrical parameters of each button based on a preset time period and storing them in the data queue of each button in chronological order specifically includes: Based on a preset time period, a first test signal is output to the key path under test via a DAC, wherein the first test signal includes at least a sine wave signal; The voltage or current of the key path under test is collected by the ADC connected to the key path under test, and the first electrical parameter is calculated. The second electrical parameter is obtained using the same acquisition method as the first electrical parameter; The data queue is retrieved based on the key number, and the data queue adopts a first-in-first-out storage structure.
9. An automatic pre-detection system for industrial keyboard faults according to claim 7, characterized in that, The calculation yields the first trend information, specifically including: Extract the electrical parameter values from the data queue that have been most recently preset, and calculate the change between two consecutive electrical parameter values; The average rate of change of the electrical parameters per unit time is determined based on the amount of change. Alternatively, the cumulative offset and offset direction of the electrical parameters can be determined based on the difference between the first and last electrical parameter values in the data queue and the corresponding time span. The average rate of change or the cumulative offset is used as the first trend information.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer-readable storage medium includes an automatic pre-detection method program for industrial keyboard malfunctions, which, when executed by a processor, implements the steps of the automatic pre-detection method for industrial keyboard malfunctions as described in any one of claims 1 to 6.