A hotel room control method and system based on PLC communication technology

By generating link fingerprint sets and electrical topology diagrams, and calculating link volatility, dynamic decomposition and closed-loop control of the hotel room control system were realized. This solved the problems of insufficient link state quantization and branch association modeling, and improved the dynamics and accuracy of the control sequence.

CN122284484APending Publication Date: 2026-06-26SHANDONG BITTEL INTELLIGENT TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANDONG BITTEL INTELLIGENT TECH CO LTD
Filing Date
2026-04-02
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing PLC communication control methods suffer from insufficient link state quantization, inadequate branch association modeling, static generation of control sequences, and issues regarding how to achieve closed-loop hierarchical control based on link fluctuations and topology relationships.

Method used

By collecting PLC detection messages from guest rooms, a link fingerprint set is generated, an electrical topology twin graph is constructed, link volatility is calculated, a scene action split set is generated, and feedback correction and update results are generated based on execution feedback.

Benefits of technology

It achieves structured modeling of the link state and node association of controlled nodes, supports data-driven split processing and closed-loop control, improves the dynamics and accuracy of control sequences, and reduces semi-complete states.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122284484A_ABST
    Figure CN122284484A_ABST
Patent Text Reader

Abstract

This invention discloses a hotel room control method and system based on PLC communication technology, belonging to the field of building automation control technology. The method includes collecting PLC detection messages in the guest room and generating a guest room PLC link fingerprint set, constructing a guest room electrical topology twin graph. Based on the guest room PLC link fingerprint set and the guest room electrical topology twin graph, the method calculates the guest room PLC link volatility, and generates a scene action breakdown set based on the guest room PLC link volatility and the guest room electrical topology twin graph. Based on the scene action breakdown set, a scene-level control sequence is generated, and feedback correction update results are generated based on the execution feedback. This invention, with link feature acquisition, graph data modeling, state variable calculation, action set splitting, queue arrangement, and feedback update as the main lines, forms a digital processing closed loop for guest room end-point control, transforming the control process from fixed template execution to an adaptive processing flow based on state data, enhancing the computability, associativity, and updability of the control data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of building automation control technology, specifically to a hotel room control method and system based on PLC communication technology. Background Technology

[0002] With the development of building automation, field node control, and distributed execution technologies, hotel guest rooms have evolved from traditional discrete switch control to room-level automatic control systems oriented towards lighting, air conditioning terminals, curtains, and status acquisition nodes. Existing systems typically consist of a control gateway, controlled guest room nodes, and status acquisition units. By collecting node status, generating control sequences, and issuing execution commands, they achieve guest room mode switching and linked control of terminal equipment. PLC communication technology in these systems primarily serves as the transmission carrier for control commands and status data, supporting the automatic control process at the guest room terminal.

[0003] Existing hotel room control methods based on PLC communication technology mostly rely on preset scene templates to drive the actions of end devices. The control process fails to adequately utilize the coupling between link states, node relationships, and execution feedback, thus resembling a fixed control program rather than an automatic control method that adjusts control based on state changes. Existing methods typically determine whether control can continue based solely on whether a node responds or a message is retransmitted, lacking a joint processing mechanism for link fluctuations, node state offsets, and branch relationship changes, making it difficult to generate state variables directly usable for control decisions. Existing methods usually treat a single controlled node as the control object, underutilizing the branch relationships and action dependencies between controlled nodes within the same room, making it difficult to reflect node collaborative constraints in the control sequence generation process. In room control processes such as welcome mode, sleep mode, check-out mode, or cleaning mode, existing methods often use package-based distribution or fixed-priority execution, lacking a processing mechanism to break down, sort, and reorganize device actions based on real-time state changes. Existing methods typically only utilize execution feedback at the level of acknowledgment, without further writing back the execution results and using them to correct subsequent control sequences. Therefore, a closed-loop automatic control process centered around detection, comparison, adjustment, and updating has not yet been formed. Summary of the Invention

[0004] In view of the above-mentioned problems, the present invention is proposed.

[0005] Therefore, the technical problem solved by this invention is that existing PLC communication control methods suffer from insufficient link state quantization, insufficient branch association modeling, static generation of control sequences, and the problem of how to achieve closed-loop hierarchical control based on link fluctuations and topology relationships.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: a hotel room control method based on PLC communication technology, comprising collecting PLC detection messages in the guest room and generating a PLC link fingerprint set in the guest room, and constructing a twin graph of the electrical topology of the guest room.

[0007] The volatility of the guest room PLC link is calculated based on the guest room PLC link fingerprint set and the guest room electrical topology twin graph. A scene action split set is generated based on the guest room PLC link volatility and the guest room electrical topology twin graph.

[0008] The scene action split set is used to generate a scene-level control sequence, and the execution feedback is used to generate feedback correction and update results.

[0009] As a preferred embodiment of the hotel room control method based on PLC communication technology described in this invention, the step of collecting guest room PLC probe messages and generating a guest room PLC link fingerprint set includes: the floor control gateway sending PLC probe messages to each guest room controlled node during guest room control idle time slots and receiving response messages returned by each guest room controlled node. At least three parameters are extracted from the response messages: carrier impulse response peak position, carrier impulse response peak amplitude, number of retransmissions per unit time window, bit error correlation value, zero-crossing jitter, and round-trip delay fluctuation. The extracted parameters are normalized and time-aligned according to the guest room number, node address, and sampling time. Abnormal samples caused by incomplete responses, node offline, and busy guest room control are removed. The retained samples are grouped into corresponding time-series parameter groups according to the controlled nodes and summarized into a guest room PLC link fingerprint set.

