Internet of things system of household appliance and control method of household appliance
Patent Information
- Application Number
- CN202610790361.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-03
- Publication Date
- 2026-08-18
AI Technical Summary
[0003]住宅内家电接入控制通常围绕设备编号、通信地址、运行状态、环境参数、用户指令及预设命令表展开,网关或云端依据地址字段和命令字段完成转发,实际运作中身份确认粒度偏向单项登记信息,设备所处房间、接入协议、端口信道与目标身份之间缺少强关联校验,多个同品牌空调分别安装在客厅、卧室并接入同一家庭网关时,仅凭常规地址或序列登记进行指令转发,容易在地址缓存更新、设备重连、网络切换、局部离线恢复期间产生目标对应关系漂移
通过用户选定家用电器后,设备类型、房间、命令、协议及设备标识被写入固定字段并完成长度与起始位置校验,使控制帧边界清晰、字段可追溯,四项码值一致比较及设备标识绑定形成多维寻址依据,降低同类设备误控概率,MAC地址数值化分段累加并生成协议槽位键,提升转发表定位效率,端口、信道、协议及设备标识联锁匹配,配合控制板回执、时间戳和组合值复核,可识别异常路由并形成校正记录,增强控制准确性与运行稳定性。
Smart Images

Figure CN122601703A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart home system technology, and in particular to an Internet of Things (IoT) system for home appliances and a control method for home appliances. Background Technology
[0002] The field of smart home system technology involves the connection and control between home appliances, lighting equipment, security equipment, environmental data collectors, home gateways, user terminals and cloud servers in residential spaces. This field typically uses device number, communication address, operating status, environmental parameters and user commands as the basis to establish device access relationships through wireless LAN, Bluetooth, ZigBee protocol or cellular network, and manages various electrical devices in the home in a unified manner according to the process of device registration, status reading, command generation, command issuance and feedback recording. The Internet of Things (IoT) system for traditional home appliances refers to a control system that connects home appliances such as air conditioners, refrigerators, washing machines, water heaters, air purifiers, and robot vacuum cleaners to home routers, home gateways, user mobile phones, or cloud servers. This system determines the identification, online status collection, operating parameter reading, control command transmission, timing rule configuration, and inter-device linkage of home appliances. Traditional methods typically use device serial numbers, media access control addresses, internet protocol addresses, communication protocol types, preset control command tables, temperature values, humidity values, power values, on / off status, door status, and fault codes as input. Specific commands such as power on / off, temperature setting, mode switching, time scheduling, and operating speed are sent from the user terminal, and then forwarded by the router, home gateway, or cloud server to the corresponding home appliance according to the device address and command fields.
[0003] Home appliance access control typically revolves around device serial number, communication address, operating status, environmental parameters, user commands, and preset command tables. Gateways or the cloud forward commands based on address and command fields. In actual operation, the granularity of identity verification tends to be based on single-item registration information. There is a lack of strong correlation verification between the room where the device is located, the access protocol, the port channel, and the target identity. When multiple air conditioners of the same brand are installed in the living room and bedroom respectively and connected to the same home gateway, command forwarding based solely on conventional address or sequence registration is prone to drift in target correspondence during address cache updates, device reconnection, network switching, and partial offline recovery. Traditional processes often treat status reading, command generation, command issuance, and feedback recording as sequential steps. The feedback content focuses on switch status, fault codes, or operating parameters, lacking closed-loop verification of the consistency between the identity combination stored on the control board and the addressing basis on the gateway side. If there are old ports, old channels, or duplicate registrations in the home gateway forwarding table, the surface feedback may only show that the command has been sent or the device is online, making it difficult to promptly expose routing deviations. Taking the setting of operating parameters for home appliances, such as air conditioner temperature settings, as an example, after a user terminal issues a cooling command to the bedroom device, if the gateway still uses the previous communication entry point from the living room device, traditional records may only retain the sending time and status return, making it impossible to clearly determine whether the returned status comes from the target control board. This can lead to minor issues like temperature changes in non-target rooms, or more serious problems like energy waste, user misjudgment of device malfunction, and decreased reliability of remote control. With the increasing number of Wi-Fi devices in homes, the growing number of similar appliances, and frequent device relocation, relying solely on addresses, protocol types, and preset command tables for management places a heavy burden on conflict resolution, anomaly tracing, and forwarding table maintenance during the location process. The gateway requires more manual reconfiguration or repeated scanning to restore accurate control relationships. Summary of the Invention
[0004] To address the technical problems existing in the prior art, embodiments of the present invention provide an Internet of Things (IoT) system for home appliances and a control method for home appliances. The technical solution is as follows: On the one hand, an Internet of Things (IoT) system for home appliances is provided, the system including: The instruction framing module collects the home appliances selected by the user's mobile phone, including device type identifier, room identifier, command identifier, Wi-Fi protocol identifier, and device identifier. It verifies the total length of the fields, the length field, and the starting position of the fields. It then writes each identifier according to the starting position of the fields to generate home appliance control instructions. The token generation module reads the device type identifier, room identifier, Wi-Fi protocol identifier and device identifier from the home gateway registration table based on the home appliance control command, compares the consistency of the four code values, concatenates the consistent code values in the field order and binds them to the device identifier to generate a home appliance addressing token. Based on the appliance addressing token, the slot positioning module reads the MAC address, port number, channel number and device identifier from the home gateway registration table, converts the MAC address hexadecimal characters to decimal values, calculates the remainder between the segmented cumulative value and the number of hash table buckets, concatenates the remainder and the Wi-Fi protocol identifier and binds the port number and channel number to obtain the protocol slot key; The routing interlocking module calls the protocol slot key, port number, channel number and device identifier, compares the protocol slot key, protocol identifier, port number, channel number and device identifier in the home gateway forwarding table to see if they match. If the protocol identifiers do not match, the forwarding table entry is selected based on the Wi-Fi protocol identifiers. If the port numbers do not match, the forwarding table entry is selected based on the device identifiers. This generates an interlocking routing entry. Based on the interlocking routing entry, the end board receipt module monitors the status code returned by the home appliance control board, confirms the response and sending timestamp, compares the home appliance addressing token in the control command frame with the combined values of the device type identifier, room identifier, Wi-Fi protocol identifier and device identifier stored on the control board. If the combined values are inconsistent, it calls other forwarding table entries under the same protocol slot key to re-judge and establishes a routing correction record.
[0005] As a further embodiment of the present invention, the home appliance control command includes a control frame header, a command payload, a field boundary code, and an integrity check code; the home appliance addressing token includes a target identity code, a spatial ownership code, a protocol domain code, a token signature, and a binding index; the protocol slot key includes a bucket index, a protocol prefix, a port label, a channel label, a device association bit, and a slot check bit; the interlocking routing entry includes an ingress constraint, an egress channel, a target end board, a priority flag, and a fallback matching flag; the routing correction record includes an abnormal slot number, a candidate entry number, a receipt status, a time index, and a correction result flag.
[0006] As a further aspect of the present invention, the conversion of the MAC address hexadecimal characters to decimal values includes reading the MAC address from the home gateway registration table, retaining twelve MAC address hexadecimal characters, forming a conversion segment with every two MAC address hexadecimal characters, resulting in six conversion segments.
[0007] As a further aspect of the present invention, the calculation of the remainder between the segmented cumulative value and the number of hash table buckets includes: converting the six conversion segments into decimal values respectively, and accumulating them according to the order of adjacent two conversion segments in the MAC address to obtain five segmented cumulative values; taking the remainder between the five segmented cumulative values and the number of hash table buckets to obtain five remainders; and associating the five remainders with the Wi-Fi protocol identifier, port number, channel number, and device identifier to form the protocol slot key.
[0008] As a further aspect of the present invention, the instruction framing module includes: The identification acquisition submodule collects the home appliances selected by the user's mobile phone, including device type identifiers, room identifiers, command identifiers, Wi-Fi protocol identifiers, and device identifiers. It reads the selected serial number of the home appliances, the character code points and byte width of the identifiers according to the sampling order of the user's mobile phone, calculates the association value between the identifier byte size and the category serial number, and concatenates the association values according to the sampling order to obtain the control identity sequence. The field verification submodule obtains the total instruction byte threshold, length field byte size, length field storage bits, field start position number, and field number step size value based on the control identity sequence. It determines whether the difference between the total encoded byte size and the total instruction byte threshold is zero, and verifies that the length field storage bits, field start position number, and field number step size value form an increasing relationship to generate a frame domain consistency state. The frame body writing submodule calls the frame domain consistency state and the control identity sequence, detects the license code corresponding to the frame domain consistency state, determines whether the license code is one, and writes the device type identifier, room identifier, command identifier, Wi-Fi protocol identifier, and device identifier into the corresponding fields in sequence according to the field start position number when the license code is one. It then concatenates the field header code and field end code to obtain the home appliance control command.
[0009] As a further aspect of the present invention, the token generation module includes: Based on the home appliance control command, the instruction parsing submodule obtains the device type identifier, room identifier, Wi-Fi protocol identifier, and device identifier in the instruction frame, reads the field offset sequence number and field length value corresponding to the identifier, calculates the correspondence between the field offset sequence number and the field length value, determines whether the field byte arrangement is continuous, reassembles the identifier byte stream according to the field order, and generates a field mapping sequence. The code value verification submodule calls the field mapping sequence to obtain the device type identifier, room identifier, Wi-Fi protocol identifier, and device identifier from the home gateway registration table. It extracts the byte bits of the registration field and the corresponding byte bits of the field mapping sequence value, compares the byte difference of the corresponding field with the field verification benchmark value, determines whether the corresponding positions of the four fields are consistent, and establishes a code segment consistency index. The token binding submodule reads the byte sequence number corresponding to the consistency field and the device identifier binding bit according to the code segment consistency index, filters the field sequence with the status bit as one in the code segment consistency index value, concatenates the device type identifier, room identifier, and Wi-Fi protocol identifier according to the field order, and writes them into the device identifier binding bit to obtain the home appliance addressing token.
[0010] As a further aspect of the present invention, the slot positioning module includes: The address conversion submodule reads the MAC address, port number, channel number, and device identifier from the home gateway registration table based on the home appliance addressing token, extracts the hexadecimal character group and character position number from the MAC address, converts the corresponding decimal value according to the character position number, calculates the segment accumulation between adjacent decimal values, verifies the correspondence between the segment accumulation and the character group length, and generates the address segment sequence. The Remainder Alignment Submodule calls the address segment sequence, obtains the number of hash table buckets and Wi-Fi protocol identifier, reads the segment accumulation and corresponding bit width of the number of buckets in the address segment sequence value, calculates the remainder between the segment accumulation and the number of hash table buckets, determines whether the length of the remainder bytes is consistent with the length of the protocol identifier field, arranges the remainder bytes according to the protocol field order, and establishes a bucket mapping index. The slot key binding submodule reads the corresponding field sequence numbers of the Wi-Fi protocol identifier, port number, and channel number based on the bucket mapping index, filters the matching field bits in the bucket mapping index value, concatenates the remaining number bytes with the Wi-Fi protocol identifier, binds the corresponding field content of the port number and channel number, and writes the device identifier association bit to obtain the protocol slot key.
[0011] As a further aspect of the present invention, the routing interlocking module includes: The key-value verification submodule calls the protocol slot key, port number, channel number, and device identifier to read the protocol slot key, protocol identifier, port number, channel number, and device identifier in the home gateway forwarding table, extracts the corresponding byte bits and field sequence number of the fields, compares the correspondence between the protocol slot key and the slot field in the forwarding table, calculates the field difference and the corresponding status of the slot verification benchmark value, and generates the slot matching sequence value. The protocol filtering submodule obtains the Wi-Fi protocol identifier and the protocol identifier in the home gateway forwarding table according to the slot matching sequence value, reads the protocol field byte bits and protocol sequence number value, and determines whether the status bits corresponding to the protocol identifier are consistent. When the status bits of the protocol field are inconsistent, it filters the forwarding table entries that are consistent with the byte content corresponding to the Wi-Fi protocol identifier and establishes protocol association and location. The link connection submodule locates based on the protocol association, reads the corresponding field contents of port number, device identifier, and channel number, and determines whether the status bits of the port number field are consistent. When the status bits of the port number field are inconsistent, it filters forwarding table entries with consistent contents corresponding to the device identifier, concatenates the corresponding field sequences of protocol slot key, port number, and channel number, and obtains the interlocking routing entry.
[0012] As a further aspect of the present invention, the endplate receipt module includes: The status acquisition submodule monitors the status codes returned by the home appliance control board based on the interlocking routing item, reads the corresponding byte bits, response sequence number and sending timestamp field value of the status code, compares the correspondence between the response sequence number and the timestamp field interval value, determines whether the length of the status code field is consistent with the length of the response field, arranges the status field content in chronological order, and generates a response timing index. The identification verification submodule calls the response timing index to obtain the appliance addressing token in the control command frame, reads the combined value of device type identifier, room identifier, Wi-Fi protocol identifier and device identifier stored on the control board, compares the byte status of the corresponding field of the appliance addressing token with the combined value, determines whether the corresponding bits of the field are consistent, and establishes an identifier matching association value. The route correction submodule matches the associated value based on the identifier, reads the sequence number of the forwarding table entry corresponding to the protocol slot key, and determines whether the status bits of the combined value field are consistent. When the status bits of the combined value field are inconsistent, it calls the other forwarding table entries under the same protocol slot key to recheck the corresponding contents of the device type identifier, room identifier, Wi-Fi protocol identifier and device identifier, and obtains the route correction record.
[0013] On the other hand, a method for controlling a home appliance, said method being executed based on the aforementioned Internet of Things (IoT) system of the home appliance, includes the following steps: S1: Collect the home appliance, device type identifier, room identifier, command identifier, Wi-Fi protocol identifier, and device identifier selected by the user's mobile phone, verify the total length of the field, the length field, and the starting position of the field, write each identifier into the corresponding field, and generate home appliance control instructions. S2: Based on the home appliance control command, call the device type identifier, room identifier, Wi-Fi protocol identifier, and device identifier in the home gateway registration table, compare the consistency of the four code values, concatenate the consistent code values according to the field order and bind them to the device identifier to generate a home appliance addressing token. S3: Based on the appliance addressing token, read the MAC address, port number, channel number, and device identifier from the home gateway registration table, convert the hexadecimal characters of the MAC address to decimal values, calculate the remainder between the segmented cumulative value and the number of hash table buckets, concatenate the remainder with the Wi-Fi protocol identifier and bind it to the port number and channel number to obtain the protocol slot key; S4: Call the protocol slot key, port number, channel number, and device identifier, compare the protocol slot key, protocol identifier, port number, channel number, and device identifier in the home gateway forwarding table to see if they match. If the protocol identifier does not match, select the forwarding table entry that matches the Wi-Fi protocol identifier. If the port number does not match, select the forwarding table entry that matches the device identifier and generate an interlocking routing entry. S5: Based on the interlocking routing entry, monitor the status code returned by the home appliance control board, confirm the response and sending timestamp, compare the home appliance addressing token in the control command frame with the combined values of the device type identifier, room identifier, Wi-Fi protocol identifier and device identifier stored on the control board, and if the combined values are inconsistent, call the other forwarding table entries under the same protocol slot key to re-judge and establish a routing correction record.
[0014] The beneficial effects of the technical solutions provided by the embodiments of the present invention include at least the following: After the user selects a home appliance, the device type, room, command, protocol, and device identifier are written into fixed fields and their length and starting position are verified. This ensures clear control frame boundaries and traceable fields. The consistency comparison of the four code values and the binding of the device identifier form a multi-dimensional addressing basis, reducing the probability of mis-controlling similar devices. The MAC address is numerically segmented and accumulated to generate protocol slot keys, improving the efficiency of forwarding table positioning. The interlocking matching of ports, channels, protocols, and device identifiers, combined with control board receipts, timestamps, and combined value verification, can identify abnormal routes and form correction records, enhancing control accuracy and operational stability. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a schematic diagram of an Internet of Things (IoT) system for a home appliance provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the system framework of the present invention; Figure 3 This is a flowchart of the instruction framing module in this invention; Figure 4 This is a flowchart of the token generation module in this invention; Figure 5 This is a flowchart of the slot positioning module in this invention; Figure 6 This is a flowchart of the routing interlocking module in this invention; Figure 7 This is a flowchart of the endboard receipt module in this invention; Figure 8 This is a flowchart of a control method for a household appliance provided in an embodiment of the present invention. Detailed Implementation
[0017] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0018] This embodiment provides an Internet of Things (IoT) system for home appliances. In practical applications, for example, when a user's mobile phone controls the network operation of air conditioners, washing machines, water heaters, lighting equipment, and kitchen appliances via a home gateway within a residence, the user's mobile phone generates control selection information, the home gateway maintains a home appliance registration table and a forwarding table, and the home appliance control board saves its own identity combination value and returns a control receipt. The system establishes a closed communication link around control command framing, address token generation, protocol slot positioning, route interlock selection, and end-board receipt correction. The system includes: Please see Figure 1 , Figure 2 and Figure 3 Command framing module: The command framing module is configured to collect the home appliance, device type identifier, room identifier, command identifier, Wi-Fi protocol identifier and device identifier selected by the user's mobile phone, verify the total length of the field, the length field and the starting position of the field, write each identifier according to the starting position of the field, and generate home appliance control instructions. Appliance control commands are control frame data objects converted from control selection information on the user's mobile phone. They consist of a control frame header, command payload, field boundary codes, and integrity check codes. The control frame header marks the starting area and frame type of the control command. The command payload carries device type identifiers, room identifiers, command identifiers, Wi-Fi protocol identifiers, and device identifiers. The field boundary codes define the field boundaries of each identifier within the control frame. The integrity check code marks the completeness of the field arrangement and byte range within the frame. Appliance control commands are sequentially formed by the identifier acquisition submodule, field verification submodule, and frame body writing submodule within the command framing module, and then output to the token generation module. If the identifier sent by the user's mobile phone is missing, the field length is not closed, the field start position is misaligned, or the field order cannot be confirmed, the command framing module generates a framed pending confirmation state and does not release it as a valid appliance control command. Identifier Acquisition Submodule: The identifier acquisition submodule is configured to collect the home appliances, device type identifiers, room identifiers, command identifiers, Wi-Fi protocol identifiers, and device identifiers selected by the user's mobile phone. It reads the selected serial number of the home appliances, the character code points and byte width of the identifiers according to the sampling order of the user's mobile phone, forms an association relationship between the identifier byte size and the category serial number, and concatenates the association relationship according to the sampling order to obtain the control identity sequence. The control identity sequence is an intermediate data object between the user's mobile phone control interface selection and the communication field. It carries the selected serial number of the home appliance, the device type identifier, the room identifier, the command identifier, the Wi-Fi protocol identifier, the device identifier, the character code point, the byte width, and the sampling order. The selected serial number of the home appliance originates from the target control in the user's mobile phone interface. The device type identifier is used to distinguish the type of home appliance, the room identifier is used to distinguish the space, the command identifier is used to distinguish the types of control actions such as switch, mode, temperature, timer, and other control actions, the Wi-Fi protocol identifier is used to distinguish the wireless protocol domain used by the home gateway, and the device identifier points to the target device record in the home gateway registration table. When a user selects a home appliance on their mobile phone, the identifier acquisition submodule reads the character code points and byte width of each identifier and establishes an association between the identifier byte size and the category sequence number according to the sampling order. If the device type identifier does not match the selected home appliance sequence number, or if the room identifier does not correspond to the space ownership already existing in the home gateway registration table, the control identity sequence records the acquisition anomaly and retains the source field. The control identity sequence is output to the field validation submodule for control frame field range validation. Field Validation Submodule: Based on the control identity sequence, the field validation submodule obtains the total instruction byte judgment boundary, length field byte size, length field storage bits, field start position number, and field number step size relationship. It determines whether the total encoded byte size and the total instruction byte judgment boundary are closed, and verifies whether the length field storage bits, field start position number, and field number step size relationship form an increasing relationship, generating a frame domain consistency state. The frame domain consistency status is a status data object indicating whether the control frame field range meets the writing rules. It carries the total instruction byte closure status, length field position status, field start position status, field sequence number increment status, and permission code. The total instruction byte determination boundary is derived from the frame domain rules of the home gateway control protocol for home appliance control instruction frames. The length field storage bits are used to record the instruction payload length, the field start position sequence number is used to indicate the starting area for writing each identifier, and the field sequence number step size relationship is used to verify whether adjacent fields are arranged in the preset field order. The field validation submodule reads the number of bytes of each identifier in the control identity sequence and determines whether the total range of identifiers within the frame corresponds to the boundary of the total number of bytes in the instruction. If the length field storage bits are inconsistent with the actual payload range, or if the starting position sequence of the field does not form an increasing relationship, the frame domain consistency status is marked as disallowed, and frame body writing is blocked. If the validation passes, the frame domain consistency status is written with a permission code and output to the frame body writing submodule; Frame body writing submodule: The frame body writing submodule calls the frame domain consistency status and control identity sequence, detects the license code corresponding to the frame domain consistency status, determines whether the license code is in a licensed state, and writes the device type identifier, room identifier, command identifier, Wi-Fi protocol identifier, and device identifier into the corresponding fields in sequence according to the starting position number of the fields in the licensed state. It then concatenates the field header code and field end code to obtain the home appliance control command.
[0019] The frame body writing submodule performs writing only when the permission code is in a permitted state. During the writing process, each identifier is placed into the instruction payload according to its starting position number, and field header and field end codes are written before and after the identifiers, enabling the home gateway to identify field boundaries during subsequent parsing. The field header and field end codes are boundary markers within the control frame; they do not carry specific control actions and are only used to define the start and end of each field. If the permission code is in an unpermitted state, the frame body writing submodule does not generate a valid control command, but instead outputs the framing failure status and exception field category. Valid appliance control commands are output to the token generation module, where the device type identifier, room identifier, Wi-Fi protocol identifier, and device identifier are used for consistency verification with the home gateway registration table, and the command identifier is retained along with the command payload for subsequent control execution.
[0020] Please see Figure 2 and Figure 4 Token generation module: Based on the home appliance control command, the token generation module reads the device type identifier, room identifier, Wi-Fi protocol identifier and device identifier from the home gateway registration table, compares the consistency of the four code values, concatenates the consistent code values according to the field order and binds them to the device identifier to generate a home appliance addressing token. The appliance addressing token is an addressing data object used by the home gateway to locate target home appliances. It consists of a target identification code, a spatial ownership code, a protocol domain code, a token signature, and a binding index. The target identification code is formed by the device type identifier, the spatial ownership code by the room identifier, the protocol domain code by the Wi-Fi protocol identifier, the token signature by concatenating the consistent fields in sequence, and the binding index is used to associate the token with the device identifier. The appliance addressing token is generated by the instruction parsing submodule, the code value verification submodule, and the token binding submodule, and output to the slot positioning module. If the target device does not exist in the home gateway registration table, the field order is not continuous, or the device identifier cannot be matched, the token generation module outputs a token pending confirmation status. Instruction parsing submodule: Based on home appliance control instructions, the instruction parsing submodule obtains the device type identifier, room identifier, Wi-Fi protocol identifier, and device identifier from the instruction frame, reads the field offset sequence number and field length value corresponding to the identifier, forms a correspondence between field offset sequence number and field length value, determines whether the field bytes are arranged continuously, reassembles the identifier byte stream according to the field order, and generates a field mapping sequence. The field mapping sequence consists of identifier field data objects parsed from home appliance control commands, carrying device type identifiers, room identifiers, Wi-Fi protocol identifiers, device identifiers, field offset numbers, field length values, and field continuity status. The command parsing submodule determines the payload position of the command frame based on the control frame header, field boundary codes, and integrity check codes, and then reads the field offset number and field length value of each identifier. When field bytes are arranged consecutively, the identifier byte stream is reassembled according to the order of device type, room, protocol, and device identity. If the field offset sequence number and field length value do not correspond, or if the start and end areas indicated by the field boundary code are not closed, the field mapping sequence is marked as parsing abnormal. Parsing abnormal fields are not included in subsequent code value verification, and the abnormal status is bound and saved with the original home appliance control command. The valid field mapping sequence is output to the code value verification submodule; Code value verification submodule: The code value verification submodule calls the field mapping sequence to obtain the device type identifier, room identifier, Wi-Fi protocol identifier, and device identifier from the home gateway registration table. It extracts the byte bits of the registration field and the corresponding byte bits of the field mapping sequence value, compares the byte difference status of the corresponding field with the field verification benchmark status, determines whether the corresponding positions of the four fields are consistent, and establishes a code segment consistency index. The code segment consistency index is an index data object that indicates the consistency between control command fields and home gateway registration table fields. It carries the consistency status of device type, room, protocol, and device identifier, as well as the field position correspondence. The home gateway registration table contains the home appliance registration data stored by the home gateway, including device addressing fields such as device type identifier, room identifier, Wi-Fi protocol identifier, device identifier, MAC address, port number, and channel number. The code value verification submodule compares each identifier in the field mapping sequence with the registered fields in the home gateway registration table. If all four fields correspond to the registered fields, the corresponding field status is written to a consistency status; if any field is inconsistent, the code segment consistency index marks the inconsistent field and outputs a registration mismatch status. The code segment consistency index is output to the token binding submodule for filtering concatenable fields. Token Binding Submodule: Based on the code segment consistency index, the token binding submodule reads the byte sequence number corresponding to the consistency field and the device identifier binding bit, filters the field sequence with the status bit in the code segment consistency index value as consistent, concatenates the device type identifier, room identifier, and Wi-Fi protocol identifier in the field order, and writes them into the device identifier binding bit to obtain the appliance addressing token.
[0021] The token binding submodule only uses the field sequence that is in a consistent state in the code segment consistency index. The target identity code, spatial ownership code, and protocol domain code are concatenated in the order of the fields to form a token signature. The device identifier is written into the binding index, enabling the subsequent slot positioning module to directly read the target device identity and protocol domain. If the device identifier binding bit cannot be written, or the consistent fields are insufficient to form a complete token, the token binding submodule outputs a token construction exception status. The appliance addressing token is output to the slot positioning module, and the correspondence between the token and the appliance control command, field mapping sequence, and home gateway registration record is maintained.
[0022] Please see Figure 2 and Figure 5 Slot positioning module: Based on the home appliance addressing token, the slot positioning module reads the MAC address, port number, channel number and device identifier in the home gateway registration table, converts the MAC address hexadecimal characters into decimal values, forms the relationship between the segmented cumulative value and the remainder of the number of buckets in the hash table, concatenates the remainder and the Wi-Fi protocol identifier and binds the port number and channel number to obtain the protocol slot key; The protocol slot key is a slot index data object used for forwarding table retrieval by the home gateway. It consists of a bucket index, protocol prefix, port label, channel label, device association bit, and slot check bit. The bucket index points to candidate slots in the home gateway's hash table, the protocol prefix limits the Wi-Fi protocol domain, the port label and channel label limit the outgoing channel, the device association bit binds the device identifier, and the slot check bit marks the correspondence between the slot key and the registration table field. The protocol slot key is formed by the address conversion submodule, the residual value normalization submodule, and the slot key binding submodule, and is output to the routing interlocking module. Address Conversion Submodule: Based on the appliance addressing token, the address conversion module reads the MAC address, port number, channel number, and device identifier from the home gateway registration table, extracts the hexadecimal character group and character position number from the MAC address, converts the character position number to the corresponding decimal value, forms the segment accumulation relationship between adjacent decimal values, verifies the correspondence between the segment accumulation relationship and the character group length, and generates the address segment sequence. The address segment sequence is an address data object formed by segmenting and converting MAC addresses in the home gateway registration table. It carries MAC address character groups, character position numbers, conversion segments, decimal value status, segment accumulation relationship, port number, channel number, and device identifier. When converting MAC address hexadecimal characters, the address conversion submodule reads the MAC address from the registration table, retains the hexadecimal characters that conform to the MAC address format rules, and forms conversion segments according to adjacent characters. Each conversion segment is converted to a decimal value status. The segment accumulation relationship is formed according to the order of adjacent translated segments in the MAC address, which is used to provide the address distribution basis for the bucket index. If the MAC address contains illegal characters, the character group length does not conform to the registration table rules, the port number is missing, or the channel number is not registered, the address segment order is written to the address conversion abnormal status. The valid address segment order is output to the remainder equalization submodule; Remainder Alignment Submodule: The Remainder Alignment Submodule calls the address segment sequence, obtains the number of hash table buckets and the Wi-Fi protocol identifier, reads the segment accumulation and the corresponding bit width of the number of buckets in the address segment sequence value, forms the remainder relationship between the segment accumulation and the number of hash table buckets, determines whether the length of the remainder byte is consistent with the length of the protocol identifier field, arranges the remainder byte bits according to the protocol field order, and establishes a bucket mapping index. The bucket mapping index is a candidate bucket index data object in the protocol slot key, carrying the segment accumulation relationship, the number of hash table buckets, the remainder relationship, the length of the protocol identifier field, the arrangement status of the remainder bytes, and the Wi-Fi protocol identifier. The number of hash table buckets comes from the hash slot configuration of the home gateway's forwarding table and is used to map the address segment order to the candidate buckets. The remainder normalization submodule does not output specific numerical results, but only retains the bucket status formed by the remainder relationship; When establishing remainder relationships, the accumulated sum of adjacent transformation segments is mapped to the number of hash table buckets, and the resulting bucket status is associated with the Wi-Fi protocol identifier, port number, channel number, and device identifier. If the remainder byte length is inconsistent with the protocol identifier field length, the bucket mapping index is written to the bucket pending confirmation status. The bucket mapping index is output to the slot key binding submodule. Slot Key Binding Submodule: Based on the bucket mapping index, the slot key binding submodule reads the corresponding field sequence numbers of the Wi-Fi protocol identifier, port number, and channel number, filters the matching field bits in the bucket mapping index value, concatenates the remaining number bytes with the Wi-Fi protocol identifier, binds the corresponding field content of the port number and channel number, writes the device identifier associated bits, and obtains the protocol slot key.
[0023] The slot key binding submodule concatenates the bucket index with the Wi-Fi protocol identifier to form a protocol prefix, then writes the port number to the port label, the channel number to the channel label, and the device identifier to the device association bit. The slot check bit records whether a consistent field relationship exists between the bucket index, protocol prefix, port label, channel label, and device association bit. If the port number or channel number cannot be matched with the bucket mapping index, the protocol slot key is marked as a slot key binding error. A valid protocol slot key is output to the routing interlocking module for interlocking matching in the home gateway forwarding table.
[0024] Please see Figure 2 and Figure 6 The routing interlocking module calls the protocol slot key, port number, channel number and device identifier, and compares the protocol slot key, protocol identifier, port number, channel number and device identifier in the home gateway forwarding table to see if they match. If the protocol identifier does not match, the forwarding table entry is selected according to the Wi-Fi protocol identifier. If the port number does not match, the forwarding table entry is selected according to the device identifier, and an interlocking routing entry is generated. An interlocking routing entry is a routing data object that forwards control commands from a home gateway to a target home appliance control panel. It consists of an ingress constraint, an egress channel, a target end panel, a priority flag, and a fallback match flag. The ingress constraint defines the matching relationship between the protocol slot key and the forwarding table slot field. The egress channel is defined by both the port number and the channel number. The target end panel points to the home appliance control panel. The priority flag indicates the selection order of the matching path. The fallback match flag records alternative matching sources when the protocol identifier or port number is inconsistent. The interlocking routing entry is generated by the key-value verification submodule, the protocol filtering submodule, and the link connection submodule, and outputs to the end panel receipt module. Key-value verification submodule: The key-value verification submodule calls the protocol slot key, port number, channel number, and device identifier to read the protocol slot key, protocol identifier, port number, channel number, and device identifier in the home gateway forwarding table, extracts the corresponding byte bits and field sequence number of the fields, compares the correspondence between the protocol slot key and the slot field in the forwarding table, forms the correspondence between the field difference status and the slot verification baseline status, and generates the slot matching sequence value; The slot matching sequence value is a data object representing the matching status between the protocol slot key and the candidate in the home gateway forwarding table. It carries the slot field consistency status, protocol identifier correspondence status, port number correspondence status, channel number correspondence status, device identifier correspondence status, and field sequence number. The home gateway forwarding table is a route candidate table stored by the home gateway, containing the protocol slot key, protocol identifier, port number, channel number, and device identifier corresponding to each home appliance. The key-value verification submodule first compares whether the protocol slot key corresponds to the forwarding table slot field, and then reads the corresponding fields of port number, channel number, and device identifier. If the slot fields do not match, the candidate forwarding table entry is marked as slot mismatch. If the slot fields match but the protocol or port differs, the slot matching order value passes the difference status to the protocol filtering submodule. Protocol filtering submodule: The protocol filtering submodule obtains the Wi-Fi protocol identifier and the protocol identifier in the home gateway forwarding table based on the slot matching sequence value, reads the protocol field byte bits and protocol sequence number value, and determines whether the status bits corresponding to the protocol identifier are consistent. When the status bits of the protocol field are inconsistent, it filters the forwarding table entries that are consistent with the byte content corresponding to the Wi-Fi protocol identifier and establishes protocol association and location. Protocol association is a fallback matching data object formed when protocol fields are inconsistent. It carries the Wi-Fi protocol identifier, forwarding table protocol identifier, protocol field bytes, protocol consistency candidates, and fallback matching flags. When protocol identifiers are inconsistent, the protocol filtering submodule does not directly discard candidate paths, but instead re-filters forwarding table entries based on the Wi-Fi protocol identifier consistency status, so that candidate routes within the same protocol domain can enter the subsequent link connection judgment. If no matching forwarding table entry with the Wi-Fi protocol identifier exists, the protocol association location outputs a protocol filtering failure status. If a matching candidate exists, the protocol association location output is sent to the link connection submodule for interlocking selection of port number and device identifier. Link Connection Submodule: The link connection submodule locates based on protocol association, reads the corresponding field contents of port number, device identifier, and channel number, and determines whether the status bits of the port number field are consistent. When the status bits of the port number field are inconsistent, it filters the forwarding table entries with consistent contents corresponding to the device identifier, concatenates the corresponding field sequence of protocol slot key, port number, and channel number, and obtains the interlocking routing entry.
[0025] When the port numbers match, the link connection submodule directly concatenates the protocol slot key, port number, channel number, and device identifier to form the correspondence between the outgoing channel and the target end board. When the port numbers do not match, the module selects a forwarding table entry based on the matching status of the device identifier and writes a fallback matching flag, indicating that the routing entry was obtained through device identity fallback matching. The channel number is used to limit the wireless communication outgoing channel, and the device identifier is used to limit the target end board. If the device identifiers also cannot match, the link connection submodule outputs a route interlocking failure status. Valid interlocked route entries are output to the end-board receipt module, and the protocol filtering and port backoff matching process is retained for route correction in case of inconsistencies in the receipts.
[0026] Please see Figure 2 and Figure 7Endboard Receipt Module: The endboard receipt module monitors the status code returned by the home appliance control board based on the interlocking routing entry, confirms the response and sending timestamp, compares the home appliance addressing token in the control command frame with the combined values of device type identifier, room identifier, Wi-Fi protocol identifier and device identifier stored on the control board. If the combined values are inconsistent, it calls other forwarding table entries under the same protocol slot key to re-judge and establishes a route correction record. The route correction record is a data object used to correct and trace control receipts and route matching results. It consists of an abnormal slot number, a candidate entry number, a receipt status, a time index, and a correction result flag. The abnormal slot number records the abnormal slot corresponding to the protocol slot key; the candidate entry number records the forwarding entries that are re-evaluated under the same slot key; the receipt status records the status code and response status returned by the home appliance control board; the time index records the sending timestamp and receipt order; and the correction result flag records whether route correction is complete. The route correction record is generated by the status acquisition submodule, the identifier verification submodule, and the route revision submodule. Status Acquisition Submodule: Based on interlocking routing items, the status acquisition submodule monitors the status codes returned by the home appliance control board, reads the corresponding byte bits, response sequence number and sending timestamp field values of the status code, compares the interval status between the response sequence number and the timestamp field, determines whether the length of the status code field is consistent with the length of the response field, arranges the status field content in chronological order, and generates a response timing index. The response sequence index is a time-ordered data object of the home appliance control board's acknowledgment status, carrying the status code, status code byte size, response sequence number, sending timestamp, status field length, response field length, and time order. The status code originates from the acknowledgment data after the home appliance control board executes the control command. The response sequence number is used to mark the control frame corresponding to the acknowledgment, and the sending timestamp is used to establish an association between the control frame sending action and the control board's acknowledgment action. If the response sequence number and the sending timestamp do not match, or if the length of the status code field does not match the length of the response field, the status acquisition submodule outputs an error receipt status. The valid response sequence index is output to the identification verification submodule to confirm whether the identity combination value stored on the control board is consistent with the control command; Identification Verification Submodule: The identification verification submodule calls the response timing index to obtain the appliance addressing token in the control command frame, reads the combined value of device type identifier, room identifier, Wi-Fi protocol identifier and device identifier stored on the control board, compares the byte status of the corresponding field of the appliance addressing token with the combined value, determines whether the corresponding bits of the field are consistent, and establishes an identification matching association value. The identifier matching association value is a status data object indicating the consistency between the control command addressing token and the home appliance control board identity combination value. It carries the home appliance addressing token field, the device type identifier, room identifier, Wi-Fi protocol identifier, device identifier, field corresponding bits, and consistency status stored on the control board. The combination value stored on the control board comes from the home appliance end board factory registration or gateway network binding record and is used to confirm whether the control command reaches the correct target end board. When the appliance addressing token matches the combined value stored on the control board, the matching associated value record is marked as having a matching status. If any field is inconsistent, the matching associated value record is marked as having an inconsistent combined value status, and this is output to the routing revision submodule. Inconsistent combined values do not directly delete the receipt; instead, they trigger a re-verification of all other forwarding table entries under the same protocol slot key. Route Revision Submodule: The route revision submodule matches the associated value based on the identifier, reads the sequence number of the forwarding table entry corresponding to the protocol slot key, and determines whether the status bits of the combined value field are consistent. When the status bits of the combined value field are inconsistent, it calls the other forwarding table entries under the same protocol slot key to recheck the corresponding contents of the device type identifier, room identifier, Wi-Fi protocol identifier, and device identifier, and obtains the route correction record.
[0027] When the combined values are inconsistent, the route correction submodule reads the remaining candidate entries under the same protocol slot key from the home gateway's forwarding table and re-verifies them according to the field order of device type identifier, room identifier, Wi-Fi protocol identifier, and device identifier. If the candidate entry matches the combined value stored on the control board, the module generates a correction result flag and writes the candidate entry number to the route correction record. If the candidate entries are still inconsistent, the module retains the abnormal slot number, candidate entry number, and receipt status for subsequent maintenance of the home gateway's registration form or forwarding table. When the route correction record is output, it can trace back to the home appliance control command, home appliance addressing token, protocol slot key, interlocking routing entry and response timing index, so that the Internet of Things system of home appliances forms a closed link from user mobile phone selection, home gateway addressing, forwarding table routing, control board receipt to route correction.
[0028] Please see Figure 8 S1: Collect the home appliance, device type identifier, room identifier, command identifier, Wi-Fi protocol identifier, and device identifier selected by the user's mobile phone, verify the total length of the field, the length field, and the starting position of the field, write each identifier into the corresponding field, and generate home appliance control instructions. S1 is executed by the instruction framing module. The user's mobile phone submits the selected home appliance, control command, and target device identity field to the instruction framing module. The instruction framing module first forms a control identity sequence, and then writes the device type identifier, room identifier, command identifier, Wi-Fi protocol identifier, and device identifier into the control frame fields based on the frame field consistency status. If the total field length, length field, or field start position does not meet the frame field rules, S1 outputs a framing pending confirmation status and does not proceed to S2. Please see Figure 8 S2: Based on the home appliance control command, call the device type identifier, room identifier, Wi-Fi protocol identifier, and device identifier in the home gateway registration table, compare the consistency of the four code values, concatenate the consistent code values according to the field order and bind them to the device identifier to generate a home appliance addressing token; S2 is executed by the token generation module. Upon receiving an appliance control command, the token generation module parses the command frame fields and compares them with the code values in the home gateway registration table. If the device type identifier, room identifier, Wi-Fi protocol identifier, and device identifier all match the registered fields, the module concatenates the matching code values in field order and writes them to the device identifier binding bit, forming an appliance addressing token. If any registered field is inconsistent, S2 outputs a token pending confirmation status. Please see Figure 8 S3: Based on the appliance addressing token, read the MAC address, port number, channel number, and device identifier from the home gateway registration table, convert the hexadecimal characters of the MAC address into decimal values, form the relationship between the segmented cumulative value and the remainder of the number of hash table buckets, concatenate the remainder with the Wi-Fi protocol identifier and bind it to the port number and channel number to obtain the protocol slot key; S3 is executed by the slot location module. The slot location module reads the registration table record bound to the appliance addressing token and obtains the MAC address, port number, channel number, and device identifier from the registration table. The MAC address is split into conversion segments conforming to address format rules. After the conversion segments form decimal numerical states, a segment accumulation relationship is established, and then a remainder relationship is formed with the number of hash table buckets. The module concatenates the bucket status corresponding to the remainder relationship with the Wi-Fi protocol identifier and binds it to the port number, channel number, and device identifier to obtain the protocol slot key. If the address characters, port field, or channel field cannot be confirmed, S3 outputs a slot pending confirmation status. Please see Figure 8 S4: Call the protocol slot key, port number, channel number, and device identifier, and compare the protocol slot key, protocol identifier, port number, channel number, and device identifier in the home gateway forwarding table to see if they match. If the protocol identifier does not match, select the forwarding table entry that matches the Wi-Fi protocol identifier. If the port number does not match, select the forwarding table entry that matches the device identifier and generate an interlocking routing entry. S4 is executed by the routing interlocking module. The routing interlocking module reads the protocol slot key and retrieves candidate entries from the home gateway forwarding table. If the slot fields match, the module continues to check the protocol identifier, port number, channel number, and device identifier. If the protocol identifiers do not match, the module re-filters the forwarding table entries based on matching Wi-Fi protocol identifiers; if the port numbers do not match, the module filters the forwarding table entries based on matching device identifiers. After filtering, an interlocked routing entry containing ingress constraints, egress channels, and target endboards is formed. If none of the candidate entries meet the fallback matching rules, S4 outputs a routing interlocking failure status. Please see Figure 8 S5: Based on the interlocking routing entry, monitor the status code returned by the home appliance control board, confirm the response and sending timestamp, compare the home appliance addressing token in the control command frame with the combined values of the device type identifier, room identifier, Wi-Fi protocol identifier and device identifier stored on the control board. If the combined values are inconsistent, call other forwarding table entries under the same protocol slot key to re-judge and establish a routing correction record.
[0029] S5 is executed by the end-board acknowledgment module. The end-board acknowledgment module monitors the status code returned by the target home appliance control board based on the interlocking routing entry, and forms a response sequence index based on the response sequence number and sending timestamp. Subsequently, the module verifies the consistency of the appliance addressing token in the control command frame with the combined values of the device type identifier, room identifier, Wi-Fi protocol identifier, and device identifier stored on the control board. If the combined values match, the control acknowledgment is confirmed; if the combined values do not match, the module calls other forwarding table entries under the same protocol slot key to re-verify and generate a routing correction record. This control method forms a consistent data closed loop with the home appliance's IoT system within the same home gateway communication link.
[0030] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. An Internet of Things (IoT) system for home appliances, characterized in that, The system includes: The instruction framing module collects the home appliances selected by the user's mobile phone, including device type identifier, room identifier, command identifier, Wi-Fi protocol identifier, and device identifier. It verifies the total length of the fields, the length field, and the starting position of the fields. It then writes each identifier according to the starting position of the fields to generate home appliance control instructions. The token generation module reads the device type identifier, room identifier, Wi-Fi protocol identifier and device identifier from the home gateway registration table based on the home appliance control command, compares the consistency of the four code values, concatenates the consistent code values in the field order and binds them to the device identifier to generate a home appliance addressing token. Based on the appliance addressing token, the slot positioning module reads the MAC address, port number, channel number and device identifier from the home gateway registration table, converts the MAC address hexadecimal characters to decimal values, calculates the remainder between the segmented cumulative value and the number of hash table buckets, concatenates the remainder and the Wi-Fi protocol identifier and binds the port number and channel number to obtain the protocol slot key; The routing interlocking module calls the protocol slot key, port number, channel number and device identifier, compares the protocol slot key, protocol identifier, port number, channel number and device identifier in the home gateway forwarding table to see if they match. If the protocol identifiers do not match, the forwarding table entry is selected based on the Wi-Fi protocol identifiers. If the port numbers do not match, the forwarding table entry is selected based on the device identifiers. This generates an interlocking routing entry. Based on the interlocking routing entry, the end board receipt module monitors the status code returned by the home appliance control board, confirms the response and sending timestamp, compares the home appliance addressing token in the control command frame with the combined values of the device type identifier, room identifier, Wi-Fi protocol identifier and device identifier stored on the control board. If the combined values are inconsistent, it calls other forwarding table entries under the same protocol slot key to re-judge and establishes a routing correction record.
2. The Internet of Things (IoT) system for home appliances according to claim 1, characterized in that: The appliance control command includes a control frame header, command payload, field boundary code, and integrity check code; the appliance addressing token includes a target identity code, spatial ownership code, protocol domain code, token signature, and binding index; the protocol slot key includes a bucket index, protocol prefix, port label, channel label, device association bit, and slot check bit; the interlocking routing entry includes an ingress constraint, an egress channel, a target end board, a priority flag, and a fallback matching flag; the routing correction record includes an abnormal slot number, a candidate entry number, a receipt status, a time index, and a correction result flag.
3. The Internet of Things (IoT) system for home appliances according to claim 1, characterized in that: The process of converting the MAC address hexadecimal characters to decimal values involves reading the MAC address from the home gateway registration table, retaining twelve MAC address hexadecimal characters, and forming a conversion segment with every two MAC address hexadecimal characters, resulting in six conversion segments.
4. The Internet of Things system for home appliances according to claim 1, characterized in that: The calculation of the segmented cumulative value and the remainder of the hash table bucket count includes: converting the six conversion segments into decimal values respectively, and accumulating them according to the order of adjacent conversion segments in the MAC address to obtain five segmented cumulative values; taking the remainder of each of the five segmented cumulative values with the hash table bucket count to obtain five remainders; and associating the five remainders with the Wi-Fi protocol identifier, port number, channel number, and device identifier to form the protocol slot key.
5. The Internet of Things (IoT) system for home appliances according to claim 1, characterized in that, The instruction framing module includes: The identification acquisition submodule collects the home appliances selected by the user's mobile phone, including device type identifiers, room identifiers, command identifiers, Wi-Fi protocol identifiers, and device identifiers. It reads the selected serial number of the home appliances, the character code points and byte width of the identifiers according to the sampling order of the user's mobile phone, calculates the association value between the identifier byte size and the category serial number, and concatenates the association values according to the sampling order to obtain the control identity sequence. The field verification submodule obtains the total instruction byte threshold, length field byte size, length field storage bits, field start position number, and field number step size value based on the control identity sequence. It determines whether the difference between the total encoded byte size and the total instruction byte threshold is zero, and verifies that the length field storage bits, field start position number, and field number step size value form an increasing relationship to generate a frame domain consistency state. The frame body writing submodule calls the frame domain consistency state and the control identity sequence, detects the license code corresponding to the frame domain consistency state, determines whether the license code is one, and writes the device type identifier, room identifier, command identifier, Wi-Fi protocol identifier, and device identifier into the corresponding fields in sequence according to the field start position number when the license code is one. It then concatenates the field header code and field end code to obtain the home appliance control command.
6. The Internet of Things (IoT) system for home appliances according to claim 1, characterized in that, The token generation module includes: Based on the home appliance control command, the instruction parsing submodule obtains the device type identifier, room identifier, Wi-Fi protocol identifier, and device identifier in the instruction frame, reads the field offset sequence number and field length value corresponding to the identifier, calculates the correspondence between the field offset sequence number and the field length value, determines whether the field byte arrangement is continuous, reassembles the identifier byte stream according to the field order, and generates a field mapping sequence. The code value verification submodule calls the field mapping sequence to obtain the device type identifier, room identifier, Wi-Fi protocol identifier, and device identifier from the home gateway registration table. It extracts the byte bits of the registration field and the corresponding byte bits of the field mapping sequence value, compares the byte difference of the corresponding field with the field verification benchmark value, determines whether the corresponding positions of the four fields are consistent, and establishes a code segment consistency index. The token binding submodule reads the byte sequence number corresponding to the consistency field and the device identifier binding bit according to the code segment consistency index, filters the field sequence with the status bit as one in the code segment consistency index value, concatenates the device type identifier, room identifier, and Wi-Fi protocol identifier according to the field order, and writes them into the device identifier binding bit to obtain the home appliance addressing token.
7. The Internet of Things (IoT) system for home appliances according to claim 1, characterized in that, The slot positioning module includes: The address conversion submodule reads the MAC address, port number, channel number, and device identifier from the home gateway registration table based on the home appliance addressing token, extracts the hexadecimal character group and character position number from the MAC address, converts the corresponding decimal value according to the character position number, calculates the segment accumulation between adjacent decimal values, verifies the correspondence between the segment accumulation and the character group length, and generates the address segment sequence. The Remainder Alignment Submodule calls the address segment sequence, obtains the number of hash table buckets and Wi-Fi protocol identifier, reads the segment accumulation and corresponding bit width of the number of buckets in the address segment sequence value, calculates the remainder between the segment accumulation and the number of hash table buckets, determines whether the length of the remainder bytes is consistent with the length of the protocol identifier field, arranges the remainder bytes according to the protocol field order, and establishes a bucket mapping index. The slot key binding submodule reads the corresponding field sequence numbers of the Wi-Fi protocol identifier, port number, and channel number based on the bucket mapping index, filters the matching field bits in the bucket mapping index value, concatenates the remaining number bytes with the Wi-Fi protocol identifier, binds the corresponding field content of the port number and channel number, and writes the device identifier association bit to obtain the protocol slot key.
8. The Internet of Things (IoT) system for home appliances according to claim 1, characterized in that, The routing interlocking module includes: The key-value verification submodule calls the protocol slot key, port number, channel number, and device identifier to read the protocol slot key, protocol identifier, port number, channel number, and device identifier in the home gateway forwarding table, extracts the corresponding byte bits and field sequence number of the fields, compares the correspondence between the protocol slot key and the slot field in the forwarding table, calculates the field difference and the corresponding status of the slot verification benchmark value, and generates the slot matching sequence value. The protocol filtering submodule obtains the Wi-Fi protocol identifier and the protocol identifier in the home gateway forwarding table according to the slot matching sequence value, reads the protocol field byte bits and protocol sequence number value, and determines whether the status bits corresponding to the protocol identifier are consistent. When the status bits of the protocol field are inconsistent, it filters the forwarding table entries that are consistent with the byte content corresponding to the Wi-Fi protocol identifier and establishes protocol association and location. The link connection submodule locates based on the protocol association, reads the corresponding field contents of port number, device identifier, and channel number, and determines whether the status bits of the port number field are consistent. When the status bits of the port number field are inconsistent, it filters forwarding table entries with consistent contents corresponding to the device identifier, concatenates the corresponding field sequences of protocol slot key, port number, and channel number, and obtains the interlocking routing entry.
9. The Internet of Things (IoT) system for home appliances according to claim 1, characterized in that, The endplate receipt module includes: The status acquisition submodule monitors the status codes returned by the home appliance control board based on the interlocking routing item, reads the corresponding byte bits, response sequence number and sending timestamp field value of the status code, compares the correspondence between the response sequence number and the timestamp field interval value, determines whether the length of the status code field is consistent with the length of the response field, arranges the status field content in chronological order, and generates a response timing index. The identification verification submodule calls the response timing index to obtain the appliance addressing token in the control command frame, reads the combined value of device type identifier, room identifier, Wi-Fi protocol identifier and device identifier stored on the control board, compares the byte status of the corresponding field of the appliance addressing token with the combined value, determines whether the corresponding bits of the field are consistent, and establishes an identifier matching association value. The route correction submodule matches the associated value based on the identifier, reads the sequence number of the forwarding table entry corresponding to the protocol slot key, and determines whether the status bits of the combined value field are consistent. When the status bits of the combined value field are inconsistent, it calls the other forwarding table entries under the same protocol slot key to recheck the corresponding contents of the device type identifier, room identifier, Wi-Fi protocol identifier and device identifier, and obtains the route correction record.
10. A method for controlling a household appliance, characterized in that, The Internet of Things (IoT) system for home appliances according to any one of claims 1-9 includes the following steps: S1: Collect the home appliance, device type identifier, room identifier, command identifier, Wi-Fi protocol identifier, and device identifier selected by the user's mobile phone, verify the total length of the field, the length field, and the starting position of the field, write each identifier into the corresponding field, and generate home appliance control instructions. S2: Based on the home appliance control command, call the device type identifier, room identifier, Wi-Fi protocol identifier, and device identifier in the home gateway registration table, compare the consistency of the four code values, concatenate the consistent code values according to the field order and bind them to the device identifier to generate a home appliance addressing token. S3: Based on the appliance addressing token, read the MAC address, port number, channel number, and device identifier from the home gateway registration table, convert the hexadecimal characters of the MAC address to decimal values, calculate the remainder between the segmented cumulative value and the number of hash table buckets, concatenate the remainder with the Wi-Fi protocol identifier and bind it to the port number and channel number to obtain the protocol slot key; S4: Call the protocol slot key, port number, channel number, and device identifier, compare the protocol slot key, protocol identifier, port number, channel number, and device identifier in the home gateway forwarding table to see if they match. If the protocol identifier does not match, select the forwarding table entry that matches the Wi-Fi protocol identifier. If the port number does not match, select the forwarding table entry that matches the device identifier and generate an interlocking routing entry. S5: Based on the interlocking routing entry, monitor the status code returned by the home appliance control board, confirm the response and sending timestamp, compare the home appliance addressing token in the control command frame with the combined values of the device type identifier, room identifier, Wi-Fi protocol identifier and device identifier stored on the control board, and if the combined values are inconsistent, call the other forwarding table entries under the same protocol slot key to re-judge and establish a routing correction record.