Gateway scheduling system, scheduling method, electronic equipment and chip system
By establishing Wi-Fi Mesh module communication connection between gateways, centralized scheduling between gateways is realized, the problems of connection conflicts and slow data transmission in traditional gateway scheduling are solved, and data transmission speed and scheduling performance are improved.
Patent Information
- Application Number
- CN202411529513.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-18
AI Technical Summary
Traditional gateways run separately and schedule integrated Bluetooth modules, resulting in message blockage between different gateways, Bluetooth connection conflicts, and long communication paths and slow data transmission.
By establishing a Wi-Fi Mesh module communication connection between gateways, centralized scheduling between gateways can be achieved, connection conflicts can be avoided, communication paths can be optimized, and data transmission time can be shortened.
It realizes efficient communication between gateways, avoids connection conflicts, and improves data transmission speed and overall scheduling performance.
Smart Images

Figure CN119485705A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a gateway scheduling system, a scheduling method, an electronic device and a chip system. Background Art
[0002] A Bluetooth gateway is a gateway device that integrates a Bluetooth module and a wireless fidelity (WiFi) module (hereinafter referred to as a gateway). A gateway that integrates multiple Bluetooth modules cooperates with Bluetooth device applications and connects to Bluetooth low energy (BLE) devices through Bluetooth modules for detection and data collection.
[0003] Since traditional gateways run independently and schedule integrated Bluetooth modules, messages between different gateways are blocked. When one gateway connects to a BLE device, other gateways may also connect to the BLE device, resulting in Bluetooth connection conflicts. In related technologies, virtual Bluetooth modules of other gateways are scheduled through routing in the network, which makes the communication path between gateways longer and data transmission slower. Summary of the invention
[0004] According to various embodiments of the present application, a gateway scheduling system, a scheduling method, an electronic device and a chip system are provided, which can shorten the communication path between gateways and improve the data transmission speed while realizing centralized scheduling of Bluetooth modules of other gateways.
[0005] In a first aspect, the present application provides a gateway scheduling system, comprising: at least one first gateway and at least one second gateway, the first gateway comprising a Wi-Fi Mesh module and at least one first Bluetooth module, and the second gateway comprising a Wi-Fi Mesh module and at least one second Bluetooth module; wherein the first gateway and the second gateway are communicatively connected based on the Wi-Fi Mesh module; the first gateway is used to schedule at least one first Bluetooth module and at least one second Bluetooth module in a standard working mode, and send a scheduling instruction to the second gateway, the scheduling instruction is used to instruct the second gateway to connect to a target Bluetooth device; the second gateway is used to receive the scheduling instruction sent by the first gateway in a shadow working mode, and connect to the target Bluetooth device according to the scheduling instruction.
[0006] Through the above method, the first gateway and the second gateway are both configured with a Wi-Fi Mesh module. Based on the Wi-Fi Mesh module, a communication connection can be established between the gateways. Based on the communication connection, the first gateway can uniformly schedule the first Bluetooth module integrated in itself and the second Bluetooth module of the second gateway, and send a scheduling instruction to the second gateway, indicating the target Bluetooth device that the second gateway can connect to, thereby avoiding conflicts in different gateways connecting to the same Bluetooth device, improving the connection hit rate with the Bluetooth device, and improving the scheduling efficiency based on the communication connection of the Wi-Fi Mesh module; it has strong ease of use and practicality.
[0007] In a possible implementation manner of the first aspect, the second gateway is further configured to convert from the shadow working mode to the standard working mode when the first gateway fails.
[0008] In a possible implementation manner of the first aspect, the first gateway is further used to send a broadcast signal in the standard working mode; and the second gateway is further used to establish a communication connection with the first gateway when scanning the broadcast signal of the first gateway.
[0009] In a possible implementation of the first aspect, the second gateway is further used to share the Bluetooth device file of the at least one second Bluetooth module with the first gateway based on the communication connection with the first gateway; the Bluetooth device file is used to provide data support for performing scheduling operations to the first gateway.
[0010] In a possible implementation manner of the first aspect, the system further includes a third gateway, the third gateway includes a Wi-Fi Mesh module and at least one third Bluetooth module, and the third gateway is configured in the standard working mode;
[0011] The third gateway is used to establish a communication connection with the first gateway based on the Wi-Fi Mesh module, and share the connection information of the at least one third Bluetooth module with the first gateway based on the communication connection; the connection information is used to allocate the connected Bluetooth device.
[0012] In a second aspect, the present application provides a gateway scheduling method, which is applied to a first gateway, wherein the first gateway includes a Wi-Fi Mesh module and at least one first Bluetooth module; the method includes:
[0013] Sending a broadcast signal in the standard working mode; the broadcast signal is used to establish a communication connection with the first gateway when the second gateway scans it; wherein the second gateway includes a Wi-Fi Mesh module and at least one second Bluetooth module, and the second gateway is configured in the shadow working mode;
[0014] After establishing a communication connection with the second gateway based on the Wi-Fi Mesh module, scheduling the at least one first Bluetooth module and the at least one second Bluetooth module, and sending a scheduling instruction to the second gateway; wherein the scheduling instruction is used to instruct the second gateway to connect to a target Bluetooth device.
[0015] In a third aspect, the present application provides a gateway scheduling method, which is applied to a second gateway, wherein the second gateway includes a Wi-Fi Mesh module and at least one second Bluetooth module; the method includes:
[0016] In the shadow working mode, when a broadcast signal sent by a first gateway is obtained, a communication connection is established with the first gateway;
[0017] Receive a scheduling instruction sent by the first gateway, and connect to a target Bluetooth device based on the scheduling instruction; the scheduling instruction is issued by the first gateway in a standard working mode based on the at least one first Bluetooth module and the at least one second Bluetooth module scheduled.
[0018] In a fourth aspect, the present application provides a gateway scheduling device, which is applied to a first gateway, wherein the first gateway includes a Wi-Fi Mesh module and at least one first Bluetooth module; the device includes:
[0019] A broadcast unit, configured to send a broadcast signal in a standard working mode; the broadcast signal is used to establish a communication connection with the first gateway when the second gateway scans it; wherein the second gateway includes a Wi-Fi Mesh module and at least one second Bluetooth module, and the second gateway is configured in a shadow working mode;
[0020] A scheduling unit is used to schedule the at least one first Bluetooth module and the at least one second Bluetooth module after establishing a communication connection with the second gateway based on the Wi-Fi Mesh module, and send a scheduling instruction to the second gateway; wherein the scheduling instruction is used to instruct the second gateway to connect to a target Bluetooth device.
[0021] In a fifth aspect, the present application provides a gateway scheduling device, which is applied to a second gateway, wherein the second gateway includes a Wi-Fi Mesh module and at least one second Bluetooth module; the device includes:
[0022] an acquiring unit, configured to establish a communication connection with the first gateway when a broadcast signal sent by the first gateway is acquired in the shadow working mode;
[0023] An execution unit is used to receive a scheduling instruction sent by the first gateway and connect to a target Bluetooth device based on the scheduling instruction; the scheduling instruction is issued by the first gateway in a standard working mode based on the at least one first Bluetooth module and the at least one second Bluetooth module scheduled.
[0024] In a sixth aspect, the present application provides an electronic device, comprising at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method described in the second aspect or the third aspect.
[0025] In the seventh aspect, the present application provides a chip system, which is applied to an electronic device, and the chip system includes one or more processors, and the one or more processors are used to call computer instructions so that the electronic device executes the method described in the second aspect or the third aspect.
[0026] In an eighth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method described in the second aspect or the third aspect is implemented.
[0027] In a ninth aspect, the present application provides a computer program product. When the computer program product runs on an electronic device, the electronic device executes the method described in the second or third aspect above.
[0028] It can be understood that the beneficial effects of the second to ninth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0030] Figure 1 A schematic diagram of an application scenario architecture of a gateway scheduling provided in an embodiment of the present application;
[0031] Figure 2 A schematic diagram of the architecture of a gateway scheduling system provided in an embodiment of the present application;
[0032] Figure 3 A schematic diagram of the network architecture corresponding to the gateway scheduling system provided in the embodiment of the present application;
[0033] Figure 4 A schematic diagram of the topological relationship of a standard working mode gateway provided in an embodiment of the present application;
[0034] Figure 5 A schematic diagram of the architecture of the gateway sharing and scheduling BLE module provided in an embodiment of the present application;
[0035] Figure 6 A schematic diagram of the implementation flow of the gateway scheduling method provided in the embodiment of the present application;
[0036] Figure 7 A schematic diagram of the implementation flow of a gateway scheduling method provided in another embodiment of the present application;
[0037] Figure 8 A schematic diagram of the structure of a gateway scheduling device provided in an embodiment of the present application;
[0038] Fig. 9 A schematic diagram of the structure of a gateway scheduling device provided in another embodiment of the present application;
[0039] Fig.10 A structural schematic diagram of an electronic device is provided for an embodiment of the present application. DETAILED DESCRIPTION
[0040] The following embodiments of the technical solution of the present application are described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.
[0041] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.
[0042] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0043] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0044] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0045] At present, gateways with multi-channel Bluetooth modules can work with Bluetooth devices, and through the connection between Bluetooth modules and Bluetooth devices, various application scenarios can be detected and data collected.
[0046] like Figure 1 As shown, a gateway body (such as gateway 1 or gateway 2) may include a main processing unit (MPU) and a Bluetooth low energy module (hereinafter referred to as BLE module or Bluetooth module), such as BLE0 to BLE2. Since traditional gateway bodies are run independently and schedule their own configured Bluetooth modules, the messages between gateways are not interoperable. If gateway 1 wants to connect to BLE device (or Bluetooth device) A, and gateway 2 wants to connect to BLE device A without knowing it, only one gateway can successfully connect to BLE device A, and other gateways (such as network gateway 2) cannot successfully connect; that is, a BLE device can only establish a connection with one gateway at a time. When there is a connection conflict between multiple gateways, the connection hit rate is low, resulting in low system efficiency.
[0047] In response to the above technical problems, an embodiment of the present application provides a gateway scheduling system, which builds an efficient communication network between gateways by using WiFi Mesh network technology; and based on the constructed WiFi Mesh network, a main gateway can simultaneously access the Bluetooth device files of other gateways, so that the main gateway can schedule its own Bluetooth module and the Bluetooth modules of other gateways in the WiFi Mesh network; thereby, centralized scheduling can be achieved based on the WiFi Mesh network to avoid conflicts when connecting Bluetooth devices, and the topological structure of the gateway is optimized based on the WiFi Mesh network, the intermediate nodes of data transmission (such as routing transmission) are reduced, the communication path is shortened, the networking speed is accelerated, and the overall scheduling performance and connection hit rate are improved.
[0048] The specific process of implementing the embodiment of the present application is further described below in conjunction with the accompanying drawings.
[0049] First, the technical terms involved in the embodiments of the present application are introduced:
[0050] 1. Received Signal Strength Indicator (RSSI) is used to indicate the signal power received by the wireless device. The relative distance between devices can be judged by the size of the RSSI value.
[0051] 2. Safe and Secure Network File System (SSNFS) is used to represent a safe, reliable and efficient network file system; in a distributed system and network environment, it enables the sharing of files and device resources between different devices and different operating systems. Through SSNFS, a gateway can access resources on remote devices as easily as accessing local files, such as the Bluetooth module of other gateways.
[0052] 3. The Bluetooth module (or BLE module) is part of the gateway and is responsible for scanning, waking up and connecting to Bluetooth devices (or BLE devices, such as electronic tags, Bluetooth beacons, etc.).
[0053] The following describes the architecture of the gateway body in conjunction with the accompanying drawings.
[0054] like Figure 2 As shown, the schematic diagram of the architecture of the gateway scheduling system provided by the embodiment of the present application. The gateway may include a WiFi module and a multi-channel Bluetooth module; wherein the WiFi module in the embodiment of the present application may specifically be a wireless fidelity mesh network module; the WiFi module communicates with the Bluetooth module via a Universal Asynchronous Receiver / Transmitter (UART) interface, and the program of the gateway scheduling scheme may run in the WiFi module.
[0055] Exemplarily, the gateway is also provided with a Universal Serial Bus (USB) interface and an Ethernet port; the gateway can remotely exchange data with the cloud platform based on the Message Queuing Telemetry Transport (MQTT) protocol through the Ethernet port. The WiFi module of the gateway has a built-in web configuration page, and the terminal can access the web configuration page of the gateway through the local area network to configure the gateway.
[0056] For example, Figure 2The gateway may also include a WiFi Mesh module, which may be independent of the WiFi module or an extension module based on the WiFi module. The WiFi Mesh module may be a special network topology structure based on WiFi technology in the gateway, allowing multiple WiFi devices (such as Mesh gateway nodes) to be interconnected in a wireless local area network to form a distributed, self-organizing and self-healing network.
[0057] Exemplarily, the gateway optimizes the communication path between gateways based on the configured WiFi Mesh module, does not rely on the performance of a single node for communication, can support multi-hop path data transmission, and thus can select the best transmission path for data routing, making data transmission more efficient.
[0058] Based on the above gateway architecture, the following further introduces the process of configuring the working mode of the gateway before executing scheduling.
[0059] like Figure 3 As shown in Figure (a), the gateway can be connected to the cloud platform through a switch. The gateway and the switch can be connected through a network cable (i.e., wired communication connection). The switch and the management platform are connected through a network (network), which can include a wired network or a wireless network, without specific limitation. The gateway can also be connected to the cloud platform wirelessly based on the MQTT protocol of the network port.
[0060] Exemplarily, the working mode of the gateway can be configured as a standard working mode (such as the working mode of the first gateway or the main gateway) and a shadow working mode (such as the working mode of the second gateway or the sub-gateway). The scheduling of the BLE module is centrally implemented by the first gateway in the standard working mode.
[0061] like Figure 3 As shown in Figure (a), a gateway in standard working mode is connected to at least one gateway in shadow working mode for communication based on the WiFi Mesh module.
[0062] Exemplarily, the terminal can access the web configuration page of the gateway to configure the gateway in the standard working mode or the shadow working mode; wherein, when first deployed, the target gateway can also be selected and set to the standard working mode according to the deployment location of the gateway. Figure 3 As shown in Figure (b), among gateways 1 to 5, the deployment location of gateway 3 is relatively shortest to the locations of other gateways. In order to better reduce the communication distance from the gateway in the standard working mode to the gateways in each shadow working mode, gateway 3 can be configured as the standard working mode and the other gateways can be configured as the shadow working mode.
[0063] Accordingly, the gateway scheduling system may include at least one first gateway (i.e., a gateway in standard working mode); in order to reduce the scheduling burden of the gateway in standard working mode, the system may configure multiple first gateways in standard working mode, and the distance between two first gateways is farther than the distance between the first gateway and the second gateway, thereby avoiding scanning too many overlapping Bluetooth devices between the two gateways in standard working mode.
[0064] For example, after the working mode is configured for the first time, the gateway can also receive the working mode sent by the cloud platform during operation and perform configuration based on the working mode sent by the cloud platform. Figure 3 As shown in Figure (a), the cloud platform can send the topological relationship of the gateway cluster in the system through the network cable and the MQTT protocol, that is, deploy and determine the location and connection relationship of the gateway in the standard working mode and the gateway in the shadow working mode.
[0065] Accordingly, when the first gateway in standard working mode fails, the cloud platform can receive the fault information and determine the second gateway closest to the first gateway based on the fault information and the topological relationship of the gateway cluster, and issue instructions to convert the working mode of the second gateway from the shadow working mode to the standard working mode. The cloud platform continues to issue notifications to notify other second gateways in the shadow working mode in the gateway cluster to re-establish communication connections with the gateways in the standard working mode, thereby realizing automatic reorganization of the WiFi Mesh network by the gateway cluster and improving the robustness of the system.
[0066] Exemplarily, when a first gateway in standard working mode establishes a communication connection with a second gateway in shadow working mode, the first gateway creates a monitoring channel and waits for the network connection request of the second gateway. For example, the first gateway can act as an access point and periodically send out a broadcast signal; the second gateway acts as a site and determines the nearest first gateway by scanning and identifying the broadcast signal and establishes a communication connection with it. The second gateway only establishes a communication connection with the nearest first gateway and will not connect to two first gateways at the same time; the first gateway can establish a communication connection with multiple second gateways at the same time.
[0067] The information interaction process between the first gateways in multiple standard working modes is further described below with reference to the accompanying drawings.
[0068] like Figure 4 As shown, a schematic diagram of the topological relationship of the standard working mode gateway provided in the embodiment of the present application is shown. If there are multiple gateways in the system, since only one first gateway in the standard working mode is used for scheduling, the scheduling pressure of the first gateway is relatively large, so the scheduling operation can be performed by the first gateways in multiple standard working modes in the system to reduce the scheduling pressure.
[0069] in, Figure 4The standard working mode gateway 2 shown connects to the standard working mode gateways within a preset distance range according to the distance to the surrounding gateways (such as RSSI value). For example, the standard working mode gateway 2 connects to the standard working mode gateways 1 / 3 / 4, but not to the standard working mode gateway 5, because when the distance exceeds a certain value, the conflict between the standard working mode gateways when connecting to BLE devices can be ignored.
[0070] In the case where connection conflicts are likely to occur when scheduling operations are performed on multiple first gateways, the multiple first gateways are connected to each other based on a WiFi Mesh module communication connection, and the connection information of the Bluetooth module can be shared based on the communication connection; the connection information may include a gateway identifier (including an identifier of a second gateway in a shadow working mode of the connection), a Bluetooth module identifier (including an identifier of the Bluetooth module of the second gateway), and signal strength (such as RSSI) of the Bluetooth module corresponding to the connected Bluetooth device.
[0071] On the one hand, the two first gateways can send the above connection information to each other. For example, the standard working mode gateway 1 sends connection information 1 to the standard working mode gateway 2. The standard working mode gateway 2 compares the connection information 1 with its own connection information 2, and eliminates the target Bluetooth device whose signal strength in the connection information 1 is higher than the signal strength in the connection information 2. That is, the standard working mode gateway 2 abandons the connection with the target Bluetooth device, and the standard working mode gateway 1 connects.
[0072] On the other hand, the cloud platform can send a first list of connected Bluetooth devices to each first gateway, and the list includes Bluetooth device identifiers. Based on the above list, each first gateway wakes up and scans Bluetooth devices by scheduling the Bluetooth module; after the scan, each first gateway generates a second list containing the signal strength (such as RSSI value) of each Bluetooth device scanned by itself; then the first gateway sends the second list to other connected first gateways in standard working modes; when the first gateway receives the second list sent by the first gateway in other standard working modes, it compares it with its own second list. If the signal strength of the Bluetooth device in the other second list is higher than the signal strength of the same Bluetooth device in its own second list, the Bluetooth device will not be connected, and the gateway with a greater signal strength to scan the Bluetooth device will connect. On the contrary, the Bluetooth device scanned in its own second list will be retained, and a Bluetooth communication connection will be established.
[0073] Through the above manner, each first gateway filters the Bluetooth devices in the first list and retains the Bluetooth devices that it can connect to by scheduling the Bluetooth module; and when receiving the list of connection instructions issued by the platform, it screens according to the Bluetooth devices in the second list retained by itself, determines the target Bluetooth device that needs to be connected in the end, and establishes a Bluetooth communication connection with the target Bluetooth device by scheduling the corresponding Bluetooth module (including the Bluetooth module of the first gateway itself and the Bluetooth module of the second gateway for communication connection); for example, a connection instruction is sent to the Bluetooth module through UART, or a scheduling instruction is sent to the second gateway by accessing the Bluetooth device file of the second gateway, so as to instruct the second gateway to establish a Bluetooth communication connection with the Bluetooth device; thereby, connection conflicts between first gateways, between the first gateway and the second gateway, and between second gateways can be avoided.
[0074] Correspondingly, the first gateway and the second gateway may also share the connection information corresponding to the Bluetooth module.
[0075] The following further describes the process of gateway scheduling in the standard working mode with reference to the accompanying drawings.
[0076] like Figure 5 As shown, an architectural diagram of gateway sharing and scheduling BLE modules provided in an embodiment of the present application is provided; wherein, after the gateway in standard working mode and the gateway in shadow working mode in the gateway cluster establish a network communication connection based on the WiFi Mesh module, the SSNFS network file system is configured so that the gateway in standard working mode can share and schedule the BLE module of the gateway in shadow working mode.
[0077] For example, Figure 5 As shown, the gateway in standard working mode (first gateway) and the gateway in shadow working mode (second gateway) are connected based on WiFi Mesh module communication; each first gateway or second gateway can have multiple Bluetooth modules (such as Bluetooth module 1 and Bluetooth module 2 of the first gateway, Bluetooth module 1 and Bluetooth module 2 of the second gateway), and different actions can be performed through different Bluetooth modules, such as wake-up, scanning and connection.
[0078] Exemplarily, the first gateway mounts the Bluetooth device file of the second gateway to the first gateway through the configured SSNFS network file system based on the communication connection of the WiFi Mesh module; the first gateway distinguishes and numbers the Bluetooth modules according to the mounted Bluetooth device file. Figure 5 As shown in , the first gateway mounts the Bluetooth device file of the second gateway, numbers the Bluetooth module 1 of the second gateway as Bluetooth module 3, and numbers the Bluetooth module 2 of the second gateway as Bluetooth module 4; then the first gateway can schedule Bluetooth modules 1 to 4.
[0079] Among them, the Bluetooth device file (BLE device file) is a file that identifies the Bluetooth module connected to the Bluetooth device. The gateway can send corresponding control instructions to the Bluetooth module through the Bluetooth device file to instruct the Bluetooth module to perform operations such as wake-up, scanning, and connection. The first gateway mounts the Bluetooth device file of the second gateway through the SSNFS network file system, obtains the path and permission to access the Bluetooth device file of the second gateway, and can thus access the Bluetooth device file of the second gateway and send control instructions to the Bluetooth module of the second gateway.
[0080] For example, the first gateway has BLE device files / dev / BLE0 and / dev / BLE1, and the second gateway has BLE device files / dev / BLE0 and / dev / BLE1. After the second gateway mounts its own BLE device files to the first gateway through the SSHFS network file system, the BLE device files of the first gateway are / dev / BLE0, / dev / BLE1, / dev / BLE2, and / dev / BLE3; among which, / dev / BLE2 and / dev / BLE3 correspond to / dev / BLE0 and / dev / BLE1 of the second gateway respectively. In this way, the first gateway can directly schedule the BLE device files of the second gateway according to the scheduling logic, changing from scheduling two BLE device files to scheduling four BLE device files ( / dev / BLE0, / dev / BLE1, / dev / BLE2, and / dev / BLE3), thereby realizing the sharing of BLE modules between the first gateway and the second gateway.
[0081] Exemplarily, the first gateway mounts the Bluetooth device file of the second gateway through the SSNFS network file system, obtains the path and permission to access the Bluetooth device file of the second gateway, and the first gateway can read and write the Bluetooth device file of the second gateway. The reading and writing process passes through the WiFi Mesh network architecture and is implemented by the SSNFS network file system.
[0082] The process of the first gateway scheduling the Bluetooth module is the process of controlling different Bluetooth modules to perform different operations, such as wake-up, scanning and connection. Figure 5 In the gateway architecture shown in FIG, the first gateway controls Bluetooth module 1 ( / dev / BLE1) to wake up Bluetooth device 1, and controls Bluetooth module 2 ( / dev / BLE2) to scan the broadcast packet sent by the awakened Bluetooth device 1 to obtain relevant information of Bluetooth device 1; or controls Bluetooth module 3 ( / dev / BLE3) to wake up Bluetooth device 2, and controls Bluetooth module 4 ( / dev / BLE4) to scan the broadcast packet sent by the awakened Bluetooth device 2 to obtain relevant information of Bluetooth device 2. This avoids conflicts caused by two adjacent gateways trying to connect to a BLE device at the same time due to the lack of information communication between gateways.
[0083] The embodiment of the present application also provides a gateway scheduling method, which is applied to a first gateway, wherein the first gateway includes a Wi-Fi Mesh module and at least one first Bluetooth module; Figure 6 As shown, the method is based on the same implementation principle as the above embodiment, which will not be repeated here. The method may include the following steps:
[0084] S601, the first gateway sends a broadcast signal in the standard working mode; the broadcast signal is used to establish a communication connection with the first gateway when the second gateway scans it; wherein the second gateway includes a Wi-Fi Mesh module and at least one second Bluetooth module, and the second gateway is configured in the shadow working mode.
[0085] S602, after establishing a communication connection with the second gateway based on the Wi-Fi Mesh module, scheduling at least one first Bluetooth module and at least one second Bluetooth module, and sending a scheduling instruction to the second gateway; wherein the scheduling instruction is used to instruct the second gateway to connect to a target Bluetooth device.
[0086] Another embodiment of the present application further provides a gateway scheduling method, which is applied to a second gateway, wherein the second gateway includes a Wi-Fi Mesh module and at least one second Bluetooth module; Figure 7 As shown, the method is based on the same implementation principle as the above embodiment, which will not be repeated here. The method may include the following steps:
[0087] S701: When the second gateway obtains a broadcast signal sent by the first gateway in the shadow working mode, it establishes a communication connection with the first gateway.
[0088] S702, receiving a scheduling instruction sent by the first gateway, and connecting to a target Bluetooth device based on the scheduling instruction; the scheduling instruction is issued by the first gateway in a standard working mode based on at least one first Bluetooth module and at least one second Bluetooth module being scheduled.
[0089] Through the embodiments of the present application, based on the WiFi Mesh module, the network topology is optimized; the network composed of the WiFi MESH module realizes communication connection between gateways without going through the routing in the network, reducing the intermediate nodes of data transmission, shortening the communication path between gateway devices, speeding up the networking speed, and improving the overall scheduling performance and connection hit rate. Based on the shortened communication path, the BLE module is shared to improve the data transmission speed. By dynamically adjusting the working mode of the scheduling gateway, when the standard working mode gateway fails, the reorganization of the WiFi Mesh network can be realized quickly and automatically, avoiding the situation where the entire gateway system crashes when a standard working mode gateway fails, thereby improving the robustness and networking efficiency of the system. Multiple standard working mode gateways respectively manage the shadow working mode gateways in the gateway scheduling system, and the adjacent standard working mode gateways share the connection information of the BLE device through the WiFi Mesh network; the scheduling pressure and load when there is only one scheduling gateway are reduced.
[0090] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0091] Corresponding to the gateway scheduling method provided in the above embodiment, Figure 8 A schematic diagram of the structure of a gateway scheduling device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0092] Reference Figure 8 , the device is applied to a first gateway, the first gateway includes a Wi-Fi Mesh module and at least one first Bluetooth module; the device includes:
[0093] A broadcast unit 81 is used to send a broadcast signal in a standard working mode; the broadcast signal is used to establish a communication connection with the first gateway when the second gateway scans it; wherein the second gateway includes a Wi-Fi Mesh module and at least one second Bluetooth module, and the second gateway is configured in a shadow working mode;
[0094] The scheduling unit 82 is used to schedule the at least one first Bluetooth module and the at least one second Bluetooth module after establishing a communication connection with the second gateway based on the Wi-Fi Mesh module, and send a scheduling instruction to the second gateway; wherein the scheduling instruction is used to instruct the second gateway to connect to the target Bluetooth device.
[0095] Corresponding to the gateway scheduling method provided in the above embodiment, Fig. 9A schematic diagram of the structure of a gateway scheduling device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0096] Reference Fig. 9 , the device is applied to a second gateway, the second gateway includes a Wi-Fi Mesh module and at least one second Bluetooth module; the device includes:
[0097] The acquisition unit 91 is configured to establish a communication connection with the first gateway when a broadcast signal sent by the first gateway is acquired in the shadow working mode;
[0098] The execution unit 92 is used to receive the scheduling instruction sent by the first gateway and connect the target Bluetooth device based on the scheduling instruction; the scheduling instruction is issued by the first gateway in the standard working mode based on the scheduling of the at least one first Bluetooth module and the at least one second Bluetooth module.
[0099] Through the embodiments of the present application, based on the WiFi MESH module, the network topology is optimized; the network composed of the WiFi MESH module realizes communication connection between gateways without going through the routing in the network, reducing the intermediate nodes of data transmission, shortening the communication path between gateway devices, speeding up the networking speed, and improving the overall scheduling performance and connection hit rate. Based on the shortened communication path, the BLE module is shared to improve the data transmission speed. By dynamically adjusting the working mode of the scheduling gateway, when the standard working mode gateway fails, the reorganization of the WiFi Mesh network can be realized quickly and automatically, avoiding the situation where the entire gateway system crashes when a standard working mode gateway fails, thereby improving the robustness and networking efficiency of the system. Multiple standard working mode gateways respectively manage the shadow working mode gateways in the gateway scheduling system, and the adjacent standard working mode gateways share the connection information of the BLE device through the WiFi Mesh network; the scheduling pressure and load when there is only one scheduling gateway are reduced.
[0100] Fig.10 A schematic diagram of the hardware structure of the electronic device 10 is shown.
[0101] like Fig.10 As shown, the electronic device 10 of this embodiment includes: at least one processor 100 ( Fig.10 Only one is shown), a memory 101, wherein the memory 101 stores a computer program 102 that can be run on the processor 100. When the processor 100 executes the computer program 102, the steps in the above method embodiment are implemented. Alternatively, when the processor 100 executes the computer program 102, the functions of each module / unit in the above device embodiments are implemented.
[0102] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 10. In other embodiments of the present application, the electronic device 10 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0103] The electronic device 10 may include, but is not limited to, a processor 100 and a memory 101. Those skilled in the art will appreciate that Fig.10 It is only an example of the electronic device 10 and does not constitute a limitation of the electronic device 10. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include an input sending device, a network access device, a bus, etc.
[0104] The processor 100 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0105] The processor 100 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 100 is a cache memory. The memory may store instructions or data that the processor 100 has just used or cyclically used. If the processor 100 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 100, and thus improves the efficiency of the system.
[0106] In some embodiments, the memory 101 may be an internal storage unit of the electronic device 10, such as a hard disk or memory of the electronic device 10. The memory 101 may also be an external storage device of the electronic device 10, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 10. Further, the memory 101 may also include both an internal storage unit of the electronic device 10 and an external storage device. The memory 101 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as program codes of computer programs, etc. The memory 101 may also be used to temporarily store data that has been sent or is to be sent.
[0107] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0108] It should be noted that the structure of the above-mentioned electronic device is only illustrative, and based on different application scenarios, it may also include other physical structures, and the physical structure of the electronic device is not limited here.
[0109] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0110] An embodiment of the present application also provides a chip system, which is applied to an electronic device. The chip system includes one or more processors, and the one or more processors are used to call computer instructions so that the electronic device implements the steps in the above-mentioned method embodiments.
[0111] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0112] An embodiment of the present application provides a computer program product. When the computer program product runs on an electronic device, the electronic device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0113] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. Computer-readable media may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0114] The devices, electronic devices, chip systems, computer storage media, and computer program products provided in the above-mentioned embodiments of the present application are all used to execute the methods provided above. Therefore, the beneficial effects that can be achieved can refer to the corresponding beneficial effects of the methods provided above, and will not be repeated here.
[0115] It should be understood that the above is only to help those skilled in the art to better understand the embodiments of the present application, rather than to limit the scope of the embodiments of the present application. According to the above examples given, those skilled in the art can obviously make various equivalent modifications or changes. For example, some steps in each embodiment of the above detection method may be unnecessary, or some steps may be newly added. Or a combination of any two or any multiple embodiments of the above. Such modifications, changes or combined schemes also fall within the scope of the embodiments of the present application.
[0116] It should also be understood that the division of the methods, situations, categories and embodiments in the embodiments of the present application is only for the convenience of description and should not constitute a special limitation. The features of various methods, categories, situations and embodiments can be combined without contradiction.
[0117] It should also be understood that in the various embodiments of the present application, unless otherwise specified or there is a logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced to each other, and the technical features in different embodiments can be combined to form new embodiments according to their internal logical relationships.
[0118] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0119] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0120] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0121] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
[0122] Finally, it should be noted that the above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A gateway scheduling system, characterized in that: include: At least one first gateway and at least one second gateway, the first gateway includes a Wi-Fi Mesh module and at least one first Bluetooth module, and the second gateway includes a Wi-Fi Mesh module and at least one second Bluetooth module; wherein the first gateway and the second gateway are communicatively connected based on the Wi-Fi Mesh module; The first gateway is used to schedule the at least one first Bluetooth module and the at least one second Bluetooth module in a standard working mode, and send a scheduling instruction to the second gateway, wherein the scheduling instruction is used to instruct the second gateway to connect to a target Bluetooth device; The second gateway is used to receive the scheduling instruction sent by the first gateway in the shadow working mode, and connect to the target Bluetooth device according to the scheduling instruction.
2. The system according to claim 1, characterized in that The second gateway is further configured to convert from the shadow working mode to the standard working mode when the first gateway fails.
3. The system according to claim 1, characterized in that The first gateway is further configured to send a broadcast signal in the standard working mode; the second gateway is further configured to establish a communication connection with the first gateway when scanning the broadcast signal of the first gateway.
4. The system according to claim 1, characterized in that The second gateway is further used to share the Bluetooth device file of the at least one second Bluetooth module with the first gateway based on the communication connection with the first gateway; the Bluetooth device file is used to provide data support for executing the scheduling operation to the first gateway.
5. The system according to claim 1, characterized in that The system further includes a third gateway, the third gateway including a Wi-Fi Mesh module and at least one third Bluetooth module, and the third gateway is configured in the standard working mode; The third gateway is used to establish a communication connection with the first gateway based on the Wi-Fi Mesh module, and share the connection information of the at least one third Bluetooth module with the first gateway based on the communication connection; the connection information is used to allocate the connected Bluetooth device.
6. A gateway scheduling method, characterized in that: Applied to a first gateway, the first gateway includes a Wi-Fi Mesh module and at least one first Bluetooth module; the method includes: Sending a broadcast signal in a standard working mode; the broadcast signal is used to establish a communication connection with the first gateway when the second gateway scans it; wherein the second gateway includes a Wi-Fi Mesh module and at least one second Bluetooth module, and the second gateway is configured in a shadow working mode; After establishing a communication connection with the second gateway based on the Wi-Fi Mesh module, scheduling the at least one first Bluetooth module and the at least one second Bluetooth module, and sending a scheduling instruction to the second gateway; wherein the scheduling instruction is used to instruct the second gateway to connect to a target Bluetooth device.
7. A gateway scheduling method, characterized in that: Applied to a second gateway, the second gateway includes a Wi-Fi Mesh module and at least one second Bluetooth module; the method includes: In the shadow working mode, when a broadcast signal sent by a first gateway is obtained, a communication connection is established with the first gateway; Receive a scheduling instruction sent by the first gateway, and connect to a target Bluetooth device based on the scheduling instruction; the scheduling instruction is issued by the first gateway in a standard working mode based on the at least one first Bluetooth module and the at least one second Bluetooth module scheduled.
8. An electronic device, characterized in that: The electronic device includes at least one processor, and a memory communicatively connected to the at least one processor; The memory stores a computer program executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method of claim 6 or 7.
9. A chip system, characterized in that: The chip system is applied to an electronic device, and the chip system includes one or more processors, and the one or more processors are used to call computer instructions so that the electronic device executes the method as claimed in claim 6 or 7.
10. A computer program product, characterized in that When the computer program product runs on an electronic device, the electronic device is caused to execute the method according to claim 6 or 7.
Citation Information
Cited By
Communication method, gateway device, electronic device and communication system
CN121397500A