State duration acquisition method and apparatus, computer device, and storage medium

CN116594359BActive Publication Date: 2026-09-11GUANGZHOU MINO AUTOMOTIVE EQUIP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310449634.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-24
Publication Date
2026-09-11
Estimated Expiration
2043-04-24

AI Technical Summary

Technical Problem

总之,目前常用的状态时长确定方法都存在误差较大的问题

Benefits of technology

[0036] In the aforementioned method, apparatus, computer device, and storage medium for obtaining state duration, the terminal can obtain the start and end times of the industrial equipment being in a state to be detected, and obtain the initial state duration of the state to be detected based on the start and end times; then, it can obtain a pre-set standard state duration interval for the state to be detected; and if the initial state duration does not meet the standard state duration interval, it can obtain a pre-set deviation duration for the state to be detected; finally, it can correct the initial state duration based on the deviation duration to obtain the target state duration of the state to be detected. In this embodiment, after obtaining the initial state duration, it can be determined whether the initial state duration meets the standard state duration interval based on the set standard state duration interval, and if the initial state duration does not meet the standard state duration, it can be corrected based on the set deviation duration to obtain the target state duration; the target state duration obtained by this method is more accurate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116594359B_ABST
    Figure CN116594359B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a state duration acquisition method, which comprises the following steps: acquiring the starting time and the ending time of the industrial equipment in a to-be-detected state, and acquiring the initial state duration of the to-be-detected state according to the starting time and the ending time; acquiring a standard state duration interval preset for the to-be-detected state; in the case that the initial state duration does not meet the standard state duration interval, acquiring a deviation duration preset for the to-be-detected state; and correcting the initial state duration according to the deviation duration to obtain the target state duration of the to-be-detected state. In the embodiment of the present application, the initial state duration can be corrected based on the preset standard state duration interval and the preset deviation duration after the initial state duration is acquired, and the target state duration obtained by the method is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of industrial data processing technology, and in particular to a method, apparatus, computer device, and storage medium for obtaining state duration. Background Technology

[0002] During industrial data acquisition, much of the data from various industrial equipment on the production site changes dynamically in real time. In some cases, it is necessary to collect data on the duration of state time, such as equipment switching time, start-stop time, and clamping time, for use in a real-time online data business platform.

[0003] Currently, the raw data duration is typically determined by calculating the duration of a signal point being 1. However, this algorithm itself contains errors because the data acquired by the device itself has inherent inconsistencies, which are then introduced during data acquisition. Another approach is to estimate a standard value. For example, by repeatedly recording the duration of a state cycle, the estimated distribution of these duration data values ​​around a certain integer is used to define that integer as the standard value for the state duration. In summary, currently used methods for determining state duration all suffer from significant errors. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, apparatus, computer equipment, and storage medium for acquiring state duration in data acquisition that can reduce errors and improve accuracy, in order to address the above-mentioned technical problems.

[0005] Firstly, this application provides a method for obtaining state duration. The method includes:

[0006] The start time and end time of the industrial equipment being in the detection state are obtained, and the initial state duration of the detection state is obtained based on the start time and the end time.

[0007] Obtain a pre-defined standard state duration range for the state to be detected;

[0008] If the duration of the initial state does not meet the duration of the standard state, the deviation duration is obtained in advance for the state to be detected.

[0009] The initial state duration is corrected based on the deviation duration to obtain the target state duration of the state to be detected.

[0010] In one embodiment, before obtaining the pre-set standard state duration interval for the state to be detected, the method further includes: obtaining multiple historical durations of the industrial equipment in the state to be detected; obtaining the historical average duration of the industrial equipment in the state to be detected based on the multiple historical durations; obtaining the average deviation duration of the industrial equipment in the state to be detected based on the multiple historical durations; and setting the standard state duration interval for the state to be detected based on the historical average duration and the average deviation duration.

[0011] In one embodiment, obtaining multiple historical durations of the industrial equipment being in the state to be detected includes: obtaining multiple state durations of the industrial equipment being in the state to be detected in multiple cycles; and using the state durations as the historical durations.

[0012] In one embodiment, obtaining the average deviation duration of the industrial equipment in the state to be detected based on the plurality of historical durations includes: obtaining a first duration and a second duration from the plurality of historical durations; the first duration is any one of the plurality of historical durations; the second duration is any other historical duration among the plurality of historical durations excluding the first duration; obtaining the total deviation duration corresponding to the state to be detected based on the deviation between the first duration and each of the second durations; and obtaining the average deviation duration based on the total deviation duration and the number of deviations.

