CN114025340B - Low-power consumption Bluetooth data transmission method, device, equipment and readable storage medium - Google Patents

Low-power consumption Bluetooth data transmission method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN114025340B
CN114025340B CN202111408148.5A CN202111408148A CN114025340B CN 114025340 B CN114025340 B CN 114025340B CN 202111408148 A CN202111408148 A CN 202111408148A CN 114025340 B CN114025340 B CN 114025340B
Authority
CN
China
Prior art keywords
ble
equipment
ble equipment
data
user
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
CN202111408148.5A
Other languages
Chinese (zh)
Other versions
CN114025340A (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.)
Tianyi Shilian Technology Co ltd
Original Assignee
Tianyi Digital Life 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 Tianyi Digital Life Technology Co Ltd filed Critical Tianyi Digital Life Technology Co Ltd
Priority to CN202111408148.5A priority Critical patent/CN114025340B/en
Publication of CN114025340A publication Critical patent/CN114025340A/en
Application granted granted Critical
Publication of CN114025340B publication Critical patent/CN114025340B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/20Services signaling; Auxiliary data signalling, i.e. transmitting data via a non-traffic channel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W92/00Interfaces specially adapted for wireless communication networks
    • H04W92/04Interfaces between hierarchically different network devices
    • 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)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application discloses a low-power consumption Bluetooth data transmission method, a device, equipment and a readable storage medium, wherein the method comprises the following steps: responding to the operation of selecting the low-power consumption Bluetooth BLE equipment required to be subjected to data acquisition by a user, and determining a first identifier corresponding to the first BLE equipment required to be subjected to data acquisition selected by the user in a preset product model; bluetooth connection is carried out on first BLE equipment corresponding to the first identifier; encoding an acquisition instruction according to a first script model corresponding to the first BLE equipment, wherein the first script model comprises an encoding mode of data information interacted by the first BLE equipment and the terminal; and sending the encoded acquisition instruction to the first BLE equipment through a Bluetooth protocol stack interface so as to remind the first BLE equipment to acquire data. Therefore, the method and the device can solve the problem that BLE equipment of different manufacturers cannot be compatible in the prior art, so that inconvenience is brought to users.

Description

Low-power consumption Bluetooth data transmission method, device, equipment and readable storage medium
Technical Field
The present invention relates to the field of data transmission, and more particularly, to a method, apparatus, device and readable storage medium for bluetooth low energy data transmission.
Background
With the vigorous development of internet technology, bluetooth low energy (Bluetooth Low Energy, BLE) devices have been widely used because they have low power consumption and can realize data communication between terminals and bluetooth peripheral devices.
Along with rapid development of technologies such as smart home, wearable equipment, vehicle-mounted equipment, intelligent medical devices and the like, more and more Bluetooth peripheral equipment adopts BLE equipment to conduct data communication. However, when the BLE devices are used, special hardware and software of BLE device manufacturers are required to be combined to normally use the data transmission function of the BLE devices, and when users need to use the BLE devices of multiple manufacturers, the users need to use the software and hardware corresponding to the multiple manufacturers, so that inconvenience is brought to the users.
In view of the foregoing, there is a need for a low-power consumption bluetooth data transmission method, which is used for solving the problem that the prior art cannot be compatible with BLE devices of different manufacturers, so that inconvenience is brought to users.
Disclosure of Invention
In view of this, the present application provides a low-power consumption bluetooth data transmission method, apparatus, device and readable storage medium, which are used for solving the disadvantage that the prior art cannot be compatible with BLE devices of different manufacturers, so that inconvenience is brought to users.
In order to achieve the above object, the following solutions have been proposed:
a low-power consumption Bluetooth data transmission method comprises the following steps:
responding to the operation of selecting a low-power consumption Bluetooth BLE device needing data acquisition by a user, and determining a first identifier corresponding to the first BLE device needing data acquisition selected by the user in a preset product model, wherein the preset product model comprises identifiers of all BLE devices;
bluetooth connection is carried out on first BLE equipment corresponding to the first identifier;
encoding an acquisition instruction according to a first script model corresponding to the first BLE equipment, wherein the first script model comprises an encoding mode of data information interacted by the first BLE equipment and the terminal;
and sending the encoded acquisition instruction to the first BLE equipment through a Bluetooth protocol stack interface so as to remind the first BLE equipment to acquire data.
Optionally, the determining, in a preset product model, a first identifier corresponding to a first BLE device selected by a user to be subjected to data acquisition in response to the operation of selecting the low-power consumption bluetooth BLE device to be subjected to data acquisition by the user includes:
responding to operations of BLE equipment required to be subjected to data acquisition and functional modules required to be subjected to data acquisition in the BLE equipment, and determining a first equipment identifier corresponding to first BLE equipment required to be subjected to data acquisition and a first module identifier of a first functional module selected by a user in the first BLE equipment in a preset product model, wherein the preset product model comprises equipment identifiers of all BLE equipment and module identifiers of all modules in each BLE equipment;
the sending, by the bluetooth protocol stack interface, the encoded acquisition instruction to the first BLE device includes:
and sending the encoded acquisition instruction to a module of the first BLE equipment, which corresponds to the first module identifier, through a Bluetooth protocol stack interface.
The method, optionally, further comprises:
responding to the operation of the BLE equipment which is required to be uploaded by the user, and determining a second identifier corresponding to the second BLE equipment which is required to be uploaded by the user in a preset product model;
bluetooth connection is carried out on second BLE equipment corresponding to the second identifier;
and acquiring data information in the second BLE equipment.
Optionally, the acquiring the data information in the second BLE device includes:
reading acquisition information in the second BLE equipment through a Bluetooth protocol stack interface;
decoding the acquired information according to a second script model corresponding to the second BLE equipment, so as to obtain data information, wherein the second script model comprises an encoding mode of the data information interacted by the second BLE equipment and the terminal;
and displaying the data information on an interface.
Optionally, the determining, in a preset product model, a second identifier corresponding to a second BLE device selected by the user and needed to upload data, where the second identifier corresponds to the second BLE device selected by the user and needed to upload data includes:
responding to the operation of a user selecting BLE equipment needing to upload data and a functional module needing to upload data in the BLE equipment, and determining a second equipment identifier corresponding to a second BLE equipment needing to upload data selected by the user and a second module identifier of a second functional module selected by the user in the second BLE equipment in a preset product model;
the acquiring the data information in the second BLE device includes:
and reading acquisition information in a second functional module corresponding to the second module identifier in the second BLE equipment through a Bluetooth protocol stack interface.
Optionally, before the operation of the first bluetooth low energy BLE device for data acquisition is selected by the response user, the method further includes:
displaying a user operable interface, wherein the user operable interface comprises identifications of BLE devices and function types corresponding to the BLE devices.
A bluetooth low energy data transmission device comprising:
the determining unit is used for responding to the operation of the low-power consumption Bluetooth BLE equipment which is required to be subjected to data acquisition by a user, determining a first identifier corresponding to the first BLE equipment which is required to be subjected to data acquisition and is selected by the user in a preset product model, wherein the preset product model comprises identifiers of all BLE equipment;
a connection unit, configured to perform bluetooth connection with a first BLE device corresponding to the first identifier;
the coding unit is used for coding the acquisition instruction according to a first script model corresponding to the first BLE equipment, wherein the first script model comprises a coding mode of data information interacted by the first BLE equipment and the terminal;
and the sending unit is used for sending the coded acquisition instruction to the first BLE equipment through the Bluetooth protocol stack interface so as to remind the first BLE equipment to acquire data.
The above device, optionally, further comprises:
the identification determining unit is used for responding to the operation of the BLE equipment which is required to upload data selected by the user, and determining a second identification corresponding to a second BLE equipment which is required to upload data and is selected by the user in a preset product model;
the device connection unit is used for carrying out Bluetooth connection with the second BLE device corresponding to the second identifier;
and the information acquisition unit is used for acquiring the data information in the second BLE equipment.
A low-power consumption Bluetooth data transmission device comprises a memory and a processor;
the memory is used for storing programs;
the processor is configured to execute the program to implement each step of the low-power consumption bluetooth data transmission method.
A readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of a bluetooth low energy data transmission method as described above.
According to the technical scheme, the identification of the BLE equipment can be obtained by presetting the product model containing the identifications of the BLE equipment. Wherein, the BLE devices of different manufacturers can be used as the BLE devices. Thus, when the user needs the first BLE equipment to collect data, the first identification of the first BLE equipment can be determined according to the product model, and connection is established with the BLE equipment corresponding to the first identification; the acquisition instruction can be encoded through a preset script model corresponding to the first BLE device, the script model comprises an encoding mode of data information interacted by the first BLE device and the terminal, and a script model corresponding to each BLE device in the product model can be arranged on the BLE device corresponding to the identification of each BLE device in the product model; and then, the coded acquisition instruction can be sent to the first BLE equipment through a Bluetooth protocol stack interface so as to remind the BLE equipment of acquiring data. Therefore, the method and the device can be compatible with BLE equipment of different manufacturers so as to realize information interaction between the terminal and the BLE equipment of different manufacturers, thereby solving the problem that the BLE equipment of different manufacturers cannot be compatible in the prior art so as to bring inconvenience to the use of users.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings may be obtained according to the provided drawings without inventive effort to a person skilled in the art.
Fig. 1 is a flowchart of a low-power consumption bluetooth data transmission method disclosed in the present application;
fig. 2 is a block diagram of a low-power consumption bluetooth data transmission device disclosed in the present application;
fig. 3 is a block diagram of a hardware structure of a bluetooth low energy data transmission device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The following describes the low-power consumption bluetooth data transmission method in detail with reference to fig. 1, including the following steps:
step S110, responding to the operation of the low-power consumption Bluetooth BLE equipment which is required to be subjected to data acquisition by a user, and determining a first identifier corresponding to the first BLE equipment which is required to be subjected to data acquisition and is selected by the user in a preset product model.
The preset product model may include identifiers of BLE devices.
Specifically, the identity of different BLE devices manufactured by each manufacturer may be added to the product model, so that a unique BLE device corresponding to the identity of the BLE device can be determined by the identity of the BLE device.
For example, when a user wants to measure heart rate using a heart rate meter bluetooth device, the user may select the heart rate meter bluetooth device to measure heart rate on an operation interface according to current needs. Then, in a preset product model, the identification of the heart rate meter Bluetooth device selected by the user and needing data acquisition can be found, and the corresponding unique heart rate meter Bluetooth device can be determined according to the identification.
And step S120, performing Bluetooth connection on the first BLE equipment corresponding to the first identifier.
Specifically, when the first BLE device corresponding to the first identifier is determined, bluetooth connection may be performed with the first BLE device corresponding to the first identifier.
For example, the first identifier may be an identifier of a cardiotachometer bluetooth device, and the first BLE device may be a cardiotachometer bluetooth device.
Step S130, encoding the acquisition instruction according to a preset first script model corresponding to the first BLE device.
The first script model includes a coding mode of data information of interaction between the first BLE device and the terminal.
Specifically, each script model may be generated according to a data information encoding mode and a message protocol adopted by the corresponding BLE device, and the script models may encode or decode data information in the BLE device and the cloud platform.
In this application, there may be a plurality of encoding modes, an alternative of which is provided herein, for example, the acquisition instructions may be converted to binary.
And step 140, sending the encoded acquisition instruction to the first BLE equipment through a Bluetooth protocol stack interface so as to remind the first BLE equipment to acquire data.
Specifically, the encoded acquisition instruction may be sent to the first BLE device through a bluetooth protocol stack interface. After the first BLE equipment receives the encoded acquisition instruction, the encoded acquisition instruction can be decoded through the first script model to obtain the acquisition instruction. The first BLE device may perform data acquisition in response to the acquisition instruction.
According to the technical scheme, the identification of the BLE equipment can be obtained by presetting the product model containing the identifications of the BLE equipment. Wherein, the BLE devices of different manufacturers can be used as the BLE devices. Thus, when the user needs the first BLE equipment to collect data, the first identification of the first BLE equipment can be determined according to the product model, and connection is established with the BLE equipment corresponding to the first identification; the acquisition instruction can be encoded through a preset script model corresponding to the first BLE device, the script model comprises an encoding mode of data information interacted by the first BLE device and the terminal, and a script model corresponding to each BLE device in the product model can be arranged on the BLE device corresponding to the identification of each BLE device in the product model; and then, the coded acquisition instruction can be sent to the first BLE equipment through a Bluetooth protocol stack interface so as to remind the BLE equipment of acquiring data. Therefore, the method and the device can be compatible with BLE equipment of different manufacturers so as to realize information interaction between the terminal and the BLE equipment of different manufacturers, thereby solving the problem that the BLE equipment of different manufacturers cannot be compatible in the prior art so as to bring inconvenience to the use of users.
Further, in some embodiments of the present application, in step S110, in response to the user selecting the operation of the bluetooth low energy BLE device required to perform data acquisition, before determining, in the preset product model, the first identifier corresponding to the first BLE device required to perform data acquisition selected by the user, a user operable interface may be displayed, where the user operable interface includes the identifier of each BLE device and the function type corresponding to each BLE device.
Specifically, on the interface, the identifier of each BLE device, such as a cardiometer and a thermometer, may be displayed, and the function types of each BLE device, such as heart rate measurement, heart rate data query, temperature measurement, temperature value query, may be displayed, so that a user may select on the interface according to the requirement.
As can be seen from the above technical solution, compared with the previous embodiment, the present embodiment provides an operable interface, where the interface may include the identifier of each BLE device and the function type corresponding to each BLE device. As can be seen, the present application can help the user select a BLE device that meets the needs, thereby better helping the user to better use each BLE device.
In some embodiments of the present application, a detailed description is given of a process of determining, in a preset product model, a first identifier corresponding to a first BLE device that needs to perform data acquisition and is selected by a user in response to operation of the bluetooth low energy BLE device that needs to perform data acquisition in step S110.
Specifically, the operations of the BLE device required to perform data acquisition and the functional module required to perform data acquisition in the BLE device may be responded, and in a preset product model, a first device identifier corresponding to a first BLE device required to perform data acquisition and selected by a user and a first module identifier of a first functional module selected by the user in the first BLE device are determined.
The preset product model may include device identifiers of all BLE devices and module identifiers of all modules in each BLE device.
The module identifier may include a service identifier and a feature identifier, each module may include a service function and a feature corresponding to the service function, and each BLE device may provide one or more service functions. For example, the BLE device is a bluetooth cardiotachometer device, and the service functions of the bluetooth cardiotachometer device may be a heart rate service, a temperature measurement service, and the like, where each service function may include one or more features. When data transmission is carried out with the BLE equipment, data communication can be realized by writing data into the characteristics of the service functions of the equipment, so that the service identifier is an identifier corresponding to each service function which can be provided by the BLE equipment, and the characteristic identifier is an identifier corresponding to each characteristic in each service.
Based on this, step S140 is performed to send the encoded acquisition instruction to the first BLE device through the bluetooth protocol stack interface, so as to remind the first BLE device of the process of acquiring data.
Specifically, the coded acquisition instruction may be sent to a module of the first BLE device corresponding to the first module identifier through a bluetooth protocol stack interface, so as to remind the first BLE device to acquire data.
The data transmission with the BLE equipment can be realized through a Bluetooth protocol stack interface. When the coded acquisition instruction is sent to a module corresponding to BLE equipment through a Bluetooth protocol stack interface, the BLE equipment receives the instruction and acquires data.
As can be seen from the above technical solution, compared with the previous embodiment, the present embodiment provides an alternative implementation manner of step S110 and step S140, specifically, the device identifier and the module identifier of the BLE device may be obtained, and the encoded acquisition instruction is sent to the module, corresponding to the first module identifier, of the BLE device corresponding to the device identifier. Therefore, the acquisition instruction can be sent to the corresponding module through the steps, and the corresponding module can be reminded to acquire data, so that a user is better helped to use each BLE device better.
In some embodiments of the present application, considering that, when the user uses the BLE device, not only the user wants to use the collecting function of the BLE device to collect data, specific data information collected by the BLE device may also need to be obtained, so in the present application, the user may also obtain the data information in the BLE device, and the following steps will be described in detail:
s10, responding to the operation of the BLE equipment required to be uploaded by the user, and determining a second identifier corresponding to the second BLE equipment required to be uploaded by the user in a preset product model.
Specifically, in the present application, a BLE device that needs to upload data may be used as the second BLE device, and a BLE device that needs to perform data collection may be used as the first BLE device.
The first BLE device and the second BLE device in the present application may be the same BLE device, or may be different BLE devices, which is not limited in this application.
When a user needs to acquire data acquired by BLE equipment, the user can select BLE equipment required to upload the data, and in a preset product model, the identification corresponding to the BLE equipment required to upload the data selected by the user can be determined.
For example, when the user wants heart rate data measured by the heart rate meter bluetooth device, the user can choose to acquire the heart rate data measured by the heart rate meter bluetooth device on the operation interface according to the current requirement. Then, in a preset product model, the identification of the heart rate meter Bluetooth device selected by the user and needing to provide data can be found, and the unique heart rate meter Bluetooth device corresponding to the identification can be determined according to the identification.
And S11, performing Bluetooth connection on second BLE equipment corresponding to the second identifier.
Specifically, after bluetooth connection with a BLE device is required, data transmission with the BLE device is possible.
For example, when the identifier of the bluetooth device of the heart rate meter is determined, bluetooth connection can be performed on the BLE device corresponding to the identifier, so as to implement bluetooth connection with the bluetooth device of the heart rate meter.
And S12, acquiring data information in the second BLE equipment.
Specifically, after bluetooth connection is implemented with the second BLE device, data information required by a user may be acquired from the second BLE device.
For example, after bluetooth connection with a heart rate meter bluetooth device is implemented, heart rate measurement information required by a user may be obtained from the heart rate meter bluetooth device.
As can be seen from the above technical solution, compared with the previous embodiment, the present embodiment adds a manner of acquiring data information of BLE devices, and the specific process is to respond to the operation of selecting a BLE device that needs to upload data by a user, and determine, in a preset product model, a second identifier corresponding to a second BLE device that needs to upload data and selected by the user. The product model may include identifications corresponding to BLE devices of different vendors. And Bluetooth connection is carried out on BLE equipment corresponding to the identifier, and data information is acquired from the BLE equipment. Therefore, the method and the device can be compatible with BLE equipment of different manufacturers, and data information can be acquired from the BLE equipment of different manufacturers through the steps, so that a user can be better helped to use each BLE equipment better.
In some embodiments of the present application, a detailed description is given to a process of determining, in a preset product model, a second identifier corresponding to a second BLE device selected by a user to upload data in response to an operation of the BLE device selected by the user to upload data in step S10, which is specifically as follows:
and determining a second equipment identifier corresponding to the second BLE equipment which is selected by the user and needs to upload data and a second module identifier of a second functional module selected by the user in the second BLE equipment in a preset product model in response to the user selecting the BLE equipment which needs to upload data and the operation of the functional module which needs to upload data in the BLE equipment.
Specifically, the product model used in the application may be the same product model, and the product model may include a device identifier of each BLE device and a module identifier corresponding to the BLE device.
In the application, a module of the BLE device that needs to upload data may be used as the second module, and a module of the BLE device that needs to perform data acquisition may be used as the first module.
Because the first BLE device and the second BLE device in the present application may be the same device, the first module and the second module in the present application may also be the same module. Of course, the first module and the second module may be different modules.
For example, when the user wants heart rate data measured by the heart rate meter bluetooth device, the user may choose to acquire heart rate data measured by the heart rate meter bluetooth device on the operation interface according to the current requirements. Then, in a preset product model, the device identifier of the heart rate meter Bluetooth device selected by the user and needing to provide data and the module identifier corresponding to the module containing the acquired data in the heart rate meter Bluetooth device can be found, and the module of the unique heart rate meter Bluetooth device corresponding to the device identifier can be determined according to the identifier.
On this basis, a process of acquiring data information in the second BLE device in step S12 will be described in detail.
Specifically, the collected information in the second functional module corresponding to the second module identifier in the second BLE device may be read through a bluetooth protocol stack interface.
In practice, data communication may be achieved by reading data information in the characteristics of the service functions of the BLE device when data transmission is performed with the device.
For example, when determining the device identifier of the cardiotachometer bluetooth device and the module identifier corresponding to the module containing the acquired data in the cardiotachometer bluetooth device, the module of the cardiotachometer bluetooth device corresponding to the module identifier may be determined from the cardiotachometer bluetooth device corresponding to the device identifier. From this module, heart rate data collected by the heart rate meter bluetooth device can be read.
As can be seen from the above technical solution, compared with the previous embodiment, the present embodiment provides an optional implementation manner of acquiring data information from a module of BLE equipment, and the specific process is to determine, in response to a selection of a user, a second equipment identifier corresponding to a second BLE equipment selected by the user and needing to upload data and a second module identifier of a second functional module selected by the user in the second BLE equipment, and read the data information from the module of BLE equipment according to the second equipment identifier and the second module identifier. As can be seen, the present application may obtain data information from a module of BLE devices, thereby better helping users to better use each BLE device.
In some embodiments of the present application, a process of acquiring data information in the second BLE device in step S12 is described in detail, and specific steps are as follows:
s200, reading the acquired information in the second BLE equipment through a Bluetooth protocol stack interface.
Specifically, the collected information in the second BLE device may be read through a bluetooth protocol stack interface, for example, heart rate data collected in the heart rate meter bluetooth device may be read through the bluetooth protocol stack interface.
S210, decoding the acquired information according to a second script model corresponding to the second BLE equipment to obtain data information.
Specifically, the second script model includes a coding manner of data information interacted by the second BLE device and the terminal.
Therefore, the data information can be input into the second script model, and the decoded acquisition information can be obtained, and the decoded acquisition information is used as the data information.
In the application, a script model which needs to decode data acquired by the BLE equipment can be used as a second script model, and a script model which needs to encode an acquisition instruction can be used as a first script model.
Thus, the first script model and the second script model in the present application may be the same script model or may be different script models. The present application is not limited thereto.
Different vendors may correspond to different scripting models, and the same vendor may correspond to the same scripting model.
Each BLE device has a corresponding script model.
S220, displaying the data information on an interface.
Specifically, when the data information is acquired, the data information may be displayed on the interface.
As can be seen from the above technical solution, compared with the previous embodiment, the present embodiment provides an alternative implementation manner for acquiring and displaying data information of BLE equipment, which specifically includes reading acquired information in BLE equipment through a bluetooth protocol stack interface; and decoding the acquired information according to a script model corresponding to the BLE equipment, and displaying a decoding result on an interface. It can be seen that the present application can obtain data information from BLE devices and display the data information, thereby better helping users to better use each BLE device.
The low-power consumption bluetooth data transmission device provided in the embodiment of the present application will be described below with reference to fig. 2, and the low-power consumption bluetooth data transmission device described below and the low-power consumption bluetooth data transmission method described above may be referred to correspondingly.
As shown in fig. 2, the bluetooth low energy data transmission device may include:
the determining unit 100 is configured to determine, in a preset product model, a first identifier corresponding to a first BLE device selected by a user to be subjected to data acquisition, where the preset product model includes identifiers of all BLE devices, in response to an operation of selecting the bluetooth low energy BLE device to be subjected to data acquisition by the user;
a connection unit 110, configured to perform bluetooth connection with a first BLE device corresponding to the first identifier;
the encoding unit 120 is configured to encode the acquisition instruction according to a preset first script model corresponding to the first BLE device, where the first script model includes an encoding manner of data information interacted by the first BLE device and the terminal;
and the sending unit 130 is configured to send the encoded acquisition instruction to the first BLE device through a bluetooth protocol stack interface, so as to remind the first BLE device to acquire data.
Further, the determining unit may include:
the product model application unit is used for responding to the operation of the BLE equipment required to be subjected to data acquisition and the functional module required to be subjected to data acquisition in the BLE equipment, and determining a first equipment identifier corresponding to the first BLE equipment required to be subjected to data acquisition selected by a user and a first module identifier of the first functional module selected by the user in the first BLE equipment in a preset product model, wherein the preset product model comprises the equipment identifiers of the BLE equipment and the module identifiers of the modules in the BLE equipment;
on this basis, the transmitting unit may include:
and the acquisition instruction sending unit is used for sending the encoded acquisition instruction to a module of the first BLE equipment corresponding to the first module identifier through a Bluetooth protocol stack interface.
Further, the low-power consumption bluetooth data transmission device may further include:
the identification determining unit is used for responding to the operation of the BLE equipment which is required to upload data selected by the user, and determining a second identification corresponding to a second BLE equipment which is required to upload data and is selected by the user in a preset product model;
the device connection unit is used for carrying out Bluetooth connection with the second BLE device corresponding to the second identifier;
and the information acquisition unit is used for acquiring the data information in the second BLE equipment.
Further, the identification determining unit may include:
the user operation response unit is used for responding to the user selection of the BLE equipment needing to upload data and the operation of the functional module needing to upload data in the BLE equipment, and determining a second equipment identifier corresponding to a second BLE equipment needing to upload data selected by the user and a second module identifier of a second functional module selected by the user in the second BLE equipment in a preset product model;
on this basis, the information acquisition unit may include:
and the acquisition information reading unit is used for reading the acquisition information in the second functional module corresponding to the second module identifier in the second BLE equipment through a Bluetooth protocol stack interface.
Further, the information acquisition unit may include:
the information reading unit is used for reading the acquired information in the second BLE equipment through a Bluetooth protocol stack interface;
the information decoding unit is used for decoding the acquired information according to a second script model corresponding to the second BLE equipment, so as to obtain data information, wherein the second script model comprises an encoding mode of the data information interacted by the second BLE equipment and the terminal;
and the information display unit is used for displaying the data information on an interface.
Further, the low-power consumption bluetooth data transmission device may further include:
the interface display unit is used for displaying a user operable interface, and the user operable interface comprises identifications of the BLE devices and function types corresponding to the BLE devices.
The low-power consumption Bluetooth data transmission device provided by the embodiment of the application can be applied to low-power consumption Bluetooth data transmission device equipment, such as computer equipment, terminal equipment and the like.
Optionally, fig. 3 shows a block diagram of a hardware structure of the bluetooth low energy data transmission device, and referring to fig. 3, the hardware structure of the bluetooth low energy data transmission device may include: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4; and the processor 1, the communication interface 2 and the memory 3 complete the communication with each other through the communication bus 4;
processor 1 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement embodiments of the present invention, etc.;
the memory 3 may comprise a high-speed RAM memory, and may further comprise a non-volatile memory (non-volatile memory) or the like, such as at least one magnetic disk memory;
wherein the memory stores a program, the processor is operable to invoke the program stored in the memory, the program operable to:
responding to the operation of selecting a low-power consumption Bluetooth BLE device needing data acquisition by a user, and determining a first identifier corresponding to the first BLE device needing data acquisition selected by the user in a preset product model, wherein the preset product model comprises identifiers of all BLE devices;
bluetooth connection is carried out on first BLE equipment corresponding to the first identifier;
encoding an acquisition instruction according to a first script model corresponding to the first BLE equipment, wherein the first script model comprises an encoding mode of data information interacted by the first BLE equipment and the terminal;
and sending the encoded acquisition instruction to the first BLE equipment through a Bluetooth protocol stack interface so as to remind the first BLE equipment to acquire data.
The embodiment of the application also provides a readable storage medium, which can store a program suitable for being executed by a processor, the program being configured to:
responding to the operation of selecting a low-power consumption Bluetooth BLE device needing data acquisition by a user, and determining a first identifier corresponding to the first BLE device needing data acquisition selected by the user in a preset product model, wherein the preset product model comprises identifiers of all BLE devices;
bluetooth connection is carried out on first BLE equipment corresponding to the first identifier;
encoding an acquisition instruction according to a first script model corresponding to the first BLE equipment, wherein the first script model comprises an encoding mode of data information interacted by the first BLE equipment and the terminal;
and sending the encoded acquisition instruction to the first BLE equipment through a Bluetooth protocol stack interface so as to remind the first BLE equipment to acquire data.
Alternatively, the refinement function and the extension function of the program may be described with reference to the above.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Various embodiments of the present application may be combined with one another. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A bluetooth low energy data transmission method, comprising:
responding to the operation of selecting low-power consumption Bluetooth BLE equipment required to be subjected to data acquisition by a user, and determining a first identifier corresponding to the first BLE equipment required to be subjected to data acquisition selected by the user in a preset product model, wherein the preset product model comprises identifiers of all BLE equipment, and each BLE equipment is provided with a corresponding script model;
bluetooth connection is carried out on first BLE equipment corresponding to the first identifier;
encoding an acquisition instruction according to a first script model corresponding to the first BLE equipment, wherein the first script model comprises an encoding mode of data information interacted by the first BLE equipment and a terminal;
and sending the encoded acquisition instruction to the first BLE equipment through a Bluetooth protocol stack interface so as to remind the first BLE equipment to acquire data.
2. The method according to claim 1, wherein the determining, in a preset product model, a first identifier corresponding to the first BLE device selected by the user to be subjected to data acquisition in response to the operation of selecting the bluetooth low energy device to be subjected to data acquisition by the user, includes:
responding to operations of BLE equipment required to be subjected to data acquisition and functional modules required to be subjected to data acquisition in the BLE equipment, and determining a first equipment identifier corresponding to first BLE equipment required to be subjected to data acquisition and a first module identifier of a first functional module selected by a user in the first BLE equipment in a preset product model, wherein the preset product model comprises equipment identifiers of all BLE equipment and module identifiers of all modules in each BLE equipment;
the sending, by the bluetooth protocol stack interface, the encoded acquisition instruction to the first BLE device includes:
and sending the encoded acquisition instruction to a module of the first BLE equipment, which corresponds to the first module identifier, through a Bluetooth protocol stack interface.
3. The method as recited in claim 1, further comprising:
responding to the operation of the BLE equipment which is required to be uploaded by the user, and determining a second identifier corresponding to the second BLE equipment which is required to be uploaded by the user in a preset product model;
bluetooth connection is carried out on second BLE equipment corresponding to the second identifier;
and acquiring data information in the second BLE equipment.
4. A method according to claim 3, wherein said obtaining data information in said second BLE device comprises:
reading acquisition information in the second BLE equipment through a Bluetooth protocol stack interface;
decoding the acquired information according to a second script model corresponding to the second BLE equipment, so as to obtain data information, wherein the second script model comprises an encoding mode of the data information interacted by the second BLE equipment and the terminal;
and displaying the data information on an interface.
5. A method according to claim 3, wherein the determining, in a preset product model, a second identifier corresponding to the second BLE device selected by the user to upload data in response to the operation of selecting the BLE device to upload data by the user includes:
responding to the operation of a user selecting BLE equipment needing to upload data and a functional module needing to upload data in the BLE equipment, and determining a second equipment identifier corresponding to a second BLE equipment needing to upload data selected by the user and a second module identifier of a second functional module selected by the user in the second BLE equipment in a preset product model;
the acquiring the data information in the second BLE device includes:
and reading acquisition information in a second functional module corresponding to the second module identifier in the second BLE equipment through a Bluetooth protocol stack interface.
6. The method of any one of claims 1-5, further comprising, prior to said responding to user selection of the operation of the first bluetooth low energy device for which data acquisition is desired:
displaying a user operable interface, wherein the user operable interface comprises identifications of BLE devices and function types corresponding to the BLE devices.
7. A bluetooth low energy data transmission device, comprising:
the determining unit is used for responding to the operation of the low-power consumption Bluetooth BLE equipment which is required to be subjected to data acquisition by a user, determining a first identifier corresponding to the first BLE equipment which is required to be subjected to data acquisition and is selected by the user in a preset product model, wherein the preset product model comprises identifiers of all BLE equipment, and each BLE equipment has a corresponding script model;
a connection unit, configured to perform bluetooth connection with a first BLE device corresponding to the first identifier;
the coding unit is used for coding the acquisition instruction according to a first script model corresponding to the first BLE equipment, wherein the first script model comprises a coding mode of data information of interaction between the first BLE equipment and the terminal;
and the sending unit is used for sending the coded acquisition instruction to the first BLE equipment through the Bluetooth protocol stack interface so as to remind the first BLE equipment to acquire data.
8. The apparatus of claim 7, wherein the apparatus further comprises:
the identification determining unit is used for responding to the operation of the BLE equipment which is required to upload data selected by the user, and determining a second identification corresponding to a second BLE equipment which is required to upload data and is selected by the user in a preset product model;
the device connection unit is used for carrying out Bluetooth connection with the second BLE device corresponding to the second identifier;
and the information acquisition unit is used for acquiring the data information in the second BLE equipment.
9. A low-power consumption bluetooth data transmission device, comprising a memory and a processor;
the memory is used for storing programs;
the processor is configured to execute the program to implement the steps of the bluetooth low energy data transmission method according to any one of claims 1 to 6.
10. A readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, carries out the steps of bluetooth low energy data transmission according to any of the claims 1-6.
CN202111408148.5A 2021-11-19 2021-11-19 Low-power consumption Bluetooth data transmission method, device, equipment and readable storage medium Active CN114025340B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111408148.5A CN114025340B (en) 2021-11-19 2021-11-19 Low-power consumption Bluetooth data transmission method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111408148.5A CN114025340B (en) 2021-11-19 2021-11-19 Low-power consumption Bluetooth data transmission method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN114025340A CN114025340A (en) 2022-02-08
CN114025340B true CN114025340B (en) 2024-03-26

Family

ID=80066163

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111408148.5A Active CN114025340B (en) 2021-11-19 2021-11-19 Low-power consumption Bluetooth data transmission method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN114025340B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105141686A (en) * 2015-08-19 2015-12-09 贵阳朗玛信息技术股份有限公司 Method and device for achieving bluetooth communication
CN108737658A (en) * 2018-05-22 2018-11-02 Oppo(重庆)智能科技有限公司 Mobile terminal and its switching method of Bluetooth audio frequency coding mode, storage medium
CN112313929A (en) * 2018-12-27 2021-02-02 华为技术有限公司 Method for automatically switching Bluetooth audio coding modes and electronic equipment
CN112653537A (en) * 2020-12-06 2021-04-13 复旦大学 Method for improving receiver sensitivity in low-power-consumption Bluetooth system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070294710A1 (en) * 2006-06-19 2007-12-20 Alps Automotive Inc. Simple bluetooth software development kit

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105141686A (en) * 2015-08-19 2015-12-09 贵阳朗玛信息技术股份有限公司 Method and device for achieving bluetooth communication
CN108737658A (en) * 2018-05-22 2018-11-02 Oppo(重庆)智能科技有限公司 Mobile terminal and its switching method of Bluetooth audio frequency coding mode, storage medium
CN112313929A (en) * 2018-12-27 2021-02-02 华为技术有限公司 Method for automatically switching Bluetooth audio coding modes and electronic equipment
CN112653537A (en) * 2020-12-06 2021-04-13 复旦大学 Method for improving receiver sensitivity in low-power-consumption Bluetooth system

Also Published As

Publication number Publication date
CN114025340A (en) 2022-02-08

Similar Documents

Publication Publication Date Title
CN104683458B (en) The method and server that a kind of wallpaper is recommended
JP2018519563A (en) Application recommendation method, server, and computer-readable medium
CN108777033B (en) Shared charger treasure leasing method based on shared leasing equipment and terminal equipment thereof
WO2016193417A1 (en) Home appliance control method and control system
CN108173727B (en) Intelligent household appliance network access method and equipment
JP6358604B2 (en) Method for supporting wireless access to storage device and mobile routing hotspot device
CN103546987A (en) Smart apparatus, pairing system and method using the same
US20140125464A1 (en) Smart remote control
US20140099237A1 (en) Biomedical monitoring system combining a mobile device
CN104580019A (en) Network service supplying method and device
CN112804319A (en) Intelligent device control method and device, electronic device and computer readable medium
CN114025340B (en) Low-power consumption Bluetooth data transmission method, device, equipment and readable storage medium
CN106101990B (en) Bluetooth device searching method and device
CN112770286B (en) Sensor data processing method and device and computer equipment
CN107548055B (en) Multi-region SIM card selection method, system and device and industrial personal computer
WO2017206459A1 (en) Vehicle diagnosis method and smart wearable device
CN107509161A (en) Smart bluetooth control system and method
CN108958765B (en) Method and device for upgrading optical module firmware
CN108616567B (en) Picture transmission method, system, server, client and user equipment
CN115219930B (en) Vehicle storage battery aging early warning method and device, electronic equipment and storage medium
CN114964451A (en) Weight management method, system, weight scale and computer readable storage medium
CN115348644A (en) Bluetooth multi-device network access method and device, electronic device and storage medium
CN108776450A (en) Sweeping robot service system and computer readable storage medium
CN105187651A (en) Method for adding peripheral equipment to mobile phone app
CN113645599A (en) Information processing method based on electronic equipment interaction and first electronic equipment

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

Effective date of registration: 20240315

Address after: Unit 1, Building 1, China Telecom Zhejiang Innovation Park, No. 8 Xiqin Street, Wuchang Street, Yuhang District, Hangzhou City, Zhejiang Province, 311100

Patentee after: Tianyi Shilian Technology Co.,Ltd.

Country or region after: China

Address before: Room 1423, No. 1256 and 1258, Wanrong Road, Jing'an District, Shanghai 200040

Patentee before: Tianyi Digital Life Technology Co.,Ltd.

Country or region before: China