CN118075920A - Bluetooth equipment networking method, system, bluetooth gateway and storage medium - Google Patents
Bluetooth equipment networking method, system, bluetooth gateway and storage medium Download PDFInfo
- Publication number
- CN118075920A CN118075920A CN202410467188.4A CN202410467188A CN118075920A CN 118075920 A CN118075920 A CN 118075920A CN 202410467188 A CN202410467188 A CN 202410467188A CN 118075920 A CN118075920 A CN 118075920A
- Authority
- CN
- China
- Prior art keywords
- bluetooth
- current
- bluetooth device
- gateway
- determining
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Landscapes
- Mobile Radio Communication Systems (AREA)
Abstract
The application discloses a Bluetooth device network access method, a system, a Bluetooth gateway and a storage medium, which relate to the technical field of device connection and are applied to the Bluetooth gateway, wherein the Bluetooth gateway is connected with a network server, and the method comprises the following steps: receiving broadcast information of a plurality of Bluetooth devices; determining connection priority of each Bluetooth device according to the broadcast information and signal intensity of the broadcast information; determining the current Bluetooth equipment to be connected with the highest connection priority; establishing Bluetooth connection with the current Bluetooth equipment to be connected so as to synchronize data between the current Bluetooth equipment to be connected and a network server; and returning to execute the step of determining the connection priority of each Bluetooth device according to the broadcast information and the signal strength of the broadcast information. The application solves the technical problems of high development cost based on the realization of the special gateway in the prior large-scale Bluetooth equipment networking without redevelopment of the professional gateway aiming at different scenes, and saves the networking cost of the large-scale Bluetooth equipment.
Description
Technical Field
The present application relates to the field of device connection technologies, and in particular, to a bluetooth device networking method, a bluetooth device networking system, a bluetooth gateway, and a storage medium.
Background
In the smart campus scenario, each student wears wearable bluetooth devices (such as smart bracelets), and these bluetooth devices can gather student's motion data and physiological data (such as rhythm of the heart, step number etc.) in real time, synchronize to the network service end in order to carry out subsequent analysis and application, and the network service end also can send instruction (such as sports training instruction) to bluetooth devices.
At present, under the condition that large-scale Bluetooth equipment is communicated with a network server, connection between the Bluetooth equipment and the network server can be realized by a special gateway, but the number of equipment connected by the special gateway is set according to the use scene, and the special gateway needs to be redeveloped under different use scenes, so that the cost is high.
Disclosure of Invention
The main purpose of the application is that: the application provides a Bluetooth equipment networking method, a Bluetooth equipment networking system, a Bluetooth gateway and a storage medium, and aims to solve the technical problems of high development cost based on special gateway realization in the prior large-scale Bluetooth equipment networking.
In order to achieve the above purpose, the application adopts the following technical scheme:
In a first aspect, the present application provides a method for accessing a bluetooth device to a bluetooth gateway, where the bluetooth gateway is connected to a network server, the method includes:
Receiving broadcast information of a plurality of Bluetooth devices;
Determining connection priority of each Bluetooth device according to the broadcast information and signal intensity of the broadcast information;
determining the current Bluetooth equipment to be connected with the highest connection priority;
Establishing Bluetooth connection with the current Bluetooth equipment to be connected so as to synchronize data between the current Bluetooth equipment to be connected and a network server;
And returning to execute the step of determining the connection priority of each Bluetooth device according to the broadcast information and the signal strength of the broadcast information.
Optionally, the step of determining connection priority of each bluetooth device according to the broadcast information and signal strength of the broadcast information includes:
for each Bluetooth device, determining the current data quantity to be synchronized, the current residual storage duration, the current signal strength and the last data synchronization time of the Bluetooth device according to the broadcasting information of the Bluetooth device;
For each Bluetooth device, determining the dynamic and static states of the Bluetooth device according to the change condition of the signal intensity;
And determining the connection priority of each Bluetooth device according to the current data quantity to be synchronized, the current residual storage time length, the last data synchronization time, the current signal strength and the dynamic and static states.
Optionally, the step of determining the connection priority of each bluetooth device according to the current data amount to be synchronized, the current remaining storage duration, the last data synchronization time, the current signal strength and the dynamic and static states includes:
Respectively carrying out normalization processing on the current data quantity to be synchronized, the current residual storage time length, the last data synchronization time, the current signal intensity and the dynamic and static state to obtain a data quantity score to be synchronized, a residual storage time length score, a synchronization time score, a signal intensity score and a dynamic and static state score;
and determining the priority score of each Bluetooth device according to the data quantity score to be synchronized, the remaining storage time score, the synchronization time score, the signal strength score and the dynamic and static state score to obtain the connection priority.
Optionally, before the step of establishing bluetooth connection with the current bluetooth device to be connected to synchronize data between the current bluetooth device to be connected and the network server, the method further includes:
Determining an environment mode of the Bluetooth gateway according to the dynamic and static states of all the Bluetooth devices; the environmental modes include a stationary mode and an active mode;
Determining the current synchronous data volume of the current Bluetooth equipment to be connected according to the environment mode;
Establishing Bluetooth connection with the current Bluetooth equipment to be connected so as to enable the current Bluetooth equipment to be connected to perform data synchronization with the network server, wherein the method comprises the following steps:
And establishing Bluetooth connection with the current Bluetooth equipment to be connected, and sending a data synchronization instruction and a current synchronization data volume to the current Bluetooth equipment to be connected so as to enable the current Bluetooth equipment to be connected and the network server to perform data synchronization according to the current synchronization data volume.
Optionally, the step of determining the current synchronous data amount of the current bluetooth device to be connected according to the environment mode includes:
Determining a synchronous data volume coefficient according to the environment mode;
And determining the current synchronous data volume according to the current priority score and the synchronous data volume coefficient corresponding to the current Bluetooth equipment to be connected.
Optionally, after the step of establishing bluetooth connection with the current bluetooth device to be connected to synchronize data between the current bluetooth device to be connected and the network server, the method further includes:
after the current connection Bluetooth equipment of the Bluetooth gateway is monitored to complete data synchronization, a data synchronization completion instruction is sent to the current connection Bluetooth equipment, so that the current connection Bluetooth equipment deletes the corresponding data packet.
Optionally, after the step of establishing bluetooth connection with the current bluetooth device to be connected to synchronize data between the current bluetooth device to be connected and the network server, the method further includes:
If an emergency synchronization task is received and all interfaces of the Bluetooth gateway are connected with Bluetooth equipment, determining Bluetooth equipment to be interrupted from all the currently connected Bluetooth equipment of the Bluetooth gateway;
And disconnecting the Bluetooth connection with the Bluetooth device to be interrupted, and establishing Bluetooth connection with the Bluetooth device to be connected, which corresponds to the emergency synchronization task, so that the Bluetooth device to be connected in an emergency manner and the network server are subjected to data synchronization.
In a second aspect, the present application also provides a bluetooth gateway, where the device includes: the system comprises a memory, a processor and a Bluetooth device networking program stored on the memory and capable of running on the processor, wherein the Bluetooth device networking program is configured to implement the steps of any one of the Bluetooth device networking methods.
In a third aspect, the present application also provides a bluetooth device networking system, where the system includes:
A plurality of bluetooth devices;
at least one bluetooth gateway as described above;
And the network server is connected with at least one Bluetooth gateway.
In a fourth aspect, the present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of a bluetooth device networking method as described in any of the preceding claims.
The one or more technical schemes provided by the application can have the following advantages or at least realize the following technical effects:
The application provides a Bluetooth device networking method, a Bluetooth device networking system, a Bluetooth gateway and a storage medium, which are used for receiving broadcast information of a plurality of Bluetooth devices; determining connection priority of each Bluetooth device according to the broadcast information and signal intensity of the broadcast information; determining the current Bluetooth equipment to be connected with the highest connection priority; establishing Bluetooth connection with the current Bluetooth equipment to be connected so as to synchronize data between the current Bluetooth equipment to be connected and a network server; and returning to execute the step of determining the connection priority of each Bluetooth device according to the broadcast information and the signal strength of the broadcast information.
Therefore, the Bluetooth gateway of the application accesses the Bluetooth device into the network server according to the priority by determining the connection priority of the Bluetooth device, performs data synchronization, and can access a plurality of Bluetooth devices into the network server in a time-sharing way under the condition that the large-scale Bluetooth device is communicated with the network server, without redevelopment of a professional gateway aiming at different scenes, thereby solving the technical problems of high development cost due to realization of the special gateway and saving the network access cost of the large-scale Bluetooth device.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the structures shown in these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic structural diagram of a bluetooth gateway in a hardware operating environment according to an embodiment of the present application;
fig. 2 is a flow chart of a network access method of a bluetooth device according to an embodiment of the present application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
In the present disclosure, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a device or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such device or system. Without further limitation, an element defined by the phrase "comprising … …" does not exclude that an additional identical element is present in a device or system comprising the element.
In view of the technical problems of high development cost of the existing large-scale Bluetooth equipment networking based on special gateway implementation, the application provides a Bluetooth equipment networking method, and the general thought is as follows:
The method is applied to the Bluetooth gateway, the Bluetooth gateway is connected with the network server, and the method comprises the following steps: receiving broadcast information of a plurality of Bluetooth devices; determining connection priority of each Bluetooth device according to the broadcast information and signal intensity of the broadcast information; determining the current Bluetooth equipment to be connected with the highest connection priority; establishing Bluetooth connection with the current Bluetooth equipment to be connected so as to synchronize data between the current Bluetooth equipment to be connected and a network server; and returning to execute the step of determining the connection priority of each Bluetooth device according to the broadcast information and the signal strength of the broadcast information.
The application provides a network access method of Bluetooth equipment, which is characterized in that a Bluetooth gateway accesses the Bluetooth equipment to a network server according to priority by determining connection priority of the Bluetooth equipment, and performs data synchronization, and under the condition that large-scale Bluetooth equipment is communicated with the network server, the Bluetooth gateway can access a plurality of Bluetooth equipment to the network server in a time-sharing way, and does not need to redevelopment of professional gateways aiming at different scenes, thereby solving the technical problems of high development cost based on special gateway realization and saving the network access cost of the large-scale Bluetooth equipment in the prior art.
The following describes in detail a method, a device, a system and a storage medium for accessing a bluetooth device applied in the implementation of the present application:
the present embodiment provides a bluetooth device networking system, where the system may include:
A plurality of bluetooth devices;
At least one bluetooth gateway;
And the network server is connected with at least one Bluetooth gateway.
In this embodiment, taking the smart campus scenario as an example, the bluetooth device may include a bluetooth device worn by a smart bracelet, and the network server may be a cloud server or a server in the campus, and the bluetooth gateway is connected to the network server, so that the bluetooth gateway may enable communication between the bluetooth device and the network server, so as to implement network access of the bluetooth device.
In the smart campus scene, the space for setting the network access system of the Bluetooth device can comprise the whole school or a specific scene space, wherein the number of the Bluetooth devices is more, and thousands or hundreds of the Bluetooth devices are arranged, at this time, the number of the Bluetooth gateways can be set according to the actual use requirement, the space for covering the network access system of the Bluetooth device can be covered, or only one Bluetooth gateway can be set at a specific position. For example, in a sports class scene, the coverage space of the network access system of the bluetooth device may be a playground, including a standard 400 meter runway, where the radius exceeds the bluetooth communication distance (70 meters), and at this time, the number of bluetooth gateways may be set according to the actual use requirement, so as to cover the whole playground, or only one bluetooth gateway may be set at a specific location of the playground.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a bluetooth gateway of a hardware running environment according to an embodiment of the present application.
As shown in fig. 1, the bluetooth gateway may include: a processor 1001, such as a CPU, a user interface 1003, a memory 1005, and a communication bus 1002. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may comprise a bluetooth device, alternatively the user interface 1003 may be a Display screen (Display), an input unit such as a Keyboard (Keyboard) or the like. The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated that the bluetooth gateway may further include a network interface 1004, where the network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), and a connection to a network server. Optionally, the device may also include RF (Radio Frequency) circuitry, sensors, audio circuitry, wiFi modules, and the like.
It will be appreciated by those skilled in the art that the apparatus structure shown in fig. 1 is not limiting of the apparatus and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The networking method and storage medium of the Bluetooth device of the present application are described in detail below with reference to the accompanying drawings and detailed description.
Based on the above hardware structure, but not limited to the above hardware structure, referring to fig. 2, fig. 2 is a flow chart of a bluetooth device networking method according to an embodiment of the present application.
The embodiment provides a network access method of a bluetooth device, which is applied to a bluetooth gateway, wherein the bluetooth gateway is connected with a network server, as shown in fig. 2, and the method may include:
step S100: broadcast information of a plurality of bluetooth devices is received.
In this embodiment, the execution body is the bluetooth gateway described above.
In the smart campus scenario, the plurality of bluetooth devices are bluetooth devices in a broadcast state, and the plurality of bluetooth devices are all bound with the bluetooth gateway. The broadcast information may include a device name, a MAC Address (MEDIA ACCESS Control Address), an amount of data to be synchronized, a remaining storage duration, a last data synchronization time, etc. of the bluetooth device, and the bluetooth gateway may receive the broadcast information of the bluetooth device and record the broadcast information of each bluetooth device and a signal strength of the broadcast information.
It should be noted that the bluetooth gateway may record the broadcast information at the current time of the bluetooth device and the signal strength of the broadcast information within a preset time period before the current time, and update the recorded broadcast information and the signal strength of the broadcast information of each bluetooth device. The preset time period can be set according to actual use requirements.
In a specific implementation, the bluetooth gateway may record the current data amount to be synchronized, the current remaining storage duration, the last data synchronization time, the current signal strength of the corresponding broadcast information, and the historical signal strengths of a plurality of broadcast information of each bluetooth device within a preset duration before the current time.
In an example, the bluetooth gateway may record that the device name of a certain bluetooth device is device1, the current amount of data to be synchronized by the device is 200 bytes, the current remaining storage time of the device is 2 hours, the last data synchronization time of the device is 20231219091040, the current signal strength of the device is 40RSSI, and the historical signal strengths of the device include [40, 50, 90, 40] in RSSI.
Step S200: and determining the connection priority of each Bluetooth device according to the broadcast information and the signal strength of the broadcast information.
In this embodiment, the number of bluetooth devices that the bluetooth gateway can connect is limited, and there may be 7 or 16 bluetooth devices in general, and in a smart campus scenario, there are many (such as hundreds or thousands) bluetooth devices, and data synchronization needs to be performed with the network server through the bluetooth gateway, where the bluetooth gateway may establish a bluetooth connection with the bluetooth devices according to the connection priority of the bluetooth devices, and disconnect the bluetooth connection with the bluetooth devices after the bluetooth devices complete data transmission, so as to time-share access the plurality of bluetooth devices to the network server.
It can be understood that the bluetooth gateway may determine connection priorities of bluetooth devices corresponding to the received plurality of broadcast information when there is a spare device interface, and connect the bluetooth devices to the spare device interface according to the connection priorities.
As a specific embodiment, step S200 may include:
Step S210: for each Bluetooth device, determining the current data quantity to be synchronized, the current residual storage duration, the current signal strength and the last data synchronization time of the Bluetooth device according to the broadcasting information of the Bluetooth device.
Step S220: and determining the dynamic and static states of the Bluetooth equipment according to the change condition of the signal intensity aiming at each Bluetooth equipment.
Step S230: and determining the connection priority of each Bluetooth device according to the current data quantity to be synchronized, the current residual storage time length, the last data synchronization time, the current signal strength and the dynamic and static states.
In this embodiment, when determining the connection priority of the bluetooth device, various information such as the current data amount to be synchronized, the current remaining storage duration, the current signal strength, the last data synchronization time, the dynamic and static states of the bluetooth device may be considered to improve the accuracy and reliability of the connection priority.
The dynamic and static states may include a stationary state and a moving state, among others. In the smart campus scenario, the static state may include a state of a bluetooth device worn by a student in a classroom or in a situation where students stand together in a preparation link before a physical education session, that is, a static state of the bluetooth device when a wearer of the bluetooth device is stationary; the movement state may include a state of a bluetooth device worn by a student in a sports class under the condition that the student is running, i.e., a dynamic and static state of the bluetooth device when the bluetooth device wearer moves.
It can be understood that the dynamic and static states of the bluetooth device can be determined according to the change condition of the signal intensity of the broadcast information of the bluetooth device, if the change of the signal intensity of the broadcast information is severe, the corresponding bluetooth device is in a moving state, otherwise, if the change of the signal intensity of the broadcast information is slow, the corresponding bluetooth device is in a static state.
In particular, the bluetooth gateway can compare the historical signal intensities and the current signal intensities of the broadcast information corresponding to each bluetooth device to determine the dynamic and static states of each bluetooth device. For example, the bluetooth gateway may compare signal strength differences between a plurality of historical signal strengths of broadcast information of the bluetooth device with signal strength differences between the historical signal strength and the current signal strength, and determine that the bluetooth device is in a moving state when the signal strength differences are greater than a preset signal strength difference; the preset signal strength difference can be set according to time use requirements.
In this embodiment, step S230 may include: respectively carrying out normalization processing on the current data quantity to be synchronized, the current residual storage time length, the last data synchronization time, the current signal intensity and the dynamic and static state to obtain a data quantity score to be synchronized, a residual storage time length score, a synchronization time score, a signal intensity score and a dynamic and static state score; and determining the priority score of each Bluetooth device according to the data quantity score to be synchronized, the remaining storage time score, the synchronization time score, the signal strength score and the dynamic and static state score to obtain the connection priority.
In this embodiment, the bluetooth gateway may determine a priority score of a corresponding bluetooth device according to the current data amount to be synchronized, the current remaining storage duration, the last data synchronization time, the current signal strength, and the dynamic and static states of each bluetooth device, and determine the connection priority according to the priority score.
It can be understood that before determining the priority score of each bluetooth device, the current data amount to be synchronized, the current remaining storage duration, the last data synchronization time, the current signal strength and the dynamic and static state may be normalized respectively, so as to express the data amount score to be synchronized, the remaining storage duration score, the synchronization time score, the signal strength score and the dynamic and static state score by a unified scalar.
In the specific implementation, a formula I is utilized to determine the score of the data quantity to be synchronized of each Bluetooth device according to the current data quantity to be synchronized of each Bluetooth device and the maximum storage quantity; wherein, formula one is:
A i =amount of data to be synchronized/maximum storage;
A i is the data size score to be synchronized for the ith bluetooth device.
Determining the score of the residual storage time length of each Bluetooth device according to the maximum storage time length and the current residual storage time length of each Bluetooth device by using a formula II; wherein, formula II is:
b i = (maximum storage duration-current remaining storage duration)/maximum storage duration;
b i is the remaining storage time score for the ith bluetooth device.
Determining a synchronization time score according to the current time, the last data synchronization time of each Bluetooth device and the maximum delay time by using a formula III; the formula III is:
C i = ((current time-last data synchronization time) -maximum delay time length)/maximum delay time length;
c i is the synchronized moment score for the ith bluetooth device.
For each Bluetooth device, determining a signal strength score according to a plurality of historical signal strengths and current signal strengths of corresponding broadcast information by using a formula IV; the fourth formula is:
d i = (100+min (multiple historic signal strengths, current signal strength, -100))/100;
D i is the signal strength score for the ith bluetooth device.
In addition, for the dynamic and static state score of each bluetooth device, if the dynamic and static state of the bluetooth device is a static state, the dynamic and static state score is 1, and if the dynamic and static state of the bluetooth device is a moving state, the dynamic and static state score is 0.
The step of determining the priority score of each bluetooth device according to the data amount score to be synchronized, the remaining storage time score, the synchronization time score, the signal strength score, and the dynamic and static state score may include: and determining the priority score of each Bluetooth device according to the data quantity score to be synchronized, the remaining storage duration score, the synchronization time score, the signal strength score and the dynamic and static state score by utilizing a formula V. The fifth formula is:
Li= Ai* wa + Bi* wb + Ci* wc + Di* wd + Ei* we;
The priority score of the ith bluetooth device of L i, E i is the dynamic and static state score of the ith bluetooth device, and wa, wb, wc, wd and we are the score weights of the data amount score to be synchronized, the remaining storage time score, the synchronization time score, the signal strength score and the dynamic and static state score in one-to-one correspondence. Wherein, each score weight value range is 0-1, and each score weight value is determined according to actual use condition.
It should be noted that, the larger the priority score is, the highest the connection priority of the corresponding bluetooth device is.
Step S300: and determining the current Bluetooth equipment to be connected with the highest connection priority.
Step S400: and establishing Bluetooth connection with the current Bluetooth equipment to be connected so as to enable the current Bluetooth equipment to be connected to perform data synchronization with the network server.
Step S500: the process returns to step S200.
In this embodiment, when the bluetooth gateway has a spare device interface, the bluetooth gateway establishes a bluetooth connection with the current bluetooth device to be connected having the highest connection priority. When the Bluetooth gateway has a plurality of spare equipment interfaces, the Bluetooth gateway firstly establishes Bluetooth connection with the current Bluetooth equipment to be connected with the highest connection priority, then returns the broadcast information and the signal strength of the broadcast information according to a plurality of other Bluetooth equipment, determines the connection priority of each other Bluetooth equipment, and circularly establishes Bluetooth connection with the current Bluetooth equipment to be connected with the highest connection priority; the other bluetooth devices may be bluetooth devices other than the bluetooth device to be connected currently among the plurality of bluetooth devices.
The embodiment provides a Bluetooth equipment networking method, a Bluetooth gateway accesses a Bluetooth equipment into a network server according to priority by determining connection priority of the Bluetooth equipment, and performs data synchronization, and under the condition that large-scale Bluetooth equipment is communicated with the network server, the Bluetooth gateway can access the Bluetooth equipment into the network server in a time-sharing manner, and does not need to redevelopment of a professional gateway aiming at different scenes, so that the technical problems of high development cost based on the realization of a special gateway in the prior large-scale Bluetooth equipment networking are solved, and the networking cost of the large-scale Bluetooth equipment is saved.
As an embodiment, before step S400, the method may further include: determining an environment mode of the Bluetooth gateway according to the dynamic and static states of all the Bluetooth devices; and determining the current synchronous data quantity of the Bluetooth equipment to be connected currently according to the environment mode.
The environment modes include a stationary mode and an active mode.
Step S400 may include: and establishing Bluetooth connection with the current Bluetooth equipment to be connected, and sending a data synchronization instruction and a current synchronization data volume to the current Bluetooth equipment to be connected so as to enable the current Bluetooth equipment to be connected and the network server to perform data synchronization according to the current synchronization data volume.
In this embodiment, the current synchronization data size is a single synchronization data size between the bluetooth device and the network server.
In the smart campus scene, under the condition that students stand together in classrooms or in preparation links before the sports class, the environment mode in which the Bluetooth gateway is positioned is a static mode, and under the condition that students run in the sports class, the environment mode in which the Bluetooth gateway is positioned is an active mode. In the static mode, the Bluetooth connection between the Bluetooth equipment and the Bluetooth gateway is stable, and the data synchronization of the current data quantity to be synchronized can be completed through a mode of a large quantity and a small quantity between the Bluetooth equipment and the network server; in the active mode, the stability of the Bluetooth connection between the Bluetooth device and the Bluetooth gateway is poor, and the data synchronization of the current data quantity to be synchronized can be completed through a small number of times between the Bluetooth device and the network server. The current synchronous data quantity is determined according to the environment mode, and the current synchronous data quantity in the static mode is larger than the current synchronous data quantity in the active mode.
It can be understood that the bluetooth gateway can determine the environment mode in which the bluetooth gateway is located according to the dynamic and static states of all bluetooth devices, when the number of bluetooth devices in the static state is greater, the environment mode is the static mode, and when the number of bluetooth devices in the moving state is greater, the environment mode is the active mode.
In particular, the environment mode may be determined by comparing the number of bluetooth devices in a stationary state with the number of bluetooth devices in a mobile state. For example, the environment mode may be determined by comparing a number difference between the number of bluetooth devices in a stationary state and the number of bluetooth devices in a moving state with a preset number range; the environmental pattern may also be determined by comparing the duty cycle of a stationary bluetooth device or the duty cycle of a mobile bluetooth device.
In this embodiment, the step of determining the environmental mode in which the bluetooth gateway is located according to the dynamic and static states of all bluetooth devices may include: determining a synchronous data volume coefficient according to the environment mode; and determining the current synchronous data volume according to the current priority score and the synchronous data volume coefficient corresponding to the current Bluetooth equipment to be connected.
In this embodiment, the synchronization data volume coefficient may be a unit synchronization data volume, different environment modes correspond to different synchronization data volume coefficients, the communication environment is poor in the active mode, the unit synchronization data volume is smaller, the corresponding current synchronization data volume is less, and the synchronization failure rate may be reduced.
When the method is specifically used, the current synchronous data volume is determined according to the current priority score and the synchronous data volume coefficient corresponding to the current Bluetooth equipment to be connected by utilizing the formula six. The formula six is:
v i=Li sync data volume coefficient;
V i is the current amount of synchronized data for the ith bluetooth device.
The embodiment provides a network access method of a bluetooth device, which determines an environment mode of the bluetooth gateway according to dynamic and static states of a plurality of bluetooth devices, performs data synchronization in a small number of data synchronization modes for many times when the environment mode of the bluetooth gateway is an active mode, and appropriately increases a single synchronization data volume when the environment mode of the bluetooth gateway is a static mode, so that the environment of the bluetooth gateway is determined to adjust the single synchronization data volume through the environment sensing capability of the bluetooth gateway, and signal strength change of broadcast information when the bluetooth device is in a mobile state can be avoided, thereby causing data synchronization failure and reducing data synchronization failure rate.
As another embodiment, after step S400, the method may further include: after the current connection Bluetooth equipment of the Bluetooth gateway is monitored to complete data synchronization, a data synchronization completion instruction is sent to the current connection Bluetooth equipment, so that the current connection Bluetooth equipment deletes the corresponding data packet.
In this embodiment, the currently connected bluetooth device is a bluetooth device that establishes a bluetooth connection with a bluetooth gateway. The Bluetooth gateway can receive the data packet sent by the current connection Bluetooth device and forwards the received data packet to the network server, so that the Bluetooth gateway can determine whether the current connection Bluetooth device completes data synchronization or not by monitoring the data volume of the received data packet; or after determining the current synchronous data amount, the bluetooth gateway can also determine the current data synchronization time length according to the current synchronous data amount, so that the bluetooth gateway can determine whether the current connected bluetooth equipment completes data synchronization by monitoring the data synchronization time length of the current connected bluetooth equipment. Wherein the current data synchronization time length is proportional to the current data synchronization amount.
The embodiment provides a method for accessing a bluetooth device to a network, after a bluetooth gateway detects that a currently connected bluetooth device completes data synchronization, the bluetooth gateway sends a data synchronization completion instruction to the currently connected bluetooth device, so that the currently connected bluetooth device can delete a data packet corresponding to a current synchronous data volume to release a storage space.
As yet another embodiment, after step S400, the method may further include: if an emergency synchronization task is received and all interfaces of the Bluetooth gateway are connected with Bluetooth equipment, determining Bluetooth equipment to be interrupted from all the currently connected Bluetooth equipment of the Bluetooth gateway; and disconnecting the Bluetooth connection with the Bluetooth device to be interrupted, and establishing Bluetooth connection with the Bluetooth device to be connected, which corresponds to the emergency synchronization task, so that the Bluetooth device to be connected in an emergency manner and the network server are subjected to data synchronization.
In this embodiment, the bluetooth gateway may determine whether the plurality of bluetooth devices have an emergency synchronization task through broadcast information of the plurality of bluetooth devices; or, the bluetooth gateway may also receive an urgent synchronization task sent by the network server.
When the Bluetooth gateway has a spare equipment interface, establishing Bluetooth connection with the emergency Bluetooth equipment to be connected corresponding to the emergency synchronous task directly through the spare interface; when the Bluetooth gateway does not have a spare device interface, the Bluetooth gateway can determine the Bluetooth device to be interrupted from the currently connected Bluetooth devices, disconnect the Bluetooth connection with the Bluetooth device to be interrupted, and connect the emergency Bluetooth device to be connected corresponding to the emergency synchronization task with Bluetooth.
The Bluetooth device to be interrupted can be a current Bluetooth device which is randomly selected or can establish Bluetooth connection with the Bluetooth gateway at the earliest; in addition, the connection priority can also be considered, and the bluetooth device with the lowest priority in the currently connected bluetooth devices is selected as the bluetooth device to be interrupted.
The embodiment provides a network access method of Bluetooth equipment, which supports data synchronization interruption, can process emergency synchronization tasks in time and improves the network access flexibility of the Bluetooth equipment.
In addition, the embodiment of the application also provides a computer storage medium, and a computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the Bluetooth device networking method are realized. Therefore, a detailed description will not be given here. In addition, the description of the beneficial effects of the same method is omitted. For technical details not disclosed in the embodiments of the computer-readable storage medium according to the present application, please refer to the description of the method embodiments of the present application. As an example, the program instructions may be deployed to be executed on one computing device or on multiple computing devices at one site or distributed across multiple sites and interconnected by a communication network.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the application, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.
Claims (10)
1. The networking method of the Bluetooth equipment is characterized by being applied to a Bluetooth gateway, wherein the Bluetooth gateway is connected with a network server, and the method comprises the following steps:
Receiving broadcast information of a plurality of Bluetooth devices;
Determining connection priority of each Bluetooth device according to the broadcast information and signal strength of the broadcast information;
determining the current Bluetooth equipment to be connected with the highest connection priority;
Establishing Bluetooth connection with the current Bluetooth equipment to be connected so as to enable the current Bluetooth equipment to be connected to perform data synchronization with the network server;
And returning to the step of determining the connection priority of each Bluetooth device according to the broadcast information and the signal intensity of the broadcast information.
2. The method of claim 1, wherein the step of determining connection priority of each of the bluetooth devices based on the broadcast information and signal strength of the broadcast information comprises:
For each Bluetooth device, determining the current data quantity to be synchronized, the current residual storage duration, the current signal strength and the last data synchronization time of the Bluetooth device according to the broadcasting information of the Bluetooth device;
For each Bluetooth device, determining the dynamic and static states of the Bluetooth device according to the change condition of the signal intensity;
And determining the connection priority of each Bluetooth device according to the current data quantity to be synchronized, the current residual storage time length, the last data synchronization time, the current signal strength and the dynamic and static states.
3. The method of claim 2, wherein the step of determining the connection priority of each bluetooth device based on the current amount of data to be synchronized, the current remaining storage time period, the last data synchronization time, the current signal strength, and the dynamic and static states comprises:
Respectively carrying out normalization processing on the current data amount to be synchronized, the current residual storage time length, the last data synchronization time, the current signal strength and the dynamic and static states to obtain a data amount score to be synchronized, a residual storage time length score, a synchronization time score, a signal strength score and a dynamic and static state score;
And determining the priority score of each Bluetooth device according to the data quantity score to be synchronized, the remaining storage duration score, the synchronization time score, the signal strength score and the dynamic and static state score, and obtaining the connection priority.
4. The method of claim 3, wherein prior to the step of establishing a bluetooth connection with the currently-to-be-connected bluetooth device to synchronize data between the currently-to-be-connected bluetooth device and the network server, the method further comprises:
determining an environment mode of the Bluetooth gateway according to the dynamic and static states of all the Bluetooth devices; the environmental modes include a stationary mode and an active mode;
Determining the current synchronous data volume of the current Bluetooth equipment to be connected according to the environment mode;
the step of establishing bluetooth connection with the current bluetooth device to be connected so as to synchronize data between the current bluetooth device to be connected and the network server comprises the following steps:
And establishing Bluetooth connection with the current Bluetooth equipment to be connected, and sending a data synchronization instruction and the current synchronization data volume to the current Bluetooth equipment to be connected so that the current Bluetooth equipment to be connected and the network server perform data synchronization according to the current synchronization data volume.
5. The method of claim 4, wherein the step of determining the current amount of synchronized data of the current bluetooth device to be connected according to the environment mode comprises:
Determining a synchronous data volume coefficient according to the environment mode;
and determining the current synchronous data volume according to the current priority score corresponding to the current Bluetooth equipment to be connected and the synchronous data volume coefficient.
6. The method of claim 1, wherein after the step of establishing a bluetooth connection with the currently-to-be-connected bluetooth device to synchronize data between the currently-to-be-connected bluetooth device and the network server, the method further comprises:
And after the current connection Bluetooth equipment of the Bluetooth gateway is monitored to complete data synchronization, sending a data synchronization completion instruction to the current connection Bluetooth equipment so that the current connection Bluetooth equipment deletes a corresponding data packet.
7. The method of claim 1, wherein after the step of establishing a bluetooth connection with the currently-to-be-connected bluetooth device to synchronize data between the currently-to-be-connected bluetooth device and the network server, the method further comprises:
If an emergency synchronization task is received and all interfaces of the Bluetooth gateway are connected with Bluetooth equipment, determining Bluetooth equipment to be interrupted from all current Bluetooth equipment connected with the Bluetooth gateway;
And disconnecting the Bluetooth connection with the Bluetooth device to be interrupted, and establishing Bluetooth connection with the Bluetooth device to be connected in emergency corresponding to the emergency synchronization task, so that the Bluetooth device to be connected in emergency and the network server are subjected to data synchronization.
8. A bluetooth gateway, the bluetooth gateway comprising: memory, a processor and a bluetooth device networking program stored on the memory and executable on the processor, the bluetooth device networking program being configured to implement the steps of the bluetooth device networking method of any of claims 1 to 7.
9. A bluetooth device networking system, the system comprising:
A plurality of bluetooth devices;
at least one bluetooth gateway as claimed in claim 8;
And the network server is connected with at least one Bluetooth gateway.
10. A computer readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the bluetooth device networking method according to any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410467188.4A CN118075920B (en) | 2024-04-18 | 2024-04-18 | Bluetooth equipment networking method, system, bluetooth gateway and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410467188.4A CN118075920B (en) | 2024-04-18 | 2024-04-18 | Bluetooth equipment networking method, system, bluetooth gateway and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN118075920A true CN118075920A (en) | 2024-05-24 |
CN118075920B CN118075920B (en) | 2024-07-02 |
Family
ID=91109789
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410467188.4A Active CN118075920B (en) | 2024-04-18 | 2024-04-18 | Bluetooth equipment networking method, system, bluetooth gateway and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118075920B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160029146A1 (en) * | 2014-07-25 | 2016-01-28 | Qualcomm Incorporated | Methods and systems for triggering efficient application synchronization |
US20180182491A1 (en) * | 2016-12-27 | 2018-06-28 | Dexcom, Inc. | Systems and methods for patient monitoring using an hcp-specific device |
CN109089248A (en) * | 2018-08-07 | 2018-12-25 | 河南云拓智能科技有限公司 | A kind of information monitoring method based on Bluetooth gateway |
CN113259917A (en) * | 2021-04-23 | 2021-08-13 | 南京矽力微电子技术有限公司 | Bluetooth self-adaptive rate selection method and Bluetooth communication module |
US11245590B1 (en) * | 2020-08-04 | 2022-02-08 | Cisco Technology, Inc. | Neighbor list adaptive mapping |
CN116095887A (en) * | 2022-12-29 | 2023-05-09 | 海能达通信股份有限公司 | Bluetooth connection method, main device, multi-device cooperative system and storage medium |
CN116763272A (en) * | 2023-06-08 | 2023-09-19 | 中国人民解放军总医院第七医学中心 | Bluetooth technology-based portable multi-person sharing blood pressure monitoring system, application method and equipment |
CN117793681A (en) * | 2023-12-26 | 2024-03-29 | 深圳和而泰智能控制股份有限公司 | Bluetooth communication management method, system, storage medium and integrated gateway |
-
2024
- 2024-04-18 CN CN202410467188.4A patent/CN118075920B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160029146A1 (en) * | 2014-07-25 | 2016-01-28 | Qualcomm Incorporated | Methods and systems for triggering efficient application synchronization |
US20180182491A1 (en) * | 2016-12-27 | 2018-06-28 | Dexcom, Inc. | Systems and methods for patient monitoring using an hcp-specific device |
CN109089248A (en) * | 2018-08-07 | 2018-12-25 | 河南云拓智能科技有限公司 | A kind of information monitoring method based on Bluetooth gateway |
US11245590B1 (en) * | 2020-08-04 | 2022-02-08 | Cisco Technology, Inc. | Neighbor list adaptive mapping |
CN113259917A (en) * | 2021-04-23 | 2021-08-13 | 南京矽力微电子技术有限公司 | Bluetooth self-adaptive rate selection method and Bluetooth communication module |
CN116095887A (en) * | 2022-12-29 | 2023-05-09 | 海能达通信股份有限公司 | Bluetooth connection method, main device, multi-device cooperative system and storage medium |
CN116763272A (en) * | 2023-06-08 | 2023-09-19 | 中国人民解放军总医院第七医学中心 | Bluetooth technology-based portable multi-person sharing blood pressure monitoring system, application method and equipment |
CN117793681A (en) * | 2023-12-26 | 2024-03-29 | 深圳和而泰智能控制股份有限公司 | Bluetooth communication management method, system, storage medium and integrated gateway |
Non-Patent Citations (1)
Title |
---|
盛立冲;吴子龙;邹秋霞;刘德锋;王栋;: "基于蓝牙4.0BLE技术的鸡舍环境信息监控系统的研究与实现", 江苏农业科学, no. 07, 12 August 2016 (2016-08-12) * |
Also Published As
Publication number | Publication date |
---|---|
CN118075920B (en) | 2024-07-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US12218873B2 (en) | Beam indication method and apparatus, device, and medium | |
KR20210102273A (en) | An electronic device that performs ranging through UWB (Ultra Wide Band) and an operating method of the electronic device | |
CN105704669A (en) | Wearable-equipment-based user positioning method and system | |
CN107995036A (en) | Data transmission method, device, server and readable storage medium storing program for executing | |
US9454913B2 (en) | Simulator tool for physical exercise device | |
CN107666406B (en) | Intelligent card display method and device | |
US20150116447A1 (en) | Information processing system, information processing method, information processing apparatus, and control method and control program of information processing apparatus | |
EP4478799A1 (en) | Information processing method and communication device | |
CN118075920B (en) | Bluetooth equipment networking method, system, bluetooth gateway and storage medium | |
CN109257816A (en) | A kind of localization method and relevant device | |
EP3927076A1 (en) | Information processing method, device and system | |
CN114222319B (en) | Data transmission method, device and storage medium of internet of things terminal | |
CN112073760B (en) | Display system and clock synchronization method, device and equipment thereof | |
CN107786557B (en) | Team game acceleration method and related product | |
CN107786965B (en) | Team game communication method and related product | |
JP4603442B2 (en) | Data collection method and communication base station | |
CN112910572B (en) | Base station test method, device and readable storage medium | |
JP6729035B2 (en) | Management system, wireless terminal and program | |
CN114697310B (en) | Upgrade file distribution method, scheduling server, device and storage medium | |
CN104919870B (en) | System for wireless transceiver timing | |
CN110177105A (en) | Monitoring method, device, system, storage medium and the processor of media file | |
CN110251943A (en) | A kind of matching process of game player, device, equipment and storage medium | |
EP4459917A1 (en) | Communication method and apparatus, communication device, and readable storage medium | |
CN109413573B (en) | Internet of things terminal positioning method and device | |
EP4510635A1 (en) | Positioning method and apparatus for use in sidelink, and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant |