CN116669231A - Data transmission method and electronic equipment - Google Patents

Data transmission method and electronic equipment Download PDF

Info

Publication number
CN116669231A
CN116669231A CN202211400809.4A CN202211400809A CN116669231A CN 116669231 A CN116669231 A CN 116669231A CN 202211400809 A CN202211400809 A CN 202211400809A CN 116669231 A CN116669231 A CN 116669231A
Authority
CN
China
Prior art keywords
data
application
link
layer
message
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
CN202211400809.4A
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.)
Honor Device Co Ltd
Original Assignee
Honor Device 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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202211400809.4A priority Critical patent/CN116669231A/en
Publication of CN116669231A publication Critical patent/CN116669231A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/18Management of setup rejection or failure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • H04M1/724094Interfacing with a device worn on the user's body to provide access to telephonic functionalities, e.g. accepting a call, reading or composing a message
    • H04M1/724095Worn on the wrist, hand or arm
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • H04M1/72412User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories using two-way short-range wireless interfaces
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The embodiment of the application provides a data transmission method and electronic equipment. The method comprises the following steps: acquiring first data, wherein the first data is data sent by a first application to a second application, the first application and the second application are companion applications, a first link is arranged between external equipment and central equipment, and the first link is a direct link between the external equipment and the central equipment; if the first link is not disconnected, sending first data to the central equipment through the first link; if the first link is disconnected, the first data is sent to the transfer server through a second link, so that the transfer server can transfer the first data to the center equipment, and the second link is established between the external equipment and the center equipment through the transfer server. According to the technical scheme, the partner application which can be connected with the central equipment through the direct link in the external equipment can be enabled to be in uninterrupted communication with the external equipment which is in independent communication after the direct link is disconnected.

Description

Data transmission method and electronic equipment
Technical Field
The embodiment of the application relates to the field of mobile communication, in particular to a data transmission method and electronic equipment.
Background
Electronic devices (e.g., cell phones) typically have applications that interact with the wearable device, which applications can function independently within the electronic device, but in the wearable device, it is necessary to work in conjunction with the electronic device via a bluetooth link. For such applications, it can be said that an application mounted on the electronic device side and an application mounted on the wearable device side are partner applications (company apps).
With the development of the intellectualization of the wearable device, the wearable device is equipped with a communication baseband (Modem) chip, which is a mainstream trend, so that the wearable device has an independent communication function. However, companion applications in the application market at present are not improved based on independent communication functions of the wearable device, the wearable device and the companion applications of the electronic device can still be interconnected only through a bluetooth link, and when the bluetooth link between the wearable device and the companion applications of the electronic device is disconnected, the companion applications of the wearable device end cannot be used when the wearable device is in an independent communication scene.
Disclosure of Invention
The embodiment of the application provides a data transmission method and electronic equipment, which can enable partner application in external equipment which can only be connected with central equipment through a direct link to be in uninterrupted communication with external equipment which is in independent communication after the direct link is disconnected.
In a first aspect, the present application provides a data transmission method, which is applied to an external device. Comprising the following steps: acquiring first data, wherein the first data is data sent by a first application to a second application, the first application is an application in external equipment, the second application is an application in central equipment, the first application and the second application are companion applications, a first link is arranged between the external equipment and the central equipment, and the first link is a direct link between the external equipment and the central equipment; if the first link is not disconnected, sending first data to the central equipment through the first link; if the first link is disconnected, the first data is sent to the transfer server through a second link, so that the transfer server can transfer the first data to the center equipment, and the second link is established between the external equipment and the center equipment through the transfer server.
The data transmission method can send the first data to the central equipment through the second link when the first link for transmitting the first data between the first application and the second application is disconnected, so that partner application which can only be connected with the central equipment through the direct link in the external equipment can be used uninterruptedly on the external equipment for independent communication after the direct link is disconnected.
In an alternative implementation, if the first link is disconnected, second data is received through the second link, where the second data is data sent by the second application to the first application, and the second data is sent by the central device to the relay server and forwarded by the relay server to the external device. By adopting the embodiment, when the first link for transmitting the second data between the first application and the second application is disconnected, the second data is transmitted to the external device through the second link, so that the external device can only mate application connected with the central device through the direct link, and the external device can be used uninterruptedly after the direct link is disconnected.
In an alternative implementation, the external device includes a first bluetooth protocol stack and a first proxy controller; transmitting the first data to the transit server over a second link, comprising: the first application sends first data to a first Bluetooth protocol stack; the first Bluetooth protocol stack packs the first data to obtain a first message; the first Bluetooth protocol stack sends a first message to a first proxy controller; and the first proxy controller sends the first message to the transit server. By adopting the embodiment, the external device packages the first data through the first Bluetooth protocol stack so that the first data accords with the packaging format which can be transmitted through the transfer server.
In an alternative implementation, receiving the second data over the second link includes: the first proxy controller receives a first push message sent by the transfer server, wherein the first push message is used for indicating the transfer server to receive a second message; the first proxy controller responds to the first push message and acquires a second message from the forwarding server; the first proxy controller sends a second message to a first Bluetooth protocol stack; the first Bluetooth protocol stack unpacks the second message to obtain second data; the first bluetooth protocol stack transmits the second data to the first application. By adopting the embodiment, the first Bluetooth protocol stack can unpack the second message transmitted by the transit server, so that the first application can acquire the second data under the condition that the first link is disconnected.
In an alternative implementation, the first bluetooth protocol stack includes a first application layer and a first transport layer; the first bluetooth protocol stack packages the first data, and before obtaining the first message, the method further comprises: judging the hardware type matched with the first Bluetooth protocol stack, wherein the hardware type comprises: at least one of an internet of things IoT device, a bracelet device, a sports watch device, and a smart watch device; determining a packing mode of first data corresponding to the hardware type, wherein the packing mode comprises the following steps: the first data is packaged by the first transport layer, the first data is packaged by the first application layer and the first transport layer at the same time, and the first data is packaged by the first application layer. By adopting the embodiment, the first Bluetooth protocol stack can select different packaging modes according to the hardware type, so as to further select a proper second link to carry out data transmission according to the packaging modes.
In an alternative implementation, packaging the first data through the first transport layer includes: the first transmission layer encapsulates the first data into at least one data frame of a first message, wherein each data frame comprises: a start identifier SOF field, a Length identifier field, a Control identifier field, a sequence number FSN identifier field, a traffic layer data Payload, and a check sum field. By adopting the embodiment, the first Bluetooth protocol stack can select different packaging modes according to the hardware type, so as to further select a proper second link to carry out data transmission according to the packaging modes.
In an alternative implementation, packaging the first data through the first application layer and the first transport layer simultaneously includes: the first application layer encapsulates the first data into at least one first application layer packet, wherein each first application layer packet comprises: a Service ID, a Command ID, and at least one encapsulation TLV field; the first transmission layer encapsulates at least one first application layer data packet into at least one data frame of a first message, wherein each data frame comprises: a start identifier SOF field, a Length identifier field, a Control identifier field, a sequence number FSN identifier field, a traffic layer data Payload, and a check sum field. By adopting the embodiment, the first Bluetooth protocol stack can select different packaging modes according to the hardware type, so as to further select a proper second link to carry out data transmission according to the packaging modes.
In an alternative implementation, before the first transport layer encapsulates the at least one first application layer data packet into the at least one data frame of the first packet, the method further includes: judging whether the length of the first application layer data packet exceeds the maximum frame length MFS of the first transmission layer; if the length of the first application layer data packet exceeds the maximum frame length MFS of the first transmission layer, splitting the first application layer data packet with the maximum frame length MFS. By adopting the embodiment, the first Bluetooth protocol stack can split the first application layer data packet according to the limit of the bearing capacity of the second link corresponding to the transmission layer, so that the data transmission is convenient.
In an alternative implementation, packaging the first data by the first application layer includes: the first application layer encapsulates the first data into at least one first application layer data packet of a first message, wherein each first application layer data packet comprises: a Service ID, a Command ID, and at least one encapsulation TLV field. By adopting the embodiment, the first Bluetooth protocol stack can select different packaging modes according to the hardware type, so as to further select a proper second link to carry out data transmission according to the packaging modes.
In an alternative implementation, before the first data is sent to the transit server through the second link, the method further includes: acquiring identity information of a first application; determining a type of a second link corresponding to the first application according to the identity information of the first application, wherein the type of the second link comprises: at least one of a classical Bluetooth point-to-point transmission BR link, a classical Bluetooth point-to-multipoint EDR link, a low-power consumption Bluetooth BLE link, a mobile data link and a wireless fidelity Wi-Fi link is used for determining the frequency of a second link corresponding to the identity information of a first application, and the frequencies of the second links corresponding to different identity information are different. By adopting the embodiment, the first data can be transmitted by selecting the proper second link type, so that the safety and the privacy of each second link can be ensured, and the second links corresponding to different applications can be ensured to be isolated when the data of the different applications are transmitted.
In an alternative implementation manner, after determining the type of the second link corresponding to the first application according to the identity information of the first application, the method further includes: acquiring a data type of the first data, wherein the data type comprises short code stream data and long code stream data; and determining the frequency of a second link corresponding to the data type of the first data, wherein the frequencies of the second links corresponding to different data types are different. By adopting the embodiment, the frequency of the second link can be selected to transmit the first data according to the data type of the first data, so that the second link of each frequency can be ensured to perform different functions, and the second links corresponding to different data types can be ensured to be isolated when the first data of different data types are transmitted.
In a second aspect, the present application further provides a data transmission method, applied to a central device, including: acquiring second data, wherein the second data is data sent to a first application by a second application, the first application is an application in external equipment, the second application is an application in central equipment, the first application and the second application are companion applications, a first link is arranged between the external equipment and the central equipment, and the first link is a direct link between the external equipment and the electronic equipment; if the first link is not disconnected, sending second data to the external device through the first link; if the first link is disconnected, sending second data to the transfer server through a second link, so that the transfer server forwards the second data to the external device, wherein the second link is established between the central device and the external device through the transfer server.
The data transmission method can send the second data to the external equipment through the second link when the first link for transmitting the second data between the first application and the second application is disconnected, so that partner application which can only be connected with the central equipment through the direct link in the external equipment can be used uninterruptedly on the external equipment for independent communication after the direct link is disconnected.
In an alternative implementation, the method further includes: if the first link is disconnected, the first data is received through the second link, the first data is the data sent by the first application to the second application, and the first data is sent to the transfer server by the external device and is forwarded to the central device by the transfer server. By adopting the embodiment, when the first link for transmitting the first data between the first application and the second application is disconnected, the first data is transmitted to the external device through the second link, so that partner application which can be connected with the central device only through the direct link in the external device can be continuously used on the external device for independent communication after the direct link is disconnected.
In an alternative implementation, the hub device includes a first proxy application; transmitting second data to the transit server over a second link, comprising: the second application sends the second data to the first proxy application; the first agent application packages the second data to obtain a second message; the first proxy application sends the second message to the transit server. With this embodiment, the central device packages the second data through the first proxy application so that the second data conforms to the encapsulation format that can be transmitted through the transit server.
In an alternative implementation, receiving the first data over the second link includes: the first proxy application receives a second push message sent by the transfer server, wherein the second push message is used for indicating the transfer server to receive the first message; the first proxy application responds to the second push message and acquires a first message from the forwarding server; the first proxy application unpacks the first message to obtain first data; the first proxy application sends the first data to the second application. By adopting the embodiment, the first proxy application can unpack the first message transmitted by the transit server, so that the second application can acquire the second data under the condition that the first link is disconnected.
In an alternative implementation, the first proxy application includes a second bluetooth protocol stack, where the second bluetooth protocol stack includes a second application layer and a second transport layer; the first agent application packages the second data, including: the second application layer encapsulates the second data into at least one second application layer packet, wherein each second application layer packet comprises: a Service ID, a Command ID, and at least one encapsulation TLV field; the second transport layer encapsulates the at least one second application layer data packet into at least one data frame of a second message, wherein each data frame comprises: a start identifier SOF field, a Length identifier field, a Control identifier field, a sequence number FSN identifier field, a traffic layer data Payload, and a check sum field. By adopting the embodiment, the second bluetooth protocol stack can encapsulate the second data into the second message, so that the second message can perform data transmission on the second link.
In an alternative implementation, before the second transport layer encapsulates the at least one second application layer data packet into the at least one data frame of the second packet, the method further includes: judging whether the length of the second application layer data packet exceeds the maximum frame length MFS of the second transmission layer; and splitting the second application layer data packet with the maximum frame length MFS if the length of the second application layer data packet exceeds the maximum frame length MFS of the second transmission layer. By adopting the embodiment, the second Bluetooth protocol stack can split the second application layer data packet according to the limit of the bearing capacity of the second link corresponding to the transmission layer, so that the data transmission is convenient.
In an alternative implementation, before sending the second data to the transit server over the second link, the method further includes: acquiring identity information of a second application; determining a type of a second link corresponding to the second application according to the identity information of the second application, wherein the type of the second link comprises: at least one of a classical Bluetooth point-to-point transmission BR link, a classical Bluetooth point-to-multipoint EDR link, a low-power consumption Bluetooth BLE link, a mobile data link and a wireless fidelity Wi-Fi link is used for determining the frequency of a second link corresponding to the identity information of the second application, and the frequencies of the second links corresponding to different identity information are different. By adopting the embodiment, the second data can be transmitted by selecting the proper second link type, so that the safety and the privacy of each second link can be ensured, and the second links corresponding to different applications can be ensured to be isolated when the data of the different applications are transmitted.
In an alternative implementation manner, after determining the type of the second link corresponding to the second application according to the identity information of the second application, the method further includes: acquiring a data type of the second data, wherein the data type comprises short code stream data and long code stream data; and determining the frequency of a second link corresponding to the data type of the second data, wherein the frequencies of the second links corresponding to different data types are different. By adopting the embodiment, the frequency of the second link can be selected to transmit the first data according to the data type of the second data, so that the second link of each frequency can be ensured to perform different functions, and the second links corresponding to different data types can be ensured to be isolated when the second data of different types is transmitted.
In a third aspect, the present application also provides an electronic device, including: a processor and a memory; the memory stores program instructions that, when executed by the processor, cause the electronic device to perform the data transmission method as described in the first aspect, the second aspect and various implementations as an external device and/or a central device.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a schematic diagram of an interaction mode between a conventional wearable device and a mobile phone provided by an embodiment of the present application;
FIG. 2 is a schematic diagram of an implementation of a message push function provided by an embodiment of the present application;
FIG. 3 is a schematic diagram of a prompt message provided by an embodiment of the present application;
fig. 4 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application;
fig. 5 is a schematic view of a scenario of a data transmission method according to an embodiment of the present application;
fig. 6 (a) is an exemplary flowchart of a data transmission method provided by an embodiment of the present application;
fig. 6 (b) is an exemplary flowchart of a data transmission method provided by an embodiment of the present application;
fig. 7 is a schematic diagram of a conventional bluetooth protocol stack according to an embodiment of the present application;
fig. 8 is a schematic diagram of a first bluetooth protocol stack structure according to an embodiment of the present application;
fig. 9 is a schematic diagram of a first transport layer data frame encapsulation format according to an embodiment of the present application;
FIG. 10 is a schematic diagram of a first application layer packet encapsulation format according to an embodiment of the present application;
fig. 11 is a schematic diagram of a physical channel isolation state according to an embodiment of the present application;
fig. 12 is a schematic diagram of a physical channel isolation state according to an embodiment of the present application;
fig. 13 (a) is an exemplary flowchart of a data transmission method provided by an embodiment of the present application;
Fig. 13 (b) is an exemplary flowchart of a data transmission method provided by an embodiment of the present application;
fig. 14 (a) is an exemplary flowchart of a data transmission method provided by an embodiment of the present application;
fig. 14 (b) is an exemplary flowchart of a data transmission method provided by an embodiment of the present application;
fig. 15 (a) is an exemplary flowchart of a data transmission method provided by an embodiment of the present application;
fig. 15 (b) is an exemplary flowchart of a data transmission method provided by an embodiment of the present application;
fig. 16 is a schematic structural diagram of a data transmission device according to an embodiment of the present application.
Detailed Description
The technical solutions of the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application.
In the description of the present application, "/" means "or" unless otherwise indicated, for example, A/B may mean A or B. "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. Furthermore, "at least one" means one or more, and "a plurality" means two or more. The terms "first," "second," and the like do not limit the number and order of execution, and the terms "first," "second," and the like do not necessarily differ.
In the present application, the words "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
The terminology used in the description of the embodiments of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application, as will be described in detail with reference to the accompanying drawings.
The application scenario of the embodiment of the present application is first described with reference to the accompanying drawings.
Users or households typically have a variety of electronic devices, such as: traditional electronic equipment such as mobile phones, tablet computers and wearable equipment such as bracelets, smart watches and the like. The electronic devices can be interconnected through one or more protocols of wireless fidelity (wireless fidelity, wi-Fi), bluetooth (BT), bluetooth Mesh network (Bluetooth Mesh), zigbee and the like, and instruction and data interaction is performed, so that services are provided for users together.
Taking a wearable device as a smart watch and an electronic device as a mobile phone as an example, the smart watch generally interacts with the mobile phone in the manner as shown in fig. 1 to provide heart rate monitoring functions, blood pressure monitoring functions, message pushing functions, payment functions and the like in a companion application.
The partner application partially carried on the mobile phone end can independently perform partial functions, and can synchronize data with the partner application carried on the intelligent watch end so as to realize the prompting function for a user. For example, when the companion application is a chat application, the mobile phone end can independently execute the message pushing function, and at this time, the smart watch end synchronously executes the message pushing function to play a role in prompting the user when the user does not see the mobile phone message information.
And partial functions must be realized by depending on the partner application of the smart watch end, for example, when the partner application is sports health application, the smart watch end executes heart rate monitoring function and blood pressure monitoring function, and at this time, the mobile phone end can back up and count related data monitored by the smart watch end.
Such interactions are typically based on bluetooth links.
In a specific implementation, taking an example of providing a message pushing function in a companion application of a smart watch end:
As shown in fig. 2 a, a user may first turn on a bluetooth function in a bluetooth setup interface of a mobile phone and pair with a smart watch. After the pairing is successful, as shown in fig. 2B, the user may open the right of message pushing in the application of the mobile phone for managing the smart watch, and as shown in fig. 2C, open the right of message pushing in the smart watch in the message notification setting interface of the mobile phone. Thus, the intelligent watch can complete the carrying of partner application, and the intelligent watch realizes the synchronization with the message pushing function of the mobile phone.
Because electronic devices such as mobile phones and the like can independently realize various functions in applications, and wearable devices such as smart watches and the like usually realize various functions in applications by means of the electronic devices interconnected with the smart watches, in the above scenario, when a Bluetooth link is disconnected, as shown in fig. 3, the smart watches cannot realize a message pushing function in the applications, and corresponding prompt information is displayed on a screen, so that a user is reminded to establish connection between the smart watches and the mobile phones again, and user experience is affected.
With the development of the intellectualization of the wearable device, the wearable device carrying the Modem chip gradually becomes the mainstream trend, so that the wearable device has an independent communication function, and part of functions can be independently realized without the aid of the electronic device interconnected with the wearable device.
Under this trend, since a large number of companion applications designed based on conventional wearable devices in the application market are not designed based on the independent communication capabilities of the wearable devices due to the original interconnection manner, these companion applications cannot be compatible with other types of links other than bluetooth links. Companion applications at the wearable device end that can communicate independently still can only interconnect with companion applications at the electronic device end through the bluetooth link, therefore, once the bluetooth link between the wearable device and the electronic device is disconnected, these companion applications will not be available in the scenario where the wearable device communicates independently.
Therefore, a large number of companion applications designed based on the traditional wearable device in the current application market do not have the capability of being compatible with Bluetooth links and other types of links, and even if the companion applications are applied to the wearable device carrying the Modem chip, the companion applications can be interconnected only through the Bluetooth links, and the independent communication functions of the wearable device cannot be well applied. After the Bluetooth link is disconnected, the wearable device can display a prompt message on a screen of the wearable device to prompt a user that the Bluetooth link is disconnected, so that user experience is affected.
In order to improve user experience when a user uses a companion application of a wearable device, the application provides a data transmission method. The data transmission method can be applied to various electronic devices, such as: external equipment and central equipment. The central equipment comprises, but is not limited to, mobile phones, tablet computers, notebook computers, large-screen display equipment and the like. The external device may be any hardware device capable of connecting with the central device, including but not limited to a wearable device, a game pad, a stylus, a wireless headset, a wireless sound box, a smart home device, etc. Wherein the wearable device includes, but is not limited to, a smart watch, a smart bracelet, a smart wristband, smart glasses, and the like.
The external device and the central device can be connected in a wired or wireless mode. When the connection mode between the external device and the central device is wireless connection, the wireless connection may be implemented based on any one of bluetooth, wi-Fi, near field communication (near field communication, NFC), and Infrared (IR) wireless short-distance communication technologies.
Fig. 4 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application. As shown in fig. 4, the electronic device 100 may include a processor 110, a memory 120, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, a camera 192, a display 193, and a subscriber identity module (subscriber identification module, SIM) card interface 194, etc. The sensor module 180 may include a touch sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a geomagnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, and the like. Among them, the gyro sensor 180B, the air pressure sensor 180C, the geomagnetic sensor 180D, the acceleration sensor 180E, and the like can be used to detect a motion state of an electronic apparatus, and thus, may also be referred to as a motion sensor.
It should be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
Memory 120 may be used to store computer-executable program code that includes instructions. The memory 120 may include a stored program area and a stored data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the center device 100 (e.g., audio data, phonebook, etc.), and so on. In addition, the memory 120 may include a high-speed random access memory, and may also include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like. The processor 110 performs various functional applications and data processing of the electronic device 100 by executing instructions stored in the memory 120 and/or instructions stored in a memory provided in the processor.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transfer data between the electronic device 100 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. The interface may also be used to connect other electronic devices, such as AR devices, etc.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is only illustrative, and is not meant to limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also employ different interfacing manners in the above embodiments, or a combination of multiple interfacing manners.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130. In some wireless charging embodiments, the charge management module 140 may receive wireless charging input through a wireless charging coil of the center device 100. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the memory 120, the display 193, the camera 192, the wireless communication module 160, and the like. The power management module 141 may also be configured to monitor battery capacity, battery cycle times, and battery health (leakage, impedance, etc.). In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 193. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional module, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communications including wireless local area network (wireless local area networks, WLAN) (e.g., wi-Fi network), bluetooth, global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), NFC, IR, etc., as applied to the electronic device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 150 of electronic device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that electronic device 100 may communicate with a network and other devices through wireless communication techniques. Wireless communication techniques may include global system for mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The electronic device 100 implements display functions through a GPU, a display screen 193, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 193 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display 193 is used to display images, videos, and the like. The display 193 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (flex), a mini, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the center device 100 may include 1 or N display screens 193, N being a positive integer greater than 1.
The electronic device 100 may implement photographing functions through an ISP, a camera 192, a video codec, a GPU, a display screen 193, an application processor, and the like.
The ISP is used to process the data fed back by the camera 192. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, so that the electrical signal is converted into an image visible to naked eyes. ISP can also optimize the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be located in the camera 192.
The camera 192 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, RYYB, YUV, or the like format. In some embodiments, the center apparatus 100 may include 1 or N cameras 192, N being a positive integer greater than 1.
The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The touch sensor 180A, also referred to as a "touch device". The touch sensor 180A may be disposed on the display 193, and the touch sensor 180A and the display 193 form a touch screen, which is also referred to as a "touch screen". The touch sensor 180A is used to detect a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to the touch operation may be provided through the display 193. In other embodiments, the touch sensor 180A may also be disposed on a surface of the electronic device 100 at a location different from the location of the display 193.
The gyro sensor 180B may be used to determine a motion gesture of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., x, y, and z axes) may be determined by gyro sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects the shake angle of the electronic device 100, calculates the distance to be compensated by the lens module according to the angle, and makes the lens counteract the shake of the electronic device 100 through the reverse motion, so as to realize anti-shake. The gyro sensor 180B may also be used for navigating, somatosensory game scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude from barometric pressure values measured by barometric pressure sensor 180C, aiding in positioning and navigation.
The geomagnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip cover using the geomagnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip machine, the electronic device 100 may detect the opening and closing of the flip according to the geomagnetic sensor 180D. And then according to the detected opening and closing state of the leather sheath or the opening and closing state of the flip, the characteristics of automatic unlocking of the flip and the like are set.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity may be detected when the electronic device 100 is stationary. The method can also be used for recognizing the gesture of the central equipment, and is applied to the switching of horizontal and vertical screens, pedometers and the like.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, the electronic device 100 may range using the distance sensor 180F to achieve quick focus.
The proximity light sensor 180G may include, for example, a light emitting diode and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it may be determined that there is an object in the vicinity of the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there is no object in the vicinity of the electronic device 100. The electronic device 100 can detect that the user holds the electronic device 100 close to the ear by using the proximity light sensor 180G, so as to automatically extinguish the screen for the purpose of saving power. The proximity light sensor 180G may also be used in holster mode, pocket mode to automatically unlock and lock the screen.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 may utilize the collected fingerprint feature to unlock the fingerprint, access the application lock, photograph the fingerprint, answer the incoming call, etc.
The temperature sensor 180J is for detecting temperature. In some embodiments, the electronic device 100 performs a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, electronic device 100 performs a reduction in the performance of a processor located in the vicinity of temperature sensor 180J in order to reduce power consumption to implement thermal protection. In other embodiments, when the temperature is below another threshold, the electronic device 100 heats the battery 142 to avoid the low temperature causing the electronic device 100 to be abnormally shut down. In other embodiments, when the temperature is below a further threshold, the electronic device 100 performs boosting of the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperatures.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys or touch keys. The electronic device 100 may receive key inputs, generating key signal inputs related to user settings and function controls of the electronic device 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects by touch operations applied to different areas of the display screen 193. Different application scenarios (such as time reminding, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
The SIM card interface 194 is used to connect to a SIM card. The SIM card may be inserted into the SIM card interface 194, or removed from the SIM card interface 194 to enable contact and separation with the electronic device 100. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 194 may support a Nano SIM card, micro SIM card, etc. The same SIM card interface 194 may be used to insert multiple cards simultaneously. The types of the plurality of cards may be the same or different. The SIM card interface 194 may also be compatible with different types of SIM cards. The SIM card interface 194 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, i.e.: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
Fig. 5 is a schematic view of a scenario of a data transmission method according to an embodiment of the present application.
Fig. 6 (a) is an exemplary flowchart of a data transmission method according to an embodiment of the present application. As shown in fig. 5 and fig. 6 (a), the data transmission method may be applied to an external device, and specifically may include the following steps S101 to S103.
Step S101, acquiring first data.
The first data are data which are required to be sent to the second application by the first application, the first application is an application in the external equipment, the second application is an application in the central equipment, the first application and the second application are companion applications, a first link is included between the external equipment and the central equipment, and the first link is a direct connection link between the external equipment and the central equipment.
In some embodiments, the first link may be a bluetooth link, or may be another type of direct link, for example, a Zigbee link, and the present application is not limited to the type of direct link.
Based on the physical forms of external devices such as an intelligent watch and a bracelet, the external devices can be used for executing functions such as heart rate monitoring, blood oxygen monitoring, calorie monitoring, message pushing and mobile payment, and part of functions of the external devices need to be realized based on a first application. The first application may be a sports health application, a chat application, a payment application, or the like. For example, the external device may need to implement its calorie monitoring function based on a sports health application, its message pushing function may need to be implemented based on a chat application, and its mobile payment function may need to be implemented based on a payment application. In performing these functions, a first application generally needs to synchronize data obtained by performing these functions to a second application for recording, backup, update, etc., where the obtained data is the first data.
For example, when the first application is a sports health application, the first application may acquire first data according to an acceleration sensor and a gyroscope sensor built in the external device to determine a sports state of the user to perform calorie monitoring and synchronize to the second application; when the first application is a chat application, the first application can take data input by voice of a user as first data, interact with the central equipment and synchronize to the second application; when the first application is a mobile payment application, the first application can take the payment data of the two-dimensional code as first data, interact with the central equipment and synchronize to the second application.
Step S102, if the first link is not broken, the first data is sent to the central equipment through the first link.
Taking the first link as a bluetooth link as an example. The external equipment is limited by physical forms of the external equipment such as the intelligent watch and the bracelet, the external equipment is weak in endurance, small in transmission data quantity and low in Bluetooth link power consumption and radiation, so that in the data transmission process of the first application and the second application, if the Bluetooth link is successfully established, the external equipment preferentially sends first data to the central equipment through the Bluetooth link.
However, there are various situations that the connection is unstable and the disconnection is caused, for example, the poor compatibility of two ends of the bluetooth link leads to the disconnection, the disconnection is caused by serious interference of magnetic fields in a communication base station and a transformer substation, and the disconnection is caused by too far distance between two ends of the bluetooth link. At this time, as shown in fig. 3, corresponding prompt information is displayed in the screen of the external device to remind the user that the bluetooth link is disconnected, and the external device needs to be connected with the central device again, so that user experience is affected.
Step S103, if the first link is disconnected, the first data is sent to the transfer server through a second link, so that the transfer server forwards the first data to the central equipment, and the second link is a link established between the external equipment and the central equipment through the transfer server.
In some embodiments, the second link may also be a Wi-Fi link, a bluetooth link, a 3G mobile data link, a 4G mobile data link, a 5G mobile data link, etc., and the type of the second link is not limited in the embodiments of the present application.
In some embodiments, the transit server may be a cloud server, a local area network server, a bluetooth gateway, etc., and the present application does not limit the type of the transit server.
When the second link is a Wi-Fi link, the transfer server may be a cloud server or a local area network server, when the second link is a bluetooth link, the transfer server may be a bluetooth gateway, and when the second link is a 3G mobile data link, a 4G mobile data link, or a 5G mobile data link, the transfer server may be a cloud server.
Under the condition that the first link is disconnected, the external device directly changes the first data which is originally required to be sent to the central device through the first link into the first data which is sent to the transfer server through the second link, so that the first data is forwarded to the central device through the transfer server, the external device and the central device do not display corresponding prompt information on a screen, the first application and the second application can perform data interaction without sense, and uninterrupted use of partner application is guaranteed. As shown in fig. 6 (b), in a specific implementation, step S103 may include steps S1031-S1034.
In step S1031, the first application sends the first data to the first bluetooth protocol stack.
Fig. 7 is a schematic diagram of a conventional bluetooth protocol stack structure. As shown in fig. 7, the conventional bluetooth protocol stack is generally divided into four layers, namely: physical Layer (Physical Layer), logical Layer (Logical Layer), logical link control and adaptation protocol (Logical link control and adaptation protocol Layer, L2 CAP) Layer, and application Layer.
Wherein the physical layer is responsible for providing physical channels for data transmission, there are several different types of channels in a communication system, such as control channels, data channels, voice channels, etc. The logical layer is a physical layer based on which logical transmission channels are provided between two or more devices and are not physically related. The L2CAP layer is responsible for managing the logical links provided by the logical layer. Based on the protocol of this layer, different applications may share the same logical link. The application layer is a channel provided based on the L2CAP to implement various application functions.
The application improves the first Bluetooth protocol stack of the external equipment, so that the first Bluetooth protocol stack can not only transmit data through a Bluetooth channel (namely a first link), but also switch to a second link to transmit data when the first link is disconnected.
Fig. 8 is a schematic diagram of a first bluetooth protocol stack structure according to an embodiment of the present application. As shown in fig. 8, the first bluetooth protocol stack includes a first application layer, a first transport layer, and a first physical layer.
Compared to the conventional physical layer, the first physical layer provided in the embodiments of the present application is compatible with more types of physical channels, namely, the second link, where the types of the second link include at least one of a classical bluetooth point-to-point transmission (BR) link, a classical bluetooth point-to-multipoint (enhanced data rate, EDR) link, a bluetooth low energy (bluetooth low energy, BLE) link, a mobile data link, and a Wi-Fi link.
The working frequencies of the Bluetooth link, the mobile data link and the Wi-Fi link are different, the signal modulation modes are different, the physical layer protocols are different, and the application modes and the objects are different, so that the traditional physical layer only supports one Bluetooth link, and compared with the traditional physical layer, the first physical layer in the embodiment of the application enhances the compatibility, can be compatible with the Bluetooth link, the mobile data link, the Wi-Fi link and other links, and can further finish the switching among various links.
Wherein each type of second link supports its corresponding transport protocol, e.g., classical bluetooth point-to-point transport BR link and classical bluetooth point-to-multipoint EDR link support bluetooth serial port (serial port profile, SPP) protocol; the bluetooth low energy BLE link supports the generic attribute (generic attribute profile, GATT) protocol; the mobile data link, wi-Fi link support hypertext transfer (hype text transfer protocal, HTTP) protocol, hypertext transfer security (hyper text transfer protocol secure) protocol, transmission control (transmission control protocol, TCP) protocol, user datagram (user datagram protocol, UDP) protocol.
The first transmission layer provided by the embodiment of the application can provide different transmission interfaces for the second links with different types, and meanwhile, the first transmission layer also has the capabilities of packaging, unpacking, encrypting and checking the first data.
In the process that the first transmission layer provides different transmission interfaces for different types of second links, a transmission unit of the first transmission layer is a Frame, and the maximum transmission capacity of each Frame is determined by a Maximum Frame Size (MFS). The maximum frame length MFS is negotiated through a command of the first application layer.
In a specific implementation, different application modules can respectively provide multiple types of services such as equipment management service, message pushing service, motion service and the like, in the process of providing the services, a first application sends first data to a first application layer of a first Bluetooth protocol stack, and the first application layer sets the first data to be different lengths and depths of first application data packets according to different hardware types matched with the first Bluetooth protocol stack and types of a second link used for transmitting the first data, and sets different Payload complexity. The length and depth of the first application data packet may be used to determine a maximum frame length MFS, such that the first transport layer may split the first application data packet according to the maximum frame length MFS.
In some embodiments, the external device may determine a hardware type that the first bluetooth protocol stack matches, and determine a packaging manner of the first data corresponding to the hardware type. The hardware types include: at least one of an internet of things (internet of things, ioT) IoT device, a bracelet device, a sports watch device, a smart watch device, a packaging manner comprising: the first data is packaged by the first transport layer, the first data is packaged by the first application layer and the first transport layer at the same time, and the first data is packaged by the first application layer.
It should be noted that, based on the physical limitation of the external device, the hardware capability of a part of the external device is weak, for example, the low-power bluetooth BLE device, so that it is difficult for such external device to transmit more complex data, therefore, the data complexity can be reduced and the transmission speed can be increased by only packaging the first data through the first transmission layer. Different packing modes are adopted for transmitting the first data aiming at different hardware types, so that the data transmission efficiency can be improved and the stability of data transmission can be enhanced.
In step S1032, the first bluetooth protocol stack packages the first data to obtain a first message.
In a specific implementation, when the hardware type matched with the first bluetooth protocol stack is an IoT device of the internet of things, the packaging mode corresponding to the hardware type may be to package the first data through the first transport layer. When the hardware type matched with the first Bluetooth protocol stack is a bracelet device, the packaging mode corresponding to the hardware type can be that the first data is packaged through the first transmission layer and the first application layer at the same time; when the hardware type matched with the first Bluetooth protocol stack is sports watch equipment, the packaging mode corresponding to the hardware type can be that the first data is packaged through the first transmission layer and the first application layer at the same time; when the hardware type matched with the first bluetooth protocol stack is the intelligent watch device, the packaging mode corresponding to the hardware type can be that the first data is packaged through the first transmission layer and the first application layer at the same time, or the first data is packaged through the first application layer.
In some embodiments, the specific manner in which the first bluetooth protocol stack packages the first data through the first transport layer is: the first transmission layer encapsulates the first data into at least one data frame of a first message, wherein each data frame comprises: a start of frame (SOF) field, a Length identification field, a Control identification field, a sequence number (frame sequence number, FSN) identification field, a traffic layer data Payload (Payload), a check sum field.
Fig. 9 is a schematic diagram of a first transport layer data frame encapsulation format according to an embodiment of the present application. As shown in fig. 9, each data frame includes a Header area, a Payload area, and a tail Footer area, where the Header area may include a start identifier SOF field, a Length identifier field, a Control identifier field, a sequence number FSN identifier field, and the tail area may include a check sum field. It should be noted that, the start identifier SOF field, the Length identifier field, the Control identifier field, and the check sum field are all mandatory fields, and the check sum field is all mandatory fields, and the sequence number FSN identifier field is an optional field. The sequence number FSN identification field depends on the Control identification field to judge the selectivity of the frame, if the framing mark is set in the Control identification field, the header area must carry the sequence number FSN identification field for identifying the frame sequence number, and the value range of the sequence number FSN identification field is [0, 255].
The data frame encapsulation format may have a start flag SOF field set to 1 byte, a Length flag field set to 2 bytes, a Control flag field set to 1 byte, a sequence number FSN flag field set to 1 byte, and a check sum field set to 2 bytes.
In some embodiments, the first bluetooth protocol stack may package the first data through the first application layer and the first transport layer simultaneously. In a specific implementation, the first application layer encapsulates the first data into at least one first application layer data packet, where each first application layer data packet includes: a Service ID, a Command ID, and at least one encapsulation TLV field.
Fig. 10 is a schematic diagram of a first application layer packet encapsulation format according to an embodiment of the present application. As shown in fig. 10, each first application layer packet typically starts with a Service identification Service ID and/or a Command identification Command ID, after which the first data is encapsulated by at least one encapsulation TLV field.
The Service ID may be used to identify a Service type to which the first data belongs, for example: device management, message notification, alarm clock, etc.; the Command identification Command ID may be used to identify a Command type to which the first data corresponds, for example: setting date and time, acquiring device version related information, and the like.
The first transmission layer encapsulates at least one first application layer data packet into at least one data frame of a first message, wherein each data frame comprises: a start identifier SOF field, a Length identifier field, a Control identifier field, a sequence number FSN identifier field, a traffic layer data Payload, and a check sum field.
The encapsulation manner of the first transport layer on the first application layer packet may be referred to the above embodiment, and the embodiment of the present application will not be repeated here.
In a specific implementation, the first transmission layer needs to determine whether the length of the first application layer data packet exceeds the maximum frame length MFS of the first transmission layer; if the length of the first application layer data packet exceeds the maximum frame length MFS of the first transmission layer, splitting the first application layer data packet with the maximum frame length MFS.
In some embodiments, the first bluetooth protocol stack may package the first data through a first application layer, where the first application layer encapsulates the first data into at least one first application layer packet of the first packet, where each first application layer packet includes: a Service ID, a Command ID, and at least one encapsulation TLV field.
It should be noted that, when the first bluetooth protocol stack determines the matched hardware type, the first application layer may determine the type of the second link and the protocol supported by the second link, so that the first transport layer can call the second link.
For example, when the hardware type matched by the first bluetooth protocol stack is an IoT device of the internet of things, the first application layer may determine that the type of the second link is a bluetooth BLE link with low power consumption, and determine that a protocol supported by the second link is a generic attribute GATT protocol; when the hardware type matched with the first Bluetooth protocol stack is a bracelet device, the first application layer can determine that the type of the second link is a low-power Bluetooth BLE link and determine that a protocol supported by the second link is a general attribute GATT protocol; when the hardware type matched with the first Bluetooth protocol stack is sports watch equipment, the first application layer can determine that the type of the second link is a low-power Bluetooth BLE link and determine that a protocol supported by the second link is a general attribute GATT protocol; when the hardware type matched with the first Bluetooth protocol stack is sports watch equipment, the first application layer can determine that the type of the second link is a classical Bluetooth point-to-point transmission BR link or a classical Bluetooth point-to-multipoint EDR link, and determine that a protocol supported by the second link is a Bluetooth serial port SPP protocol; when the hardware type matched with the first Bluetooth protocol stack is the intelligent watch device, the first application layer can determine that the type of the second link is a low-power Bluetooth BLE link and determine that a protocol supported by the second link is a general attribute GATT protocol; when the hardware type matched with the first Bluetooth protocol stack is intelligent watch equipment, the first application layer can determine that the type of the second link is a classical Bluetooth point-to-point transmission BR link or a classical Bluetooth point-to-multipoint EDR link, and determine that a protocol supported by the second link is a Bluetooth serial port SPP protocol; when the hardware type matched with the first bluetooth protocol stack is the smart watch device, the first application layer may determine that the type of the second link is a mobile data link or a Wi-Fi link, and determine that a protocol supported by the second link is a hypertext transfer HTTP protocol, a hypertext transfer secure HTTPs protocol, a transmission control TCP protocol, or a user datagram UDP protocol.
In step S1033, the first bluetooth protocol stack sends the first message to the first proxy controller.
The first proxy controller can be used for improving the access speed of accessing the transit server and hiding the address information of the first proxy controller.
In step S1034, the first proxy controller sends the first message to the transit server.
The first proxy controller may send the first message to the transit server via the second link.
It should be noted that the first application layer needs to acquire the identity information of the first application first, determine the type of the second link corresponding to the first application according to the identity information of the first application, and determine the frequency of the second link corresponding to the identity information of the first application after determining the type of the second link, where the frequencies of the second links corresponding to different identity information are different.
It should be noted that the second link may actually include a plurality of physical channels, and these physical channels may be divided into first to nth channels in order of frequencies from small to large; n is a positive integer greater than 1. By way of example, N is equal to 20.
For example, if the first application layer obtains the identity information of the first application as the chat application, the type of the second link corresponding to the chat application is determined to be the mobile data link according to the identity information of the first application, and after the type of the second link is determined, the frequency of the second link corresponding to the identity information of the first application is determined, at this time, the first application may be transmitted from the first channel to the third channel of the second link.
If the identity information of the second application acquired by the first application layer is the payment application, determining that the type of the second link corresponding to the payment application is the mobile data link according to the identity information of the second application, determining the frequency of the second link corresponding to the identity information of the first application after determining the type of the second link, and transmitting the first application from a fourth channel to a sixth channel of the second link.
Fig. 11 is a schematic diagram of a physical channel isolation state according to an embodiment of the present application. As shown in fig. 11, in order to ensure the security of transmission between applications, it is necessary to ensure that the physical channels of the second links corresponding to the first applications with different identity information are different and are in an isolated state. I.e. the second link in the present application needs to follow the application channel privacy principle that the physical channel corresponding to different applications is different.
In some embodiments, the external device obtains a data type of the first data, where the data type includes short code stream data and long code stream data, and the external device determines a frequency of a second link corresponding to the data type of the first data, where frequencies of the second links corresponding to different data types are different.
Fig. 12 is a schematic diagram of a physical channel isolation state according to an embodiment of the present application. As shown in fig. 12, since short code stream data is generally a control command, the command needs to have an immediate response for each packet, and long code stream data is generally file transmission data, the data does not need to be responded for each packet, but the average transmission rate is improved, so that the first data of the two data types needs to be transmitted through different physical channels, and are in an isolated state. I.e. the second link in the present application needs to follow different channel isolation principles of the physical channel corresponding to different data types.
Fig. 13 (a) is another exemplary flowchart of a data transmission method according to an embodiment of the present application.
As shown in fig. 13 (a), the data transmission method may be applied to an external device, and specifically may further include the following step S104.
Step S104, if the first link is disconnected, the second data is received through the second link.
The second data is data sent to the first application by the second application, and the second data is sent to the transfer server by the center device and is forwarded to the external device by the transfer server.
As shown in fig. 13 (b), in a specific implementation, step S104 may include steps S1041-S1045.
In step S1041, the first proxy controller receives a first push message sent by the transit server, where the first push message is used to instruct the transit server to receive the second message.
The transfer server has Push capability, which may be based on the HTTP protocol of the second link, which is a unidirectional Push capability.
In step S1042, the first proxy controller responds to the first push message and obtains the second message from the forwarding server.
At this time, the second message acquired by the first proxy controller is encrypted in a packed manner, so that the first bluetooth protocol stack is required to be unpacked.
In step S1043, the first proxy controller sends the second message to the first bluetooth protocol stack.
In step S1044, the first bluetooth protocol stack unpacks the second message to obtain second data.
In a specific implementation, the first transmission layer of the first bluetooth protocol stack unpacks the second message to obtain second data.
In step S1045, the first bluetooth protocol stack transmits the second data to the first application.
In a specific implementation, the first bluetooth protocol stack sends the second data to the first application through the first application layer.
According to the data transmission method disclosed by the application, through the special design of the first Bluetooth protocol stack and the proxy design of the second link, the pushing capability of the second link and the transit server are combined, and when the first link for transmitting the first data between the first application and the second application is disconnected, the first data can be transmitted to the central equipment through the second link, so that the partner application which can only be connected with the central equipment through the direct link in the external equipment can be continuously used on the external equipment for independent communication after the direct link is disconnected. For a large number of companion applications in the application market, the data transmission method can be used for rapidly completing the migration from the wearable device based on direct link transmission to the wearable device carrying the Modem chip.
The data transmission method disclosed by the embodiment of the application can be also applied to the switching from the Zigbee link to the mobile data link and the Wi-Fi link and the switching from the Zigbee link to the optical fiber broadband link.
Fig. 14 (a) is an exemplary flowchart of a data transmission method according to an embodiment of the present application.
As shown in fig. 14 (a), the data transmission method may be applied to a center device, and specifically may include the following steps S201 to S203.
Step S201, second data is acquired.
The second data may be data that needs to be sent to the first application by the second application, the first application is an application in the external device, the second application is an application in the central device, the first application and the second application are companion applications, a first link is included between the external device and the central device, and the first link is a direct link between the external device and the electronic device.
Based on the physical form of the mobile phone and other center equipment, the center equipment can independently execute more functions, such as step number monitoring, message pushing, mobile payment and other functions, and part of the functions need to be realized based on the second application. The second application may be a sports health application, a chat application, a payment application, or the like. For example, the central device needs to implement its step number monitoring function based on the sports health application, its message pushing function needs to be implemented based on the chat application, and its mobile payment function needs to be implemented based on the payment application. In the process of performing these functions, the second application generally needs to synchronize the data obtained by performing these functions to the first application for recording, backup, update, and the like, where the obtained data is the second data.
For example, when the second application is a sports health application, the second application may acquire second data according to an acceleration sensor and a gyroscope sensor built in the central device to determine the number of steps of the user to perform step number monitoring; when the second application is a chat application, the second application can receive information sent by other users as second data, interact with the external device for message pushing, and when the second application is a mobile payment application, the second application can interact with the external device as second data for message prompting.
Step S202, if the first link is disconnected, the second data is sent to the external device through the first link.
Taking the first link as a bluetooth link as an example. Because the distance between the center device and the external device is usually relatively short, and the problem of power consumption of the external device is considered, the center device preferably sends the second data to the external device through the bluetooth link.
In step S203, if the first link is disconnected, the second data is sent to the transfer server through the second link, so that the transfer server forwards the second data to the external device, and the second link is a link established between the central device and the external device through the transfer server.
Wherein, the specific setting mode of the first link and the second link can be seen from the above embodiment,
under the condition that the first link is disconnected, the center equipment directly changes second data which is originally required to be sent to the external equipment through the first link into the second data which is sent to the transfer server through the second link, so that the second data is forwarded to the center equipment through the transfer server, the external equipment and the center equipment do not display corresponding prompt information on a screen, the first application and the second application can perform data interaction without sense, and uninterrupted use of partner application is guaranteed.
As shown in fig. 14 (b), in a specific implementation, step S203 includes steps S2031 to S2033.
In step S2031, the second application sends the second data to the first proxy application.
The first proxy application can be used for improving the access speed of the transit server and hiding the address information of the first proxy application.
In step S2032, the first agent application packages the second data to obtain a second message.
In some embodiments, the first proxy application includes a second bluetooth protocol stack, the second bluetooth protocol stack including a second application layer, a second transport layer, and a second physical layer.
The second application layer, the second transmission layer and the second physical layer in the second bluetooth protocol stack may be set with reference to each layer in the first bluetooth protocol stack, which is not described in detail in the present application.
Because of the high hardware capabilities of the central device, the manner in which the second data is packaged by both the first transport layer and the first application layer, or by the first application layer, may generally be selected.
In some embodiments, the second application layer encapsulates the second data into at least one second application layer packet, wherein each second application layer packet comprises: a Service ID, a Command ID, and at least one encapsulation TLV field.
The second transmission layer judges whether the length of the second application layer data packet exceeds the maximum frame length MFS of the second transmission layer; and splitting the second application layer data packet with the maximum frame length MFS if the length of the second application layer data packet exceeds the maximum frame length MFS of the second transmission layer.
The second transport layer encapsulates the at least one second application layer data packet into at least one data frame of a second message, wherein each data frame comprises: a start identifier SOF field, a Length identifier field, a Control identifier field, a sequence number FSN identifier field, a traffic layer data Payload, and a check sum field.
In some embodiments, the second bluetooth protocol stack may package the second data through a second application layer, wherein the second application layer encapsulates the second data into at least one second application layer packet of a second message, wherein each second application layer packet comprises: a Service ID, a Command ID, and at least one encapsulation TLV field.
It should be noted that, the specific manner of packaging the second data by the second bluetooth protocol stack may refer to the manner of packaging the second data by the first bluetooth protocol stack, which is not described in detail in the present application.
In step S2033, the first proxy application sends the second message to the relay server.
The first proxy application may send the second message to the transit server by invoking the second link.
In a specific implementation, the second application layer needs to acquire identity information of the second application first, determines a type of a second link corresponding to the second application according to the identity information of the second application, and determines frequencies of the second link corresponding to the identity information of the second application after determining the type of the second link, wherein the frequencies of the second links corresponding to different identity information are different.
In some embodiments, the central device obtains a data type of the second data, the data type including short code stream data and long code stream data; the center device determines the frequency of a second link corresponding to the data type of the second data, and the frequencies of the second links corresponding to different data types are different.
The specific manner in which the first proxy application invokes the second link to send the second message to the transit server may refer to the specific manner in which the first proxy controller invokes the second link to send the first message to the transit server, which is not described in detail in the embodiment of the present application.
Fig. 15 (a) is an exemplary flowchart of a data transmission method according to an embodiment of the present application.
As shown in fig. 15 (a), the data transmission method may be applied to a center device, and in particular, may further include the following step S204.
In step S204, if the first link is disconnected, the first data is received through the second link, where the first data is data sent by the first application to the second application, and the first data is sent by the external device to the transfer server, and is forwarded by the transfer server to the central device.
As shown in fig. 15 (b), in a specific implementation, step S204 includes steps S2041-S2044.
In step S2041, the first proxy application receives a second push message sent by the relay server, where the second push message is used to instruct the relay server to receive the first message.
In step S2042, the first proxy application obtains the first message from the forwarding server in response to the second push message.
In step S2043, the first proxy application unpacks the first packet to obtain the first data.
In step S2044, the first proxy application transmits the first data to the second application.
According to the data transmission method disclosed by the application, through the special design of the second Bluetooth protocol stack and the proxy design of the second link, the pushing capability of the second link and the transit server is combined, and when the first link for transmitting the first data between the first application and the second application is disconnected, the first data can be sent to the external equipment through the second link, so that the partner application which can only be connected with the external equipment through the direct link in the central equipment can be enabled to be in uninterrupted communication with the external equipment which is in independent communication after the direct link is disconnected. For a large number of companion applications in the application market, the data transmission method can be used for rapidly completing the migration from the wearable device based on direct link transmission to the wearable device carrying the communication baseband chip.
The scheme provided by the embodiment of the application is mainly introduced from the angles of the external equipment and the central equipment. It will be appreciated that the external device and the central device, in order to implement the above-mentioned functions, comprise corresponding hardware structures and/or software modules for performing the respective functions. Those skilled in the art will readily appreciate that the present application can be implemented in hardware or a combination of hardware and computer software, as a data transmission method step of each of the examples described in connection with the disclosed embodiments of the application. Whether a function is implemented as hardware or software-driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The embodiment of the application can divide the functional modules or functional units of the external device and the central device according to the method example, for example, each functional module or functional unit can be divided corresponding to each function, and two or more functions can be integrated in one processing module. The integrated modules may be implemented in hardware, or in software functional modules or functional units. The division of the modules or units in the embodiment of the present application is schematic, which is merely a logic function division, and other division manners may be implemented in practice.
Other embodiments of the present application provide a data transmission apparatus. As shown in fig. 16, the data transmission apparatus may include: a display 1001, a memory 1002, a processor 1003, and a communication module 1004. The devices described above may be connected by one or more communication buses 1005. The display screen 1001 may include a display panel 10011 and a touch sensor 10012, wherein the display panel 10011 is configured to display an image and the touch sensor 10012 may communicate a detected touch operation to an application processor to determine a touch event type and provide visual output related to the touch operation through the display panel 10011. The processor 1003 may include one or more processing units, such as: the processor 1003 may include an application processor, a modem processor, a graphics processor, an image signal processor, a controller, a video codec, a digital signal processor, a baseband processor, and/or a neural network processor, etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors. Memory 1002 is coupled to processor 1003 for storing various software programs and/or computer instructions, and memory 1002 may include volatile memory and/or non-volatile memory. When the processor executes the computer instructions, the data transmission device may perform the functions or steps performed by the external device and/or the central device in the above-described method embodiments.
The embodiment of the application also provides a chip system which comprises at least one processor and at least one interface circuit. The processors and interface circuits may be interconnected by wires. For example, the interface circuit may be used to receive signals from other devices (e.g., a memory of an electronic apparatus). For another example, the interface circuit may be used to send signals to other devices. The interface circuit may, for example, read instructions stored in the memory and send the instructions to the processor. The instructions, when executed by the processor, may cause the electronic device to perform the various steps of the embodiments described above. Of course, the system-on-chip may also include other discrete devices, which are not particularly limited in accordance with embodiments of the present application.
Embodiments of the present application also provide a computer-readable storage medium including computer instructions that, when executed on the above-described data transmission apparatus (such as the data transmission apparatus 200 shown in fig. 16), cause the electronic device to perform the functions or steps performed by the mobile phone in the above-described method embodiments.
The embodiment of the application also provides a computer program product, which when run on a computer, causes the computer to execute the functions or steps executed by the mobile phone in the method embodiment.
It will be apparent to those skilled in the art from this description that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts shown as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of specific embodiments of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present application should be covered by the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (20)

1. The data transmission method is applied to external equipment and is characterized by comprising the following steps of:
acquiring first data, wherein the first data is data sent by a first application to a second application, the first application is an application in the external equipment, the second application is an application in a central equipment, the first application and the second application are companion applications, a first link is arranged between the external equipment and the central equipment, and the first link is a direct link between the external equipment and the central equipment;
if the first link is not disconnected, sending the first data to the central equipment through the first link;
and if the first link is disconnected, sending the first data to a transfer server through a second link, so that the transfer server forwards the first data to the central equipment, wherein the second link is a link established between the external equipment and the central equipment through the transfer server.
2. The data transmission method according to claim 1, further comprising:
and if the first link is disconnected, receiving second data through the second link, wherein the second data is data sent to the first application by the second application, and the second data is sent to the transfer server by the central equipment and is forwarded to the external equipment by the transfer server.
3. The data transmission method according to claim 2, wherein the external device includes a first bluetooth protocol stack and a first proxy controller;
the sending the first data to the transit server through the second link includes:
the first application sends the first data to the first Bluetooth protocol stack;
the first Bluetooth protocol stack packages the first data to obtain a first message;
the first Bluetooth protocol stack sends the first message to the first proxy controller;
and the first proxy controller sends the first message to the transit server.
4. A data transmission method according to claim 3, wherein said receiving second data over said second link comprises:
The first proxy controller receives a first push message sent by the transfer server, wherein the first push message is used for indicating the transfer server to receive a second message;
the first proxy controller responds to the first push message and acquires the second message from the transfer server;
the first proxy controller sends the second message to the first Bluetooth protocol stack;
the first Bluetooth protocol stack unpacks the second message to obtain the second data;
the first Bluetooth protocol stack sends the second data to the first application.
5. The data transmission method of claim 3, wherein the first bluetooth protocol stack includes a first application layer and a first transport layer;
the first bluetooth protocol stack packages the first data, and before obtaining a first message, the method further includes:
judging the hardware type matched with the first Bluetooth protocol stack, wherein the hardware type comprises: at least one of an internet of things IoT device, a bracelet device, a sports watch device, and a smart watch device;
determining a packaging mode of the first data corresponding to the hardware type, wherein the packaging mode comprises the following steps: packaging the first data through the first transmission layer, simultaneously packaging the first data through the first application layer and the first transmission layer, and packaging the first data through the first application layer.
6. The method of data transmission according to claim 5, wherein said packaging said first data by said first transport layer comprises:
the first transmission layer encapsulates the first data into at least one data frame of the first message, wherein each data frame includes: a start identifier SOF field, a Length identifier field, a Control identifier field, a sequence number FSN identifier field, a traffic layer data Payload, and a check sum field.
7. The method of data transmission according to claim 5, wherein said simultaneously packaging said first data by said first application layer and said first transport layer comprises:
the first application layer encapsulates the first data into at least one first application layer data packet, wherein each first application layer data packet includes: service identification ServiceID, command identification Command ID, and at least one encapsulation TLV field;
the first transmission layer encapsulates the at least one first application layer data packet into at least one data frame of the first message, where each data frame includes: a start identifier SOF field, a Length identifier field, a Control identifier field, a sequence number FSN identifier field, a traffic layer data Payload, and a check sum field.
8. The method according to claim 7, wherein before the first transport layer encapsulates the at least one first application layer packet into at least one data frame of the first message, further comprising:
judging whether the length of the first application layer data packet exceeds the maximum frame length MFS of the first transmission layer;
and splitting the first application layer data packet with the maximum frame length MFS if the length of the first application layer data packet exceeds the maximum frame length MFS of the first transmission layer.
9. The method according to claim 5, wherein said packaging the first data by the first application layer comprises:
the first application layer encapsulates the first data into at least one first application layer packet of the first message, where each first application layer packet includes: a service identification ServiceID, a command identification Command ID, and at least one encapsulation TLV field.
10. The data transmission method according to claim 1, wherein before the first data is transmitted to the relay server through the second link, further comprising:
Acquiring identity information of the first application;
determining the type of the second link corresponding to the first application according to the identity information of the first application, wherein the type of the second link comprises: at least one of a classical Bluetooth point-to-point transmission BR link, a classical Bluetooth point-to-multipoint EDR link, a Bluetooth BLE link with low power consumption, a mobile data link, and a wireless fidelity Wi-Fi link;
and determining the frequency of the second link corresponding to the identity information of the first application, wherein the frequencies of the second links corresponding to different identity information are different.
11. The method for data transmission according to claim 10, wherein after determining the type of the second link corresponding to the first application according to the identity information of the first application, further comprising:
acquiring a data type of the first data, wherein the data type comprises short code stream data and long code stream data;
and determining the frequency of the second link corresponding to the data type of the first data, wherein the frequencies of the second links corresponding to different data types are different.
12. A data transmission method applied to a central device, comprising:
acquiring second data, wherein the second data is data sent to a first application by a second application, the first application is an application in external equipment, the second application is an application in the central equipment, the first application and the second application are companion applications, a first link is included between the external equipment and the central equipment, and the first link is a direct link between the external equipment and the central equipment;
If the first link is not disconnected, the second data is sent to the external device through the first link;
and if the first link is disconnected, sending the second data to a transfer server through a second link, so that the transfer server forwards the second data to the external equipment, wherein the second link is a link established between the central equipment and the external equipment through the transfer server.
13. The data transmission method according to claim 12, further comprising:
and if the first link is disconnected, receiving first data through the second link, wherein the first data is data sent to the second application by the first application, and the first data is sent to the transfer server by the external device and is forwarded to the central device by the transfer server.
14. The data transmission method of claim 13, wherein the central device comprises a first proxy application;
the sending the second data to the transit server through the second link includes:
the second application sends the second data to the first proxy application;
The first agent application packages the second data to obtain a second message;
and the first proxy application sends the second message to the transit server.
15. The method of data transmission according to claim 14, wherein said receiving the first data via the second link comprises:
the first proxy application receives a second push message sent by the transfer server, wherein the second push message is used for indicating the transfer server to receive a first message;
the first proxy application responds to the second push message and acquires the first message from the transit server;
the first proxy application unpacks the first message to obtain the first data;
the first proxy application sends the first data to the second application.
16. The method according to claim 14, wherein the first proxy application includes a second bluetooth protocol stack, and the second bluetooth protocol stack includes a second application layer and a second transport layer;
the first proxy application packaging the second data, comprising:
the second application layer encapsulates the second data into at least one second application layer data packet, wherein each second application layer data packet comprises: service identification ServiceID, command identification Command ID, and at least one encapsulation TLV field;
The second transmission layer encapsulates the at least one second application layer data packet into at least one data frame of the second packet, where each data frame includes: a start identifier SOF field, a Length identifier field, a Control identifier field, a sequence number FSN identifier field, a traffic layer data Payload, and a check sum field.
17. The method of claim 16, wherein the second transport layer further comprises, before encapsulating the at least one second application layer packet into at least one data frame of the second message:
judging whether the length of the second application layer data packet exceeds the maximum frame length MFS of the second transmission layer;
and splitting the second application layer data packet with the maximum frame length MFS if the length of the second application layer data packet exceeds the maximum frame length MFS of the second transmission layer.
18. The method of data transmission according to claim 12, wherein before the sending the second data to the relay server via the second link, further comprises:
acquiring identity information of the second application;
determining the type of the second link corresponding to the second application according to the identity information of the second application, wherein the type of the second link comprises: at least one of a classical Bluetooth point-to-point transmission BR link, a classical Bluetooth point-to-multipoint EDR link, a Bluetooth BLE link with low power consumption, a mobile data link, and a wireless fidelity Wi-Fi link;
And determining the frequency of the second link corresponding to the identity information of the second application, wherein the frequencies of the second links corresponding to different identity information are different.
19. The method for data transmission according to claim 18, wherein after determining the type of the second link corresponding to the second application according to the identity information of the second application, further comprising:
acquiring a data type of the second data, wherein the data type comprises short code stream data and long code stream data;
and determining the frequency of the second link corresponding to the data type of the second data, wherein the frequencies of the second links corresponding to different data types are different.
20. An electronic device, comprising: a processor and a memory; the memory stores program instructions that, when executed by the processor, cause the electronic device to perform the data transmission method of any of claims 1-19 as an external device and/or a central device.
CN202211400809.4A 2022-11-09 2022-11-09 Data transmission method and electronic equipment Pending CN116669231A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211400809.4A CN116669231A (en) 2022-11-09 2022-11-09 Data transmission method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211400809.4A CN116669231A (en) 2022-11-09 2022-11-09 Data transmission method and electronic equipment

Publications (1)

Publication Number Publication Date
CN116669231A true CN116669231A (en) 2023-08-29

Family

ID=87724839

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211400809.4A Pending CN116669231A (en) 2022-11-09 2022-11-09 Data transmission method and electronic equipment

Country Status (1)

Country Link
CN (1) CN116669231A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104363557A (en) * 2014-11-12 2015-02-18 北京国承万通信息科技有限公司 First equipment, communication method of first equipment and second equipment and communication system
WO2017214930A1 (en) * 2016-06-16 2017-12-21 华为技术有限公司 Method and device for communication between wearable device and mobile terminal
CN111866831A (en) * 2020-06-30 2020-10-30 歌尔科技有限公司 Connection control method, device, terminal equipment and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104363557A (en) * 2014-11-12 2015-02-18 北京国承万通信息科技有限公司 First equipment, communication method of first equipment and second equipment and communication system
WO2017214930A1 (en) * 2016-06-16 2017-12-21 华为技术有限公司 Method and device for communication between wearable device and mobile terminal
CN111866831A (en) * 2020-06-30 2020-10-30 歌尔科技有限公司 Connection control method, device, terminal equipment and system

Similar Documents

Publication Publication Date Title
EP3934292B1 (en) Bluetooth connection method, device and system
WO2021052178A1 (en) Wi-fi connection method and device
EP4024918B1 (en) Bluetooth connection method and related apparatus
US20230129780A1 (en) Wi-Fi Aware Link Establishment Method and System, Electronic Device, and Storage Medium
WO2020077512A1 (en) Voice communication method, electronic device, and system
CN114710768B (en) Bluetooth connection method and related device
EP4213512A1 (en) Screen projection method and system, and electronic device
US20230189366A1 (en) Bluetooth Communication Method, Terminal Device, and Computer-Readable Storage Medium
WO2020238890A1 (en) Information processing method and device
US11844119B2 (en) Bluetooth pairing method and related apparatus
US20230209438A1 (en) Data Transmission Method and Electronic Device
WO2023011376A1 (en) Key updating method in beidou communication system, and system and related apparatus
WO2020134868A1 (en) Connection establishment method, and terminal apparatus
CN114338913B (en) Fault diagnosis method, electronic device and readable storage medium
WO2022095820A1 (en) Text input method, electronic device, and system
CN116669231A (en) Data transmission method and electronic equipment
CN113676440A (en) Authority negotiation method and device in communication process and electronic equipment
WO2023011603A1 (en) Position reporting method and system in beidou communication system, and related apparatus
WO2023083027A1 (en) Parameter updating method and system in beidou communication system, and related apparatus
EP4138357A1 (en) Method and device for negotiating permission during communication process, and electronic apparatus
CN117295040A (en) Message sending method, electronic equipment and communication system
CN116528337A (en) Business collaboration method, electronic device, readable storage medium, and chip system

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