[0010] As a preferred embodiment of the hotel room control method based on PLC communication technology described in this invention, the construction of the guest room electrical topology twin graph includes: using each guest room controlled node as a graph node, and using the similarity of response delay, co-occurrence of bit errors, change in retransmission synchronization, and consistency of coupling disturbance between nodes within the same sampling period as branch association criteria. When the criteria corresponding to any two graph nodes continuously meet the preset association establishment conditions, a graph edge is established between the two graph nodes, and the edge weight is set as the branch association strength value. The branch cluster identifier, historical stable sample reference position, and current real-time sample reference position of each graph node are recorded. When a new guest room PLC link fingerprint set enters, the affiliation of each graph node and the graph edge parameters are updated according to the change in graph edge weight and the consistency change result within the branch cluster, forming a guest room electrical topology twin graph corresponding to the current guest room PLC communication status.

[0011] As a preferred embodiment of the hotel room control method based on PLC communication technology described in this invention, the calculation of the guest room PLC link volatility based on the guest room PLC link fingerprint set and the guest room electrical topology twin graph includes: calling the current sample of each controlled node in the guest room PLC link fingerprint set, and calling the historical stable sample associated with the corresponding graph node in the guest room electrical topology twin graph as the reference sample. The carrier impulse response difference, coupling disturbance change, unit time window retransmission offset, and timing jitter offset between the current sample and the reference sample are calculated respectively. After processing each offset with the same dimensions, they are synthesized according to a preset weight to obtain the node volatility value of each controlled node in the guest room. Based on the graph edge weights and branch cluster identifiers in the guest room electrical topology twin graph, the node volatility value is mapped to the corresponding branch volatility value and the overall guest room volatility value. When the overall guest room volatility value reaches the guest room scene splitting trigger line, the guest room PLC link volatility value, which includes the volatility values ​​of each branch and the overall guest room volatility value, is output.

[0012] As a preferred embodiment of the hotel room control method based on PLC communication technology described in this invention, the step of generating a scene action split set based on the guest room PLC link fluctuation and the guest room electrical topology twin graph includes: upon receiving any target guest room scene from the welcome mode, sleep mode, check-out mode, or cleaning mode, parsing the target guest room scene into corresponding device action units, and writing target node, target state, action sequence, dependent actions, and branch cluster identifier for each device action unit. The guest room PLC link fluctuation is used to determine whether the corresponding branch cluster is in a split execution state. When the corresponding branch cluster is in a split execution state, the device action units are sorted and grouped according to their timing sensitivity, number of dependent actions, guest room scene main state correlation, and the fluctuation value of their respective branch cluster. Device action units that meet the guest room main state correlation determination conditions and whose dependent actions are not missing are written into the critical scene action subset, and the remaining device action units are written into the non-critical scene action subset. The two subsets and their corresponding node relationships are then summarized to generate a scene action split set.

[0013] As a preferred embodiment of the hotel room control method based on PLC communication technology described in this invention, the step of generating a scene-level control sequence based on a scene action split set includes: establishing execution queues for key scene action subsets and non-key scene action subsets recorded in the scene action split set. For the device action units in the key scene action subset, a local control token, priority transmission time slot, node confirmation order, and corresponding branch cluster distribution order are generated and written into the key execution queue according to the priority transmission time slot and node confirmation order. For the device action units in the non-key scene action subset, a delayed distribution flag or a local compensation script call flag is generated and written into the compensation execution queue according to the branch cluster identifier and action timing. The key execution queue and the compensation execution queue are merged according to the guest room control order of key first, then non-key, to form a scene-level control sequence.

[0014] As a preferred embodiment of the hotel room control method based on PLC communication technology described in this invention, the step of generating feedback correction update results based on execution feedback includes: after the execution of the scene hierarchical control sequence, collecting instruction confirmation information, equipment status information, and scene completion status information returned by each controlled node in the guest room, and comparing the collected information with the corresponding equipment action units in the scene action decomposition set item by item. When there are unconfirmed equipment action units, inconsistent status equipment action units, or conflicting equipment action units within the same branch cluster in the key scene action subset, a corresponding branch correction instruction or local rollback instruction is generated. After the branch correction instruction or local rollback instruction is executed, the new confirmation information and status information are written back to the corresponding timing parameter group in the guest room PLC link fingerprint set, and the graph edge weights, branch cluster identifiers, and sample reference positions in the guest room electrical topology twin graph are updated synchronously to form feedback correction update results.

[0015] As a preferred embodiment of the hotel room control system based on PLC communication technology described in this invention, it includes a link state modeling module, a scene adaptive splitting module, and a closed-loop hierarchical control module.

[0016] The link state modeling module is used to collect guest room PLC detection messages and generate a guest room PLC link fingerprint set to construct a guest room electrical topology twin graph.

[0017] The scene adaptive splitting module is used to calculate the fluctuation of the guest room PLC link based on the guest room PLC link fingerprint set and the guest room electrical topology twin graph, and to generate a scene action splitting set based on the guest room PLC link fluctuation and the guest room electrical topology twin graph.