[0013] In one embodiment, obtaining the total deviation duration corresponding to the state to be detected based on the deviations between the first duration and each of the second durations includes: obtaining the duration difference between the first duration and each of the second durations to obtain multiple duration deviations; and determining the sum of the absolute values ​​of the multiple duration deviations as the total deviation duration.

[0014] In one embodiment, setting the standard state duration interval of the state to be detected based on the historical average duration and the average deviation duration includes: determining the difference between the historical average duration and the average deviation duration as the minimum duration threshold of the state to be detected; determining the sum of the historical average duration and the average deviation duration as the maximum duration threshold of the state to be detected; and setting the standard state duration interval according to the minimum duration threshold and the maximum duration threshold.

[0015] In one embodiment, the step of correcting the initial state duration based on the deviation duration to obtain the target state duration of the state to be detected includes: when the initial state duration is less than the minimum duration threshold, determining the sum of the initial state duration and the average deviation duration as the target state duration; and when the initial state duration is greater than the maximum duration threshold, determining the difference between the initial state duration and the average deviation duration as the target state duration.

[0016] Secondly, this application provides a state duration acquisition device. The device includes:

[0017] The first acquisition module is used to acquire the start time and end time of the industrial equipment being in the state to be detected, and to acquire the initial state duration of the state to be detected based on the start time and end time.

[0018] The second acquisition module is used to acquire a standard state duration interval preset for the state to be detected.

[0019] The third acquisition module is used to acquire the deviation duration preset for the state to be detected when the initial state duration does not meet the standard state duration range.

[0020] The correction module is used to correct the initial state duration based on the deviation duration to obtain the target state duration of the state to be detected.

[0021] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0022] The start time and end time of the industrial equipment being in the detection state are obtained, and the initial state duration of the detection state is obtained based on the start time and end time.

[0023] Obtain a pre-defined standard state duration range for the state to be detected;

[0024] If the duration of the initial state does not meet the duration of the standard state, the deviation duration is obtained in advance for the state to be detected.

[0025] The initial state duration is corrected based on the deviation duration to obtain the target state duration of the state to be detected.

[0026] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0027] The start time and end time of the industrial equipment being in the detection state are obtained, and the initial state duration of the detection state is obtained based on the start time and end time.

[0028] Obtain a pre-defined standard state duration range for the state to be detected;

[0029] If the duration of the initial state does not meet the duration of the standard state, the deviation duration is obtained in advance for the state to be detected.

[0030] The initial state duration is corrected based on the deviation duration to obtain the target state duration of the state to be detected.

[0031] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0032] The start time and end time of the industrial equipment being in the detection state are obtained, and the initial state duration of the detection state is obtained based on the start time and end time.

[0033] Obtain a pre-defined standard state duration range for the state to be detected;

[0034] If the duration of the initial state does not meet the duration of the standard state, the deviation duration is obtained in advance for the state to be detected.

[0035] The initial state duration is corrected based on the deviation duration to obtain the target state duration of the state to be detected.

[0036] In the aforementioned method, apparatus, computer device, and storage medium for obtaining state duration, the terminal can obtain the start and end times of the industrial equipment being in a state to be detected, and obtain the initial state duration of the state to be detected based on the start and end times; then, it can obtain a pre-set standard state duration interval for the state to be detected; and if the initial state duration does not meet the standard state duration interval, it can obtain a pre-set deviation duration for the state to be detected; finally, it can correct the initial state duration based on the deviation duration to obtain the target state duration of the state to be detected. In this embodiment, after obtaining the initial state duration, it can be determined whether the initial state duration meets the standard state duration interval based on the set standard state duration interval, and if the initial state duration does not meet the standard state duration, it can be corrected based on the set deviation duration to obtain the target state duration; the target state duration obtained by this method is more accurate. Attached Figure Description

[0037] Figure 1 A flowchart illustrating a method for obtaining state duration provided in an embodiment of this application;

[0038] Figure 2 A schematic diagram of a process for obtaining a pre-set standard state duration interval provided in an embodiment of this application;

[0039] Figure 3 This application provides a schematic flowchart for obtaining the average deviation duration of an industrial device in a state to be tested, as illustrated in an embodiment of the present application.

[0040] Figure 4 A flowchart illustrating a standard state duration interval for a state to be detected, provided for an embodiment of this application;

[0041] Figure 5 This application provides a schematic flowchart for obtaining the target state duration of the state to be detected, as illustrated in an embodiment of the present application.

[0042] Figure 6 A flowchart illustrating another method for obtaining state duration provided in an embodiment of this application;

[0043] Figure 7 A structural block diagram of the status duration acquisition device provided in the embodiments of this application;

[0044] Figure 8 This is an internal structural diagram of a computer device provided in an embodiment of this application. Detailed Implementation

[0045] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit the scope of this application. In one embodiment, such as... Figure 1 As shown, a method for obtaining state duration is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, and to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0046] Step S101: Obtain the start time and end time of the industrial equipment being in the detection state, and obtain the initial state duration of the detection state based on the start time and end time.

[0047] The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc.

[0048] In some possible implementations, the terminal can be an industrial data acquisition terminal, equipped with an industrial data acquisition system. This system may include, but is not limited to, an industrial data monitoring module, an industrial data display module, and an acquisition module. Specifically, the industrial data monitoring module can monitor industrial data corresponding to different signal points of different industrial equipment; the industrial data display module can display industrial data that meets preset conditions on an industrial data monitoring page, which can be displayed on the terminal's screen; and the acquisition module can acquire the industrial data to be displayed, as well as related information such as the data type, the corresponding industrial equipment, and the corresponding signal point.

[0049] In some possible implementations, industrial data that meets preset conditions can be displayed on an industrial data monitoring page, becoming displayed industrial data. Based on this monitoring page, signal identifiers for the displayed industrial data can be obtained. These identifiers can be used to locate the corresponding signal points, and consequently, the corresponding industrial equipment. Industrial equipment refers to machines used in actual industrial production, such as Programmable Logic Controllers (PLCs), robots, and CNC machine tools. An industrial device can include multiple signal points, which can be variables at the device's terminal, including parameters, actions, and states. Each signal point corresponds to a signal identifier, establishing a one-to-one relationship. This identifier represents the mapping between the signal point and the actual industrial process, facilitating rapid location of the corresponding industrial process during anomaly detection, thus enabling more accurate industrial data analysis.

[0050] In this embodiment, the signal point of the industrial equipment can be a variable, which can be in different states. Information about this variable, such as signal identifiers, start times, and end times of the industrial equipment in different states of this variable, can be presented as industrial data and displayed through an industrial data monitoring page. The state to be detected can be one of the different states of this variable, where the start time can be the moment when the industrial equipment transitions from one state to the state to be detected; the end time can be the moment when the industrial equipment transitions from the state to another state. The initial state duration is the uncorrected state duration for the state to be detected; in one possible implementation, the initial state duration can be the time difference between the end time and the start time, used to represent the time the industrial equipment is in the state to be detected.

[0051] Furthermore, in this embodiment, the data type of the variable can include, but is not limited to, Boolean variables and non-Boolean variables. A Boolean variable is a logical variable that can include two states: "0" and "1". A non-Boolean variable can be a continuously changing variable, such as voltage, current, or temperature. Taking a Boolean variable as an example, "1" can be a state of the Boolean variable. The start and end times of state "1" can be obtained through an industrial data monitoring page. In one possible implementation, the time difference between the end time and the start time can be determined as the initial duration of state "1".

[0052] Step S102: Obtain the standard state duration range that is preset for the state to be detected.

[0053] In this embodiment, a standard state duration range for the industrial equipment to be tested can be pre-defined based on the historical duration of the equipment in the tested state. This standard state duration range can represent the standard duration range of the industrial equipment in the tested state and can be used to determine whether the initial state duration needs to be corrected. If the initial state duration is within the standard state duration range, it indicates that the initial state duration meets the preset conditions.

[0054] Step S103: If the initial state duration does not meet the standard state duration range, obtain the deviation duration pre-set for the state to be detected.

[0055] Specifically, if the initial state duration does not meet the standard state duration range, it indicates that the initial state duration does not meet the preset conditions. The preset conditions can be used to characterize whether the initial state duration is within the standard state duration range, to measure the accuracy of the initial state duration, and to determine whether the initial state duration for the state to be detected needs to be corrected. Specifically, if the initial state duration does not meet the standard state duration range, the initial state duration needs to be corrected; if the initial state duration meets the standard state duration range, the initial state duration does not need to be corrected.

[0056] The deviation duration can be used to correct the initial state duration so that the state duration of the state to be detected meets the standard state duration range. In some possible implementations, the deviation duration can be represented by the average deviation duration.

[0057] Step S104: Correct the initial state duration based on the deviation duration to obtain the target state duration of the state to be detected.

[0058] If the initial state duration does not meet the preset conditions, it can be corrected by the deviation duration (e.g., average deviation duration) to obtain the target state duration of the state to be detected. This target state duration is the corrected initial state duration, and it is closer to the true duration. Therefore, the target state duration is the corrected state duration of the state to be detected.

[0059] In the aforementioned method for obtaining state duration, the server can obtain the start and end times of the industrial equipment being in the state to be detected, and obtain the initial state duration based on the start and end times. Then, it can obtain a pre-set standard state duration range for the state to be detected; and if the initial state duration does not meet the standard state duration range, it can obtain a pre-set deviation duration for the state to be detected; finally, it can correct the initial state duration based on the deviation duration to obtain the target state duration for the state to be detected. In this embodiment, after obtaining the initial state duration, it can be corrected based on the set standard state duration range and the set deviation duration, resulting in a more accurate target state duration.

[0060] In some embodiments, such as Figure 2 As shown, obtaining a pre-set standard state duration range may include:

[0061] Step S201: Obtain multiple historical durations of the industrial equipment being in the state of being to be detected, and obtain the historical average duration of the industrial equipment being in the state of being to be detected based on the multiple historical durations.

[0062] In the embodiments of this application, different signal points of different industrial equipment can include multiple cycle periods, and each cycle period can include different states. Taking a Boolean variable as an example, a Boolean variable can include multiple cycle periods, and each cycle period can include two states, "0" and "1". When the state to be detected is state "1", in some possible implementations, the historical duration of the industrial equipment in the state to be detected, i.e., state "1", in multiple historical cycle periods can be obtained.

[0063] The historical average duration is the average of these multiple historical durations. Specifically, it is the quotient of the sum of these multiple historical durations and the number of these multiple historical durations. For details, please refer to the following formula (1):

[0064] ΔT 平 = (ΔT1+ΔT2+ΔT3+…+ΔT) n ) / n (1)

[0065] Step S202: Based on multiple historical durations, obtain the average deviation duration of the industrial equipment in the state to be tested.

[0066] The average deviation duration is the average deviation of multiple historical durations. It can be used to determine the standard state duration interval of the state to be detected, and it can also be used to correct the initial state duration of the state to be detected. The average deviation duration can be one form of the deviation duration in step S103. In some embodiments, the deviation duration can also be characterized in other forms, such as the variance of multiple deviation durations, the standard deviation of multiple deviation durations, etc. This application does not limit this.

[0067] Step S203: Based on the historical average duration and average deviation duration, set the standard state duration range for the state to be detected.

[0068] The aforementioned method for obtaining a pre-defined standard state duration interval can yield a standard interval for the duration of the state to be detected, facilitating further judgment of the accuracy of the initial state duration. If the initial state duration does not meet the preset conditions, a more accurate state duration can be obtained through correction. In some embodiments, obtaining multiple historical durations of industrial equipment in the state to be detected may include:

[0069] Acquire the duration of multiple states of industrial equipment in the state to be detected in multiple cycles; use the duration of each state as the historical duration.

[0070] There is a corresponding relationship between the state duration and the historical duration, and the state duration and the historical duration correspond to each other in the same cycle.

[0071] The method for determining the duration of the multiple states can refer to the method for determining the duration of the initial state in step S101. That is, the duration of each state can be represented by the time difference between the end time and the start time of each state duration. The start time can be the moment when the industrial equipment transitions from one state to the current state; the end time can be the moment when the industrial equipment transitions from the current state to the other state.

[0072] The aforementioned methods for obtaining multiple historical durations can more accurately obtain multiple historical durations, thereby obtaining a standard range for the duration of the state to be detected. This facilitates further judgment on the accuracy of the initial state duration. If the initial state duration does not meet the preset conditions, a more accurate state duration can be obtained through correction.

[0073] In some embodiments, such as Figure 3 As shown, obtaining the average deviation duration of industrial equipment in the inspection state based on multiple historical durations can include:

[0074] Step S301: Obtain the first duration and the second duration from multiple historical durations.

[0075] The first duration is any one of multiple historical durations; the second duration is any other historical duration other than the first duration.

[0076] Step S302: Based on the deviations of the first duration and each of the second durations, obtain the total deviation duration corresponding to the state to be detected.

[0077] The total deviation duration can be the sum of the differences between the second duration and the first duration in multiple historical durations, and can be used to characterize the deviation across multiple historical durations.

[0078] Step S303: Based on the total deviation duration and the number of deviations, the average deviation duration is obtained.

[0079] In some possible implementations, the average deviation duration is the average of the total deviation duration, which can be calculated using the following formula (2):

[0080] Δt 平 =Δt 总 / n-1 (2)

[0081] Where, Δt 平 The average deviation duration, Δt 总 Let n be the total deviation duration, n be the number of historical durations, and (n-1) be the number of deviation durations.

[0082] The method described above for obtaining the average deviation duration facilitates the acquisition of the standard state duration range. Furthermore, if the initial state duration does not meet the standard state duration range, the initial state duration can be corrected using the average deviation duration to obtain a more accurate state duration for the state to be detected.

