A self-service terminal control method and system based on double-channel communication
By using dual-channel communication and dynamic topology reconstruction based on the fuzzy PID algorithm, the problems of transmission congestion and routing oscillation in the self-service terminal communication system are solved, achieving low-latency and high-security self-service terminal control, and improving network stability and load balancing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU ZHONGKA INTELLIGENT TECH CO LTD
- Filing Date
- 2026-06-24
- Publication Date
- 2026-07-24
AI Technical Summary
Existing self-service terminal communication systems suffer from transmission congestion, routing oscillations, and high latency in complex environments. In particular, in ad hoc networks, insufficient MCU computing power of nodes leads to data aggregation delays and network topology instability, and the security and real-time performance of billing control commands are difficult to guarantee.
A self-service terminal control method based on dual-channel communication is adopted. A dual-channel routing node is formed through Bluetooth and cellular network. Dynamic topology reconstruction is performed using a segmented composite frame structure and fuzzy PID algorithm to achieve fast status sniffing and data pass-through of edge nodes. Combined with the fuzzy PID dynamic scoring mechanism of latency index, load balancing and security encryption are ensured.
It enables low-latency and high-security communication of self-service terminals in complex environments, avoiding transmission congestion and routing oscillations in traditional ad hoc networks, improving network stability and load balancing capabilities, and ensuring rapid response and secure transmission of billing control commands.
Smart Images

Figure CN122457544A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of self-service terminal control, and in particular to a self-service terminal control method and system based on dual-channel communication. Background Technology
[0002] With the development of the sharing economy and the Internet of Things, self-service terminals such as washing machines and dryers are being deployed extensively in apartments, basements, or enclosed shopping malls. Because these devices involve frequent QR code payments and billing / start / stop control, they have extremely high requirements for the real-time performance and reliability of the communication link. In existing technologies, self-service terminals mainly connect to the cloud using either a "single-unit independent cellular direct connection" or a "traditional LAN networking (such as Bluetooth Mesh) + single gateway" model.
[0003] Existing self-organizing networks typically rely solely on "underlying physical signal strength (such as RSSI)" as the sole criterion for master-slave node election and path selection. However, in real-world applications, nodes with strong physical signals may already be equipped with numerous sub-devices, resulting in severely limited MCU computing power. Simply concentrating data on nodes with high signal strength leads to data queuing and severe transmission congestion. Furthermore, in environments with frequent personnel movement and interference, frequent fluctuations in signal strength can cause the system to repeatedly reconnect and switch between different links (i.e., generating a "ping-pong effect" or routing oscillation), severely disrupting the stability of the entire network topology.
[0004] Because billing control instructions involve financial security, full packet encryption (such as AES or HMAC signatures) must be used. Under traditional multi-hop routing mechanisms, intermediate routing nodes must consume enormous computing resources and time to decrypt data packets in order to obtain terminal status and optimize the topology, resulting in unacceptable forwarding delays. If "blind forwarding" is performed without decryption, the system completely loses its ability to perceive local network congestion and device operating status, making adaptive load balancing impossible. Summary of the Invention
[0005] This invention provides a self-service terminal control method and system based on dual-channel communication. By employing a segmented composite frame structure, it decouples control and service data, enabling edge nodes to perform rapid status sniffing and high-speed data transmission without decryption, while balancing strong security encryption with extremely low forwarding latency. Simultaneously, the system introduces a fuzzy PID dynamic scoring and candidate pool prediction mechanism based on latency metrics, overcoming the limitations of single physical signal routing and achieving adaptive balancing based on real service load and proactive frequency switching self-healing.
[0006] To achieve the above objectives, a first aspect of this application provides a self-service terminal control method based on dual-channel communication, comprising: Each self-service terminal connects to the cloud through a corresponding billing controller; the billing controller is a dual-channel communication routing node for both Bluetooth and cellular networks. At each operating cycle, each billing controller generates terminal operating information based on the control data packets sent by the corresponding self-service terminal during that operating cycle; Each of the billing controllers periodically broadcasts the terminal operation information to the Bluetooth network range; At each operating cycle, based on the operating information of all terminals, all billing controllers are divided into several main routing nodes, several secondary routing nodes, and several leaf routing nodes. Each main routing node is interconnected via a cellular network. Each main routing node selects a connection channel with each secondary routing node using a fuzzy PID algorithm. Each secondary routing node selects a connection channel with each leaf routing node within its Bluetooth communication range using a fuzzy PID algorithm. Each main routing node contains terminal operating information for all secondary routing nodes, and each secondary routing node contains terminal operating information for all leaf routing nodes within its Bluetooth communication range. Each main routing node periodically uploads all terminal operating information contained within it to the cloud. When a billing controller receives a new control data packet through any channel, it determines the communication method according to the classification type of the billing controller, and then uploads the control data packet to the cloud. After the cloud determines that the control data packet is valid, it sends a control command to the billing controller.
[0007] In one possible implementation of the first aspect, the terminal operation information includes: Physical layer parameters, including the charging controller's Bluetooth signal strength RSSI, cellular network signal-to-noise ratio, and current network latency; Business layer parameters include the task queue length of the connected self-service terminal, the current billing status parameters, and hardware fault codes; Environmental characteristics, including the number of visible Bluetooth nodes in the neighborhood and the average communication collision rate.
[0008] In one possible implementation of the first aspect, the control data packet adopts a segmented composite frame structure, including: Feature-aware segment: Set to unencrypted state, it includes hierarchical path identifier, real-time link quality parameters and terminal load status bits; Command payload segment: Set to asymmetric encryption mode, containing control command opcodes and corresponding control parameters; Spatiotemporal verification segment: contains a globally unique service sequence number and a high-precision transmission timestamp; Security authentication segment: Stores dynamic message authentication codes generated based on the feature perception segment, the instruction payload segment, and the spatiotemporal verification segment.
[0009] In one possible implementation of the first aspect, before dividing all the billing controllers into several primary routing nodes, several secondary routing nodes, and several leaf routing nodes based on all the terminal operation information at every running cycle, the method further includes: A preset number of primary routing nodes are randomly determined, such that the number of primary routing nodes is less than half the number of secondary routing nodes, and the number of secondary routing nodes is less than half the number of leaf routing nodes.
[0010] In one possible implementation of the first aspect, the step of dividing all the billing controllers into several primary routing nodes, several secondary routing nodes, and several leaf routing nodes based on all the terminal operation information at every operating cycle specifically includes: For each primary routing node, the extraction time of the primary routing node for the feature sensing segment is calculated based on all control data packets flowing through in a running cycle. Nodes with extraction time lower than the first threshold and the number of leaf routing nodes covered within the Bluetooth range of the secondary routing node is greater than a preset value are selected as secondary routing candidate nodes. For each secondary routing node, the clock synchronization deviation between the secondary routing node and the cloud is calculated based on all control data packets flowing through it in one operating cycle, and the HMAC operation rate of the secondary routing node for the security authentication segment is calculated; nodes with clock synchronization deviation less than microseconds and operation rate that meet the preset bandwidth reporting requirements are selected as primary routing candidate nodes. For each primary routing node, the cellular channel reliability score and HMAC operation rate of the current primary routing node are monitored in real time. When the reliability score of the current primary routing node is lower than a preset security threshold, or the HMAC operation rate is lower than a preset rate threshold, the node with the smallest clock synchronization deviation from the primary routing candidate nodes is selected and upgraded to a new primary routing node to take over cloud communication. The current primary routing node is then downgraded. If it belongs to the secondary routing candidate nodes, it is downgraded to a new secondary routing node; otherwise, it is downgraded to a leaf routing node. For each secondary routing node, the number of leaf routing nodes attached to the current secondary routing node and the time taken to extract the feature sensing segment are monitored in real time. When the time taken to extract the feature sensing segment is higher than the first threshold, the optimal node is activated from the secondary routing candidate nodes, and a redirection instruction is broadcast to the leaf routing nodes covered by the edge of the original secondary routing node to guide the leaf routing nodes to switch to the nearest optimal node.
[0011] In one possible implementation of the first aspect, the calculation process of the cellular channel reliability score specifically includes: Obtain the physical communication parameters of the current cellular network channel and calculate the basic physical score using weighted averages. Calculate the deviation between the actual transmission delay of the control data packet and the preset target delay, as well as the rate of change of the deviation; The deviation and the rate of change of deviation are input into a preset fuzzy controller, and a dynamic penalty coefficient is output by adjusting the PID control parameters online. The cellular channel reliability score for the current operating cycle is obtained by subtracting the dynamic penalty coefficient from the basic physical score.
[0012] In one possible implementation of the first aspect, the process for confirming the optimal node specifically includes: The coverage overlap, feature sensing segment extraction time, uplink quality index and load margin of each of the secondary route candidate nodes are extracted, and after normalization, a multi-dimensional feature vector is generated for each candidate node. Traverse the multidimensional feature vectors of all candidate nodes, extract the maximum extrema of each dimension to form a positive ideal feature vector, and extract the minimum extrema of each dimension to form a negative ideal feature vector. Calculate the first Euclidean distance between the multidimensional feature vector of each candidate node and the positive ideal feature vector, and the second Euclidean distance between the multidimensional feature vector of each candidate node and the negative ideal feature vector; Based on the ratio of the first Euclidean distance to the second Euclidean distance, calculate the comprehensive approximation score of each candidate node, and select the candidate node with the highest score as the optimal node.
[0013] In one possible implementation of the first aspect, each primary routing node selects a connection channel with each secondary routing node according to a fuzzy PID algorithm, and each secondary routing node selects a connection channel with each leaf routing node within its Bluetooth communication range according to a fuzzy PID algorithm, specifically including: From the control data packets transmitted through the candidate connection channels, the actual arrival time corresponding to the same delay verification sequence number is extracted. The deviation between the actual transmission delay of the candidate connection channel and the preset target delay is calculated as the first input quantity, and the rate of change of the deviation within a continuous operating cycle is calculated as the second input quantity. The candidate connection channels include Bluetooth connection channels and cellular network channels. The first and second input quantities are converted into membership vectors in the fuzzy domain. Logical reasoning is performed in combination with the preset fuzzy control rule base. The proportional parameter correction value, integral parameter correction value and derivative parameter correction value of the PID controller in the current running cycle are calculated and output online. The proportional parameter correction value, integral parameter correction value, and derivative parameter correction value are substituted into the PID control equation for iterative compensation, and a real-time dynamic reliability score is output for each candidate connection channel. Compare the real-time dynamic reliability scores of all candidate connection channels between the current node and the previous level node, and lock the candidate connection channel with the highest score as the optimal connection channel for issuing control commands and collecting terminal operation information; if the real-time dynamic reliability scores of all candidate connection channels under a certain node are lower than the preset score threshold, then the dual-channel concurrent transmission mode is forcibly enabled.
[0014] In one possible implementation of the first aspect, when a billing controller receives a new control data packet through any channel, after determining the communication method according to the billing controller's classification type, it uploads the control data packet to the cloud. After the cloud verifies the validity of the control data packet, it sends a control command to the billing controller, specifically including: When a primary routing node receives a new control data packet through any channel, it uploads the control data packet to the cloud. After the cloud verifies the validity of the control data packet, it sends a control command to the primary routing node. When a secondary routing node receives a new control data packet through any channel, it uploads the control data packet to the cloud through any primary routing node. After the cloud verifies the validity of the control data packet, it sends a control command to the primary routing node. When a leaf routing node receives a new control data packet through any channel, it first sends the control data packet to any primary routing node within Bluetooth communication range through any secondary routing node, and then the primary routing node uploads the control data packet to the cloud. After the cloud verifies the validity of the control data packet, it sends a control command to the primary routing node. The primary routing node forwards the control command to the corresponding secondary routing node or leaf routing node through the optimal connection channel selected by the fuzzy PID algorithm.
[0015] A second aspect of this application provides a self-service terminal control system based on dual-channel communication, including a plurality of self-service terminals, a billing controller connected to each of the self-service terminals in a one-to-one correspondence, and a cloud server; wherein: The billing controller is a dual-channel communication routing node comprising a Bluetooth communication module and a cellular network communication module. Each self-service terminal connects to the cloud server through its corresponding billing controller. The billing controller is configured to: Every operating cycle, based on the control data packets sent by the corresponding self-service terminal within that operating cycle, terminal operating information is generated and broadcast to the Bluetooth network range at regular intervals; Every operating cycle, based on all the terminal operating information obtained, it participates in the full network topology reconstruction and is dynamically divided into a primary routing node, a secondary routing node, or a leaf routing node. When acting as the primary routing node, it connects to other primary routing nodes via the cellular network, selects the connection channel with each subordinate secondary routing node using a fuzzy PID algorithm, and includes terminal operation information of all subordinate secondary routing nodes, periodically uploading all terminal operation information to the cloud server. When acting as a secondary routing node, it selects a connection channel with each of the leaf routing nodes within its Bluetooth communication range using a fuzzy PID algorithm; and includes terminal operation information of all subordinate leaf routing nodes within its Bluetooth communication range. When a new control data packet is received through any channel, the corresponding communication method is determined according to its current node classification type, and the control data packet is uploaded to the cloud server. The cloud server, which is communicatively connected to the billing controller, is configured to: receive control data packets uploaded by the billing controller, and after determining that the control data packets are valid, send control instructions to the corresponding billing controller.
[0016] Compared to existing technologies, this invention utilizes the dual-channel characteristics of the billing controller, which combines Bluetooth and cellular communication, to periodically broadcast and collect surrounding terminal operation information during each operating cycle. Based on these global states, the system breaks away from the traditional static and rigid networking, dynamically dividing all network nodes into three levels: primary routes, secondary routes, and leaf routes. This adaptive topology reconstruction of "primary routes to secondary routes, and secondary routes to leaf routes" enables the concurrent data from massive devices to be "aggregated nearby and distributed in stages," effectively resolving the computing power congestion bottleneck in the traditional single gateway mode and achieving structural elastic load balancing.
[0017] Once the hierarchy is established, the establishment of channels between nodes avoids the shortcomings of blindly connecting based solely on physical signal strength. This solution explicitly requires that the primary and secondary routes must select the optimal connection channel using a "fuzzy PID algorithm." This algorithm can comprehensively evaluate dynamic characteristics such as link latency, accurately reflecting network congestion trends. Through this calculation process, the system can accurately eliminate inferior links with "high signal strength but low computing power," fundamentally suppressing frequent network jumps and the "ping-pong effect" in complex public environments.
[0018] When any node receives a new control data packet, the system strictly determines the optimal communication method based on the current dynamic classification type and uploads it to the cloud. After the cloud server performs centralized validity verification, it accurately sends control commands along the constructed optimal and most stable channel. The physical redundancy of the dual channels, combined with the aforementioned intelligent scheduling at the software level, ensures that the self-service terminal can still achieve high security and low latency response to billing commands even in environments with weak signals and strong interference. Attached Figure Description
[0019] Figure 1 This is a flowchart illustrating a self-service terminal control method based on dual-channel communication according to an embodiment of the present invention. Figure 2 This is a schematic diagram of the structure of a self-service terminal control system based on dual-channel communication, according to an embodiment of the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] To resolve the above issues, please refer to [link / reference]. Figure 1 An embodiment of the present invention provides a self-service terminal control method based on dual-channel communication, comprising: S10. Each self-service terminal connects to the cloud through a corresponding billing controller; the billing controller is a dual-channel communication routing node for Bluetooth and cellular networks.
[0022] S11. Every operating cycle, each billing controller generates terminal operating information based on the control data packets sent by the corresponding self-service terminal within that operating cycle.
[0023] S12. Each of the billing controllers periodically broadcasts the terminal operation information to the Bluetooth network range.
[0024] S13. At each operating cycle, based on all the terminal operating information, all the billing controllers are divided into several main routing nodes, several secondary routing nodes, and several leaf routing nodes. Each main routing node is interconnected via a cellular network. Each main routing node selects a connection channel with each secondary routing node using a fuzzy PID algorithm. Each secondary routing node selects a connection channel with each leaf routing node within its Bluetooth communication range using a fuzzy PID algorithm. Each main routing node contains terminal operating information for all the secondary routing nodes. Each secondary routing node contains terminal operating information for all leaf routing nodes within its Bluetooth communication range. Each main routing node periodically uploads all the terminal operating information it contains to the cloud.
[0025] S14. When a billing controller receives a new control data packet through any channel, it determines the communication method according to the classification type of the billing controller and uploads the control data packet to the cloud. After the cloud determines that the control data packet is valid, it sends a control command to the billing controller.
[0026] S11-S12 pertain to the state awareness and sharing phase. Within a set operating cycle, the billing controller actively collects and parses the underlying control data packets sent by the corresponding self-service terminals (such as shared washing machines in a shopping mall), transforming them into terminal operation information reflecting the terminal's current working status and communication needs. Subsequently, using its built-in Bluetooth module, it wirelessly broadcasts this information to other billing controllers within a specific surrounding range, enabling state "reporting" and information exchange between adjacent nodes. This achieves decentralized peer-to-peer interaction and local sharing of state data between edge devices, breaking down the information silos of traditional isolated single-device operation and providing necessary underlying data support for subsequent global network topology reconstruction and dynamic allocation in the system.
[0027] S13 is the dynamic networking and intelligent routing phase. The system performs hierarchical reconstruction based on the aggregated terminal operation information, dynamically dividing the billing controller into three levels of routing nodes: primary, secondary, and leaf. The primary route is responsible for interconnecting with the cloud via the cellular network and aggregating lower-level information, while the secondary route is responsible for aggregating information from leaf routes within its region. After establishing the hierarchy, when the primary node connects to the secondary node, and vice versa, a fuzzy PID algorithm is introduced to evaluate and select the connection channel. This algorithm typically receives input reflecting link quality or latency deviation (such as latency error). and its rate of change The fuzzy inference rules output adjustment parameters to correct connection decisions, thereby locking in the current optimal link. This constructs a flexible multi-level network topology of "nearby aggregation and tiered distribution," significantly reducing concurrent congestion caused by a massive number of terminals simultaneously connecting directly to the cloud. At the same time, relying on the dynamic intervention of the fuzzy PID algorithm, it abandons the shortcomings of blindly networking based solely on static physical signals, realizing forward prediction of network congestion trends and intelligent routing, significantly enhancing the overall network communication stability under complex interference environments.
[0028] S14 belongs to the business closed-loop collaboration stage. The billing controller, located in different network topologies, upon receiving a new control data packet (such as a user's QR code activation request), strictly follows its dynamically assigned role (primary, secondary, or leaf route) and matches the corresponding heterogeneous network channel (Bluetooth or cellular) to transmit the data hierarchically to the cloud server. The cloud, acting as the global processing hub, performs legality and security checks on the received data packets. Once confirmed, it issues the final operation command along the constructed hierarchical path, thereby controlling the physical terminal to perform actions. This achieves standardized routing and on-demand collaborative transmission of data between heterogeneous networks (Bluetooth and cellular), ensuring that any terminal can find the most reasonable uplink data exit when the network topology changes. Through the centralized verification mechanism in the cloud, it improves the efficiency of multi-level routing data flow while guaranteeing the legality and security of end-to-end control commands.
[0029] The above solution fundamentally abandons the rigid single-channel networking mode of traditional self-service terminals. Through intelligent status interaction of edge nodes and dynamic optimization of fuzzy PID algorithm, it successfully creates a self-organizing IoT architecture with adaptive load balancing and strong anti-interference capabilities without adding extra network gateway hardware.
[0030] For example, the terminal operation information includes: Physical layer parameters include the Bluetooth signal strength RSSI of the billing controller, the cellular network signal-to-noise ratio, and the current network latency.
[0031] Business layer parameters include the task queue length of the connected self-service terminal, the current billing status parameters, and hardware fault codes.
[0032] Environmental characteristics, including the number of visible Bluetooth nodes in the neighborhood and the average communication collision rate.
[0033] The billing controller, through the cross-layer collaborative operation of underlying hardware sensors, communication baseband chips, and the main control MCU (microcontroller), captures and constructs its own comprehensive status profile in real time from three different dimensions. Specifically, the controller's underlying layer uses the power management module and RF baseband to collect Bluetooth signal strength (RSSI), signal-to-noise ratio, and network latency, forming physical layer parameters characterizing basic communication quality. Simultaneously, the main control MCU monitors the execution logic of connected self-service terminals at the application layer, extracting task queue length, billing status, and hardware fault codes, forming business layer parameters characterizing computing power consumption and device health. In addition, the controller's network layer (such as the MAC layer) passively listens to the distribution and collision of broadcast packets in surrounding wireless frequency bands, statistically analyzing the number of visible Bluetooth nodes and communication collision rate, forming environmental characteristics characterizing the degree of RF congestion in the local space. These three elements combine to form a complete multi-dimensional terminal operation information message.
[0034] By extracting these three-dimensional state parameters that span physical, business, and environmental dimensions, the limitations of traditional ad hoc networks relying solely on "signal strength" for network decisions are completely overcome, enabling a precise profile of a node's true carrying capacity. For example, if a node has an excellent signal (superior physical layer), but is processing a large number of billing requests and experiencing queue backlog (poor business layer), or is surrounded by numerous co-frequency devices causing frequent collisions (poor environmental characteristics), the system can accurately identify this node as a "high-resolution, low-capacity" inferior aggregation point based on these comprehensive parameters. Therefore, this multi-dimensional data structure not only effectively avoids computing power overload and local network storms, but also greatly improves the scheduling accuracy of edge networks in load balancing and proactive fault isolation under complex interference environments.
[0035] In summary, by meticulously breaking down terminal operational information into physical, business, and environmental characteristics, the essence of this approach is to endow IoT communication nodes with comprehensive detection capabilities, including "link health monitoring, business concurrency awareness, and spatial interference detection." This three-dimensional, decoupled data foundation design is a core means of preventing unstable links and the fundamental data support for the system to subsequently achieve highly robust dynamic multi-level routing (primary / secondary / leaf routing) and intelligent algorithms (fuzzy PID) for optimal path selection.
[0036] For example, the control data packet adopts a segmented composite frame structure, including: Feature-aware segment: Set to unencrypted state, it includes hierarchical path identifier, real-time link quality parameters, and terminal load status bits.
[0037] Command payload segment: Set to asymmetric encryption mode, containing control command opcodes and corresponding control parameters.
[0038] Spatiotemporal verification segment: contains a globally unique service sequence number and a high-precision transmission timestamp.
[0039] Security authentication segment: Stores dynamic message authentication codes generated based on the feature perception segment, the instruction payload segment, and the spatiotemporal verification segment.
[0040] The segmented composite frame structure decouples network routing parameters from underlying business logic at the message format level. Specifically, the feature-aware segment remains in plaintext, directly providing hierarchical path identifiers and node load parameters for intermediate network nodes to parse and calculate routes; the instruction payload segment uses an asymmetric encryption algorithm to convert ciphertext and encapsulate core control opcodes and parameters; the spatiotemporal verification segment records the service sequence number and precise transmission timestamp, establishing the sequential characteristics and time reference for a single communication; finally, the security authentication segment uses the aforementioned three segments as input and generates a dynamic message authentication code through a message authentication algorithm, serving as the integrity verification feature value for the entire packet data.
[0041] This architecture allows intermediate nodes to obtain network topology and load status simply by reading the plaintext feature-aware segment when forwarding packets, enabling them to directly execute routing decisions and packet pass-through. This mechanism eliminates the computational overhead of intermediate nodes decrypting packets, significantly reducing processing latency for single-packet forwarding and resolving the conflict between processing speed and computing resources in multi-hop networks. Simultaneously, the asymmetric encryption of the instruction payload segment prevents data leakage, the timeliness characteristics of the spatiotemporal verification segment effectively resist replay attacks, and the verification mechanism of the security authentication segment prevents packet tampering, comprehensively ensuring the security and integrity of data throughout the entire transmission link.
[0042] Assume an application scenario: the sender is a cloud server, the receiver is a terminal device (shared washing machine) numbered M-001, the intermediate node is a secondary routing node (billing controller) numbered R-10, and the business objective is: the cloud requests the washing machine to start the "standard wash" mode and confirm the deduction of 5.00 yuan.
[0043] A complete control data packet (total length assumed to be 256 bytes) is strictly divided into the following four segments: 1. Feature-aware segment (plaintext area, approximately 16 bytes) This section remains unencrypted in plaintext and is exposed directly at the network layer and data link layer.
[0044] Hierarchical path identifier: [Cloud -> R-05 (primary) -> R-10 (secondary) -> M-001 (leaf)] (indicates the routing direction of data packets) Real-time link quality parameters: [RSSI: -65dBm | SNR: 15dB] (marks the minimum required communication quality threshold) Terminal load status bit: [Status: 0x00] (0x00 indicates that the target device is required to be in an idle and available state) Specific fields: 01 05 0A 01 41 0F 00... (Hexadecimal machine code directly readable) 2. Instruction payload segment (ciphertext area, approximately 128 bytes) This section uses asymmetric or symmetric encryption algorithms such as RSA / AES for high-strength encryption, and the key is only available in the cloud and on the terminal.
[0045] Control command opcode: 0xA1 (represents "start device") Control parameters: [Mode: 02 (Standard Wash) | Amount: 500 (5.00 yuan)] Specific fields: After encryption, they become a string of random characters with no pattern, such as E4 8F 9C 2A 77 B1... Nodes without the decryption key cannot obtain the operation code and amount data.
[0046] 3. Spatiotemporal verification segment (plaintext area, approximately 16 bytes) This section is used to prevent network-side latency issues and replay attacks.
[0047] Global service serial number: [SEQ:100482] (the 100482nd instruction of this terminal) High-precision transmission timestamp: [TS:1715466010000] (Records the precise millisecond-level time when the command was sent from the cloud) Specific fields: 00 01 88 82 01 8F 6A... (plaintext time and sequence number) 4. Security Authentication Section (Tamper-proof area, approximately 32 bytes) This section is used for end-to-end data integrity verification.
[0048] Dynamic Message Authentication Code: A fixed-length hash verification value generated by concatenating the binary data from segments 1, 2, and 3 above and using the HMAC-SHA256 algorithm.
[0049] Specific fields: D8 3C 5F 9A 12 EB... When the secondary router R-10 receives this message, it does not perform any decryption. Its baseband or edge message processing module directly reads the first 16 bytes of the feature sensing segment, finds that the path identifier points to its subordinate M-001, and requires the load status bit to be 0x00. If R-10 confirms that M-001 is indeed in an idle state, it directly transmits the entire 256-byte data packet intact to M-001 through the Bluetooth channel. The entire decision-making process is completed in microseconds.
[0050] Upon receiving a message, the terminal device (Ye Router M-001) first reads the time-space verification segment and compares it with the local clock. If it finds that the message's transmission timestamp is more than a preset security window away from the current time (e.g., more than 5 seconds), or that sequence number 100482 has already been executed, it is discarded to prevent replay attacks. If the time-space verification passes, M-001 recalculates the HMAC for segments 1, 2, and 3 using its built-in key. If the calculation result is completely consistent with the hash value of the security authentication segment, it indicates that the message has not been tampered with during transmission. Finally, M-001 decrypts the instruction payload segment, extracts the opcode 0xA1 and parameter 500, closes the physical relay, and starts the washing machine's standard wash cycle.
[0051] In summary, the segmented composite frame structure establishes a processing mechanism for on-demand reading and direct forwarding of intermediate nodes by formatting and separating plaintext state information from ciphertext service payload. This scheme meets the low-latency transmission requirements of control commands in large-scale edge node networks while providing a security verification mechanism based on spatiotemporal references and dynamic authentication codes, enabling the parallel operation of efficient routing and high-strength data encryption in self-service terminal communication systems.
[0052] For example, before dividing all the billing controllers into several primary routing nodes, several secondary routing nodes, and several leaf routing nodes according to all the terminal operation information at each running cycle, the method further includes: A preset number of primary routing nodes are randomly determined, such that the number of primary routing nodes is less than half the number of secondary routing nodes, and the number of secondary routing nodes is less than half the number of leaf routing nodes.
[0053] Before formally performing global topology reconstruction based on terminal operation information, the system first uses a random probability algorithm to initially select a preset number of nodes from the billing controller cluster and introduces a hierarchical density constraint mechanism. This mechanism sets the boundary for the number of nodes through mathematical inequalities, requiring a certain number of primary routing nodes. Strictly less than the number of secondary routing nodes Half of the number of secondary routing nodes Strictly less than the number of leaf route nodes One-half. This randomization process based on proportional prediction forces the construction of a tree-like or star-shaped composite topology with a clear hierarchical span in the algorithm logic, ensuring that the network architecture has a reasonable node density distribution before formally subdividing roles.
[0054] This hierarchical ratio constraint avoids excessive competition for channel resources and ineffective overlap of cellular traffic links caused by excessive density of high-energy-consuming and high-load roles (primary / secondary routes) at the underlying architecture level, ensuring the allocation efficiency of communication resources across the entire network. The randomized initial selection mechanism effectively distributes the hardware wear and tear of each billing controller, preventing excessive aging of electronic components due to specific physical nodes undertaking high-level routing tasks for a long time. At the same time, this decreasing node ratio significantly reduces the probability of collisions in instruction flow between levels, ensuring that each level has enough low-level nodes to support data aggregation during concurrent communication of large-scale terminals, thereby maintaining the topological robustness of the control system.
[0055] For example, every operating cycle, based on the operating information of all the terminals, all the billing controllers are divided into several primary routing nodes, several secondary routing nodes, and several leaf routing nodes, specifically including: For each primary routing node, the extraction time of the primary routing node for the feature sensing segment is calculated based on all control data packets flowing through in a running cycle. Nodes with extraction time lower than the first threshold and the number of leaf routing nodes covered within the Bluetooth range of the secondary routing node is greater than a preset value are selected as secondary routing candidate nodes. For each secondary routing node, the clock synchronization deviation between the secondary routing node and the cloud is calculated based on all control data packets flowing through it within a running cycle, and the HMAC operation rate of the secondary routing node for the security authentication segment is calculated; nodes with clock synchronization deviation less than microseconds and operation rates that meet the preset bandwidth reporting requirements are selected as primary routing candidate nodes.
[0056] For each primary routing node, the cellular channel reliability score and HMAC operation rate of the current primary routing node are monitored in real time. When the reliability score of the current primary routing node is lower than a preset security threshold, or the HMAC operation rate is lower than a preset rate threshold, the node with the smallest clock synchronization deviation from the primary routing candidate nodes is selected and upgraded to a new primary routing node to take over cloud communication. The current primary routing node is then downgraded. If it belongs to the secondary routing candidate nodes, it is downgraded to a new secondary routing node; otherwise, it is downgraded to a leaf routing node.
[0057] For each secondary routing node, the number of leaf routing nodes attached to the current secondary routing node and the time taken to extract the feature sensing segment are monitored in real time. When the time taken to extract the feature sensing segment is higher than the first threshold, the optimal node is activated from the secondary routing candidate nodes, and a redirection instruction is broadcast to the leaf routing nodes covered by the edge of the original secondary routing node to guide the leaf routing nodes to switch to the nearest optimal node.
[0058] This embodiment establishes a function switching mechanism based on "differentiated monitoring perspectives". Because the main routing node is located at the hub of cellular communication and data aggregation, it can directly obtain the forwarding latency of the entire network's service flow on each path. Therefore, it extracts the time consumption based on the feature-sensing segment. Leaf route coverage This process filters "secondary router candidate nodes" to evaluate their forwarding efficiency and aggregation potential as local gateways. Conversely, secondary router nodes operate in the active layer of the local Bluetooth network, and their clock synchronization deviation is evaluated in real-time by the system through frequent clock interactions with the cloud and local encrypted calculations. and Operation speed This process filters out "primary router candidate nodes" that meet cloud access standards. This logic ensures that each node, while undertaking its current task, is continuously providing performance validation for another level of core metrics.
[0059] This cross-screening mechanism, through the complementary and misaligned monitoring perspectives, achieves precise alignment between candidate node evaluation metrics and actual business needs, ensuring the real-time nature and reliability of data within the candidate pool. This "cross-validation" mode significantly eliminates performance uncertainties during node function switching, enabling the network hierarchy to directly utilize high-quality nodes that have already been validated by upper or parallel layers when undergoing dynamic evolution, thus greatly shortening the oscillation cycle from network topology degradation to self-healing.
[0060] The primary route filters secondary route candidates to ensure high-speed pass-through capabilities and address edge congestion by prioritizing "forwarding efficiency" from the bottom up. Conversely, secondary routes filter primary route candidates to ensure robust "security computing power" from the top up, providing the hardware necessary to support high-strength encryption and precise timestamp verification. This two-way filtering mechanism ensures that candidates at each level precisely meet the "hard technical requirements" for their respective positions. Relying on node self-nominations or cloud-based scheduling often results in a lag in perception. Through cross-level filtering, the system completes its "talent pool" before a failure occurs. This transforms "post-failure reorganization" into "on-the-go pre-selection." When a primary route needs replacement due to computing power degradation, the system doesn't need to temporarily scan the entire network; instead, it smoothly transitions from the verified "primary route candidate pool," achieving seamless takeover of business logic.
[0061] The hardware resources of the billing controller (such as flash memory read / write lifespan and cellular module heat loss) are limited. The significance of cross-screening lies in breaking the rigid pattern of fixed roles. By continuously promoting qualified secondary routes to primary routes or degrading overloaded secondary routes, the system logically achieves "network-wide balance of computing power and energy consumption," preventing premature aging of single-point physical devices and extending the service life of the entire self-service terminal control system.
[0062] In summary, the primary route filtering of secondary route candidates and the secondary route filtering of primary route candidates form a closed loop of "pre-qualification of capabilities." The technical logic is that a node in position A is evaluated based on the key indicators required for position B. This design ensures that every transition (upgrade or downgrade) in the network topology is based on the optimal choice from real-world operational data, fundamentally solving the communication paralysis problem caused by improper role allocation in complex environments for large-scale IoT devices.
[0063] Formula parameter definition: : Time taken to extract feature-aware segments (measures forwarding speed).
[0064] Number of leaf routes within Bluetooth coverage area (measures convergence capability).
[0065] Clock synchronization deviation (measures the accuracy of time verification).
[0066] : Security authentication segment processing speed (measures encryption processing capability).
[0067] Main route candidate pool: has low and high A set of nodes representing a feature.
[0068] Secondary route candidate pool: possesses low... and high A set of nodes representing a feature.
[0069] After the candidate list is determined, the system performs real-time polling of the operational status of the main routers, monitoring parameters including their cellular channel reliability score. and Operation speed Once the performance metrics of the current primary router fall below the preset security or rate threshold, the system immediately initiates a role handover procedure, retrieving clock synchronization deviations from the primary router candidate pool. The smallest node performs the takeover operation, establishing a new cloud communication link. The original primary routing node then performs gradient degradation based on its real-time remaining performance. If it meets the secondary routing selection criteria, it enters the secondary routing level to continue operating; otherwise, it directly falls back to the leaf routing level to perform basic services. This process builds a forward-looking fault-tolerant capability for the primary routing level, transforming the traditional passive "disconnection and reconnection" mechanism into a performance-driven proactive takeover mechanism. This smooth level switching effectively eliminates the risk of global control paralysis caused by primary node hardware aging or network environment degradation, achieving dynamic rearrangement of network communication resources without interrupting service flow, and ensuring the absolute continuity of cloud control command issuance.
[0070] The system performs local congestion monitoring at the secondary routing level and compares the extraction time of feature sensing segments in real time. With the preset first threshold The system determines the processing load. When the processing time exceeds the limit, indicating that the current secondary routing node is experiencing computational congestion or has too many leaf routes attached, the system automatically activates the optimal node in the secondary routing candidate pool and sends a redirection command to the leaf routing nodes covered by the original node's edge. Upon receiving the command, the affected leaf routing nodes abandon their original physical links and connect to the newly activated secondary routing node via Bluetooth, thereby completing the reconstruction of the local topology. This mechanism achieves automated traffic distribution and routing at the edge, significantly shortening the queuing time of control commands at the secondary routing nodes. By actively guiding leaf routes to perform nearby redirection, the system can confine network oscillations to specific local areas, maintaining microsecond-level response performance for self-service terminal control commands under high-concurrency requests without needing to reconstruct the global network.
[0071] The system no longer relies on a fixed hardware gateway, but instead utilizes a complex... Computing power, clock precision, and processing latency are quantified as hard metrics for nodes. This three-tier routing architecture, based on real-time flow of performance metrics, gives the network strong adaptability and self-healing capabilities, ensuring that the control system always maintains the optimal transmission path in large-scale, highly disruptive public environments.
[0072] Suppose a cluster of billing controllers is deployed in the basement of a large shopping mall. The main router at the elevator entrance on the first floor experiences environmental interference, leading to a decrease in its cellular network signal-to-noise ratio and a drop in reliability score. The clock speed decreased. The system detected this change instantly, checked the candidate list, and found a clock deviation in a controller on the second floor. With its extremely small size and abundant computing power, the second-floor node immediately took over cloud communication, while the first-floor node was relegated to a secondary router, only responsible for handling the forwarding of nearby low-power Bluetooth data. This dynamic adjustment ensures that the startup command will never be lost due to a single point of failure after the user scans the code.
[0073] For example, the calculation process of the cellular channel reliability score specifically includes: Obtain the physical communication parameters of the current cellular network channel and calculate the basic physical score using weighted averages.
[0074] Calculate the deviation between the actual transmission delay of the control data packet and the preset target delay, as well as the rate of change of the deviation.
[0075] The deviation and the rate of change of deviation are input into a preset fuzzy controller, and a dynamic penalty coefficient is output by adjusting the PID control parameters online.
[0076] The cellular channel reliability score for the current operating cycle is obtained by subtracting the dynamic penalty coefficient from the basic physical score.
[0077] The system obtains underlying physical link parameters, including Received Signal Strength Indicator (RSSI), Signal-to-Noise Ratio (SNR), and Reference Signal Received Quality (RSRQ), from the cellular communication baseband of the billing controller. Using a pre-defined weighted algorithm, the system performs linear or non-linear weighted summation based on the contribution weights of each parameter to communication stability, thereby generating a basic physical score reflecting the current cellular hardware connection quality. This step establishes a hardware benchmark for channel reliability and quantifies the impact of the physical layer environment on communication quality. Through a comprehensive evaluation of multi-dimensional physical indicators, the system can objectively reflect the quality of the radio environment between the current equipment and the base station, providing solid underlying data support for subsequent dynamic adjustments based on service layer indicators.
[0078] The system then monitors the complete transmission delay of each control data packet from sending to receiving confirmation in real time, and calculates its arithmetic deviation from the preset target delay. And calculate the rate of change of this deviation over adjacent periods. .Will and The parameters of the PID (Proportional-Integral-Derivative) controller are passed as input to the fuzzy controller, and the fuzzy inference rules are used to perform online self-tuning of the PID controller parameters. The PID controller outputs a dynamic penalty coefficient based on the tuned parameters, the magnitude of which is directly affected by the severity of the time delay fluctuation and its deterioration trend.
[0079] This process introduces a dynamic monitoring mechanism for Quality of Service (QoS), enabling precise perception of network congestion. By analyzing the rate of change in latency, the system can effectively distinguish between sporadic link jitter and systemic network congestion. Utilizing the nonlinear adjustment capability of fuzzy PID, the system can generate predictive penalty feedback, thereby transforming abstract network latency fluctuations into quantifiable link degradation risk values.
[0080] Finally, the system executes a subtraction operation, subtracting the dynamic penalty coefficient output in the third step from the basic physical score obtained in the first step. Essentially, this process lowers the "theoretical upper limit" of the physical layer based on the "actual performance" of the service layer. The resulting cellular channel reliability score is the comprehensive communication performance indicator of the billing controller within the current operating cycle. This step achieves deep integration of physical and service indicators, eliminating the limitations of a single physical layer evaluation. Its technical effect lies in solving the problem of identifying pseudo-high-quality links that are "strong in signal but slow in service," ensuring that the final reliability score truly reflects the channel's real-time capability in processing high-frequency control commands, and providing accurate decision-making basis for subsequent selection of the main routing node and link switching.
[0081] Assuming a billing controller is located near an elevator entrance, and the physical signal RSSI is high, its basic physical score... The value is 90. However, during peak periods, cellular base station congestion leads to increased control packet return delay, resulting in deviation. Increase and the rate of change of deviation The trend is upward. The fuzzy PID controller detects this worsening trend and outputs a large dynamic penalty coefficient. (e.g., 25). Final reliability score In this case, the system will avoid selecting it as the primary route due to its low score, thus preventing service congestion.
[0082] This calculation process constructs a closed-loop evaluation system from physical environment monitoring to service latency feedback and nonlinear dynamic compensation. It not only focuses on whether nodes "can connect" (physical parameters), but also on whether nodes "work well" (dynamic latency). This design ensures that the system can eliminate interference factors and select truly high-response communication channels in complex cellular network environments.
[0083] For example, the confirmation process of the optimal node specifically includes: The coverage overlap, feature sensing segment extraction time, uplink quality index and load margin of each candidate node are extracted, and after normalization, a multi-dimensional feature vector is generated for each candidate node.
[0084] Iterate through the multidimensional feature vectors of all candidate nodes, extract the maximum extrema of each dimension to form a positive ideal feature vector, and extract the minimum extrema of each dimension to form a negative ideal feature vector.
[0085] Calculate the first Euclidean distance between the multidimensional feature vector of each candidate node and the positive ideal feature vector, and the second Euclidean distance between the multidimensional feature vector of each candidate node and the negative ideal feature vector.
[0086] Based on the ratio of the first Euclidean distance to the second Euclidean distance, calculate the comprehensive approximation score of each candidate node, and select the candidate node with the highest score as the optimal node.
[0087] The system first extracts four dimensions of operational parameters for each billing controller in the candidate pool: coverage overlap (reflecting topological redundancy), feature-aware segment extraction time (reflecting edge forwarding efficiency), uplink quality indicators (reflecting signal strength and stability), and load margin (reflecting remaining processing capacity). Since the units of measurement for each indicator differ, the system normalizes the raw data, mapping data of different magnitudes to a unified numerical range, and constructs a multi-dimensional feature vector representing the overall state of each node. This step eliminates the interference of physical units and numerical differences on the evaluation results, enabling a fair comparison between "millisecond-level latency" and "decibel-level signal" within the same mathematical framework. This effectively avoids situations where a large value in one dimension (such as wide coverage) masks defects in core indicators (such as excessively high forwarding time).
[0088] By traversing the multidimensional feature vectors of all nodes in the current candidate pool, the best-performing extreme values in each dimension (such as the minimum value in the latency dimension and the maximum value in the load dimension) are extracted to form a positive ideal feature vector; simultaneously, the worst-performing extreme values in each dimension are extracted to form a negative ideal feature vector. These two vectors represent the theoretical "performance upper limit" and "performance lower limit" in the current network environment, respectively.
[0089] This process establishes a dynamic benchmark based on real-time network conditions, rather than using rigid, fixed thresholds. This dynamic benchmark can adaptively adjust to changes in environmental interference and workload, ensuring that the selection logic can accurately identify the relatively optimal member in the current pool under both extremely harsh and ideal environments, thus enhancing the environmental robustness of the self-organizing network.
[0090] Finally, using geometric space calculation methods, the first Euclidean distance between the feature vector of each node and the positive ideal vector is calculated. and the second Euclidean distance between it and the negative ideal vector. Then, according to the formula... Calculate the overall approximation score for each candidate node. A higher score means that the node is closer to the optimal performance point and further away from the worst performance point in geometric space.
[0091] This evaluation system provides a comprehensive and balanced assessment method, effectively avoiding the systemic risks associated with "single-item champions" (i.e., nodes with excellent performance in one metric but fatal weaknesses in another). Through this quantitative ranking based on approximation, the system can accurately select the optimal node as the best node, achieving the best balance between forwarding speed, signal quality, and load margin, significantly improving link reliability and service continuity after topology self-healing. This process transforms the physical characteristics of nodes into multi-dimensional spatial coordinates and uses the TOPSIS algorithm to calculate their geometric distance from the ideal state, realizing an objective optimization mechanism that does not rely on human experience. It ensures that the activated "optimal node" is the most balanced and resilient routing node in the current environment.
[0092] Assume there are two candidate nodes and : node The Bluetooth signal is extremely strong (close to ideal), but due to the large number of people scanning the code, the processing time is very long (close to negative ideal).
[0093] node The signal strength is moderate, but the processing time is extremely fast and the load is extremely low.
[0094] By calculating the Euclidean distance, the nodes Although it may approach the positive ideal in one dimension, its overall score will be diluted because it is extremely close to the negative ideal in another dimension. And nodes... Because all dimensions are far from the negative ideal, its final comprehensive approximation score is often higher, thus it is selected as the "optimal node" to perform the forwarding task.
[0095] For example, each of the primary routing nodes selects a connection channel with each of the secondary routing nodes according to a fuzzy PID algorithm, and each of the secondary routing nodes selects a connection channel with each of the leaf routing nodes within its Bluetooth communication range according to a fuzzy PID algorithm, specifically including: From the control data packets transmitted through the candidate connection channels, the actual arrival time corresponding to the same delay verification sequence number is extracted. The deviation between the actual transmission delay of the candidate connection channel and the preset target delay is calculated as the first input quantity, and the rate of change of the deviation within a continuous operating cycle is calculated as the second input quantity. The candidate connection channels include Bluetooth connection channels and cellular network channels.
[0096] The first and second input quantities are converted into membership vectors in the fuzzy domain. Logical reasoning is performed in combination with the preset fuzzy control rule base. The proportional parameter correction value, integral parameter correction value and derivative parameter correction value of the PID controller in the current running cycle are calculated and output online. The proportional parameter correction value, integral parameter correction value, and derivative parameter correction value are substituted into the PID control equation for iterative compensation, and a real-time dynamic reliability score is output for each candidate connection channel.
[0097] Compare the real-time dynamic reliability scores of all candidate connection channels between the current node and the previous level node, and lock the candidate connection channel with the highest score as the optimal connection channel for issuing control commands and collecting terminal operation information; if the real-time dynamic reliability scores of all candidate connection channels under a certain node are lower than the preset score threshold, then the dual-channel concurrent transmission mode is forcibly enabled.
[0098] This embodiment first utilizes the same delay verification sequence number carried in the control data packet to measure the end-to-end actual transmission delay of candidate connection channels (including Bluetooth and cellular networks) by recording the precise arrival time of messages at the sending and receiving ends. Subsequently, the system calculates the arithmetic deviation between this actual delay and the preset target delay, which serves as the first input quantity for fuzzy control. Simultaneously, by comparing the increments of deviation values within adjacent operating cycles, the rate of change of the deviation is calculated and used as the second input quantity. This step enables quantitative detection of network link quality, transforming abstract network fluctuations into precise deviation data with a time reference. Its technical advantage lies in introducing a deviation change rate, allowing the system not only to perceive the current level of congestion but also to identify trends of network performance deterioration or improvement, providing highly sensitive data feedback for subsequent proactive dynamic compensation.
[0099] Extracted deviation With rate of change Mapped to the fuzzy domain, it is transformed into a fuzzy vector using a membership function. Subsequently, the system calls the preset fuzzy control rule base (IF-THEN rule set) and, based on the current link fluctuation characteristics, calculates online the correction values for the three key parameters of the PID controller, namely the proportional parameter correction value. Integral parameter correction value and differential parameter correction value This process endows the system with adaptive adjustment capabilities for nonlinear and time-varying network environments. Through the intervention of fuzzy logic, the system can overcome the limitations of traditional fixed PID parameters in dealing with random jitter. When the link quality fluctuates drastically, it can intelligently adjust the correction force and response speed, significantly improving the robustness of the control system in routing under dynamic heterogeneous networks.
[0100] The system then substitutes the obtained correction value into the PID control equation for iterative calculation: , , (including) (The subscripts represent initial values). This equation performs closed-loop compensation calculations for delay deviations, ultimately outputting a quantitative score representing the real-time dynamic reliability of the channel. This step transforms complex network physical indicators into a unified, directly comparable evaluation dimension. Its technical effect lies in using the integral action of PID control to eliminate steady-state errors and the derivative action to suppress overshoot, thereby outputting a comprehensive score that is both smooth and reflects instantaneous risk. This solves the technical problem that raw delay data cannot be directly used for routing decisions due to excessive jumps.
[0101] Finally, all available candidate channels for the current node (such as Bluetooth and cellular links between the primary route and the secondary route, and between the secondary route and the leaf route) are ranked by reliability score, and the link with the highest score is automatically locked as the sole channel for issuing commands and reporting information. If it is found that the scores of all available channels under the node are lower than the preset safety threshold, the system immediately bypasses the single routing logic and forces the dual-channel concurrent transmission mode of Bluetooth and cellular network to be enabled. By "selectively locking the best option", energy consumption and channel conflicts are reduced under normal conditions, while "forced concurrency" uses physical redundancy to improve transmission success rate in extremely harsh environments, completely eliminating the risk of control command failure or large-scale terminal disconnection due to single-channel performance degradation.
[0102] It should be noted that, The first input is the difference (deviation) between the actual transmission delay and the target delay. The second input quantity is the rate of change of the deviation value between adjacent periods (the rate of change of deviation). : Correction values for the proportional, integral, and derivative parameters output by the fuzzy controller. : The real-time dynamic reliability score of the final output of the PID control equation. : A preset scoring security threshold used to trigger dual-channel concurrent mode.
[0103] For example, when a billing controller receives a new control data packet through any channel, after determining the communication method according to the billing controller's classification type, it uploads the control data packet to the cloud. After the cloud determines that the control data packet is valid, it sends a control command to the billing controller, specifically including: When a primary routing node receives a new control data packet through any channel, it uploads the control data packet to the cloud. After the cloud verifies the validity of the control data packet, it sends a control command to the primary routing node. When a secondary routing node receives a new control data packet through any channel, it uploads the control data packet to the cloud through any primary routing node. After the cloud verifies the validity of the control data packet, it sends a control command to the primary routing node. When a leaf routing node receives a new control data packet through any channel, it first sends the control data packet to any primary routing node within Bluetooth communication range through any secondary routing node, and then the primary routing node uploads the control data packet to the cloud. After the cloud verifies the validity of the control data packet, it sends a control command to the primary routing node. The primary routing node forwards the control command to the corresponding secondary routing node or leaf routing node through the optimal connection channel selected by the fuzzy PID algorithm.
[0104] Compared to existing technologies, this invention utilizes the dual-channel characteristics of the billing controller, which combines Bluetooth and cellular communication, to periodically broadcast and collect surrounding terminal operation information during each operating cycle. Based on these global states, the system breaks away from the traditional static and rigid networking, dynamically dividing all network nodes into three levels: primary routes, secondary routes, and leaf routes. This adaptive topology reconstruction of "primary routes to secondary routes, and secondary routes to leaf routes" enables the concurrent data from massive devices to be "aggregated nearby and distributed in stages," effectively resolving the computing power congestion bottleneck in the traditional single gateway mode and achieving structural elastic load balancing.
[0105] Once the hierarchy is established, the establishment of channels between nodes avoids the shortcomings of blindly connecting based solely on physical signal strength. This solution explicitly requires that the primary and secondary routes must select the optimal connection channel using a "fuzzy PID algorithm." This algorithm can comprehensively evaluate dynamic characteristics such as link latency, accurately reflecting network congestion trends. Through this calculation process, the system can accurately eliminate inferior links with "high signal strength but low computing power," fundamentally suppressing frequent network jumps and the "ping-pong effect" in complex public environments.
[0106] When any node receives a new control data packet, the system strictly determines the optimal communication method based on the current dynamic classification type and uploads it to the cloud. After the cloud server performs centralized validity verification, it accurately sends control commands along the constructed optimal and most stable channel. The physical redundancy of the dual channels, combined with the aforementioned intelligent scheduling at the software level, ensures that the self-service terminal can still achieve high security and low latency response to billing commands even in environments with weak signals and strong interference.
[0107] See Figure 2One embodiment of this application provides a self-service terminal control system based on dual-channel communication, including a plurality of self-service terminals 2, a billing controller 3 connected to each of the self-service terminals in a one-to-one correspondence, and a cloud server 1; wherein: The billing controller 3 is a dual-channel communication routing node comprising a Bluetooth communication module and a cellular network communication module. Each self-service terminal connects to the cloud server through its corresponding billing controller. The billing controller 3 is configured as follows: Every operating cycle, based on the control data packets sent by the corresponding self-service terminal 2 within that operating cycle, terminal operating information is generated and broadcast to the Bluetooth network range at regular intervals.
[0108] Every operating cycle, based on all the terminal operating information obtained, it participates in the whole network topology reconstruction and is dynamically divided into a primary routing node, a secondary routing node, or a leaf routing node.
[0109] When acting as the primary routing node, it interconnects with other primary routing nodes via the cellular network, selects the connection channel with each subordinate secondary routing node using a fuzzy PID algorithm, and includes terminal operation information of all subordinate secondary routing nodes, periodically uploading all included terminal operation information to the cloud server.
[0110] When acting as a secondary routing node, it selects a connection channel with each of the leaf routing nodes within its Bluetooth communication range using a fuzzy PID algorithm; and includes terminal operation information of all subordinate leaf routing nodes within its Bluetooth communication range. When a new control data packet is received through any channel, the corresponding communication method is determined according to the current node classification type, and the control data packet is uploaded to the cloud server.
[0111] The cloud server 1 is communicatively connected to the billing controller and is configured to: receive control data packets uploaded by the billing controller, and after determining that the control data packets are valid, send control instructions to the corresponding billing controller.
[0112] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the self-service terminal control system based on dual-channel communication described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0113] Compared to existing technologies, this invention utilizes the dual-channel characteristics of the billing controller, which combines Bluetooth and cellular communication, to periodically broadcast and collect surrounding terminal operation information during each operating cycle. Based on these global states, the system breaks away from the traditional static and rigid networking, dynamically dividing all network nodes into three levels: primary routes, secondary routes, and leaf routes. This adaptive topology reconstruction of "primary routes to secondary routes, and secondary routes to leaf routes" enables the concurrent data from massive devices to be "aggregated nearby and distributed in stages," effectively resolving the computing power congestion bottleneck in the traditional single gateway mode and achieving structural elastic load balancing.
[0114] Once the hierarchy is established, the establishment of channels between nodes avoids the shortcomings of blindly connecting based solely on physical signal strength. This solution explicitly requires that the primary and secondary routes must select the optimal connection channel using a "fuzzy PID algorithm." This algorithm can comprehensively evaluate dynamic characteristics such as link latency, accurately reflecting network congestion trends. Through this calculation process, the system can accurately eliminate inferior links with "high signal strength but low computing power," fundamentally suppressing frequent network jumps and the "ping-pong effect" in complex public environments.
[0115] When any node receives a new control data packet, the system strictly determines the optimal communication method based on the current dynamic classification type and uploads it to the cloud. After the cloud server performs centralized validity verification, it accurately sends control commands along the constructed optimal and most stable channel. The physical redundancy of the dual channels, combined with the aforementioned intelligent scheduling at the software level, ensures that the self-service terminal can still achieve high security and low latency response to billing commands even in environments with weak signals and strong interference.
[0116] One embodiment of this application provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the self-service terminal control method based on dual-channel communication as described above.
[0117] One embodiment of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the self-service terminal control method based on dual-channel communication as described above.
[0118] The computer device may be a smartphone, tablet, desktop computer, or cloud server, among other computing devices. This computer device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the figures are merely examples of computer devices and do not constitute a limitation on the computer device. It may include more or fewer components than illustrated, or a combination of certain components, or different components, such as input / output devices, network access devices, etc.
[0119] The processor referred to can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0120] In some embodiments, the memory may be an internal storage unit of the computer device, such as a hard drive or RAM. In other embodiments, the memory may be an external storage device of the computer device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory may include both internal and external storage units of the computer device. The memory is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory can also be used to temporarily store data that has been output or will be output.
[0121] This application provides a computer program product that, when run on a computer device, enables the computer device to execute the steps described in the various method embodiments above.
[0122] In the several embodiments provided in this application, it will be understood that each block in the flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the figures. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved.
[0123] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0124] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A self-service terminal control method based on dual-channel communication, characterized in that, include: Each self-service terminal connects to the cloud via a corresponding billing controller; The billing controller is a dual-channel communication routing node for both Bluetooth and cellular networks; At each operating cycle, each billing controller generates terminal operating information based on the control data packets sent by the corresponding self-service terminal during that operating cycle; Each of the billing controllers periodically broadcasts the terminal operation information to the Bluetooth network range; At each operating cycle, based on the operating information of all terminals, all billing controllers are divided into several main routing nodes, several secondary routing nodes, and several leaf routing nodes. Each main routing node is interconnected via a cellular network. Each main routing node selects a connection channel with each secondary routing node using a fuzzy PID algorithm. Each secondary routing node selects a connection channel with each leaf routing node within its Bluetooth communication range using a fuzzy PID algorithm. Each main routing node contains terminal operating information for all secondary routing nodes, and each secondary routing node contains terminal operating information for all leaf routing nodes within its Bluetooth communication range. Each main routing node periodically uploads all terminal operating information contained within it to the cloud. When a billing controller receives a new control data packet through any channel, it determines the communication method according to the classification type of the billing controller, and then uploads the control data packet to the cloud. After the cloud determines that the control data packet is valid, it sends a control command to the billing controller.
2. The self-service terminal control method based on dual-channel communication as described in claim 1, characterized in that, The terminal operation information includes: Physical layer parameters, including the charging controller's Bluetooth signal strength RSSI, cellular network signal-to-noise ratio, and current network latency; Business layer parameters include the task queue length of the connected self-service terminal, the current billing status parameters, and hardware fault codes; Environmental characteristics, including the number of visible Bluetooth nodes in the neighborhood and the average communication collision rate.
3. The self-service terminal control method based on dual-channel communication as described in claim 1, characterized in that, The control data packet adopts a segmented composite frame structure, including: Feature-aware segment: Set to unencrypted state, containing hierarchical path identifier, real-time link quality parameters, and terminal load status bits; Command payload segment: Set to asymmetric encryption mode, containing control command opcodes and corresponding control parameters; Spatiotemporal verification segment: Contains a globally unique service sequence number and a high-precision transmission timestamp; Security Authentication Segment: Stores dynamic message authentication codes generated based on the feature perception segment, the instruction payload segment, and the spatiotemporal verification segment.
4. The self-service terminal control method based on dual-channel communication as described in claim 1, characterized in that, Before dividing all the billing controllers into several primary routing nodes, several secondary routing nodes, and several leaf routing nodes based on all the terminal operation information at each operating cycle, the method further includes: A preset number of primary routing nodes are randomly determined, such that the number of primary routing nodes is less than half the number of secondary routing nodes, and the number of secondary routing nodes is less than half the number of leaf routing nodes.
5. A self-service terminal control method based on dual-channel communication according to claim 3, characterized in that, In each operating cycle, based on the operating information of all terminals, all billing controllers are divided into several primary routing nodes, several secondary routing nodes, and several leaf routing nodes, specifically including: For each primary routing node, the extraction time of the primary routing node for the feature sensing segment is calculated based on all control data packets flowing through in a running cycle. Nodes with extraction time lower than the first threshold and the number of leaf routing nodes covered within the Bluetooth range of the secondary routing node is greater than a preset value are selected as secondary routing candidate nodes. For each secondary routing node, the clock synchronization deviation between the secondary routing node and the cloud is calculated based on all control data packets flowing through it in one operating cycle, and the HMAC operation rate of the secondary routing node for the security authentication segment is calculated; nodes with clock synchronization deviation less than microseconds and operation rate that meet the preset bandwidth reporting requirements are selected as primary routing candidate nodes. For each primary routing node, the cellular channel reliability score and HMAC operation rate of the current primary routing node are monitored in real time. When the reliability score of the current primary routing node is lower than a preset security threshold, or the HMAC operation rate is lower than a preset rate threshold, the node with the smallest clock synchronization deviation from the primary routing candidate nodes is selected and upgraded to a new primary routing node to take over cloud communication. The current primary routing node is then downgraded. If it belongs to the secondary routing candidate nodes, it is downgraded to a new secondary routing node; otherwise, it is downgraded to a leaf routing node. For each secondary routing node, the number of leaf routing nodes attached to the current secondary routing node and the time taken to extract the feature sensing segment are monitored in real time. When the time taken to extract the feature sensing segment is higher than the first threshold, the optimal node is activated from the secondary routing candidate nodes, and a redirection instruction is broadcast to the leaf routing nodes covered by the edge of the original secondary routing node to guide the leaf routing nodes to switch to the nearest optimal node.
6. The self-service terminal control method based on dual-channel communication as described in claim 5, characterized in that, The calculation process for the cellular channel reliability score specifically includes: Obtain the physical communication parameters of the current cellular network channel and calculate the basic physical score using weighted averages. Calculate the deviation between the actual transmission delay of the control data packet and the preset target delay, as well as the rate of change of the deviation; The deviation and the rate of change of deviation are input into a preset fuzzy controller, and a dynamic penalty coefficient is output by adjusting the PID control parameters online. The cellular channel reliability score for the current operating cycle is obtained by subtracting the dynamic penalty coefficient from the basic physical score.
7. The self-service terminal control method based on dual-channel communication as described in claim 5, characterized in that, The process of confirming the optimal node specifically includes: The coverage overlap, feature sensing segment extraction time, uplink quality index and load margin of each of the secondary route candidate nodes are extracted, and after normalization, a multi-dimensional feature vector is generated for each candidate node. Traverse the multidimensional feature vectors of all candidate nodes, extract the maximum extrema of each dimension to form a positive ideal feature vector, and extract the minimum extrema of each dimension to form a negative ideal feature vector. Calculate the first Euclidean distance between the multidimensional feature vector of each candidate node and the positive ideal feature vector, and the second Euclidean distance between the multidimensional feature vector of each candidate node and the negative ideal feature vector; Based on the ratio of the first Euclidean distance to the second Euclidean distance, calculate the comprehensive approximation score of each candidate node, and select the candidate node with the highest score as the optimal node.
8. The self-service terminal control method based on dual-channel communication as described in claim 1, characterized in that, Each primary routing node selects a connection channel with each secondary routing node using a fuzzy PID algorithm, and each secondary routing node selects a connection channel with each leaf routing node within its Bluetooth communication range using a fuzzy PID algorithm, specifically including: From the control data packets transmitted through the candidate connection channels, the actual arrival time corresponding to the same delay verification sequence number is extracted. The deviation between the actual transmission delay of the candidate connection channel and the preset target delay is calculated as the first input quantity, and the rate of change of the deviation within a continuous operating cycle is calculated as the second input quantity. The candidate connection channels include Bluetooth connection channels and cellular network channels. The first and second input quantities are converted into membership vectors in the fuzzy domain. Logical reasoning is performed in combination with the preset fuzzy control rule base. The proportional parameter correction value, integral parameter correction value and derivative parameter correction value of the PID controller in the current running cycle are calculated and output online. The proportional parameter correction value, integral parameter correction value, and derivative parameter correction value are substituted into the PID control equation for iterative compensation, and a real-time dynamic reliability score is output for each candidate connection channel. Compare the real-time dynamic reliability scores of all candidate connection channels between the current node and the previous level node, and lock the candidate connection channel with the highest score as the optimal connection channel for issuing control commands and collecting terminal operation information; if the real-time dynamic reliability scores of all candidate connection channels under a certain node are lower than the preset score threshold, then the dual-channel concurrent transmission mode is forcibly enabled.
9. The self-service terminal control method based on dual-channel communication as described in claim 1, characterized in that, When a billing controller receives a new control data packet through any channel, after determining the communication method based on the billing controller's classification type, it uploads the control data packet to the cloud. After the cloud verifies the validity of the control data packet, it sends a control command to the billing controller, specifically including: When a primary routing node receives a new control data packet through any channel, it uploads the control data packet to the cloud. After the cloud verifies the validity of the control data packet, it sends a control command to the primary routing node. When a secondary routing node receives a new control data packet through any channel, it uploads the control data packet to the cloud through any primary routing node. After the cloud verifies the validity of the control data packet, it sends a control command to the primary routing node. When a leaf routing node receives a new control data packet through any channel, it first sends the control data packet to any primary routing node within Bluetooth communication range through any secondary routing node, and then the primary routing node uploads the control data packet to the cloud. After the cloud verifies the validity of the control data packet, it sends a control command to the primary routing node. The primary routing node forwards the control command to the corresponding secondary routing node or leaf routing node through the optimal connection channel selected by the fuzzy PID algorithm.
10. A self-service terminal control system based on dual-channel communication, characterized in that, include: A plurality of self-service terminals, a billing controller connected to each of the self-service terminals, and a cloud server; wherein: The billing controller is a dual-channel communication routing node comprising a Bluetooth communication module and a cellular network communication module. Each self-service terminal connects to the cloud server through its corresponding billing controller. The billing controller is configured to: Every operating cycle, based on the control data packets sent by the corresponding self-service terminal within that operating cycle, terminal operating information is generated and broadcast to the Bluetooth network range at regular intervals; Every operating cycle, based on all the terminal operating information obtained, it participates in the full network topology reconstruction and is dynamically divided into a primary routing node, a secondary routing node, or a leaf routing node. When acting as the primary routing node, it interconnects with other primary routing nodes via the cellular network, selects the connection channel with each subordinate secondary routing node using a fuzzy PID algorithm, and contains terminal operation information of all subordinate secondary routing nodes, periodically uploading all terminal operation information contained therein to the cloud server. When acting as a secondary routing node, it selects a connection channel with each of the leaf routing nodes within its Bluetooth communication range using a fuzzy PID algorithm; and includes terminal operation information of all subordinate leaf routing nodes within its Bluetooth communication range. When a new control data packet is received through any channel, the corresponding communication method is determined according to its current node classification type, and the control data packet is uploaded to the cloud server. The cloud server, which is communicatively connected to the billing controller, is configured to: receive control data packets uploaded by the billing controller, and after determining that the control data packets are valid, send control instructions to the corresponding billing controller.