[0018] The closed-loop hierarchical control module is used to generate a scene hierarchical control sequence based on the scene action split set, and to generate feedback correction and update results based on the execution feedback.

[0019] The beneficial effects of this invention are: By collecting PLC detection messages from guest rooms, extracting multi-dimensional link parameters, and constructing a guest room PLC link fingerprint set, while simultaneously establishing a guest room electrical topology twin graph, structured modeling of the controlled node link status and node relationships was achieved. This provides a unified input data and graph data foundation for subsequent data comparison, fluctuation calculation, and control decision-making. It achieves the beneficial effect of transforming discrete message information into computable state characteristics, improving the accuracy of subsequent digital discrimination and correlation analysis.

[0020] By calculating the differences between current samples and historical stable samples, processing them with the same dimensions, and synthesizing them with weights, the volatility of the guest room PLC link is generated. This volatility is then combined with a twin graph of the guest room electrical topology to form a scene action decomposition set, achieving a continuous mapping from raw feature data to control state variables and then to action data structures. This supports data-driven decomposition processing based on real-time status. It achieves the beneficial effect of converting static scene templates into execution datasets that can be dynamically recombined according to branch states.

[0021] By generating key execution queues and compensation execution queues based on scenario action splitting sets, and generating feedback correction and update results based on execution feedback, an integrated closed-loop processing of control sequence orchestration, execution result comparison, and status data write-back and update is achieved. It supports sequential scheduling, exception retransmission, and status rollback of device action units. This achieves the beneficial effect of transforming a one-time instruction issuance process into a verifiable, correctable, and iteratively updateable data processing flow. Attached Figure Description

[0022] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the 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.

[0023] Figure 1 The above is an overall flowchart of a hotel room control method based on PLC communication technology provided in Embodiment 1 of the present invention. Detailed Implementation

[0024] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.

[0025] Example 1, referring to Figure 1As an embodiment of the present invention, a hotel room control method based on PLC communication technology is provided, comprising: S1: Collect guest room PLC detection messages and generate guest room PLC link fingerprint set to construct a guest room electrical topology twin graph.

[0026] The floor control gateway sends PLC probe messages to each controlled node in the guest rooms during idle time slots and receives response messages from each controlled node. Based on the response messages, at least three parameters are extracted from the following: carrier impulse response peak location, carrier impulse response peak amplitude, number of retransmissions per unit time window, bit error correlation value, zero-crossover jitter, and round-trip delay fluctuation. The extracted parameters are normalized and time-aligned according to the guest room number, node address, and sampling time. Abnormal samples with incomplete responses, offline nodes, or those generated during busy periods of guest room control are removed. The retained samples are grouped into corresponding time-series parameter sets according to the controlled nodes and summarized into a guest room PLC link fingerprint set.

[0027] Furthermore, the idle time slot for guest room control is defined as a time window in which no scene issuance, status feedback conflict, or manual panel control occurs within a continuous 2 seconds. The floor control gateway polls and sends PLC probe messages in order of guest room number. Each controlled node in each guest room sends 5 frames per round, with a frame interval of 200ms and a single frame length of 32 bytes, including at least the guest room number, node address, message sequence number, sending timestamp, and checksum field.

[0028] Furthermore, the carrier impulse response peak position is the sampling point number corresponding to the first main peak after matched filtering of the response message, and the carrier impulse response peak amplitude is the ratio of the main peak amplitude to the maximum amplitude of this round. The number of retransmissions per unit time window is calculated as the total number of timeout retransmissions and verification failure retransmissions within a 60-second statistical window. The bit error rate is the bit error rate value, which is the ratio of the number of erroneous bits to the total number of received bits within 60 seconds. The zero-crossing jitter is measured as the average absolute value of the deviation between adjacent AC zero-crossing points and the standard 10ms half-cycle interval. The round-trip delay fluctuation is measured as the range of the round-trip delay of 5 frames. The matched filtering uses a fixed training sequence preset in the PLC probe message as a reference template. The fixed training sequence is 16 bytes long, and the floor control gateway and each guest room controlled node pre-store this fixed training sequence.

[0029] Furthermore, the normalized numbering uses a three-element index of room number-node address-sampling time. Time alignment is based on the local clock of the floor control gateway, mapping all parameters collected in the same round to the same sampling period. Abnormal samples are removed according to the following rules: fewer than 3 valid responses in 5 frames, continuous offline time exceeding 30 seconds, or execution of room scene commands during sampling. The timing parameter group continuously stores data from at least the most recent 120 sampling periods, with each sampling period lasting 1 minute.

[0030] Each guest room's controlled node is used as a graph node, and the similarity of response delay, co-occurrence of bit errors, change in retransmission synchronization, and consistency of coupling disturbances among nodes within the same sampling period are used as branch association criteria. When the criteria corresponding to any two graph nodes continuously meet the preset association establishment conditions, a graph edge is established between the two graph nodes, and the edge weight is set as the branch association strength value. The branch cluster identifier, historical stable sample reference position, and current real-time sample reference position are recorded for each graph node. When a new guest room PLC link fingerprint set is entered, the affiliation of each graph node and the graph edge parameters are updated according to the change in graph edge weight and the consistency change results within the branch cluster, forming a guest room electrical topology twin graph corresponding to the current guest room PLC communication status.

[0031] Furthermore, the response delay similarity is taken as the normalized reciprocal of the difference between the mean round-trip delays of the two graph nodes within the same sampling period. The response delay similarity is calculated as 1 / (1+Δt / τ), where Δt is the difference between the mean round-trip delays of the two graph nodes within the same sampling period, and τ is the average of the mean round-trip delays of all graph nodes in the historical stable samples of the last 7 days. The bit error co-occurrence rate is the percentage of times the bit error correlation values ​​of the two graph nodes increase or decrease simultaneously. The retransmission synchronization change rate is the percentage of times the retransmission counts of the two graph nodes change in the same direction within a unit time window. The coupling disturbance consistency rate is the percentage of times the zero-crossing jitter of the two graph nodes changes in the same trend. All four criteria are normalized to 0 to 1.

[0032] Furthermore, the preset association establishment conditions are derived from the statistical results of historical stable samples generated during the 7-day stable operation of the guest room system. The stable operation period is defined as a 7-day period during which the cumulative offline time of each controlled node in the guest room does not exceed 10 minutes, the proportion of abnormal samples does not exceed 5%, and no forced switching of guest room scenarios occurs. Based on this, the following criteria are used: response delay similarity not less than 0.85, bit error co-occurrence not less than 0.70, retransmission synchronization variation not less than 0.75, and coupling disturbance consistency not less than 0.80. If at least three of these four criteria are met for three consecutive sampling periods, the nodes in the two graphs are considered to meet the preset association establishment conditions. The branch association strength value is determined by multiplying the above four criteria by 0.30, 0.20, 0.20, and 0.30 respectively, and then summing the results.

[0033] Furthermore, branch cluster identifiers are divided according to the connectivity of the graph with an edge weight of not less than 0.78. The historical stable sample reference location points to the sample interval in the last 48 hours where the abnormal sample removal rule has not been triggered and no scenario execution command has occurred. When a newly entered guest room PLC link fingerprint set causes the edge weight of any graph edge to decrease by more than 0.15 for two consecutive sampling periods, or when the consistency index of graph nodes within the same branch cluster is lower than 0.65, graph node attribution reassignment and graph edge parameter recalculation are performed, where graph node attribution is updated according to the principle of maximum branch association strength value. The consistency index within a branch cluster is the average of the weighted sum of four branch association criteria between any two graph nodes within the same branch cluster. Graph edge parameter recalculation includes recalculating response delay similarity, bit error co-occurrence, retransmission synchronization change, coupling disturbance consistency, and branch association strength value.

[0034] It should be noted that this step first collects the link characteristics of each controlled node through unified detection messages, then filters out abnormal samples and performs time alignment to form a continuously callable guest room PLC link fingerprint set. Based on this, a guest room electrical topology twin graph is constructed based on node correlation, so that subsequent control no longer relies solely on device addresses, but can identify link changes by combining branch association relationships, providing stable input for scene segmentation and hierarchical control.

[0035] S2: Calculate the fluctuation of the guest room PLC link based on the guest room PLC link fingerprint set and the guest room electrical topology twin graph, and generate a scene action split set based on the guest room PLC link fluctuation and the guest room electrical topology twin graph.

[0036] The system retrieves the current samples of each controlled node in the guest room PLC link fingerprint set and uses the historical stable samples associated with the corresponding graph nodes in the guest room electrical topology twin graph as reference samples. It calculates the carrier impulse response difference, coupling disturbance change, unit time window retransmission offset, and timing jitter offset between the current sample and the reference sample. After processing each offset to the same dimension, they are synthesized according to preset weights to obtain the node fluctuation value of each controlled node in the guest room. Based on the graph edge weights and branch cluster identifiers in the guest room electrical topology twin graph, the node fluctuation value is mapped to the corresponding branch fluctuation value and the overall guest room fluctuation value. When the overall guest room fluctuation value reaches the guest room scene splitting trigger line, the system outputs the guest room PLC link fluctuation degree, which includes the fluctuation values ​​of each branch and the overall guest room fluctuation value. When a target guest room scene is received and the overall guest room fluctuation value has not reached the guest room scene splitting trigger line, all equipment action units corresponding to the target guest room scene are written into the critical scene action subset according to the original action sequence, and the non-critical scene action subset is set to empty to generate a scene action splitting set.

[0037] Furthermore, the current sample is the latest time-series parameter group formed by the controlled node of the same guest room within the current sampling period, and the historical stable sample is the average of the samples from the 10 consecutive sampling periods within the last 48 hours for which the abnormal sample removal rule was not triggered and no guest room scene execution instructions occurred. When there are fewer than 10 available historical stable samples within the last 48 hours, the average of the corresponding samples from the same time period within the last 7 days is used as the alternative benchmark sample.

[0038] Furthermore, the carrier impulse response difference is obtained by weighted summing of the absolute values ​​of the deviations between the peak position and peak amplitude of the carrier impulse response in the current sample and the reference sample, where the peak position deviation has a weight of 0.4 and the peak amplitude deviation has a weight of 0.6. The coupling disturbance change is the absolute value of the difference between the zero-crossing jitter of the current sample and the zero-crossing jitter of the reference sample. The unit time window retransmission offset is the absolute value of the number of retransmissions per unit time window for the current sample minus the number of retransmissions per unit time window for the reference sample. The timing jitter offset is the absolute value of the difference between the round-trip delay fluctuation of the current sample and the round-trip delay fluctuation of the reference sample.