[0083] In some embodiments, obtaining the total deviation duration corresponding to the state to be detected based on the deviation between the first duration and each of the second durations may include:

[0084] The duration difference between the first duration and each of the second durations is obtained to obtain multiple duration deviations; the sum of the absolute values ​​of the multiple duration deviations is determined as the total deviation duration.

[0085] In some possible implementations, the total deviation duration can be calculated using the following formula (3):

[0086] Δt 总 =[|(Δt2-Δt1)|+|(Δt3-Δt1)|+|(Δt4-Δt1)|+...+|(Δt n -Δt1)|] (3)

[0087] The first duration is any one of multiple historical durations; therefore, in the formula, Δt1 is used as the first duration, and n represents the number of historical durations. n For the nth second duration, Δt 总 The total deviation duration is given by formula (3). The method described above for obtaining the total deviation duration can obtain a more accurate total deviation duration for the duration of the state to be detected, and then the initial state duration can be corrected by the average deviation duration to obtain a more accurate state duration for the state to be detected.

[0088] In some embodiments, such as Figure 4 As shown, based on historical average duration and average deviation duration, the standard state duration range for the state to be detected can include:

[0089] Step S401: Determine the difference between the historical average duration and the average deviation duration as the minimum duration threshold of the state to be detected.

[0090] In one possible implementation, the difference between the historical average duration and the average deviation duration can be determined as the lower limit of the standard state duration interval, which is the minimum duration threshold of the state to be detected. This minimum duration threshold can be used to represent the minimum value of the state duration of the state to be detected.

[0091] Step S402: Determine the sum of the historical average duration and the average deviation duration as the maximum duration threshold of the state to be detected.

[0092] In one possible implementation, the sum of the historical average duration and the average deviation duration can be determined as the upper limit of the standard state duration interval, which is the maximum duration threshold of the state to be detected. This maximum duration threshold can be used to represent the maximum value of the state duration of the state to be detected.

[0093] Step S403: Set the standard state duration range based on the minimum duration threshold and the maximum duration threshold.

[0094] The aforementioned method for obtaining a pre-set standard state duration interval can provide a standard interval for the duration of the state to be detected, which facilitates further judgment on the accuracy of the initial state duration. If the initial state duration does not meet the preset conditions, a more accurate state duration can be obtained through correction.

[0095] In some embodiments, such as Figure 5 As shown, the initial state duration is corrected based on the deviation duration to obtain the target state duration of the state to be detected, which may include:

[0096] Step S501: If the initial state duration is less than the minimum duration threshold, determine the sum of the initial state duration and the average deviation duration as the target state duration.

[0097] If the initial state duration is less than the minimum duration threshold, it indicates that the initial state duration does not meet the standard state duration range. In this case, the initial state duration can be corrected by the average deviation duration. In some possible implementations, the sum of the initial state duration and the average deviation duration can be determined as the target state duration, which is the corrected state duration of the state to be detected.

[0098] Step S502: If the initial state duration is greater than the maximum duration threshold, determine the difference between the initial state duration and the average deviation duration as the target state duration.

[0099] If the initial state duration exceeds the maximum duration threshold, it indicates that the initial state duration does not meet the standard state duration range. In this case, the initial state duration can be corrected by the average deviation duration. In some possible implementations, the difference between the initial state duration and the average deviation duration can be determined as the target state duration, which is the corrected state duration of the state to be detected.

[0100] The method described above for correcting the initial state duration based on the average deviation duration can be used to correct the initial state duration when it does not meet the standard state duration range, thus obtaining a more accurate state duration for the state to be detected.

[0101] In some embodiments, such as Figure 6As shown, another method for obtaining the state duration is provided, which may include:

[0102] Step S601: Obtain the duration of multiple states of the industrial equipment in the state to be detected in multiple cycles, and use the state duration as the historical duration.

[0103] Each state duration can be represented by the time difference between the end time and the start time of each state duration among multiple state durations. The start time can be the moment when the industrial equipment transitions from one state to this state; the end time can be the moment when the industrial equipment transitions from this state to another state. Furthermore, there is a correspondence between state durations and historical durations; the state duration and historical duration correspond within the same cycle. Step S602: Based on multiple historical durations, obtain the historical average duration of the industrial equipment in the state to be detected.

[0104] The historical average duration is the average of these multiple historical durations. Specifically, it is the quotient of the sum of these multiple historical durations and the number of these multiple historical durations. For details, please refer to the following formula (1):

[0105] ΔT 平 = (ΔT1+ΔT2+ΔT3+…+ΔT) n ) / n (1)

[0106] Step S603: Obtain the first duration and the second duration from multiple historical durations.

