Method and device for detecting step length precision of two planes and electronic equipment
By obtaining the current value of the count register and the preset step size value, and calculating the step size accuracy of the two planes, the step size accuracy problem of only detecting a single plane in the existing technology is solved, and synchronous detection and automated monitoring of multi-plane systems are realized , improves the reliability and stability of the system.
Patent Information
- Application Number
- CN202411201573.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-06
AI Technical Summary
The prior art can only perform step-length accuracy detection on a single plane, but cannot detect multiple planes at the same time, resulting in limited step-length accuracy detection capabilities of multi-plane systems.
By obtaining the current count value, preset step size value and current time value of the count registers of the two test planes, the synchronization state between the planes is determined, and the step size accuracy of each plane is calculated. If the accuracy is less than the target threshold, it is judged There is no deviation between planes, so as to detect the step length accuracy of the two planes.
Effective detection of whether the two test planes are kept synchronized and automated step length accuracy monitoring are realized, reducing human intervention and improving the reliability and stability of the system.
Smart Images

Figure CN119094096A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet and communications, and in particular to a method, device and electronic device for detecting step accuracy of two planes. Background Art
[0002] The detection device in the prior art can usually only detect the step length accuracy of a single plane, and the inspection capability is very limited. For a multi-plane system, each plane is responsible for different parts, but they need to work in coordination, and the state information between planes needs to be consistent, including clock synchronization. Therefore, the detection device in the prior art cannot detect the step length accuracy of multiple planes at the same time. Summary of the invention
[0003] The present application provides a method, device and electronic device for detecting step accuracy of two planes, so as to solve the technical problem that only the fixed step accuracy of a single plane can be detected.
[0004] In the first aspect, the present application provides a method for detecting the step accuracy of two planes, including: obtaining a first current count value of a count register of a present test plane, a second current count value of a count register of another test plane, a preset step value and a current time value; determining a synchronization state between the present test plane and the other test plane according to the first current count value and the second current count value; when it is determined that the synchronization state is synchronization, dividing the current time value by the preset step value to obtain an expected step count value; calculating the first step accuracy of the present test plane and the second step accuracy of the other test plane according to the expected step count value, the first current count value and the second current count value; when the first step accuracy and the second step accuracy are respectively less than the target accuracy threshold, determining that there is no deviation between the present test plane and the other test plane.
[0005] In the second aspect, the present application provides a detection device for the step accuracy of two planes, including: an acquisition module, used to acquire a first current count value of a count register of a present test plane, a second current count value of a count register of another test plane, a preset step value and a current time value; a first determination module, used to determine the synchronization state of the present test plane and the other test plane according to the first current count value and the second current count value; a first calculation module, used to divide the current time value by the preset step value to obtain an expected step count value when the synchronization state is determined to be synchronization; a second calculation module, used to calculate the first step accuracy of the present test plane and the second step accuracy of the other test plane according to the expected step count value, the first current count value and the second current count value; a second determination module, used to determine that there is no deviation between the present test plane and the other test plane when the first step accuracy and the second step accuracy are less than a target accuracy threshold.
[0006] As an optional example, the first determination module includes: a first calculation unit, used to perform a difference operation on the first current count value and the second current count value to obtain a deviation count value between the present test plane and the other test plane; a first confirmation unit, used to determine that the synchronization state of the present test plane and the other test plane is synchronized when the deviation count value is less than the target accuracy threshold; and a second confirmation unit, used to determine that the synchronization state of the present test plane and the other test plane is not synchronized when the deviation count value is greater than or equal to the target accuracy threshold.
[0007] As an optional example, the above-mentioned second calculation module includes: a second calculation unit, used to perform a difference operation on the above-mentioned expected step count value and the above-mentioned first current count value to obtain the above-mentioned first step length accuracy; a third calculation unit, used to perform a difference operation on the above-mentioned expected step count value and the above-mentioned second current count value to obtain the above-mentioned second step length accuracy.
[0008] As an optional example, the above-mentioned device also includes: a third determination module, which is used to determine the first step length accuracy and the second step length accuracy of the above-mentioned test plane once every first preset time interval after calculating the first step length accuracy of the above-mentioned test plane and the second step length accuracy of the above-mentioned other test plane according to the above-mentioned expected step length count value, the above-mentioned first current count value and the above-mentioned second current count value, and obtain a first number of deviation results of the above-mentioned test plane and the above-mentioned other test plane according to the above-mentioned first step length accuracy and the above-mentioned second step length accuracy, wherein the above-mentioned deviation results include the existence of deviation and the non-existence of deviation; a statistical module, which is used to count the second number of deviation results of the above-mentioned first number whose deviation results are the existence of deviation; a third calculation module, which is used to divide the above-mentioned second number by the above-mentioned first number to obtain a deviation ratio; a third determination module, which is used to determine that the deviation result of the above-mentioned test plane and the above-mentioned other test plane is that there is no deviation when the above-mentioned deviation ratio is less than the deviation ratio threshold; a fourth determination module, which is used to determine that the deviation result of the above-mentioned test plane and the above-mentioned other test plane is that there is a deviation when the above-mentioned deviation ratio is greater than or equal to the above-mentioned deviation ratio threshold.
[0009] As an optional example, the above-mentioned device also includes: a configuration module, which is used to configure an interrupt threshold and an interrupt count value for the interrupt register after determining that the deviation results of the above-mentioned test plane and the above-mentioned another test plane do not exist when the above-mentioned deviation ratio is less than the deviation ratio threshold, so that the above-mentioned interrupt register starts counting based on the above-mentioned interrupt count value; a fifth determination module, which is used to determine whether the interrupts of the above-mentioned test plane and the above-mentioned another test plane are set when the current count value of the above-mentioned interrupt register is equal to the above-mentioned interrupt threshold; and a first output module, which is used to output interrupt error information after a second preset time length when the interrupt of the above-mentioned test plane or the above-mentioned another test plane is not set.
[0010] As an optional example, the above-mentioned device also includes: a sixth determination module, which is used to determine whether the interruptions of the above-mentioned current test plane and the above-mentioned another test plane are set, and then again determine the deviation results of the above-mentioned current test plane and the above-mentioned another test plane when the interruptions of the above-mentioned current test plane and the above-mentioned another test plane are both set.
[0011] As an optional example, the above-mentioned device also includes: a second output module, which is used to output synchronization error information when it is determined that the synchronization status of the above-mentioned test plane and the above-mentioned other test plane is not synchronized; a third output module, which is used to output deviation error information when it is determined that the deviation result of the above-mentioned test plane and the above-mentioned other test plane is that there is a deviation.
[0012] In a third aspect, the present application provides a storage medium storing a computer program, wherein the computer program executes the above-mentioned two-plane step accuracy detection method when executed by a processor.
[0013] In a fourth aspect, the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-mentioned two-plane step accuracy detection method through the above-mentioned computer program.
[0014] In an embodiment of the present application, a method is adopted for obtaining a first current count value of a count register of the present test plane, a second current count value of a count register of another test plane, a preset step value, and a current time value; determining a synchronization state of the present test plane and the other test plane according to the first current count value and the second current count value; when it is determined that the synchronization state is synchronization, dividing the current time value by the preset step value to obtain an expected step count value; calculating the first step accuracy of the present test plane and the second step accuracy of the other test plane according to the expected step count value, the first current count value, and the second current count value; determining that there is no deviation between the present test plane and the other test plane when the first step accuracy and the second step accuracy are respectively less than the target accuracy threshold, because in the above method, the synchronization state is determined according to the actual count values of the two planes, if the synchronization state of the two planes is synchronization, the step accuracy of each plane is determined according to the expected step count value and the actual count values of the two planes, and finally determining whether there is a deviation between the planes according to the size of the target accuracy threshold and the step accuracy. This achieves the purpose of effectively detecting whether the two test planes are synchronized while realizing automated step accuracy monitoring, reducing human intervention, improving test efficiency, and improving system reliability and stability, thereby solving the technical problem of only being able to detect the fixed step accuracy of a single plane. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0017] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0018] Figure 1 is a flow chart of an optional two-plane step accuracy detection method according to an embodiment of the present application;
[0019] Figure 2 is a schematic structural diagram of an optional two-plane step accuracy detection device according to an embodiment of the present application;
[0020] Figure 3 is a schematic diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0022] The disclosure below provides many different embodiments or examples to realize the different structures of the present application. In order to simplify the disclosure of the present application, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the application can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0023] According to a first aspect of an embodiment of the present application, a method for detecting step accuracy of two planes is provided. Optionally, as follows: Figure 1 As shown, the above method includes:
[0024] S102, obtaining a first current count value of a count register of the current test plane, a second current count value of a count register of another test plane, a preset step value, and a current time value;
[0025] S104, determining a synchronization state between the current test plane and another test plane according to the first current count value and the second current count value;
[0026] S106, when it is determined that the synchronization state is synchronization, dividing the current time value by the preset step value to obtain an expected step count value;
[0027] S108, calculating the first step length accuracy of the current test plane and the second step length accuracy of another test plane according to the expected step length count value, the first current count value and the second current count value;
[0028] S110, when the first step length accuracy and the second step length accuracy are respectively less than the target accuracy threshold, it is determined that there is no deviation between the current test plane and another test plane.
[0029] Optionally, in this embodiment, the first current count value recorded by the count register of the test plane at the current moment, the second current count value recorded by the count register of another test plane at the current moment, the preset step value, which indicates the expected step value of the test plane and the other test plane, and the current time value are obtained. According to the first current count value and the second current count value, the synchronization state of the test plane and the other test plane is judged. The synchronization state means that the count registers of the two test planes should record the same or expected relative value at the same time, which can effectively detect whether the two test planes are synchronized in terms of time and count, and help identify potential synchronization problems in the system. When it is determined that the synchronization state of the test plane and the other test plane is synchronized, the current time value is divided by the preset step value to obtain the expected step count value, that is, at the current moment, the count value that the count registers of the two planes should reach according to the preset step value. The expected step count value is compared with the first current count value to calculate the first step precision of the test plane. The expected step count value is compared with the second current count value to calculate the second step precision of the other test plane. Compare the first step length accuracy and the second step length accuracy with the target accuracy threshold. If both the first step length accuracy and the second step length accuracy are less than the target accuracy threshold, it is determined that there is no significant deviation between the current test plane and the other test plane. If the first step length accuracy or the second step length accuracy is greater than or equal to the target accuracy threshold, it is determined that there is a significant deviation between the current test plane and the other test plane. By calculating the step length accuracy, the counting accuracy of the test plane can be quantified, which helps to ensure the accuracy of the system counter. By setting the target accuracy threshold, the deviation between the test planes can be quickly identified and corrected, thereby improving the reliability and stability of the system.
[0030] Optionally, in this embodiment, the synchronization state is determined according to the actual count values of the two planes. If the synchronization state of the two planes is synchronization, the step length accuracy of each plane is determined according to the expected step length count value and the actual count values of the two planes, and finally, whether the plane has a deviation is determined according to the target accuracy threshold and the size of the step length accuracy. This achieves the purpose of effectively detecting whether the two test planes are synchronized while realizing automated step length accuracy monitoring, reducing human intervention, improving test efficiency, and improving the reliability and stability of the system, thereby solving the technical problem of only being able to detect the fixed step length accuracy of a single plane.
[0031] As an optional example, determining the synchronization state of the test plane and another test plane according to the first current count value and the second current count value includes:
[0032] Performing a difference operation on the first current count value and the second current count value to obtain a deviation count value between the current test plane and another test plane;
[0033] When the deviation count value is less than the target accuracy threshold, determining that the synchronization state of the current test plane and the other test plane is synchronization;
[0034] When the deviation count value is greater than or equal to the target accuracy threshold, it is determined that the synchronization state of the current test plane and another test plane is not synchronized.
[0035] Optionally, in this embodiment, the synchronization state of the two test planes is determined by comparing the current count values of the two test planes. Specifically, the first current count value recorded by the count register of the test plane at the current moment and the second current count value recorded by the count register of the other test plane at the current moment are obtained, and the first current count value and the second current count value are subjected to difference operation to calculate the deviation count value. The deviation count value represents the difference between the count values of the two test planes, that is, the deviation count value = | first current count value - second current count value |. If the deviation count value is less than the target accuracy threshold, the synchronization state of the test plane and the other test plane is determined to be synchronized. The target accuracy threshold is a pre-set allowable error range, indicating the maximum allowable difference between the count values of the two test planes. If the deviation count value is greater than or equal to the target accuracy threshold, the synchronization state of the test plane and the other test plane is determined to be unsynchronized, which means that the difference between the counter values of the two test planes exceeds the allowable range, indicating that they are not synchronized. If they are not synchronized, their synchronization state is detected again after a fixed interval until synchronization is detected, or the number of detections reaches a certain number of times and synchronization is not yet achieved, and a synchronization error message is output.
[0036] Optionally, in this embodiment, a simple difference operation can be used to quickly detect whether the two test planes are synchronized. By setting the target accuracy threshold, the allowable error range can be flexibly controlled to ensure that the system works within the allowable error range, thereby ensuring the reliability of the test results. Automatically judge and manage the synchronization state, reduce human intervention, and improve the automation and work efficiency of the system. By regularly detecting and judging the synchronization state, potential problems can be discovered early, and the system can be prevented from accumulating errors due to asynchrony, thereby improving the overall reliability and stability of the system.
[0037] As an optional example, calculating the first step length accuracy of the test plane and the second step length accuracy of another test plane according to the expected step length count value, the first current count value, and the second current count value includes:
[0038] Perform a difference operation on the expected step length count value and the first current count value to obtain the first step length accuracy;
[0039] A difference operation is performed between the expected step count value and the second current count value to obtain a second step accuracy.
[0040] Optionally, in this embodiment, the counting accuracy of the two test planes is evaluated by calculating the step accuracy of the two test planes. Specifically, the expected step count value and the first current count value are subjected to a difference operation to calculate the first step accuracy. That is, the first step accuracy = | expected step count value - first current count value |, which indicates the difference between the actual count value and the expected count value of the test plane, and reflects the accuracy of the counting of the counting register of the test plane. The expected step count value and the second current count value are subjected to a difference operation to calculate the second step accuracy. That is, the second step accuracy = | expected step count value - second current count value |, which indicates the difference between the actual count value and the expected count value of the other test plane, and reflects the accuracy of the counting of the counting register of the other test plane.
[0041] Optionally, in this embodiment, by calculating the step length accuracy, the counting accuracy of each test plane can be quantified, which helps to understand and evaluate the counting performance of the system. The calculated step length accuracy can help identify and detect errors in the two-plane counting registers, promptly discover and correct counting deviations, and improve the reliability of the system. By continuously monitoring the step length accuracy, the counting performance of the system can be optimized to ensure that the two-plane counting registers operate in an ideal state.
[0042] As an optional example, after calculating the first step length accuracy of the test plane and the second step length accuracy of another test plane according to the expected step length count value, the first current count value, and the second current count value, the method further includes:
[0043] Determine the first step length accuracy and the second step length accuracy once every first preset time interval, and obtain a first number of deviation results of the present test plane and another test plane according to the first step length accuracy and the second step length accuracy, wherein the deviation results include the existence of deviation and the non-existence of deviation;
[0044] Counting the deviation results of the first quantity as the second quantity with deviation;
[0045] Dividing the second quantity by the first quantity to obtain a deviation ratio;
[0046] When the deviation ratio is less than the deviation ratio threshold, it is determined that the deviation result between the current test plane and the other test plane is that there is no deviation;
[0047] When the deviation ratio is greater than or equal to the deviation ratio threshold, it is determined that the deviation result between the present test plane and another test plane is that a deviation exists.
[0048] Optionally, in this embodiment, the deviation is counted by checking the step length accuracy at intervals, and finally determining whether there is a deviation between the two test planes. Specifically, the first step length accuracy and the second step length accuracy are determined once every first preset time interval, and the deviation results of the two planes are determined once according to the first step length accuracy and the second step length accuracy to obtain a first number of deviation results. The deviation results can be deviations or non-deviations. If the step length accuracy exceeds the allowed target accuracy threshold, it means that there is a deviation. If the step length accuracy is within the allowed target accuracy threshold, it means that there is no deviation. In the first number of deviation results, the second number of "deviations" is counted as the deviation result, and the second number is divided by the first number to obtain the deviation ratio, that is, the deviation ratio = the second number / the first number. The deviation ratio indicates how many proportions of the detection results have deviations in all the detection times. When the deviation ratio is less than the deviation ratio threshold, it is determined that the deviation results of the present test plane and the other test plane are non-deviations. When the deviation ratio is greater than or equal to the deviation ratio threshold, it is determined that the deviation results of the present test plane and the other test plane are deviations.
[0049] Optionally, in this embodiment, through interval detection and statistics, the deviations in the system can be identified more accurately to avoid accidental errors caused by one-time detection. Regularly checking the step accuracy and performing statistical analysis on multiple detection results can reflect the performance and stability of the system in long-term operation. The statistical method of the deviation ratio can provide a quantitative indicator of the system deviation, ensure that the system operates within the allowable error range, and improve overall reliability. Based on the deviation ratio threshold, a more informed decision can be made to determine whether the system needs calibration or maintenance.
[0050] As an optional example, when the deviation ratio is less than the deviation ratio threshold, after determining that the deviation result between the test plane and another test plane is that there is no deviation, the method further includes:
[0051] An interrupt threshold and an interrupt count value are configured for the interrupt register so that the interrupt register starts counting based on the interrupt count value;
[0052] When the current count value of the interrupt register is equal to the interrupt threshold, determining whether the interrupts of the current test plane and another test plane are set;
[0053] When the interruption of the present test plane or another test plane is not set, an interruption error message is output after the second preset time period.
[0054] Optionally, in this embodiment, the interrupt threshold is a pre-set value, indicating that the interrupt register will trigger an interrupt when reaching this value, and the interrupt count value is the initial value set to the interrupt register, that is, counting starts from this value. The interrupt register starts counting from the interrupt count value, and when the count reaches the interrupt threshold value, the interrupt condition is met, triggering the interrupt handler or other related operations. After determining that the deviation result of this test plane and another test plane is that there is no deviation, it is started to detect whether the interrupt of this test plane and another test plane can be set normally. Specifically, when the current count value of the interrupt register is equal to the interrupt threshold value, it can be determined that the interrupt has been set, indicating that the system is operating normally under predetermined conditions. If the interrupt is not set in this test plane or another test plane, the system may need to perform error processing or output interrupt error information. The second preset duration is a waiting time for checking whether the interrupt occurs as expected. If the interrupt is still not set after this time, the system will output an interrupt error message.
[0055] Optionally, in this embodiment, by configuring the interruption threshold and count value, the timing of the interruption can be accurately controlled to ensure that the system performs interruption processing under expected conditions. When the interruption does not occur as expected, the system can output interruption error information after a second preset time length to help diagnose the problem and repair it in time. By reasonably configuring the interruption register, the interruption processing flow of the system can be effectively managed to improve the stability and reliability of the system.
[0056] As an optional example, after determining whether the interruption of the current test plane and another test plane is set, the method further includes:
[0057] When the interruptions of the present test plane and the other test plane are both set, the deviation results of the present test plane and the other test plane are determined again.
[0058] Optionally, in this embodiment, when the current count value of the interrupt register is equal to the interrupt threshold, the interrupts of this test plane and another test plane are both set, then it is determined that the interrupts of this test plane and another test plane can be set normally, and the current count values of this test plane and another test plane at the current moment are collected, and the synchronization status and deviation results of this test plane and another test plane are determined again. The specific method for determining the synchronization status and deviation results is detailed in the above embodiment, and will not be repeated here.
[0059] As an optional example, the above method further includes:
[0060] When it is determined that the synchronization state between the test plane and another test plane is not synchronized, output synchronization error information;
[0061] When it is determined that the deviation result between the present test plane and another test plane is a deviation, a deviation error message is output.
[0062] Optionally, in this embodiment, when it is detected that the synchronization state of the test plane and another test plane is not synchronized, the system will output synchronization error information to help diagnose the problem and make timely repairs. When it is determined that the deviation result of the test plane and another test plane is a deviation, the system will output deviation error information to help diagnose the problem and make timely repairs.
[0063] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0064] According to another aspect of the embodiment of the present application, a two-plane step accuracy detection device is also provided. Figure 2 As shown, including:
[0065] An acquisition module 202 is used to acquire a first current count value of a count register of a current test plane, a second current count value of a count register of another test plane, a preset step value, and a current time value;
[0066] A first determination module 204, configured to determine a synchronization state between the current test plane and another test plane according to the first current count value and the second current count value;
[0067] A first calculation module 206 is used to divide the current time value by the preset step value to obtain an expected step count value when the synchronization state is determined to be synchronization;
[0068] A second calculation module 208, configured to calculate the first step length accuracy of the current test plane and the second step length accuracy of another test plane according to the expected step length count value, the first current count value and the second current count value;
[0069] The second determination module 210 is used to determine that there is no deviation between the current test plane and another test plane when the first step length accuracy and the second step length accuracy are respectively less than the target accuracy threshold.
[0070] Optionally, in this embodiment, the first current count value recorded by the count register of the test plane at the current moment, the second current count value recorded by the count register of another test plane at the current moment, the preset step value, which indicates the expected step value of the test plane and the other test plane, and the current time value are obtained. According to the first current count value and the second current count value, the synchronization state of the test plane and the other test plane is judged. The synchronization state means that the count registers of the two test planes should record the same or expected relative value at the same time, which can effectively detect whether the two test planes are synchronized in terms of time and count, and help identify potential synchronization problems in the system. When it is determined that the synchronization state of the test plane and the other test plane is synchronized, the current time value is divided by the preset step value to obtain the expected step count value, that is, at the current moment, the count value that the count registers of the two planes should reach according to the preset step value. The expected step count value is compared with the first current count value to calculate the first step precision of the test plane. The expected step count value is compared with the second current count value to calculate the second step precision of the other test plane. Compare the first step length accuracy and the second step length accuracy with the target accuracy threshold. If both the first step length accuracy and the second step length accuracy are less than the target accuracy threshold, it is determined that there is no significant deviation between the current test plane and the other test plane. If the first step length accuracy or the second step length accuracy is greater than or equal to the target accuracy threshold, it is determined that there is a significant deviation between the current test plane and the other test plane. By calculating the step length accuracy, the counting accuracy of the test plane can be quantified, which helps to ensure the accuracy of the system counter. By setting the target accuracy threshold, the deviation between the test planes can be quickly identified and corrected, thereby improving the reliability and stability of the system.
[0071] Optionally, in this embodiment, the synchronization state is determined according to the actual count values of the two planes. If the synchronization state of the two planes is synchronization, the step length accuracy of each plane is determined according to the expected step length count value and the actual count values of the two planes, and finally, whether the plane has a deviation is determined according to the target accuracy threshold and the size of the step length accuracy. This achieves the purpose of effectively detecting whether the two test planes are synchronized while realizing automated step length accuracy monitoring, reducing human intervention, improving test efficiency, and improving the reliability and stability of the system, thereby solving the technical problem of only being able to detect the fixed step length accuracy of a single plane.
[0072] As an optional example, the first determining module includes:
[0073] A first calculation unit, used for performing a difference operation on the first current count value and the second current count value to obtain a deviation count value between the current test plane and another test plane;
[0074] A first confirmation unit is used to determine that the synchronization state of the current test plane and another test plane is synchronization when the deviation count value is less than the target accuracy threshold;
[0075] The second determining unit is used to determine that the synchronization state between the current test plane and another test plane is not synchronized when the deviation count value is greater than or equal to the target accuracy threshold.
[0076] Optionally, in this embodiment, the synchronization state of the two test planes is determined by comparing the current count values of the two test planes. Specifically, the first current count value recorded by the count register of the test plane at the current moment and the second current count value recorded by the count register of the other test plane at the current moment are obtained, and the first current count value and the second current count value are subjected to difference operation to calculate the deviation count value. The deviation count value represents the difference between the count values of the two test planes, that is, the deviation count value = | first current count value - second current count value |. If the deviation count value is less than the target accuracy threshold, the synchronization state of the test plane and the other test plane is determined to be synchronized. The target accuracy threshold is a pre-set allowable error range, indicating the maximum allowable difference between the count values of the two test planes. If the deviation count value is greater than or equal to the target accuracy threshold, the synchronization state of the test plane and the other test plane is determined to be unsynchronized, which means that the difference between the counter values of the two test planes exceeds the allowable range, indicating that they are not synchronized. If they are not synchronized, their synchronization state is detected again after a fixed interval until synchronization is detected, or the number of detections reaches a certain number of times and synchronization is not yet achieved, and a synchronization error message is output.
[0077] Optionally, in this embodiment, a simple difference operation can be used to quickly detect whether the two test planes are synchronized. By setting the target accuracy threshold, the allowable error range can be flexibly controlled to ensure that the system works within the allowable error range, thereby ensuring the reliability of the test results. Automatically judge and manage the synchronization state, reduce human intervention, and improve the automation and work efficiency of the system. By regularly detecting and judging the synchronization state, potential problems can be discovered early, and the system can be prevented from accumulating errors due to asynchrony, thereby improving the overall reliability and stability of the system.
[0078] As an optional example, the second calculation module includes:
[0079] A second calculation unit is used to perform a difference operation on the expected step length count value and the first current count value to obtain the first step length accuracy;
[0080] The third calculation unit is used to perform a difference operation on the expected step length count value and the second current count value to obtain a second step length accuracy.
[0081] Optionally, in this embodiment, the counting accuracy of the two test planes is evaluated by calculating the step accuracy of the two test planes. Specifically, the expected step count value and the first current count value are subjected to a difference operation to calculate the first step accuracy. That is, the first step accuracy = | expected step count value - first current count value |, which indicates the difference between the actual count value and the expected count value of the test plane, and reflects the accuracy of the counting of the counting register of the test plane. The expected step count value and the second current count value are subjected to a difference operation to calculate the second step accuracy. That is, the second step accuracy = | expected step count value - second current count value |, which indicates the difference between the actual count value and the expected count value of the other test plane, and reflects the accuracy of the counting of the counting register of the other test plane.
[0082] Optionally, in this embodiment, by calculating the step length accuracy, the counting accuracy of each test plane can be quantified, which helps to understand and evaluate the counting performance of the system. The calculated step length accuracy can help identify and detect errors in the two-plane counting registers, promptly discover and correct counting deviations, and improve the reliability of the system. By continuously monitoring the step length accuracy, the counting performance of the system can be optimized to ensure that the two-plane counting registers operate in an ideal state.
[0083] As an optional example, the above device further includes:
[0084] A third determination module is used to determine the first step length accuracy and the second step length accuracy once every first preset time interval after calculating the first step length accuracy of the current test plane and the second step length accuracy of another test plane according to the expected step length count value, the first current count value and the second current count value, and obtain a first number of deviation results of the current test plane and another test plane according to the first step length accuracy and the second step length accuracy, wherein the deviation results include the existence of deviation and the non-existence of deviation;
[0085] A statistical module, used for counting a second number of deviation results having deviations among the first number of deviation results;
[0086] A third calculation module is used to divide the second number by the first number to obtain a deviation ratio;
[0087] A third determination module is used to determine that the deviation result between the current test plane and another test plane is no deviation when the deviation ratio is less than the deviation ratio threshold;
[0088] The fourth determination module is used to determine that the deviation result between the current test plane and another test plane is a deviation when the deviation ratio is greater than or equal to the deviation ratio threshold.
[0089] Optionally, in this embodiment, the deviation is counted by checking the step length accuracy at intervals, and finally determining whether there is a deviation between the two test planes. Specifically, the first step length accuracy and the second step length accuracy are determined once every first preset time interval, and the deviation results of the two planes are determined once according to the first step length accuracy and the second step length accuracy to obtain a first number of deviation results. The deviation results can be deviations or non-deviations. If the step length accuracy exceeds the allowed target accuracy threshold, it means that there is a deviation. If the step length accuracy is within the allowed target accuracy threshold, it means that there is no deviation. In the first number of deviation results, the second number of "deviations" is counted as the deviation result, and the second number is divided by the first number to obtain the deviation ratio, that is, the deviation ratio = the second number / the first number. The deviation ratio indicates how many proportions of the detection results have deviations in all the detection times. When the deviation ratio is less than the deviation ratio threshold, it is determined that the deviation results of the present test plane and the other test plane are non-deviations. When the deviation ratio is greater than or equal to the deviation ratio threshold, it is determined that the deviation results of the present test plane and the other test plane are deviations.
[0090] Optionally, in this embodiment, through interval detection and statistics, the deviations in the system can be identified more accurately to avoid accidental errors caused by one-time detection. Regularly checking the step accuracy and performing statistical analysis on multiple detection results can reflect the performance and stability of the system in long-term operation. The statistical method of the deviation ratio can provide a quantitative indicator of the system deviation, ensure that the system operates within the allowable error range, and improve overall reliability. Based on the deviation ratio threshold, a more informed decision can be made to determine whether the system needs calibration or maintenance.
[0091] As an optional example, the above device further includes:
[0092] A configuration module, configured to configure an interrupt threshold and an interrupt count value for an interrupt register after determining that the deviation result between the test plane and another test plane is that there is no deviation when the deviation ratio is less than the deviation ratio threshold, so that the interrupt register starts counting based on the interrupt count value;
[0093] A fifth determination module, used to determine whether the interrupts of the current test plane and another test plane are set when the current count value of the interrupt register is equal to the interrupt threshold;
[0094] The first output module is used to output interruption error information after a second preset time period when the interruption of the current test plane or another test plane is not set.
[0095] Optionally, in this embodiment, the interrupt threshold is a pre-set value, indicating that the interrupt register will trigger an interrupt when reaching this value, and the interrupt count value is the initial value set to the interrupt register, that is, counting starts from this value. The interrupt register starts counting from the interrupt count value, and when the count reaches the interrupt threshold value, the interrupt condition is met, triggering the interrupt handler or other related operations. After determining that the deviation result of this test plane and another test plane is that there is no deviation, it is started to detect whether the interrupt of this test plane and another test plane can be set normally. Specifically, when the current count value of the interrupt register is equal to the interrupt threshold value, it can be determined that the interrupt has been set, indicating that the system is operating normally under predetermined conditions. If the interrupt is not set in this test plane or another test plane, the system may need to perform error processing or output interrupt error information. The second preset duration is a waiting time for checking whether the interrupt occurs as expected. If the interrupt is still not set after this time, the system will output an interrupt error message.
[0096] Optionally, in this embodiment, by configuring the interruption threshold and count value, the timing of the interruption can be accurately controlled to ensure that the system performs interruption processing under expected conditions. When the interruption does not occur as expected, the system can output interruption error information after a second preset time length to help diagnose the problem and repair it in time. By reasonably configuring the interruption register, the interruption processing flow of the system can be effectively managed to improve the stability and reliability of the system.
[0097] As an optional example, the above device further includes:
[0098] The sixth determination module is used to determine whether the interruption of the current test plane and the other test plane is set, and then re-determine the deviation result of the current test plane and the other test plane when the interruption of the current test plane and the other test plane are both set.
[0099] Optionally, in this embodiment, when the current count value of the interrupt register is equal to the interrupt threshold, the interrupts of this test plane and another test plane are both set, then it is determined that the interrupts of this test plane and another test plane can be set normally, and the current count values of this test plane and another test plane at the current moment are collected, and the synchronization status and deviation results of this test plane and another test plane are determined again. The specific method for determining the synchronization status and deviation results is detailed in the above embodiment, and will not be repeated here.
[0100] As an optional example, the above device further includes:
[0101] A second output module, configured to output synchronization error information when it is determined that the synchronization state between the test plane and another test plane is not synchronized;
[0102] The third output module is used to output deviation error information when it is determined that the deviation result between the current test plane and another test plane is a deviation.
[0103] Optionally, in this embodiment, when it is detected that the synchronization state of the test plane and another test plane is not synchronized, the system will output synchronization error information to help diagnose the problem and make timely repairs. When it is determined that the deviation result of the test plane and another test plane is a deviation, the system will output deviation error information to help diagnose the problem and make timely repairs.
[0104] For other examples of this embodiment, please refer to the above examples and will not be repeated here.
[0105] Figure 3 is a schematic diagram of an optional electronic device according to an embodiment of the present application, such as Figure 3As shown, it includes a processor 302, a communication interface 304, a memory 306 and a communication bus 308, wherein the processor 302, the communication interface 304 and the memory 306 communicate with each other through the communication bus 308, wherein,
[0106] Memory 306, used for storing computer programs;
[0107] The processor 302 is used to implement the following steps when executing the computer program stored in the memory 306:
[0108] Obtaining a first current count value of a count register of the current test plane, a second current count value of a count register of another test plane, a preset step value, and a current time value;
[0109] Determine a synchronization state between the test plane and another test plane according to the first current count value and the second current count value;
[0110] When the synchronization state is determined to be synchronization, a current time value is divided by a preset step value to obtain an expected step count value;
[0111] According to the expected step count value, the first current count value and the second current count value, the first step accuracy of the current test plane and the second step accuracy of another test plane are calculated;
[0112] When the first step length accuracy and the second step length accuracy are respectively less than the target accuracy threshold, it is determined that there is no deviation between the current test plane and another test plane.
[0113] Optionally, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industrial Standard Architecture) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 The communication interface is used for communication between the above electronic device and other devices.
[0114] The memory may include RAM, or may include non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0115] As an example, the memory 306 may include, but is not limited to, the acquisition module 202, the first determination module 204, the first calculation module 206, the second calculation module 208, and the second determination module 210 in the two-plane step accuracy detection device. In addition, other module units in the two-plane step accuracy detection device may also be included but are not limited to, which will not be repeated in this example.
[0116] The above-mentioned processor can be a general-purpose processor, which can include but not be limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signa l Processing), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0117] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0118] It can be understood by those skilled in the art that Figure 3 The structure shown is for illustration only. The device for implementing the above-mentioned two-plane step accuracy detection method may be a terminal device, which may be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Figure 3 The structure of the electronic device is not limited. For example, the electronic device may also include Figure 3 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 3 Different configurations shown.
[0119] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which can include: a flash drive, ROM, RAM, a magnetic disk or an optical disk, etc.
[0120] According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program executes the steps in the above-mentioned two-plane step accuracy detection method when executed by a processor.
[0121] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0122] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0123] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
[0124] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0125] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, 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 units or modules, which can be electrical or other forms.
[0126] 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.
[0127] In addition, each functional unit in each embodiment of the present application 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.
[0128] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for detecting step length accuracy of two planes, characterized in that: include: Obtaining a first current count value of a count register of the current test plane, a second current count value of a count register of another test plane, a preset step value, and a current time value; Determine a synchronization state between the current test plane and the other test plane according to the first current count value and the second current count value; When it is determined that the synchronization state is synchronization, dividing the current time value by the preset step value to obtain an expected step count value; Calculate the first step length accuracy of the current test plane and the second step length accuracy of the other test plane according to the expected step length count value, the first current count value and the second current count value; When the first step length accuracy and the second step length accuracy are respectively less than the target accuracy threshold, it is determined that there is no deviation between the present test plane and the another test plane.
2. The method according to claim 1, characterized in that Determining the synchronization state of the current test plane and the other test plane according to the first current count value and the second current count value includes: Performing a difference operation on the first current count value and the second current count value to obtain a deviation count value between the current test plane and the other test plane; When the deviation count value is less than the target accuracy threshold, determining that the synchronization state of the current test plane and the other test plane is synchronization; When the deviation count value is greater than or equal to the target accuracy threshold, it is determined that the synchronization state of the current test plane and the other test plane is not synchronized.
3. The method according to claim 1, characterized in that The calculating, according to the expected step count value, the first current count value, and the second current count value, to obtain the first step accuracy of the current test plane and the second step accuracy of the other test plane comprises: Performing a difference operation on the expected step length count value and the first current count value to obtain the first step length accuracy; A difference operation is performed on the expected step length count value and the second current count value to obtain the second step length accuracy.
4. The method according to claim 1, characterized in that: After calculating the first step length accuracy of the present test plane and the second step length accuracy of the other test plane according to the expected step length count value, the first current count value, and the second current count value, the method further includes: Determine the first step length accuracy and the second step length accuracy once every first preset time interval, and obtain a first number of deviation results of the present test plane and the other test plane according to the first step length accuracy and the second step length accuracy, wherein the deviation results include the existence of deviation and the non-existence of deviation; Counting the deviation results of the first number as a second number with deviations; Dividing the second number by the first number to obtain a deviation ratio; When the deviation ratio is less than a deviation ratio threshold, determining that the deviation result between the present test plane and the other test plane is that there is no deviation; When the deviation ratio is greater than or equal to the deviation ratio threshold, it is determined that the deviation result between the present test plane and the another test plane is that a deviation exists.
5. The method according to claim 4, characterized in that When the deviation ratio is less than the deviation ratio threshold, after determining that the deviation result between the present test plane and the other test plane is that there is no deviation, the method further includes: Configuring an interrupt threshold and an interrupt count value for an interrupt register so that the interrupt register starts counting based on the interrupt count value; In the case where the current count value of the interrupt register is equal to the interrupt threshold, determining whether the interrupts of the current test plane and the another test plane are set; When the interruption of the present test plane or the another test plane is not set, an interruption error message is output after a second preset time period.
6. The method according to claim 5, characterized in that After determining whether the interrupts of the present test plane and the another test plane are set, the method further includes: In the case where the interruptions of the present test plane and the another test plane are both set, the deviation results of the present test plane and the another test plane are determined again.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: When it is determined that the synchronization state of the present test plane and the another test plane is not synchronized, outputting synchronization error information; When it is determined that the deviation result between the present test plane and the another test plane is a deviation, a deviation error message is output.
8. A two-plane step accuracy detection device, characterized in that: include: An acquisition module, used for acquiring a first current count value of a count register of the current test plane, a second current count value of a count register of another test plane, a preset step value, and a current time value; A first determining module, configured to determine a synchronization state between the current test plane and the other test plane according to the first current count value and the second current count value; A first calculation module is used for, when it is determined that the synchronization state is synchronization, dividing the current time value by the preset step value to obtain an expected step count value; A second calculation module, configured to calculate the first step length accuracy of the present test plane and the second step length accuracy of the other test plane according to the expected step length count value, the first current count value and the second current count value; The second determination module is used to determine that there is no deviation between the current test plane and the other test plane when the first step length accuracy and the second step length accuracy are respectively less than a target accuracy threshold.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is executed.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.