[0039] Furthermore, the same-dimensional processing employs a minimum-maximum normalization method, dividing each offset by its maximum permissible fluctuation boundary value in the most recent 7-day historical stable samples. The maximum permissible fluctuation boundary value is taken as the 95th percentile value of the corresponding parameter in the most recent 7-day historical stable samples. The node fluctuation value is obtained by multiplying the carrier impulse response difference, coupling disturbance change, unit time window retransmission offset, and timing jitter offset by 0.35, 0.25, 0.20, and 0.20 respectively, and then summing them. If the node fluctuation value is greater than 1, it is truncated to 1.

[0040] Furthermore, the branch fluctuation value is the weighted average of the product of the node fluctuation value of each graph node within the same branch cluster and the average of the edge weights of the graph edges connecting that graph node to other graph nodes within the same branch cluster. The overall guest room fluctuation value is the result of a weighted average of all branch fluctuation values ​​according to the number of controlled nodes in each branch cluster. The guest room scene splitting trigger line is set based on the statistical results of a 14-day trial run of the guest room system. The overall guest room fluctuation value without obvious half-execution state is used as the upper bound of the safety interval, and the guest room scene splitting trigger line is set to 0.62. When the fluctuation value of any branch is not less than 0.58 and the overall guest room fluctuation value reaches 0.62, the guest room PLC link fluctuation is output.

[0041] Upon receiving a target guest room scene from any of the following modes—Welcome, Sleep, Check-out, or Cleaning—the scene is parsed into corresponding device action units. For each device action unit, a target node, target state, action sequence, dependent actions, and branch cluster identifier are written. The fluctuation of the guest room PLC link determines whether the corresponding branch cluster is in a split execution state. When the corresponding branch cluster is in a split execution state, the device action units are sorted and grouped according to their timing sensitivity, number of dependent actions, guest room scene main state correlation, and the fluctuation value of their respective branch cluster. Device action units that meet the guest room main state correlation criteria and whose dependent actions are not missing are written into the critical scene action subset, while the remaining device action units are written into the non-critical scene action subset. The two subsets and their corresponding node relationships are then summarized to generate a scene action split set. Device action units in branch clusters not in a split execution state are written into the critical scene action subset in their original action sequence.

[0042] Furthermore, the device action units are generated by the floor control gateway according to the preset template of the target guest room scenario. Each device action unit includes at least the device type, target node address, target status code, planned execution time, prerequisite dependent action identifier, and branch cluster identifier. Dependent actions are written according to the sequential execution relationship in the scenario template. For example, turning on the main power is a prerequisite dependent action for switching the air conditioning mode and gradually brightening the lights, and the completion of opening the curtains is a prerequisite dependent action for adjusting the lighting in conjunction with the daylighting.

[0043] Furthermore, the rules for determining whether a branch cluster is in a split execution state are as follows: the fluctuation value of the corresponding branch cluster is not less than 0.58, or the node fluctuation value of any graph node within the branch cluster is not less than 0.70, or the edge weight of the graph within the branch cluster decreases by more than 0.12 within two consecutive sampling periods. If any one of these conditions is met, the branch cluster is determined to be in a split execution state; branch clusters that do not meet the aforementioned conditions are executed continuously as a complete scenario.

[0044] Furthermore, timing sensitivity is determined by the ratio of the remaining time of a device action unit until its planned execution time to the allowable delay time specified in the scene template. The smaller the ratio of remaining time to allowable delay time, the higher the timing sensitivity of the corresponding device action unit. The guest room scene master state correlation is determined by the necessity of the device action unit for the guest room master state to be established. Device action units that directly determine guest room availability, sleep mode, power off upon leaving the room, or cleaning unlock are considered highly correlated. The sorting is first done by timing sensitivity from high to low, then by guest room scene master state correlation from high to low, then by branch cluster fluctuation value from high to low, and finally by the number of dependent actions from few to many.

[0045] Furthermore, the guest room owner state association determination criteria are as follows: the guest room scene owner state association degree of the device action unit is high, and all the preceding dependent actions corresponding to the device action unit have been completed or are located in the same critical execution chain, and the allowable delay time of the device action unit is no more than 3 seconds. Device action units that meet the guest room owner state association determination criteria are written into the critical scene action subset, and the remaining device action units are written into the non-critical scene action subset. In addition to recording the two types of subsets, the scene action split set also records the correspondence between each device action unit and the target node, its branch cluster, and dependent actions, for subsequent generation of scene hierarchical control sequence calls.

[0046] It should be noted that the design concept of this step is to first transform the guest room PLC link status from the original detection parameters into comparable node fluctuation values, branch fluctuation values, and overall guest room fluctuation values. Then, this fluctuation result is combined with the guest room electrical topology twin graph to drive the dynamic splitting of the target guest room scene, rather than continuing to use a unified approach for distributing the entire scene. This allows the control system to identify which branch is unstable, which actions must be prioritized, and which actions can be delayed or degraded. Compared to existing technologies that only handle link fluctuations through retransmission, buffering, or unified priority, this embodiment can achieve scene reconstruction associated with branch status under uncertain PLC physical layer conditions, reducing the incomplete state where some devices execute while others do not within the same scene.

