CN110572805A - Data transmission method and device, electronic equipment and computer readable medium - Google Patents

Data transmission method and device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN110572805A
CN110572805A CN201910854883.5A CN201910854883A CN110572805A CN 110572805 A CN110572805 A CN 110572805A CN 201910854883 A CN201910854883 A CN 201910854883A CN 110572805 A CN110572805 A CN 110572805A
Authority
CN
China
Prior art keywords
data
determining
data transmission
intensity value
value
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
CN201910854883.5A
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.)
Sinochem Information Technology Co Ltd
Original Assignee
Sinochem Information 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 Sinochem Information Technology Co Ltd filed Critical Sinochem Information Technology Co Ltd
Priority to CN201910854883.5A priority Critical patent/CN110572805A/en
Publication of CN110572805A publication Critical patent/CN110572805A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • 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

Abstract

the embodiment of the disclosure discloses a data transmission method, a data transmission device, an electronic device and a computer readable medium. One embodiment of the method comprises: detecting a Bluetooth signal of a target device; determining whether the intensity value of the Bluetooth signal reaches a preset threshold value; determining whether a light sensor of the electronic equipment is triggered; performing Bluetooth connection with the target equipment in response to the fact that the light sensor is triggered and the strength value reaches a preset threshold value; and carrying out data transmission with the target equipment. The embodiment realizes targeted data transmission.

Description

