CN115442917A - Data communication method, device, equipment and readable storage medium - Google Patents
Data communication method, device, equipment and readable storage medium Download PDFInfo
- Publication number
- CN115442917A CN115442917A CN202210989355.2A CN202210989355A CN115442917A CN 115442917 A CN115442917 A CN 115442917A CN 202210989355 A CN202210989355 A CN 202210989355A CN 115442917 A CN115442917 A CN 115442917A
- Authority
- CN
- China
- Prior art keywords
- ultra
- wideband
- protocol
- equipment
- wideband communication
- 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
Links
- 238000004891 communication Methods 0.000 title claims abstract description 256
- 238000000034 method Methods 0.000 title claims abstract description 65
- 238000012545 processing Methods 0.000 claims description 28
- 230000006870 function Effects 0.000 claims description 21
- 238000004590 computer program Methods 0.000 claims description 18
- 238000010586 diagram Methods 0.000 description 17
- 230000005540 biological transmission Effects 0.000 description 9
- 230000008569 process Effects 0.000 description 7
- 230000006978 adaptation Effects 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 4
- 230000004044 response Effects 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000006467 substitution reaction Methods 0.000 description 2
- 238000007792 addition Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/14—Direct-mode setup
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/24—Negotiation of communication capabilities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/11—Allocation or use of connection identifiers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W80/00—Wireless network protocols or protocol adaptations to wireless operation
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The application discloses a data communication method, a device, equipment and a readable storage medium, wherein before first equipment and second equipment carry out ultra-wideband communication, the first equipment and the second equipment establish Bluetooth communication connection, the first equipment acquires ultra-wideband protocol information of the second equipment based on the Bluetooth communication connection, and then the first equipment determines a target ultra-wideband communication protocol corresponding to the ultra-wideband protocol information from a plurality of preset ultra-wideband communication protocols, so that the ultra-wideband communication connection is established with the second equipment based on the target ultra-wideband communication protocol. According to the embodiment of the application, when the first device and the second device are in UWB communication connection, the UWB protocol information of the second device is obtained through Bluetooth communication, the UWB protocol supported by the second device is automatically determined according to the UWB protocol information, manual selection of a user is not needed, the operation is simple, and the use is more convenient.
Description
Technical Field
The present application belongs to the field of data communication technologies, and in particular, to a data communication method, apparatus, device, and readable storage medium.
Background
Ultra Wide Band (UWB) technology is a new type of wireless communication technology. With the rapid development of the UWB technology, the UWB technology has already entered the consumer market and the industrial market at present, and mainly aims at the fields of mobile phone terminals, automobile applications, internet of things, industry 4.0 and the like, including typical cases of indoor positioning, mobile data sharing, security payment, asset tracking, vehicle-mounted positioning, keyless entry, smart home, smart factories and the like.
A UWB terminal device first needs to establish a UWB communication connection with other UWB devices before communicating with the other UWB devices. However, since UWB protocols supported by different UWB devices are not uniform, when a UWB terminal device establishes a UWB communication connection with another UWB device, a user is generally required to manually select a UWB protocol supported by another UWB device from among the UWB terminal devices according to information such as a brand of the other UWB device to perform the communication connection.
Disclosure of Invention
The embodiment of the application provides a data communication method, a data communication device, data communication equipment and a readable storage medium, which can automatically determine a UWB protocol required by UWB communication establishment without manual selection.
In a first aspect, an embodiment of the present application provides a data communication method, which is applied to a first device, and the method includes:
the method comprises the steps that before the first device carries out ultra-wideband communication with the second device, bluetooth communication connection is established between the first device and the second device;
acquiring ultra-wideband protocol information of the second device based on the Bluetooth communication connection;
determining a target ultra-wideband communication protocol corresponding to ultra-wideband protocol information from a plurality of preset ultra-wideband communication protocols;
an ultra-wideband communication connection is established with a second device based on a target ultra-wideband communication protocol.
As a possible implementation, the ultra-wideband protocol information includes device identification information of the second device;
determining a target ultra-wideband communication protocol corresponding to ultra-wideband protocol information from a plurality of preset ultra-wideband communication protocols, comprising:
determining target ultra-wideband communication protocol version information corresponding to the equipment identification information of the second equipment according to the corresponding relation between the preset equipment identification information and the ultra-wideband communication protocol version information;
and determining the ultra-wideband communication protocol of which the version information is matched with the version information of the target ultra-wideband communication protocol in a plurality of preset ultra-wideband communication protocols as the target ultra-wideband communication protocol.
As a possible implementation manner, before establishing an ultra-wideband communication connection with a second device based on a target ultra-wideband communication protocol, the method further includes:
and sending a first Bluetooth control instruction to the second equipment, wherein the first Bluetooth control instruction is used for indicating the second equipment to start the ultra-wideband communication function.
As a possible implementation manner, after the ultra-wideband communication connection is established with the second device based on the target ultra-wideband communication protocol, the method further includes:
and sending a second Bluetooth control instruction to the second device, wherein the second Bluetooth control instruction is used for instructing the second device to close the ultra-wideband communication function.
As a possible implementation manner, after the ultra-wideband communication connection is established with the second device based on the target ultra-wideband communication protocol, the method further includes:
a first distance of the second device relative to the first device is determined by ultra-wideband communication with the second device.
As a possible implementation manner, after determining the first distance of the second device relative to the first device, the method further includes:
determining whether the second equipment meets a preset service processing condition or not according to the first distance;
and when the second equipment is determined to meet the service processing condition, sending a third Bluetooth control instruction containing service data to the second equipment, wherein the third Bluetooth control instruction is used for instructing the second equipment to perform service processing based on the service data.
In a second aspect, an embodiment of the present application provides a data communication apparatus, which is applied to a first device, and includes:
the Bluetooth connection unit is used for establishing Bluetooth communication connection with the second equipment before the first equipment and the second equipment carry out ultra-wideband communication;
the protocol information acquisition unit is used for acquiring the ultra-wideband protocol information of the second equipment based on the Bluetooth communication connection;
the protocol determining unit is used for determining a target ultra-wideband communication protocol corresponding to the ultra-wideband protocol information from a plurality of preset ultra-wideband communication protocols;
and the ultra-wideband connection unit is used for establishing ultra-wideband communication connection with the second equipment based on the target ultra-wideband communication protocol.
In a third aspect, an embodiment of the present application provides a data communication device, where the device includes: a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements a data communication method as described in the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which computer program instructions are stored, and when executed by a processor, the computer program instructions implement the data communication method according to the first aspect.
In a fifth aspect, the present application provides a computer program product, and when executed by a processor of an electronic device, the instructions of the computer program product cause the electronic device to execute the data communication method according to the first aspect.
The application discloses a data communication method, before ultra-wideband communication is carried out between first equipment and second equipment, the first equipment and the second equipment are in Bluetooth communication connection, the first equipment acquires ultra-wideband protocol information of the second equipment based on the Bluetooth communication connection, then the first equipment determines a target ultra-wideband communication protocol corresponding to the ultra-wideband protocol information from a plurality of preset ultra-wideband communication protocols, and therefore the ultra-wideband communication connection is established with the second equipment based on the target ultra-wideband communication protocol. According to the embodiment of the application, when the first device and the second device are in UWB communication connection, the UWB protocol information of the second device is obtained through Bluetooth communication, the UWB protocol supported by the second device is automatically determined according to the UWB protocol information, manual selection of a user is not needed, the operation is simple, and the use is more convenient.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly described below, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of a data communication system provided by one embodiment of the present application;
FIG. 2 is an information interaction diagram of a data communication method provided by an embodiment of the present application;
FIG. 3 is an information interaction diagram of a data communication method provided by another embodiment of the present application;
FIG. 4 is an architecture diagram of a data communication system provided by another embodiment of the present application;
fig. 5 is a schematic structural diagram of a data communication device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a data communication device according to still another embodiment of the present application.
Detailed Description
Features of various aspects and exemplary embodiments of the present application will be described in detail below, and in order to make objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are intended to be illustrative only and are not intended to be limiting. It will be apparent to one skilled in the art that the present application may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present application by illustrating examples thereof.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of another like element in a process, method, article, or apparatus that comprises the element.
Currently, manufacturers of different UWB devices (such as mobile phones, smart watches, etc.) generally adopt respective UWB protocols for positioning and data communication, and therefore, the protocols supported by the UWB devices of different manufacturers are not generally uniform. Based on this, when UWB terminal devices (such as mobile phones, POS machines, access control systems, and the like) perform UWB communication with UWB devices, the UWB terminal devices need to use specific firmware that supports UWB protocols used by the UWB devices. If the UWB terminal equipment is compatible with UWB equipment of different manufacturers, the information such as the brand of the UWB equipment needs to be determined in advance in the using process, and then the corresponding software version is selected manually, so that normal UWB positioning and communication can be carried out, and the use is inconvenient.
In order to solve the problem of the prior art, embodiments of the present application provide a data communication method, apparatus, device, and computer storage medium. The following first describes a data communication method provided in an embodiment of the present application.
The data communication method provided by the embodiment of the application can be applied to the data communication system shown in fig. 1. As shown in fig. 1, the data communication system may include a first device 101 and a second device 102, wherein the first device 101 is a UWB terminal device, such as a POS machine, an access control system, a mobile phone, etc., including a first bluetooth module 1011 and a first ultra-wideband module 1012, and the second device 102 is a UWB device, such as a mobile phone, a smart watch, etc., including a second bluetooth module 1021 and a second ultra-wideband module 1022. The first device 101 and the second device 102 can perform bluetooth communication via the first bluetooth module 1011 and the second bluetooth module 1021, and can perform ultra-wideband communication via the first ultra-wideband module 1012 and the second ultra-wideband module 1022.
Referring to fig. 2, it is a diagram of information interaction when the data communication system shown in fig. 1 performs data communication by using the data communication method provided in the embodiment of the present application. As shown in fig. 2, a data communication method provided in an embodiment of the present application may include the following steps:
s21, the first device establishes Bluetooth communication connection with the second device before carrying out ultra-wideband communication with the second device.
And S22, the first equipment acquires the ultra-wideband protocol information of the second equipment based on the Bluetooth communication connection with the second equipment.
S23, the first device determines a target ultra-wideband communication protocol corresponding to the ultra-wideband protocol information from a plurality of preset ultra-wideband communication protocols.
S24, the first device establishes an ultra-wideband communication connection with the second device based on a target ultra-wideband communication protocol.
Specific implementations of the above steps will be described in detail below.
According to the data communication method provided by the embodiment of the application, before the first device and the second device carry out ultra-wideband communication, the first device and the second device establish Bluetooth communication connection, the first device obtains ultra-wideband protocol information of the second device based on the Bluetooth communication connection, and then the first device determines a target ultra-wideband communication protocol corresponding to the ultra-wideband protocol information from a plurality of preset ultra-wideband communication protocols, so that the ultra-wideband communication connection is established with the second device based on the target ultra-wideband communication protocol. According to the embodiment of the application, when the first device and the second device are in UWB communication connection, the UWB protocol information of the second device is obtained through Bluetooth communication, the UWB protocol supported by the second device is automatically determined according to the UWB protocol information, manual selection of a user is not needed, the operation is simple, and the use is more convenient.
Specific implementations of the above steps are described below.
First, introduction S21 is performed, when a first device and a second device establish a bluetooth communication connection, the first device may broadcast a bluetooth signal through a first bluetooth module, when the second device enters a broadcast range of the first device, the first device may send a bluetooth connection request to the second device through the first bluetooth module, after receiving the bluetooth connection request sent by the first device, the second device may return response information to the first device through the second bluetooth module, and after receiving the response information indicating that the second device agrees to connect, the first device establishes a bluetooth communication connection with the second device.
The above is an implementation of S21, and the following describes an implementation of S22.
In an embodiment of the application, the ultra-wideband protocol information of the second device is information that can be used to determine an ultra-wideband communication protocol supported by the second device. Because the UWB protocol supported by each UWB device is usually set at the time of factory shipment, the UWB protocol supported by the UWB device can be determined according to the device identification information or the ultra-wideband protocol version information of the UWB device. Thus, the ultra-wideband protocol information may include device identification information or ultra-wideband protocol version information, etc.
In one example, if the uwb protocol information is the device identification information, the second device may send its own device identification information to the first device through the second bluetooth module after the bluetooth communication connection is established, so that the first device may perform device identification on the second device based on the device identification information of the second device. Based on this, after the first device establishes bluetooth communication connection with the second device, the second device can send the device identification information of itself to the first device through the second bluetooth module, so, the first device can acquire the device identification information of the second device, that is, the ultra wideband protocol information.
In another example, after the first device establishes a bluetooth communication connection with the second device, the first device may also send a protocol negotiation request to the second device through the first bluetooth module, where the protocol negotiation request is used to instruct the second device to send its ultra-wideband protocol information to the first device, and after receiving the protocol negotiation request, the second device sends its ultra-wideband protocol information to the first device through the second bluetooth module, so that the first device may acquire the ultra-wideband protocol information of the second device.
The above is an implementation of S22, and an implementation of S23 is described below.
A plurality of ultra-wideband communication protocols with different versions are preset in the first device.
In an example, if the ultra-wideband protocol information is device identification information, the first device may further preset a correspondence between the ultra-wideband protocol version information and the device identification information. Based on this, after the device identification information of the second device is acquired, the pre-stored correspondence may be searched for target ultra-wideband protocol version information corresponding to the device identification information of the second device, then the target ultra-wideband protocol version information is respectively matched with the preset version information of each ultra-wideband communication protocol, and finally the ultra-wideband communication protocol of which the version information is matched with the target ultra-wideband protocol version information is determined as the target ultra-wideband communication protocol supported by the second device.
In another example, if the ultra-wideband protocol information is ultra-wideband protocol version information, the received ultra-wideband protocol version information may be directly matched with version information of each preset ultra-wideband communication protocol, and the ultra-wideband communication protocol whose version information matches with the target ultra-wideband protocol version information is determined as a target ultra-wideband communication protocol supported by the second device.
By the implementation mode, the first device can determine the ultra-wideband communication protocol supported by the second device based on the Bluetooth communication with the second device, the user does not need to manually select the ultra-wideband communication protocol supported by the second device, and the efficiency is higher.
The above is an implementation of S23, and an implementation of S24 is described below.
In the first device, different ultra-wideband communication protocols correspond to different protocol stacks, after a target ultra-wideband communication protocol supported by the second device is determined, a target protocol stack corresponding to the target ultra-wideband communication protocol can be determined, and then ultra-wideband communication connection is established with the second device based on the target protocol stack.
The above is an implementation of S24.
The existing data communication method usually needs to manually turn on or turn off the ultra-wideband communication function of the UWB equipment, and the mode often has the problem of untimely turning on or turning off. Because the power consumption is higher when the ultra wide band communication function is in operation, therefore for UWB equipment such as cell-phones through battery power supply, if the ultra wide band communication function keeps the on state for a long time, can seriously influence the time of endurance of equipment.
Based on this, as another implementation manner of the present application, in order to reduce the device power consumption, the first device may control the ultra-wideband communication function of the second device to be turned on or off.
Specifically, as shown in fig. 3, before S24, the following steps may be further included:
s31, the first device sends a first Bluetooth control instruction to the second device, and the first Bluetooth control instruction is used for indicating the second device to start an ultra-wideband communication function.
The first device may generate a first bluetooth control instruction and send the first bluetooth control instruction to the second device through the first bluetooth module when it is determined that the preset ultra-wideband communication condition is satisfied. Wherein, the ultra wide band communication condition can be set according to actual demand.
In one example, the ultra-wideband communication condition may be receipt of a first instruction, wherein the first instruction is indicative of determining a first distance of a second device relative to a first device. Based on this, the first device may detect whether the first instruction is received when determining whether the preset ultra-wideband communication condition is satisfied, and determine that the ultra-wideband communication condition is satisfied when determining that the first instruction is received. The first instruction may be triggered by the first device itself, or may be sent by an external device, which is not limited to this. In this way, the power consumption of the second device may be further reduced.
And S32, the second equipment starts the ultra-wideband communication function based on the first Bluetooth control instruction.
In one example, an ultra-wideband switch for controlling the ultra-wideband communication function on and off may be provided in the second device. Based on this, the second equipment can control the ultra wide band switch to open after receiving first bluetooth control command through second bluetooth module to open ultra wide band communication function.
Further, after S24, the following steps may be further included:
and S33, the first equipment sends a second Bluetooth control instruction to the second equipment, wherein the second Bluetooth control instruction is used for indicating the second equipment to close the ultra-wideband communication function.
The first device may generate a second bluetooth control instruction and send the second bluetooth control instruction to the second device through the first bluetooth module when it is determined that the preset communication end condition is satisfied. Wherein, the communication end condition can be set according to the actual situation.
In one example, the end-of-communication condition may include obtaining a first distance of the second device relative to the first device. Based on this, the first device may detect whether the first distance is obtained or not in real time, and when it is determined that the first distance is obtained, it is determined that the communication end condition is satisfied.
In another example, the communication ending condition may include that a continuous time period during which no ultra-wideband communication is performed between the first device and the second device reaches a preset time period threshold, wherein the time period threshold may be set according to actual conditions. Based on this, after the first device establishes the ultra-wideband communication connection with the second device, the first device may determine, in real time, a continuous duration for which the ultra-wideband communication is not performed with the second device, compare the determined continuous duration with a duration threshold, and determine that a communication end condition is satisfied when the comparison shows that the continuous duration is greater than the duration threshold.
And S34, the second equipment closes the ultra-wideband communication function based on the second Bluetooth control instruction.
The second device can control the ultra-wideband switch to be closed after receiving the second Bluetooth control instruction through the second Bluetooth module, so that the ultra-wideband communication function is closed.
Through this kind of implementation, can be by opening or closing of ultra wide band communication function in the first equipment control second equipment, compare in artificial control, this kind of mode is more convenient and timely, can effectually avoid the waste of consumption.
As another implementation manner of the present application, after S24, the method may further include:
the first device determines a first distance of the second device relative to the first device by ultra-wideband communication with the second device.
In one example, when determining the first distance of the second device relative to the first device, the second device may send its location information to the first device through the second ultra-wideband module based on an ultra-wideband communication connection with the first device, and after receiving the location information of the second device through the first ultra-wideband module, the first device may calculate the first distance of the second device relative to the first device according to the location information of the second device and its location information.
In another example, the first device may employ a two-way time-of-flight (TW-TOF) method to determine a first distance of the second device relative to the first device. In particular, the first device may be at T based on an ultra-wideband communication connection established between the first device and the second device a1 Transmitting a pulse signal of a requested nature to a second device at a time T through a first ultra-wideband module b1 The pulse signal of the requested property is received by the second ultra-wideband module at the moment and is in T b2 A signal with response property is transmitted to the first device through the second ultra-wide band module at any time, and the first ultra-wide band module of the first device is at T a2 A signal of the nature of the response is received at a time. Therefore, the flight time of the pulse signal between the first device and the second device can be calculated, and the flight distance S can be further determined.
Specifically, the flight distance S can be calculated by the following formula:
S=C×[(T a2 -T a1 )-(T b2 -T b1 )]
where C represents the speed of light.
The flying distance S is a first distance between the first device and the second device.
By this implementation, a first distance of the second device relative to the first device may be determined.
As another implementation manner of the present application, after determining the first distance of the second device relative to the first device, the method may further include:
the first device determines whether the second device meets a preset service processing condition according to the first distance, and sends a third Bluetooth control instruction containing service data to the second device when the second device meets the service processing condition, wherein the third Bluetooth control instruction is used for instructing the second device to perform service processing based on the service data.
And the second equipment performs service processing based on the service data according to the third Bluetooth control instruction.
The service processing conditions and the service data can be determined according to the actual service scene. For example, the data communication method provided by the embodiment of the application may be applied to an ultra-wideband payment scenario, in which the service data may include payment information, where the payment information may include information such as a merchant name, an account number, a payment amount, and a commodity name.
In one example, in an ultra-wideband payment scenario, the traffic handling condition may be that the second device is a UWB device closest to the first device. Based on this, when the first device determines whether the second device meets the preset service processing condition according to the first distance, the first distance may be compared with other distances, and if the first distance is smaller than all other distances, it is determined that the second device meets the service processing condition, where the other distances refer to distances between other UWB devices around the first device and the first device.
In another example, in an ultra-wideband payment scenario, the traffic handling condition may be that a distance between the second device and the first device is less than a preset distance threshold. Based on this, when the first device determines whether the second device meets the preset service processing condition according to the first distance, the first distance may be compared with a preset distance threshold, and when the first distance is smaller than the distance threshold, it is determined that the second device meets the service processing condition, where the distance threshold may be set according to an actual situation.
And after the first device determines that the second device meets the service processing condition, generating a third Bluetooth control instruction containing service data, and sending the third Bluetooth control instruction to the second device through the first Bluetooth module. After the second device receives the third bluetooth control instruction through the second bluetooth module, the third bluetooth control instruction may be analyzed to obtain the service data therein, then software corresponding to the service data is opened, and service processing is performed based on the service data by using the opened software. For example, in an ultra-wideband payment scenario, the second device may open the payment software and use the payment software to make payment based on the service data.
For convenience of understanding, the data communication method provided in the embodiment of the present application is described below by taking an application to an ultra-wideband payment scenario as an example.
Referring to fig. 4, which is an architecture diagram of a data communication system in an ultra-wideband payment scenario, as shown in fig. 4, the system includes a POS terminal as a first device and a mobile phone terminal as a second device. The POS terminal comprises a first data transmission unit, a first UWB protocol adaptation unit, a first UWB control unit and a first UWB protocol stack, and the mobile phone end comprises a second data transmission unit, a second UWB protocol adaptation unit, a second UWB control unit and a second UWB protocol stack. The first data transmission unit and the second data transmission unit, the first UWB protocol adaptation unit and the second UWB protocol adaptation unit, the first UWB control unit and the second UWB control unit adopt Bluetooth communication, and the first UWB protocol stack and the second UWB protocol stack adopt UWB communication.
Before the POS terminal and the mobile phone end establish UWB communication connection, protocol negotiation is carried out firstly, when the protocol negotiation is carried out, the first UWB protocol adaptation unit and the second UWB protocol adaptation unit establish Bluetooth connection, based on the Bluetooth connection, the mobile phone end returns the equipment identification information of the mobile phone to the POS terminal, and the POS terminal selects the UWB communication protocol version corresponding to the mobile phone according to the received equipment identification information.
After determining the UWB communication protocol version corresponding to the mobile phone, the first UWB control unit sends a first Bluetooth control instruction to the second UWB control unit, controls the second UWB control unit at the mobile phone end, and starts the UWB switch at the mobile phone end. And then establishing UWB communication connection with the mobile phone terminal based on the corresponding UWB communication protocol version of the mobile phone terminal.
After the mobile phone end establishes UWB communication connection with the POS terminal, the position information of the mobile phone is sent to the first UWB protocol stack through the second UWB protocol stack.
After the POS terminal receives the position information sent by the mobile phone end, a second Bluetooth control instruction is sent to the second UWB control unit through the first UWB control unit, the second UWB control unit of the mobile phone end is controlled, and the UWB switch of the mobile phone end is closed. And determining a first distance between the mobile phone end and the POS terminal according to the position information.
And the POS terminal determines whether the mobile phone end meets the service processing condition according to the first distance, and sends a third Bluetooth control instruction containing service data related to payment to the second data transmission unit through the first data transmission unit when the mobile phone end meets the service processing condition.
And the mobile phone end performs service processing, namely payment, based on the service data according to the third Bluetooth control instruction, and after the service processing is finished, the mobile phone end can send a service processing result to the first data transmission unit of the POS terminal through the second data transmission unit.
Based on the data communication method provided by the above embodiment, correspondingly, the application also provides a specific implementation manner of the data communication device. Please see the examples below.
Referring to fig. 5, a schematic structural diagram of a data communication apparatus provided in an embodiment of the present application is applied to the first device shown in fig. 1. As shown in fig. 5, a data communication apparatus provided in an embodiment of the present application may include the following units:
a bluetooth connection unit 501, configured to establish a bluetooth communication connection with the second device before performing ultra-wideband communication with the second device.
A protocol information obtaining unit 502, configured to obtain the ultra-wideband protocol information of the second device based on the bluetooth communication connection.
A protocol determining unit 503, configured to determine a target ultra-wideband communication protocol corresponding to the ultra-wideband protocol information from a plurality of pre-set ultra-wideband communication protocols.
An ultra-wideband connection unit 504 for establishing an ultra-wideband communication connection with the second device based on the target ultra-wideband communication protocol.
According to the data communication device provided by the embodiment of the application, before the first device and the second device carry out ultra-wideband communication, the first device and the second device establish Bluetooth communication connection, ultra-wideband protocol information of the second device is obtained based on the Bluetooth communication connection, then the first device determines a target ultra-wideband communication protocol corresponding to the ultra-wideband protocol information from a plurality of preset ultra-wideband communication protocols, and accordingly the ultra-wideband communication connection is established with the second device based on the target ultra-wideband communication protocol. According to the embodiment of the application, when the first device and the second device are in UWB communication connection, the UWB protocol information of the second device is obtained through Bluetooth communication, the UWB protocol supported by the second device is automatically determined according to the UWB protocol information, manual selection of a user is not needed, the operation is simple, and the use is more convenient.
As a possible implementation, the ultra-wideband protocol information includes device identification information of the second device;
the protocol determining unit 503 is specifically configured to:
determining target ultra-wideband communication protocol version information corresponding to the device identification information of the second device according to the corresponding relation between the preset device identification information and the ultra-wideband communication protocol version information;
and determining the ultra-wideband communication protocol of which the version information is matched with the version information of the target ultra-wideband communication protocol in a plurality of preset ultra-wideband communication protocols as the target ultra-wideband communication protocol.
As a possible implementation, the data communication device may further include (not shown in fig. 5):
the first control unit is used for sending a first Bluetooth control instruction to the second equipment before the first equipment establishes the ultra-wideband communication connection with the second equipment based on a target ultra-wideband communication protocol, wherein the first Bluetooth control instruction is used for instructing the second equipment to start the ultra-wideband communication function.
As a possible implementation, the data communication apparatus may further include (not shown in fig. 5):
and the second control unit is used for sending a second Bluetooth control instruction to the second device after the first device establishes the ultra-wideband communication connection with the second device based on the target ultra-wideband communication protocol, wherein the second Bluetooth control instruction is used for instructing the second device to close the ultra-wideband communication function.
As a possible implementation, the data communication device may further include (not shown in fig. 5):
the distance analysis unit is used for determining a first distance of the second device relative to the first device by carrying out ultra-wideband communication with the second device after the first device establishes an ultra-wideband communication connection with the second device based on a target ultra-wideband communication protocol.
As a possible implementation, the data communication device may further include (not shown in fig. 5):
the service unit is used for determining whether the second equipment meets a preset service processing condition according to the first distance after the first equipment determines the first distance of the second equipment relative to the first equipment; and when the second equipment is determined to meet the service processing condition, sending a third Bluetooth control instruction containing service data to the second equipment, wherein the third Bluetooth control instruction is used for instructing the second equipment to perform service processing based on the service data.
Fig. 6 shows a hardware structure diagram of data communication provided by an embodiment of the present application.
The data communication device can include a processor 5601 and memory 602 having stored computer program instructions.
Specifically, the processor 601 may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or may be configured to implement one or more Integrated circuits of the embodiments of the present Application.
The processor 601 realizes any one of the data communication methods in the above embodiments by reading and executing computer program instructions stored in the memory 602.
In one example, the data communication device may also include a communication interface 603 and bus 510. As shown in fig. 6, the processor 601, the memory 602, and the communication interface 603 are connected via a bus 610 to complete communication therebetween.
The communication interface 603 is mainly used for implementing communication between modules, apparatuses, units and/or devices in this embodiment.
In addition, in combination with the data communication method in the foregoing embodiments, the embodiments of the present application may provide a computer storage medium to implement. The computer storage medium having computer program instructions stored thereon; the computer program instructions, when executed by a processor, implement any of the data communication methods in the above embodiments.
It is to be understood that the present application is not limited to the particular arrangements and instrumentality described above and shown in the attached drawings. A detailed description of known methods is omitted herein for the sake of brevity. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present application are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications, and additions or change the order between the steps after comprehending the spirit of the present application.
The functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the present application are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include an electronic circuit, a semiconductor memory device, a ROM, a flash memory, an Erasable ROM (EROM), a floppy disk, a CD-ROM, an optical disk, a hard disk, an optical fiber medium, a Radio Frequency (RF) link, and so forth. The code segments may be downloaded via computer networks such as the internet, intranets, etc.
It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed simultaneously.
Aspects of the present disclosure are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions/acts specified in the flowchart and/or block diagram block or blocks. Such a processor may be, but is not limited to, a general purpose processor, a special purpose processor, an application specific processor, or a field programmable logic circuit. It will also be understood 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 for performing the specified functions or acts, or combinations of special purpose hardware and computer instructions.
As described above, only the specific embodiments of the present application are provided, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the module and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. It should be understood that the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present application, and these modifications or substitutions should be covered within the scope of the present application.
Claims (10)
1. A data communication method, applied to a first device, the method comprising:
the method comprises the steps that before the first device carries out ultra-wideband communication with a second device, bluetooth communication connection is established between the first device and the second device;
acquiring ultra-wideband protocol information of the second device based on the Bluetooth communication connection;
determining a target ultra-wideband communication protocol corresponding to the ultra-wideband protocol information from a plurality of preset ultra-wideband communication protocols;
establishing an ultra-wideband communication connection with the second device based on the target ultra-wideband communication protocol.
2. The method of claim 1, wherein the ultra-wideband protocol information comprises device identification information of the second device;
the determining of the target ultra-wideband communication protocol corresponding to the ultra-wideband protocol information from a plurality of preset ultra-wideband communication protocols comprises the following steps:
determining target ultra-wideband communication protocol version information corresponding to the equipment identification information of the second equipment according to the corresponding relation between the preset equipment identification information and the ultra-wideband communication protocol version information;
and determining an ultra-wideband communication protocol of which the version information is matched with the version information of the target ultra-wideband communication protocol in a plurality of preset ultra-wideband communication protocols as a target ultra-wideband communication protocol.
3. The method of claim 1, wherein prior to establishing an ultra-wideband communication connection with the second device based on the target ultra-wideband communication protocol, the method further comprises:
and sending a first Bluetooth control instruction to the second equipment, wherein the first Bluetooth control instruction is used for indicating the second equipment to start an ultra-wideband communication function.
4. The method of claim 1, wherein after establishing an ultra-wideband communication connection with the second device based on the target ultra-wideband communication protocol, the method further comprises:
and sending a second Bluetooth control instruction to the second device, wherein the second Bluetooth control instruction is used for instructing the second device to close the ultra-wideband communication function.
5. The method of claim 1, wherein after establishing an ultra-wideband communication connection with the second device based on the target ultra-wideband communication protocol, the method further comprises:
determining a first distance of the second device relative to the first device by ultra-wideband communication with the second device.
6. The method of claim 5, wherein after determining the first distance of the second device relative to the first device, the method further comprises:
determining whether the second equipment meets a preset service processing condition or not according to the first distance;
and when the second equipment is determined to meet the service processing condition, sending a third Bluetooth control instruction containing service data to the second equipment, wherein the third Bluetooth control instruction is used for instructing the second equipment to perform service processing based on the service data.
7. A data communication apparatus, applied to a first device, the apparatus comprising:
the Bluetooth connection unit is used for establishing Bluetooth communication connection with the second equipment before the first equipment and the second equipment carry out ultra-wideband communication;
a protocol information acquisition unit, configured to acquire ultra-wideband protocol information of the second device based on the bluetooth communication connection;
the protocol determining unit is used for determining a target ultra-wideband communication protocol corresponding to the ultra-wideband protocol information from a plurality of preset ultra-wideband communication protocols;
and the ultra-wideband connection unit is used for establishing ultra-wideband communication connection with the second equipment based on the target ultra-wideband communication protocol.
8. A data communication device, characterized in that the device comprises: a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements the data communication method of any of claims 1-6.
9. A readable storage medium, having stored thereon computer program instructions which, when executed by a processor, implement the data communication method of any one of claims 1-6.
10. A computer program product, wherein instructions in the computer program product, when executed by a processor of an electronic device, cause the electronic device to perform the data communication method of any of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210989355.2A CN115442917A (en) | 2022-08-17 | 2022-08-17 | Data communication method, device, equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210989355.2A CN115442917A (en) | 2022-08-17 | 2022-08-17 | Data communication method, device, equipment and readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115442917A true CN115442917A (en) | 2022-12-06 |
Family
ID=84242543
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210989355.2A Pending CN115442917A (en) | 2022-08-17 | 2022-08-17 | Data communication method, device, equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115442917A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115665717A (en) * | 2022-12-27 | 2023-01-31 | 合肥炬芯智能科技有限公司 | Data transmission method, electronic equipment and computer readable storage medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101321156A (en) * | 2007-06-06 | 2008-12-10 | 艾威梯软件技术(北京)有限公司 | Method and system for second intercommunication protocol expansion based on first intercommunication protocol |
CN110839206A (en) * | 2019-11-26 | 2020-02-25 | 北京布科思科技有限公司 | Positioning method and device based on dual-mode tag |
CN111343058A (en) * | 2020-02-07 | 2020-06-26 | 北京小米移动软件有限公司 | Device control method, device, control device and storage medium |
CN111970672A (en) * | 2020-08-31 | 2020-11-20 | Oppo广东移动通信有限公司 | Searching and positioning method and device, electronic equipment and storage medium |
CN112655230A (en) * | 2018-09-07 | 2021-04-13 | 三星电子株式会社 | Method for UWB transaction and electronic device thereof |
CN113055873A (en) * | 2021-03-11 | 2021-06-29 | Oppo广东移动通信有限公司 | Method and device for identifying devices, electronic device and storage medium |
US20210312424A1 (en) * | 2020-04-01 | 2021-10-07 | Mastercard International Incorporated | Ultra-wideband-enabled devices and systems |
CN114339591A (en) * | 2021-12-09 | 2022-04-12 | 青岛海信移动通信技术股份有限公司 | Method for positioning based on ultra-wideband chip and related device |
CN114513847A (en) * | 2020-11-16 | 2022-05-17 | Oppo广东移动通信有限公司 | Positioning method, device, system, electronic equipment and storage medium |
-
2022
- 2022-08-17 CN CN202210989355.2A patent/CN115442917A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101321156A (en) * | 2007-06-06 | 2008-12-10 | 艾威梯软件技术(北京)有限公司 | Method and system for second intercommunication protocol expansion based on first intercommunication protocol |
CN112655230A (en) * | 2018-09-07 | 2021-04-13 | 三星电子株式会社 | Method for UWB transaction and electronic device thereof |
CN110839206A (en) * | 2019-11-26 | 2020-02-25 | 北京布科思科技有限公司 | Positioning method and device based on dual-mode tag |
CN111343058A (en) * | 2020-02-07 | 2020-06-26 | 北京小米移动软件有限公司 | Device control method, device, control device and storage medium |
US20210312424A1 (en) * | 2020-04-01 | 2021-10-07 | Mastercard International Incorporated | Ultra-wideband-enabled devices and systems |
CN111970672A (en) * | 2020-08-31 | 2020-11-20 | Oppo广东移动通信有限公司 | Searching and positioning method and device, electronic equipment and storage medium |
CN114513847A (en) * | 2020-11-16 | 2022-05-17 | Oppo广东移动通信有限公司 | Positioning method, device, system, electronic equipment and storage medium |
CN113055873A (en) * | 2021-03-11 | 2021-06-29 | Oppo广东移动通信有限公司 | Method and device for identifying devices, electronic device and storage medium |
CN114339591A (en) * | 2021-12-09 | 2022-04-12 | 青岛海信移动通信技术股份有限公司 | Method for positioning based on ultra-wideband chip and related device |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115665717A (en) * | 2022-12-27 | 2023-01-31 | 合肥炬芯智能科技有限公司 | Data transmission method, electronic equipment and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9129282B2 (en) | Near field communication apparatus and method for supporting security modules | |
US9042817B2 (en) | Method and system to automatically establish NFC link between NFC enabled electronic devices based on proximate distance | |
US20160299754A1 (en) | Method for Updating Application Program, and Terminal | |
CN102044028B (en) | Method for realizing card-reading operation and system for realizing card-reading operation | |
WO2009109075A1 (en) | A device and a method for adjusting communication distance of a radio sim card | |
WO2007004010A2 (en) | Rfid optimized capability negotiation | |
RU2008126219A (en) | METHOD, BASE STATION AND MOBILE TERMINAL FOR TRANSMISSION MODE WITH LOW POWER | |
WO2010022687A1 (en) | Method and communication system for controlling communication distance of rf sim card with the aid of tag identification | |
JP2013187783A (en) | Communication system and portable machine | |
CN106412293B (en) | Foreign matter detection method and device and terminal equipment | |
CN104580690A (en) | Onboard mode control method | |
CN107209982B (en) | Method and device for associating object with user, communication object and storage medium | |
CN103491526B (en) | The method of attachment of a kind of nfc apparatus and system | |
CN115442917A (en) | Data communication method, device, equipment and readable storage medium | |
KR20140134111A (en) | Dual mode rfid sensor tag controlling method thereof | |
CN111417100A (en) | Automatic connection and control method for Bluetooth low-power-consumption equipment | |
CN113993080A (en) | Vehicle control system, vehicle control method, and vehicle control server | |
WO2009140811A1 (en) | A method for automatically adjusting the effective communication distance of the radio frequency sim card by short message | |
CN110942612A (en) | Remote controller control method, remote controller and remote controller system | |
CN103680120A (en) | Universal remote controller for multiple family cars | |
CN104376650A (en) | Vehicle wireless charging payment method | |
KR102354117B1 (en) | Smart key ecu and method for processing tollgate charges payment using the same | |
CN107750048B (en) | Interaction method and system based on short-distance wireless communication antenna | |
US20210082205A1 (en) | Vehicle communication device, parking lot communication device, and parking lot management system | |
KR101152534B1 (en) | Method for Firmware upgrading cellular phone and cellular phone terminal therefor |
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 |