[0047] S3: Generate a scene-level control sequence based on the scene action split set, and generate feedback correction and update results based on the execution feedback.

[0048] Execution queues are established for key and non-key scenario action subsets recorded in the scenario action breakdown set. For device action units in the key scenario action subset, local control tokens, priority transmission slots, node confirmation order, and corresponding branch cluster distribution order are generated and written into the key execution queue according to the priority transmission slot and node confirmation order. For device action units in the non-key scenario action subset, delayed distribution flags or local compensation script call flags are generated and written into the compensation execution queue according to the branch cluster identifier and action timing. The key execution queue and the compensation execution queue are merged according to the guest room control order of key first, then non-key, to form a scenario-level control sequence.

[0049] Furthermore, the local control token is generated by the floor control gateway for each device action unit in the key scenario action subset, and includes at least the target node address, target status code, token validity duration, preceding dependent action identifier, receipt sequence number, and local rollback identifier. The token validity duration is set to 2 to 5 seconds according to the execution type of the target guest room scenario, with 5 seconds for welcome mode, 3 seconds for sleep mode, 2 seconds for check-out mode, and 4 seconds for cleaning mode. The token validity duration of 2 to 5 seconds is derived from the statistical results of the completion time of key device actions in each target guest room scenario during the 14-day trial operation of the guest room system, and is set according to the 95th percentile value of the completion time of key device actions in each target guest room scenario. Each controlled node in the guest room pre-stores the local execution script corresponding to the target status code, and directly calls the corresponding script to execute after receiving the local control token.

[0050] Furthermore, priority transmission time slots are allocated in 100ms units, determined by the floor control gateway based on the device action unit ranking within the critical scenario action subset. The 100ms time slot unit is derived from the statistical results of the critical control message transmission completion time during the 14-day trial operation of the guest room system, rounded up to the 95th percentile of the critical control message transmission completion time. Priority time slots are allocated to devices with higher rankings. Within the same branch cluster, the interval between priority transmission time slots for two adjacent devices with different branch clusters is no less than one time slot. Parallel use of the same time slot is allowed between different branch clusters. The node confirmation order is determined by prior dependent actions, followed by the current action, and by prioritizing higher timing sensitivity over lower timing sensitivity. The corresponding branch cluster distribution order is arranged from highest to lowest branch cluster fluctuation value. When branch cluster fluctuation values ​​are the same, they are arranged from lowest to highest number of devices with different rankings within the critical scenario action subset.

[0051] Furthermore, the delayed issuance flag is used to indicate that device action units in the non-critical scenario action subset will not enter the critical execution queue for the time being. The delay duration is set in stages based on the fluctuation value of the corresponding branch cluster: when the fluctuation value of the corresponding branch cluster is between 0.58 and 0.70, the delay is 1 second; when the fluctuation value of the corresponding branch cluster is between 0.70 and 0.85, the delay is 2 seconds; when the fluctuation value of the corresponding branch cluster is greater than 0.85, the local compensation script call flag is directly written. The local compensation script call flag is used to instruct the corresponding guest room controlled node to call the local compensation script to complete non-critical actions after receiving the simplified trigger instruction. The simplified trigger instruction includes at least the target node address, script number, and trigger timestamp.

[0052] After the scene-level control sequence is executed, the instruction confirmation information, equipment status information, and scene completion status information returned by the controlled nodes of each guest room are collected, and the collected information is compared item by item with the corresponding equipment action units in the scene action decomposition set. When there are unconfirmed equipment action units, inconsistent status equipment action units, or conflicting equipment action units within the same branch cluster in the key scene action subset, a corresponding branch correction instruction or local rollback instruction is generated. After the branch correction instruction or local rollback instruction is executed, the new confirmation information and status information are written back to the corresponding timing parameter group in the guest room PLC link fingerprint set, and the graph edge weights, branch cluster identifiers, and sample reference positions in the guest room electrical topology twin graph are updated synchronously to form feedback correction update results.

[0053] Furthermore, when no unconfirmed device action units, inconsistent device action units, or conflicting device action units within the same branch cluster are found during item-by-item comparison, the confirmation information and status information generated during this execution are directly written back to the corresponding timing parameter group in the guest room PLC link fingerprint set, and the current real-time sample reference position in the guest room electrical topology twin diagram is updated simultaneously to form the feedback correction update result corresponding to normal execution.

[0054] Furthermore, the instruction confirmation information consists of the execution receipt returned by the guest room controlled node after executing the local control token or simplified trigger instruction, including at least the receipt sequence number, execution start time stamp, and execution end time stamp. Device status information includes the current device status code, current on / off status, or current gear status collected by the guest room controlled node. Scene completion status information consists of the scene completion flag returned by each guest room controlled node under the target guest room scene. Item-by-item comparison is performed according to the one-to-one correspondence of the receipt sequence number, with the writing order in the key execution queue and compensation execution queue serving as the comparison order.