Data transmission method and device, electronic equipment and computer readable medium
Technical Field
embodiments of the present disclosure relate to the field of computer technologies, and in particular, to a data transmission method, an apparatus, an electronic device, and a computer-readable medium.
Background
data Switching refers to a process of establishing a temporary interconnection path for Data communication between any two terminal devices among a plurality of Data terminal Devices (DTEs). Data transmission can be divided into: circuit communications, message communications, packet communications, and hybrid communications.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
some embodiments of the present disclosure propose data transmission methods, apparatuses, electronic devices and computer readable media.
In a first aspect, some embodiments of the present disclosure provide a data transmission method, including: detecting a Bluetooth signal of a target device; determining whether the intensity value of the Bluetooth signal reaches a preset threshold value; determining whether a light sensor of the electronic equipment is triggered; performing Bluetooth connection with the target device in response to determining that the light sensor is triggered and determining that the intensity value reaches a preset threshold value; and carrying out data transmission with the target equipment.
In a second aspect, some embodiments of the present disclosure provide an apparatus for data transmission, the apparatus comprising: a detection unit configured to detect a Bluetooth signal of a target device; a determining unit configured to determine whether the intensity value of the bluetooth signal reaches a preset threshold value; a light sensor determining unit configured to determine whether a light sensor of the electronic device is triggered; a connection unit configured to perform a bluetooth connection with the target device in response to determining that the light sensor is triggered and determining that the intensity value reaches a preset threshold; and the data transmission unit is configured to perform data transmission with the target device.
In a third aspect, some embodiments of the present disclosure provide a data transmission method, an apparatus, an electronic device, and a computer-readable medium.
According to the data transmission method, the data transmission device, the electronic equipment and the computer readable medium, the target equipment Bluetooth signal is detected firstly, the strength value of the Bluetooth signal is determined, then the light sensor is detected, Bluetooth connection is carried out on the target equipment if the strength value of the Bluetooth signal reaches a preset threshold value and the light sensor is triggered, and finally data transmission is carried out based on the Bluetooth connection, so that the Bluetooth connection is effectively utilized, and the data transmission rich in pertinence is realized.
drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
FIG. 1 is an architectural diagram of an exemplary system in which some embodiments of the present disclosure may be applied;
Fig. 2 is a flow diagram of some embodiments of a data transmission method according to the present disclosure;
FIG. 3 is a schematic block diagram of some embodiments of a data transmission device according to the present disclosure;
Fig. 4 is a timing diagram of some embodiments of a data transmission method according to the present disclosure;
FIG. 5 is a schematic structural diagram of an electronic device suitable for use in implementing some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
it should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings. The embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
it is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary system architecture 100 of a data transmission method or data transmission apparatus to which some embodiments of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and an electronic device 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the electronic device 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 101, 102, 103 to interact with the electronic device 105 over the network 104 to receive or transmit data or the like. Various data transmission applications, such as bluetooth communication tools, data transmission software, etc., may be installed on the terminal devices 101, 102, 103.
The terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices with bluetooth connection function, including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers, desktop computers, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the electronic apparatuses listed above. It may be implemented, for example, as multiple software or software modules to provide distributed services, or as a single software or software module. And is not particularly limited herein.
The electronic device 105 may be hardware or software. When the electronic device 105 is hardware, it may be various electronic devices with bluetooth connection capability, including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers, desktop computers, and the like. The electronic device 105 may perform processing such as analysis on the received data and feed back the processing result (e.g., data to be communicated) to the terminal device. When the electronic device 105 is software, it can be installed in the electronic devices listed above. It may be implemented, for example, as multiple software or software modules to provide distributed services, or as a single software or software module. And is not particularly limited herein.
It should be noted that the data transmission method provided in the embodiment of the present application is generally executed by the electronic device 105, and accordingly, the information pushing apparatus is generally disposed in the electronic device 105.
The electronic device may be hardware or software. When the electronic device is hardware, the distributed electronic device cluster formed by a plurality of electronic devices may be implemented, or a single electronic device may be implemented. When the electronic device is software, it may be implemented as a plurality of software or software modules for providing distributed services, for example, or as a single software or software module. And is not particularly limited herein.
It should be understood that the number of terminal devices, networks, and electronic devices in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and electronic devices, as desired for implementation.
With continued reference to fig. 2, a flow 200 of some embodiments of a data transmission method according to the present disclosure is shown. The data transmission method comprises the following steps:
step 201, detecting a bluetooth signal of a target device.
in some embodiments, the execution body (electronic device) may detect a bluetooth signal of the target device. Here, the target device generally refers to a device that issues a bluetooth connection request to the execution main body (electronic device), for example, a laptop portable computer, a tablet computer, or the like. The above detection generally refers to detecting whether the target device sends out a bluetooth signal. The bluetooth signal generally refers to a signal that a target device requests a bluetooth connection. The electronic device generally refers to an electronic device having a bluetooth connection function and a light sensor, such as an electronic book reader, a smart phone, and the like.
Step 202, determining whether the intensity value of the bluetooth signal reaches a preset threshold value.
In some embodiments, based on the detection result of step 201, the executing entity (electronic device) may determine whether the intensity value of the bluetooth signal reaches a preset threshold. Here, the strength value of the bluetooth signal is generally a value representing the strength of the bluetooth signal. The reaching of the preset threshold may be equal to or greater than the preset threshold. The preset threshold value is generally a preset value.
in some optional implementations of some embodiments, the executing entity may obtain a predetermined number of intensity values of the bluetooth signal, resulting in the first set of intensity values. And deleting the maximum intensity value and the minimum intensity value in the first intensity value set to obtain a second intensity value set. A median of the second set of intensity values is determined. For each intensity value in the second set of intensity values, determining a difference between the intensity value and the median, and in response to determining that an absolute value of the difference is less than or equal to a predetermined value, determining the intensity value as valid data. And determining the average value of the number of the effective data as the signal strength value of the Bluetooth signal in response to the determined number of the effective data reaching the preset number.
Here, the predetermined number of the intensity values of the bluetooth signal is generally set to be greater than or equal to 3. The predetermined number may be a number set by a person, for example, 3, 5, etc. The Median (media) is also called Median, and usually refers to a proper term in statistics, and is a number in a middle position in a set of data arranged in sequence. For a finite number set, the median can be found by ranking all observations high and low. If there are an even number of observations, the median is usually taken as the average of the two most intermediate values. For example, the number set includes three numbers of 1, 3 and 5, and the median of the number set is 3. The above-mentioned number of valid data reaching the predetermined number generally means that the number of valid data is greater than or equal to the predetermined number. The predetermined number may be a number set by a human. The above signal intensity value generally refers to a value for characterizing the signal intensity.
Step 203, determine whether the optical sensor of the electronic device is triggered.
in some embodiments, the electronic device may detect a light sensor in the electronic device to determine whether the light sensor is triggered. The triggered state can be that the optical sensor of the electronic device sends out a triggering signal, and the like. Here, the photosensor generally refers to a device capable of converting an optical signal into an electrical signal, for example, an ambient light sensor, an infrared light sensor, or the like.
And step 204, in response to the fact that the light sensor is triggered and the fact that the intensity value reaches the preset threshold value, performing Bluetooth connection with the target device.
In some embodiments, the electronic device may perform bluetooth connection with the target device when the bluetooth signal intensity value of the target device reaches a preset threshold and the light sensor in the electronic device is triggered.
And step 205, performing data transmission with the target device.
In some embodiments, the electronic device may perform data transmission after bluetooth connection with the target device. Data transmission (data transmission) refers herein to the process of transferring data between a data source and a data sink over one or more links according to an appropriate procedure, and also refers to the operation of transmitting data from one place to another by means of signals on a channel. There are various ways of transmitting data, such as serial transmission, synchronous transmission, etc. The data transmission may be that the electronic device transmits data to the target device, or that the target device transmits data to the electronic device. And are not limited herein.
In some optional implementation manners of some embodiments, the electronic device may perform data encapsulation on data to be transmitted, and generate a data packet. And sending the data packet to the target device. And the target equipment receives the data packet after decapsulating the data packet. Here, Data Encapsulation (Data Encapsulation) generally refers to a process of mapping service Data into a payload of an Encapsulation protocol, then filling a header of the corresponding protocol, forming a Data packet of the Encapsulation protocol, and completing rate adaptation.
As an example, the electronic device may perform data encapsulation on data to be transmitted to generate a data packet, and send the data packet to a target device. And the target equipment decapsulates the data packet to obtain data in the data packet, and receives the data. Here, the decapsulation generally refers to a process of disassembling a protocol packet, processing information in a packet header, and extracting service information in a payload.
In some optional implementation manners of some embodiments, in response to determining that the size of the data to be transmitted is greater than or equal to a preset threshold, the electronic device may encapsulate the data to be transmitted into at least two data packets; and sequentially sending the at least two data packets to the target equipment.
as an example, when the content of the data to be transmitted is too large to reach a preset threshold, the size of the data packet is fixed, and the data to be transmitted cannot be encapsulated into one data packet, so that the data to be transmitted is encapsulated into a plurality of data packets, each data packet transmits data of a specific size, and the data packets are transmitted in batches until the data to be transmitted is completed. The preset threshold is usually set according to the maximum data capacity of the data packet, for example, the preset threshold may be that the size of the data a to be transmitted is greater than 100M.
In some optional implementations of some embodiments, the electronic device may obtain data information of the data to be transmitted. The data information includes the data length of the data to be transmitted and the check code of the data to be transmitted. And carrying out data encapsulation on the data to be transmitted to generate a data packet. And sending the data packet and the data information to the target device. And the target equipment receives the data in response to the data length and the check code of the data being consistent with the data length and the check code of the data information to be transmitted.
Here, the data length generally refers to the size of data, for example, the size of text a is 992 bytes, and the data length of text a is 992 bytes. The check code is generally referred to as an error detection code, and may be, for example, a binary number indicating whether the number of 1's in a given number of bits is an odd number or an even number. The check code may be calculated by using a calculation method such as a code distance, parity check, hamming check, cyclic redundancy check, or the like.
Here, the electronic device may obtain data information of data to be transmitted, perform data encapsulation on the data to generate a data packet, and send the data packet and the data information of the data to be transmitted to the target device. And the target equipment receives the data information of the data to be transmitted, decapsulates the data packet to obtain the data in the data packet, calculates the data length and the check code of the data, compares the data length and the check code of the data with the data information of the data to be transmitted, and receives the data in the data packet when the comparison is consistent.
Some embodiments of the present disclosure provide methods that enable targeted data transfer by associating bluetooth signals with light sensors.
with further reference to fig. 3, as an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a data transmission apparatus, which correspond to those shown in fig. 2, and which may be applied in various electronic devices in particular.
As shown in fig. 3, the data transmission apparatus 300 of some embodiments includes: a detection unit 301, a determination unit 302, a photosensor determination unit 303, a connection unit 304, and a data transmission unit 305. Wherein the detection unit is configured to detect a Bluetooth signal of the target device; a determining unit configured to determine whether the intensity value of the bluetooth signal reaches a preset threshold value; a light sensor determining unit configured to determine whether a light sensor of the electronic device is triggered; a connection unit configured to perform a bluetooth connection with the target device in response to determining that the light sensor is triggered and determining that the intensity value reaches a preset threshold; and the data transmission unit is configured to perform data transmission with the target device.
In some embodiments, the detection unit 301 of the data transmission apparatus 300 may detect a bluetooth signal of the target device. The bluetooth signal generally refers to a signal that a terminal device requests connection.
In some embodiments, the determining unit 302 may determine whether the intensity value of the bluetooth signal reaches a preset threshold value based on the detection result of the bluetooth signal in the detecting unit 301. Here, the strength value of the bluetooth signal is generally a value representing the strength of the bluetooth signal. The above-mentioned reaching of the preset threshold value may be equal to or greater than.
In some embodiments, the light sensor determining unit 303 may detect a light sensor in the electronic device to determine whether the light sensor is triggered. Here, the photo sensor generally refers to a device capable of converting an optical signal into an electrical signal, for example, an ambient light sensor, an infrared light sensor, and the like.
In some embodiments, the connection unit 304 may perform a bluetooth connection with the target device when the bluetooth signal reaches a predetermined threshold and the optical sensor is triggered.
In some embodiments, the data transmission unit 305 may perform data transmission after a bluetooth connection. Herein, the above-mentioned data transmission refers to a process of transferring data between a data source and a data sink via one or more links according to an appropriate procedure. But also the operation of sending data from one place to another by means of signals on the channel.
With further reference to fig. 4, a timing diagram 400 of some embodiments of a data transmission method is shown. The process 400 of the data transmission method includes the following steps:
as shown in fig. 4, step 401, a bluetooth signal.
Here, the target device may transmit a bluetooth signal to the electronic device. The target device generally refers to a device that issues a bluetooth connection request to an electronic device, such as a laptop portable computer, a tablet computer, and the like. The transmission is typically a wireless transmission of a bluetooth signal requesting a connection.
step 402, determining whether the intensity value of the bluetooth signal reaches a preset threshold value.
here, the electronic device may detect a bluetooth signal of a target device and determine whether an intensity value of the bluetooth signal reaches a preset threshold. The above detection generally refers to detecting the strength value of the bluetooth signal. The bluetooth signal generally refers to a signal that a target device requests connection. The electronic device generally refers to an electronic device having a bluetooth connection function and a light sensor, such as an electronic book reader, a smart phone, and the like. Here, the strength value of the bluetooth signal is generally a value representing the strength of the bluetooth signal. The above-mentioned reaching of the preset threshold value may be equal to or greater than. The preset threshold may be a preset value.
at step 403, it is determined whether the light sensor is triggered.
Here, the electronic device may detect the light sensor in the electronic device to determine whether the light sensor is triggered. Here, the photosensor generally refers to a device capable of converting an optical signal into an electrical signal, for example, an ambient light sensor, an infrared light sensor, or the like.
Step 404, bluetooth connection is performed with the target device.
Here, the electronic device may perform bluetooth connection with the target device when the bluetooth signal intensity value of the target device reaches a preset threshold and the light sensor in the electronic device is triggered.
Step 405, data.
Here, the electronic device may perform data transmission after bluetooth connection with the target device. Herein, data transmission refers to the process of transferring data between a data source and a data sink over one or more links in accordance with an appropriate procedure. But also the operation of sending data from one place to another by means of signals on the channel. The data transmission may be that the electronic device transmits data to the target device, or that the target device transmits data to the electronic device. And are not limited herein.
Referring now to fig. 5, a schematic diagram of an electronic device (e.g., the electronic device of fig. 1) 500 suitable for use in implementing some embodiments of the present disclosure is shown. The server shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, electronic device 500 may include a processing means (e.g., central processing unit, graphics processor, etc.) 501 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM502, and the RAM 503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Generally, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 507 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage devices 508 including, for example, magnetic tape, hard disk, etc.; and a communication device 509. The communication means 509 may allow the electronic device 500 to communicate wirelessly or by wire with other devices for data transmission. While fig. 5 illustrates an electronic device 500 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 5 may represent one device or may represent multiple devices as desired.
in particular, according to some embodiments of the present disclosure, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In some such embodiments, the computer program may be downloaded and installed from a network via the communication means 509, or installed from the storage means 508, or installed from the ROM 502. The computer program, when executed by the processing device 501, performs the above-described functions defined in the methods of some embodiments of the present disclosure.
It should be noted that the computer readable medium described in some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: detecting a Bluetooth signal of a target device; determining whether the intensity value of the Bluetooth signal reaches a preset threshold value; determining whether a light sensor of the electronic equipment is triggered; performing Bluetooth connection with the target device in response to determining that the light sensor is triggered and determining that the intensity value reaches a preset threshold value; and carrying out data transmission with the target equipment. .
computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in some embodiments of the present disclosure may be implemented by software, and may also be implemented by hardware. The described units may also be provided in a processor, and may be described as: a processor includes a detection unit, a determination unit, a photosensor determination unit, a connection unit, and a data transmission unit. Where the names of the units do not in some cases constitute a limitation of the unit itself, the detection unit may also be described as a "receiving bluetooth signal unit", for example.
the functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

Claims (8)

1. a data transmission method for an electronic device, comprising:
Detecting a Bluetooth signal of a target device;
Determining whether the intensity value of the Bluetooth signal reaches a preset threshold value;
Determining whether a light sensor of the electronic device is triggered;
Performing Bluetooth connection with the target device in response to determining that the light sensor is triggered and determining that the intensity value reaches a preset threshold value;
And carrying out data transmission with the target equipment.
2. The method of claim 1, wherein the data transfer with the target device comprises:
Carrying out data encapsulation on data to be transmitted to generate a data packet;
and sending the data packet to the target equipment, wherein the target equipment receives the data packet after decapsulating the data packet.
3. the method of claim 1, the data transfer with the target device comprising:
In response to the fact that the size of the data to be transmitted is larger than or equal to a preset threshold value, packaging the data to be transmitted into at least two data packets;
And sequentially sending the at least two data packets to the target equipment.
4. The method according to one of claims 1 to 3, the data transmission with the target device comprising:
Acquiring data information of data to be transmitted, wherein the data information comprises the data length of the data to be transmitted and a check code of the data to be transmitted;
Performing data encapsulation on the data to be transmitted to generate a data packet;
And sending the data package and the data information to the target equipment, wherein the target equipment decapsulates the data package to obtain decapsulated data, determines the data length and the check code of the decapsulated data, and receives the data in response to the data length and the check code of the data being consistent with the data length and the check code of the data information to be transmitted.
5. The method of claim 1, wherein the determining whether the strength value of the Bluetooth signal reaches a preset threshold comprises:
Obtaining the intensity values of a preset number of Bluetooth signals to obtain a first intensity value set;
deleting the maximum intensity value and the minimum intensity value in the first intensity value set to obtain a second intensity value set;
Determining a median of the second set of intensity values;
For each intensity value in the second set of intensity values, determining a difference between the intensity value and the median, and in response to determining that the absolute value of the difference is less than or equal to a preset value, determining the intensity value as valid data;
Determining an average value of the number of valid data as a signal strength value of the Bluetooth signal in response to the determined number of valid data reaching a predetermined number.
6. An apparatus for data transmission, comprising:
a detection unit configured to detect a Bluetooth signal of a target device;
A determination unit configured to determine whether the intensity value of the Bluetooth signal reaches a preset threshold value;
A light sensor determination unit configured to determine whether a light sensor of the electronic device is triggered;
a connection unit configured to perform a Bluetooth connection with the target device in response to determining that the light sensor is triggered and determining that the intensity value reaches a preset threshold;
a data transmission unit configured to perform data transmission with the target device.
7. An electronic device, comprising:
One or more processors;
a storage device having one or more programs stored thereon,
When executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5.
8. a computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-5.
CN201910854883.5A 2019-09-10 2019-09-10 Data transmission method and device, electronic equipment and computer readable medium Pending CN110572805A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910854883.5A CN110572805A (en) 2019-09-10 2019-09-10 Data transmission method and device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910854883.5A CN110572805A (en) 2019-09-10 2019-09-10 Data transmission method and device, electronic equipment and computer readable medium

