CN116614867A - Data transmission method, data transmission device, equipment and storage medium - Google Patents

Data transmission method, data transmission device, equipment and storage medium Download PDF

Info

Publication number
CN116614867A
CN116614867A CN202310410834.9A CN202310410834A CN116614867A CN 116614867 A CN116614867 A CN 116614867A CN 202310410834 A CN202310410834 A CN 202310410834A CN 116614867 A CN116614867 A CN 116614867A
Authority
CN
China
Prior art keywords
data transmission
master device
target slave
slave device
transmission request
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.)
Pending
Application number
CN202310410834.9A
Other languages
Chinese (zh)
Inventor
裴阿磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Kaihong Digital Industry Development Co Ltd
Original Assignee
Shenzhen Kaihong Digital Industry Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Kaihong Digital Industry Development Co Ltd filed Critical Shenzhen Kaihong Digital Industry Development Co Ltd
Priority to CN202310410834.9A priority Critical patent/CN116614867A/en
Publication of CN116614867A publication Critical patent/CN116614867A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0212Power saving arrangements in terminal devices managed by the network, e.g. network or access point is master and terminal is slave
    • H04W52/0219Power saving arrangements in terminal devices managed by the network, e.g. network or access point is master and terminal is slave where the power saving management affects multiple terminals
    • 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
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/40Connection management for selective distribution or broadcast
    • 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)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application provides a data transmission method, a data transmission device, data transmission equipment and a storage medium. Applied to a communication system, the communication system comprises a master device and at least one slave device, the master device and the slave device can be connected by Bluetooth, and the method comprises the following steps: the method comprises the steps that a master device receives broadcast data packets sent by a plurality of slave devices; the master device judges whether the corresponding slave device is a target slave device or not based on the broadcast data packet; when the corresponding slave device is the target slave device, the master device sets the self-scanning state to be the active scanning state, and sends data transmission request information to the target slave device so that the target slave device receives the data transmission request information; the master device receives response information when the target slave device transmits the response information to the master device based on the data transmission request information, wherein the response information includes the data information. The embodiment of the application aims to provide a data transmission method so as to reduce energy consumption in the data transmission process of equipment of two parties and improve the success rate of data transmission between the equipment.

Description