[0055] Furthermore, the criteria for determining unconfirmed device action units are as follows: A device action unit in the critical scenario action subset fails to return an execution receipt within 800ms after the end of its corresponding priority sending time slot. The criteria for determining inconsistent device action units are: The device status code collected within 1 second after the execution ends is inconsistent with the target status code, or the status collection results for the same device are inconsistent in two consecutive iterations. The criteria for determining conflicting device action units are: Two or more device action units within the same branch cluster have mutually exclusive target states within the same sampling period, or the preceding dependent action is incomplete while the subsequent action has been executed. The aforementioned thresholds are derived from the execution log statistics during the 14-day trial operation of the guest room system, where 800ms is taken as the 95th percentile of the critical action receipt delay, and 1s is taken as the upper bound of the device status stabilization time.

[0056] Furthermore, the branch correction command is regenerated by the floor control gateway for the branch cluster containing unconfirmed device action units, inconsistent device action units, or conflicting device action units. It includes at least a list of retransmission nodes, retransmission order, retransmission time slot, and target status code. The same device action unit can perform a maximum of two branch corrections. If the second branch correction still fails the item-by-item comparison, a local rollback command is generated. The local rollback command drives the corresponding guest room controlled node to restore to the most recently confirmed state before the device action unit's execution. The most recently confirmed state is taken from the last valid state record within 30 seconds before the scene action split set is generated. The setting of a maximum of two branch corrections is based on the branch retransmission success rate statistics during the guest room system's 14-day trial operation. Correction stops when the success rate gain is less than 5% after the second branch correction. The 30-second timeframe is the length of the most recent stable state maintenance window before the target guest room scene switch, ensuring that the rollback state is a valid state within the current guest room control cycle.

[0057] Furthermore, the corresponding timing parameter group written back to the guest room PLC link fingerprint set includes the number of retransmissions, acknowledgment delay, status feedback delay, and conflict flags generated during the execution phase. The edge weight update is based on the changes in acknowledgment delay, retransmission count, and status consistency of the device action units within the same branch cluster before and after branch correction. When all key scenario action subsets within the same branch cluster pass item-by-item comparison after branch correction and no branch correction command is triggered for three consecutive sampling cycles, the status information after this execution is written to the historical stable sample reference position; otherwise, it is only written to the current real-time sample reference position. If the same branch cluster triggers a local rollback command for three consecutive executions, the branch cluster identifier of that branch cluster is recalculated according to the principle of the maximum branch association strength value in S1. Status consistency is the ratio of the number of device action units within the same branch cluster whose target status code matches the status feedback result to the total number of device action units that have completed correction. When the average acknowledgment delay of device action units within the same branch cluster decreases by at least 20% after branch correction and the state consistency reaches 1, the corresponding graph edge weight is increased by 0.05. When there are still unconfirmed device action units or device action units with inconsistent states after branch correction, the corresponding graph edge weight is decreased by 0.08. The updated graph edge weight is set between 0 and 1.

[0058] It should be noted that this step first arranges the critical scenario action subsets and non-critical scenario action subsets into different execution queues, and then generates a scenario-level control sequence according to the branch cluster status and action priority. After execution, the system compares each item with the receipt, equipment status, and scenario completion status. Abnormal actions trigger branch correction or local rollback, and the results are written back to the guest room PLC link fingerprint set and the guest room electrical topology twin graph, thus forming a closed-loop control process for PLC fluctuation scenarios.

[0059] Example 2, an embodiment of the present invention, provides a hotel room control system based on PLC communication technology, including a link state modeling module, a scene adaptive splitting module, and a closed-loop hierarchical control module.

[0060] The link state modeling module is used to collect guest room PLC detection messages and generate guest room PLC link fingerprint sets to construct a guest room electrical topology twin graph.

[0061] The scene adaptive splitting module is used to calculate the fluctuation of the guest room PLC link based on the guest room PLC link fingerprint set and the guest room electrical topology twin graph, and to generate a scene action splitting set based on the guest room PLC link fluctuation and the guest room electrical topology twin graph.

[0062] The closed-loop hierarchical control module is used to generate a scene hierarchical control sequence based on the scene action split set, and to generate feedback correction and update results based on the execution feedback.

Claims

1. A hotel room control method based on PLC communication technology, characterized in that, include: Collect PLC detection messages in guest rooms and generate a PLC link fingerprint set in guest rooms to construct a twin graph of the electrical topology of guest rooms; The volatility of the guest room PLC link is calculated based on the guest room PLC link fingerprint set and the guest room electrical topology twin graph. A scene action split set is generated based on the guest room PLC link volatility and the guest room electrical topology twin graph. The scene action split set is used to generate a scene-level control sequence, and the execution feedback is used to generate feedback correction and update results.

2. The hotel room control method based on PLC communication technology as described in claim 1, characterized in that: The process of collecting guest room PLC detection messages and generating a guest room PLC link fingerprint set includes, The floor control gateway sends PLC probe messages to each guest room controlled node during guest room control idle time slots and receives response messages returned by each guest room controlled node. Extract at least three parameters from the following based on the response message: carrier impulse response peak position, carrier impulse response peak amplitude, number of retransmissions per unit time window, bit error correlation value, zero crossover jitter, and round-trip delay fluctuation. The extracted parameters were normalized and aligned with the time according to the room number, node address, and sampling time. Remove abnormal samples caused by incomplete responses, offline nodes, and busy periods of room control; The retained samples are grouped into corresponding time-series parameter sets according to the controlled nodes, and then summarized into a guest room PLC link fingerprint set.

3. The hotel room control method based on PLC communication technology as described in claim 2, characterized in that: The construction of the guest room electrical topology twin graph includes, Each guest room controlled node is used as a graph node, and the similarity of response delay, co-occurrence of bit errors, change of retransmission synchronization, and consistency of coupling disturbance among nodes within the same sampling period are used as branch association criteria. When any two graph nodes continuously satisfy the preset association establishment conditions, a graph edge is established between the two graph nodes, and the edge weight is set to the branch association strength value. For each graph node, record the branch cluster identifier, historical stable sample reference location, and current real-time sample reference location; When a new guest room PLC link fingerprint set is entered, the affiliation of each graph node and the graph edge parameters are updated according to the change in graph edge weight and the consistency change results within the branch cluster, forming a guest room electrical topology twin graph corresponding to the current guest room PLC communication status.

4. The hotel room control method based on PLC communication technology as described in claim 3, characterized in that: The calculation of guest room PLC link volatility based on the guest room PLC link fingerprint set and guest room electrical topology twin graph includes, The system calls the current samples of each controlled node in the guest room PLC link fingerprint set and calls the historical stable samples associated with the corresponding graph nodes in the guest room electrical topology twin graph as the reference samples. Calculate the carrier impulse response difference, coupling disturbance change, unit time window retransmission offset, and timing jitter offset between the current sample and the reference sample, respectively. After processing each offset to the same dimension, they are synthesized according to a preset weight to obtain the node fluctuation value of each guest room controlled node. Based on the edge weights and branch cluster identifiers in the twin graph of the guest room electrical topology, the fluctuation values ​​of each node are mapped to the corresponding branch fluctuation values ​​and the overall fluctuation values ​​of the guest room. When the overall fluctuation value of the guest room reaches the guest room scene splitting trigger line, the guest room PLC link fluctuation degree, which includes the fluctuation values ​​of each branch and the overall fluctuation value of the guest room, is output.

5. The hotel room control method based on PLC communication technology as described in claim 4, characterized in that: The process of generating a scene action split set based on the guest room PLC link fluctuation and the guest room electrical topology twin graph includes... Upon receiving any of the target guest room scenarios in welcome mode, sleep mode, room vacancy mode, or cleaning mode, the target guest room scenario is parsed into the corresponding device action unit, and the target node, target state, action sequence, dependent actions, and branch cluster identifier are written for each device action unit. Determine whether the corresponding branch cluster is in a split execution state based on the fluctuation of the guest room PLC link; When the corresponding branch cluster is in the split execution state, the device action units are sorted and grouped according to the timing sensitivity of the device action unit, the number of dependent actions, the correlation of the main state of the guest room scene, and the fluctuation value of the branch cluster. The device action units that meet the guest room owner status association judgment conditions and whose dependent actions are not missing are written into the key scene action subset, and the remaining device action units are written into the non-key scene action subset. The two types of subsets and their corresponding node relationships are summarized to generate a scene action split set.

6. The hotel room control method based on PLC communication technology as described in claim 5, characterized in that: The process of generating a scene-level control sequence based on the scene action split set includes... Execution queues are established based on the key scene action subsets and non-key scene action subsets recorded in the scene action splitting set. For the device action units in the key scenario action subset, generate local control tokens, priority transmission time slots, node confirmation order, and corresponding branch cluster distribution order, and write them into the key execution queue according to the priority transmission time slots and node confirmation order. For device action units in non-critical scenario action subsets, generate delayed delivery markers or local compensation script call markers, and write them into the compensation execution queue according to branch cluster identifier and action sequence; The critical execution queue and the compensation execution queue are merged in the order of critical to non-critical guest room control to form a scenario-level control sequence.

7. The hotel room control method based on PLC communication technology as described in claim 6, characterized in that: The process of generating feedback correction and update results based on execution feedback includes, After the scene hierarchical control sequence is executed, the instruction confirmation information, equipment status information and scene completion status information returned by the controlled nodes of each guest room are collected, and the collected information is compared item by item with the corresponding equipment action units in the scene action decomposition set. When there are unconfirmed device action units, inconsistent device action units, or conflicting device action units within the same branch cluster in the critical scenario action subset, a corresponding branch correction instruction or local rollback instruction is generated. After the branch correction command or local rollback command is executed, the new confirmation information and status information are written back to the corresponding timing parameter group in the guest room PLC link fingerprint set, and the graph edge weights, branch cluster identifiers and sample reference positions in the guest room electrical topology twin graph are updated simultaneously to form feedback correction update results.

8. A hotel room control system based on PLC communication technology, employing the hotel room control method based on PLC communication technology as described in any one of claims 1 to 7, characterized in that: It includes a link state modeling module, a scene adaptive splitting module, and a closed-loop hierarchical control module; The link state modeling module is used to collect guest room PLC detection messages and generate a guest room PLC link fingerprint set to construct a guest room electrical topology twin graph. The scene adaptive splitting module is used to calculate the fluctuation of the guest room PLC link based on the guest room PLC link fingerprint set and the guest room electrical topology twin graph, and to generate a scene action splitting set based on the guest room PLC link fluctuation and the guest room electrical topology twin graph. The closed-loop hierarchical control module is used to generate a scene hierarchical control sequence based on the scene action split set, and to generate feedback correction and update results based on the execution feedback.