Publications (1)

Publication Number Publication Date
CN110572805A true CN110572805A (en) 2019-12-13

Family

ID=68778967

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910854883.5A Pending CN110572805A (en) 2019-09-10 2019-09-10 Data transmission method and device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN110572805A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111123199A (en) * 2019-12-30 2020-05-08 泰康保险集团股份有限公司 Positioning method and device, computer readable storage medium and electronic equipment
CN113507702A (en) * 2021-05-28 2021-10-15 西安闻泰信息技术有限公司 Bluetooth connection method and device, vehicle-mounted Bluetooth equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102646081A (en) * 2010-10-29 2012-08-22 惠普发展公司,有限责任合伙企业 System and method for inductively pairing devices to share data or resources
US20140378056A1 (en) * 2013-06-21 2014-12-25 Bose Corporation Low energy wireless proximity pairing
CN106571894A (en) * 2016-11-10 2017-04-19 深圳市民德电子科技股份有限公司 Bluetooth information sending and receiving methods
CN107278380A (en) * 2017-05-16 2017-10-20 深圳市创客工场科技有限公司 Connect the method and terminal device of bluetooth equipment
WO2018205112A1 (en) * 2017-05-08 2018-11-15 深圳市汇顶科技股份有限公司 Positioning method and apparatus based on bluetooth (ble)

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102646081A (en) * 2010-10-29 2012-08-22 惠普发展公司,有限责任合伙企业 System and method for inductively pairing devices to share data or resources
US20140378056A1 (en) * 2013-06-21 2014-12-25 Bose Corporation Low energy wireless proximity pairing
CN106571894A (en) * 2016-11-10 2017-04-19 深圳市民德电子科技股份有限公司 Bluetooth information sending and receiving methods
WO2018205112A1 (en) * 2017-05-08 2018-11-15 深圳市汇顶科技股份有限公司 Positioning method and apparatus based on bluetooth (ble)
CN107278380A (en) * 2017-05-16 2017-10-20 深圳市创客工场科技有限公司 Connect the method and terminal device of bluetooth equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111123199A (en) * 2019-12-30 2020-05-08 泰康保险集团股份有限公司 Positioning method and device, computer readable storage medium and electronic equipment
CN113507702A (en) * 2021-05-28 2021-10-15 西安闻泰信息技术有限公司 Bluetooth connection method and device, vehicle-mounted Bluetooth equipment and storage medium
CN113507702B (en) * 2021-05-28 2023-10-03 西安闻泰信息技术有限公司 Bluetooth connection method and device, vehicle-mounted Bluetooth device and storage medium

