CN112291771A - Data transmission method and device and processor - Google Patents
Data transmission method and device and processor Download PDFInfo
- Publication number
- CN112291771A CN112291771A CN202011542729.3A CN202011542729A CN112291771A CN 112291771 A CN112291771 A CN 112291771A CN 202011542729 A CN202011542729 A CN 202011542729A CN 112291771 A CN112291771 A CN 112291771A
- Authority
- CN
- China
- Prior art keywords
- base station
- alternative
- signal strength
- ble
- current
- 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
- 230000005540 biological transmission Effects 0.000 title claims abstract description 165
- 238000000034 method Methods 0.000 title claims abstract description 79
- 238000005259 measurement Methods 0.000 claims description 69
- 238000012163 sequencing technique Methods 0.000 claims description 12
- 238000012545 processing Methods 0.000 claims description 5
- 238000005516 engineering process Methods 0.000 abstract description 11
- 230000008569 process Effects 0.000 description 16
- 238000004891 communication Methods 0.000 description 14
- 230000006855 networking Effects 0.000 description 13
- 230000002093 peripheral effect Effects 0.000 description 9
- 230000000694 effects Effects 0.000 description 8
- 238000012216 screening Methods 0.000 description 7
- 230000008859 change Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000007613 environmental effect Effects 0.000 description 4
- 238000009499 grossing Methods 0.000 description 4
- 230000007246 mechanism Effects 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000005562 fading Methods 0.000 description 3
- 238000001914 filtration Methods 0.000 description 3
- 238000013459 approach Methods 0.000 description 2
- 238000005034 decoration Methods 0.000 description 2
- 230000004927 fusion Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012913 prioritisation Methods 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 230000000903 blocking effect Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000036541 health Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W36/00—Hand-off or reselection arrangements
- H04W36/0005—Control or signalling for completing the hand-off
- H04W36/0083—Determination of parameters used for hand-off, e.g. generation or modification of neighbour cell lists
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W36/00—Hand-off or reselection arrangements
- H04W36/24—Reselection being triggered by specific parameters
- H04W36/30—Reselection being triggered by specific parameters by measured or perceived connection quality data
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention discloses a data transmission method, a data transmission device and a processor. Wherein, the method comprises the following steps: when the BLE equipment moves, acquiring base station signal strength values of a current base station and a plurality of alternative base stations which establish data link with the BLE equipment; under the condition that the BLE equipment needs to switch the accessed base stations, determining the access priority of each alternative base station based on the base station signal strength value of each alternative base station; and switching the BLE equipment to the alternative base station meeting the access condition based on the access priority of each alternative base station. The invention solves the technical problems of unstable data transmission network, poor data transmission efficiency and low quality of BLE equipment and a base station caused by movement of the BLE equipment in the related technology.
Description
Technical Field
The invention relates to the field of base station networks, in particular to a data transmission method, a data transmission device and a processor.
Background
BLE (Bluetooth Low Energy) is a personal area network technology, and is intended for emerging applications in the fields of medical care, exercise health, beacons, security, home entertainment, and the like. Compared with the classic bluetooth, the bluetooth low energy aims to remarkably reduce the second power consumption and the cost while keeping the same communication range. In general, BLE can be used for both point-to-point and point-to-multipoint data transmission.
At present, in an application scenario of networking by using a base station device (fusion BLE module), when a BLE device tag establishes data connection with a base station within a networking coverage range, if the BLE tag moves along with time, the BLE tag device may gradually get away from the currently connected base station device in the moving process, and the link signal quality between the tag and the connected base station may gradually deteriorate, which affects the quality of data transmission; meanwhile, the base station device approaches to another adjacent base station device gradually, namely, the signal-to-tag quality of the adjacent base station device is better and better. In addition, if the data transmission link is not switched for a long time, BLE communication quality may be poor, or load imbalance may be caused. However, if the data transmission link switching strategy is not reasonable, the whole network is unstable.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
Embodiments of the present invention provide a data transmission method, a data transmission device, and a processor, so as to at least solve the technical problems of unstable data transmission network, poor data transmission efficiency, and low quality of BLE devices and base stations caused by movement of the BLE devices in the related art.
According to an aspect of an embodiment of the present invention, there is provided a data transmission method, including: when the BLE equipment moves, acquiring base station signal strength values of a current base station and a plurality of alternative base stations which establish data link with the BLE equipment; under the condition that the BLE equipment needs to switch the accessed base stations, determining the access priority of each alternative base station based on the base station signal strength value of each alternative base station; switching the BLE device to an alternative base station meeting the access condition based on the access priority of each alternative base station.
Optionally, when the BLE device moves, the obtaining base station signal strength values of a current base station and a plurality of candidate base stations that establish a data link with the BLE device includes: determining signal strength measurement values of the current base station and a plurality of alternative base stations, wherein the alternative base stations are base stations within a certain range around the current base station; and determining base station signal strength values of the current base station and a plurality of alternative base stations according to the signal strength measurement values.
Optionally, the determining, according to the signal strength measurement value, base station signal strength values of the current base station and a plurality of candidate base stations includes: determining base station signal strength values of the current base station and a plurality of alternative base stations according to the signal strength measurement values and an estimation formula, wherein the estimation formula is as follows:in the formula (I), wherein,t =1, 2, 3 … … for the base station signal strength value of the current base station or the alternative base station at time t;the measured value of the signal strength of the current base station or the alternative base station at the time t is obtained;to estimate the coefficients, 0<β<1。
Optionally, when it is determined that the BLE device needs to switch the base station to be accessed, before determining the access priority of each alternative base station based on the base station signal strength value of each alternative base station, the method includes: determining the base station signal strength values of the current base station and at least one alternative base station, and whether a threshold judgment condition is always met in a preset time period; under the condition that the signal strength values of the current base station and the base station of at least one alternative base station uniformly and directly meet a threshold judgment condition in a preset time period, determining the base station to which the BLE equipment needs to be switched and accessed; and under the condition that the current base station does not meet the threshold judgment condition within a preset time period or the base station signal strength values of a plurality of alternative base stations do not meet the threshold judgment condition, restarting to calculate the preset time period and re-determining the base station to which the BLE equipment needs to be switched.
Optionally, the threshold decision condition is as follows:in the formula (I), wherein,the base station signal strength value of the current base station is obtained;is a first decision threshold;the base station signal strength value of the alternative base station is obtained;a second decision threshold is determined.
Optionally, in the case that it is determined that the BLE device needs to switch the base station to be accessed, determining the access priority of each alternative base station based on the base station signal strength value of each alternative base station includes: determining alternative base stations of which the signal strength values meet the threshold judgment condition; taking the alternative base station with the available data link being not zero in the alternative base stations meeting the threshold judgment condition as a first candidate set; taking the alternative base stations adjacent to the current base station in the first candidate set as a first candidate subset, and taking the alternative base stations not adjacent to the current base station as a second candidate subset; sorting the candidate base stations of the first candidate subset and the second candidate subset according to the base station signal strength value; and combining the sorted first candidate subset and the sorted second candidate subset according to the sequence that the first candidate subset is in front of the second candidate subset, and generating a priority list of the access priority of the alternative base station.
Optionally, the switching the BLE device to the alternative base station that satisfies the access condition based on the access priority of each alternative base station includes: selecting a preset number of alternative base stations from the priority list as base stations to be switched; broadcasting and sending the Media Access Control (MAC) address of the base station to be switched to the preset number of alternative base stations through the BLE equipment; receiving a connection request sent by an alternative base station meeting the access condition, wherein the access condition is that the MAC address of the alternative base station is the same as the MAC address of the base station to be switched; and establishing data transmission connection with the alternative base station sending the connection request according to the connection request, and switching the current base station to the alternative base station sending the connection request.
According to another aspect of the embodiments of the present invention, there is provided a data transmission method, including: determining signal strength measurement values of a plurality of base stations in an operating area of a device with a BLE tag, wherein the plurality of base stations comprise a current base station which is currently in data transmission with the BLE tag and at least one alternative base station except the current base station in the operating area; determining base station signal strength values of the current base station and the alternative base station according to the signal strength measurement value; determining whether the equipment with the BLE label needs to switch the current base station or not according to the base station signal strength values of the current base station and the alternative base station; and under the condition that the handover is determined to be needed, switching the equipment with the BLE label into the alternative base station, wherein the switched alternative base station carries out data transmission with the equipment with the BLE label.
Optionally, the determining, according to the base station signal strength values of the current base station and the alternative base station, whether the device with the BLE tag needs to switch the current base station includes: determining the base station signal strength values of the current base station and the alternative base station, and whether a threshold judgment condition is always met in a preset time period; and under the condition that the signal strength values of the current base station and the alternative base station uniformly meet a threshold judgment condition in a preset time period, determining that the equipment with the BLE label needs to switch the current base station.
Optionally, switching the device with the BLE tag to access the alternative base station when it is determined that handover is needed includes: determining the number of alternative base stations meeting the threshold judgment condition; under the condition that the number is one, directly switching the current base station to an alternative base station meeting the threshold judgment condition; when the number of the candidate base stations is multiple, sequencing the candidate base stations according to a preset sequencing condition, and determining a priority list of access priorities of the candidate base stations; and switching the equipment with the BLE label to access an alternative base station according to the priority list.
Optionally, when the number is multiple, the step of sorting the multiple candidate base stations according to a preset sorting condition, and determining the priority list of the access priorities of the multiple candidate base stations includes: taking an alternative base station with an available data link being not zero as a first candidate set; taking the alternative base stations adjacent to the current base station in the first candidate set as a first candidate subset, and taking the alternative base stations not adjacent to the current base station as a second candidate subset; sorting a plurality of candidate base stations of the first candidate subset and the second candidate subset according to the base station signal strength values; and combining the sorted first candidate subset and the sorted second candidate subset according to the sequence that the first candidate subset is in front of the second candidate subset, so as to generate the priority list of the plurality of candidate base stations.
Optionally, the switching, according to the priority list, the device with a BLE tag to access the alternative base station includes: selecting a preset number of alternative base stations from the priority list as base stations to be switched; broadcasting and sending the Media Access Control (MAC) address of the base station to be switched to a plurality of alternative base stations through the equipment with the BLE label; receiving a connection request sent by an alternative base station with the same MAC address as that of the base station to be switched; establishing data transmission connection with the alternative base station sending the connection request according to the connection request, and switching the current base station into the alternative base station sending the connection request; and performing data transmission for the equipment with the BLE label through the alternative base station sending the connection request.
According to another aspect of the embodiments of the present invention, there is provided a data transmission apparatus, including: the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring base station signal strength values of a current base station and a plurality of alternative base stations which establish data link with BLE equipment when the BLE equipment moves; a first determining module, configured to determine, based on a base station signal strength value of each alternative base station, an access priority of each alternative base station when it is determined that the BLE device needs to switch an access base station; a first handover module, configured to handover the BLE device to an alternative base station that meets an access condition based on the access priority of each alternative base station.
Optionally, the obtaining module includes: a first determining unit, configured to determine signal strength measurement values of the current base station and multiple candidate base stations, where the candidate base stations are base stations within a certain range around the current base station; and the second determining unit is used for determining the base station signal strength values of the current base station and a plurality of alternative base stations according to the signal strength measurement values.
Optionally, the second determining unit includes: a determining subunit, configured to determine base station signal strength values of the current base station and a plurality of candidate base stations according to the signal strength measurement value and an estimation formula, where the estimation formula is as follows:in the formula (I), wherein,t =1, 2, 3 … … for the base station signal strength value of the current base station or the alternative base station at time t;the measured value of the signal strength of the current base station or the alternative base station at the time t is obtained;to estimate the coefficients, 0<<1。
According to another aspect of the embodiments of the present invention, there is provided a data transmission apparatus, including: a measurement module, configured to determine signal strength measurement values of a plurality of base stations in an operating area where a device with a BLE tag is located, where the plurality of base stations include a current base station currently performing data transmission with the BLE tag and at least one alternative base station other than the current base station in the operating area; a second determining module, configured to determine base station signal strength values of the current base station and the alternative base station according to the signal strength measurement value; an estimating module, configured to determine whether the device with the BLE tag needs to switch the current base station according to base station signal strength values of the current base station and the alternative base station; and a second handover module, configured to, under a condition that it is determined that handover is needed, handover the device with the BLE tag to access the alternative base station, where the handed over alternative base station performs data transmission with the device with the BLE tag.
Optionally, the estimating module includes: an estimating unit, configured to determine base station signal strength values of the current base station and the candidate base station, and determine whether a threshold decision condition is always satisfied within a preset time period; a third determining unit, configured to determine that the BLE tag needs to switch the current base station when the base station signal strength values of the current base station and the candidate base station uniformly meet a threshold decision condition within a preset time period.
According to another aspect of the embodiments of the present invention, there is provided a computer storage medium, where the computer storage medium includes a stored program, and when the program runs, the apparatus on which the computer storage medium is located is controlled to execute the data transmission method described in any one of the above.
According to another aspect of the embodiments of the present invention, there is provided a processor, configured to execute a program, where the program executes to perform the data transmission method described in any one of the above.
In the embodiment of the invention, when the BLE equipment moves, the signal intensity values of the current base station and a plurality of alternative base stations which establish data link with the BLE equipment are obtained; under the condition that the BLE equipment needs to switch the accessed base stations, determining the access priority of each alternative base station based on the base station signal strength value of each alternative base station; based on the access priority of each alternative base station, the method for switching the BLE equipment to the alternative base station meeting the access condition determines the priority of the plurality of alternative base stations by determining the base station signal intensity values of the plurality of base stations in the preset range of the label, including the current base station and the plurality of alternative base stations, and under the condition that the BLE equipment needs to switch the accessed base station, the BLE equipment is switched to the alternative base station meeting the access condition according to the priority of the plurality of alternative base stations, so that the aim of switching the current base station to the alternative base station for the BLE equipment to transmit data is fulfilled under the condition that the BLE equipment needs to switch the accessed current base station, the technical effects of ensuring the data transmission quality and the data transmission efficiency of the BLE equipment are achieved, and the problem that the data transmission network of the BLE equipment and the base stations is unstable due to movement of the BLE equipment in the related technology is solved, the data transmission efficiency is poor, and the quality is low.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart of a method of data transmission according to an embodiment of the present invention;
FIG. 2 is a flow chart of another method of data transmission according to an embodiment of the present invention;
FIG. 3 is a flow chart of another method of data transmission according to an embodiment of the present invention;
FIG. 4 is a flow chart of another method of data transmission according to an embodiment of the present invention;
FIG. 5 is a flow chart of another method of data transmission according to an embodiment of the present invention;
FIG. 6 is a flow chart of another method of data transmission according to an embodiment of the present invention;
figure 7 is a flow chart of a BLE data link handover method according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of a data transmission apparatus according to an embodiment of the present invention;
fig. 9 is a schematic diagram of another data transmission apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In accordance with an embodiment of the present invention, there is provided a method embodiment of a data transmission method, it being noted that the steps illustrated in the flowchart of the figure may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order different than that presented herein.
Fig. 1 is a flowchart of a data transmission method according to an embodiment of the present invention, and as shown in fig. 1, according to an aspect of the embodiment of the present invention, there is provided a data transmission method, including the following steps:
step S102, when the BLE equipment moves, obtaining base station signal strength values of a current base station and a plurality of alternative base stations which establish data link with the BLE equipment;
step S104, under the condition that the BLE equipment needs to switch the accessed base stations, determining the access priority of each alternative base station based on the base station signal intensity value of each alternative base station;
and step S106, switching the BLE equipment to the alternative base station meeting the access condition based on the access priority of each alternative base station.
Through the steps, when the BLE equipment moves, the signal intensity values of the current base station and a plurality of alternative base stations which establish data link with the BLE equipment are obtained; under the condition that the BLE equipment needs to switch the accessed base stations, determining the access priority of each alternative base station based on the base station signal strength value of each alternative base station; based on the access priority of each alternative base station, the method for switching the BLE equipment to the alternative base station meeting the access condition determines the priority of the plurality of alternative base stations by determining the base station signal intensity values of the plurality of base stations in the preset range of the label, including the current base station and the plurality of alternative base stations, and under the condition that the BLE equipment needs to switch the accessed base station, the BLE equipment is switched to the alternative base station meeting the access condition according to the priority of the plurality of alternative base stations, so that the aim of switching the current base station to the alternative base station for the BLE equipment to transmit data is fulfilled under the condition that the BLE equipment needs to switch the accessed current base station, the technical effects of ensuring the data transmission quality and the data transmission efficiency of the BLE equipment are achieved, and the problem that the data transmission network of the BLE equipment and the base stations is unstable due to movement of the BLE equipment in the related technology is solved, the data transmission efficiency is poor, and the quality is low.
In the related technology, in an application scenario of networking by using a fusion BLE module of a base station device, when a BLE device establishes data connection with a current base station within a coverage range of the networking, if the BLE device moves along with time, during the moving process, the BLE tag of the BLE device may gradually get away from the connected current base station device, and the link signal quality of the BLE tag and the connected base station may gradually deteriorate, which affects the quality of data transmission; meanwhile, the base station device approaches to another adjacent base station device gradually, namely, the signal-to-tag quality of the adjacent base station device is better and better. In addition, if the data transmission link is not switched for a long time, the BLE device may have poor communication quality or cause load imbalance. However, if the communication quality of the neighboring alternative base station is still not satisfactory, the handover to the alternative base station still cannot effectively improve the communication quality of the BLE device, and the network of the whole network may be unstable due to an unreasonable data transmission link handover strategy.
Therefore, in this embodiment, the access priority of each candidate base station is determined by determining the base station signal strength values of the current base station and the multiple candidate base stations, and the candidate base station that meets the access condition is selected according to the access priority when the base station that the BLE device needs to switch to access is determined. Therefore, the purpose that the current base station is switched to the alternative base station to perform data transmission on the BLE equipment under the condition that the BLE equipment needs to switch the accessed current base station is achieved, the data transmission stability of the BLE equipment is guaranteed, the data transmission quality and the data transmission efficiency of the BLE equipment are guaranteed, and the technical problems that the data transmission network of the BLE equipment and the base station is unstable, the data transmission efficiency is poor and the quality is low due to movement of the BLE equipment in the related technology are solved.
The alternative base station is a base station within a certain range around the current base station, the alternative base station may be a base station within a working area of a BLE tag of the BLE device, the working area of the BLE tag may be a range determined empirically, or a working area determined according to actual conditions, and the working area may include a plurality of base stations, may include the current base station, and a plurality of alternative base stations.
Fig. 2 is a flowchart of another data transmission method according to an embodiment of the present invention, as shown in fig. 2, optionally, step S102, when the BLE device moves, obtaining base station signal strength values of a current base station and a plurality of candidate base stations that establish a data link with the BLE device, includes:
step S202, determining signal strength measurement values of a current base station and a plurality of alternative base stations, wherein the alternative base stations are base stations in a certain range around the current base station;
and step S204, determining the signal strength values of the current base station and a plurality of alternative base stations according to the signal strength measurement values.
In an actual data transmission environment, the environmental conditions are complicated, for example, errors of the signal strength measurement device, or blocking, fading, and signal interference of other obstacles, and signal fluctuations all cause instability and inaccuracy of the signal strength test, and therefore, in this embodiment, the signal strengths of the current base station and the multiple candidate base stations may be measured first to obtain signal strength measurement values, and the base station signal strength values of the current base station and the multiple candidate base stations under the condition of eliminating the signal interference and fluctuation are determined through the signal strength measurement values to determine the true signal strength of the base station under the condition of eliminating the signal interference and fluctuation.
Optionally, determining the base station signal strength values of the current base station and the multiple candidate base stations according to the signal strength measurement value includes: determining base station signal strength values of the current base station and a plurality of alternative base stations according to the signal strength measurement values and an estimation formula, wherein the estimation formula is as follows:in the formula (I), wherein,t =1, 2, 3 … … for the base station signal strength value of the current base station or the alternative base station at time t;the measured value of the signal strength of the current base station or the alternative base station at the time t is obtained;to estimate the coefficients, 0<β<1。
And the signal strength value of the current base station or the alternative base station at the time t-1 is obtained. The beta value can be adjusted according to the actual situation, so that the smoothness degree of the base station signal intensity value to the trend of the signal intensity measured value is adjusted, the base station signal intensity value can obtain a good smoothing effect, and the change situation of a channel can be reflected in time. For example, the β value may be set to 0.9, which corresponds to an observation value smoothed 10 times. And estimating the signal strength values of the current base station and the alternative base station according to the estimation formula.
Optionally, when it is determined that the BLE device needs to switch the access base station, before determining the access priority of each candidate base station based on the base station signal strength value of each candidate base station, the method includes: determining the base station signal strength values of a current base station and at least one alternative base station, and whether a threshold judgment condition is always met in a preset time period; under the condition that the signal strength values of the current base station and at least one alternative base station uniformly and directly meet a threshold judgment condition in a preset time period, determining the base station to which BLE equipment needs to be switched; and under the condition that the current base station does not meet the threshold judgment condition within the preset time period or the base station signal strength values of a plurality of alternative base stations do not meet the threshold judgment condition, restarting to calculate the preset time period and determining the base station which needs to be switched and accessed by the BLE equipment.
Under the condition that the threshold judgment condition is always met in the preset time period, the fact that the label needs to be switched to the current base station is determined, and misjudgment caused by signal intensity fluctuation due to signal fluctuation and environmental change in the BLE equipment moving process is effectively avoided.
Once the signal intensity measured value of the current base station is detected, under the condition that the determined signal intensity estimated value does not meet the threshold judgment condition, the calculation of the preset time period is restarted, the judgment accuracy and the stability of the signal intensity of the current base station are ensured, and the problem that the data transmission efficiency of the BLE equipment is poor due to frequent base station switching caused by misjudgment is solved.
When determining whether the BLE equipment needs to switch the accessed base station, the signal intensity of the base station of the current base station does not meet the communication requirement, and the signal intensity of the base station of the switched alternative base station meets the communication requirement, so that the BLE equipment is ensured to realize the purpose of improving the communication quality by switching the alternative base station.
Optionally, the threshold decision condition is as follows:in the formula (I), wherein,the base station signal strength value of the current base station;is a first decision threshold;a base station signal strength value of the alternative base station;a second decision threshold is determined.
Determining whether the BLE equipment needs to switch the current base station or not according to the base station signal strength values of the current base station and the alternative base station; the base station signal strength value of the current base station may be smaller than the first decision threshold, so as to determine that the data transmission stability and quality of the current base station cannot meet the requirements, and the base station signal strength value of the alternative base station is larger than the second decision threshold, so as to determine that the alternative base station can ensure the data transmission stability and quality.
The two threshold values may be set according to the actual networking deployment situation and the actual networking policy requirement, for example, the first decision threshold may be set to-55 dBm, and the second decision threshold may be set to-50 dBm. By reasonably setting the values of the two judgment thresholds, not only can frequent link switching be avoided, the stability of the network be ensured as much as possible, but also the BLE label can select a more reasonable link for data communication.
Fig. 3 is a flowchart of another data transmission method according to an embodiment of the present invention, as shown in fig. 3, optionally, in step S104, in the case that it is determined that the BLE device needs to switch the base station for access, determining the access priority of each alternative base station based on the base station signal strength value of each alternative base station includes:
step S302, determining alternative base stations with base station signal strength values meeting threshold judgment conditions;
step S304, using the alternative base station with non-zero available data link in the alternative base stations meeting the threshold decision condition as a first candidate set;
step S306, taking the alternative base station adjacent to the current base station in the first candidate set as a first candidate subset and taking the alternative base station not adjacent to the current base station as a second candidate subset;
step S308, sorting the alternative base stations of the first candidate subset and the second candidate subset according to the signal intensity value of the base station;
step S310, according to the sequence that the first candidate subset is in front of the second candidate subset, combining the sorted first candidate subset and the sorted second candidate subset to generate a priority list of the access priority of the alternative base station.
The number of the alternative base stations is multiple, the number of the alternative base stations meeting the threshold decision condition may also be multiple, and the current base station is directly switched to the alternative base station under the condition that the BLE device needs to be switched to the access base station under the condition that the number of the alternative base stations meeting the threshold decision condition is one. When the number of candidate base stations satisfying the threshold decision condition is multiple, the multiple candidate base stations need to be sorted according to various attribute parameters of the multiple candidate base stations, such as base station signal strength, available data link number, and flag bits, and an access priority list of the multiple candidate base stations is determined. According to the priority list, determining alternative base stations for switching according to the sequence of the priority from high to low, and performing data transmission on BLE equipment through the alternative base stations after switching.
Specifically, when switching the alternative base stations according to the priority list, switching may be performed according to the order in the priority list, and the alternative base station with the highest priority in the priority list is switched each time. To ensure that the communication quality of the BLE device is optimized to the greatest extent.
Optionally, based on the access priority of each alternative base station, switching the BLE device to the alternative base station that satisfies the access condition includes: selecting a preset number of alternative base stations from the priority list as base stations to be switched; broadcasting and sending the Media Access Control (MAC) address of the base station to be switched to a preset number of alternative base stations through BLE equipment; receiving a connection request sent by an alternative base station meeting an access condition, wherein the access condition is that the MAC address of the alternative base station is the same as the MAC address of the base station to be switched; and establishing data transmission connection with the alternative base station sending the connection request according to the connection request, and switching the current base station to the alternative base station sending the connection request.
In accordance with an embodiment of the present invention, there is provided another method embodiment of a data transmission method, it should be noted that the steps illustrated in the flowchart of the figure may be performed in a computer system, such as a set of computer executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than that presented herein.
Fig. 4 is a flowchart of another data transmission method according to an embodiment of the present invention, and as shown in fig. 4, according to an aspect of the embodiment of the present invention, there is provided a data transmission method, including the following steps:
step S402, determining signal strength measurement values of a plurality of base stations in an operating area of a device with a BLE label, wherein the plurality of base stations comprise a current base station which is currently in data transmission with the BLE label and at least one alternative base station except the current base station in the operating area;
step S404, determining base station signal strength values of the current base station and the alternative base station according to the signal strength measurement value;
step S406, determining whether the equipment with the BLE label needs to switch the current base station or not according to the base station signal strength values of the current base station and the alternative base station;
step S408, switching the device with the BLE tag into the alternative base station when it is determined that the handover is required, wherein the switched alternative base station performs data transmission with the device with the BLE tag.
Through the steps, signal strength measurement values of a plurality of base stations in an operating area of the device with the BLE tag are determined, wherein the plurality of base stations comprise a current base station which is currently in data transmission with the BLE tag and at least one alternative base station except the current base station in the operating area; determining base station signal strength values of the current base station and the alternative base station according to the signal strength measurement value; determining whether equipment with a BLE label needs to switch the current base station or not according to the base station signal strength values of the current base station and the alternative base station; under the condition that the switching is determined to be needed, switching equipment with a BLE label to access an alternative base station, wherein the switched alternative base station and the equipment with the BLE label perform data transmission in a mode of determining base station signal intensity values of a plurality of base stations within a preset range of the label, including a current base station and the plurality of alternative base stations, determining priorities of the plurality of alternative base stations, and under the condition that the BLE equipment needs to switch the accessed base station, selecting and switching to the alternative base station meeting the access condition according to the priorities of the plurality of alternative base stations, so that the purpose that the current base station is switched to the alternative base station to perform data transmission for the BLE equipment under the condition that the BLE equipment needs to switch the accessed current base station is achieved, and the technical effects of ensuring the data transmission quality and the data transmission efficiency of the BLE equipment are achieved, and then the technical problems that the BLE equipment in the related technology moves, so that the data transmission network of the BLE equipment and the base station is unstable, the data transmission efficiency is poor and the quality is low are solved.
The device with the BLE tag can be the BLE device, and can also be a device with BLE function and provided with a BLE module, the predetermined range of the operating region may be a range of base stations that perform stable data transmission with a device having a BLE tag and guarantee the quality of data transmission, may be an empirically determined range, or a predetermined range determined based on actual conditions, within the predetermined range, a plurality of base stations may be included, a current base station and a plurality of alternatives may be included that are currently in data transmission with the BLE tagged device, and an alternative base station except the current base station within a predetermined range, the more distant the device with the BLE tag is from the first current base station as the device with the BLE tag moves, the data transmission stability and data quality may gradually decrease, the closer to the other second alternative base stations, the data transmission stability and data order will gradually increase.
In an actual data transmission environment, the environmental conditions are complicated, for example, errors of a signal strength measurement device, or occlusion, fading of other obstacles, and signal interference, signal fluctuation all cause instability and inaccuracy of the signal strength test, and therefore, in the present embodiment, the signal strength values of the current base station and the alternative base station under the condition of eliminating the signal interference and fluctuation are determined through the signal strength measurement values to estimate the true signal strength of the base station under the condition of eliminating the signal interference and fluctuation, so as to improve the accuracy of the signal strength of the current base station and the alternative base station.
Determining whether equipment with a BLE label needs to switch the current base station or not according to the base station signal strength value of the current base station and the base station signal strength value of the alternative base station; the base station signal strength value of the current base station may be smaller than the first decision threshold, so as to determine that the data transmission stability and quality of the current base station cannot meet the requirements, and the base station signal strength value of the switched alternative base station is larger than the second decision threshold, so as to determine that the alternative base station can ensure the data transmission stability and quality.
And under the condition that the equipment with the BLE label needs to switch the current base station, switching the current base station to an alternative base station for data transmission. Therefore, the current base station which can not meet the data transmission stability and quality is switched to the alternative base station which can guarantee the data transmission stability and quality, the aim of switching the current base station to the alternative base station to transmit data for the equipment with the BLE label under the condition that the current base station needs to be switched is achieved, the stability of the equipment data transmission of the BLE label is guaranteed, the technical effects of guaranteeing the data transmission quality and the data transmission efficiency are achieved, and the technical problems that the BLE equipment in the related technology moves, the data transmission network of the BLE equipment and the base station is unstable, the data transmission efficiency is poor and the quality is low are solved.
Optionally, determining the signal strength values of the current base station and the candidate base station according to the signal strength measurement value includes: and determining the signal strength values of the current base station and the alternative base station according to the signal strength measurement values through an estimation formula, wherein the estimation formula is as follows:in the formula (I), wherein,t =1, 2, 3 … … for the base station signal strength value of the current base station or the alternative base station at time t;the measured value of the signal strength of the current base station or the alternative base station at the time t is obtained; beta is an estimation coefficient, 0<β<1。
Is the current base station orBase station signal strength value of the alternative base station at time t-1. The beta value can be adjusted according to the actual situation, so that the smoothness degree of the base station signal intensity value to the trend of the signal intensity measured value is adjusted, the base station signal intensity value can obtain a good smoothing effect, and the change situation of a channel can be reflected in time. For example, the β value may be set to 0.9, which corresponds to an observation value smoothed 10 times. And estimating the signal strength values of the current base station and the alternative base station according to the estimation formula.
Fig. 5 is a flowchart of another data transmission method according to an embodiment of the present invention, and as shown in fig. 5, optionally, the step S406 of determining whether the device with the BLE tag needs to handover the current base station according to the base station signal strength values of the current base station and the alternative base station includes:
step S502, determining the signal intensity values of the current base station and the alternative base station, and whether the signal intensity values meet the threshold judgment condition in a preset time period;
step S504, under the condition that the signal intensity values of the current base station and the base station of the alternative base station uniformly meet the threshold judgment condition in the preset time period, determining that the equipment with the BLE label needs to switch the current base station.
Under the condition that the threshold judgment condition is always met in the preset time period, the fact that the label needs to be switched to the current base station is determined, and misjudgment caused by signal intensity fluctuation due to signal fluctuation and environmental change in the label moving process is effectively avoided.
Optionally, the method further includes: and under the condition that the current base station does not meet the threshold judgment condition within the preset time period or the base station signal strength values of a plurality of alternative base stations do not meet the threshold judgment condition, restarting to calculate the preset time period, and re-determining whether the equipment with the BLE label needs to switch the current base station.
Once the signal intensity measured value of the current base station is detected, under the condition that the determined signal intensity estimated value does not meet the threshold judgment condition, the preset time period is calculated again, the judgment accuracy and stability of the signal intensity of the current base station are ensured, and the problem that the data transmission efficiency of the label is poor due to frequent base station switching caused by misjudgment is solved.
Optionally, the threshold decision condition is as follows:in the formula (I), wherein,the base station signal strength value of the current base station;is a first decision threshold;a base station signal strength value of the alternative base station;a second decision threshold is determined, wherein,。
the two threshold values may be set according to the actual networking deployment situation and the actual networking policy requirement, for example, the first decision threshold may be set to-55 dBm, and the second decision threshold may be set to-50 dBm. By reasonably setting the values of the two judgment thresholds, not only can frequent link switching be avoided, the stability of the network be ensured as much as possible, but also the equipment with the BLE label can select a more reasonable link for data communication.
Fig. 6 is a flowchart of another data transmission method according to an embodiment of the present invention, and as shown in fig. 6, optionally, in step S408, in case that it is determined that handover is required, switching the device with the BLE tag to access the alternative base station includes:
step S602, determining the number of alternative base stations meeting the threshold judgment condition;
step S604, under the condition that the number is one, directly switching the current base station to an alternative base station meeting the threshold judgment condition;
step S606, under the condition of a plurality of candidate base stations, the candidate base stations are sequenced according to preset sequencing conditions, and a priority list of access priorities of the candidate base stations is determined;
and step S608, switching the equipment with the BLE label to access the alternative base station according to the priority list.
The number of the candidate base stations is multiple, and the number of the candidate base stations meeting the threshold decision condition may also be multiple, and when the number of the candidate base stations meeting the threshold decision condition is multiple, the multiple candidate base stations need to be sorted according to various attribute parameters of the multiple candidate base stations, such as base station signal strength, available data link number, and flag bits, so as to determine a priority list of access priorities of the multiple candidate base stations. And according to the priority list, determining alternative base stations for switching according to the sequence of the priority from high to low, and performing data transmission by taking the switched alternative base stations as tags.
Optionally, when the number of the candidate base stations is multiple, the multiple candidate base stations are ranked according to a preset ranking condition, and determining the priority list of the access priorities of the multiple candidate base stations includes: taking an alternative base station with an available data link being not zero as a first candidate set; in the first candidate set, the candidate base stations adjacent to the current base station are used as a first candidate subset, and the candidate base stations not adjacent to the current base station are used as a second candidate subset; sorting a plurality of candidate base stations of the first candidate subset and the second candidate subset according to the base station signal strength values; and combining the sorted first candidate subset and the sorted second candidate subset according to the sequence that the first candidate subset is in front of the second candidate subset, and generating a priority list of a plurality of candidate base stations.
The candidate set uses the MAC address as the identity of the neighboring base station, and includes the RSSI estimation value of each base station and a Flag bit (i.e., Flag = True or False) of whether the RSSI estimation value is the base station in the neighbor list of the current base station.
The screening and prioritization criteria for alternative base stations are as follows, namely
1) Firstly, the equipment with the BLE label utilizes the number of available links to screen base stations, namely, the base stations with the number of available links of zero are removed out of a candidate set, and the remaining base stations form a first candidate set;
2) secondly, the device with the BLE tag divides the first candidate set into two sets, namely a nearest neighbor candidate set (equivalent to the first candidate subset) and a non-nearest neighbor candidate set (equivalent to the second candidate subset), by using the neighbor relation list and the flag bits in the first candidate set;
3) thirdly, the equipment with the BLE tag respectively ranks the base stations in the first candidate subset and the second candidate subset from high to low by utilizing the RSSI estimated value of the adjacent base station, namely the signal strength value of the base station;
4) finally, the two sorted sets are merged into a priority list, with the first candidate subset being before and the second candidate subset being after.
Through the steps, the screening and the priority ranking of the base stations can be completed.
Optionally, switching the device with the BLE tag to access the alternative base station according to the priority list includes: selecting a preset number of alternative base stations from the priority list as base stations to be switched; broadcasting and sending the Media Access Control (MAC) address of the base station to be switched to a preset number of alternative base stations through equipment with BLE labels; receiving a connection request sent by an alternative base station with the same MAC address as that of a base station to be switched; establishing data transmission connection with the alternative base station sending the connection request according to the connection request, and switching the current base station into the alternative base station sending the connection request; and carrying out data transmission for the equipment with the BLE label through the alternative base station sending the connection request.
Optionally, establishing a data transmission connection with the alternative base station that sends the connection request according to the connection request, and switching the current base station to the alternative base station that sends the connection request includes: according to the connection request, the equipment with the BLE label and the alternative base station sending the connection request establish data transmission connection; under the condition that the device with the BLE label and the alternative base station sending the connection request are determined to be successfully connected in a data transmission mode, the device with the BLE label is disconnected in the data transmission mode with the current base station; and switching the current base station to the alternative base station for sending the connection request.
For example, the BLE tag selects 1 or more suitable base stations from the priority list of the base stations, and broadcasts the MAC (media access control address) address of the selected BLE base station to the peripheral base stations; after receiving the broadcast of the BLE label, the peripheral base station initiates a connection request to the BLE label if finding that the MAC address of the peripheral base station is consistent with the MAC address of the peripheral base station. And after the BLE label establishes a link with a new base station, disconnecting the old link.
This embodiment also provides an alternative embodiment, which is described in detail below.
The embodiment provides a method for switching a BLE data link based on connection, which can effectively solve the mobility problem and the network stability problem of equipment with a BLE label.
The method of the embodiment designs a reasonable broadcasting mechanism so as to select a proper link connection target and ensure the reasonability of link switching; a reasonable RSSI filtering mechanism is designed, so that frequent link switching caused by severe signal fluctuation is avoided; and selecting proper BLE networking equipment for link switching, ensuring the quality of a data transmission channel of equipment with a BLE label in the moving process, and reducing the packet loss rate.
By the embodiment, the device with the BLE label can select a proper target base station to perform link switching connection in the moving process. Meanwhile, through a reasonable filtering mechanism and a target base station priority selection mechanism, frequent link switching of equipment with a BLE label can be avoided as much as possible, and the stability of the whole network is ensured.
The present embodiment provides a BLE data link handover method under networking, and fig. 7 is a flowchart of the BLE data link handover method according to the embodiment of the present invention, as shown in fig. 7, specifically including:
step 1: the equipment with the BLE label acquires information such as an MAC address, the number of available links, a neighbor relation list and the like of a current base station and base station signal strength values (RSSI) of the current base station and surrounding base stations in a broadcasting mode.
Specifically, the device with the BLE tag is connected, and the current base station sends, in a broadcast manner, to the device with the BLE tag, a MAC address carrying the current base station, the number of remaining link channels that can be used for the device with the BLE tag to access, and data of the neighbor relation table in response to a request broadcasted by the device with the BLE tag;
preferentially, the adjacent area relation table records identification information, such as MAC addresses, of alternative base stations around the current base station, so that equipment with BLE labels can conveniently judge adjacent areas of the current base station, and prior information is provided for subsequent link switching;
specifically, the RSSI (Received Signal Strength Indication) of the base station Signal Strength of the current base station and its alternative base station is obtained by the equipment with BLE tag by receiving data packet or measuring Signal Strength during broadcasting.
Step 2: and the equipment with the BLE label judges the switching of the data transmission link, and screens and prioritizes the peripheral base stations meeting the requirements.
21: after obtaining the relevant information of the current base station and the peripheral alternative base stations, the equipment with the BLE label firstly performs a decision process of data transmission link switching, wherein the relevant information comprises an MAC address, identification information, the number of available link channels and the like.
In particular, the decision strategy is as follows, namely
1) Firstly, the device with the BLE tag performs smooth filtering on the measured signal strength value by using a related smoothing filter, determines the base station signal strength values of the current base station and the alternative base station, and avoids misjudgment caused by signal fluctuation introduced by measurement or other shielding, fading, interference and the like.
Preferably, an exponentially weighted moving average scheme may be employed, i.e.
specifically, the β value can be adjusted according to the actual situation, so as to adjust the smoothness of the base station signal strength value to the trend of the signal strength measurement value, so that the base station signal strength value can obtain a good smoothing effect, and can reflect the change condition of the channel in time. For example, the β value may be set to 0.9, which corresponds to an observation value smoothed 10 times.
2) Secondly, the device with the BLE tag can realize the decision whether the current device with the BLE tag needs to switch the link or not by using the signal strength value of the base station and combining the link switching strategy.
Preferably, the specific link switching strategy is as follows, namely
2a) First, after the device with BLE tag obtains the signal strength value of the base station, a link handover decision timer (named as changejoinmenttimer for convenience of description) is started.
Preferably, the link switching decision timer can be set to a suitable value according to actual needs, such as 500ms, 1000ms …, and the like.
2b) Secondly, before the changejoinmenttimer is overtime, if the signal strength values of the current base station and the base station of the alternative base station always meet the threshold judgment strategy, entering the step 3, namely entering a data transmission link switching process; if the signal strength values of the current base station and the alternative base station do not meet the threshold decision strategy once, resetting the changejoinmenttimer to 0, namely restarting timing.
Preferably, the threshold decision strategy can be implemented in such a way that
Wherein,representing a base station signal strength value of a BLE label current base station;a base station signal strength value representing an alternative base station adjacent to the current base station;
Specifically, the setting of the two threshold values may be set according to the actual networking deployment situation and the actual networking policy requirement, for example, the first decision threshold may be set Setting a second decision threshold to-55 dBm Was-50 dBm. By reasonably setting the values of the two judgment thresholds, not only can frequent link switching be avoided, namely, the stability of the network is ensured as much as possible, but also the equipment with the BLE label can select a more reasonable link for data communication.
22: and under the condition that the alternative base stations meeting the link switching strategy exist, putting the corresponding alternative base stations into a candidate set AnchorCandidateSet, and entering a process of screening and priority ranking of the alternative base stations.
Preferably, the candidate set uses the MAC address as the identity of the neighboring base station, and includes the base station signal strength value of each candidate base station and whether the candidate base station is the Flag bit (i.e., Flag = True or False) of the base station in the neighbor list of the current base station.
Preferably, the screening and prioritization criteria for the base stations are as follows, i.e.
1) Firstly, screening alternative base stations by using the number of available links by equipment with a BLE label, namely removing a candidate set (AnchorCandidateset) from the alternative base stations with the number of available links of zero;
2) secondly, the equipment with the BLE label divides the candidate set into two sets by using a neighbor relation list and a Flag bit (Flag) in the candidate set, namely a nearest neighbor candidate set (named AnchorCandidateSet _ A for convenience of description) and a non-nearest neighbor candidate set (named AnchorCandidateSet _ B for convenience of description);
3) thirdly, the equipment with the BLE tag sorts the alternative base stations in the AnchorCandidateSet _ A set and the AnchorCandidateSet _ B set from high to low by using the base station signal strength values of the alternative base stations respectively;
4) finally, the two sorted sets are merged into a priority list, NewAnchorCandidateSet, with the AnchorCandidateSet set preceding and the AnchorCandidateSet _ B set succeeding.
Through the steps, screening and priority ranking of the alternative base stations can be completed.
And step 3: the device with BLE tag performs a data transmission link switching procedure.
31: the equipment with the BLE label selects 1 or more than 1 suitable alternative base station from the priority list, and broadcasts the MAC address of the selected alternative base station to the peripheral alternative base stations;
32: after receiving the broadcast of the device with the BLE tag, the peripheral standby base stations initiate a connection request to the device with the BLE tag if finding that the MAC address of the peripheral standby base stations is consistent with the MAC address of the local base station.
33: after the device with the BLE label establishes a link with a new alternative base station, an old link connected with the current base station is disconnected.
Basic information used for link switching of the device with the BLE tag in this embodiment may include, for example, an MAC address, the number of available links, a neighbor list, and the like; link switching judgment strategies of equipment with BLE labels, and base station screening and priority sorting methods; and link switching process of the BLE label.
This embodiment can be applied to wisdom building site, building machine, robot field. The method can also be applied to BLE networking scenes, and BLE label long-connection mobile application scenes.
Fig. 8 is a schematic diagram of a data transmission apparatus according to an embodiment of the present invention, and as shown in fig. 8, according to an embodiment of the present invention, there is provided a data transmission apparatus including: an acquisition module 82, a first determination module 84, and a first switching module 86, which are described in detail below.
An obtaining module 82, configured to obtain base station signal strength values of a current base station and multiple candidate base stations that establish a data link with a BLE device when the BLE device moves; a first determining module 84, connected to the obtaining module 82, configured to determine, based on a base station signal strength value of each candidate base station, an access priority of each candidate base station when it is determined that the BLE device needs to switch an access base station; a first handover module 86, connected to the first determining module 84, is configured to handover the BLE device to an alternative base station that satisfies the access condition based on the access priority of each alternative base station.
By the above device, when the BLE device moves, the obtaining module 82 is adopted to obtain the base station signal strength values of the current base station and a plurality of alternative base stations which establish data link with the BLE device; the first determining module 84 determines, based on the base station signal strength value of each alternative base station, an access priority of each alternative base station when it is determined that the BLE device needs to switch the base station to be accessed; the first switching module 86 determines the priority of the plurality of candidate base stations by determining the base station signal strength values of the plurality of base stations within the predetermined range of the tag based on the access priority of each candidate base station, including the current base station and the plurality of candidate base stations, and under the condition that the BLE device needs to switch the accessed base station, selects and switches to the candidate base station meeting the access condition according to the priority of the plurality of candidate base stations, so as to achieve the purpose that the current base station is switched to the candidate base station for the BLE device to perform data transmission under the condition that the BLE device needs to switch the accessed current base station, thereby ensuring the stability of data transmission of the BLE device, ensuring the data transmission quality and the data transmission efficiency of the BLE device, and further solving the problem that the BLE device in the related technology moves, the technical problems that a data transmission network of BLE equipment and a base station is unstable, the data transmission efficiency is poor and the quality is low are caused.
Optionally, the obtaining module includes: the first determining unit is used for determining signal strength measurement values of a current base station and a plurality of alternative base stations, wherein the alternative base stations are base stations in a certain range around the current base station; and the second determining unit is used for determining the base station signal strength values of the current base station and the plurality of alternative base stations according to the signal strength measured values.
Optionally, the second determining unit includes: a determining subunit, configured to determine base station signal strength values of the current base station and the multiple candidate base stations according to the signal strength measurement value and an estimation formula, where the estimation formula is as follows: in the formula (I), wherein, t =1, 2, 3 … … for the base station signal strength value of the current base station or the alternative base station at time t; the measured value of the signal strength of the current base station or the alternative base station at the time t is obtained; to estimate the coefficients, 0< <1。
Optionally, the method further includes: the judging module is used for determining the base station signal strength values of the current base station and at least one alternative base station and judging whether the threshold judging condition is always met in a preset time period; the third determining module is used for determining the base station to which the BLE equipment needs to be switched and accessed under the condition that the signal strength values of the current base station and the base station of the at least one alternative base station uniformly meet the threshold judgment condition within a preset time period; and a fourth determining module, configured to restart calculating the preset time period and determine a base station to which the BLE device needs to be switched to access, when the current base station does not meet the threshold decision condition within the preset time period or the base station signal strength values of the multiple candidate base stations do not meet the threshold decision condition.
Optionally, the threshold decision condition is as follows: in the formula (I), wherein, the base station signal strength value of the current base station; is a first decision threshold; a base station signal strength value of the alternative base station; a second decision threshold is determined.
Optionally, the first determining module includes: a fourth determining unit, configured to determine an alternative base station for which the base station signal strength value meets a threshold decision condition; a first candidate unit, configured to use, as a first candidate set, a candidate base station whose available data link is not zero in candidate base stations that satisfy a threshold decision condition; a second candidate unit, configured to use, in the first candidate set, a candidate base station adjacent to the current base station as a first candidate subset, and a candidate base station not adjacent to the current base station as a second candidate subset; a sorting unit, configured to sort the candidate base stations of the first candidate subset and the second candidate subset according to the base station signal strength value; and the generating unit is used for combining the sorted first candidate subset and the sorted second candidate subset according to the sequence that the first candidate subset is in front of the second candidate subset, and generating a priority list of the access priority of the alternative base station.
Optionally, the first switching module includes: a selecting unit, configured to select a preset number of candidate base stations from the priority list as base stations to be switched; the base station switching device comprises a sending unit, a switching unit and a switching unit, wherein the sending unit is used for broadcasting and sending the Media Access Control (MAC) address of a base station to be switched to a preset number of alternative base stations through BLE equipment; a receiving unit, configured to receive a connection request sent by an alternative base station that meets an access condition, where the access condition is that an MAC address of the alternative base station is the same as an MAC address of a base station to be switched; and the first switching unit is used for establishing data transmission connection with the alternative base station sending the connection request according to the connection request and switching the current base station to the alternative base station sending the connection request.
Fig. 9 is a schematic diagram of another data transmission apparatus according to an embodiment of the present invention, and as shown in fig. 9, according to another aspect of the embodiment of the present invention, there is provided a data transmission apparatus including: a measurement module 92, a second determination module 94, an estimation module 96 and a second switching module 98, which are described in detail below.
A measurement module 92, configured to determine signal strength measurement values of a plurality of base stations in an operating area where a device with a BLE tag is located, where the plurality of base stations includes a current base station currently performing data transmission with the BLE tag and at least one alternative base station other than the current base station in the operating area; a second determining module 94, connected to the measuring module 92, for determining the signal strength values of the base stations of the current base station and the alternative base station according to the signal strength measurement value; an estimating module 96, connected to the determining module 94, configured to determine whether the device with the BLE tag needs to handover the current base station according to the base station signal strength values of the current base station and the alternative base station; and a second handover module 98, connected to the estimation module 96, configured to handover the device with the BLE tag to an alternative base station if it is determined that handover is needed, where the handover alternative base station performs data transmission with the device with the BLE tag.
By the device, the measurement module 92 is used for determining the signal strength measurement values of a plurality of base stations in the predetermined range of the tag, wherein the plurality of base stations comprise the current base station which is currently in data transmission with the tag and the alternative base stations except the current base station in the predetermined range; the determining module 94 determines the signal strength values of the current base station and the alternative base station according to the signal strength measurement value; the estimation module 96 determines whether the label needs to switch the current base station according to the base station signal strength values of the current base station and the alternative base station; the second switching module 98 switches the current base station into the alternative base station for the tag to perform data transmission by determining the signal strength measurement values of the base stations within the predetermined range of the tag, determining the base station signal strength values of the base stations, including the current base station performing data transmission with the tag and the alternative base stations within the predetermined range except the current base station, and determining whether to switch the current base station according to the base station signal strength values of the current base station and the alternative base station, so as to achieve the purpose of switching the first base station into the alternative base station for the tag to perform data transmission when the current base station needs to be switched, thereby achieving the technical effects of ensuring the stability of the tag data transmission, ensuring the data transmission quality and the data transmission efficiency of the tag, and further solving the problem of the movement of BLE equipment in the related technology, the technical problems that a data transmission network of BLE equipment and a base station is unstable, the data transmission efficiency is poor and the quality is low are caused.
Optionally, the estimation module includes: the estimating unit is used for determining the base station signal strength values of the current base station and the alternative base station and whether the threshold judging condition is always met in a preset time period; and the third determining unit is used for determining that the BLE label needs to switch the current base station under the condition that the base station signal strength values of the current base station and the alternative base station uniformly meet the threshold judgment condition within a preset time period.
Optionally, the second determining module includes: a fifth determining unit, configured to determine base station signal strength values of the current base station and the candidate base station according to the signal strength measurement value and an estimation formula, where the estimation formula is as follows: in the formula (I), wherein, t =1, 2, 3 … … for the base station signal strength value of the current base station or the alternative base station at time t; the measured value of the signal strength of the current base station or the alternative base station at the time t is obtained; to estimate the coefficients, 0< <1。
Optionally, the method further includes: and the timing module is used for restarting to calculate the preset time period and determining whether the equipment with the BLE label needs to switch the current base station or not under the condition that the current base station does not meet the threshold judgment condition within the preset time period or the base station signal strength values of a plurality of alternative base stations do not meet the threshold judgment condition.
Optionally, the threshold decision condition is as follows: in the formula (I), wherein, the base station signal strength value of the current base station; is a first decision threshold; a base station signal strength value of the alternative base station; a second decision threshold is determined.
Optionally, the second switching module includes: a sixth determining unit, configured to determine the number of candidate base stations that meet the threshold decision condition; the second switching unit directly switches the current base station to the alternative base station meeting the threshold judgment condition under the condition that the number of the second switching units is one; the sequencing unit is used for sequencing the multiple alternative base stations according to a preset sequencing condition under the condition that the number of the multiple alternative base stations is multiple, and determining a priority list of access priorities of the multiple alternative base stations; and the third switching unit is used for switching the equipment with the BLE label into the alternative base station according to the priority list.
Optionally, the sorting unit includes: a first candidate subunit, configured to use a candidate base station with an available data link that is not zero as a first candidate set; a second candidate subunit, configured to use, in the first candidate set, a candidate base station adjacent to the current base station as the first candidate subset, and a candidate base station not adjacent to the current base station as the second candidate subset; a sorting subunit, configured to sort, according to the base station signal strength values, the multiple candidate base stations of the first candidate subset and the second candidate subset; and the merging subunit is used for merging the sorted first candidate subset and the sorted second candidate subset according to the sequence that the first candidate subset is in front of the second candidate subset, so as to generate a priority list of the access priorities of the multiple candidate base stations.
Optionally, the third switching unit includes: a selecting subunit, configured to select a preset number of candidate base stations from the priority list as base stations to be switched; the broadcasting subunit is used for broadcasting and sending the Media Access Control (MAC) address of the base station to be switched to a preset number of alternative base stations through equipment with a BLE label; a receiving subunit, configured to receive a connection request sent by an alternative base station having the same MAC address as that of the base station to be switched; the establishing subunit is used for establishing data transmission connection with the alternative base station sending the connection request according to the connection request and switching the current base station into the alternative base station sending the connection request; and the transmission subunit is used for carrying out data transmission on the equipment with the BLE label through the alternative base station sending the connection request.
Optionally, the establishing the sub-unit includes: the establishing secondary subunit is used for establishing data transmission connection between the equipment with the BLE label and the alternative base station sending the connection request according to the connection request; the determining secondary subunit is used for disconnecting the data transmission connection between the equipment with the BLE label and the current base station under the condition that the equipment with the BLE label and the alternative base station sending the connection request are determined to be successfully established with the data transmission connection; and the switching secondary subunit is used for switching the current base station into the alternative base station for sending the connection request.
According to another aspect of the embodiments of the present invention, there is provided a computer storage medium including a stored program, wherein the program, when executed, controls an apparatus on which the computer storage medium is located to perform the following steps:
the BLE equipment establishes a data link with the current base station; in the moving process of BLE equipment, obtaining base station signal strength values of a current base station and a plurality of alternative base stations; under the condition that the BLE equipment needs to switch the accessed base stations, determining the access priority of each alternative base station based on the base station signal strength value of each alternative base station; the BLE device selects to switch to the alternative base station meeting the access condition based on the access priority of each alternative base station.
Optionally, in the moving process of the BLE device, obtaining base station signal strength values of the current base station and the multiple candidate base stations includes: determining signal strength measurement values of a current base station and a plurality of alternative base stations, wherein the alternative base stations are base stations in a certain range around the current base station; and determining base station signal strength values of the current base station and a plurality of alternative base stations according to the signal strength measurement values.
Optionally, determining the base station signal strength values of the current base station and the multiple candidate base stations according to the signal strength measurement value includes: determining base station signal strength values of the current base station and a plurality of alternative base stations according to the signal strength measurement values and an estimation formula, wherein the estimation formula is as follows: in the formula (I), wherein, t =1, 2, 3 … … for the base station signal strength value of the current base station or the alternative base station at time t; the measured value of the signal strength of the current base station or the alternative base station at the time t is obtained; to estimate the coefficients, 0< <1。
Optionally, when it is determined that the BLE device needs to switch the access base station, before determining the access priority of each candidate base station based on the base station signal strength value of each candidate base station, the method includes: determining the base station signal strength values of a current base station and at least one alternative base station, and whether a threshold judgment condition is always met in a preset time period; under the condition that the signal strength values of the current base station and at least one alternative base station uniformly and directly meet a threshold judgment condition in a preset time period, determining the base station to which BLE equipment needs to be switched; and under the condition that the current base station does not meet the threshold judgment condition within the preset time period or the base station signal strength values of a plurality of alternative base stations do not meet the threshold judgment condition, restarting to calculate the preset time period and determining the base station which needs to be switched and accessed by the BLE equipment.
Optionally, the threshold decision condition is as follows: in the formula (I), wherein, the base station signal strength value of the current base station; is a first decision threshold; a base station signal strength value of the alternative base station; a second decision threshold is determined.
Optionally, determining the access priority of each candidate base station based on the base station signal strength value of each candidate base station includes: determining alternative base stations of which the signal strength values meet threshold judgment conditions; taking an alternative base station with an available data link which is not zero in the alternative base stations meeting the threshold judgment condition as a first candidate set; in the first candidate set, the candidate base stations adjacent to the current base station are used as a first candidate subset, and the candidate base stations not adjacent to the current base station are used as a second candidate subset; sorting the candidate base stations of the first candidate subset and the second candidate subset according to the base station signal strength value; and combining the sorted first candidate subset and the sorted second candidate subset according to the sequence that the first candidate subset is in front of the second candidate subset, and generating a priority list of the access priority of the alternative base station.
Optionally, the selecting, by the BLE device, to switch to the alternative base station that satisfies the access condition based on the access priority of each alternative base station includes: selecting a preset number of alternative base stations from the priority list as base stations to be switched; broadcasting and sending the Media Access Control (MAC) address of the base station to be switched to a preset number of alternative base stations through BLE equipment; receiving a connection request sent by an alternative base station meeting an access condition, wherein the access condition is that the MAC address of the alternative base station is the same as the MAC address of the base station to be switched; and establishing data transmission connection with the alternative base station sending the connection request according to the connection request, and switching the current base station to the alternative base station sending the connection request.
Or performing the following steps: determining signal strength measurement values of a plurality of base stations in an operating area of a device with a BLE tag, wherein the plurality of base stations comprise a current base station which is currently in data transmission with the BLE tag and at least one alternative base station except the current base station in the operating area; determining base station signal strength values of the current base station and the alternative base station according to the signal strength measurement value; determining whether equipment with a BLE label needs to switch the current base station or not according to the base station signal strength values of the current base station and the alternative base station; and under the condition that the handover is determined to be needed, switching the equipment with the BLE label into the alternative base station, wherein the switched alternative base station carries out data transmission with the equipment with the BLE label.
Optionally, determining the signal strength values of the current base station and the candidate base station according to the signal strength measurement value includes: determining the signal strength values of the current base station and the alternative base station according to the signal strength measurement value and an estimation formula, wherein the estimation formula is as follows: in the formula (I), wherein, is the base of the current base station or the alternative base station at the time tStation signal strength value, t =1, 2, 3 … …; the measured value of the signal strength of the current base station or the alternative base station at the time t is obtained; to estimate the coefficients, 0< <1。
Optionally, determining whether the device with the BLE tag needs to switch the current base station according to the base station signal strength values of the current base station and the alternative base station includes: determining the base station signal strength values of the current base station and the alternative base station, and whether the threshold judgment condition is always met in a preset time period; and under the condition that the signal strength values of the current base station and the alternative base station uniformly and directly meet the threshold judgment condition in a preset time period, determining that the equipment with the BLE label needs to switch the current base station.
Optionally, the method further includes: and under the condition that the current base station does not meet the threshold judgment condition within the preset time period or the base station signal strength values of a plurality of alternative base stations do not meet the threshold judgment condition, restarting to calculate the preset time period and determining whether the equipment with the BLE label needs to switch the current base station.
Optionally, the threshold decision condition is as follows: in the formula (I), wherein, the base station signal strength value of the current base station; is a first decision threshold; a base station signal strength value of the alternative base station; a second decision threshold is determined.
Optionally, in a case that it is determined that handover is needed, switching the device with the BLE tag into the alternative base station includes: determining the number of alternative base stations meeting a threshold judgment condition; under the condition that the number is one, directly switching the current base station to an alternative base station meeting a threshold judgment condition; under the condition that the number of the candidate base stations is multiple, sequencing the multiple candidate base stations according to a preset sequencing condition, and determining a priority list of access priorities of the multiple candidate base stations; and switching the equipment with the BLE label to access the alternative base station according to the priority list.
Optionally, when the number of the candidate base stations is multiple, the multiple candidate base stations are ranked according to a preset ranking condition, and determining the priority list of the access priorities of the multiple candidate base stations includes: taking an alternative base station with an available data link being not zero as a first candidate set; in the first candidate set, the candidate base stations adjacent to the current base station are used as a first candidate subset, and the candidate base stations not adjacent to the current base station are used as a second candidate subset; sorting a plurality of candidate base stations of the first candidate subset and the second candidate subset according to the base station signal strength values; and combining the sorted first candidate subset and the sorted second candidate subset according to the sequence that the first candidate subset is in front of the second candidate subset, and generating a priority list of a plurality of candidate base stations.
Optionally, switching the device with the BLE tag to access the alternative base station according to the priority list includes: selecting a preset number of alternative base stations from the priority list as base stations to be switched; broadcasting and sending a Media Access Control (MAC) address of a base station to be switched to a plurality of alternative base stations through equipment with a BLE label; receiving a connection request sent by an alternative base station with the same MAC address as that of a base station to be switched; establishing data transmission connection with the alternative base station sending the connection request according to the connection request, and switching the current base station into the alternative base station sending the connection request; and carrying out data transmission for the equipment with the BLE label through the alternative base station sending the connection request.
Optionally, establishing a data transmission connection with the alternative base station that sends the connection request according to the connection request, and switching the current base station to the alternative base station that sends the connection request includes: according to the connection request, the equipment with the BLE label and the alternative base station sending the connection request establish data transmission connection; under the condition that the device with the BLE label and the alternative base station sending the connection request are determined to be successfully connected in a data transmission mode, the device with the BLE label is disconnected in the data transmission mode with the current base station; and switching the current base station to the alternative base station for sending the connection request.
According to another aspect of the embodiments of the present invention, there is provided a processor for executing a program, wherein the program executes the following steps:
the BLE equipment establishes a data link with the current base station; in the moving process of BLE equipment, obtaining base station signal strength values of a current base station and a plurality of alternative base stations; under the condition that the BLE equipment needs to switch the accessed base stations, determining the access priority of each alternative base station based on the base station signal strength value of each alternative base station; the BLE device selects to switch to the alternative base station meeting the access condition based on the access priority of each alternative base station.
Optionally, in the moving process of the BLE device, obtaining base station signal strength values of the current base station and the multiple candidate base stations includes: determining signal strength measurement values of a current base station and a plurality of alternative base stations, wherein the alternative base stations are base stations in a certain range around the current base station; and determining base station signal strength values of the current base station and a plurality of alternative base stations according to the signal strength measurement values.
Optionally, determining the base station signal strength values of the current base station and the multiple candidate base stations according to the signal strength measurement value includes: determining base station signal strength values of the current base station and a plurality of alternative base stations according to the signal strength measurement values and an estimation formula, wherein the estimation formula is as follows: in the formula (I), wherein, t =1, 2, 3 … … for the base station signal strength value of the current base station or the alternative base station at time t; the measured value of the signal strength of the current base station or the alternative base station at the time t is obtained; to estimate the coefficients, 0< <1。
Optionally, when it is determined that the BLE device needs to switch the access base station, before determining the access priority of each candidate base station based on the base station signal strength value of each candidate base station, the method includes: determining the base station signal strength values of a current base station and at least one alternative base station, and whether a threshold judgment condition is always met in a preset time period; under the condition that the signal strength values of the current base station and at least one alternative base station uniformly and directly meet a threshold judgment condition in a preset time period, determining the base station to which BLE equipment needs to be switched; and under the condition that the current base station does not meet the threshold judgment condition within the preset time period or the base station signal strength values of a plurality of alternative base stations do not meet the threshold judgment condition, restarting to calculate the preset time period and determining the base station which needs to be switched and accessed by the BLE equipment.
Optionally, the threshold decision condition is as follows: in the formula (I), wherein, the base station signal strength value of the current base station; is a first decision threshold; a base station signal strength value of the alternative base station; a second decision threshold is determined.
Optionally, determining the access priority of each candidate base station based on the base station signal strength value of each candidate base station includes: determining alternative base stations of which the signal strength values meet threshold judgment conditions; taking an alternative base station with an available data link which is not zero in the alternative base stations meeting the threshold judgment condition as a first candidate set; in the first candidate set, the candidate base stations adjacent to the current base station are used as a first candidate subset, and the candidate base stations not adjacent to the current base station are used as a second candidate subset; sorting the candidate base stations of the first candidate subset and the second candidate subset according to the base station signal strength value; and combining the sorted first candidate subset and the sorted second candidate subset according to the sequence that the first candidate subset is in front of the second candidate subset, and generating a priority list of the access priority of the alternative base station.
Optionally, when it is determined that the BLE device needs to switch the access base station, the selecting, by the BLE device, to switch to the alternative base station that satisfies the access condition based on the access priority of each alternative base station includes: selecting a preset number of alternative base stations from the priority list as base stations to be switched; broadcasting and sending the Media Access Control (MAC) address of the base station to be switched to a preset number of alternative base stations through BLE equipment; receiving a connection request sent by an alternative base station meeting an access condition, wherein the access condition is that the MAC address of the alternative base station is the same as the MAC address of the base station to be switched; and establishing data transmission connection with the alternative base station sending the connection request according to the connection request, and switching the current base station to the alternative base station sending the connection request.
Or performing the following steps: determining signal strength measurement values of a plurality of base stations in an operating area of a device with a BLE tag, wherein the plurality of base stations comprise a current base station which is currently in data transmission with the BLE tag and at least one alternative base station except the current base station in the operating area; determining base station signal strength values of the current base station and the alternative base station according to the signal strength measurement value; determining whether equipment with a BLE label needs to switch the current base station or not according to the base station signal strength values of the current base station and the alternative base station; and under the condition that the handover is determined to be needed, switching the equipment with the BLE label into the alternative base station, wherein the switched alternative base station carries out data transmission with the equipment with the BLE label.
Optionally, determining the signal strength values of the current base station and the candidate base station according to the signal strength measurement value includes: determining the signal strength values of the current base station and the alternative base station according to the signal strength measurement value and an estimation formula, wherein the estimation formula is as follows: in the formula (I), wherein, t =1, 2, 3 … … for the base station signal strength value of the current base station or the alternative base station at time t; the measured value of the signal strength of the current base station or the alternative base station at the time t is obtained; to estimate the coefficients, 0< <1。
Optionally, determining whether the device with the BLE tag needs to switch the current base station according to the base station signal strength values of the current base station and the alternative base station includes: determining the base station signal strength values of the current base station and the alternative base station, and whether the threshold judgment condition is always met in a preset time period; and under the condition that the signal strength values of the current base station and the alternative base station uniformly and directly meet the threshold judgment condition in a preset time period, determining that the equipment with the BLE label needs to switch the current base station.
Optionally, the method further includes: and under the condition that the current base station does not meet the threshold judgment condition within the preset time period or the base station signal strength values of a plurality of alternative base stations do not meet the threshold judgment condition, restarting to calculate the preset time period and determining whether the equipment with the BLE label needs to switch the current base station.
Optionally, the threshold decision condition is as follows: in the formula (I), wherein, the base station signal strength value of the current base station; is a first decision threshold; a base station signal strength value of the alternative base station; a second decision threshold is determined.
Optionally, in a case that it is determined that handover is needed, switching the device with the BLE tag into the alternative base station includes: determining the number of alternative base stations meeting a threshold judgment condition; under the condition that the number is one, directly switching the current base station to an alternative base station meeting a threshold judgment condition; under the condition that the number of the candidate base stations is multiple, sequencing the multiple candidate base stations according to a preset sequencing condition, and determining a priority list of access priorities of the multiple candidate base stations; and switching the equipment with the BLE label to access the alternative base station according to the priority list.
Optionally, when the number of the candidate base stations is multiple, the multiple candidate base stations are ranked according to a preset ranking condition, and determining the priority list of the access priorities of the multiple candidate base stations includes: taking an alternative base station with an available data link being not zero as a first candidate set; in the first candidate set, the candidate base stations adjacent to the current base station are used as a first candidate subset, and the candidate base stations not adjacent to the current base station are used as a second candidate subset; sorting a plurality of candidate base stations of the first candidate subset and the second candidate subset according to the base station signal strength values; and combining the sorted first candidate subset and the sorted second candidate subset according to the sequence that the first candidate subset is in front of the second candidate subset, and generating a priority list of a plurality of candidate base stations.
Optionally, switching the device with the BLE tag to access the alternative base station according to the priority list includes: selecting a preset number of alternative base stations from the priority list as base stations to be switched; broadcasting and sending the Media Access Control (MAC) address of the base station to be switched to a preset number of alternative base stations through equipment with BLE labels; receiving a connection request sent by an alternative base station with the same MAC address as that of a base station to be switched; establishing data transmission connection with the alternative base station sending the connection request according to the connection request, and switching the current base station into the alternative base station sending the connection request; and carrying out data transmission for the equipment with the BLE label through the alternative base station sending the connection request.
Optionally, establishing a data transmission connection with the alternative base station that sends the connection request according to the connection request, and switching the current base station to the alternative base station that sends the connection request includes: according to the connection request, the equipment with the BLE label and the alternative base station sending the connection request establish data transmission connection; under the condition that the device with the BLE label and the alternative base station sending the connection request are determined to be successfully connected in a data transmission mode, the device with the BLE label is disconnected in the data transmission mode with the current base station; and switching the current base station to the alternative base station for sending the connection request.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.
Claims (18)
1. A method of data transmission, comprising:
when the BLE equipment moves, acquiring base station signal strength values of a current base station and a plurality of alternative base stations which establish data link with the BLE equipment;
under the condition that the BLE equipment needs to switch the accessed base stations, determining the access priority of each alternative base station based on the base station signal strength value of each alternative base station;
switching the BLE device to an alternative base station meeting the access condition based on the access priority of each alternative base station.
2. The method according to claim 1, wherein the obtaining base station signal strength values of a current base station and a plurality of alternative base stations that establish a data link with the BLE device while the BLE device is moving comprises:
determining signal strength measurement values of the current base station and a plurality of alternative base stations, wherein the alternative base stations are base stations within a certain range around the current base station;
and determining base station signal strength values of the current base station and a plurality of alternative base stations according to the signal strength measurement values.
3. The method of claim 2, wherein determining base station signal strength values for the current base station and a plurality of candidate base stations based on the signal strength measurements comprises:
determining base station signal strength values of the current base station and a plurality of alternative base stations according to the signal strength measurement values and an estimation formula, wherein the estimation formula is as follows:
in the formula,t =1, 2, 3 … … for the base station signal strength value of the current base station or the alternative base station at time t;the measured value of the signal strength of the current base station or the alternative base station at the time t is obtained;to estimate the coefficients, 0<<1。
4. The method according to claim 2, wherein the determining the access priority of each alternative base station based on the base station signal strength value of each alternative base station in the case that it is determined that the BLE device needs to handover the accessed base station comprises:
determining the base station signal strength values of the current base station and at least one alternative base station, and whether a threshold judgment condition is always met in a preset time period;
under the condition that the signal strength values of the current base station and the base station of at least one alternative base station uniformly and directly meet a threshold judgment condition in a preset time period, determining the base station to which the BLE equipment needs to be switched and accessed;
and under the condition that the current base station does not meet the threshold judgment condition within a preset time period or the base station signal strength values of a plurality of alternative base stations do not meet the threshold judgment condition, restarting to calculate the preset time period and re-determining the base station to which the BLE equipment needs to be switched.
5. The method of claim 4, wherein the threshold decision condition is as follows:
6. The method according to claim 4, wherein the determining the access priority of each alternative base station based on the base station signal strength value of each alternative base station if it is determined that the BLE device needs to handover the accessed base station comprises:
determining alternative base stations of which the signal strength values meet the threshold judgment condition;
taking the alternative base station with the available data link being not zero in the alternative base stations meeting the threshold judgment condition as a first candidate set;
taking the alternative base stations adjacent to the current base station in the first candidate set as a first candidate subset, and taking the alternative base stations not adjacent to the current base station as a second candidate subset;
sorting the candidate base stations of the first candidate subset and the second candidate subset according to the base station signal strength value;
and combining the sorted first candidate subset and the sorted second candidate subset according to the sequence that the first candidate subset is in front of the second candidate subset, and generating a priority list of the access priority of the alternative base station.
7. The method according to claim 6, wherein the handing over the BLE device to the alternative base station that satisfies the access condition based on the access priority of each alternative base station comprises:
selecting a preset number of alternative base stations from the priority list as base stations to be switched;
broadcasting and sending the Media Access Control (MAC) address of the base station to be switched to the preset number of alternative base stations through the BLE equipment;
receiving a connection request sent by an alternative base station meeting the access condition, wherein the access condition is that the MAC address of the alternative base station is the same as the MAC address of the base station to be switched;
and establishing data transmission connection with the alternative base station sending the connection request according to the connection request, and switching the current base station to the alternative base station sending the connection request.
8. A method of data transmission, comprising:
determining signal strength measurement values of a plurality of base stations in an operating area of a device with a BLE tag, wherein the plurality of base stations comprise a current base station which is currently in data transmission with the BLE tag and at least one alternative base station except the current base station in the operating area;
determining base station signal strength values of the current base station and the alternative base station according to the signal strength measurement value;
determining whether the equipment with the BLE label needs to switch the current base station or not according to the base station signal strength values of the current base station and the alternative base station;
and under the condition that the handover is determined to be needed, switching the equipment with the BLE label into the alternative base station, wherein the switched alternative base station carries out data transmission with the equipment with the BLE label.
9. The method according to claim 8, wherein the determining whether the BLE-tagged device needs to handover the current base station according to the base station signal strength values of the current base station and the alternative base station comprises:
determining the base station signal strength values of the current base station and the alternative base station, and whether a threshold judgment condition is always met in a preset time period;
and under the condition that the signal strength values of the current base station and the alternative base station uniformly meet a threshold judgment condition in a preset time period, determining that the equipment with the BLE label needs to switch the current base station.
10. The method according to claim 9, wherein the handing over the device with the BLE tag to the alternative base station if it is determined that handover is required comprises:
determining the number of alternative base stations meeting the threshold judgment condition;
under the condition that the number is one, directly switching the current base station to an alternative base station meeting the threshold judgment condition;
when the number of the candidate base stations is multiple, sequencing the candidate base stations according to a preset sequencing condition, and determining a priority list of access priorities of the candidate base stations;
and switching the equipment with the BLE label to access an alternative base station according to the priority list.
11. The method according to claim 10, wherein when the number is multiple, the candidate base stations are ranked according to a preset ranking condition, and determining the priority list of the access priorities of the candidate base stations comprises:
taking an alternative base station with an available data link being not zero as a first candidate set;
taking the alternative base stations adjacent to the current base station in the first candidate set as a first candidate subset, and taking the alternative base stations not adjacent to the current base station as a second candidate subset;
sorting a plurality of candidate base stations of the first candidate subset and the second candidate subset according to the base station signal strength values;
and combining the sorted first candidate subset and the sorted second candidate subset according to the sequence that the first candidate subset is in front of the second candidate subset, so as to generate the priority list of the plurality of candidate base stations.
12. The method according to claim 10, wherein the handing over the device with the BLE tag to access the alternative base station according to the priority list comprises:
selecting a preset number of alternative base stations from the priority list as base stations to be switched;
broadcasting and sending the Media Access Control (MAC) address of the base station to be switched to the preset number of alternative base stations through the equipment with the BLE label;
receiving a connection request sent by an alternative base station with the same MAC address as that of the base station to be switched;
and establishing data transmission connection with the alternative base station sending the connection request according to the connection request, and switching the current base station into the alternative base station sending the connection request.
13. A data transmission apparatus, comprising:
the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring base station signal strength values of a current base station and a plurality of alternative base stations which establish data link with BLE equipment when the BLE equipment moves;
a first determining module, configured to determine, based on a base station signal strength value of each alternative base station, an access priority of each alternative base station when it is determined that the BLE device needs to switch an access base station;
a first handover module, configured to handover the BLE device to an alternative base station that meets an access condition based on the access priority of each alternative base station.
14. The apparatus of claim 13, wherein the obtaining module comprises:
a first determining unit, configured to determine signal strength measurement values of the current base station and multiple candidate base stations, where the candidate base stations are base stations within a certain range around the current base station;
and the second determining unit is used for determining the base station signal strength values of the current base station and a plurality of alternative base stations according to the signal strength measurement values.
15. The apparatus according to claim 14, wherein the second determining unit comprises:
a determining subunit, configured to determine base station signal strength values of the current base station and a plurality of candidate base stations according to the signal strength measurement values and an estimation formula, where the estimation formula is as follows:
in the formula,t =1, 2, 3 … … for the base station signal strength value of the current base station or the alternative base station at time t;the measured value of the signal strength of the current base station or the alternative base station at the time t is obtained;to estimate the coefficients, 0<<1。
16. A data transmission apparatus, comprising:
a measurement module, configured to determine signal strength measurement values of a plurality of base stations in an operating area where a device with a BLE tag is located, where the plurality of base stations include a current base station currently performing data transmission with the BLE tag and at least one alternative base station other than the current base station in the operating area;
a second determining module, configured to determine base station signal strength values of the current base station and the alternative base station according to the signal strength measurement value;
an estimating module, configured to determine whether the device with the BLE tag needs to switch the current base station according to base station signal strength values of the current base station and the alternative base station;
and a second handover module, configured to, under a condition that it is determined that handover is needed, handover the device with the BLE tag to access the alternative base station, where the handed over alternative base station performs data transmission with the device with the BLE tag.
17. The apparatus of claim 16, wherein the estimation module comprises:
an estimating unit, configured to determine base station signal strength values of the current base station and the candidate base station, and determine whether a threshold decision condition is always satisfied within a preset time period;
a third determining unit, configured to determine that the BLE tag needs to switch the current base station when the base station signal strength values of the current base station and the candidate base station uniformly meet a threshold decision condition within a preset time period.
18. A processor for executing a program, wherein the program executes to perform the data transmission method of any one of claims 1 to 12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011542729.3A CN112291771B (en) | 2020-12-24 | 2020-12-24 | Data transmission method and device and processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011542729.3A CN112291771B (en) | 2020-12-24 | 2020-12-24 | Data transmission method and device and processor |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112291771A true CN112291771A (en) | 2021-01-29 |
CN112291771B CN112291771B (en) | 2021-04-20 |
Family
ID=74426044
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011542729.3A Active CN112291771B (en) | 2020-12-24 | 2020-12-24 | Data transmission method and device and processor |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112291771B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115297424A (en) * | 2021-04-19 | 2022-11-04 | 广东博智林机器人有限公司 | Channel switching method, ranging method, base station and ranging system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102811481A (en) * | 2011-06-03 | 2012-12-05 | 北京千橡网景科技发展有限公司 | Method and equipment for determining positions of wireless access points |
US20170135021A1 (en) * | 2015-11-11 | 2017-05-11 | Mediatek Inc. | Apparatuses and methods for handovers in a wireless mesh network |
CN112073957A (en) * | 2020-09-14 | 2020-12-11 | 深圳市富德康电子有限公司 | Method for switching Bluetooth network structure between different Bluetooth access points |
CN112188409A (en) * | 2020-09-07 | 2021-01-05 | 天地(常州)自动化股份有限公司 | BLE network suitable for mine space and roaming communication method |
-
2020
- 2020-12-24 CN CN202011542729.3A patent/CN112291771B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102811481A (en) * | 2011-06-03 | 2012-12-05 | 北京千橡网景科技发展有限公司 | Method and equipment for determining positions of wireless access points |
US20170135021A1 (en) * | 2015-11-11 | 2017-05-11 | Mediatek Inc. | Apparatuses and methods for handovers in a wireless mesh network |
CN112188409A (en) * | 2020-09-07 | 2021-01-05 | 天地(常州)自动化股份有限公司 | BLE network suitable for mine space and roaming communication method |
CN112073957A (en) * | 2020-09-14 | 2020-12-11 | 深圳市富德康电子有限公司 | Method for switching Bluetooth network structure between different Bluetooth access points |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115297424A (en) * | 2021-04-19 | 2022-11-04 | 广东博智林机器人有限公司 | Channel switching method, ranging method, base station and ranging system |
Also Published As
Publication number | Publication date |
---|---|
CN112291771B (en) | 2021-04-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111988819B (en) | Method, system and base station for maintaining slice service continuity in cell switching scene | |
CN101583151B (en) | Method of STA roaming in WLAN network and device | |
EP3570593B1 (en) | Cell selection or reselection method and device | |
CN108370516B (en) | Method for cell measurement report and user equipment | |
CN106879009A (en) | A kind of residence reselecting, user equipment and network side equipment | |
CN107306429B (en) | Method and device for connecting network access points | |
CN105792290A (en) | Method and device for controlling intelligent terminal to perform wireless roaming | |
WO2016090770A1 (en) | Sending method and device for frequency point measurement message | |
CN106332201A (en) | Wireless hotspot switching method and mobile terminal | |
CN103313316B (en) | A kind of Check processing method and device of different system pingpang handoff | |
CN110636567B (en) | Method, device and base station for evaluating and reporting switching | |
CN103298012A (en) | AP failure detection method and device | |
JP2002501684A (en) | Handover control in mobile communication networks | |
CN105517077A (en) | Network re-election and switching method, base station and mobile terminal | |
CN101132614A (en) | Subdistrict re-selection method, device and system | |
CN106412844B (en) | Realize enhanced multimedia broadcast multicast service continuously received method and terminal | |
CN107046699A (en) | A kind of wireless terminal roaming method and device | |
CN114867075B (en) | Wireless network switching method, device, equipment, storage medium and product | |
CN101400095B (en) | Target cell determining method, user equipment, base station and system in switching process | |
CN112291771B (en) | Data transmission method and device and processor | |
CN101959148A (en) | Redirection method, base station and terminal | |
CN101772113B (en) | Switching method and base station node | |
CN102196487B (en) | Third-generation (3G) system neighbor cell measurement method for multi-card multi-mode mobile terminal | |
CN114071590B (en) | Cell reselection method, terminal and storage medium for shared network | |
CN102487537B (en) | Method for selecting target base station (BS) during switching and system thereof |
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 | ||
GR01 | Patent grant |