Smart home system reliability detection method and device, and storage medium
Patent Information
- Application Number
- CN202611178466.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-05
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2046-08-05
AI Technical Summary
[0005]本申请的主要目的在于提供一种智能家居系统的可靠性检测方法、装置及存储介质,旨在解决现有智能家居系统可靠性检测时对设备全链路状态转变监测不准确的技术问题,提高智能家居系统运行可靠性
本申请提出的智能家居系统的可靠性检测方法、装置及存储介质,通过捕获并解析设备调控指令后,确定目标终端设备和目标终端设备的目标状态,进而根据网关设备预置的有限状态机模型确定包含目标终端设备由当前状态向目标状态转换所需经过的全链路期望迁移数据。通过预置的有限状态机模型给出目标终端设备在设备调控指令调控时所需的全链路期望迁移数据,再在向目标终端设备发送设备调控指令的过程中完成对目标终端设备的实时状态数据的实时获取,进而能通过比对实时状态数据和全链路的期望迁移数据,以确定实时状态数据中是否也完整包含目标终端设备由当前状态向目标状态转换所需经过的全链路变化状态,以及从当前状态向目标状态转换时的实时迁移时间是否符合期望迁移时间要求,通过迁移路径和迁移时间的双重校验,得到确定智能家居系统的可靠性检测结果和生成对应的可靠性提示信息。
Smart Images

Figure CN122698478B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of reliability testing technology, and in particular to a reliability testing method, device and storage medium for a smart home system. Background Technology
[0002] With the development of IoT and AI technologies, the structure of smart home systems has become increasingly complex. Existing smart home systems typically include one or more gateway devices, each with multiple heterogeneous protocol sub-devices. These sub-devices use different communication protocols and rely on scene-based linkage rules to invoke each sub-device for automated control. Such smart home systems have extremely high requirements for long-term stability and reliability. If any node in the smart home system experiences an anomaly, the entire system's operational chain will become abnormal, reducing the system's reliability. Therefore, reliability testing of smart home systems is a crucial security technology testing method for maintaining the stable development of smart home systems.
[0003] Existing smart home systems employ standardized finite state transition processes for various smart devices. A device typically transitions from an initial state to a target state through multiple intermediate states, forming a complete state transition chain. For example, a light fixture transitioning from off to on requires a complete chain of state changes: an initial off state, an intermediate on state, and the target on state. However, current smart home reliability testing methods only acquire the initial and target states of the device after the control command is executed. They determine whether the device has completed the control command execution by comparing the initial and target states at a single point—for example, by comparing whether the light fixture ultimately transitions from off to on. This single-point comparison method can only determine if the operation result meets the standard and cannot fully verify state anomalies throughout the entire state transition chain. An anomaly at any state node in the entire state transition chain can easily trigger scene linkage logic disorder, compromising the stability and reliability of the smart home system.
[0004] Therefore, there is an urgent need for a reliability testing method that can monitor the status of devices across the entire chain, in order to help improve the stability and reliability of smart home systems. Summary of the Invention
[0005] The main purpose of this application is to provide a reliability testing method, device and storage medium for smart home systems, aiming to solve the technical problem of inaccurate monitoring of the state transition of the entire device link during the reliability testing of existing smart home systems, and to improve the operational reliability of smart home systems.
[0006] To achieve the above objectives, this application proposes a reliability testing method for a smart home system, the method comprising: Capture device control commands, parse the device control commands, and determine the target terminal device and the target state of the target terminal device; The expected migration data of the target terminal device is determined based on the finite state machine model pre-set in the gateway device; the expected migration data includes the initial steady state, intermediate state, target steady state, and expected migration time. The device control command is sent to the target terminal device so that the target terminal device can complete the transition from the current state to the target state based on the device control command; during the transition process, the status identifier and corresponding timestamp of the target terminal device are continuously captured at a preset sampling frequency, and the captured status identifier and corresponding timestamp are aggregated and processed to obtain the first real-time status data, which includes the current status identifier, intermediate status identifier, target status identifier and real-time migration time. A real-time migration path is constructed based on each status identifier and the corresponding timestamp in the first real-time status data, and an expected migration path is constructed based on each status in the expected migration data. The path deviation value and the first state transition value are obtained by calculating the difference between each state identifier in the real-time migration path and each state in the expected migration path; the timing deviation value is calculated based on the real-time migration time and the expected migration time; the first reliability detection result of the smart home system is determined based on the path deviation value, the first state transition value and the timing deviation value; and the first reliability prompt information is generated based on the first reliability detection result.
[0007] In one embodiment, the step of calculating the difference between each state identifier in the real-time migration path and each state in the desired migration path to obtain a path deviation value includes: The difference between the current state identifier and the initial steady state is calculated to obtain the first sub-path deviation value; The difference between the intermediate state identifier and the intermediate state is calculated to obtain the second sub-path deviation value; The difference between the target state identifier and the target steady state is calculated to obtain the third sub-path deviation value; The path deviation value is obtained based on the first sub-path deviation value, the second sub-path deviation value, and the third sub-path deviation value.
[0008] In one embodiment, the real-time migration time includes: the total real-time migration time; the expected migration time includes: the total expected migration time; Determining the first reliability test result of the smart home system based on the path deviation value, the first state transition value, and the timing deviation value includes: Calculate the first timing deviation factor based on the real-time total migration time and the expected total migration time; The first deviation type coefficient is determined based on the path deviation value, the first state transition value, and the timing deviation value; The first deviation degree is calculated based on the first deviation type coefficient and the first time series deviation factor; The first reliability test result of the smart home system is determined based on the first deviation.
[0009] In one embodiment, the real-time migration time includes: a first-stage real-time migration time and a second-stage real-time migration time; the expected migration time includes: a first-stage expected migration time and a second-stage expected migration time. The step of calculating a timing deviation value based on the real-time migration time and the expected migration time; and determining a first reliability test result of the smart home system based on the path deviation value, the first state transition value, and the timing deviation value, includes: Based on the expected migration time and the real-time migration time of the first stage, calculate the first sub-time series deviation value and the second time series deviation factor. Calculate the second sub-time deviation value and the third time deviation factor based on the expected migration time of the second stage and the real-time migration time of the second stage; Calculate the second state transition value based on the first sub-timing deviation value and the second sub-timing deviation value; The second deviation type coefficient is determined based on the path deviation value, the first state transition value, the second state transition value, and the timing deviation value. The second deviation degree is calculated based on the second deviation type coefficient, the second time series deviation factor, and the third time series deviation factor; The first reliability test result of the smart home system is determined based on the second deviation.
[0010] In one embodiment, after generating the first reliability warning information based on the first reliability detection result, the method further includes: During the process of sending the device control command to the target terminal device so that the target terminal device can complete the transition from the current state to the target state based on the device control command, the real-time capture of the device control command issuance status feedback data, the target terminal device response status feedback data, and the environmental change feedback data of the target terminal device's associated environmental devices; Based on the issued status feedback data, the response status feedback data, and the environmental change feedback data, a second reliability detection result of the smart home system is determined, and a second reliability prompt message is generated based on the second reliability detection result.
[0011] In one embodiment, determining the second reliability test result of the smart home system based on the issued status feedback data, the response status feedback data, and the environmental change feedback data includes: The first link response result is determined based on the issued status feedback data and the response status feedback data; The second link response result is determined based on the response status feedback data and the environmental change feedback data; Based on the first link response result and the second link response result, the second reliability test result of the smart home system is determined.
[0012] In one embodiment, when either the first reliability detection result or the second reliability detection result is abnormal, the method further includes: Based on the device control commands, the smart home system undergoes multi-level anomaly self-healing detection, and an anomaly self-healing report of the smart home system is generated.
[0013] In one embodiment, the step of performing multi-level anomaly self-healing detection on the smart home system based on the device control commands and generating an anomaly self-healing report for the smart home system includes: The device control command is sent to the target terminal device at an exponential interval, the second real-time status data of the target terminal device is captured, and the first-level self-healing anomaly detection result is determined based on the second real-time status data. When the first-level self-healing anomaly detection result is abnormal, the backup control resources of the target terminal device are activated, the device control command is sent based on the backup control resources, the third real-time status data fed back by the backup control resources is captured, and the second-level self-healing anomaly detection result is determined based on the third real-time status data. When the secondary self-healing anomaly detection result is abnormal, the historical fault information of the target terminal device is obtained, the dynamic recovery rate threshold is calculated based on the historical fault information, and the tertiary self-healing anomaly detection result is output based on the dynamic recovery rate threshold. An anomaly self-healing report of the smart home system is generated based on the first-level self-healing anomaly detection results, the second-level self-healing anomaly detection results, and the third-level self-healing anomaly detection results.
[0014] In addition, to achieve the above objectives, this application also proposes a reliability testing device for a smart home system, which includes: a data acquisition module, a desired data determination module, a real-time monitoring module, and a reliability testing module; The data acquisition module is used to capture device control commands, parse the device control commands, and determine the target terminal device and the target state of the target terminal device. The expected data determination module is used to determine the expected migration data of the target terminal device based on the finite state machine model preset in the gateway device; the expected migration data includes the initial steady state, intermediate state, target steady state, and expected migration time; The real-time monitoring module is used to send the device control command to the target terminal device so that the target terminal device can complete the transition from the current state to the target state based on the device control command. During the transition, the module continuously captures the status identifier and corresponding timestamp of the target terminal device at a preset sampling frequency, and integrates and processes the captured status identifier and corresponding timestamp to obtain first real-time status data. The first real-time status data includes the current status identifier, intermediate status identifier, target status identifier, and real-time migration time. The reliability detection module is used to construct a real-time migration path based on each state identifier and its corresponding timestamp in the first real-time status data, and to construct an expected migration path based on each state in the expected migration data; to calculate the difference between each state identifier in the real-time migration path and each state in the expected migration path to obtain a path deviation value and a first state transition value; to calculate a timing deviation value based on the real-time migration time and the expected migration time; to determine a first reliability detection result of the smart home system based on the path deviation value, the first state transition value, and the timing deviation value; and to generate a first reliability prompt message based on the first reliability detection result.
[0015] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the reliability detection method for the smart home system described above.
[0016] One or more technical solutions proposed in this application have at least the following technical effects: The reliability testing method, device, and storage medium for smart home systems proposed in this application, after capturing and parsing device control commands, determine the target terminal device and its target state. Then, based on a pre-set finite state machine model on the gateway device, it determines the expected end-to-end migration data required for the target terminal device to transition from its current state to the target state. The pre-set finite state machine model provides the expected end-to-end migration data required for the target terminal device to be controlled by device control commands. Furthermore, during the process of sending device control commands to the target terminal device, real-time acquisition of the target terminal device's real-time state data is completed. By comparing the real-time state data and the expected end-to-end migration data, it can be determined whether the real-time state data also fully contains the entire range of state changes required for the target terminal device to transition from its current state to the target state, and whether the real-time migration time from the current state to the target state meets the expected migration time requirements. Through dual verification of migration path and migration time, the reliability test result of the smart home system is obtained, and corresponding reliability alerts are generated.
[0017] By introducing a finite state machine model and the migration full-link data including initial steady state, intermediate state, and target steady state, along with the expected migration time, and combining this with the monitoring of real-time state data during device control commands, it is possible to monitor the full-link state changes and the full-link state change time of the target terminal device. Through dual verification of migration path and migration time, the problem of inaccurate device full-link state monitoring during the reliability testing of existing smart home systems is solved, thereby improving the accuracy of smart home system reliability testing and the operational reliability of smart home systems. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a first flowchart illustrating the reliability testing method for the smart home system of this application.
[0021] Figure 2 This is a second flowchart illustrating the first embodiment of the reliability testing method for the smart home system of this application.
[0022] Figure 3This is a flowchart illustrating Embodiment 2 of the reliability testing method for the smart home system of this application.
[0023] Figure 4 This is a schematic diagram of the module structure of the reliability testing device for a smart home system according to an embodiment of this application.
[0024] Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the reliability testing method of the smart home system in this application embodiment.
[0025] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0026] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0027] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0028] The main solution of this application embodiment is: by introducing a finite state machine model and the migration full-link data including the initial steady state, intermediate state, and target steady state, as well as the expected migration time, combined with the monitoring of real-time state data during device control commands, the full-link state change and the full-link state change time of the target terminal device can be monitored. This solves the problem of inaccurate monitoring of the device's full-link state during the reliability testing of existing smart home systems, and improves the accuracy of smart home system reliability testing and the operational reliability of smart home systems.
[0029] In this embodiment, for ease of description, the following description uses an external control device as the execution subject. It should be noted that the external control device can be a computing service device that is independent of the smart home system and has data processing, network communication and program running functions, such as a tablet computer, personal computer, mobile phone, cloud server, etc. It can also be the gateway device of the smart home system. When the gateway device is used as the execution subject, the gateway device needs to be connected to all terminal devices in the smart home system.
[0030] Current smart home reliability testing methods only acquire the initial and target states of the device after the control command is executed. They determine whether the device has completed the control command by comparing the initial and target states at a single point—for example, by comparing whether a light fixture ultimately switches from off to on. This single-point comparison method can only determine if the operation result meets the standard and cannot completely verify anomalies in the entire process of device state changes. An anomaly at any state node in the entire process of device state changes can easily trigger scene linkage logic disorder, compromising the stability and reliability of the smart home system.
[0031] This application provides a solution aimed at addressing the technical problem of inaccurate monitoring of device state transitions across the entire chain during existing smart home system reliability testing, thereby improving the accuracy of smart home system reliability testing and the operational reliability of smart home systems.
[0032] Based on this, embodiments of this application provide a reliability testing method for a smart home system, referring to... Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the reliability testing method for the smart home system of this application.
[0033] In this embodiment, the reliability testing method for the smart home system includes steps S10 to S50: Step S10: Capture device control commands, parse the device control commands, and determine the target terminal device and the target state of the target terminal device; Specifically, the equipment control command is the equipment control command obtained by the external control equipment through user operation. The external control system further analyzes the equipment control command to determine the target terminal equipment to be debugged and the target state to be adjusted in the equipment control command.
[0034] Step S20: Determine the expected migration data of the target terminal device based on the finite state machine model preset in the gateway device; the expected migration data includes the initial steady state, intermediate state, target steady state, and expected migration time; Specifically, by obtaining the pre-set finite state machine model (FMS model) in the gateway device, the expected migration data corresponding to the target terminal device is searched in the finite state machine model based on the target terminal device and the target state of the target terminal device obtained in step S10.
[0035] It should be noted that the expected migration data stores the expected migration data corresponding to the legal transition paths between each state. Each expected migration data includes a time-series state sequence constructed according to a predetermined time order and an expected migration time. Each time-series state sequence includes an initial steady state, an intermediate state, and a target steady state in sequence. The finite state machine model pre-installed in the gateway device needs to be configured in the gateway device before step S10 is executed, based on the type of terminal devices included in the smart home system and the target state. For example, taking a lighting fixture whose target state is the on steady state as an example: the fixture includes an off steady state, an on transition intermediate state, and an on steady state; then the expected migration data corresponding to the lighting fixture needs to be configured with the link of off steady state → on transition intermediate state → on steady state and the corresponding expected migration time.
[0036] Step S30: Send the device control command to the target terminal device so that the target terminal device can complete the transition from the current state to the target state based on the device control command; During the transition process, continuously capture the status identifier and corresponding timestamp of the target terminal device at a preset sampling frequency, integrate and process the captured status identifier and corresponding timestamp to obtain the first real-time status data, which includes the current status identifier, intermediate status identifier, target status identifier and real-time migration time; Specifically, after obtaining the desired migration data of the target terminal device in step S20, a device control command is sent to the target terminal device. Upon receiving the device control command, the target terminal device adjusts its state from the current state at the time the device control command is received to the target state after the device control command is received. Simultaneously, when the target terminal device receives the device control command, the external control device captures the status identifier and corresponding timestamp of the target terminal device through a preset sampling frequency. Based on the corresponding timestamps of each status identifier acquired during the capture process, the status identifiers are integrated to form a status identifier sequence sorted in ascending order of timestamps, such as "current status identifier → intermediate status identifier → target status identifier". Furthermore, based on the timestamps obtained from each status identifier, the real-time migration time in the real-time status data is calculated. Finally, the first real-time status data, containing the status identifier sequence and the real-time migration time, is constructed, providing a real-time monitoring data foundation for reliability testing in subsequent steps.
[0037] For the control process of the target device, for example, the control instruction of the dummy device is to adjust the lamp (the lamp is the target terminal device) in the off steady state to the lamp in the on steady state (the on steady state is the target state). The control instruction is sent to the lamp. When the lamp receives the control instruction, it adjusts the state of the lamp from the current off steady state to the on transition intermediate state and the on steady state according to the control instruction. During the lamp's execution of this series of state changes, the external control device acquires the state identifier of each change process in real time according to the preset sampling frequency, and obtains the state identifier sequence containing the time sequence and the real-time migration time according to the timestamp corresponding to the state identifier, which provides a basis for the subsequent comparison of the first real-time state data and the expected migration data.
[0038] Preferably, ideally, the state identifier sequence in the first real-time state data is in the format of "current state identifier → intermediate state identifier → target state identifier". However, since it is difficult to monitor abrupt changes in intermediate states during actual use, data is usually acquired using a method of high-frequency continuous data acquisition at equal intervals to completely capture transient intermediate states. The acquired high-frequency continuous data at equal intervals is then aggregated to form the state identifier sequence in the first real-time state data in the aforementioned ideal format. This high-frequency continuous data acquisition method can completely capture transient intermediate states, avoid losing intermediate states due to excessively large sampling intervals, and prevent the omission of illegal state transition anomalies.
[0039] Step S40: Construct a real-time migration path based on each status identifier and the corresponding timestamp in the first real-time status data, and construct an expected migration path based on each status in the expected migration data. Specifically, based on the state identifier sequence constructed from each state identifier and its corresponding timestamp in step S30, and combined with the preset migration path format of "current state identifier → intermediate state identifier → target state identifier", the state identifier sequence is converted into a real-time migration path of "current state identifier → intermediate state identifier → target state identifier". Similarly, based on each state in the expected migration data and the time-series state sequence constructed by each state in the expected migration data according to a predetermined time order, the expected migration path "current steady state → intermediate state → target steady state" is constructed.
[0040] Step S50: Calculate the difference between each state identifier in the real-time migration path and each state in the expected migration path to obtain a path deviation value and a first state transition value; calculate a timing deviation value based on the real-time migration time and the expected migration time; determine a first reliability detection result of the smart home system based on the path deviation value, the first state transition value, and the timing deviation value; and generate a first reliability prompt message based on the first reliability detection result.
[0041] In one feasible implementation, step S50, which involves calculating the difference between each state identifier in the real-time migration path and each state in the desired migration path to obtain the path deviation value, may include steps A11-A14: Step A11: Calculate the difference between the current state identifier and the initial steady state to obtain the first sub-path deviation value; Step A12: Calculate the difference between the intermediate state identifier and the intermediate state to obtain the second sub-path deviation value; Step A13: Calculate the difference between the target state identifier and the target steady state to obtain the third sub-path deviation value; Step A14: Obtain the path deviation value based on the first sub-path deviation value, the second sub-path deviation value, and the third sub-path deviation value.
[0042] Specifically, the differences between each state identifier in the real-time migration path and each state in the expected migration path are compared and calculated. This comparison needs to be based on similar state pointers; that is, the current state identifier is compared with the initial steady state, intermediate state identifiers are compared with intermediate states, and the target state identifier is compared with the target steady state to avoid misjudgments caused by comparing state pointers of different types. By calculating the difference between the current state identifier and the initial steady state, a first sub-path deviation value is determined, which indicates whether the target terminal device has undergone a state change in the initial state. Similarly, by calculating the difference between intermediate state identifiers and intermediate states, a second sub-path deviation value is determined, which indicates whether the target terminal device has undergone a state change in the intermediate state. Finally, by calculating the difference between the target state identifier and the target steady state, a third sub-path deviation value is determined, which indicates whether the target terminal device has undergone a state change in the target state. The first sub-path deviation value, the second sub-path deviation value, and the third sub-path deviation value are integrated to determine the path deviation value of the target terminal device. This path deviation value is used to reflect the degree of matching between the real-time migration path and the expected migration path.
[0043] For the calculation of the first state transition value in step S50, the first sub-path deviation value, the second sub-path deviation value, and the third sub-path deviation value are compared with a preset difference threshold. When the sub-path deviation value is greater than the preset difference threshold, the state corresponding to the sub-path deviation value greater than the preset difference threshold is marked as a transition state. The first state transition value is calculated based on the transition states in the real-time migration path. The first state transition value is used to indicate whether a state transition exists in the real-time migration path. State transitions typically occur in intermediate states, but may also occur in the target state when the target terminal device malfunctions. The current state identifier position and the target state identifier position in the real-time migration path are fixed at the beginning and end of the real-time migration path. When an intermediate state identifier is missing due to capture errors, the generated real-time migration path is "state identifier off → empty → state identifier on".
[0044] For the calculation of timing deviation values in step S50, timing deviation analysis can be performed based on the total migration time and multi-stage migration time. The scheme analyzing the total migration time is suitable when the external control device has limited computing power, enabling reliability testing of the smart home system by calculating the total migration time. The multi-stage migration time analysis scheme is suitable when the external control device has even greater computing power, calculating the migration time of each stage and verifying the migration time of each stage, achieving more accurate anomaly analysis compared to analyzing the total migration time.
[0045] For the scheme of analyzing the total migration time, in a feasible implementation, the real-time migration time in step S30 may include: the total real-time migration time; the expected migration time includes: the total expected migration time. When computing power is limited and the accuracy of the total migration time verification needs to be guaranteed, a total time verification process is performed on the real-time migration time and the expected migration time. In this case, step S30 may include steps B11~B14: Step B11: Calculate the first timing deviation factor based on the real-time total migration time and the expected total migration time; Specifically, the difference between the real-time total migration time and the expected total migration time is calculated to obtain the timing deviation value. This timing deviation value reflects whether the overall response speed of the target terminal device is within the normal range. The ratio of the real-time total migration time to the expected total migration time is calculated to obtain the first timing deviation factor. This first timing deviation factor reflects whether the overall response speed of the target terminal device is abnormal.
[0046] Step B12: Determine the first deviation type coefficient based on the path deviation value, the first state transition value, and the first timing deviation value; Specifically, the presence of path deviation, state transition, and timing deviation is determined based on the path deviation value, the first state transition value, and the timing deviation value. Timing deviation reflects an abnormal response speed of the target terminal device and is the least important of the three deviation types. Path deviation reflects that the target terminal device has followed an illegal migration path, which is a migration logic anomaly and is of medium importance among the three deviation types. State transition indicates that the target terminal device skipped the transition to an intermediate state, which is a more serious migration logic anomaly than path deviation and is the most important of the three deviation types. Therefore, when a state transition exists, the coefficient for the first deviation type is 3.0; when there is no state transition but a path deviation exists, the coefficient for the first deviation type is 2.0; and when only timing deviation exists, the coefficient for the first deviation type is 1.0.
[0047] Step B13: Calculate the first deviation degree based on the first deviation type coefficient and the first time series deviation factor; Specifically, the first deviation type coefficient and the first time series deviation factor are substituted into the following first deviation calculation formula to calculate the first deviation.
[0048]
[0049] in, The first deviation degree; The coefficient for the first type of deviation; The first time series deviation factor; The value is 1.5 for the device control command. When the device control command is related to the security of the smart home system, the value is 1.0.
[0050] Step B14: Determine the first reliability test result of the smart home system based on the first deviation.
[0051] Specifically, based on the first deviation calculated in step B13, the first reliability test result of the smart home system is output. When <1.5, the first reliability test result is no abnormality; When the value is ≥1.5, the first reliability test result is that there is an anomaly. When an anomaly is found, the anomaly type is determined by combining the data in the specific calculation process.
[0052] By implementing this optional implementation method, the end-to-end status monitoring scheme can be further refined by analyzing the overall migration time and migration path, thereby achieving comprehensiveness and accuracy in end-to-end status, time and jump status monitoring.
[0053] For the scheme of analyzing multi-stage transition time, in a feasible implementation, the real-time transition time in step S30 may include: the first-stage real-time transition time and the second-stage real-time transition time; the expected transition time may include: the first-stage expected transition time and the second-stage expected transition time. It should be noted that the first-stage real-time transition time is the actual time for transitioning from the current state identifier to the intermediate state identifier, and the second-stage real-time transition time is the actual time for transitioning from the intermediate state identifier to the target state identifier; the first-stage expected transition time is the expected time for transitioning from the initial steady state to the intermediate state, and the second-stage transition time is the expected time for transitioning from the intermediate state to the target steady state.
[0054] When computing power is sufficient and there is a need to improve the accuracy of migration time verification, segmented migration time verification is performed on the real-time migration time and the expected migration time. In this case, step S30 may include steps C11 to C16: Step C11: Calculate the first sub-time series deviation value and the second time series deviation factor based on the expected migration time and the real-time migration time of the first stage. Specifically, the difference between the expected migration time and the actual migration time in the first stage is calculated to determine the first sub-timing deviation value; the ratio of the expected migration time to the actual migration time in the first stage is calculated to determine the second timing deviation factor. Here, the first sub-timing deviation value reflects the timing deviation value of the target terminal device switching from the current state to the intermediate state, and the second timing deviation factor reflects the degree of timing deviation of the target terminal device switching from the current state to the intermediate state.
[0055] Step C12: Calculate the second sub-time deviation value and the third time deviation factor based on the expected migration time of the second stage and the real-time migration time of the second stage; Specifically, the difference between the expected migration time in the second stage and the actual migration time in the second stage is calculated to determine the second sub-timing deviation value; the ratio of the expected migration time in the second stage to the actual migration time in the second stage is calculated to determine the third timing deviation factor. Here, the second sub-timing deviation value is used to reflect the timing deviation value of the target terminal device switching from the intermediate state to the target state, and the third timing deviation factor is used to reflect the degree of timing deviation of the target terminal device switching from the intermediate state to the target state.
[0056] Step C13: Determine the timing deviation value and the second state transition value based on the first sub-timing deviation value and the second sub-timing deviation value; Specifically, the timing deviation value is obtained by calculating the average of the first sub-timing deviation value and the second sub-timing deviation value; by comparing the first sub-timing deviation value and the second sub-timing deviation value with the preset timing deviation value, it is determined whether there is a timing jump when the target terminal device transitions from the current state to the intermediate state, and whether there is a timing jump when transitioning from the intermediate state to the target state. Then, based on the comparison results, the second state jump value representing the stage timing jump is obtained.
[0057] Step C14: Determine the second deviation type coefficient based on the path deviation value, the first state transition value, the second state transition value, and the timing deviation value; Specifically, the existence of a path deviation is determined based on the path deviation value; the existence of a timing state transition is determined based on the second state transition value; the existence of a path state transition is determined based on the first state transition value; and the existence of a timing deviation is determined based on the timing deviation value. When a state transition exists (either a path state transition or a timing state transition), the second deviation type coefficient is set to 3.0; when no state transition exists but a path deviation exists, the second deviation type coefficient is set to 2.0; and when only a timing deviation exists, the second deviation type coefficient is set to 1.0.
[0058] Step C15: Calculate the second deviation degree based on the second deviation type coefficient, the second time series deviation factor, and the third time series deviation factor; Specifically, the average time series deviation factor is determined based on the second time series deviation factor and the third time series deviation factor. The second deviation type coefficient and the average time series deviation factor are then substituted into the following second deviation calculation formula to calculate the second deviation.
[0059]
[0060] in, The second degree of deviation; This is the coefficient for the second type of deviation; This is the average time series deviation factor; The value is 1.5 for the device control command. When the device control command is related to the security of the smart home system, the value is 1.0.
[0061] Step C16: Determine the first reliability test result of the smart home system based on the second deviation.
[0062] Specifically, based on the second deviation calculation result, the first reliability test result of the smart home system is output. When <1.5, the first reliability test result is no abnormality; When the value is ≥1.5, the first reliability test result is that there is an anomaly. When an anomaly is found, the anomaly type is determined by combining the data in the specific calculation process.
[0063] By implementing this optional implementation method, the end-to-end status monitoring scheme can be further refined by analyzing multi-stage migration time and migration path, thereby achieving comprehensive monitoring of end-to-end status, staged migration time and jump status, and further improving the accuracy of reliability detection.
[0064] Finally, a first reliability alert is generated based on the first reliability test result. This first reliability alert is used to indicate the operating status of the target terminal device in the smart home system, and may include abnormal and normal states. By implementing the above embodiment one, through the introduction of a finite state machine model and expected transition data, combined with the monitoring of real-time status data during device control commands, it is possible to monitor the entire link state changes of the target terminal device. This solves the problem of inaccurate monitoring of the entire device state during existing smart home system reliability testing, improving the accuracy of smart home system reliability testing and the overall operational reliability of the smart home system.
[0065] For example, refer to Figure 2 This application provides a first scenario implementation example corresponding to Embodiment 1 (mainly focusing on the total migration time). The pre-configured data for the first scenario includes: a living room LED ceiling light that supports brightness adjustment as the target terminal device; a cloud server as the execution subject of the method in Embodiment 1; the received device control command is "turn on the living room light"; and the expected migration data of the living room LED ceiling light is configured in the finite state machine model, specifically: "off steady state → driving power-on → turning on steady state, expected total migration time 500ms", where the off steady state is the initial steady state, driving power-on is the intermediate state, and the turning on steady state is the target steady state.
[0066] An example of a normal first reliability test result is as follows: The device control command "Turn on the living room light" is captured and parsed, determining the target terminal device to be the living room LED ceiling light, and the target state to be "on". The expected migration data for the living room LED ceiling light is obtained: "Off steady state → Drive power-on → On steady state, expected total migration time 500ms". The device control command "Turn on the living room light" is sent to the living room LED ceiling light. Simultaneously with the sending action, the status identifier of the target terminal device is captured in real time using a high-frequency sampling frequency of once every 20ms. The captured data is shown in Table 1 below. Table 1
[0067] In this context, OFF indicates the off state, DRIVING indicates the driver is powered on, and ON indicates the on state.
[0068] The data captured in the table above is aggregated and processed, merging consecutive identical state identifiers to obtain the real-time migration path "OFF→DRIVING→ON". Based on the timestamp, the total real-time migration time is 500ms. The real-time migration path is compared with the expected migration path. A Boolean value corresponding to the degree of matching is output based on the difference between the OFF and off steady-state states: 0 indicates a match, 1 indicates a mismatch; here, the result is 0. Similarly, a 0 is output based on the difference between DRIVING and the drive power-on state, and a 0 is output based on the difference between ON and the on steady-state state. At this point, the path deviation value can be calculated as 0. Since there is no state transition, the first state transition value is 0.
[0069] The timing deviation value corresponding to the total migration time is |500ms - 500ms| = 0ms, and the resulting first timing deviation factor is 500 / 500 = 1.0. The first deviation type coefficient is 1.0, indicating no anomaly. The first deviation degree is 1.0 × 1.0 × 1.0 (safety weight) = 1.0 < 1.5, and the corresponding first reliability test result is normal.
[0070] For examples where the first reliability test result is an abnormal state, this application provides examples of state transition anomalies and timing anomalies, which are still described using the first scenario setting mentioned above.
[0071] For state transition anomalies, the captured data is shown in Table 2 below: Table 2
[0072] Based on the data in Table 2 above, the real-time migration path is obtained by integrating and setting a preset path format as "OFF→Empty→ON". The real-time migration path "OFF→Empty→ON" is compared with "Steady State Off→Drive Power On→Steady State On". When comparing the intermediate state identifier (identified as empty) with "Drive Power On", the difference is greater than the preset difference threshold (set to DRIVING). At this point, the output is 1. Based on the difference comparison between OFF and the steady state off, the output is 0. Based on the difference comparison between ON and the steady state on, the output is also 0. The path deviation value can be calculated as 1 / 3. Since the intermediate state identifier in the difference comparison result is empty, a state transition exists. The first state transition value is 1 (1 indicates a state transition exists, 0 indicates no state transition exists). Due to the existence of a state transition, the first deviation type coefficient is 3.0. The corresponding timing deviation value is |500ms-500ms|=0ms, and the resulting first timing deviation factor is 500 / 500 = 1.0. The first deviation is 3.0 × 1.0 × 1.0 (safety weight) = 3.0 > 1.5, indicating that the first reliability test result is abnormal. Combined with the intermediate state identifier being empty, the first reliability test result is output as an abnormal state transition.
[0073] For timing anomalies, the captured data is shown in Table 3 below: Table 3
[0074] The data captured in the table above is aggregated and processed, and consecutive identical status identifiers are merged to obtain the real-time migration path "OFF→DRIVING→ON". The total real-time migration time is 2800ms based on the timestamp. The path comparison part in this example is logically the same as the path comparison part in Table 1, and will not be repeated here. The corresponding timing deviation value under the total migration time is |2800ms-500ms|=2300ms, and the resulting first timing deviation factor is 2800 / 500=5.6. The first deviation type coefficient is 1.0 (only timing anomalies exist). The first deviation degree is 1.0×5.6×1.0 (safety weight) = 5.6>1.5, corresponding to the first reliability detection result of an anomaly. Combined with the timing deviation value of 2300ms in the calculation process, and the absence of anomalies in the other path comparison data, the output first reliability detection result is a timing anomaly, and a first reliability warning message indicating a response delay of 2300ms and potential communication congestion is generated.
[0075] This application also provides a second scenario implementation example corresponding to Embodiment 1 (mainly focusing on the multi-stage migration time). The pre-configured data for the second scenario is the same as that for the first scenario, except that the expected migration time includes 200ms for the first stage and 300ms for the second stage. These configuration data will not be repeated here.
[0076] When the first reliability test result is normal, the captured data is shown in Table 1 above. Based on the captured data in Table 1, the data is aggregated and processed, merging consecutive identical state identifiers to obtain the real-time migration path "OFF→DRIVING→ON". According to the timestamps, the actual migration time for the first stage is 200ms, and the actual migration time for the second stage is 300ms. The state transition and path comparison process can be referred to the corresponding example in Table 1, and will not be repeated here. Under the phased time, the corresponding first sub-timing deviation value is |200ms-200ms|=0ms, and the second sub-timing deviation value is |300ms-300ms|=0ms. Based on the first and second sub-timing deviation values, it can be determined that the timing deviation value is 0, meaning there are no state transitions on the path or in the timing sequence; both the first and second state transition values are 0. The obtained second time-series deviation factor = 200 / 200 = 1.0, the third time-series deviation factor = 300 / 300 = 1.0, and the average time-series deviation factor obtained from the second and third time-series deviation factors is 0. The first deviation type coefficient = 1.0, indicating no anomaly. The first deviation degree = 1.0 × 1.0 × 1.0 (safety weight) = 1.0 < 1.5, corresponding to the first reliability test result of no anomaly.
[0077] When the first reliability test result is a timing anomaly, the captured data is shown in Table 4 below: Table 4
[0078] Based on the data captured in Table 4 above, the data is aggregated and processed. Consecutive identical state identifiers are merged to obtain the real-time migration path "OFF→DRIVING→ON". According to the timestamps, the actual migration time for the first stage is 200ms, and the actual migration time for the second stage is 900ms. The state transition and path comparison process can be found in the corresponding example in Table 1, and will not be repeated here. Under the phased time, the first sub-timing deviation value is |200ms-200ms|=0ms, and the second sub-timing deviation value is |900ms-300ms|=600ms. Based on the first and second sub-timing deviation values, the timing deviation value can be determined to be 300ms. There is no state transition on the path, but there is a state transition in the timing sequence. Therefore, the first state transition value is 0, and the second state transition value is 1. The obtained second timing deviation factor = 200 / 200 = 1.0, and the third timing deviation factor = 900 / 300 = 3.0. The average timing deviation factor obtained from the second and third timing deviation factors is 2.0. The first deviation type coefficient = 1.0, indicating a timing anomaly. The first deviation degree = 1.0 × 2.0 × 1.0 (safety weight) = 2.0 > 1.5, corresponding to the first reliability detection result of an anomaly. Combining the above calculations, the first sub-timing deviation value is 0ms, and the second sub-timing deviation value is 600ms, it can be confirmed that a timing anomaly exists, and this timing anomaly occurs in the second stage.
[0079] Based on Embodiment 1 of this application, in Embodiment 2 of this application, the content that is the same as or similar to that in Embodiment 1 can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 After step S50, the reliability testing method for the smart home system further includes steps S01-S02: Step S01: During the process of sending the device control command to the target terminal device so that the target terminal device can complete the transition from the current state to the target state based on the device control command, the real-time capture of the device control command issuance status feedback data, the target terminal device response status feedback data, and the environmental change feedback data of the target terminal device associated with the environmental devices. Specifically, an asynchronous causal determination window is constructed within the external control device. This window includes a control intent layer, a device response layer, an environmental feedback layer, and a delayed reporting mechanism. The delayed reporting mechanism allows data received by the asynchronous causal determination window to occur within a preset delay time, which is dynamically configured based on the target terminal device's device type and historical response latency. During the process of sending the device control command to the target terminal device to enable it to transition from its current state to a target state, the control intent layer captures the real-time feedback data of the device control command's issuance status, the device response layer captures the real-time feedback data of the target terminal device's response status, and the environmental feedback layer captures the real-time feedback data of environmental changes from associated environmental devices of the target terminal device. It should be noted that the issued status feedback data includes the time when the device control command is sent to the target terminal device and the content of the device control command. The response status feedback data includes the time when the target terminal device receives the device control command and the time when it completes the execution of the device control command. The environmental change feedback data includes the environmental status change data and the time of environmental status change recorded by the environmental device associated with the target terminal device after the target terminal device completes the execution of the device control command. For example, if the target terminal device is a lamp and its associated environmental device is a brightness sensor, the brightness sensor receives the brightness change in the environment where the lamp is located and feeds back the brightness change amount and change time as environmental change feedback data to the environmental feedback layer of the external control device. By capturing the issued status feedback data, response status feedback data, and environmental change feedback data in this step, another causal anomaly verification method can be provided on the basis of end-to-end anomaly monitoring, further improving the comprehensiveness of the reliability detection of smart home systems.
[0080] Step S02: Based on the issued status feedback data, the response status feedback data, and the environmental change feedback data, determine the second reliability detection result of the smart home system, and generate a second reliability prompt message based on the second reliability detection result.
[0081] Specifically, based on the issued status feedback data, response status feedback data, and environmental change feedback data, the system determines whether there are any causal relationship anomalies among the control intent layer, device response layer, and environmental feedback layer. Based on these anomalies, it determines the second reliability test result for the smart home system and generates a second reliability alert. This second reliability alert indicates whether there are any causal relationship anomalies in the smart home system.
[0082] In an optional implementation, step S02 may include steps D11-D13: Step D11: Determine the first link response result based on the issued status feedback data and the response status feedback data; Specifically, based on the completeness of the issued status feedback data and the response status feedback data, the first link response result is determined. This first link response result is used to indicate whether the causal relationship between the control intent layer and the device response layer is broken. If the issued status feedback data and the response status feedback data are incomplete, the first link response result indicates that the target terminal device is offline, has not responded to the device control command, or the device control command has been lost.
[0083] Step D12: Determine the second link response result based on the response status feedback data and the environmental change feedback data; Specifically, the second-link response result is determined based on the completeness of the response status feedback data and whether the environmental state change data in the environmental change feedback data has changed. The second-link response result is used to indicate whether the causal relationship between the device response layer and the environmental feedback layer has been broken. When the response status feedback data is incomplete, the second-link response result considers the target terminal device to be offline or not responding to the device control command. When the environmental state change data in the environmental change feedback data has not changed, it is considered that after the target terminal device receives and processes the device control command, the environment has not changed as expected. In this case, the second-link response result also considers the target terminal device to be offline or not responding to the device control command.
[0084] Step D13: Determine the second reliability test result of the smart home system based on the first link response result and the second link response result.
[0085] By integrating the first and second link response results, a comprehensive second reliability test result for the smart home system is generated, which is used to provide feedback on whether there are any causal relationship anomalies in the smart home system. By implementing this optional implementation method, reliability testing of three layers of causal relationships in the smart home system can be achieved, further monitoring the state changes and responses of target terminal devices, thereby improving the comprehensiveness and accuracy of the smart home system reliability test.
[0086] For example, this application provides a second scenario implementation example corresponding to Embodiment 2. In the second scenario example, the living room light fixture is used as the target terminal device, the living room light sensor is used as the associated environmental device, and the preset delay time of the asynchronous causal determination window is set to 3 seconds. An example of the second reliability detection result being a normal causal relationship is as follows: The control intent layer records the issued status feedback data: the instruction "turn_on" is issued, and the instruction issuance time T0 = 10:00:00.000; the device response layer captures the response status feedback data in real time: whether the living room light fixture receives the issued instruction, the time of receiving the issued instruction T1 = 10:00:00.000, whether the living room light fixture completes the execution of the issued instruction, and the time of completing the execution of the issued instruction T2 = 10:00:00.500; the living room light sensor collects and uploads environmental change feedback data, including: brightness change data from 50 lux to 320 lux and brightness change time T3 = 10:00:00.500. Assuming the sent status feedback data and response status feedback data are complete in the above data, the first link response result is complete, and the causal relationship between issuing and executing commands is normal. Assuming the sent status feedback data is complete but the response status feedback data lacks feedback on the completion of the issued command and the time T2, the first link response result is incomplete, and the living room light sensor did not respond after the command was issued. Assuming the response status feedback data and environmental change feedback data are complete, and T2 and T3 are the same or have a difference of less than 3 seconds, the second link response result is considered complete, and the causal relationship between executing commands and their results is normal. Assuming the brightness change data in the environmental change feedback data is an adjustment from 50 lux to 50 lux, and the response status feedback data is complete, it indicates that the living room light fixture executed the device command but did not reach the actual target state. In this case, there may be a device malfunction, and the second link response result is determined to be incomplete, and the causal relationship between executing commands and their results is abnormal. Combining the causal judgments of the two stages yields a judgment result containing a complete three-layer causal link, outputting the second reliability detection result of the smart home system.
[0087] Based on Embodiments 1 and 2 of this application, in Embodiment 3 of this application, the content that is the same as or similar to Embodiments 1 and 2 above can be referred to the above description, and will not be repeated hereafter. On this basis, after step S02, when the first reliability test result is abnormal or the second reliability test result is abnormal, the reliability test method of the smart home system further includes step S101: Step S101: Based on the device control command, perform multi-level anomaly self-healing detection on the smart home system and generate an anomaly self-healing report for the smart home system.
[0088] Specifically, based on device control commands, the system performs multi-level anomaly self-healing detection on the smart home system, outputs the detection results of each level of anomaly self-healing detection, and then outputs a structured anomaly self-healing report based on the detection results of each level of anomaly self-healing detection to provide fault analysis and maintenance tracing for the smart home system, thereby assisting in the stable operation of the smart home system.
[0089] In an optional embodiment, step S101 may include steps E11 to E15: Step E11: Send the device control command to the target terminal device based on the exponential interval time, capture the second real-time status data of the target terminal device, and determine the first-level self-healing anomaly detection result based on the second real-time status data; Specifically, based on exponential intervals, such as 1s, 2s, and 4s, device control commands are sent to the target terminal device. Each time a device control command is sent to the target terminal device, the second real-time status data of the target terminal device after the command is sent is acquired in real time. This second real-time status data is combined with the target terminal device's expected migration data to output a new anomaly detection result. The number of normal and abnormal anomaly detection results after the device control command is sent is determined based on these results. A first-level self-healing anomaly detection result is generated based on the number of normal and abnormal anomaly detection results and the overall anomaly detection results.
[0090] This step tests whether the abnormality in the smart home system is due to signal or network issues or delays in the target terminal device when receiving device control commands.
[0091] Step E12: When the first-level self-healing anomaly detection result is abnormal, the backup control resources of the target terminal device are activated, the device control command is sent based on the backup control resources, the third real-time status data fed back by the backup control resources is captured, and the second-level self-healing anomaly detection result is determined based on the third real-time status data. Specifically, the backup control resources for the target terminal device include a backup terminal device that is identical to the target terminal device and a backup communication link for the target terminal device. If an anomaly is still detected in the first-level self-healing anomaly detection result obtained after exponential interval detection, it is necessary to consider whether there is an anomaly in the target terminal device itself or in the target terminal device's communication link. In this case, the backup communication link of the target terminal device is first activated, and the device control command is transmitted to the target terminal device through the backup communication link. At the same time, the third real-time status data of the target terminal device is collected, and the third real-time status data is compared with the expected migration data to determine whether the anomaly still exists after adjusting to the backup communication link. After completing the communication link detection, the target terminal device is shut down, and the backup terminal device of the target terminal device is activated. The device control command is transmitted to the target terminal device based on the communication link corresponding to the original target terminal device, and the third real-time status data of the target terminal device is collected. At the same time, the third real-time status data is compared with the expected migration data to determine whether the anomaly still exists after adjusting to the backup terminal device. The anomaly detection results corresponding to the two backup control resources are integrated to obtain the second-level self-healing anomaly detection result.
[0092] Step E13: When the secondary self-healing anomaly detection result is abnormal, obtain the historical fault information of the target terminal device, calculate the dynamic recovery rate threshold based on the historical fault information, and output the tertiary self-healing anomaly detection result based on the dynamic recovery rate threshold. Specifically, if the level 2 self-healing anomaly detection result still shows anomalies, it is considered that the target terminal device itself or the communication link has a serious anomaly. In this case, it is necessary to obtain the historical fault information of the target terminal device. Historical fault information can include the number of faults in the past 30 days. The historical health of the target terminal device is determined based on this information. The criticality of the target terminal device is then determined. For example, the number of faults in the past 30 days: 0 times = 1.0, 1-2 times = 0.9, 3 times or more = 0.8; when the target terminal device is a door lock or gas valve, the criticality value is 0.7; when the target terminal device is lighting or air conditioning, the criticality value is 0.9; when the target terminal device is any other device, the criticality value is 1.0. The dynamic recovery rate threshold is calculated based on the criticality and historical health. The formula for calculating the dynamic recovery rate threshold is as follows:
[0093] in, The dynamic recovery rate threshold; For historical health status; It is of critical importance.
[0094] The dynamic recovery rate threshold is output as the result of the Level 3 self-healing anomaly detection.
[0095] Step E14: Generate an anomaly self-healing report for the smart home system based on the first-level self-healing anomaly detection results, the second-level self-healing anomaly detection results, and the third-level self-healing anomaly detection results.
[0096] Specifically, the actual recovery rate of the target terminal device is calculated based on the results of the Level 1 and Level 2 self-healing anomaly detections. The formula for calculating the actual recovery rate is as follows:
[0097] in, This represents the actual recovery rate. This refers to the number of tests where the abnormal result in the Level 1 self-healing abnormality detection results was normal. This represents the number of tests where the abnormal results in the Level 2 self-healing anomaly detection results were normal. This represents the total number of tests conducted for both Level 1 and Level 2 self-healing anomaly detection results.
[0098] Determine whether the actual recovery rate is greater than or equal to the dynamic recovery rate threshold in the Level 3 self-healing anomaly detection results. If yes, mark the self-healing detection of the target terminal device as compliant; otherwise, mark the self-healing detection result of the target terminal device as compliant. Generate a structured anomaly self-healing report based on the self-healing detection results, Level 1 self-healing anomaly detection results, Level 2 self-healing anomaly detection results, and Level 3 self-healing anomaly detection results.
[0099] By implementing this optional implementation method, when an anomaly is found in the first reliability test result of Embodiment 1 or the second reliability test result of Embodiment 2 in the smart home system, multi-level self-healing anomaly detection can be performed to assess the severity of the anomaly, and an anomaly self-healing report can be output to assist in the anomaly investigation in Embodiments 1 and 2, thereby further improving the stable operation and reliability of the smart home system.
[0100] For example, this application provides an embodiment description corresponding to Embodiment 3, setting the abnormal self-healing scenario as the existence of a device response abnormality in the second reliability detection result of the second scenario described above, that is, the living room lighting response abnormality.
[0101] At this point, the first level of self-healing is executed first. Equipment control commands are sent to the living room lights at exponential intervals of 1s, 2s, and 4s, respectively, to obtain the second real-time status data as shown in Table 5 below: Table 5
[0102] Based on the data in Table 5 above, the Level 1 self-healing anomaly detection results show that 1 out of 3 retries were normal, indicating that the problem was caused by momentary network jitter. The actual recovery rate is 1 / 3 = 33.3%.
[0103] If the detection result in the third round of the above execution is also abnormal (no response), perform level two self-healing. Switch to backup resources to perform level two self-healing detection. Enable the backup communication link, for example, switch to the Zigbee link and send turn_on. If the detection result is abnormal (no response), it is determined that the device's lack of response is not due to a communication link abnormality. At this time, switch back to the original communication link, enable the backup terminal device, for example, enable the backup light light_001_backup, send turn_on to the backup light, and if the detection result is normal, it can be determined that the abnormality is in the living room lighting equipment itself, corresponding to a level two actual response rate of (1+1) / (3+2) = 40%.
[0104] If the detection result obtained by the backup terminal device in the above execution results is also abnormal (no response), execute Level 3 self-healing. Obtain historical fault information of the living room light fixture (2 faults in the past 30 days), and calculate the historical health score as 0.9. The device type is lighting, non-critical equipment, and the criticality score is 0.9. Calculate the dynamic recovery rate threshold = 0.9 × 0.9 = 0.81. The actual recovery rate is 40% < the dynamic recovery rate threshold of 81%, so the self-healing detection result of the living room light fixture is considered substandard. Generate an abnormal self-healing report containing: terminal device is living room light fixture, abnormal type is device no response, Level 1 self-healing: 3 retries, 1 successful (network jitter); Level 2 self-healing: communication link switching failed, backup device switching successful; Level 3 self-healing: actual recovery rate 40% < threshold 81%; Conclusion: device self-healing capability is substandard, manual inspection is recommended.
[0105] This application also provides an apparatus, please refer to Figure 4 The reliability testing device for the smart home system includes: a data acquisition module 10, a desired data determination module 20, a real-time monitoring module 30, and a reliability testing module 40. The data acquisition module 10 is used to capture device control commands, parse the device control commands, and determine the target terminal device and the target state of the target terminal device. The expected data determination module 20 is used to determine the expected migration data of the target terminal device according to the finite state machine model preset in the gateway device; the expected migration data includes the initial steady state, intermediate state, target steady state, and expected migration time; The real-time monitoring module 30 is used to send the device control command to the target terminal device so that the target terminal device can complete the transition from the current state to the target state based on the device control command; during the transition process, the status identifier and corresponding timestamp of the target terminal device are continuously captured at a preset sampling frequency, and the captured status identifier and corresponding timestamp are aggregated and processed to obtain the first real-time status data, which includes the current status identifier, intermediate status identifier, target status identifier and real-time migration time; The reliability detection module 40 is used to construct a real-time migration path based on each state identifier and its corresponding timestamp in the first real-time status data, and to construct an expected migration path based on each state in the expected migration data; to calculate the difference between each state identifier in the real-time migration path and each state in the expected migration path to obtain a path deviation value and a first state transition value; to calculate a timing deviation value based on the real-time migration time and the expected migration time; to determine a first reliability detection result of the smart home system based on the path deviation value, the first state transition value, and the timing deviation value; and to generate a first reliability prompt message based on the first reliability detection result.
[0106] This application provides a reliability testing device for a smart home system, employing the reliability testing method for smart home systems described in the above embodiments. This method addresses the technical problem of inaccurate monitoring of device state transitions across the entire reliability chain in existing smart home system reliability testing. Compared to the prior art, the beneficial effects of the reliability testing device for a smart home system provided in this application are the same as those of the reliability testing method for smart home systems provided in the above embodiments. Furthermore, other technical features of the reliability testing device for a smart home system are the same as those disclosed in the methods of the above embodiments, and will not be elaborated upon here.
[0107] This application provides a reliability testing device for a smart home system. The reliability testing device for a smart home system includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the reliability testing method for the smart home system in the first embodiment described above.
[0108] The following is for reference. Figure 5This document illustrates a structural schematic diagram of a reliability testing device suitable for implementing the smart home system embodiments of this application. The reliability testing device for the smart home system in these embodiments may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 5 The reliability testing device for the smart home system shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0109] like Figure 5 As shown, the reliability testing device for a smart home system may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the reliability testing device for the smart home system. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the reliability testing device of the smart home system to communicate wirelessly or wiredly with other devices to exchange data. While the figure shows a reliability testing device for a smart home system with various systems, it should be understood that implementing or having all of the systems shown is not required. More or fewer systems may be implemented alternatively.
[0110] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0111] The reliability testing device for smart home systems provided in this application employs the reliability testing method for smart home systems described in the above embodiments, which can solve the technical problem of neglecting end-to-end device status monitoring during existing smart home system reliability testing. Compared with the prior art, the beneficial effects of the reliability testing device for smart home systems provided in this application are the same as those of the reliability testing method for smart home systems provided in the above embodiments, and other technical features of this reliability testing device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0112] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0113] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0114] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the reliability detection method of the smart home system in the above embodiments.
[0115] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0116] The aforementioned computer-readable storage medium may be included in the reliability testing equipment of the smart home system; or it may exist independently and not be assembled into the reliability testing equipment of the smart home system.
[0117] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by an external control device, cause the external control device to perform a reliability detection method for a smart home system.
[0118] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the reliability testing method of the above-described smart home system. This solves the technical problem of inaccurate monitoring of device state transitions throughout the entire reliability testing process of existing smart home systems. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the reliability testing method for the smart home system provided in the above embodiments, and will not be elaborated upon here.
[0119] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A reliability testing method for a smart home system, characterized in that, The reliability testing method for the smart home system includes: Capture device control commands, parse the device control commands, and determine the target terminal device and the target state of the target terminal device; The expected migration data of the target terminal device is determined based on the finite state machine model pre-set in the gateway device; the expected migration data includes the initial steady state, intermediate state, target steady state, and expected migration time. Send the device control command to the target terminal device so that the target terminal device can complete the transition from the current state to the target state based on the device control command; During the conversion process, the status identifier and corresponding timestamp of the target terminal device are continuously captured at a preset sampling frequency. The captured status identifier and corresponding timestamp are aggregated and processed to obtain the first real-time status data. The first real-time status data includes the current status identifier, intermediate status identifier, target status identifier, and real-time migration time. A real-time migration path is constructed based on each status identifier and the corresponding timestamp in the first real-time status data, and an expected migration path is constructed based on each status in the expected migration data. The path deviation value and the first state transition value are obtained by calculating the difference between each state identifier in the real-time migration path and each state in the expected migration path; the timing deviation value is calculated based on the real-time migration time and the expected migration time; the first reliability detection result of the smart home system is determined based on the path deviation value, the first state transition value and the timing deviation value; and the first reliability prompt information is generated based on the first reliability detection result.
2. The reliability testing method for a smart home system as described in claim 1, characterized in that, The step of calculating the difference between each state identifier in the real-time migration path and each state in the expected migration path to obtain the path deviation value includes: The difference between the current state identifier and the initial steady state is calculated to obtain the first sub-path deviation value; The difference between the intermediate state identifier and the intermediate state is calculated to obtain the second sub-path deviation value; The difference between the target state identifier and the target steady state is calculated to obtain the third sub-path deviation value; The path deviation value is obtained based on the first sub-path deviation value, the second sub-path deviation value, and the third sub-path deviation value.
3. The reliability testing method for a smart home system as described in claim 1, characterized in that, The real-time migration time includes: the total real-time migration time; the expected migration time includes: the total expected migration time. Determining the first reliability test result of the smart home system based on the path deviation value, the first state transition value, and the timing deviation value includes: Calculate the first timing deviation factor based on the real-time total migration time and the expected total migration time; The first deviation type coefficient is determined based on the path deviation value, the first state transition value, and the timing deviation value; The first deviation degree is calculated based on the first deviation type coefficient and the first time series deviation factor; The first reliability test result of the smart home system is determined based on the first deviation.
4. The reliability testing method for a smart home system as described in claim 1, characterized in that, The real-time migration time includes: the first-stage real-time migration time and the second-stage real-time migration time; the expected migration time includes: the first-stage expected migration time and the second-stage expected migration time. The step of calculating a timing deviation value based on the real-time migration time and the expected migration time; and determining a first reliability test result of the smart home system based on the path deviation value, the first state transition value, and the timing deviation value, includes: Based on the expected migration time and the real-time migration time of the first stage, calculate the first sub-time series deviation value and the second time series deviation factor. Calculate the second sub-time deviation value and the third time deviation factor based on the expected migration time of the second stage and the real-time migration time of the second stage; The timing deviation value and the second state transition value are determined based on the first sub-timing deviation value and the second sub-timing deviation value; The second deviation type coefficient is determined based on the path deviation value, the first state transition value, the second state transition value, and the timing deviation value; The second deviation degree is calculated based on the second deviation type coefficient, the second time series deviation factor, and the third time series deviation factor; The first reliability test result of the smart home system is determined based on the second deviation.
5. The reliability testing method for a smart home system as described in claim 1, characterized in that, After generating the first reliability warning information based on the first reliability detection result, the method further includes: During the process of sending the device control command to the target terminal device so that the target terminal device can complete the transition from the current state to the target state based on the device control command, the real-time capture of the device control command issuance status feedback data, the target terminal device response status feedback data, and the environmental change feedback data of the target terminal device's associated environmental devices; Based on the issued status feedback data, the response status feedback data, and the environmental change feedback data, a second reliability detection result of the smart home system is determined, and a second reliability prompt message is generated based on the second reliability detection result.
6. The reliability testing method for a smart home system as described in claim 5, characterized in that, The step of determining the second reliability test result of the smart home system based on the issued status feedback data, the response status feedback data, and the environmental change feedback data includes: The first link response result is determined based on the issued status feedback data and the response status feedback data; The second link response result is determined based on the response status feedback data and the environmental change feedback data; Based on the first link response result and the second link response result, the second reliability test result of the smart home system is determined.
7. The reliability testing method for a smart home system as described in claim 6, characterized in that, When either the first reliability test result or the second reliability test result is abnormal, the method further includes: Based on the device control commands, the smart home system undergoes multi-level anomaly self-healing detection, and an anomaly self-healing report of the smart home system is generated.
8. The reliability testing method for a smart home system as described in claim 7, characterized in that, The step of performing multi-level anomaly self-healing detection on the smart home system based on the device control commands and generating an anomaly self-healing report for the smart home system includes: The device control command is sent to the target terminal device at an exponential interval, the second real-time status data of the target terminal device is captured, and the first-level self-healing anomaly detection result is determined based on the second real-time status data. When the first-level self-healing anomaly detection result is abnormal, the backup control resources of the target terminal device are activated, the device control command is sent based on the backup control resources, the third real-time status data fed back by the backup control resources is captured, and the second-level self-healing anomaly detection result is determined based on the third real-time status data. When the secondary self-healing anomaly detection result is abnormal, the historical fault information of the target terminal device is obtained, the dynamic recovery rate threshold is calculated based on the historical fault information, and the tertiary self-healing anomaly detection result is output based on the dynamic recovery rate threshold. An anomaly self-healing report of the smart home system is generated based on the first-level self-healing anomaly detection results, the second-level self-healing anomaly detection results, and the third-level self-healing anomaly detection results.
9. A reliability testing device for a smart home system, characterized in that, The reliability testing device for the smart home system includes: a data acquisition module, a desired data determination module, a real-time monitoring module, and a reliability testing module; The data acquisition module is used to capture device control commands, parse the device control commands, and determine the target terminal device and the target state of the target terminal device. The expected data determination module is used to determine the expected migration data of the target terminal device based on the finite state machine model preset in the gateway device; the expected migration data includes the initial steady state, intermediate state, target steady state, and expected migration time; The real-time monitoring module is used to send the device control command to the target terminal device so that the target terminal device can complete the transition from the current state to the target state based on the device control command. During the transition, the module continuously captures the status identifier and corresponding timestamp of the target terminal device at a preset sampling frequency, and integrates and processes the captured status identifier and corresponding timestamp to obtain first real-time status data. The first real-time status data includes the current status identifier, intermediate status identifier, target status identifier, and real-time migration time. The reliability detection module is used to construct a real-time migration path based on each state identifier and its corresponding timestamp in the first real-time status data, and to construct an expected migration path based on each state in the expected migration data; to calculate the difference between each state identifier in the real-time migration path and each state in the expected migration path to obtain a path deviation value and a first state transition value; to calculate a timing deviation value based on the real-time migration time and the expected migration time; to determine a first reliability detection result of the smart home system based on the path deviation value, the first state transition value, and the timing deviation value; and to generate a first reliability prompt message based on the first reliability detection result.
10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the reliability detection method for the smart home system as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Virtual machine network communication abnormity self-healing and re-checking method, device, equipment, medium and product
CN121356988A
Electric energy meter and terminal logic reliability verification method and system
CN121412095A