Similar Documents

Publication Publication Date Title
CN107529132B (en) Method and device for transmitting data between Bluetooth device and application program
CN112039796B (en) Data packet transmission method and device, storage medium and electronic equipment
CN112416632B (en) Event communication method and device, electronic equipment and computer readable medium
CN111314439A (en) Data sending method and device and electronic equipment
CN110572805A (en) Data transmission method and device, electronic equipment and computer readable medium
CN115871691A (en) Vehicle running control method and device, electronic equipment and computer readable medium
CN111800223B (en) Method, device and system for generating sending message and processing receiving message
CN114882628B (en) Data processing method and device, electronic equipment and computer readable medium
CN112346661B (en) Data processing method and device and electronic equipment
CN113126985B (en) Method, apparatus, electronic device and computer readable medium for page rendering
CN112732457B (en) Image transmission method, image transmission device, electronic equipment and computer readable medium
CN112416887B (en) Information interaction method and device and electronic equipment
CN112507676B (en) Method and device for generating energy report, electronic equipment and computer readable medium
CN113763646A (en) Device control method, device, electronic device and computer readable medium
CN112464039A (en) Data display method and device of tree structure, electronic equipment and medium
CN112543228A (en) Data transmission method and device, electronic equipment and computer readable medium
CN111694679B (en) Message processing method and device and electronic equipment
CN116938598B (en) Information transmission method, apparatus, electronic device, and computer-readable medium
CN113535428B (en) Method, device, equipment and medium for processing request message and response message
CN114745276B (en) Switch bandwidth adjusting method and device, electronic equipment and computer readable medium
CN117294745B (en) Network connection state information sending method, device, electronic equipment and medium
CN113852484B (en) Terminal equipment network distribution method, device, electronic equipment and computer readable medium
CN116128415B (en) Power equipment information sending method and device, electronic equipment and computer medium
CN116226888B (en) Power data interactive encryption method, system and equipment based on privacy protection
CN113094002B (en) Message processing method, device, electronic equipment and computer medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20191213

RJ01 Rejection of invention patent application after publication