Data transmission method, data transmission device, equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data transmission method, a data transmission device, a device, and a computer readable storage medium.
Background
With the development of the internet of things, BLE (Bluetooth Low Energy ) technology is becoming more and more important for the market as a solution for short-range wireless communication. The BLE technology is a personal area network technology designed and sold by the Bluetooth technology alliance, and has wide application in the fields of medical care, sports and fitness, beacons, security protection, home entertainment and the like. Compared with the classical Bluetooth technology, the BLE technology can reduce transmission power consumption and technology cost while maintaining the same communication range.
The existing communication establishing method based on BLE technology requires that both the master device and the slave device keep synchronous all the time and maintain a data transmission channel, so that the duration of both the devices is lower. In addition, the equipment is easily affected by certain factors in the connection process, for example, the situation that the electromagnetic environment is bad, or the equipment is restarted due to the occurrence of problems in the equipment can cause communication failure of both sides of the equipment, so that the application scene of the equipment is greatly limited.
Disclosure of Invention
The application provides a data transmission method, a data transmission device, equipment and a computer readable storage medium, aiming at improving the success rate of data transmission between equipment and reducing the energy consumption in the data transmission process of equipment and equipment.
To achieve the above object, the present application provides a data transmission method applied to a communication system including a master device and at least one slave device, the master device and the slave device being connectable by means of bluetooth, the method comprising:
the master device receives a plurality of broadcast data packets sent by the slave devices;
the master device judges whether the corresponding slave device is a target slave device or not based on the broadcast data packet;
when the corresponding slave device is a target slave device, the master device sets a self-scanning state to be an active scanning state, and sends data transmission request information to the target slave device so that the target slave device receives the data transmission request information;
and when the target slave device sends response information to the master device based on the data transmission request information, the master device receives the response information, wherein the response information comprises data information.
Optionally, the broadcast data packet includes identification data, and the master device determines, based on the broadcast data packet, whether the corresponding slave device is a target slave device, including: the main equipment judges whether the identification data is in a preset database or not;
and if the identification data is in the preset database, determining that the corresponding slave equipment is the target slave equipment.
Optionally, after the master device determines whether the corresponding slave device is a target slave device based on the broadcast data packet, the method includes:
and after the corresponding slave device is not the target slave device, the master device sets the self-scanning state to be a passive scanning state.
Optionally, after the master device determines whether the corresponding slave device is a target slave device based on the broadcast data packet, the method further includes:
the master device determines the number of target slave devices based on the broadcast data packet.
Optionally, the number of the target slave devices is one, and when the target slave device sends response information to the master device based on the data transmission request information, after the master device receives the response information, the method further includes:
the master device sets its own scanning state to a passive scanning state.
Optionally, the number of the target slave devices is greater than one, the master device sets the self-scanning state to be an active scanning state, and sends data transmission request information to the target slave device, so that the target slave device receives the data transmission request information, and the method includes:
the master device sets the self-scanning state to be an active scanning state, and sends data transmission request information to any one of the target slave devices so that any one of the target slave devices receives the data transmission request information.
Optionally, when the target slave device sends response information to the master device based on the data transmission request information, the master device receives the response information, and then includes:
the master device sets the self-scanning state to be an active scanning state and sequentially receives response information of other target slave devices.
Optionally, the data transmission request information includes authentication information, and the sending the data transmission request information to the target slave device, so that after the target slave device receives the data transmission request information, includes:
and verifying the validity of the identity of the master device based on the authentication information by the target slave device.
Optionally, when the target slave device sends response information to the master device based on the data transmission request information, the master device receives the response information, including:
and after the target slave device verifies that the identity of the master device is legal, and when response information is sent to the master device based on the data transmission request information, the master device receives the response information.
To achieve the above object, the present application also provides a data transmission apparatus including:
the receiving module is used for receiving the broadcast data packets sent by the plurality of slave devices through the master device;
the judging module is used for judging whether the corresponding slave equipment is a target slave equipment or not based on the broadcast data packet through the master equipment;
the sending module is used for setting a self-scanning state to be an active scanning state through the master equipment when the corresponding slave equipment is the target slave equipment, and sending data transmission request information to the target slave equipment so that the target slave equipment receives the data transmission request information;
and the data transmission module is used for receiving response information through the master device when the target slave device sends the response information to the master device based on the data transmission request information, wherein the response information comprises data information.
In addition, to achieve the above object, the present application also provides an apparatus including a memory and a processor; the memory is used for storing a computer program; the processor is configured to execute the computer program and implement the steps of any one of the data transmission methods provided by the embodiments of the present application when the computer program is executed.
In addition, to achieve the above object, the present application further provides a computer readable storage medium storing a computer program, where the computer program when executed by a processor causes the processor to implement the steps of any one of the data transmission methods provided in the embodiments of the present application.
The data transmission method, the data transmission device, the equipment and the computer readable storage medium disclosed by the embodiment of the application can be applied to a master equipment and at least one slave equipment which are connected in a Bluetooth mode. The master device can determine whether the corresponding slave device is the target slave device or not by receiving the broadcast data packet sent by the slave device, and when the corresponding slave device is the target slave device, set the self-scanning state to be the active scanning state so as to send a request for data transmission to the target slave device, so that the target slave device can send response information comprising data information to the master device, and therefore the master device can receive the data information sent by the target slave device, and further realize data transmission between the master device and the slave device. The master device only needs to receive the data packet sent by the target slave device through the scanning state, so that the data transmission can be realized without always maintaining the connection with the target slave device, and the energy consumption in the data transmission process of the two devices is reduced. In addition, the risk of data transmission failure caused by equipment connection failure is avoided, and the success rate of data transmission is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic view of a scenario of a data transmission method in the prior art according to an embodiment of the present application;
fig. 2 is a schematic view of a scenario of another data transmission method according to the prior art provided by an embodiment of the present application;
fig. 3 is a schematic diagram of steps of a data transmission method according to an embodiment of the present application;
fig. 4 is a schematic view of a scenario of a data transmission method according to an embodiment of the present application;
fig. 5 is a schematic diagram of steps for determining whether a corresponding slave device is a target slave device according to an embodiment of the present application.
Fig. 6 is a schematic diagram of steps of another data transmission method according to an embodiment of the present application;
fig. 7 is a schematic block diagram of a data transmission device according to an embodiment of the present application;
fig. 8 is a schematic block diagram of an apparatus provided by 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 some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The flow diagrams depicted in the figures are merely illustrative and not necessarily all of the elements and operations/steps are included or performed in the order described. For example, some operations/steps may be further divided, combined, or partially combined, so that the order of actual execution may be changed according to actual situations. In addition, although the division of the functional modules is performed in the apparatus schematic, in some cases, the division of the modules may be different from that in the apparatus schematic.
The term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
Some embodiments of the present application are described in detail below with reference to the accompanying drawings. The following embodiments and features of the embodiments may be combined with each other without conflict.
In order to facilitate understanding of the embodiments of the present application, some of the background of the application referred to in the embodiments of the present application will be briefly described below.
Referring to fig. 1, fig. 1 is a schematic view of a scenario of a data transmission method according to the prior art according to an embodiment of the present application. As shown in fig. 1, when a master device and a slave device connected based on a bluetooth mode in the prior art perform data transmission, a broadcast packet is typically sent to the master device by starting a broadcast mode of the slave device, and then the master device can start a scan mode to discover the slave device and receive the broadcast packet. Wherein the broadcast packet carries a small amount of data that both need to be transmitted, so the master device can receive data based on the broadcast packet to achieve transmission of both data.
However, the security of the data transmission mode is low, and since the bluetooth device that starts the scanning mode within a certain range can acquire the broadcast packet and acquire the carried data, the privacy of the data is not protected. In addition, since there is no data transmission channel, the master device may not successfully acquire the broadcast packet transmitted from the slave device, thereby causing data transmission failure of both.
With continued reference to fig. 2, fig. 2 is a schematic diagram of a scenario of another data transmission method according to the prior art according to an embodiment of the present application. As shown in fig. 2, another data transmission method in the prior art needs to establish a data transmission channel based on a master device and a slave device connected in a bluetooth manner. Specifically, when the master device and the slave device perform data transmission based on the data transmission channel, operation steps such as pairing and binding of the two parties are required to be realized. Because the operation steps are complicated, the energy consumption of both equipment can be correspondingly increased. In addition, in order to ensure the quality of data transmission, the number of slave devices to which the master device can be simultaneously connected has a certain limit.
Therefore, it is necessary to propose a data transmission method to improve the success rate of data transmission between devices and reduce the energy consumption in the data transmission process of both devices.
Referring to fig. 3 and fig. 4, fig. 3 is a schematic diagram illustrating steps of a data transmission method according to an embodiment of the application; fig. 4 is a schematic view of a scenario of a data transmission method according to an embodiment of the present application. The data transmission method can be applied to a communication system, wherein the communication system comprises a master device and at least one slave device, and the master device and the slave devices can be connected in a Bluetooth mode.
As shown in fig. 1, the data transmission method includes steps S11 to S14.
Step S11: the master device receives broadcast data packets sent by a plurality of slave devices.
Wherein the master device is a data receiver; the slave device is the data sender.
The present application is not limited to the master device and the slave device. For example, the main device may be a terminal such as a computer, a mobile phone, a tablet, etc.; the slave equipment is provided with a Bluetooth headset, an intelligent electronic weight scale, an intelligent electronic sphygmomanometer and the like.
It can be understood that the data transmission method provided by the application can be applied to the scenes of reporting state changes to the terminal by the Bluetooth headset, uploading weight data to the terminal by the intelligent electronic weight scale, uploading blood pressure data to the terminal by the intelligent electronic sphygmomanometer and the like, and the application is not limited to the situations.
Further, when the slave device performs data transmission with the master device, the slave device can transmit a broadcast data packet to the master device in a broadcast mode, so that the master device can receive the broadcast data packet in a scanning state.
In the embodiment of the application, the main equipment only needs to be in a scanning state to receive the broadcast packet, so that compared with the mode of carrying out data transmission based on the data transmission channels, the method provided by the application can reduce the energy consumption of the data transmission of the two equipment sides and improve the duration of the two equipment sides.
Step S12: the master device determines whether the corresponding slave device is a target slave device based on the broadcast packet.
The broadcast data packet may carry identification code information of the slave device, device information, etc., which is not limited in the present application.
And the master device can judge whether the corresponding slave device is the target slave device based on the information so as to realize verification of the identity of the slave device and improve the safety of data transmission.
In the embodiment of the application, the master device can verify the received broadcast data packet to confirm whether the slave device is a target slave device capable of realizing data transmission, thereby improving the safety of data transmission and preventing the data privacy from being revealed.
Step S13: when the corresponding slave device is the target slave device, the master device sets the self-scanning state to be the active scanning state, and sends data transmission request information to the target slave device so that the target slave device receives the data transmission request information.
It will be appreciated that when the corresponding slave device is the target slave device, it is indicated that the master device may perform data transmission with the target slave device. At this time, the master device sets its own scanning state to an active scanning state, and the target device performs data transmission with the target slave device without receiving information sent by devices other than the target device.
Further, the master device may send data transmission request information to the target slave device, so as to enable the target slave device to receive the data transmission request information.
Optionally, after the master device determines whether the corresponding slave device is the target slave device based on the broadcast data packet, the method includes: after the corresponding slave device is not the target slave device, the master device sets the self-scanning state to the passive scanning state.
It can be understood that when the corresponding slave device is not the target device, it is indicated that the slave device cannot perform data transmission with the master device, and at this time, the master device sets the self-scanning state to the passive scanning state. As such, the master device cannot conduct data transmission with devices other than the non-target device.
In the embodiment of the application, when the corresponding slave device is the target slave device, the identity of the corresponding slave device is legal, so that the target slave device can perform data transmission with the master device. In order to improve the safety and the transmission efficiency of the two transmission processes, the master device can set the self-scanning state to be an active scanning state so as to establish communication with the target slave device only and further realize the transmission of data of the two parties.
Step S14: the master device receives response information when the target slave device transmits the response information to the master device based on the data transmission request information, wherein the response information includes the data information.
It will be appreciated that since the response information includes data information. Therefore, the master device can receive the data information sent by the target slave device, and further realize data transmission of the master device and the slave device.
The data transmission method disclosed by the embodiment of the application can be applied to the master equipment and at least one slave equipment which are connected in a Bluetooth mode. The master device can determine whether the corresponding slave device is the target slave device or not by receiving the broadcast data packet sent by the slave device, and when the corresponding slave device is the target slave device, set the self-scanning state to be the active scanning state so as to send a request for data transmission to the target slave device, so that the target slave device can send response information comprising data information to the master device, and therefore the master device can receive the data information sent by the target slave device, and further realize data transmission between the master device and the slave device. The master device only needs to receive the data packet sent by the target slave device through the scanning state, so that the data transmission can be realized without always maintaining the connection with the target slave device, and the energy consumption in the data transmission process of the two devices is reduced. In addition, the risk of data transmission failure caused by equipment connection failure is avoided, and the success rate of data transmission is improved.
With continued reference to fig. 5, fig. 5 is a schematic diagram of steps for determining whether a corresponding slave device is a target slave device according to an embodiment of the present application. As shown in fig. 5, the broadcast data packet includes identification data, and the master device may determine whether the corresponding slave device is a target slave device through steps S121 to S122.
Step S121: the main equipment judges whether the identification data is in a preset database or not.
The present application is not limited to the identification data, and may be, for example, identification code data, identification information data, or the like.
Specifically, the preset database includes a plurality of legal identification data, so that after receiving the broadcast data packet, the master device can determine whether the identification data in the broadcast data packet is in the preset database, so as to verify the validity of the identity of the slave device.
Step S122: if the identification data is in the preset database, the corresponding slave device is determined to be the target slave device.
It can be understood that if the identification data is in the preset database, the identity of the corresponding slave device is legal, so that the corresponding slave device can be determined to be the target slave device.
In the embodiment of the application, the master device can verify the legitimacy of the identity of the slave device based on the identity recognition data so as to improve the safety of data transmission of the master device and the slave device and prevent the data privacy from being revealed.
With continued reference to fig. 6, fig. 6 is a schematic diagram illustrating steps of another data transmission method according to an embodiment of the application. As shown in fig. 6, data transmission can also be achieved through steps S21 to S26.
Step S21: the master device receives broadcast data packets sent by a plurality of slave devices.
Step S22: the master device determines whether the corresponding slave device is a target slave device based on the broadcast packet.
The specific description of step S21 to step S22 refers to step S11 to step S12, and the description thereof is omitted herein for avoiding repetition.
Step S23: the master device determines the number of target slave devices based on the broadcast data packets.
Step S24: when the corresponding slave device is the target slave device, the master device sets the self-scanning state to be the active scanning state, and sends data transmission request information to the target slave device so that the target slave device receives the data transmission request information.
Step S25: the master device receives response information when the target slave device transmits the response information to the master device based on the data transmission request information, wherein the response information includes the data information.
Specifically, the master device may determine the number of senders through the received broadcast packets, and further determine the number of target slave devices.
When the number of target slave devices is 1, the master device may set the self-scanning state to the active scanning state and transmit data transmission request information to the target slave device so that the target slave device receives the data transmission request information. And further, when the target slave device transmits response information to the master device based on the data transmission request information, the master device receives the response information, wherein the response information comprises the data information. Thus, data transmission between the master device and the target slave device is realized.
Step S26: the master device sets the self-scanning state to the passive scanning state.
Since there is only one target slave device, the master device can set its own scan state to be a passive scan state after completing data transmission with the target slave device. As such, the master device cannot communicate data with other non-target devices.
In the embodiment of the application, after the data transmission of the master device and the target slave device is completed, the scanning state of the master device and the target slave device can be set to be a passive scanning state, so that the data transmission with other devices which are not target devices can not be performed. In this way, reduced power consumption of the host device and prevention of data privacy from being compromised is achieved.
Optionally, when the number of the target slave devices is greater than one, the master device sets the self-scanning state to the active scanning state, and sends the data transmission request information to the target slave device, so that the target slave device receives the data transmission request information, including: the master device sets the self-scanning state to be an active scanning state, and sends data transmission request information to any one target slave device so that the data transmission request information is received by any one target slave device.
Specifically, when the number of target slave devices is greater than one, the master device may set the self-scanning state to an active scanning state, and perform data transmission with any one of the target slave devices until the data transmission with the target slave device is successful.
On the basis of the above embodiment, when the target slave device transmits response information to the master device based on the data transmission request information, the master device receives the response information, and then includes: the master device sets the self-scanning state to be an active scanning state and sequentially receives response information of other target slave devices.
It can be understood that after completing data transmission with one of the target slave devices, the master device may continue to set its own scanning state to an active scanning state, and sequentially receive response information of the other target slave devices until data transmission with all the target slave devices is successful. Therefore, the quality of data transmission between the master device and the target slave device can be improved, and the probability of failure of data transmission is reduced.
Optionally, the data transmission request information includes authentication information, and the data transmission request information is sent to the target slave device, so that the target slave device after receiving the data transmission request information includes: and verifying the legitimacy of the identity of the master device based on the authentication information by the target slave device.
On the basis of the above embodiment, when the target slave device transmits response information to the master device based on the data transmission request information, the master device receives the response information, including: and after the target slave device verifies that the identity of the master device is legal, and sends response information to the master device based on the data transmission request information, the master device receives the response information.
It will be appreciated that the slave device may verify the authentication information to confirm that the identity of the master device is legitimate. Further, when the authentication information is successful in verification, the identity of the master device is legal, and identity authentication between the master device and the slave device is achieved. Further, the slave device may transmit response information to the master device based on the data transmission request information, so that the master device receives the response information. The authentication of the identity of the main equipment is realized by the process, so that the safety of the data transmission process is improved.
Referring to fig. 7, fig. 7 is a schematic block diagram of a data transmission device according to an embodiment of the present application, where the data transmission device may be configured in a server to perform the steps of the foregoing data transmission method.
As shown in fig. 7, the data transmission apparatus 200 includes: a receiving module 201, a judging module 202, a sending module 203 and a data transmission module 204.
A receiving module 201, configured to receive, by a master device, broadcast data packets sent by a plurality of slave devices;
the judging module 202 is configured to verify the first device information to obtain a first verification result after the master device receives the first transmission information, and obtain corresponding response information based on the data information;
a sending module 203, configured to set, when the corresponding slave device is a target slave device, a self-scanning state to be an active scanning state by using the master device, and send data transmission request information to the target slave device, so that the target slave device receives the data transmission request information;
and a data transmission module 204, configured to receive, by the master device, response information when the target slave device sends the response information to the master device based on the data transmission request information, where the response information includes data information.
The judging module 202 is further configured to judge, by using the master device, whether the identification data is in a preset database; and if the identification data is in the preset database, determining that the corresponding slave equipment is the target slave equipment.
The judging module 202 is further configured to set, after the corresponding slave device is not the target slave device, a self-scanning state to be a passive scanning state through the master device.
The judging module 202 is further configured to determine, by the master device, the number of target slave devices based on the broadcast data packet.
The data transmission module 204 is further configured to set a self-scanning state to a passive scanning state by the master device.
The data transmission module 204 is further configured to set, by the master device, a self-scanning state to an active scanning state, and send data transmission request information to any one of the target slave devices, so that any one of the target slave devices receives the data transmission request information.
The data transmission module 204 is further configured to set the self-scanning state to an active scanning state by using the master device, and sequentially receive response information of other target slave devices.
The judging module 202 is further configured to verify, by the target slave device, validity of the identity of the master device based on the authentication information.
The judging module 202 is further configured to receive, by the master device, response information when the target slave device verifies that the identity of the master device is legal and sends the response information to the master device based on the data transmission request information.
It should be noted that, for convenience and brevity of description, specific working processes of the above-described apparatus and each module, unit may refer to corresponding processes in the foregoing method embodiments, which are not repeated herein.
The methods and apparatus of the present application are operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
The above-described method, apparatus may be implemented, for example, in the form of a computer program that is executable on a device as shown in fig. 8.
Referring to fig. 8, fig. 8 is a schematic block diagram of an apparatus according to an embodiment of the present application. The device may be a server.
As shown in fig. 8, the device includes a processor, a memory, and a network interface connected by a system bus, wherein the memory may include a volatile storage medium, a non-volatile storage medium, and an internal memory.
The non-volatile storage medium may store an operating system and a computer program. The computer program comprises program instructions which, when executed, cause the processor to perform any one of a number of data transmission methods.
The processor is used to provide computing and control capabilities to support the operation of the entire device.
The internal memory provides an environment for the execution of a computer program in a non-volatile storage medium that, when executed by a processor, causes the processor to perform any one of a number of data transmission methods.
The network interface is used for network communication such as transmitting assigned tasks and the like. It will be appreciated by persons skilled in the art that the structure of the apparatus is merely a block diagram of some of the structures associated with the present application and does not constitute a limitation of the apparatus to which the present application is applied, and that a particular apparatus may include more or less components than those shown in the drawings, or may combine certain components, or have a different arrangement of components.
It should be appreciated that the processor may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field-programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Wherein in some embodiments the processor is configured to run a computer program stored in the memory to implement the steps of: the master device receives a plurality of broadcast data packets sent by the slave devices; the master device judges whether the corresponding slave device is a target slave device or not based on the broadcast data packet; when the corresponding slave device is a target slave device, the master device sets a self-scanning state to be an active scanning state, and sends data transmission request information to the target slave device so that the target slave device receives the data transmission request information; and when the target slave device sends response information to the master device based on the data transmission request information, the master device receives the response information, wherein the response information comprises data information.
In some embodiments, the processor is further configured to determine, by the host device, whether the identification data is within a preset database; and if the identification data is in the preset database, determining that the corresponding slave equipment is the target slave equipment.
In some embodiments, the processor is further configured to set the self-scan state to a passive scan state after the corresponding slave device is not the target slave device.
In some implementations, the processor is further configured to determine, by the master device, the number of target slave devices based on the broadcast data packet.
In some embodiments, the processor is further configured to set, by the master device, a self-scan state to a passive scan state.
In some embodiments, the processor is further configured to set, by the master device, a self-scanning state to an active scanning state, and send data transmission request information to any one of the target slave devices, so that any one of the target slave devices receives the data transmission request information.
In some embodiments, the processor is further configured to set, by the master device, a self-scanning state to an active scanning state, and sequentially receive response information of other target slave devices.
In some implementations, the processor is further configured to verify, by the target slave device, validity of the master device identity based on the authentication information.
In some embodiments, the processor is further configured to receive response information from the master device when the target slave device verifies that the master device identity is legal and sends the response information to the master device based on the data transmission request information.
The embodiment of the application also provides a computer readable storage medium, and a computer program is stored on the computer readable storage medium, wherein the computer program comprises program instructions, and when the program instructions are executed, any one of the data transmission methods provided by the embodiment of the application is realized.
The computer readable storage medium may be an internal storage unit of the device according to the foregoing embodiment, for example, a hard disk or a memory of the device. The computer readable storage medium may also be an external storage device of the device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the device.
Further, the computer-readable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like.
While the application has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (12)

1. A data transmission method, characterized in that it is applied to a communication system including a master device and at least one slave device, the master device and the slave devices being connectable by means of bluetooth, the method comprising:
the master device receives a plurality of broadcast data packets sent by the slave devices;
the master device judges whether the corresponding slave device is a target slave device or not based on the broadcast data packet;
when the corresponding slave device is a target slave device, the master device sets a self-scanning state to be an active scanning state, and sends data transmission request information to the target slave device so that the target slave device receives the data transmission request information;
and when the target slave device sends response information to the master device based on the data transmission request information, the master device receives the response information, wherein the response information comprises data information.
2. The method of claim 1, wherein the broadcast data packet includes identification data, and wherein the master device determines whether the corresponding slave device is a target slave device based on the broadcast data packet, comprising:
the main equipment judges whether the identification data is in a preset database or not;
and if the identification data is in the preset database, determining that the corresponding slave equipment is the target slave equipment.
3. The method according to claim 1, wherein after the master device determines whether the corresponding slave device is a target slave device based on the broadcast packet, comprising:
and after the corresponding slave device is not the target slave device, the master device sets the self-scanning state to be a passive scanning state.
4. The method of claim 1, wherein after the master device determines whether the corresponding slave device is a target slave device based on the broadcast packet, further comprising:
the master device determines the number of target slave devices based on the broadcast data packet.
5. The method of claim 4, wherein the number of target slave devices is one, and wherein when the target slave device transmits response information to the master device based on the data transmission request information, the master device further comprises, after receiving the response information:
the master device sets its own scanning state to a passive scanning state.
6. The method of claim 4, wherein the number of target slave devices is greater than one, the master device sets the self-scan state to the active scan state, and transmits data transmission request information to the target slave device, so that the target slave device receives the data transmission request information, comprising:
the master device sets the self-scanning state to be an active scanning state, and sends data transmission request information to any one of the target slave devices so that any one of the target slave devices receives the data transmission request information.
7. The method according to claim 6, wherein when the target slave device transmits response information to the master device based on the data transmission request information, the master device receives the response information, comprising:
the master device sets the self-scanning state to be an active scanning state and sequentially receives response information of other target slave devices.
8. The method of claim 1, wherein the data transmission request information includes authentication information, and wherein the transmitting the data transmission request information to the target slave device, after causing the target slave device to receive the data transmission request information, includes:
and verifying the validity of the identity of the master device based on the authentication information by the target slave device.
9. The method of claim 8, wherein the master device receiving response information when the target slave device transmits the response information to the master device based on the data transmission request information, comprises:
and after the target slave device verifies that the identity of the master device is legal, and when response information is sent to the master device based on the data transmission request information, the master device receives the response information.
10. A data transmission apparatus, the data transmission comprising:
the receiving module is used for receiving the broadcast data packets sent by the plurality of slave devices through the master device;
the judging module is used for judging whether the corresponding slave equipment is a target slave equipment or not based on the broadcast data packet through the master equipment;
the sending module is used for setting a self-scanning state to be an active scanning state through the master equipment when the corresponding slave equipment is the target slave equipment, and sending data transmission request information to the target slave equipment so that the target slave equipment receives the data transmission request information;
and the data transmission module is used for receiving response information through the master device when the target slave device sends the response information to the master device based on the data transmission request information, wherein the response information comprises data information.
11. An apparatus, comprising: a memory and a processor; wherein the memory is connected to the processor for storing a program and the processor is configured to implement the steps of the data transmission method according to any one of claims 1-9 by running the program stored in the memory.
12. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, causes the processor to implement the steps of the data transmission method according to any one of claims 1-9.
CN202310410834.9A 2023-04-14 2023-04-14 Data transmission method, data transmission device, equipment and storage medium Pending CN116614867A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310410834.9A CN116614867A (en) 2023-04-14 2023-04-14 Data transmission method, data transmission device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310410834.9A CN116614867A (en) 2023-04-14 2023-04-14 Data transmission method, data transmission device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116614867A true CN116614867A (en) 2023-08-18

Family

ID=87684400

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310410834.9A Pending CN116614867A (en) 2023-04-14 2023-04-14 Data transmission method, data transmission device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116614867A (en)

Similar Documents

Publication Publication Date Title
KR102149587B1 (en) Identity authentication method and device
CN107835040B (en) Data communication method, equipment and storage medium based on Bluetooth
US8909194B2 (en) Physical location verification
US8762715B2 (en) Event triggered pairing of wireless communication devices based on time measurements
US9843579B2 (en) Dynamically generated SSID
EP2405622B1 (en) Device communication
US10743180B2 (en) Method, apparatus, and system for authenticating WIFI network
US11757874B2 (en) Mutual authentication system
US8656027B2 (en) Wireless communication system, wireless communication apparatus, method for disconnection process thereof, and storage medium
KR20120055683A (en) Methods and apparatus for deriving, communicating and/or verifying ownership of expressions
CN102318386A (en) Service-based authentication to a network
CN101842775A (en) Method of authentication for a wireless enabled memory card
US20150264570A1 (en) Method and device for proving his identity
US10872327B2 (en) Mobile payment systems and mobile payment methods thereof
CN105491034A (en) Method for establishing connection with terminal and terminal authentication method and apparatus
CN112449323A (en) Communication method, device and system
US9055058B2 (en) Method and apparatus for serial device registration
KR101392571B1 (en) Near Field Communication Interface Control
CN111666590A (en) Distributed file secure transmission method, device and system
CN116614867A (en) Data transmission method, data transmission device, equipment and storage medium
WO2023178691A1 (en) Security implementation method and apparatus, device and network element
CN111212413A (en) Unlocking communication method and device and computer storage medium
US20030061485A1 (en) Authenticated public key transmission
EP3301885A1 (en) Method, data sending control server, storage server, processing server and system for sending data to at least one device
WO2018032984A1 (en) Access authentication method, ue, and access device

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