CN111405536B - Network distribution method, equipment and storage medium - Google Patents

Network distribution method, equipment and storage medium Download PDF

Info

Publication number
CN111405536B
CN111405536B CN202010190359.5A CN202010190359A CN111405536B CN 111405536 B CN111405536 B CN 111405536B CN 202010190359 A CN202010190359 A CN 202010190359A CN 111405536 B CN111405536 B CN 111405536B
Authority
CN
China
Prior art keywords
scanning
bluetooth
time
scan
time interval
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.)
Active
Application number
CN202010190359.5A
Other languages
Chinese (zh)
Other versions
CN111405536A (en
Inventor
曹黎
邬惺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Skyworth Digital Technology Co Ltd
Original Assignee
Shenzhen Skyworth Digital Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Skyworth Digital Technology Co Ltd filed Critical Shenzhen Skyworth Digital Technology Co Ltd
Priority to CN202010190359.5A priority Critical patent/CN111405536B/en
Publication of CN111405536A publication Critical patent/CN111405536A/en
Application granted granted Critical
Publication of CN111405536B publication Critical patent/CN111405536B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the invention discloses a network distribution method, equipment and a storage medium. The method comprises the following steps: determining the time ratio of the first total scanning time length of the classic Bluetooth scanning and the second total scanning time length of the low-power Bluetooth scanning in the total scanning time length of the box end based on the number of the first channels of the classic Bluetooth scanning and the number of the second channels of the low-power Bluetooth scanning; determining a first time interval and a first time length of classical Bluetooth scanning and a second time interval and a second time length of low-power-consumption Bluetooth scanning, and scanning equipment by a control box terminal based on a time ratio, the first time interval, the first time length, the second time interval and the second time length; determining a first device scanned by each channel through classical Bluetooth scanning, and a second device scanned by each channel through low-power Bluetooth scanning; and if the first equipment and the second equipment do not have target equipment, adjusting the time ratio based on the number of the first equipment, the number of the second equipment, the number of the first channels and the number of the second channels. The high-efficiency network distribution of the scanning equipment is realized.

Description

Network distribution method, equipment and storage medium
Technical Field
The embodiment of the invention relates to a computer technology, in particular to a network distribution method, equipment and a storage medium.
Background
At present, many intelligent devices such as story machines, intelligent robots and the like have no interface display and input devices, so that it is very difficult to distribute networks for the devices.
Existing mobile phones include an apple mobile phone and an android mobile phone, and for the apple mobile phone, a Bluetooth low power consumption (ble) broadcast can be sent at a mobile phone end, the ble broadcast only broadcasts three channels, and if only the ble scan is called by a corresponding box end, the mobile phone can be easily scanned; however, for an android mobile phone, in order to be compatible with an old android mobile phone, a classic bluetooth query scan, namely an inquiry scan, is usually sent at a mobile phone end, namely, a bluetooth name is renamed and a bluetooth is started to be visible.
In the method, in order to enable the box end to scan all devices including apples and android, only the box can call the discovery interface, the scanning action of the bluetooth discovery interface includes inquiry scan and ble scan, the inquiry scan includes 79 channels in total, and the ble scan includes 3 channels in total.
Disclosure of Invention
The embodiment of the invention provides a network distribution method, equipment and a storage medium, which are used for realizing efficient and rapid network distribution of scanning equipment.
In a first aspect, an embodiment of the present invention provides a network distribution method, where the method includes:
determining the time ratio of the first total scanning time length of the classic Bluetooth scanning and the second total scanning time length of the low-power Bluetooth scanning in the box end total scanning time length based on the number of the first channels of the classic Bluetooth scanning and the number of the second channels of the low-power Bluetooth scanning;
respectively determining a first time interval and a first duration of the classic Bluetooth scanning and a second time interval and a second duration of the low-power Bluetooth scanning, and performing equipment scanning by a control box terminal based on the time ratio, the first time interval, the first duration, the second time interval and the second duration;
determining a first device scanned based on each channel during the classic bluetooth scan and a second device scanned based on each channel during the bluetooth low energy scan;
if no target device exists in the first device and the second device, adjusting the time ratio based on the number of the first devices, the number of the second devices, the number of the first channels and the number of the second channels.
In a second aspect, an embodiment of the present invention further provides an apparatus, where the apparatus includes:
one or more processors;
storage means for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement the network distribution method according to any of the embodiments of the present invention.
In a third aspect, embodiments of the present invention further provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform any of the network distribution methods described in the embodiments of the present invention.
According to the technical scheme of the embodiment of the invention, the time occupation ratio of the classic Bluetooth scanning and the low-power Bluetooth scanning in the total scanning time of the box end is determined according to the number of the first channels of the classic Bluetooth scanning and the number of the second channels of the low-power Bluetooth scanning, so that under the condition of coexistence of the classic Bluetooth scanning and the low-power Bluetooth scanning, the problem that the scanning target equipment is easy to miss due to too short scanning time in the scanning mode with a large number of channels can be avoided if the time occupation ratios of the classic Bluetooth scanning and the low-power Bluetooth scanning in the total scanning time of the box end are the same, the target equipment can be equipment needing to be connected with the box end in a Bluetooth mode and distributed with a network, the time is saved, and the probability of missing the target equipment is reduced. The method comprises the steps of respectively determining a first time interval and a first time length of classical Bluetooth scanning and a second time interval and a second time length of low-power-consumption Bluetooth scanning, and controlling a box end to perform equipment scanning based on time ratio, the first time interval, the first time length, the second time interval and the second time length. When the box end scans the equipment, a first device scanned by each channel based on classical Bluetooth scanning and a second device scanned by each channel based on low-power Bluetooth scanning are determined, so that whether the first device and the second device have target equipment or not is observed in real time when the box end scans the equipment. If the first equipment and the second equipment are both provided with no target equipment, the time occupation ratio is adjusted based on the number of the first equipment, the number of the second equipment, the number of the first channels and the number of the second channels, so that the time occupation ratio can be automatically adjusted according to the environmental complexity, the target equipment can be quickly scanned under the condition of large environmental interference, and the distribution network efficiency and the distribution network success rate are greatly improved.
Drawings
Fig. 1 is a flowchart of a network distribution method in a first embodiment of the present invention;
fig. 2 is a flowchart of a network distribution method in the second embodiment of the present invention;
fig. 3 is an execution flowchart of a network distribution method in the second embodiment of the present invention;
fig. 4 is a schematic structural diagram of a distribution network device in the third embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some structures related to the present invention are shown in the drawings, not all of them.
Example one
Fig. 1 is a flowchart of a network distribution method according to an embodiment of the present invention, where the present embodiment is applicable to a case where a box end and a scanning device rapidly distribute a network, the method may be executed by a network distribution device, the network distribution device may be implemented by software and/or hardware, and the network distribution device may be configured on a computing device, and specifically includes the following steps:
s110, determining the time ratio of first total scanning time of classic Bluetooth scanning and second total scanning time of low-power Bluetooth scanning in total scanning time of a box end based on the number of first channels of classic Bluetooth scanning and the number of second channels of low-power Bluetooth scanning;
for example, the classic bluetooth scanning may be a bluetooth scanning mode based on an android mobile phone, and the low-power bluetooth scanning may be a bluetooth scanning mode based on an apple mobile phone, because for the android mobile phone, in order to be compatible with an old android mobile phone, the classic bluetooth scanning is sent at a mobile phone end, and some old android mobile phones do not support the low-power bluetooth scanning, only the classic bluetooth scanning is performed, so that the box end needs to perform the classic bluetooth scanning to scan the device when scanning the device; the first number of channels may be the number of channels for a classic bluetooth scan, where the number of classic bluetooth scans is 79; the second number of channels may be the number of channels scanned by the bluetooth low energy, where the number of bluetooth low energy scans is 3; the first total scanning duration may be a total scanning duration of classic bluetooth scanning when the box end scans the device, and correspondingly, the second total scanning duration may be a total scanning duration of low-power-consumption bluetooth scanning when the box end scans the device; the total scanning duration of the box end can be the total duration of one scanning round (including classic bluetooth scanning and low-power bluetooth scanning) when the box end scans the equipment; the time ratio may be a ratio of a first total scanning duration of the classic bluetooth scanning and a second total scanning duration of the bluetooth low-power scanning in the total scanning duration of the box end in the process of performing one round of scanning on the device by the box end. Based on the number of the first channels scanned by the classic bluetooth and the number of the second channels scanned by the low-power-consumption bluetooth, according to a certain calculation rule, the time ratio of the first total scanning time length scanned by the classic bluetooth and the second total scanning time length scanned by the low-power-consumption bluetooth in the total scanning time length of the box end can be determined. Therefore, the time occupation ratios of the classic Bluetooth scanning and the low-power Bluetooth scanning in the total scanning time of the box end are determined according to the number of the first channels of the classic Bluetooth scanning and the number of the second channels of the low-power Bluetooth scanning, so that under the condition that the classic Bluetooth scanning and the low-power Bluetooth scanning coexist, the situation that the time occupation ratios of the classic Bluetooth scanning and the low-power Bluetooth scanning in the total scanning time of the box end are the same, scanning modes with a large number of channels possibly cause easy missing of scanned target equipment due to too short scanning time is avoided, the target equipment can be equipment needing to be connected with the box end in a Bluetooth mode and a network, and therefore the next round of waiting is needed, time is saved, and the probability of missing the target equipment is reduced.
S120, respectively determining a first time interval and a first time length of the classic Bluetooth scanning and a second time interval and a second time length of the low-power Bluetooth scanning, and performing equipment scanning by a control box end based on the time ratio, the first time interval, the first time length, the second time interval and the second time length;
illustratively, the first time interval may be a time interval of each channel scan in a classic bluetooth scan, and the first time duration may be a scan duration of each channel in the classic bluetooth scan; correspondingly, the second time interval may be a time interval of scanning each channel in the bluetooth low energy scan, and the first time length may be a scan time length of each channel in the bluetooth low energy scan. And based on the time ratio, the first time interval, the first time length, the second time interval and the second time length, the control box end carries out equipment scanning under the parameters of the determined time ratio, the first time interval, the first time length, the second time interval and the second time length. Thus, when the box end scans the equipment, the scanning is carried out according to the determined time ratio, the first time interval, the first time length, the second time interval and the second time length.
Optionally, the determining the first time interval and the first duration of the classic bluetooth scan, and the second time interval and the second duration of the bluetooth low energy scan respectively may be: determining the first time interval and the first duration based on a range criterion of a scan time interval and a scan duration of the classic bluetooth scan; and determining the second time interval and the second duration based on the range standard of the scanning time interval and the scanning duration of the low-power Bluetooth scanning.
For example, the range criteria for the scan interval and the scan duration of the classic bluetooth scan may be the range criteria for the scan interval and the scan duration specified according to the bluetooth protocol stack of the classic bluetooth scan, and correspondingly, the range criteria for the scan interval and the scan duration of the bluetooth low energy scan may be the range criteria for the scan interval and the scan duration specified according to the bluetooth protocol of the bluetooth low energy scan. Selecting the standard according to the scanning time interval and the scanning duration range standard of the classic Bluetooth scanning, and determining a first time interval and a first duration; and selecting the standard according to the scanning time interval and the scanning duration range standard of the low-power Bluetooth scanning, and determining a second time interval and a second duration. Therefore, the first time interval, the first time duration, the second time interval and the second time duration are ensured to be within the respective range standards, and the situation that the determined first time interval, the determined first time duration, the determined second time interval and the determined second time duration are not within the respective range standards and cannot cause the box end to carry out equipment scanning is avoided.
Optionally, the determining the first time interval and the first duration based on the range criteria of the scanning time interval and the scanning duration of the classic bluetooth scanning may be: determining the first time interval based on a lowest criterion of range criteria of a scanning time interval of the classic bluetooth scan and a distribution network indicator; and determining the first time length based on the first time interval, the range standard of the scanning time length of the classic Bluetooth scanning and a first preset floating threshold value.
Illustratively, the lowest criterion in the range criterion of the scanning time interval of the classic bluetooth scan may be the lowest value in the range criterion, and may also be a floating value around the lowest value in the range criterion of the scanning time interval of the classic bluetooth scan, for example, the range criterion of the scanning time interval of the classic bluetooth scan is 11.25ms-2560ms, the lowest criterion thereof may be 11.25ms, and may also be a floating value within a certain range above 11.25ms, for example, may be 11.25-15ms. The distribution network index can be a distribution network standard set by a user according to the user requirement, for example, in order to improve the distribution network speed, the improvement of the distribution network speed is the distribution network index. The range standard of the scanning time interval of the classic bluetooth scanning is 11.25ms-2560ms, in order to increase the distribution network speed as the distribution network index, if the distribution network index is to be increased, and at the same time, in order to scan the devices as much as possible, the scanning time interval of the classic bluetooth scanning needs to be shortened, and the scanning time length is extended, so when the first time interval is determined, the first time interval is determined according to the lowest standard in the range standard of the scanning time interval of the classic bluetooth scanning and the distribution network index, for example, the lowest standard in the range standard of the scanning time interval of the classic bluetooth scanning may be 11.25 ms-15 ms, and in order to optimize the distribution network speed, the first time interval may preferably be 11.25ms. Therefore, the first time interval is determined according to the lowest standard in the range standard of the scanning time interval of the classic Bluetooth scanning and the distribution network index, the range standard of the scanning time interval of the classic Bluetooth scanning can be met during the finally determined first time interval, the distribution network index is also met, the distribution network speed is improved, and the efficiency of a box end distribution network is increased.
For example, the first preset floating threshold may be a floating range of the first duration according to the first time interval and the range standard of the scanning duration of the classic bluetooth scan, and the first preset floating range may be set by the user by experience in order to reach the distribution network index. According to the first time interval, the range standard of the scanning duration of the classic bluetooth scanning and the first preset floating threshold, the first time length may be determined, for example, to improve the distribution network speed as a distribution network index, where the first time interval is 11.25ms, the range standard of the scanning duration of the classic bluetooth scanning is 10.625ms-2560ms, and the first time length must be less than or equal to the first time interval, so to improve the distribution network speed, the first time length needs to be extended as much as possible, but cannot be too long, because if the first time length is too long, the first total scanning time of the entire classic bluetooth scanning will be too long, which indirectly affects the total scanning duration of the box end, that is, the duration of a round of scanning will be too long, and therefore, the first time length needs to be reasonably selected according to the first time interval, the range standard of the scanning duration of the classic bluetooth scanning and the first preset floating threshold, which is exemplified here: when the first time interval is 11.25ms, and the standard range of the scanning duration of the classical bluetooth scan is 10.625ms-2560ms, the first duration ranges from 10.625ms to 11.25ms, and if the first preset floating threshold is 0.5ms, the first duration is 10.75ms-11.25ms, or 10.625ms-11.125ms, because 11.25ms is not very long as the first scanning duration, it is preferable that the first duration is determined as: 11.25ms. Therefore, the first time length is determined according to the first time interval, the range standard of the scanning time length of the classic Bluetooth scanning and the first preset floating threshold, the finally determined first time length can be ensured to meet the range standard of the scanning time length of the classic Bluetooth scanning, the distribution network index is also met, the distribution network speed is improved, and the efficiency of a box end distribution network is increased.
Optionally, determining the second time interval and the second duration based on the range standard of the scanning time interval and the scanning duration of the bluetooth low energy scanning may be: determining the second time interval based on the lowest standard in the range standard of the scanning time interval of the low-power Bluetooth scanning and the distribution network index; and determining the second time length based on the second time interval, the range standard of the scanning time length of the low-power Bluetooth scanning and a second preset floating threshold value.
Illustratively, similar to the first time interval and the first duration, the lowest criterion in the range criterion of the scan time interval of the bluetooth low energy scan may be the lowest value in the range criterion, or may be a floating value around the lowest value in the range criterion of the scan time interval of the bluetooth low energy scan, for example, the range criterion of the scan time interval of the bluetooth low energy scan is 20ms-10.24s and must be an integer multiple of 0.625, and the lowest criterion thereof may be 20ms, or may be a floating value within a certain range above 20ms, for example, 20-300ms. Here, the range standard of the scanning time interval of the bluetooth low energy scanning is 20ms to 10.24s, in order to increase the distribution network speed as the distribution network index, if the distribution network index is to be increased, and at the same time, in order to scan the devices as much as possible, the scanning time interval of the bluetooth low energy scanning needs to be shortened, and the scanning time length is extended, so when the second time interval is determined, the minimum standard in the range standard of the scanning time interval of the bluetooth low energy scanning and the distribution network index need to be determined, for example, the minimum standard in the range standard of the scanning time interval of the bluetooth low energy scanning may be 20ms to 300ms, in order to optimize the distribution network speed, and the bluetooth protocol specifies that, generally, in order to scan the devices, the minimum setting of the scanning time interval of the bluetooth low energy scanning is also equal to or more than 100ms, i.e., 160 pieces of 0.625, and therefore, the first time interval here may preferably be 100ms. Therefore, the second time interval is determined according to the lowest standard in the range standard of the scanning time interval of the low-power-consumption Bluetooth scanning and the distribution network index, the range standard of the scanning time interval of the low-power-consumption Bluetooth scanning can be met during the finally determined second time interval, the distribution network index is also met, the distribution network speed is improved, and the efficiency of a box-end distribution network is improved.
For example, the second preset floating threshold may be a floating range of the second duration according to the second time interval and the range standard of the scan duration of the bluetooth low energy scan, and the second preset floating range may be set by the user by experience in order to reach the distribution network index. According to the second time interval, the range standard of the scanning duration of the bluetooth low energy scanning, and the second preset floating threshold, the second duration may be determined, for example, by using the speed of the distribution network as the distribution network index, the second time interval is 100ms, and the scanning duration of the bluetooth low energy scanning is default to 11.25ms, which is exemplified here: in the case that the second time interval is 100ms and the scan duration of the bluetooth low energy scan defaults to 11.25ms, it is preferable that the second duration is set as: 11.25ms. If the scan duration of the bluetooth low energy scan has a certain range standard, the second duration may be determined based on the second time interval, the range standard of the scan duration of the bluetooth low energy scan, and the second preset floating threshold, as in the determination of the first duration. Therefore, the second time duration is determined according to the second time interval, the range standard of the scanning time duration of the low-power Bluetooth scanning and the second preset floating threshold, the range standard of the scanning time duration of the low-power Bluetooth scanning can be met when the finally determined second time duration is ensured, the distribution network index is also met, meanwhile, the distribution network speed is improved, and the efficiency of a box end distribution network is increased.
It should be noted that the first time interval, the first duration, the second time interval and the second duration determined here can realize that the box end can perform one round of device scanning in the shortest time, so that the speed of the network distribution at the box end is improved, and the purpose of efficiently and quickly performing the network distribution on the scanning device is realized.
S130, determining a first device scanned based on each channel in the classic Bluetooth scanning process and a second device scanned based on each channel in the low-power Bluetooth scanning process;
illustratively, the first device may be a device that is scanned for each channel based on a classic bluetooth scan, and the second device may be a device that is scanned for each channel based on a bluetooth low energy scan. The box end can record first equipment scanned by each channel based on classical Bluetooth scanning and second equipment scanned by each channel based on low-power-consumption Bluetooth scanning when equipment scanning is carried out on the basis of time proportion, a first time interval, first time duration, a second time interval and second time duration, so that whether target equipment exists in the first equipment and the second equipment or not can be observed in real time when the box end is carrying out equipment scanning.
S140, if there is no target device in the first device and the second device, adjusting the time ratio based on the number of the first devices, the number of the second devices, the number of the first channels, and the number of the second channels.
For example, the target device may be a device that needs to be connected to the box terminal via bluetooth and is connected to a network. If there is no target device in the recorded first device and second device, the time ratio can be re-determined according to a certain calculation rule based on the number of the first devices, the number of the second devices, the number of the first channels and the number of the second channels, and the previous time ratio is adjusted. Therefore, the time ratio can be automatically adjusted according to the environmental complexity (the number of the first devices and the number of the second devices), the target device can be quickly scanned under the condition of large environmental interference, and the distribution network efficiency and the distribution network success rate are greatly improved.
It should be noted that, when the first device and the second device do not have the target device, and the second scanning is performed, the first time interval, the first duration, the second time interval, and the second duration are the same as those of the first scanning, and scanning after the second scanning is performed again only according to the adjusted time ratio and the first time interval, the first duration, the second time interval, and the second duration of the first scanning.
According to the technical scheme of the embodiment of the invention, the time occupation ratio of the classic Bluetooth scanning and the low-power Bluetooth scanning in the total scanning time of the box end is determined according to the number of the first channels of the classic Bluetooth scanning and the number of the second channels of the low-power Bluetooth scanning, so that under the condition of coexistence of the classic Bluetooth scanning and the low-power Bluetooth scanning, the problem that the scanning target equipment is easy to miss due to too short scanning time in the scanning mode with a large number of channels can be avoided if the time occupation ratios of the classic Bluetooth scanning and the low-power Bluetooth scanning in the total scanning time of the box end are the same, the target equipment can be equipment needing to be connected with the box end in a Bluetooth mode and distributed with a network, the time is saved, and the probability of missing the target equipment is reduced. The method comprises the steps of respectively determining a first time interval and a first time length of classical Bluetooth scanning and a second time interval and a second time length of low-power-consumption Bluetooth scanning, and controlling a box end to perform equipment scanning based on time ratio, the first time interval, the first time length, the second time interval and the second time length. When the box end scans the equipment, a first device scanned by each channel based on classical Bluetooth scanning and a second device scanned by each channel based on low-power Bluetooth scanning are determined, so that whether the first device and the second device have target equipment or not is observed in real time when the box end scans the equipment. If the first equipment and the second equipment are both provided with no target equipment, the time occupation ratio is adjusted based on the number of the first equipment, the number of the second equipment, the number of the first channels and the number of the second channels, so that the time occupation ratio can be automatically adjusted according to the environmental complexity, the target equipment can be quickly scanned under the condition of large environmental interference, and the distribution network efficiency and the distribution network success rate are greatly improved.
Example two
Fig. 2 is a flowchart of a network distribution method provided in an embodiment of the present invention, and the embodiment of the present invention is further optimized based on the above embodiment, and specifically includes the following steps:
s210, receiving a scanning instruction of the box end for equipment scanning, starting the box end based on the scanning instruction, and entering a distribution network mode;
illustratively, the scan command may be a control command for performing device scanning at the cassette end. Referring to the execution flow chart of the network distribution method shown in fig. 3, when the box end needs to be controlled to perform device scanning, a control instruction for performing device scanning at the box end may be generated, and the box end may be controlled to be opened according to the control instruction, and at this time, the box end enters a network distribution mode, so as to subsequently control the box end to perform device scanning and network distribution.
It should be noted that, before the box end performs the device scanning, the scanning device that performs the network distribution with the box end must also enter the network distribution mode, otherwise, the box end and the scanning device cannot perform the network distribution, where the scanning device may be any one of a mobile terminal, a computer end, a tablet, and the like, specifically, the scanning device may prompt the user to download the network distribution application of the scanning device end through a prompt box or through sound, and install the network distribution application at the scanning device end, so that the user opens the network distribution application of the scanning device end.
S220, determining the number of first channels scanned by classic Bluetooth and the number of second channels scanned by low-power Bluetooth, and determining the ratio of the number of the first channels to the number of the second channels as the time ratio of the first total scanning time length of classic Bluetooth scanning and the second total scanning time length of low-power Bluetooth scanning in the total scanning time length of a box end;
for example, after the box terminal enters the distribution network mode, according to the number of the first channels of the classic bluetooth scan and the number of the second channels of the bluetooth low energy scan, a ratio of the number of the first channels to the number of the second channels may be determined as a time ratio of a first total scanning duration of the classic bluetooth scan to a second total scanning duration of the bluetooth low energy scan in the box terminal total scanning duration, for example, if the number of the first channels is 79 and the number of the second channels is 3, then 79. Therefore, the time ratio of the classic Bluetooth scanning and the low-power Bluetooth scanning in the total scanning time of the box end can be determined strictly according to the number of channels of the classic Bluetooth scanning and the low-power Bluetooth scanning, the phenomenon that the scanning time is too short and the target equipment is missed due to the fact that the number of channels of any scanning mode is too large is avoided, and the efficiency of matching the target equipment is improved.
S230, respectively determining a first time interval and a first duration of the classic Bluetooth scanning and a second time interval and a second duration of the low-power Bluetooth scanning, and performing equipment scanning by a control box terminal based on the time ratio, the first time interval, the first duration, the second time interval and the second duration;
s240, determining a first device scanned by each channel based on the classic Bluetooth scanning and a second device scanned by each channel based on the low-power Bluetooth scanning;
s250, if no target device exists in the first device and the second device, determining the product of the number of the first devices and the number of the first channels as a first product; determining a product of the number of the second devices and the number of the second channels as a second product; and taking the ratio of the first product to the second product as the adjusted time ratio.
For example, when there is no target device in the first device and the second device, the number of the first device may be stored in an array, for example, a [ i ], the number of the second device may be stored in another array, for example, B [ i ], a product a of the number of the first device ASUM and the number of the first channels and a product B of the number of the second device BSUM and the number of the second channels are calculated, and a ratio of a to B is used as an adjusted time ratio, so as to perform subsequent device scanning with the adjusted time ratio, the first time interval, the first time duration, the second time interval, and the second time duration. Therefore, the influence of the environment complexity on the distribution network is reduced, the time ratio is continuously and automatically adjusted according to the environment complexity, and the target equipment can be quickly scanned under the condition of large environment interference, so that the distribution network efficiency and the distribution network success rate are greatly improved.
Optionally, if the target device is present in the first device or the second device, the service set identifier and the password are parsed from the bluetooth name preset in the target device, and the box end and the target device are connected by bluetooth using the parsed service set identifier and password.
Illustratively, when the first device or the second device has a target device, the service set identifier and the password are parsed from the bluetooth name preset by the target device, and the box terminal and the target device can be connected by bluetooth by using the parsed service set identifier and password.
The bluetooth name may be preset by a user before opening a distribution network application at a scanning device (e.g., a mobile phone), and may be a name including a feature identification field and an identification field, where the positions of the special identification field and the identification field may be customized, such as: if the special identification field is defined as Q @ and the position is defined as the beginning, then Q @ + Service Set identification (Service Set Identifier, ssid) + password forms a Bluetooth name, after the box end scans the Bluetooth name beginning with Q @, scanning is stopped, and the name is analyzed, and the ssid and the password can exist in the form of American Standard Code for Information exchange (ASCII) Code or other forms.
After the scanning equipment terminal enters a distribution network mode, the application of the android mobile phone or the linux mobile phone has the authority to set the Bluetooth name, so that the Bluetooth name can be directly set in the previously defined Bluetooth name format. The application of the mobile phone also has the authority to directly acquire the ssid and the password stored in the mobile phone, so that the user can select to directly use the ssid and the password of the mobile phone, or manually input the ssid and the password, and the ssid and the password input by the user or the password stored in the mobile phone are set as the bluetooth name in the previously defined bluetooth name format. For example, the Q @ + ssid + password constitutes the bluetooth name. The distribution network application can call a Bluetooth visible interface of the system to set Bluetooth visible, namely Bluetooth broadcast actually, and the broadcast content is the set Bluetooth name.
Because the application of the apple mobile phone does not have the authority to set the Bluetooth name, but has the authority to call the low-power Bluetooth broadcast interface, the distribution network application of the apple version is somewhat different from the android version, and the distribution network application of the apple version does not have the authority to acquire the ssid and the password stored on the mobile phone, so that the ssid and the password can only be acquired by manually inputting the ssid and the password by a user. After the distribution network application of the apple version acquires the ssid and the password input by the user, the low-power-consumption Bluetooth broadcasting interface is called, the ssid and the password are set into broadcasting contents in a previously defined format (such as Q @ + ssid + password), and then the broadcasting contents are sent.
According to the technical scheme of the embodiment of the invention, the box end is opened and the distribution network mode is entered by receiving the scanning instruction of the box end for equipment scanning based on the scanning instruction, so that the box end is controlled to carry out equipment scanning and distribution network in the following process. The ratio of the number of the first channels to the number of the second channels is determined as the time ratio of the first total scanning time of the classic Bluetooth scanning and the second total scanning time of the low-power Bluetooth scanning in the total scanning time of the box end, so that the time ratio of the classic Bluetooth scanning and the low-power Bluetooth scanning in the total scanning time of the box end can be determined strictly according to the number of the channels of the classic Bluetooth scanning and the low-power Bluetooth scanning, the phenomenon that the scanning time is too short and the target equipment is missed due to too much number of the channels of any scanning mode is avoided, and the efficiency of matching the target equipment is improved. When the first device and the second device are both provided with no target device, the ratio of the product of the number of the first devices and the number of the first channels to the product of the number of the second devices and the number of the second channels can be used as the adjusted time ratio, so that the influence of the environment complexity on the distribution network is reduced, the time ratio can be adjusted continuously and automatically according to the environment complexity, and the target device can be scanned quickly under the condition of large environment interference, so that the distribution network efficiency and the distribution network success rate are greatly improved.
EXAMPLE III
Fig. 4 is a schematic structural diagram of a distribution network device provided in a third embodiment of the present invention, and as shown in fig. 4, the device includes: a time ratio determination module 31, a device scanning control module 32, a scanning device determination module 33, and a time ratio adjustment module 34.
The time duty ratio determining module 31 is configured to determine a time duty ratio of a first total scanning duration of the classic bluetooth scanning and a second total scanning duration of the low-power bluetooth scanning in a box-end total scanning duration based on the number of first channels of the classic bluetooth scanning and the number of second channels of the low-power bluetooth scanning;
a device scanning control module 32, configured to determine a first time interval and a first duration of the classic bluetooth scanning, and a second time interval and a second duration of the low power consumption bluetooth scanning, respectively, where the control box performs the device scanning based on the time ratio, the first time interval, the first duration, the second time interval, and the second duration;
a scanning device determining module 33, configured to determine a first device scanned based on each channel in the classic bluetooth scan and a second device scanned based on each channel in the bluetooth low energy scan;
a time share ratio adjusting module 34, configured to adjust the time share ratio based on the number of the first devices, the number of the second devices, the number of the first channels, and the number of the second channels if there is no target device in the first devices and the second devices.
In the technical solution of the above embodiment, the device scanning control module 32 includes:
a first parameter determining unit, configured to determine the first time interval and the first duration based on a range standard of a scanning time interval and a scanning duration of the classic bluetooth scanning;
and the second parameter determining unit is used for determining the second time interval and the second time length based on the range standard of the scanning time interval and the scanning time length of the low-power Bluetooth scanning.
In the technical solution of the above embodiment, the first parameter determining unit includes:
a first time interval determination subunit, configured to determine the first time interval based on a lowest criterion of range criteria of a scanning time interval of the classic bluetooth scan and a distribution network indicator;
and the first time length determining subunit is used for determining the first time length based on the first time interval, the range standard of the scanning time length of the classic Bluetooth scanning and a first preset floating threshold value.
In the technical solution of the above embodiment, the second parameter determining unit includes:
a second time interval determination subunit, configured to determine the second time interval based on a distribution network index and a lowest standard in range standards of a scanning time interval of the bluetooth low energy scanning;
and the second duration determining subunit is used for determining the second duration based on the second time interval, the range standard of the scanning duration of the low-power Bluetooth low-energy scanning and a second preset floating threshold.
In the technical solution of the above embodiment, the time ratio adjusting module 34 includes:
a first product determining unit, configured to determine a product of the number of the first devices and the number of the first channels as a first product;
a second product determining unit, configured to determine a product of the number of the second devices and the number of the second channels as a second product;
a time ratio adjusting unit configured to use a ratio of the first product and the second product as the adjusted time ratio.
In the technical solution of the above embodiment, the time ratio determining module 31 includes:
and the time ratio determining unit is used for determining the number of first channels scanned by the classic Bluetooth and the number of second channels scanned by the low-power Bluetooth, and determining the ratio of the number of the first channels to the number of the second channels as the time ratio of the first total scanning time of the classic Bluetooth scanning and the second total scanning time of the low-power Bluetooth scanning in the total scanning time of the box end.
On the basis of the technical scheme of the embodiment, the device further comprises:
and the Bluetooth connection module is used for analyzing a service set identifier and a password from a Bluetooth name preset by the target equipment if the target equipment exists in the first equipment or the second equipment, and performing Bluetooth connection on the box end and the target equipment by using the analyzed service set identifier and password.
On the basis of the technical scheme of the embodiment, the device further comprises:
the distribution network module entering module is used for receiving a scanning instruction of the box end for equipment scanning; and opening the box end based on the scanning instruction, and entering a distribution network mode.
The network distribution device provided by the embodiment of the invention can execute the network distribution method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example four
Fig. 4 is a schematic structural diagram of an apparatus according to a fourth embodiment of the present invention, as shown in fig. 4, the apparatus includes a processor 40, a memory 41, an input device 42, and an output device 43; the number of processors 40 in the device may be one or more, and one processor 40 is taken as an example in fig. 4; the processor 40, the memory 41, the input means 42 and the output means 43 in the device may be connected by a bus or other means, as exemplified by the bus connection in fig. 4.
The memory 41 serves as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the distribution network method in the embodiment of the present invention (e.g., the time ratio determination module 31, the device scanning control module 32, the scanning device determination module 33, and the time ratio adjustment module 34). The processor 40 executes software programs, instructions and modules stored in the memory 41, so as to execute various functional applications and data processing of the device, that is, to implement the network distribution method.
The memory 41 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 41 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 41 may further include memory located remotely from processor 40, which may be connected to the device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 42 is operable to receive input numeric or character information and to generate key signal inputs relating to user settings and function controls of the apparatus. The output device 43 may include a display device such as a display screen.
EXAMPLE five
Fifth, an embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a network distribution method.
Of course, the storage medium including the computer-executable instructions provided in the embodiments of the present invention is not limited to the above method operations, and may also perform related operations in the distribution network method provided in any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the distribution network device, the units and modules included in the embodiment are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for network distribution, comprising:
determining the time ratio of the first total scanning time length of the classic Bluetooth scanning and the second total scanning time length of the low-power Bluetooth scanning in the box end total scanning time length based on the number of the first channels of the classic Bluetooth scanning and the number of the second channels of the low-power Bluetooth scanning;
respectively determining a first time interval and a first time length of the classic Bluetooth scanning and a second time interval and a second time length of the low-power Bluetooth scanning, and carrying out equipment scanning by a control box end based on the time ratio, the first time interval, the first time length, the second time interval and the second time length;
determining a first device scanned based on each channel during the classic bluetooth scan and a second device scanned based on each channel during the bluetooth low energy scan;
if no target device exists in the first device and the second device, adjusting the time ratio based on the number of the first devices, the number of the second devices, the number of the first channels and the number of the second channels.
2. The method of claim 1, the determining a first time interval and a first duration of the classic bluetooth scan, and a second time interval and a second duration of the bluetooth low energy scan, respectively, comprising:
determining the first time interval and the first duration based on a range criterion of a scan time interval and a scan duration of the classic bluetooth scan;
and determining the second time interval and the second duration based on the range standard of the scanning time interval and the scanning duration of the low-power Bluetooth scanning.
3. The method of claim 2, wherein determining the first time interval and the first duration based on a range criterion of a scan time interval and a scan duration of the classic bluetooth scan comprises:
determining the first time interval based on a lowest criterion of range criteria of a scanning time interval of the classic bluetooth scan and a distribution network indicator;
and determining the first time length based on the first time interval, the range standard of the scanning time length of the classic Bluetooth scanning and a first preset floating threshold value.
4. The method of claim 2, wherein determining the second time interval and the second duration based on range criteria of a scan time interval and a scan duration of the bluetooth low energy scan comprises:
determining the second time interval based on the lowest standard in the range standard of the scanning time interval of the low-power Bluetooth scanning and the distribution network index;
and determining the second time length based on the second time interval, the range standard of the scanning time length of the low-power Bluetooth scanning and a second preset floating threshold value.
5. The method of claim 1, wherein adjusting the time fraction based on the number of first devices, the number of second devices, the number of first channels, and the number of second channels comprises:
determining a product of the number of the first devices and the number of the first channels as a first product;
determining a product of the number of the second devices and the number of the second channels as a second product;
and taking the ratio of the first product and the second product as the adjusted time ratio.
6. The method of claim 1, wherein determining a time ratio of a first total scan duration of the classic bluetooth scan to a second total scan duration of the bluetooth low energy scan in a box-end total scan duration based on the number of first channels of the classic bluetooth scan and the number of second channels of the bluetooth low energy scan comprises:
determining the number of first channels scanned by classic Bluetooth and the number of second channels scanned by low-power Bluetooth, and determining the ratio of the number of the first channels to the number of the second channels as the time ratio of the first total scanning time of classic Bluetooth scanning and the second total scanning time of low-power Bluetooth scanning in the total scanning time of a box end.
7. The method of claim 1, further comprising:
if the target equipment exists in the first equipment or the second equipment, analyzing a service set identifier and a password from a Bluetooth name preset by the target equipment, and performing Bluetooth connection on the box end and the target equipment by using the analyzed service set identifier and password.
8. The method of claim 1, wherein before determining a time ratio of a first total scan duration of the classical bluetooth scan and a second total scan duration of the bluetooth low energy scan in a box-end total scan duration based on the first number of channels of the classical bluetooth scan and the second number of channels of the bluetooth low energy scan, the method further comprises:
receiving a scanning instruction of the box end for equipment scanning;
and opening the box end based on the scanning instruction, and entering a distribution network mode.
9. An apparatus, characterized in that the apparatus comprises:
one or more processors;
storage means for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the network distribution method of any of claims 1-8.
10. A storage medium containing computer-executable instructions, which when executed by a computer processor, operate to perform the network distribution method of any of claims 1-8.
CN202010190359.5A 2020-03-18 2020-03-18 Network distribution method, equipment and storage medium Active CN111405536B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010190359.5A CN111405536B (en) 2020-03-18 2020-03-18 Network distribution method, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010190359.5A CN111405536B (en) 2020-03-18 2020-03-18 Network distribution method, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111405536A CN111405536A (en) 2020-07-10
CN111405536B true CN111405536B (en) 2023-03-24

Family

ID=71428837

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010190359.5A Active CN111405536B (en) 2020-03-18 2020-03-18 Network distribution method, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111405536B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112469020B (en) * 2020-12-08 2021-05-07 深圳新蕊科技有限公司 Bluetooth BLE communication method and Bluetooth chip system
CN113676881B (en) * 2021-08-06 2024-05-07 Oppo广东移动通信有限公司 Equipment control method, device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105898682A (en) * 2016-04-11 2016-08-24 上海斐讯数据通信技术有限公司 Method and system for Bluetooth communication
CN106792488A (en) * 2017-02-14 2017-05-31 安徽华米信息科技有限公司 Bluetooth scan method, apparatus and system
WO2018165862A1 (en) * 2017-03-14 2018-09-20 华为技术有限公司 Scanning method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9432834B2 (en) * 2015-01-03 2016-08-30 Google Inc. Methods and systems for varying channel scanning duration

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105898682A (en) * 2016-04-11 2016-08-24 上海斐讯数据通信技术有限公司 Method and system for Bluetooth communication
CN106792488A (en) * 2017-02-14 2017-05-31 安徽华米信息科技有限公司 Bluetooth scan method, apparatus and system
WO2018165862A1 (en) * 2017-03-14 2018-09-20 华为技术有限公司 Scanning method and device

Also Published As

Publication number Publication date
CN111405536A (en) 2020-07-10

Similar Documents

Publication Publication Date Title
CN110933614B (en) Communication processing method and device and electronic equipment
CN111405536B (en) Network distribution method, equipment and storage medium
CN111866998A (en) Bluetooth network distribution method, equipment and storage medium
EP3151628A1 (en) Method, device and system for accessing a wireless network
CN110932953A (en) Intelligent household control method and device, computer equipment and storage medium
US9572187B2 (en) Information processing apparatus, information processing method, and program
CN104618780A (en) Method and system for controlling electrical apparatus
CN112152853A (en) Equipment network distribution method and device, computer-readable storage medium and electronic device
CN110996405A (en) Earphone connection method, terminal, earphone box and computer readable storage medium
CN102265578A (en) System and method of switching from streaming content to local content
EP4192114A1 (en) Access control method and apparatus, and communication device
CN113395687A (en) Reconnection method, reconnection device, electronic equipment and storage medium
CN111865736A (en) Equipment control method and device
CN111356209B (en) Multi-frequency WiFi hotspot opening method and device, storage medium and electronic equipment
CN111918256A (en) Intelligent device network distribution method and device based on Bluetooth and storage medium
CN111970676B (en) WiFi hot spot access method, device, equipment and storage medium
KR20040105032A (en) remote function changing system of the cellular-phone and controlling method therefore
JPH10136462A (en) Radio transmission system consisting of mobile communication station and method and device for connecting such system
JP2872621B2 (en) Roaming control method for digital mobile phone
CN105828253A (en) Wireless connection control method and device in audio playing system
US20040090944A1 (en) Wireless LAN system and method for setting a frequency in the same system
CN104968057A (en) Intelligent hardware device automatic networking method and system
US5978686A (en) Selective call receiver with priority based network selection
WO2023165246A1 (en) Bluetooth protocol communication method, electronic device, apparatus, storage medium and product
CN111917595A (en) System upgrading method and device, intelligent equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant