Device control method, apparatus, and computing device
By constructing a token ring network in the rail transit system, self-organized communication and dynamic adjustment between devices are achieved, solving the communication problems caused by centralized control and realizing efficient and reliable collaborative control of devices.
Patent Information
- Application Number
- CN202510973990.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-15
- Publication Date
- 2026-08-04
- Estimated Expiration
- 2045-07-15
AI Technical Summary
In existing rail transit systems, equipment communication relies on centralized control, which leads to communication delays, bottlenecks, and system failures, making it difficult to flexibly respond to changes in equipment status.
The token ring network mechanism is adopted. The self-organizing scheduling module automatically establishes communication links between devices and builds a token ring network. Devices execute tasks when they hold tokens. The fault detection module adjusts the network structure to achieve dynamic load balancing and fault recovery.
It improves the communication efficiency and reliability of the rail transit system, avoids communication delays and conflicts, enhances the system's flexibility and scalability, and ensures stable operation.
Smart Images

Figure CN120710824B_ABST
Abstract
Description
Technical Field
[0001] The embodiments in this specification relate to the field of rail transit technology, and in particular to a device control method, apparatus and computing device. Background Technology
[0002] With the rapid development of computer technology and intelligent equipment control technology, the acceleration of urbanization and the growth of transportation demand, rail transit technology has also developed rapidly. The complexity and automation of rail transit systems are constantly increasing, and the collaborative work between various devices is becoming increasingly important.
[0003] In existing technologies, communication and control of various devices in rail transit systems rely on a centralized control method, that is, communication and task control of various devices are centrally managed through a control terminal. However, centralized control methods are prone to communication delays, bottlenecks, and failures, affecting the stability and reliability of the rail transit system. Therefore, there is an urgent need for a more efficient, stable, and reliable device control scheme. Summary of the Invention
[0004] In view of the above, embodiments of this specification provide a device control method. One or more embodiments of this specification also relate to a device control apparatus, a computing device, a computer-readable storage medium, and a computer program product, to address the technical deficiencies existing in the prior art.
[0005] According to a first aspect of the embodiments of this specification, a device control method is provided, applied to a first device in a rail transit system, wherein the first device is any device in the rail transit system, comprising: Identify the second device associated with the first device; Acquire the first spatiotemporal information of the first device, the second spatiotemporal information of the second device, and the connection relationship between the first device and the second device; Based on the first device, the second device, the first spatiotemporal information, the second spatiotemporal information, and the connection relationship, a first group information of the first device is constructed, wherein the first group information is used to store the structural relationship between the first device and the second device in the token ring network, and the group information of each device in the rail transit system is used to store the constructed token ring network of the rail transit system; Based on the first group information, communication with the second device is achieved through token scheduling.
[0006] According to a second aspect of the embodiments of this specification, a device control apparatus is provided, applied to a first device in a rail transit system, wherein the first device is any device in the rail transit system, comprising: The determination module is configured to determine a second device associated with the first device; The acquisition module is configured to acquire first spatiotemporal information of the first device, second spatiotemporal information of the second device, and connection relationship between the first device and the second device. The construction module is configured to construct first group information of the first device based on the first device, the second device, the first spatiotemporal information, the second spatiotemporal information, and the connection relationship. The first group information is used to store the structural relationship between the first device and the second device in the token ring network. The group information of each device in the rail transit system is used to store the constructed token ring network of the rail transit system. The communication module is configured to communicate with the second device via token scheduling based on the first group information.
[0007] According to a third aspect of the embodiments of this specification, a computing device is provided, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, which, when executed by the processor, implement the steps of the above-described device control method.
[0008] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores computer-executable instructions that, when executed by a processor, implement the steps of the device control method described above.
[0009] According to a fifth aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described device control method.
[0010] This specification provides a device control method applied to a first device in a rail transit system, wherein the first device is any device in the rail transit system; a second device associated with the first device is determined; first spatiotemporal information of the first device, second spatiotemporal information of the second device, and connection relationships between the first device and the second device are obtained; based on the first device, the second device, the first spatiotemporal information, the second spatiotemporal information, and the connection relationships, first group information of the first device is constructed, wherein the first group information is used to store the structural relationship between the first device and the second device in a token ring network, and the group information of each device in the rail transit system is used to store the constructed token ring network of the rail transit system; based on the first group information, communication with the second device is achieved through token scheduling.
[0011] One embodiment of this specification implements a system where any device in a rail transit system can act as a first device. The first device can determine a second device that needs to communicate, and then acquire first spatiotemporal information of the first device, second spatiotemporal information of the second device, and the connection relationship between the first and second devices. This first group information constructs first group information for the first device, indicating the structural relationship between the first and second devices in a token ring network. Each device's group information in the rail transit system can indicate its own structural relationship with other devices, forming a token ring network for the rail transit system. This allows the first device to communicate with the second device in the token ring network based on the first group information and through token scheduling. Thus, a construction scheme for a token ring network in a rail transit system is provided. Any device in the rail transit system can maintain group information, recording its structural information in the token ring network. Through token scheduling in the token ring network, communication between different devices is achieved without centralized control, avoiding communication delays and conflicts, improving communication efficiency, and avoiding the communication bottleneck of centralized control. Different devices communicate based on their structural information in the token ring network without affecting the communication of other devices, making the entire rail transit system more stable and reliable. Attached Figure Description
[0012] Figure 1 This is a flowchart of a device control method provided in one embodiment of this specification; Figure 2 This is a token ring network diagram of a rail transit system provided in one embodiment of this specification; Figure 3 This is a flowchart illustrating the processing procedure of a device control method provided in one embodiment of this specification; Figure 4 This is a schematic diagram of the structure of a device control apparatus provided in one embodiment of this specification; Figure 5 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation
[0013] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0014] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0015] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0016] Furthermore, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties. Moreover, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0017] First, the terms and concepts used in one or more embodiments of this specification will be explained.
[0018] Token: A crucial concept in computer networks and distributed systems, tokens are typically used to control access to shared resources or coordinate communication between multiple devices. A token is a special control packet that is passed between devices on the network to determine which device can send data within a given time period. This prevents multiple devices from simultaneously attempting to send data, thus avoiding conflicts or packet collisions and ensuring an orderly data transmission process.
[0019] Token Ring Network (TRN) is a local area network (LAN) technology where all devices (nodes) are connected in a closed ring structure. It uses a token passing protocol to manage data transmission on the network. Physically, a TRN network can be a star or other topology, but logically it is a closed ring. Only one special control frame, called a "token," is used to control which device can send data at a given time. The "token" is passed in one direction (usually unidirectional) from one device to the next in this virtual ring. When no device needs to send data, the token is passed around the ring in an idle state. Devices wanting to send data must wait to receive this idle token. Upon receiving the idle token, the device converts it to an "occupied" state and appends its own data frame. The data frame is passed along the ring with the token until it reaches the target device. The target device copies the data frame and acknowledges receipt. The token then continues moving along the ring until it returns to the device that initially sent the data. Because there is only one token in a TRN network, multiple devices cannot attempt to send data simultaneously, avoiding packet collisions and communication conflicts.
[0020] Equipment: Any node in a rail transit system, equipped with a computing unit and a communication module, capable of independently performing specific functions and communicating with other equipment through a token ring mechanism.
[0021] Token Ring Mechanism: Implemented based on the Token Ring protocol, tokens are passed between devices in the Token Ring network, and the device holding the token has communication control for a short period of time. Token Ring guarantees collision-free and real-time data transmission.
[0022] Self-organizing scheduling module: This module is used to dynamically manage the construction and reconstruction of the token ring network. Devices can automatically join or leave the token ring network according to their own needs and reconfigure the token transmission order.
[0023] Fault detection and recovery mechanism: The device is equipped with a fault detection module, which can identify and initiate a recovery mechanism when the device communication fails or malfunctions, and ensure the continuity and stability of the token ring network by adjusting the token ring path.
[0024] Load balancing mechanism: This mechanism monitors the load of devices and rationally allocates communication and computing tasks to avoid overloading or idleness of individual devices.
[0025] It should be noted that as the complexity and automation of rail transit systems continue to increase, the collaborative work between various devices becomes increasingly important. Currently, most rail transit equipment relies on centralized control methods for communication and control. This approach is prone to communication delays, bottlenecks, and system failures, and it is difficult to flexibly respond to changes in equipment status in the dynamic environment of the rail transit system, such as communication between equipment on the train and equipment on the platform when the train enters the station.
[0026] This specification provides an equipment control method for rail transit systems. In this method, each device in the rail transit system can automatically establish communication through a self-organizing scheduling module, generating a token ring network. When a device holds a token, it performs specific tasks, such as sending status information, receiving instructions, or collaborating with other devices. When a device detects an anomaly or fault, the fault detection module triggers adjustments, regenerating the token ring network to ensure the stable operation of the rail transit system. Furthermore, the load of each device can be periodically assessed, and dynamic scheduling and adjustments can be performed to optimize communication efficiency and resource allocation. By achieving self-organization of devices in the rail transit system based on the token ring mechanism and constructing a corresponding token ring network, communication control is achieved through token passing within the token ring network. This effectively enables efficient and conflict-free communication and collaborative control in the rail transit system, thereby improving the reliability, flexibility, and scalability of the rail transit system.
[0027] This specification provides a device control method, and also relates to a device control apparatus, a computing device, a computer-readable storage medium, and a computer program product, which will be described in detail in the following embodiments.
[0028] See Figure 1 , Figure 1 A flowchart of a device control method according to an embodiment of this specification is shown, applied to a first device in a rail transit system, wherein the first device is any device in the rail transit system, and specifically includes the following steps.
[0029] Step 102: Determine the second device associated with the first device.
[0030] Specifically, this device refers to any node device in the rail transit system. This device is equipped with a computing unit and a communication module, enabling it to independently perform specific functions and communicate with other devices through a token ring mechanism. Additionally, each device can be configured with a self-organizing scheduling module. This module detects other devices and builds a token ring network with them; each device can discover other devices through this self-organizing scheduling module.
[0031] It should be noted that in the equipment of a rail transit system, the role of the self-organizing scheduling module is to enable various devices to automatically discover each other and establish communication links without central control. In actual implementation, the automatic discovery mechanism of the self-organizing scheduling module can adopt broadcast / multicast detection, where devices can send broadcast or multicast messages to announce their existence and listen for similar messages from other devices to achieve mutual discovery; alternatively, service registration and discovery protocols such as mDNS (Multicast DNS) or SSDP (Simple Service Discovery Protocol) can be used, allowing devices to register the services they provide and query the services of other devices.
[0032] In the embodiments of this specification, each device in the rail transit system can be used as a first device. The first device can discover other devices through the self-organizing scheduling module, select the second device that needs to communicate, and establish a communication connection with the second device. Based on the structural relationship between each device and other devices in the rail transit system, a corresponding token ring network can be constructed. Each device can be configured with a token ring mechanism to pass tokens in the constructed token ring network. The device holding the token has communication control rights for a short period of time. The token ring ensures the collision-free and real-time nature of data transmission.
[0033] In one optional implementation of this embodiment, different token ring networks are constructed for different device types; determining the second device associated with the first device includes: Every first set time interval, candidate devices of the same type as the target device of the first device are detected; Obtain candidate spatiotemporal information of candidate devices, as well as candidate task information of candidate devices; Determine the first spatiotemporal correlation between the first spatiotemporal information and the candidate spatiotemporal information, and determine the first task correlation between the first task information of the first device and the candidate task information; Based on the first spatiotemporal correlation and the first task correlation, the second device associated with the first device is determined.
[0034] The first set duration is a pre-configured period for establishing or updating the token ring network, such as 30 minutes, 1 hour, 12 hours, 24 hours, 2 days, etc. The target device type refers to the device type of the first device, such as signaling equipment, communication equipment, control equipment, etc.
[0035] It should be noted that rail transit systems may include different types of equipment, such as signaling equipment, communication equipment, and control equipment. Different types of equipment perform different types of tasks, and the correlation and coordination between the tasks performed by different types of equipment are poor. However, multiple devices of the same type may need to coordinate to perform related tasks.
[0036] In actual implementation, the first device can discover other devices in its vicinity through a self-organizing scheduling module every set time interval, and obtain the device types of each other device. It then selects devices of the same type as its target device as candidate devices. Next, it acquires the candidate spatiotemporal information and candidate task information of the candidate devices, analyzes the correlation between the spatiotemporal information of each candidate device and that of the first device, and the correlation between the candidate task information of each candidate device and the first task information of the first device. Candidate devices with high spatiotemporal and task correlation are then selected as second devices. The first and second devices are then associated as part of the token ring network.
[0037] In a token ring network, each device must wait a specific amount of time to receive a token in order to gain control of communication. Furthermore, the physical distance between the token and data frame along the ring during transmission involves spatial distribution. Spatiotemporal information can include both temporal and spatial information. Temporal information refers to the time each device spends waiting to receive a token within the token ring network; that is, the temporal order in which tasks are executed. This may involve the token's cycle time—the time it takes for a token to be issued from one device, pass through all other devices, and return to its origin. Spatial information refers to the physical layout of the devices within the token ring network. Although a token ring is a logical ring structure, devices may be physically located in different places. Understanding the physical locations of these devices helps in planning network topology and optimizing cabling.
[0038] Specifically, after the first device discovers other devices and selects candidate devices of the same type, it can use a specific algorithm (such as Dijkstra's algorithm, A* algorithm, etc.) to analyze the spatiotemporal correlation between the first spatiotemporal information and the candidate spatiotemporal information, and determine the first task correlation between the first device's first task information and the candidate task information, thereby determining the optimal path between the devices and forming an effective topology. In other words, the second device connected to the first device can be determined based on task time sequence, device geographical location, device type, etc.
[0039] In the embodiments of this specification, the first device can discover other devices, select candidate devices of the same type, analyze the time and space information of the first device and the time and space information of each candidate device, and analyze the similarity of the work tasks to be performed by the first device and the work tasks to be performed by the second device. It then identifies the second device with high spatiotemporal consistency or high work task similarity, thereby establishing a relationship between the first and second devices. This allows the first device to establish a communication connection with the second device, enabling the construction of a token ring network for the rail transit system. This allows the first and second devices to collaboratively execute work tasks. Furthermore, different types of devices can construct different token ring networks, avoiding mutual interference in communication between different types of devices and ensuring communication efficiency and the reliability of the rail transit system.
[0040] Step 104: Obtain the first spatiotemporal information of the first device, the second spatiotemporal information of the second device, and the connection relationship between the first device and the second device.
[0041] In actual implementation, the first device can obtain its own time and location information to obtain first spatiotemporal information, and obtain the time and location information of the second device to obtain second spatiotemporal information. Additionally, it can determine the connection relationship between the first and second devices, such as the first device being connected to the second device and the second device being located after the first device.
[0042] It should be noted that the first spatiotemporal information can indicate the order in which the first device receives tokens in the token ring network and the physical location of the first device. The second spatiotemporal information can refer to the order in which the second device receives tokens in the token ring network and the physical location of the second device. The connection relationship can refer to which two devices are connected and how they are connected, etc., so as to facilitate the maintenance of the structural information between the first device and the second device in the token ring network based on the first spatiotemporal information, the second spatiotemporal information and the connection relationship.
[0043] Step 106: Based on the first device, the second device, the first spatiotemporal information, the second spatiotemporal information, and the connection relationship, construct the first group information of the first device. The first group information is used to store the structural relationship between the first device and the second device in the token ring network. The group information of each device in the rail transit system is used to store the constructed token ring network of the rail transit system.
[0044] It should be noted that a 5-tuple can be constructed as the first group information of the first device based on the first device, the second device, the first spatiotemporal information, the second spatiotemporal information, and the connection relationship. This first group information can store the structural relationship between the first device and the second device in the token ring network. The group information of each device in the rail transit system can store the constructed token ring network of the rail transit system. In actual implementation, the first group information of the first device is {first device, second device, connection relationship, first spatiotemporal information, second spatiotemporal information}.
[0045] Example, Figure 2 This is a token ring network diagram of a rail transit system provided in one embodiment of this specification, such as... Figure 2 As shown, devices A, B, C, and D are signaling devices in a rail transit system. The group information for device A is {device A, device B, connection relationship "device A-device B", spatiotemporal information of device A, spatiotemporal information of device B}. The group information for device B is {device B, device C, connection relationship "device B-device C", spatiotemporal information of device B, spatiotemporal information of device C}. The group information for device C is {device C, device D, connection relationship "device C-device D", spatiotemporal information of device C, spatiotemporal information of device D}. The group information for device D is {device D, device A, connection relationship "device D-device A", spatiotemporal information of device D, spatiotemporal information of device A}. In other words, the token ring network corresponding to the signaling devices in the rail transit system is "device A-device B-device C-device D-device A". The group information of each device collectively maintains the structural information of the token ring network corresponding to the signaling devices in the rail transit system.
[0046] Step 108: Based on the first group information, communicate with the second device via token scheduling.
[0047] It should be noted that after each device generates its corresponding group information, it completes network initialization and obtains the token ring network corresponding to the rail transit system. The token ring network can ensure the order and consistency of communication and prevent multiple devices from sending conflicting data simultaneously. When each device node holds a token, it determines which device to cooperate with to perform tasks, or whether it needs to send instructions to other devices or receive status information, based on the device relationships recorded in the 5-tuple.
[0048] In practice, a token ring network uses only one special control frame called a "token" to control which device can send data at a given time. In an inactive token ring network, a device generates an idle token and sends it to the next device. The token travels along a predetermined path (the ring structure of the token ring network) from one device to another, remaining idle throughout the ring. When a device wants to send data, it must wait to receive the token. Once received, the device marks the token as occupied and appends its own data frame. After sending the data, the token continues to travel along the ring until it returns to the device that initially sent the data. At this point, the sending device removes its data frame and regenerates an idle token. After data transmission is complete, the device sets the token back to the idle state so that other devices can use it to send their data.
[0049] In one optional implementation of this embodiment, communication with the second device via token scheduling based on the first group information includes: If the first device holds a token, obtain the first group information of the first device; The second device to be communicated with is determined based on the information from the first group; Based on the first task information of the first device and the connection relationship, first spatiotemporal information, and second spatiotemporal information in the first group information, determine whether a collaborative task exists; If a collaborative task exists, it is transmitted to the second device via token scheduling.
[0050] In actual implementation, if the first device holds a token, it can query its own first group information and the first task information to be executed. Based on the connection relationship, first spatiotemporal information, and second spatiotemporal information in the first task information and first group information, the first device can determine its current task and whether it needs the second device to cooperate in executing the task. If the first device completes its task and does not need the second device to cooperate in executing the task (i.e., there is no cooperative task), it will pass the execution instruction to the second device through the token, so that the second device can execute its own task. If the second device needs to cooperate in executing the task (i.e., there is a cooperative task), it can pass the cooperative task, shared data, and other information to the second device through the token, so that the second device can share the data of the first device and cooperate in executing the corresponding task.
[0051] Continuing with the previous example, such as Figure 2In the token ring network shown, device A acquires a token and can query its own group information and the task information to be executed. Device A can decide whether to share data with device B or pass instructions to device B. Alternatively, if device A has a high load or increased communication latency, tasks can be redistributed based on the spatiotemporal information in device A's group information. By passing tokens, some tasks of device A can be transferred to device B, which is closer or has a lighter load, for collaborative execution.
[0052] In the embodiments described in this specification, the token is passed sequentially among the devices in the constructed token ring network to form a loop. When the token is passed, the device currently holding the token can query its own group information, optimize the tasks it needs to perform, and achieve collaborative work with other devices.
[0053] In an optional implementation of this embodiment, the method further includes: Monitor whether the structural relationship between the first and second devices in the token ring network changes; If changes occur, the first group information of the first device is updated according to the update structure relationship of the first device to obtain the updated group information.
[0054] It should be noted that the first device can monitor whether the structural relationship between the first device and the second device in the token ring network has changed. This change in structural relationship may refer to whether the connection relationship between the first device and the second device in the first group information has changed. For example, if the first device or the second device is abnormal, it may cause the first device and the second device to fail to connect successfully. Or, if the device status or device location of the first device and the second device changes, it may cause the first device to not connect with the second device.
[0055] In actual implementation, if the first device detects a change in the structural relationship, it can update the first group information of the first device according to the updated structural relationship of the first device, that is, the updated device that the first device is currently connecting to, and obtain the updated group information, so that the updated group information stores the updated structural relationship.
[0056] Continuing with the previous example, the group information for device A is {device A, device B, connection relationship "AB", spatiotemporal information of device A, spatiotemporal information of device B}. If device B moves to a greater distance from device A, and device A reselects device E, which is closer, then device E can be used as the updated second device. The relevant spatiotemporal information can be re-acquired to generate updated group information {device A, device E, connection relationship "AE", spatiotemporal information of device A, spatiotemporal information of device E}.
[0057] In the embodiments of this specification, the first device can dynamically monitor whether the structural relationship stored in its first group information has changed. If a change is detected, the first device can update its first group information based on the new structural relationship. By updating the group information, the structure of the token ring network can be dynamically updated, which can flexibly adapt to the changes of various devices in the rail transit system, quickly respond to device changes, and update the token ring network in a timely manner, thus having high flexibility.
[0058] In one optional implementation of this embodiment, monitoring whether the structural relationship between the first device and the second device in the token ring network changes includes: The associated second device is determined based on the information from the first group; Monitor the first spatiotemporal information of the first device, the second spatiotemporal information of the second device, the first task attribute of the first device, and the second task attribute of the second device; If at least one of the first spatiotemporal information, the second spatiotemporal information, the first task attribute, and the second task attribute changes, it is determined that the structural relationship between the first device and the second device in the token ring network has changed.
[0059] It should be noted that the spatiotemporal information of the first device itself, the spatiotemporal information of the second device it is currently connected to, the task attributes of the task to be executed by the first device (such as the status of the task execution, load, etc.), and the task attributes of the task to be executed by the second device may all affect the connection relationship between the first device and the second device. For example, if the first device or the second device moves to a new location, the load of the first device or the second device changes, the second device changes from a task paused state to a task execution state, or the first device or the second device goes offline, the first device or the second device may discover other devices in the vicinity and establish communication connections with them, resulting in a change in the connection relationship between the first device and the second device.
[0060] In actual implementation, the first device can read its own first group information to determine the second device it is currently connected to. Then, it monitors the first device's first spatiotemporal information, the second device's second spatiotemporal information, the first device's first task attribute, and the second device's second task attribute. If at least one of these changes, the structural relationship between the first and second devices in the token ring network is determined to have changed. At this point, the first device can rediscover and filter the second device to establish a communication connection. Based on the updated second device, it updates its first group information, thus updating the token ring network structure.
[0061] Using the previous example, the group information of device A is {Device A, Device B, Connection relationship “AB”, Spatiotemporal information of device A, Spatiotemporal information of device B}. The second device currently connected to device A is device B. Assuming that device B goes offline, we can detect that the second spatiotemporal information of the second device has changed. At this time, device A rediscovers and determines to establish a connection with device F. At this time, device F can be used as the updated second device, and the relevant spatiotemporal information can be re-acquired to generate updated group information {Device A, Device F, Connection relationship “AF”, Spatiotemporal information of device A, Spatiotemporal information of device F}.
[0062] For example, when device A moves to a new location or the load on device B changes, the system automatically updates the relationship between device A and device B and adjusts the token ring structure to ensure more reasonable task allocation.
[0063] In the embodiments of this specification, as the rail transit system operates, the status, location, or task requirements of the equipment may change. The first device can monitor whether the current connection structure has changed. If it has changed, the spatiotemporal information, connection relationship, etc. of the first group information of the first device can be redefined. By updating the group information, the connection relationship of the device can be adjusted to realize the dynamic update of the token ring network, which can flexibly adapt to the changes in the equipment of the rail transit system.
[0064] In one optional implementation of this embodiment, monitoring whether the structural relationship between the first device and the second device in the token ring network changes includes: The associated second device is determined based on the information from the first group; If a device malfunction is detected in the first device and / or the second device, it is determined that the structural relationship between the first and second devices in the token ring network has changed.
[0065] It should be noted that each piece of equipment in the rail transit system can have the ability to monitor its status. It can monitor whether there are any abnormalities in itself or connected equipment, such as communication failures or physical failures. If an abnormality is detected, the fault detection module can issue an alarm.
[0066] In practice, the first device can read its own first group information to determine the second device it is currently connected to. If the first device can monitor its own operating status, it can determine if any anomalies have occurred. Furthermore, the first device can send data to the second device. If the transmission is successful, it can be determined that the connected second device is not experiencing any anomalies; if the transmission fails, it is determined that the second device is experiencing an anomaly. If an anomaly is detected in either the first or second device, the first device cannot continue to connect with the second device, causing a change in the connection relationship between the first and second devices. At this point, if the first device is functioning normally, it can rediscover and filter the second device to establish a communication connection. Based on the updated second device, the first device's first group information is updated, thus updating the token ring network structure. If the second device is functioning normally, it can discover and filter other devices to establish a communication connection. Based on these other devices, the second device's group information is updated, thus updating the token ring network structure.
[0067] Specifically, the fault detection unit in the first device can analyze the spatiotemporal information and connection relationships in its first group information. If the spatiotemporal information of a device suddenly changes or becomes disconnected, it indicates that the device is abnormal and the group information is updated accordingly.
[0068] Using the previous example, the group information of device A is {device A, device B, connection relationship “AB”, spatiotemporal information of device A, spatiotemporal information of device B}. The second device currently connected to device A is device B. Suppose that device A sends a token to device B, but the sending fails. At this time, it can be determined that device B is abnormal and the group information of device A needs to be updated.
[0069] In the embodiments of this specification, the first device can monitor whether it or the connected second device is abnormal. If an abnormality is detected, the corresponding group information is updated in a timely manner, thereby updating the token ring network and restoring the token ring network of the rail transit system in a timely manner, so as to realize normal communication between the devices. The abnormality detection and recovery mechanism significantly improves the reliability of the rail transit system and reduces system stagnation or crash caused by single point of failure.
[0070] In one optional implementation of this embodiment, updating the first group information of the first device according to the update structure relationship of the first device to obtain updated group information includes: If the second device malfunctions, then the adjacent alternative device is determined, and the alternative spatiotemporal information and alternative task information of the alternative device are obtained. Determine the second spatiotemporal correlation between the first spatiotemporal information and the candidate spatiotemporal information, and determine the second task correlation between the first task information of the first device and the candidate task information; Based on the second spatiotemporal correlation and the second task correlation, select and update the second device from the candidate devices; Based on the first device, the updated second device, the updated spatiotemporal information of the first device, the updated spatiotemporal information of the updated second device, and the updated connection relationship, the first group information of the first device is updated, and the updated group information is obtained.
[0071] In practice, if the second device malfunctions, the devices connected to the first device can be re-selected. Specifically, alternative devices adjacent to the second device can be identified, and their alternative spatiotemporal information and alternative task information can be obtained. The first spatiotemporal information of the first device and the second spatiotemporal information of the alternative devices can be analyzed, and the first task information of the first device and the second task information of the alternative devices can be analyzed and determined. From all the alternative devices, the alternative devices with higher spatiotemporal and task relevance are selected as the new second devices and connected to the first device to realize the structure update of the token ring network.
[0072] It should be noted that when selecting the second device from the candidate devices, the specific implementation process can be found in the above-described specific implementation process of the first device selecting the second device from the candidate devices. The embodiments in this specification will not be repeated here.
[0073] In the embodiments of this specification, when a second device currently connected to the first device in the first group information of the first device becomes abnormal and token ring network reorganization is performed, a device node that is adjacent to the abnormal device and has similar spatiotemporal information and task information to the first device can be preferentially selected to take over the task of the abnormal node, so as to avoid task interruption.
[0074] In an optional implementation of this embodiment, the method further includes: The associated second device is determined based on the information from the first group; Every second set interval, monitor whether the first and second devices meet the load balancing conditions; If the load balancing conditions are not met, a task scheduling strategy is determined based on the first spatiotemporal information, the second spatiotemporal information, and the current load information of the first and second devices. Based on the task scheduling strategy, task scheduling is performed between the first and second devices through token passing.
[0075] The second set duration is a pre-configured period for load balancing in the token ring network, such as 20 minutes, 1 hour, 5 hours, 1 day, etc.
[0076] In actual implementation, the first device can read its own first group information to determine the second device it is currently connected to. Every second preset time interval, it monitors whether the first device and the second device meet the load balancing conditions. Load balancing refers to a key technology in rail transit systems used to optimize resource utilization, maximize throughput, minimize response time, and ensure redundancy. It can evenly distribute workloads among multiple devices in the rail transit system, thereby improving the efficiency and reliability of the rail transit system. Load balancing conditions refer to some preconditions or requirements that each device in the rail transit system needs to meet in order to effectively achieve load balancing, ensuring that traffic can be correctly distributed, resource utilization optimized, and providing high availability and fault tolerance.
[0077] It should be noted that the first device can periodically collect the spatiotemporal and load information of the second device in its own group information, as well as its own spatiotemporal and load information, to dynamically assess the load status of the devices. If the load balancing conditions are not met, such as when the load of a device is close to a threshold, the first device can assess whether the task can be shared or the load transferred based on the connection relationships and spatiotemporal information in its first group information. Specifically, devices that are closer in distance and have strong task relevance can be selected to take over some of the tasks of the high-load device, thereby achieving load balancing.
[0078] For example, when device A has a large workload and device B has a low load, token scheduling can be used to transfer some of the tasks from device A to device B for collaborative execution, thereby optimizing the overall resource allocation.
[0079] It should be noted that the load balancing mechanism enables the token ring network of the rail transit system to have greater flexibility and scalability, allowing it to respond quickly to the load status of equipment and ensure the reliability and stability of the rail transit system.
[0080] This specification provides a device control method that constructs a token ring network for a rail transit system. Each device in the rail transit system can maintain group information, recording its structural information within the token ring network. Through token scheduling within the token ring network, communication between different devices is achieved, eliminating the need for centralized control and avoiding communication delays and conflicts. Based on the token ring mechanism, the self-organization of devices within the rail transit system is realized, constructing a corresponding token ring network. This effectively achieves efficient, conflict-free communication and collaborative control within the rail transit system, thereby improving the reliability, flexibility, and scalability of the system. Furthermore, when a device detects an anomaly or fault, the fault detection module triggers adjustments, regenerating the token ring network to ensure the stable operation of the rail transit system. The system can also periodically assess the load of each device, performing dynamic scheduling and adjustments to optimize communication efficiency and resource allocation.
[0081] Figure 3This specification illustrates a process flowchart of a device control method according to one embodiment, as shown below. Figure 3 As shown, devices in a rail transit system can discover each other through a self-organizing scheduling module, determine the connected devices, generate group information for each device, and thus initialize the token ring network of the rail transit system. Tokens are passed within the token ring network to achieve task scheduling for each device. Each device in the rail transit system can detect whether it or its neighboring devices are experiencing anomalies through an anomaly detection unit. If an anomaly is detected, a device adjacent to the anomaly node and with similar spatiotemporal information is selected to take over the anomaly node's tasks, reorganizing the token ring network of the rail transit system and preventing task interruption. Furthermore, each device in the rail transit system can monitor its current load, dynamically assess the load of each device, and select devices that are closer and have stronger task relevance to take over some tasks from high-load devices, thereby achieving load balancing.
[0082] Corresponding to the above method embodiments, this specification also provides embodiments of equipment control devices. Figure 4 This specification shows a schematic diagram of a device control apparatus according to an embodiment, applied to a first device in a rail transit system. The first device can be any device in the rail transit system, such as... Figure 4 As shown, the device includes: The determination module 402 is configured to determine a second device associated with the first device; The acquisition module 404 is configured to acquire the first spatiotemporal information of the first device, the second spatiotemporal information of the second device, and the connection relationship between the first device and the second device. The construction module 406 is configured to construct the first group information of the first device based on the first device, the second device, the first spatiotemporal information, the second spatiotemporal information, and the connection relationship. The first group information is used to store the structural relationship between the first device and the second device in the token ring network, and the group information of each device in the rail transit system is used to store the constructed token ring network of the rail transit system. The communication module 408 is configured to communicate with the second device via token scheduling based on the first group information.
[0083] Optionally, different token ring networks are constructed for different device types; the determination module 402 is further configured as follows: Every first set time interval, candidate devices of the same type as the target device of the first device are detected; Obtain candidate spatiotemporal information of candidate devices, as well as candidate task information of candidate devices; Determine the first spatiotemporal correlation between the first spatiotemporal information and the candidate spatiotemporal information, and determine the first task correlation between the first task information of the first device and the candidate task information; Based on the first spatiotemporal correlation and the first task correlation, the second device associated with the first device is determined.
[0084] Optionally, the device also includes an update module configured to: Monitor whether the structural relationship between the first and second devices in the token ring network changes; If changes occur, the first group information of the first device is updated according to the update structure relationship of the first device to obtain the updated group information.
[0085] Optionally, the update module is further configured as follows: The associated second device is determined based on the information from the first group; Monitor the first spatiotemporal information of the first device, the second spatiotemporal information of the second device, the first task attribute of the first device, and the second task attribute of the second device; If at least one of the first spatiotemporal information, the second spatiotemporal information, the first task attribute, and the second task attribute changes, it is determined that the structural relationship between the first device and the second device in the token ring network has changed.
[0086] Optionally, the update module is further configured as follows: The associated second device is determined based on the information from the first group; If a device malfunction is detected in the first device and / or the second device, it is determined that the structural relationship between the first and second devices in the token ring network has changed.
[0087] Optionally, the update module is further configured as follows: Identify alternative devices adjacent to the second device, and obtain the alternative spatiotemporal information and alternative task information of the alternative devices; Determine the second spatiotemporal correlation between the first spatiotemporal information and the candidate spatiotemporal information, and determine the second task correlation between the first task information of the first device and the candidate task information; Based on the second spatiotemporal correlation and the second task correlation, select and update the second device from the candidate devices; Based on the first device, the updated second device, the updated spatiotemporal information of the first device, the updated spatiotemporal information of the updated second device, and the updated connection relationship, the first group information of the first device is updated, and the updated group information is obtained.
[0088] Optionally, the device also includes a load balancing module configured to: The associated second device is determined based on the information from the first group; Every second set interval, monitor whether the first and second devices meet the load balancing conditions; If the load balancing conditions are not met, a task scheduling strategy is determined based on the first spatiotemporal information, the second spatiotemporal information, and the current load information of the first and second devices. Based on the task scheduling strategy, task scheduling is performed between the first and second devices through token passing.
[0089] Optionally, the communication module 408 is further configured as follows: If the first device holds a token, obtain the first group information of the first device; The second device to be communicated with is determined based on the information from the first group; Based on the first task information of the first device, determine whether a collaborative task exists; If a collaborative task exists, it is transmitted to the second device via token scheduling based on the information of the first group.
[0090] This specification provides an embodiment of a device control apparatus. Any device in a rail transit system can serve as a first device. The first device can determine a second device that needs to communicate, and then acquire first spatiotemporal information of the first device, second spatiotemporal information of the second device, and the connection relationship between the first and second devices. It then constructs first group information for the first device. This first group information indicates the structural relationship between the first and second devices in a token ring network. The group information of each device in the rail transit system can also indicate its own structural relationship with other devices, forming a token ring network for the rail transit system. This allows the first device to communicate with the second device in the token ring network based on the first group information and through token scheduling. Thus, a token ring network construction scheme for a rail transit system is provided. Any device in the rail transit system can maintain group information, recording its structural information in the token ring network. Through token scheduling in the token ring network, communication between different devices is achieved without centralized control, avoiding communication delays and conflicts, improving communication efficiency, and avoiding the communication bottleneck of centralized control. Different devices communicate based on their structural information in the token ring network without affecting the communication of other devices, making the entire rail transit system more stable and reliable.
[0091] The above is a schematic scheme of a device control apparatus according to this embodiment. It should be noted that the technical solution of this device control apparatus and the technical solution of the above-described device control method belong to the same concept. For details not described in detail in the technical solution of the device control apparatus, please refer to the description of the technical solution of the above-described device control method.
[0092] Figure 5A structural block diagram of a computing device according to one embodiment of this specification is shown. The components of the computing device 500 include, but are not limited to, a memory 510 and a processor 520. The processor 520 is connected to the memory 510 via a bus 530, and a database 550 is used to store data.
[0093] The computing device 500 also includes an access device 540, which enables the computing device 500 to communicate via one or more networks 560. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 540 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, or a Near Field Communication (NFC) interface.
[0094] In one embodiment of this specification, the above-described components of the computing device 500 and Figure 5 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 5 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0095] The computing device 500 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 500 can also be a mobile or stationary server.
[0096] The processor 520 is configured to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the above-described device control method.
[0097] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the device control method described above belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the device control method described above.
[0098] An embodiment of this specification also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the above-described device control method.
[0099] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the device control method described above belong to the same concept. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the device control method described above.
[0100] An embodiment of this specification also provides a computer program, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the above-described device control method.
[0101] The above is an illustrative scheme of a computer program according to this embodiment. It should be noted that the technical solution of this computer program and the technical solution of the above-described device control method belong to the same concept. For details not described in detail in the technical solution of the computer program, please refer to the description of the technical solution of the above-described device control method.
[0102] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0103] Computer instructions include computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. Computer-readable media can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in computer-readable media can be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0104] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.
[0105] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0106] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A device control method, characterized in that, A first device applied in a rail transit system, wherein the first device is any device in the rail transit system, comprising: Every first set time interval, candidate devices of the same target device type as the first device are detected; candidate spatiotemporal information of the candidate devices and candidate task information of the candidate devices are obtained; a first spatiotemporal correlation between the first spatiotemporal information and the candidate spatiotemporal information is determined, and a first task correlation between the first task information of the first device and the candidate task information is determined; based on the first spatiotemporal correlation and the first task correlation, a second device associated with the first device is determined, and different token ring networks are constructed for different device types. Acquire first spatiotemporal information of the first device, second spatiotemporal information of the second device, and connection relationship between the first device and the second device. The first spatiotemporal information indicates the order in which the first device receives tokens in the token ring network and the physical location of the first device. The second spatiotemporal information indicates the order in which the second device receives tokens in the token ring network and the physical location of the second device. Based on the first device, the second device, the first spatiotemporal information, the second spatiotemporal information, and the connection relationship, a first group information of the first device is constructed. The first group information is used to store the structural relationship between the first device and the second device in the token ring network. The first group information is a quintuple constructed from the first device, the second device, the connection relationship, the first spatiotemporal information, and the second spatiotemporal information. The group information of each device in the rail transit system is used to store the constructed token ring network of the rail transit system. Based on the first group information, communication with the second device is achieved through token scheduling.
2. The equipment control method according to claim 1, characterized in that, The method further includes: Monitor whether the structural relationship between the first device and the second device changes in the token ring network; If a change occurs, the first group information of the first device is updated according to the updated structure relationship of the first device to obtain the updated group information.
3. The equipment control method according to claim 2, characterized in that, The monitoring of whether the structural relationship between the first device and the second device in the token ring network has changed includes: The associated second device is determined based on the first group information; Monitor the first spatiotemporal information of the first device, the second spatiotemporal information of the second device, the first task attribute of the first device, and the second task attribute of the second device; If at least one of the first spatiotemporal information, the second spatiotemporal information, the first task attribute, and the second task attribute changes, it is determined that the structural relationship between the first device and the second device in the token ring network has changed.
4. The equipment control method according to claim 2, characterized in that, The monitoring of whether the structural relationship between the first device and the second device in the token ring network has changed includes: The associated second device is determined based on the first group information; If a device malfunction is detected in the first device and / or the second device, it is determined that the structural relationship between the first device and the second device in the token ring network has changed.
5. The equipment control method according to claim 4, characterized in that, The step of updating the first group information of the first device according to the update structure relationship of the first device to obtain the updated group information includes: If the second device malfunctions, then a candidate device adjacent to the second device is determined, and the candidate spatiotemporal information and candidate task information of the candidate device are obtained. Determine the second spatiotemporal correlation between the first spatiotemporal information and the candidate spatiotemporal information, and determine the second task correlation between the first task information of the first device and the candidate task information; Based on the second spatiotemporal correlation and the second task correlation, a second device is selected from the candidate devices to be updated; Based on the first device, the updating second device, the updating spatiotemporal information of the first device, the updating spatiotemporal information of the updating second device, and the updating connection relationship, the first group information of the first device is updated to obtain the updated group information.
6. The equipment control method according to claim 1, characterized in that, The method further includes: The associated second device is determined based on the first group information; Every second set time interval, monitor whether the first device and the second device meet the load balancing conditions; If the load balancing conditions are not met, a task scheduling strategy is determined based on the first spatiotemporal information, the second spatiotemporal information, and the current load information of the first device and the second device. Based on the task scheduling strategy, task scheduling is performed between the first device and the second device through token passing.
7. The equipment control method according to claim 1, characterized in that, The step of communicating with the second device via token scheduling based on the first group information includes: If the first device holds a token, obtain the first group information of the first device; The second device to be communicated with is determined based on the information from the first group; Based on the first task information of the first device and the connection relationship, first spatiotemporal information, and second spatiotemporal information in the first group information, determine whether there is a collaborative task; If the collaborative task exists, it is transmitted to the second device via token scheduling.
8. A device control apparatus, characterized in that, A first device applied in a rail transit system, wherein the first device is any device in the rail transit system, comprising: The determination module is configured to detect candidate devices of the same target device type as the first device every first set time interval; acquire candidate spatiotemporal information of the candidate devices and candidate task information of the candidate devices; determine the first spatiotemporal correlation between the first spatiotemporal information and the candidate spatiotemporal information, and determine the first task correlation between the first task information of the first device and the candidate task information; and determine the second device associated with the first device based on the first spatiotemporal correlation and the first task correlation, with different token ring networks constructed for different device types. The acquisition module is configured to acquire first spatiotemporal information of the first device, second spatiotemporal information of the second device, and connection relationship between the first device and the second device. The first spatiotemporal information indicates the order in which the first device receives tokens in the token ring network and the physical location of the first device. The second spatiotemporal information indicates the order in which the second device receives tokens in the token ring network and the physical location of the second device. The construction module is configured to construct first group information of the first device based on the first device, the second device, the first spatiotemporal information, the second spatiotemporal information, and the connection relationship. The first group information is used to store the structural relationship between the first device and the second device in the token ring network. The first group information is a quintuple constructed from the first device, the second device, the connection relationship, the first spatiotemporal information, and the second spatiotemporal information. The group information of each device in the rail transit system is used to store the constructed token ring network of the rail transit system. The communication module is configured to communicate with the second device via token scheduling based on the first group information.
9. A computing device, characterized in that, include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, which, when executed by the processor, implement the steps of the device control method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, It stores computer-executable instructions that, when executed by a processor, implement the steps of the device control method according to any one of claims 1-7.
11. A computer program product, characterized in that, Includes a computer program / instructions that, when executed by a processor, implement the steps of the device control method according to any one of claims 1-7.