[0107] The first duration is any one of multiple historical durations; the second duration is any other historical duration other than the first duration.

[0108] Step S604: Obtain the duration difference between the first duration and each second duration to obtain multiple duration deviations, and determine the sum of the absolute values ​​of the multiple duration deviations as the total deviation duration.

[0109] In some possible implementations, the total deviation duration can be calculated using the following formula (3):

[0110] Δt 总 =[|(Δt2-Δt1)|+|(Δt3-Δt1)|+|(Δt4-Δt1)|+...+|(Δt n -Δt1)|] (3)

[0111] The first duration is any one of multiple historical durations; therefore, in the formula, Δt1 is used as the first duration, and n represents the number of historical durations. n For the nth second duration, Δt 总 This represents the total deviation duration.

[0112] The total deviation duration can be the sum of the differences between the second duration and the first duration in multiple historical durations, and can be used to characterize the deviation of multiple historical durations.

[0113] Step S605: Based on the total deviation duration and the number of deviations, the average deviation duration is obtained.

[0114] The average deviation duration is the average of the total deviations across multiple historical durations. In other words, the average deviation duration, being the average of the total deviation durations, can be used to determine the standard state duration interval of the state to be detected, and can also be used to correct the initial state duration of the state to be detected. The average deviation duration can be one form of the deviation duration in step S203. In some embodiments, the deviation duration can also be characterized in other forms, such as the variance of multiple deviation durations, the standard deviation of multiple deviation durations, etc., and this application does not impose any limitations on this.

[0115] In some possible implementations, the average deviation duration is the average of the total deviation duration, which can be calculated using the following formula (2):

[0116] Δt 平 =Δt 总 / n-1 (2)

[0117] Where, Δt 平 The average deviation duration, Δt 总 Let n be the total deviation duration, and (n-1) be the number of deviation durations.

[0118] Step S606: Determine the difference between the historical average duration and the average deviation duration as the minimum duration threshold of the state to be detected.

[0119] In one possible implementation, the difference between the historical average duration and the average deviation duration can be determined as the lower limit of the standard state duration interval, which is the minimum duration threshold of the state to be detected. This minimum duration threshold can be used to represent the minimum value of the state duration of the state to be detected.

[0120] Step S607: Determine the sum of the historical average duration and the average deviation duration as the maximum duration threshold of the state to be detected.

[0121] In one possible implementation, the sum of the historical average duration and the average deviation duration can be determined as the upper limit of the standard state duration interval, which is the maximum duration threshold of the state to be detected. This maximum duration threshold can be used to represent the maximum value of the state duration of the state to be detected.

[0122] Step S608: Set the standard state duration range based on the minimum duration threshold and the maximum duration threshold.

[0123] In this embodiment, a standard state duration range for the industrial equipment in the test state can be pre-set based on the historical duration of the equipment in the test state. This standard state duration range can represent the standard duration range of the industrial equipment in the test state and can be used to determine whether the initial state duration needs to be corrected. If the initial state duration is within the standard state duration range, it indicates that the initial state duration meets the preset conditions. For details on setting the standard state duration range, please refer to the following... Figure 3 The relevant descriptions will not be repeated here.

[0124] Step S609: Obtain the start time and end time of the industrial equipment being in the detection state, and obtain the initial state duration of the detection state based on the start time and end time.

[0125] The start time can be the moment when the industrial equipment transitions from another state to the state to be detected; the end time can be the moment when the industrial equipment transitions from the state to be detected to another state. The initial state duration is the uncorrected state duration for the state to be detected; in one possible implementation, the initial state duration can be the time difference between the end time and the start time, used to represent the time the industrial equipment is in the state to be detected.

[0126] Furthermore, in this embodiment, the data type of the variable can include, but is not limited to, Boolean variables and non-Boolean variables. A Boolean variable is a logical variable that can include two states: "0" and "1". A non-Boolean variable can be a continuously changing variable, such as voltage, current, or temperature. Taking a Boolean variable as an example, "1" can be a state of the Boolean variable. The start and end times of state "1" can be obtained through an industrial data monitoring page. In one possible implementation, the time difference between the end time and the start time can be determined as the initial duration of state "1".

[0127] Step S610: If the initial state duration does not meet the standard state duration range, obtain the deviation duration pre-set for the state to be detected.

[0128] If the initial state duration does not meet the standard state duration range, it indicates that the initial state duration does not meet the preset conditions. The preset conditions can be used to characterize whether the initial state duration is within the standard state duration range, to measure the accuracy of the initial state duration, and to determine whether correction is needed.

[0129] The deviation duration can be used to correct the initial state duration so that the state duration of the state to be detected meets the standard state duration range. In some possible implementations, the deviation duration can be represented by the average deviation duration.

[0130] Step S611: If the initial state duration is less than the minimum duration threshold, determine the sum of the initial state duration and the average deviation duration as the target state duration.

[0131] If the initial state duration does not meet the preset conditions, it can be corrected using the deviation duration, such as the average deviation duration, to obtain the target state duration of the state to be detected. This target state duration is the corrected initial state duration, which is closer to the true duration. Therefore, the target state duration is the corrected state duration of the state to be detected.

[0132] Step S612: If the initial state duration is greater than the maximum duration threshold, determine the difference between the initial state duration and the average deviation duration as the target state duration.

[0133] In the aforementioned method for obtaining state duration, the server can obtain the start and end times of the industrial equipment being in the state to be detected, and obtain the initial state duration based on the start and end times. Then, it can obtain a pre-set standard state duration range for the state to be detected; and if the initial state duration does not meet the standard state duration range, it can obtain a pre-set deviation duration for the state to be detected; finally, it can correct the initial state duration based on the deviation duration to obtain the target state duration for the state to be detected. In this embodiment, after obtaining the initial state duration, it can be corrected based on the set standard state duration range and the set deviation duration, resulting in a more accurate target state duration.

[0134] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0135] Based on the same inventive concept, this application also provides a state duration acquisition device for implementing the state duration acquisition method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more state duration acquisition device embodiments provided below can be found in the limitations of the state duration acquisition method described above, and will not be repeated here.

[0136] In one embodiment, such as Figure 7 As shown, a state duration acquisition device is provided, including: a first acquisition module 710, a second acquisition module 720, a third acquisition module 730, and a correction module 740, wherein:

[0137] The first acquisition module 710 is used to acquire the start time and end time of the industrial equipment being in the state to be detected, and to acquire the initial state duration of the state to be detected based on the start time and end time.

[0138] The second acquisition module 720 is used to acquire a standard state duration range that is preset for the state to be detected.

[0139] The third acquisition module 730 is used to acquire the deviation duration pre-set for the state to be detected when the initial state duration does not meet the standard state duration range.

[0140] The correction module 740 is used to correct the initial state duration based on the deviation duration to obtain the target state duration of the state to be detected.

[0141] The second acquisition module 720 is also used for:

[0142] Obtain multiple historical durations of industrial equipment being in a state awaiting inspection, and based on these multiple historical durations, obtain the historical average duration of industrial equipment being in a state awaiting inspection.

[0143] Based on multiple historical time periods, the average deviation duration of industrial equipment in the state to be tested is obtained;

[0144] Based on historical average duration and average deviation duration, a standard state duration range is set for the state to be detected.

[0145] The second acquisition module 720 is also used for:

[0146] Acquire the duration of multiple states of industrial equipment in the detection state during multiple cycles;

[0147] Use the state duration as the history duration.

[0148] The third acquisition module 730 is also used for:

[0149] From multiple historical durations, obtain the first duration and the second duration; the first duration is any one of the multiple historical durations; the second duration is any other historical duration other than the first duration.

[0150] Based on the deviations of the first duration and each of the second durations, the total deviation duration corresponding to the state to be detected is obtained;

[0151] The average deviation duration is obtained based on the total deviation duration and the number of deviations.

[0152] The third acquisition module 730 is also used for:

[0153] The duration difference between the first duration and each of the second durations is obtained to obtain multiple duration deviations;

[0154] The sum of the absolute values ​​of multiple duration deviations is determined as the total deviation duration.

[0155] The second acquisition module 720 is also used for:

[0156] The difference between the historical average duration and the average deviation duration is determined as the minimum duration threshold for the state to be detected;

[0157] The sum of the historical average duration and the average deviation duration is determined as the maximum duration threshold for the state to be detected;

[0158] The standard state duration range is set based on the minimum and maximum duration thresholds.

[0159] The correction module 740 is also used for:

[0160] If the initial state duration is less than the minimum duration threshold, the sum of the initial state duration and the average deviation duration is determined as the target state duration.

[0161] If the initial state duration is greater than the maximum duration threshold, the difference between the initial state duration and the average deviation duration is determined as the target state duration.

[0162] Each module in the aforementioned status duration acquisition device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0163] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 8As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a defect identification method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.

[0164] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0165] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, performs the following steps:

[0166] Obtain the start and end times of the industrial equipment being in the detection state, and obtain the initial state duration of the detection state based on the start and end times;

[0167] Obtain the pre-defined standard state duration range for the state to be detected;

[0168] If the initial state duration does not meet the standard state duration range, obtain the deviation duration pre-set for the state to be detected;

