CN112188456B - Bluetooth device data acquisition method and device, storage medium and electronic device - Google Patents

Bluetooth device data acquisition method and device, storage medium and electronic device Download PDF

Info

Publication number
CN112188456B
CN112188456B CN202011025284.1A CN202011025284A CN112188456B CN 112188456 B CN112188456 B CN 112188456B CN 202011025284 A CN202011025284 A CN 202011025284A CN 112188456 B CN112188456 B CN 112188456B
Authority
CN
China
Prior art keywords
bluetooth
bluetooth devices
devices
data corresponding
data
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
CN202011025284.1A
Other languages
Chinese (zh)
Other versions
CN112188456A (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.)
Sunwave Communications Co Ltd
Original Assignee
Sunwave Communications 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 Sunwave Communications Co Ltd filed Critical Sunwave Communications Co Ltd
Priority to CN202011025284.1A priority Critical patent/CN112188456B/en
Publication of CN112188456A publication Critical patent/CN112188456A/en
Application granted granted Critical
Publication of CN112188456B publication Critical patent/CN112188456B/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses
    • 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

Abstract

The invention discloses a data acquisition method and device for Bluetooth equipment, a storage medium and an electronic device. The method comprises the following steps: acquiring characteristic data corresponding to a plurality of Bluetooth devices respectively, wherein the characteristic data comprises collected data corresponding to the Bluetooth devices; according to the characteristic data, screening M first Bluetooth devices matched with a cache queue from the plurality of Bluetooth devices, wherein M is a natural number; and storing the acquired data corresponding to the M first Bluetooth devices according to a preset storage rule. Under the condition of ensuring lower cost, the data acquisition of more devices is realized.

Description

Bluetooth device data acquisition method and device, storage medium and electronic device
Technical Field
The invention relates to the field of communication, in particular to a data acquisition method and device for Bluetooth equipment, a storage medium and an electronic device.
Background
Today, data acquisition is widely applied to the internet and distributed fields, and the application of bluetooth devices in the field of wireless transmission is indispensable to data acquisition.
When the application of bluetooth equipment is to data acquisition, often all be one-to-one collection, it is not efficient. For example: the Bluetooth data acquisition is a master-slave all-in-one machine which can be used as a host connecting device and connected with a mobile phone APP to complete single-device acquisition. However, such single device data collection does not work for data analysis, big data application models. Moreover, the single-equipment data acquisition mode wastes equipment resources, so that the project investment is increased.
Therefore, how to save the device resources and how to collect data by multiple devices is an urgent problem to be solved.
Disclosure of Invention
The embodiment of the invention provides a data acquisition method and device for Bluetooth equipment, a storage medium and an electronic device, which are used for realizing data acquisition of more equipment under the condition of ensuring lower cost.
According to an aspect of the embodiments of the present invention, there is provided a data acquisition method for a bluetooth device, including: acquiring characteristic data corresponding to a plurality of Bluetooth devices respectively, wherein the characteristic data comprises collected data corresponding to the Bluetooth devices; according to the characteristic data, screening M first Bluetooth devices matched with a cache queue from the plurality of Bluetooth devices, wherein M is a natural number; and storing the acquired data corresponding to the M first Bluetooth devices according to a preset storage rule.
According to another aspect of the embodiments of the present invention, there is also provided a data collecting apparatus for bluetooth devices, including: the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring characteristic data corresponding to a plurality of Bluetooth devices respectively, and the characteristic data comprises acquired data corresponding to the Bluetooth devices; the screening unit is used for screening M first Bluetooth devices matched with the cache queue from the plurality of Bluetooth devices according to the characteristic data, wherein M is a natural number; and the storage unit is used for storing the acquired data corresponding to the M first Bluetooth devices according to a preset storage rule.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to execute the above-mentioned data acquisition method for a bluetooth device when running.
According to another aspect of the embodiments of the present invention, there is also provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the above-mentioned data acquisition method for the bluetooth device through the computer program.
According to the invention, firstly, the characteristic data corresponding to a plurality of Bluetooth devices respectively is obtained, and the characteristic data comprises the acquired data corresponding to each Bluetooth device; according to the characteristic data, screening M first Bluetooth devices matched with the cache queue from the plurality of Bluetooth devices; and storing the acquired data corresponding to the M first Bluetooth devices according to a preset storage rule. For multiple data acquisition, it is more advantageous to compute the data model centrally. In the embodiment of the application, the collected data of the M first bluetooth devices matched with the buffer queue in the plurality of bluetooth devices can be simultaneously acquired and stored. And then can realize the data report of a plurality of bluetooth equipments. The method can realize data acquisition of more devices under the condition of ensuring lower cost.
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 schematic diagram of an architecture of a data acquisition system of a bluetooth device according to an embodiment of the present application;
fig. 2 is a schematic diagram of a flow of a data acquisition method for a bluetooth device according to an embodiment of the present application;
fig. 3A is a schematic flowchart of establishing connections with the bluetooth devices according to an embodiment of the present disclosure;
fig. 3B is a schematic flowchart of another data acquisition method for a bluetooth device according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an alternative data acquisition apparatus for a bluetooth device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an alternative electronic device according to an embodiment of the 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 "third," etc. in the description and claims of the present invention and the above-described drawings 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 other sequences 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.
The following describes one of the bluetooth device data acquisition system architectures on which the embodiments of the present application are based. Referring to fig. 1, fig. 1 is a schematic diagram of an architecture of a data acquisition system for bluetooth devices according to an embodiment of the present application, and as shown in fig. 1, the data acquisition system includes: a plurality of bluetooth devices and collection equipment.
The acquisition device may be a terminal device with a bluetooth function, and the terminal device may be a device or a module providing computing services. The system can respond to the service request and perform data processing, and can also undertake related communication services and guarantee the capability of the service. The device can also be a device connected with a server and can perform data interaction with a third-party server. When the acquisition equipment is a mobile phone only, the acquisition equipment can acquire characteristic data corresponding to a plurality of Bluetooth equipment respectively, wherein the characteristic data comprises the acquired data corresponding to the Bluetooth equipment; according to the characteristic data, screening M first Bluetooth devices matched with a cache queue from the plurality of Bluetooth devices, wherein M is a natural number; and storing the acquired data corresponding to the M first Bluetooth devices according to a preset storage rule.
The Bluetooth device can be a device with a Bluetooth system, such as an application intelligent home, an intelligent wearable device, a consumer electronics device, an instrument, an intelligent traffic device, an intelligent medical device, a security device, an automobile device, a remote control device and the like. For example: the bluetooth device may be a medical device with a bluetooth system. The Bluetooth device can perform data interaction with the acquisition device, so that data of the Bluetooth device can be uploaded to the acquisition device or a third-party device connected with the acquisition device.
It can be understood that the collecting device in fig. 1 can be connected with a plurality of bluetooth devices at the same time, so as to perform data interaction.
It is further understood that the bluetooth device data acquisition system architecture in fig. 1 is only an exemplary implementation manner in the embodiment of the present invention, and the bluetooth device data acquisition system architecture in the embodiment of the present invention includes, but is not limited to, the above bluetooth device data acquisition system architecture.
Referring to fig. 2, fig. 2 is a schematic diagram of a flow of a data acquisition method for a bluetooth device according to an embodiment of the present application. The bluetooth device data collecting system applicable to fig. 1 is described below with reference to fig. 2 from a single side of the bluetooth device data collecting apparatus. The method may comprise the following steps S1-S3.
Step S1: and acquiring characteristic data corresponding to the plurality of Bluetooth devices respectively.
Specifically, feature data corresponding to a plurality of bluetooth devices are obtained, and the feature data include collected data corresponding to the bluetooth devices. The Bluetooth device can be a device with a Bluetooth system, such as an application intelligent home, an intelligent wearable device, a consumer electronics device, an instrument, an intelligent traffic device, an intelligent medical device, a security device, an automobile device, a remote control device and the like.
As an optional scheme, before obtaining feature data corresponding to each of the plurality of bluetooth devices, the method further includes: and establishing connection with the plurality of Bluetooth devices. For example: referring to fig. 3A, fig. 3A is a schematic flowchart illustrating a process of establishing a connection with the bluetooth devices according to an embodiment of the present disclosure. As shown in fig. 3A, receiving broadcast data of a bluetooth device; judging whether the Bluetooth equipment is available equipment or not according to the broadcast data; if yes, inquiring whether the Bluetooth connection circular queue is cached, if not, connecting the equipment, and storing the connection handle into the circular queue for caching. If the connection is unsuccessful or the connection is buffered in the Bluetooth connection circular queue, the Bluetooth equipment is scanned again.
As an alternative, 1. Data configuration, dynamic configuration of connection devices, data formats, and the like. 2. And receiving the broadcast data of the Bluetooth equipment, adopting the interface to carry out unified management, and reading the dynamic setting to connect the specific equipment. 3. The equipment is uniformly managed to a data queue, and optimized connection processing is carried out on the equipment by adopting a special value (such as MAC address).
And S2, screening M first Bluetooth devices matched with the buffer queue from the plurality of Bluetooth devices according to the characteristic data.
Specifically, according to the feature data, M first bluetooth devices matched with the buffer queue are selected from the plurality of bluetooth devices, where M is a natural number. It is to be understood that the first bluetooth device is screened from the plurality of bluetooth devices.
As an optional solution, the feature data includes a device identifier, where the device identifier is used to indicate a bluetooth device; the aforesaid is according to above-mentioned feature data, from above-mentioned a plurality of bluetooth equipment, screens out the M first bluetooth equipment that matches with the buffer queue, includes: matching the device identifications respectively corresponding to the plurality of Bluetooth devices with one or more pre-configured device identifications in the cache queue to obtain M first device identifications; and determining the M first Bluetooth devices according to the M first device identifications. The buffer queue may be preconfigured with a plurality of device identifiers, and if the device identifiers corresponding to the plurality of bluetooth devices are preconfigured in the buffer queue, the bluetooth device corresponding to the device identifier is the first bluetooth device. Referring to fig. 3B, fig. 3B is a schematic flowchart of another data acquisition method for a bluetooth device according to an embodiment of the present disclosure. As shown in fig. 3B: and comparing the current MAC address with the MAC address in the data cache, and if the MAC address is found in the data cache, determining the Bluetooth device corresponding to the MAC address as the first Bluetooth device.
Alternatively, the device identifier may be a MAC address, which is a MAC address, also called a local area network address, a MAC address, an ethernet address or a physical address, and is an address used to identify the location of the network device.
And S3, storing the acquired data corresponding to the M first Bluetooth devices according to a preset storage rule.
Specifically, the collected data corresponding to the M first bluetooth devices are stored according to a preset storage rule. For example: the data storage can calculate the data edge, adopts time sequencing and discards unavailable collected data; and performing a Huffman compression algorithm on the data, and discarding useless data to reduce the pressure of data transmission.
As an optional scheme, the storing the collected data corresponding to the M first bluetooth devices according to a preset storage rule includes: acquiring acquisition time corresponding to the M first Bluetooth devices respectively, wherein the acquisition time corresponding to each first Bluetooth device is the time for acquiring the acquired data from the first Bluetooth device; and storing the acquired data corresponding to a second Bluetooth device in the M first Bluetooth devices, wherein the second Bluetooth device is a Bluetooth device of which the time length between the acquisition time and the current time is greater than the preset acquisition time length.
As an optional scheme, the storing the collected data corresponding to the second bluetooth device in the M first bluetooth devices includes: and when the target storage area is not full, storing the acquired data corresponding to the second Bluetooth device, wherein the target storage area is used for storing the acquired data of the M first Bluetooth devices. As shown in fig. 3B: and sequencing the cache data according to the time, recording the time of the sequenced latest data, judging whether the residual cache of the single Bluetooth sensor is full if the difference between the latest time and the current time is greater than a set acquisition time value, and storing the data if the residual cache of the single Bluetooth sensor is not full. The plurality of target storage areas can store the acquired data corresponding to the plurality of Bluetooth devices one to one; or one target storage area can store the corresponding acquired data of a plurality of Bluetooth devices.
As an optional scheme, the storing the collected data corresponding to the second bluetooth device in the M first bluetooth devices includes: and when the target storage area is full, discarding the acquired data corresponding to the second Bluetooth device.
As an optional scheme, the storing the collected data corresponding to the M first bluetooth devices according to a preset storage rule includes: acquiring acquisition time corresponding to the M first Bluetooth devices respectively, wherein the acquisition time corresponding to each first Bluetooth device is the time for acquiring the acquired data from the first Bluetooth device; and discarding the acquired data corresponding to the first Bluetooth equipment except the second Bluetooth equipment in the M first Bluetooth equipment, wherein the second Bluetooth equipment is the Bluetooth equipment of which the time length between the acquisition time and the current time is greater than the preset acquisition time length.
And step S4: and screening out N third Bluetooth devices which are not in the cache queue from the plurality of Bluetooth devices according to the characteristic data.
Specifically, according to the feature data, N third bluetooth devices that are not in the buffer queue are selected from the plurality of bluetooth devices, where N is a natural number.
Step S5: and when the sum of the M and the N is greater than a preset threshold value, storing the acquired data corresponding to Q fourth Bluetooth devices in the N third Bluetooth devices, wherein Q is a natural number.
Specifically, when the sum of M and N is greater than a preset threshold, the collected data corresponding to Q fourth bluetooth devices in the N third bluetooth devices is stored, where the sum of M and Q is equal to the preset threshold, and a signal value corresponding to the Q fourth bluetooth devices is greater than a signal value of a third bluetooth device, other than the Q fourth bluetooth devices, in the N third bluetooth devices. As shown in fig. 3B, when the sum of M and N is greater than the preset threshold, the collected data corresponding to the fourth bluetooth device may be stored, where the fourth bluetooth device is the first Q bluetooth devices in the N third bluetooth devices. For example: when the preset threshold value is 10,m =5 and n =7, it is determined that the first 5 bluetooth devices with signal values in the 7 third bluetooth devices are the fourth bluetooth devices, the collected data of the 4 fourth bluetooth devices is saved, and the data collected by the remaining 2 bluetooth devices with weaker signal values are discarded.
As an alternative, the characteristic data includes a signal value; the method further comprises the following steps: according to the characteristic data, screening out N third Bluetooth devices which are not in the cache queue from the plurality of Bluetooth devices, wherein N is a natural number; and when the sum of the M and the N is greater than a preset threshold value, discarding the acquired data corresponding to third Bluetooth devices except the Q fourth Bluetooth devices in the N third Bluetooth devices, wherein the signal values corresponding to the Q fourth Bluetooth devices are greater than the signal values of the third Bluetooth devices except the Q fourth Bluetooth devices in the N third Bluetooth devices.
As an optional scheme, when the sum of M and N is greater than a preset threshold, storing the collected data corresponding to the N third bluetooth devices. For example: when the preset threshold value is 10,M =5,N =2, directly saving the collected data of the 2 fourth Bluetooth devices.
As an optional solution, the method further includes: and when the sum of the M and the N is greater than a preset threshold value, sorting according to the signal values respectively corresponding to the N third Bluetooth devices. The Signal values are understood to be RSSI values, RSSI (Received Signal Strength Indication) being an Indication of the Received Signal Strength. That is, it can also be understood that the receiver receives a wideband received power over the channel bandwidth.
According to the invention, firstly, the characteristic data corresponding to a plurality of Bluetooth devices respectively is obtained, and the characteristic data comprises the acquired data corresponding to each Bluetooth device; according to the characteristic data, screening M first Bluetooth devices matched with the cache queue from the plurality of Bluetooth devices, wherein M is a natural number; and storing the acquired data corresponding to the M first Bluetooth devices according to a preset storage rule. For multiple data acquisition, it is more advantageous to compute the data model centrally. In the embodiment of the application, the collected data of the M first bluetooth devices matched with the buffer queue in the plurality of bluetooth devices can be simultaneously acquired and stored. And then can realize the data report of a plurality of bluetooth equipments. The method can realize data acquisition of more devices under the condition of ensuring lower cost.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
According to another aspect of the embodiment of the present invention, a data collecting apparatus for bluetooth devices is further provided, please refer to fig. 4, where fig. 4 is a schematic structural diagram of an alternative data collecting apparatus for bluetooth devices according to the embodiment of the present invention. As shown in fig. 4, the apparatus includes: the obtaining unit 401, the first filtering unit 402, and the first storage unit 403 may further include: a second screening unit 404, a second storage unit 405, a discarding unit 406 and a third storage unit 407.
An obtaining unit 401, configured to obtain feature data corresponding to multiple bluetooth devices, where the feature data includes collected data corresponding to the bluetooth devices;
a first screening unit 402, configured to screen, according to the feature data, M first bluetooth devices that match the buffer queue from the multiple bluetooth devices, where M is a natural number;
the first storage unit 403 is configured to store the acquired data corresponding to the M first bluetooth devices according to a preset storage rule.
According to the invention, firstly, the characteristic data respectively corresponding to a plurality of Bluetooth devices is obtained, wherein the characteristic data comprises the acquired data corresponding to each Bluetooth device; according to the characteristic data, screening M first Bluetooth devices matched with the cache queue from the plurality of Bluetooth devices, wherein M is a natural number; and storing the acquired data corresponding to the M first Bluetooth devices according to a preset storage rule. For multiple data acquisition, it is more advantageous to compute the data model centrally. In the embodiment of the application, the collected data of the M first bluetooth devices matched with the buffer queue in the plurality of bluetooth devices can be simultaneously acquired and stored. And then can realize the data report of a plurality of bluetooth equipments. The method can realize data acquisition of more devices under the condition of ensuring lower cost.
As an optional solution, the feature data includes a device identifier, where the device identifier is used to indicate a bluetooth device; the first screening unit 402 is specifically configured to: matching device identifiers corresponding to the plurality of Bluetooth devices with one or more pre-configured device identifiers in the cache queue to obtain M first device identifiers; and determining the M first Bluetooth devices according to the M first device identifications.
As an optional solution, the first storage unit 403 is specifically configured to: acquiring acquisition time corresponding to the M first Bluetooth devices respectively, wherein the acquisition time corresponding to each first Bluetooth device is the time for acquiring the acquired data from the first Bluetooth device; and storing the acquired data corresponding to a second Bluetooth device in the M first Bluetooth devices, wherein the second Bluetooth device is a Bluetooth device of which the time length between the acquisition time and the current time is greater than the preset acquisition time length.
As an optional solution, the first storage unit 403 is specifically configured to: when the target storage area is not full, storing the acquired data corresponding to the second Bluetooth device, wherein the target storage area is used for storing the acquired data of the M first Bluetooth devices; or, when the target storage area is full, discarding the collected data corresponding to the second bluetooth device.
As an alternative, the characteristic data includes a signal value; the above-mentioned device still includes: a second filtering unit 404, configured to filter, according to the feature data, N third bluetooth devices that are not in the cache queue from the multiple bluetooth devices, where N is a natural number; a second storage unit 405, configured to store collected data corresponding to Q fourth bluetooth devices in the N third bluetooth devices when a sum of M and the N is greater than a preset threshold, where the sum of M and the Q is equal to the preset threshold, a signal value corresponding to the Q fourth bluetooth devices is greater than a signal value of a third bluetooth device, other than the Q fourth bluetooth devices, in the N third bluetooth devices, and Q is a natural number.
As an optional solution, the apparatus further includes: a discarding unit 406, configured to discard the acquired data corresponding to the third bluetooth devices, except the Q fourth bluetooth devices, in the N third bluetooth devices.
As an optional solution, the apparatus further includes: a third storage unit 407, configured to store the collected data corresponding to the N third bluetooth devices when a sum of the M and the N is greater than a preset threshold.
According to a further aspect of an embodiment of the present invention, there is also provided a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the above-mentioned computer-readable storage medium may be configured to store a computer program for executing the steps of:
s1, acquiring characteristic data corresponding to a plurality of Bluetooth devices respectively, wherein the characteristic data comprises acquired data corresponding to the Bluetooth devices;
s2, according to the characteristic data, screening M first Bluetooth devices matched with a cache queue from the plurality of Bluetooth devices, wherein M is a natural number;
and S3, storing the acquired data corresponding to the M first Bluetooth devices according to a preset storage rule.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the various methods in the foregoing embodiments may be implemented by a program instructing hardware related to the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, ROM (Read-Only memories), RAM (Random Access memories), magnetic or optical disks, etc.
According to another aspect of the embodiment of the present invention, there is also provided an electronic apparatus for implementing the data acquisition of the bluetooth device, please refer to fig. 5, fig. 5 is a schematic structural diagram of an alternative electronic apparatus according to the embodiment of the present invention, as shown in fig. 5, the electronic apparatus includes a memory 502 and a processor 505, the memory 502 stores a computer program, and the processor 504 is configured to execute the steps in any one of the method embodiments through the computer program.
Optionally, in this embodiment, the electronic apparatus may be located in at least one network device of a plurality of network devices of a computer network.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
acquiring characteristic data corresponding to a plurality of Bluetooth devices respectively, wherein the characteristic data comprises collected data corresponding to the Bluetooth devices; according to the characteristic data, screening M first Bluetooth devices matched with a cache queue from the plurality of Bluetooth devices, wherein M is a natural number; and storing the acquired data corresponding to the M first Bluetooth devices according to a preset storage rule.
Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 5 is only an illustration, and the electronic device may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 5 is a diagram illustrating the structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 5, or have a different configuration than shown in FIG. 5.
The memory 502 may be used to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for collecting data of a bluetooth device in the embodiments of the present invention, and the processor 504 executes various functional applications and original data information transmission by running the software programs and modules stored in the memory 502, that is, the method for collecting data of a bluetooth device is implemented. The memory 502 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 502 may further include memory located remotely from the processor 504, which may be connected to the terminal 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. As an example, as shown in fig. 5, the memory 502 may include, but is not limited to, the obtaining unit 401, the first filtering unit 402, the first storage unit 403, the second filtering unit 404, the second storage unit 405, the discarding unit 406, and the third storage unit 407 in the bluetooth device data acquisition apparatus. In addition, the bluetooth device data acquisition apparatus may further include, but is not limited to, other module units in the bluetooth device data acquisition apparatus, which is not described in detail in this example.
Optionally, the transmission device 506 is used for receiving or sending data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 506 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices so as to communicate with the internet or a local area Network. In one example, the transmission device 506 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In addition, the electronic device further includes: a connection bus 508 for connecting the respective module components in the electronic apparatus.
In other embodiments, the terminal or the server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting a plurality of nodes through a network communication form. The nodes may form a Peer-To-Peer (P2P) network, and any type of computing device, such as a server, a terminal, and other electronic devices, may become a node in the blockchain system by joining the Peer-To-Peer network.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, read-Only memories (ROMs), random Access Memories (RAMs), magnetic or optical disks, and the like.
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.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be essentially or partially contributed by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, and the like) to execute all or part of the steps of the methods of the embodiments of the present invention.
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 several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is only 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.
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 network 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 above is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, a plurality of modifications and embellishments can be made without departing from the principle of the present invention, and these modifications and embellishments should also be regarded as the protection scope of the present invention.

Claims (8)

1. A data acquisition method for Bluetooth equipment is characterized by comprising the following steps:
acquiring characteristic data corresponding to a plurality of Bluetooth devices respectively, wherein the characteristic data comprises collected data corresponding to the Bluetooth devices;
according to the characteristic data, screening M first Bluetooth devices matched with a cache queue from the plurality of Bluetooth devices, wherein M is a natural number;
storing the acquired data corresponding to the M first Bluetooth devices according to a preset storage rule;
wherein, according to presetting the storage rule, save the data collection in M first bluetooth equipment, include:
acquiring acquisition time corresponding to the M first Bluetooth devices respectively, wherein the acquisition time corresponding to each first Bluetooth device is the time for acquiring the acquired data in the first Bluetooth device;
storing collected data corresponding to a second Bluetooth device in the M first Bluetooth devices, wherein the second Bluetooth device is a Bluetooth device of which the time length between the collecting time and the current time is greater than the preset collecting time length;
wherein the characteristic data comprises a signal value; the method further comprises the following steps:
according to the characteristic data, screening N third Bluetooth devices which are not in the cache queue from the plurality of Bluetooth devices, wherein N is a natural number;
when the sum of the M and the N is larger than a preset threshold value, storing the acquired data corresponding to Q fourth Bluetooth devices in the N third Bluetooth devices, wherein the sum of the M and the Q is equal to the preset threshold value, the signal values corresponding to the Q fourth Bluetooth devices are larger than the signal values of the third Bluetooth devices except the Q fourth Bluetooth devices in the N third Bluetooth devices, and the Q is a natural number.
2. The method of claim 1, wherein the feature data comprises a device identifier indicating a bluetooth device;
the screening out M first Bluetooth devices matched with the buffer queue from the plurality of Bluetooth devices according to the characteristic data comprises the following steps:
matching the device identifications respectively corresponding to the plurality of Bluetooth devices with one or more pre-configured device identifications in the cache queue to obtain M first device identifications;
and determining the M first Bluetooth devices according to the M first device identifications.
3. The method of claim 1, wherein the storing the collected data corresponding to the second bluetooth device of the M first bluetooth devices comprises:
when a target storage area is not full, storing the acquired data corresponding to the second Bluetooth device, wherein the target storage area is used for storing the acquired data of the M first Bluetooth devices; alternatively, the first and second electrodes may be,
and when the target storage area is full, discarding the acquired data corresponding to the second Bluetooth device.
4. The method of claim 1, further comprising:
and discarding the collected data corresponding to the third Bluetooth equipment except the Q fourth Bluetooth equipment in the N third Bluetooth equipment.
5. The method of claim 1, further comprising:
and when the sum of the M and the N is smaller than a preset threshold value, storing the acquired data corresponding to the N third Bluetooth devices.
6. The utility model provides a bluetooth equipment data acquisition device which characterized in that includes:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring characteristic data corresponding to a plurality of Bluetooth devices respectively, and the characteristic data comprises acquired data corresponding to the Bluetooth devices;
the screening unit is used for screening M first Bluetooth devices matched with the cache queue from the plurality of Bluetooth devices according to the characteristic data, wherein M is a natural number;
the storage unit is used for storing the acquired data corresponding to the M first Bluetooth devices according to a preset storage rule;
the storage unit is further configured to acquire acquisition times corresponding to the M first bluetooth devices, respectively, where the acquisition time corresponding to each first bluetooth device is a time for acquiring the acquired data in the first bluetooth device; storing collected data corresponding to a second Bluetooth device in the M first Bluetooth devices, wherein the second Bluetooth device is a Bluetooth device of which the time length between the collection time and the current time is greater than the preset collection time length;
the obtaining unit is further configured to screen out, from the plurality of bluetooth devices, N third bluetooth devices that are not in the buffer queue according to the feature data including the signal value, where N is a natural number; when the sum of the M and the N is larger than a preset threshold value, storing the acquired data corresponding to Q fourth Bluetooth devices in the N third Bluetooth devices, wherein the sum of the M and the Q is equal to the preset threshold value, the signal values corresponding to the Q fourth Bluetooth devices are larger than the signal values of the third Bluetooth devices except the Q fourth Bluetooth devices in the N third Bluetooth devices, and the Q is a natural number.
7. A computer-readable storage medium, comprising a stored program, wherein the program is operable to perform the method of any one of claims 1 to 5.
8. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 5 by means of the computer program.
CN202011025284.1A 2020-09-25 2020-09-25 Bluetooth device data acquisition method and device, storage medium and electronic device Active CN112188456B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011025284.1A CN112188456B (en) 2020-09-25 2020-09-25 Bluetooth device data acquisition method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011025284.1A CN112188456B (en) 2020-09-25 2020-09-25 Bluetooth device data acquisition method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN112188456A CN112188456A (en) 2021-01-05
CN112188456B true CN112188456B (en) 2023-02-14

Family

ID=73944895

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011025284.1A Active CN112188456B (en) 2020-09-25 2020-09-25 Bluetooth device data acquisition method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN112188456B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116828435B (en) * 2023-08-30 2023-11-14 北京柚果星空科技有限公司 Equipment forwarding method and system of soft Bluetooth gateway

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102752029A (en) * 2011-04-18 2012-10-24 中兴通讯股份有限公司 Method for matching Bluetooth accessory with Bluetooth devices and Bluetooth accessory
CN103228060A (en) * 2013-04-02 2013-07-31 深圳市文鼎创数据科技有限公司 Method and device for processing bluetooth pairing information
CN103226858A (en) * 2013-04-02 2013-07-31 深圳市文鼎创数据科技有限公司 Processing method and apparatus of bluetooth pairing information
CN104967971A (en) * 2015-06-26 2015-10-07 飞天诚信科技股份有限公司 Method achieving bluetooth automatic return connection in Android system
CN105228089A (en) * 2015-09-30 2016-01-06 成都信汇聚源科技有限公司 A kind of wearable device multisensor adaptation and real-time data acquisition method
CN105407453A (en) * 2015-11-23 2016-03-16 深圳还是威健康科技有限公司 Bluetooth pairing method and device
KR20190120688A (en) * 2018-04-16 2019-10-24 삼인싸이언스(주) Method for experiment device management
CN111447102A (en) * 2020-02-27 2020-07-24 平安科技(深圳)有限公司 SDN network device access method and device, computer device and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102292050B1 (en) * 2015-07-21 2021-08-23 삼성전자주식회사 Method and electronic device for transmitting data

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102752029A (en) * 2011-04-18 2012-10-24 中兴通讯股份有限公司 Method for matching Bluetooth accessory with Bluetooth devices and Bluetooth accessory
CN103228060A (en) * 2013-04-02 2013-07-31 深圳市文鼎创数据科技有限公司 Method and device for processing bluetooth pairing information
CN103226858A (en) * 2013-04-02 2013-07-31 深圳市文鼎创数据科技有限公司 Processing method and apparatus of bluetooth pairing information
CN104967971A (en) * 2015-06-26 2015-10-07 飞天诚信科技股份有限公司 Method achieving bluetooth automatic return connection in Android system
CN105228089A (en) * 2015-09-30 2016-01-06 成都信汇聚源科技有限公司 A kind of wearable device multisensor adaptation and real-time data acquisition method
CN105407453A (en) * 2015-11-23 2016-03-16 深圳还是威健康科技有限公司 Bluetooth pairing method and device
KR20190120688A (en) * 2018-04-16 2019-10-24 삼인싸이언스(주) Method for experiment device management
CN111447102A (en) * 2020-02-27 2020-07-24 平安科技(深圳)有限公司 SDN network device access method and device, computer device and storage medium

Also Published As

Publication number Publication date
CN112188456A (en) 2021-01-05

Similar Documents

Publication Publication Date Title
EP3550892B1 (en) Method for network slice selection, user equipment, and network device
CN110049508B (en) Method and device for acquiring service data
CN105868040A (en) Log collection method and collection terminal
CN110635965B (en) IPv6 network quality monitoring method, equipment and storage medium
CN107623752B (en) Network management method and device based on link layer
CN106789583B (en) Intelligent social contact method and system based on WiFi-Aware
CN107204924B (en) Link discovery method and device
CN106789166B (en) Method and device for network element batch configuration
CN112188456B (en) Bluetooth device data acquisition method and device, storage medium and electronic device
CN110996056B (en) Video storage method and device of cascade monitoring system
CN112566078A (en) Device connection method and apparatus, storage medium, and electronic apparatus
CN113098988B (en) Data transmission method and data transmission system
CN113285810B (en) Target equipment login method and device, storage medium and electronic device
CN115150795A (en) Information filtering method, bluetooth antenna and Internet of things data platform
CN111884938A (en) Router information acquisition method and device
CN110166518B (en) Session information transmission method, device, storage medium and electronic device
CN112491669A (en) Data processing method, device and system
US20210250827A1 (en) Method for managing a connection in a distributed wireless network
CN109041022B (en) Network management method, Bluetooth module, medium and computer
CN114125023B (en) Method and device for determining data connection, storage medium and electronic device
CN115883369A (en) Network slice deployment method, system, device, equipment and readable storage medium
CN112751706A (en) Target data transmission method and device
CN107147694B (en) Information processing method and device
CN112491583A (en) Data acquisition and analysis method and device
CN110881213A (en) Method and system for transmitting network test process information

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
TA01 Transfer of patent application right

Effective date of registration: 20220418

Address after: 310053 Block C, 3D building, 581 torch Avenue, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: SUNWAVE COMMUNICATIONS Co.,Ltd.

Address before: 310053 Block C, 3D building, 581 torch Avenue, Binjiang District, Hangzhou City, Zhejiang Province

Applicant before: Zhejiang Sanwei wanyilian Technology Co.,Ltd.

Applicant before: SUNWAVE COMMUNICATIONS Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant