Internet of Things equipment management method based on state machine

Through the state machine-based IoT device management method, device states and events are defined, state switching is optimized, and the problem of device complexity and logical complexity is solved, and process configuration and intelligent control is realized. Improves the adaptability and scalability of the equipment.

CN118921188APending Publication Date: 2024-11-08ZHUHAI XINDEHUI INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410917823.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

The complexity and logical complexity of IoT devices lead to high error rates, and the device processes cannot be configured and difficult to scale and modify to adapt to complex environments.

Method used

Using a state machine-based management method, the state diagram is drawn by defining device states, events and transfer conditions, and realizing state machines, combining machine learning and artificial intelligence to optimize state switching, the process is configured and collaboratively designed.

Benefits of technology

It realizes process configuration, high cohesion, centralized configuration, strong maintainability and scalability, easy to change and rapid modification, and improves the intelligence and adaptability of the equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118921188A_ABST
    Figure CN118921188A_ABST
Patent Text Reader

Abstract

The invention discloses an Internet of Things equipment management method based on a state machine. The method comprises the following steps: S1, defining an equipment state; s2, defining an equipment event; s3, defining a transfer condition between the states; s4, drawing a state diagram; and S5, realizing the state machine. According to the method, the configurable process, high cohesion and centralized configuration can be realized, the configuration information can be directly changed, the maintainability and expansibility are high, and the method is easy to change and quick to modify.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Internet of Things device management, and in particular to an Internet of Things device management method based on a state machine. Background Art

[0002] The state machine model is widely used in IoT devices for state control and event processing of smart devices. In smart homes, smart lights switch to different brightness and colors according to the current environment. In industrial automation, automation equipment automatically adjusts the operating parameters of the equipment according to the operating status of the equipment and the surrounding environment, and performs more accurate processing and assembly. In smart transportation and smart driving, smart transportation switches traffic lights more intelligently according to the current traffic flow, and smart driving switches to better driving modes according to different road conditions.

[0003] In the application of IoT devices, the complexity of the devices has been greatly increased, and the complexity of the logic of the programs used to control these devices has also been greatly increased. In the past, when a device ran an event, it was necessary to judge the current state of the device. For example, when the smart light adjusted the brightness, the device must be turned on at that time, so the system must verify the state of the device every time. When the device has many states, the system design becomes complicated; and when one of the states of many devices can be triggered by multiple events, this will also increase the complexity of the system logic. For example, if face recognition fails, the authentication can be terminated, or other authentications can be used, such as fingerprint authentication. The diverse IoT device processes and complex logic have greatly increased the error rate of devices and systems, and the processes of previous devices cannot be configured. Once the system is implanted in the device, it cannot be changed, resulting in expansion and modification. It cannot be applied to complex environments autonomously, such as traffic lights cannot switch lights autonomously under complex changes in pedestrian and vehicle flows. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide an Internet of Things device management method based on a state machine, which can realize process configurability, high cohesion, centralized configuration, direct change of configuration information, strong maintainability and scalability, easy change, and rapid modification.

[0005] In order to solve the above technical problems, the technical solutions adopted by the present invention are as follows.

[0006] The method for managing IoT devices based on a state machine includes the following steps:

[0007] S1. Define the device status;

[0008] S2. Define device events;

[0009] S3. Define the transition conditions between states;

[0010] S4. Draw a state diagram;

[0011] S5. Implement the state machine.

[0012] Preferably, in step S1, all states of the device are clarified, and each state also needs to define its corresponding attributes and behaviors.

[0013] Preferably, all events that may trigger a state change are defined in step S2; the event is an action of switching the device, which may be a physical signal from a sensor or an input signal from a user.

[0014] Preferably, the transfer condition in step S3 is based on the current state and the attributes of the event, the transfer condition constitutes the operation cycle of the device state, and the transfer condition between different states of the device is unique.

[0015] Preferably, the transfer condition in step S3 is combined with machine learning and artificial intelligence to optimize the state switching of the device.

[0016] Preferably, the transfer condition in step S3 realizes state switching by coordinating the IoT device of the state machine with other devices.

[0017] Preferably, the operation cycle of the device is stored in the storage of the device, the current device is found through device management, and the operation cycle of the device is modified; the state flow of the device is configured through a refresh mechanism or a restart mechanism.

[0018] Preferably, the state diagram in step S4 is composed of state nodes representing different states of the device and transition edges representing transition conditions between states.

[0019] Preferably, in step S5, the state machine can be implemented using an existing state machine framework, or the state machine code can be written by the user to implement the state machine.

[0020] Due to the adoption of the above technical scheme, the technical progress achieved by the present invention is as follows.

[0021] The present invention can realize more complex tasks and operations; by utilizing machine learning, artificial intelligence and other technologies, the state machine model can be realized to autonomously learn and optimize its own operation, so as to better adapt to different scenarios and applications; the state machine model is not limited to a single device, but can collaborate across multiple devices to realize the collaborative design and optimization of the state machines of multiple devices, thereby realizing more intelligent operation and control, and the state machine model is more flexible and can be freely adjusted and optimized according to different application scenarios and needs, which greatly improves the customizability and adaptability of the state machine model, and brings more opportunities and challenges to the development of smart devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0023] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0024] A state machine-based IoT device management method, combined with Figure 1 As shown, the following steps are included:

[0025] S1. Define the device status.

[0026] To define the device status, you need to clarify all the status of the device. These statuses usually refer to the different working states of the device. For example, the status of a smart lamp may include: device switch on, device switch off, light brightness at maximum dim, light brightness at maximum bright, light color pure white, light color warm yellow, etc. These are all device statuses. For each status, you also need to define its corresponding attributes and behaviors.

[0027] S2. Define device events.

[0028] Define device events, that is, define all events that may trigger state changes. These events can be physical signals from sensors or user input signals. For example, events for smart lamps can include: turning on, off, switching to minimum brightness, switching to maximum brightness, switching the light color to pure white light, switching the light color to warm yellow light, etc. These are all events related to lights, and an event is an action to switch a device.

[0029] S3. Define the transition conditions between states.

[0030] Define the transition conditions between states, that is, under what circumstances to transfer from one state to another. These conditions are usually based on the properties of the current state and events. In the smart lighting device, the device switch off + open event will cause the device to flow to the device on state; the device minimum brightness + the action of adjusting the maximum brightness will cause the device to flow to the maximum state; the device light is pure white + the light color switching event will cause the light color to switch to warm yellow, etc., and the operation cycle of this device state is composed of these transition conditions. The state cycle of smart lighting is on->minimum brightness->maximum brightness->pure white->warm yellow->off; and the device's transition conditions are unique, and it is not allowed that state A + event A can be converted to state B and also to state C.

[0031] In order to realize the state machine, IoT devices can also combine machine learning and artificial intelligence to optimize their own state switching. The transfer conditions can be combined with machine learning and artificial intelligence to optimize the state switching of the device. For example, smart lighting equipment is equipped with voice control recognition. The sound source model continuously analyzes whether it is a human voice or a TV sound. Artificial intelligence determines that it is a TV sound and automatically switches the light to the minimum brightness state.

[0032] In order to realize that the IoT device of the state machine can also cooperate with other devices, the transfer condition can realize state switching by coordinating the IoT device of the state machine with other devices. For example, there are smart door locks and smart lamps in smart furniture, and smart door locks also have open and closed states and actions of opening and closing doors. At this time, the state flow of the lamp can also be configured to flow from the state of the smart lamp to the state of the smart lamp to the state of the smart lamp to open the door, thereby realizing the coordination of devices.

[0033] Since the status and events of the device have been fully defined, different status cycles of the device are required in different environments. For example, traffic light A is red -> yellow -> green in a normal environment, but it is red -> green in a special environment. At this time, you can find the current device through device management and modify the device operation cycle. The device operation cycle is saved in the device storage. Through the refresh mechanism or restart mechanism, the device state flow is configured and modified easily, instead of having to refresh the device system every time to change it.

[0034] S4. Draw a state diagram.

[0035] Based on the defined states, events, and transition conditions, a state diagram of an IoT device can be drawn. A state diagram usually consists of state nodes and transition edges, where state nodes represent different states of a device and transition edges represent transition conditions between states. Drawing a state diagram helps developers understand the state transition logic of a device more intuitively and quickly identify potential state transition errors.

[0036] S5. Implement the state machine.

[0037] Defining device states, defining device events, defining transition conditions between states, and drawing state diagrams are all state machine model design documents, which are convenient for programmers to understand the state machine model design and implement the state machine in a programming language. Developers need to convert the defined state machine model into actual code. In the implementation process, you can use the existing state machine framework or write the state machine code yourself. In the code implementation, you need to ensure the correctness of the state transfer and the efficiency of the performance.

[0038] When the present invention is used, it is not necessary to check the current state when running a certain event. When configuring the state machine, a certain state must be added with conditions before it can proceed. If the operation is performed on an incorrect state, an error will be prompted. Different events can be configured for the same state, such as: authentication failed - end authentication; authentication failed - other authentication. The process can be configured, highly cohesive, and centrally configured. The configuration information can be directly changed. It has strong maintainability and scalability, is easy to change, and can be modified quickly. At the same time, machine learning and artificial intelligence can be used to generate the optimal process more intelligently.

Claims

1. The IoT device management method based on a state machine is characterized by: The following steps are involved: S1. Define the device status; S2. Define device events; S3. Define the transition conditions between states; S4. Draw a state diagram; S5. Implement the state machine.

2. The method for managing IoT devices based on a state machine according to claim 1, characterized in that: In step S1, all states of the device are clarified, and each state also needs to define its corresponding attributes and behaviors.

3. The method for managing IoT devices based on a state machine according to claim 1, characterized in that: In step S2, all events that may trigger a state change are defined; the event is an action of switching the device, which may be a physical signal from a sensor or an input signal from a user.

4. The method for managing IoT devices based on a state machine according to claim 1, characterized in that: The transfer condition in step S3 is based on the current state and the attributes of the event. The transfer condition constitutes the operation cycle of the device state, and the transfer condition between different states of the device is unique.

5. The method for managing IoT devices based on a state machine according to claim 4, characterized in that: The transfer condition in step S3 is combined with machine learning and artificial intelligence to optimize the state switching of the device.

6. The method for managing IoT devices based on a state machine according to claim 4, characterized in that: The transfer condition in step S3 realizes state switching by coordinating the IoT device of the state machine with other devices.

7. The method for managing IoT devices based on a state machine according to claim 4, characterized in that: The operation cycle of the device is stored in the storage of the device. The current device is found through device management, and the operation cycle of the device is modified. The state flow of the device is configured through a refresh mechanism or a restart mechanism.

8. The method for managing IoT devices based on a state machine according to claim 1, characterized in that: The state diagram in step S4 is composed of state nodes representing different states of the device and transition edges representing transition conditions between states.

9. The method for managing IoT devices based on a state machine according to claim 1, characterized in that: In step S5, the state machine can be implemented using an existing state machine framework, or the state machine code can be written by the user to implement the state machine.