[0169] The initial state duration is corrected based on the deviation duration to obtain the target state duration of the state to be detected.

[0170] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:

[0171] Obtain the start and end times of the industrial equipment being in the detection state, and obtain the initial state duration of the detection state based on the start and end times;

[0172] Obtain the pre-defined standard state duration range for the state to be detected;

[0173] If the initial state duration does not meet the standard state duration range, obtain the deviation duration pre-set for the state to be detected;

[0174] The initial state duration is corrected based on the deviation duration to obtain the target state duration of the state to be detected.

[0175] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0176] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0177] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0178] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for obtaining state duration, characterized in that, The method includes: For signal points in industrial equipment with Boolean data types, the start time of the transition from the original state of the signal point to the state to be detected, and the end time of the state to be detected are obtained; wherein, the Boolean variable signal point corresponds to a signal identifier, and the signal identifier is used to represent the mapping relationship between the signal point and the actual industrial business. The initial state duration of the state to be detected is obtained based on the start time and the end time. The duration of the industrial equipment in the state to be detected in multiple cycles is obtained as multiple historical durations. Based on the multiple historical durations, the historical average duration of the industrial equipment in the state to be detected is determined. Select any one of the multiple historical durations as the first duration, and determine the other historical durations other than the first duration as the second duration. Obtain the duration difference between the first duration and each of the second durations to obtain multiple duration deviations. Determine the sum of the absolute values ​​of the multiple duration deviations as the total deviation duration. Based on the total deviation duration and the number of deviations, the average deviation duration of the industrial equipment in the state to be detected is obtained; The difference between the historical average duration and the average deviation duration is determined as the minimum duration threshold of the state to be detected, and the sum of the historical average duration and the average deviation duration is determined as the maximum duration threshold of the state to be detected. Based on the minimum duration threshold and the maximum duration threshold, the standard duration range of the state to be detected is set; If the initial state duration does not meet the standard state duration range, the initial state duration is corrected according to the average deviation duration to obtain the target state duration of the state to be detected; wherein, if the initial state duration is less than the minimum duration threshold, the sum of the initial state duration and the average deviation duration is determined as the target state duration; if the initial state duration is greater than the maximum duration threshold, the difference between the initial state duration and the average deviation duration is determined as the target state duration. Based on the signal identifier of the signal point corresponding to the target state duration, the actual industrial business corresponding to the target state duration is determined, and the industrial data corresponding to the actual industrial business is displayed through the industrial data monitoring page.

2. A state duration acquisition device, characterized in that, The device includes: The first acquisition module is used to acquire, for signal points in industrial equipment whose data type is Boolean variable, the start time of the transition from the original state to the state to be detected, and the end time of being in the state to be detected; wherein, the Boolean variable signal point corresponds to a signal identifier, and the signal identifier is used to represent the mapping relationship between the signal point and the actual industrial operation; and to acquire the initial state duration of the state to be detected based on the start time and end time; the second acquisition module is used to acquire multiple state durations of the industrial equipment in the state to be detected in multiple cycles as multiple historical durations, and to determine the historical average duration of the industrial equipment in the state to be detected based on the multiple historical durations; and to select any from the multiple historical durations. A first duration is defined, and other historical durations besides the first duration are defined as second durations. The duration difference between the first duration and each of the second durations is obtained to obtain multiple duration deviations. The sum of the absolute values ​​of the multiple duration deviations is determined as the total deviation duration. Based on the total deviation duration and the number of deviations, the average deviation duration of the industrial equipment in the state to be detected is obtained. The difference between the historical average duration and the average deviation duration is determined as the minimum duration threshold of the state to be detected. The sum of the historical average duration and the average deviation duration is determined as the maximum duration threshold of the state to be detected. According to the minimum duration threshold and the maximum duration threshold, the standard state duration range of the state to be detected is set. The correction module is used to correct the initial state duration based on the average deviation duration when the initial state duration does not meet the standard state duration range, thereby obtaining the target state duration of the state to be detected. Specifically, when the initial state duration is less than the minimum duration threshold, the sum of the initial state duration and the average deviation duration is determined as the target state duration; when the initial state duration is greater than the maximum duration threshold, the difference between the initial state duration and the average deviation duration is determined as the target state duration; based on the signal identifier of the signal point corresponding to the target state duration, the actual industrial business corresponding to the target state duration is determined, and the industrial data corresponding to the actual industrial business is displayed through an industrial data monitoring page.

3. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method of claim 1.

4. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method of claim 1.

5. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method of claim 1.

Citation Information

Patent Citations

  • Equipment operation state monitoring method and device

    CN111414999A

  • Data acquisition time correction method and device, equipment and storage medium

    CN114546027A