WO2022089384A1 - Data synchronization method and device - Google Patents

Data synchronization method and device Download PDF

Info

Publication number
WO2022089384A1
WO2022089384A1 PCT/CN2021/126219 CN2021126219W WO2022089384A1 WO 2022089384 A1 WO2022089384 A1 WO 2022089384A1 CN 2021126219 W CN2021126219 W CN 2021126219W WO 2022089384 A1 WO2022089384 A1 WO 2022089384A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
processor
synchronization
synchronizer
data synchronizer
Prior art date
Application number
PCT/CN2021/126219
Other languages
French (fr)
Chinese (zh)
Inventor
钱夏欢
蒋钟寅
李丽
王洋
凌波
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022089384A1 publication Critical patent/WO2022089384A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/436Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
    • H04N21/4363Adapting the video stream to a specific local network, e.g. a Bluetooth® network
    • H04N21/43637Adapting the video stream to a specific local network, e.g. a Bluetooth® network involving a wireless protocol, e.g. Bluetooth, RF or wireless LAN [IEEE 802.11]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements

Definitions

  • the present application relates to the field of data synchronization, and in particular, to a data synchronization method and device.
  • data synchronization can be performed between devices to share data.
  • the mobile phone synchronizes the latest express information to the TV, or the TV synchronizes the latest episode viewing records to the mobile phone.
  • an application processor application processor, AP
  • AP application processor
  • the embodiments of the present application provide a data synchronization method and apparatus, which can solve the problems of low efficiency and high device power consumption of the existing data synchronization technology, thereby improving data synchronization efficiency and reducing device power consumption.
  • a data synchronization method is provided. The method is applied to the first device.
  • the first device includes a first data synchronizer and a first processor.
  • the method includes: the first data synchronizer receives synchronization data from the second device, and sends the synchronization data to the first processor.
  • the data synchronization function of the first device can be completed by the first data synchronizer
  • the data synchronization function of the second device can be completed by the second data synchronizer , that is, the data synchronization function can be completed by the data synchronizer without the involvement of the processor.
  • the first data synchronizer can receive synchronization data from the second data synchronizer in real time, and even if the second processor is in a sleep state, the second data synchronizer can also Send synchronization data to the first device.
  • the present application can reduce the power consumption of the first device and the second device, and improve the data synchronization efficiency.
  • the above-mentioned first data synchronizer receives the synchronization data from the second device, and sends the synchronization data to the first processor, which may include: when the first processor is in a dormant state, the first data synchronization is performed.
  • the processor receives the synchronization data from the second device, and sends the synchronization data to the first processor when the first processor is in a working state.
  • the first device receives the synchronization data from the second device by the first data synchronizer when the first processor is in a sleep state. In this way, the power consumption of the device can be further reduced, the use time of the device can be prolonged, and the user experience can be improved.
  • the above-mentioned first data synchronizer sending synchronization data to the first processor may include: if the first data synchronizer detects that the first processor is in a working state, sending the first data synchronizer to the first processor Synchronous Data. In this way, when the first processor wakes up, the first data synchronizer can send the synchronization data to the first processor in time, thereby reducing the data synchronization time and further improving the data synchronization efficiency.
  • the above-mentioned first data synchronizer sending synchronization data to the first processor may include: the first data synchronizer receiving a synchronization instruction from the first processor, and sending synchronization instructions to the first processor according to the synchronization instruction data.
  • the synchronization instruction is used to obtain synchronization data from the second device.
  • the first processor can send a synchronization instruction to the first data synchronizer, and then actively acquire the synchronization data from the second device from the first data synchronizer, thereby improving the reliability of data synchronization.
  • the method described in the first aspect may further include: if the first data synchronizer detects that the first processor is in In the sleep state, the first data synchronizer actively wakes up the first processor. In this way, when the first processor sleeps, the first data synchronizer can actively wake up the first processor and send synchronization data to the first processor in a fast and timely manner, thereby further improving data synchronization efficiency.
  • the method described in the first aspect may further include: the first data synchronizer receives the subscription parameters from the first processor, and sends the subscription parameters to the second device.
  • the subscription parameter is used by the first device to obtain synchronization data from the second device.
  • the second device can provide synchronization data according to the requirements of the first device, that is, the first device can customize the synchronization data to reduce unnecessary data synchronization operations, thereby further improving data synchronization efficiency.
  • the method described in the first aspect may further include: the first processor outputs synchronization data, so that the first device can remind the user to check the synchronization data output by the first processor, so that the user can check the synchronization data according to the synchronization data.
  • the data determines the next action to improve the user experience.
  • the first processor may control the display of the first device to display the synchronization data, or control the speaker of the first device to play the synchronization data.
  • a data synchronization method is provided. The method is applied to the second device.
  • the second device includes a second data synchronizer and a second processor.
  • the method includes: the second data synchronizer receives synchronization data from the second processor, and sends the synchronization data to the first device.
  • the above-mentioned second data synchronizer sending synchronization data to the first device may include: when the second processor is in a sleep state, the second data synchronizer sending synchronization data to the first device.
  • the second processor can enter the sleep state after sending the synchronization data to the second data synchronizer, and when the second processor is in the sleep state, the second processor is in the sleep state.
  • the second data synchronizer sends synchronization data to the first device. In this way, the power consumption of the device can be further reduced, the use time of the device can be prolonged, and the user experience can be improved.
  • the above-mentioned second data synchronizer sending synchronization data to the first device may include: the second data synchronizer sending synchronization data to the first device according to a subscription parameter.
  • the subscription parameter is used by the first device to obtain synchronization data from the second device.
  • the method of the second aspect may further include: the second data synchronizer receives the subscription parameters from the first device.
  • the method described in the second aspect may further include: the second data synchronizer sends the subscription parameters to the second processor.
  • the method described in the second aspect may further include: if the second data synchronizer stores synchronization data, the second data synchronizer sends the subscription parameters to the second processor according to the subscription parameters.
  • the first device sends synchronization data.
  • the second data synchronizer can send the synchronization data to the first device in time, thereby reducing the data synchronization time and further improving the data synchronization efficiency.
  • the method described in the second aspect may further include one of the following: if the second processor is in a dormant state, the second data synchronizer wakes up the first two processors; or, if the second processor is in a dormant state, the second data synchronizer waits for the second processor to wake up. In this way, if the second data synchronizer actively wakes up the second processor, the second data synchronizer can send the subscription parameters to the second processor in time, so that the second device can timely feed back the synchronization data to the first device, and further Improve data synchronization efficiency. If the second data synchronizer waits for the second processor to wake up, the wake-up frequency of the second processor can be reduced, thereby further reducing the power consumption of the device.
  • the method described in the second aspect may further include: the second processor receives the subscription parameters from the second data synchronizer, obtains the synchronization data generated by the application according to the subscription parameters, and sends The second data synchronizer sends synchronization data.
  • the second device can send the synchronization data generated by the application to the first device in time, so as to further improve the data synchronization efficiency.
  • a communication device in a third aspect, includes a first data synchronizer and a first processor.
  • the first data synchronizer is configured to receive synchronization data from the second device and send the synchronization data to the first processor.
  • the first data synchronizer is configured to receive synchronization data from the second device when the first processor is in a sleep state, and send synchronization data to the first processor when the first processor is in a working state. Synchronous Data.
  • the first data synchronizer is configured to send synchronization data to the first processor if it is detected that the first processor is in a working state.
  • the first data synchronizer is configured to receive a synchronization instruction from the first processor, and send synchronization data to the first processor according to the synchronization instruction.
  • the synchronization instruction is used to obtain synchronization data from the second device.
  • the first data synchronizer is further configured to actively wake up the first processor if it is detected that the first processor is in a sleep state before sending the synchronization data to the first processor.
  • the first data synchronizer is further configured to receive subscription parameters from the first processor and send the subscription parameters to the second device.
  • the subscription parameter is used for the communication apparatus described in the third aspect to acquire synchronization data from the second device.
  • the first processor is further configured to output synchronization data.
  • the above-mentioned first data synchronizer may include a receiver and a transmitter.
  • the first data synchronizer is used to implement the sending function and the receiving function of the communication device described in the third aspect.
  • the communication apparatus described in the third aspect may further include a memory, where the memory stores programs or instructions.
  • the communication apparatus described in the third aspect can execute the data synchronization method described in the first aspect.
  • the communication device described in the third aspect may be terminal equipment or network equipment, or may be a chip (system) or other components or components that can be set in the terminal equipment or network equipment, or may include terminal equipment or a device of a network device, which is not limited in this application.
  • a communication device in a fourth aspect, includes a second data synchronizer and a second processor.
  • the second data synchronizer is configured to receive synchronization data from the second processor and send the synchronization data to the first device.
  • the second data synchronizer is configured to send synchronization data to the first device when the second processor is in a sleep state.
  • the second data synchronizer is configured to send synchronization data to the first device according to the subscription parameter.
  • the subscription parameter is used by the first device to obtain synchronization data from the communication apparatus described in the fourth aspect.
  • the second data synchronizer is further configured to receive the subscription parameters from the first device before sending the synchronization data to the first device according to the subscription parameters.
  • the second data synchronizer is further configured to send the subscription parameters to the second processor after receiving the subscription parameters from the first device.
  • the second data synchronizer is further configured to send the synchronization data to the first device according to the subscription parameters if synchronization data is stored before sending the subscription parameters to the second processor.
  • the second data synchronizer is further configured to wake up the second processor if the second processor is in a dormant state before sending the subscription parameters to the second processor; or, the second data synchronizer is further configured to Before sending the subscription parameters to the second processor, if the second processor is in a dormant state, wait for the second processor to wake up.
  • the second processor is further configured to receive subscription parameters from the second data synchronizer, obtain synchronization data generated by the application according to the subscription parameters, and send synchronization data to the second data synchronizer data.
  • the above-mentioned second data synchronizer may also be referred to as a transceiver.
  • the transceiver may include a receiver and a transmitter.
  • the transceiver is used to implement the sending function and the receiving function of the communication device described in the fourth aspect.
  • the communication apparatus described in the fourth aspect may further include a memory, where the memory stores programs or instructions.
  • the communication apparatus described in the fourth aspect can execute the data synchronization method described in the second aspect.
  • the communication device described in the fourth aspect may be terminal equipment or network equipment, or may be a chip (system) or other components or components that can be set in the terminal equipment or network equipment, or may include terminal equipment or a device of a network device, which is not limited in this application.
  • a communication device configured to execute the data synchronization method described in any one of the implementation manners of the first aspect to the second aspect.
  • the communication device described in the fifth aspect may be the first device described in the first aspect or the second device described in the second aspect, or may be provided in the first device or the second device a chip (system) or other component or assembly, or an apparatus containing the first device or the second device.
  • the communication device described in the fifth aspect includes a corresponding module, unit, or means for implementing the data synchronization method described in any one of the first aspect and the second aspect.
  • the module, unit, or means It can be realized by hardware, software, or by executing corresponding software by hardware.
  • the hardware or software includes one or more modules or units for performing the functions involved in the above data synchronization method.
  • a communication device in a sixth aspect, includes: a processor, where the processor is configured to execute the data synchronization method described in any one of the possible implementation manners of the first aspect to the second aspect.
  • the communication apparatus described in the sixth aspect may further include a transceiver.
  • the transceiver may be a transceiver circuit or an interface circuit.
  • the transceiver can be used for the communication device described in the sixth aspect to communicate with other communication devices.
  • the communication apparatus described in the sixth aspect may further include a memory.
  • the memory can be integrated with the processor, or it can be provided separately.
  • the memory may be used to store the computer program and/or data involved in the data synchronization method described in any one of the first aspect to the second aspect.
  • the communication device described in the sixth aspect may be the first device in the first aspect or the second device in the second aspect, or a chip (system) that may be provided in the first device or the second device ) or other parts or assemblies, or apparatus comprising the first device or the second device.
  • a communication device in a seventh aspect, includes: a processor, which is coupled to the memory, and the processor is configured to execute a computer program stored in the memory, so that the communication apparatus executes any one of the possible implementations of the first aspect to the second aspect. data synchronization method.
  • the communication device may further include a transceiver.
  • the transceiver may be a transceiver circuit or an interface circuit.
  • the transceiver can be used for the communication device described in the seventh aspect to communicate with other communication devices.
  • the communication apparatus described in the seventh aspect may be the first device in the first aspect or the second device in the second aspect, or may be a chip (system) provided in the first device or the second device ) or other parts or assemblies, or apparatus comprising the first device or the second device.
  • a communication device comprising: a processor and a memory; the memory is used for storing a computer program, when the processor executes the computer program, so that the communication device executes the first to second aspects
  • the communication apparatus described in the eighth aspect may further include a transceiver.
  • the transceiver may be a transceiver circuit or an interface circuit.
  • the transceiver can be used for the communication device described in the eighth aspect to communicate with other communication devices.
  • the communication apparatus described in the eighth aspect may be the first device in the first aspect or the second device in the second aspect, or a chip (system) that may be provided in the first device or the second device ) or other parts or assemblies, or apparatus comprising the first device or the second device.
  • a communication device comprising: a processor; the processor is configured to be coupled to a memory, and after reading a computer program in the memory, execute the first to second aspects according to the computer program Any one of the data synchronization methods described in the implementation manner.
  • the communication device may further include a transceiver.
  • the transceiver may be a transceiver circuit or an interface circuit.
  • the transceiver can be used for the communication device described in the ninth aspect to communicate with other communication devices.
  • the communication device described in the ninth aspect may be the first device in the first aspect or the second device in the second aspect, or a chip (system) that may be provided in the first device or the second device ) or other parts or assemblies, or apparatus comprising the first device or the second device.
  • a tenth aspect provides a processor.
  • the processor is configured to execute the data synchronization method described in any possible implementation manner of the first aspect to the second aspect.
  • a wireless communication system includes the above-mentioned first device and second device.
  • a twelfth aspect provides a computer-readable storage medium, comprising: a computer program or an instruction; when the computer program or instruction is run on a computer, the computer is made to execute any one of the possible possibilities of the first aspect to the second aspect.
  • the data synchronization method described in the implementation mode is implemented.
  • a thirteenth aspect provides a computer program product, comprising a computer program or instructions, when the computer program or instructions are run on a computer, the computer is made to execute any one of the possible implementations of the first aspect to the second aspect.
  • FIG. 1 is a schematic diagram of an application scenario and a flowchart of an existing data synchronization technology
  • FIG. 2 is a schematic structural diagram of a wireless communication system according to an embodiment of the present application.
  • FIG. 3 is a block diagram of a device system architecture provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a service framework of a device provided by an embodiment of the present application.
  • FIG. 5 is a schematic flowchart 1 of a data synchronization method provided by an embodiment of the present application.
  • FIG. 6 is a second schematic flowchart of a data synchronization method provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram 1 of a communication device provided by an embodiment of the present application.
  • FIG. 8 is a second schematic structural diagram of a communication device according to an embodiment of the present application.
  • FIG. 9 is a third schematic structural diagram of a communication apparatus according to an embodiment of the present application.
  • the Sensor Hub is a microcontroller unit (MCU) that can control the sensors of the device in real time and process data from various sensors when the CPU of the device is in sleep state.
  • MCU microcontroller unit
  • Bluetooth low energy is a low-cost, short-range, interoperable wireless communication technology.
  • the application processor can process data update monitoring, data distribution processing and data presentation of the subscription service of the device.
  • the mobile phone includes a first AP and a communication module
  • the TV includes a second AP and a communication module.
  • the first AP includes programs such as express programs, schedule programs, first content services, first distribution services, and first display modules
  • the second AP includes video programs, second content services, second distribution services, and second display modules. and so on.
  • Step 1-Step 7 in Step 1, Step 1-Step 7 can refer to Step 1-Step 7, and only step 1-Step 7 in the figure will be introduced in detail below.
  • Step 1 the second distribution service program sends the mobile phone the information that the video service can be provided (the information indicates that the TV can send the synchronization data generated by the video program) to the mobile phone through the communication module.
  • Step 2 the first distribution service program receives the video service information available from the TV, and sends the subscription video service information to the TV.
  • Step 3 after the TV receives the subscription video service information from the mobile phone, if the video program generates new video data (such as the video viewing progress, the episodes collected by the user, etc.), then these data are sent to the second as synchronous data. content service program.
  • new video data such as the video viewing progress, the episodes collected by the user, etc.
  • Step 4 After receiving the synchronization data from the video program, the second content service program sends the synchronization data to the second distribution service program.
  • Step 5 the second distribution service program sends synchronization data to the mobile phone through the communication module.
  • Step 6 the first distribution service program receives the synchronization data from the TV.
  • Step 7 the first distribution service program sends the synchronization data to the first display module, so that the first display module displays the synchronization data.
  • step 6 the mobile phone must be in a working state (ie, a wake-up state, for example, the user uses the mobile phone to wake up the first AP), so that the first distribution service program can receive the synchronization data from the TV to realize data synchronization. That is to say, when synchronizing data between the mobile phone and the TV, the AP of the mobile phone and the TV must be in a working state (ie, a wake-up state) to achieve data synchronization.
  • a working state ie, a wake-up state
  • the AP of the mobile phone and the TV must be in a working state (ie, a wake-up state) to achieve data synchronization.
  • the existing data synchronization technology has poor real-time performance, and usually requires the user to use the device and wake up the device before the device can perform data synchronization. Moreover, after the device wakes up, the communication connection between the device and the device needs to be re-established to transmit data, so the transmission speed is slow. Also, if the device frequently synchronizes data with the device, the AP will be woken up frequently, and the device consumes a lot of power.
  • the embodiments of the present application provide a data synchronization method and device to improve data synchronization efficiency and reduce device power consumption. It should be noted that the various defects existing in the technical solutions in the above-mentioned prior art are the results obtained by the inventor after careful practical research. Therefore, the discovery process of the above-mentioned problems and the solutions to the above-mentioned problems proposed in the following embodiments of the present application should be contributions made by the inventor to the present application in the process of realizing the present application.
  • the technical solutions of the embodiments of the present application can be applied to various wireless communication systems, such as low-power Bluetooth communication systems, wireless fidelity (WiFi) systems, and 4th generation (4G) mobile communication systems, such as long-term Evolution (long term evolution, LTE) systems, worldwide interoperability for microwave access (WiMAX) communication systems, fifth generation (5th generation, 5G) mobile communication systems, such as new radio (new radio, NR) systems , and future communication systems, such as the 6th generation (6G) mobile communication system, vehicle-to-everything (V2X) communication system, device-todevie (D2D) communication system, Internet of Vehicles communication system, etc.
  • 6G 6th generation
  • 6G vehicle-to-everything
  • D2D device-todevie
  • FIG. 2 is a schematic structural diagram of a wireless communication system to which the data synchronization method provided by the embodiment of the present application is applied.
  • the wireless communication system may include a first device and a second device, and a communication connection exists between the first device and the second device.
  • both the first device and the second device may be a terminal with a wireless transceiver function or a chip or a chip system that may be provided in the terminal.
  • the first device and the second device may be: a mobile phone (mobile phone), a tablet computer (Pad), a computer with a wireless transceiver function, a virtual reality (virtual reality, VR) terminal device, an augmented reality (augmented reality) , AR) terminal equipment, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical, wireless terminals in smart grid , wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, in-vehicle terminals, roadside units (RSUs) with terminal functions )Wait.
  • the above-mentioned first device and second device may also be referred to as user equipment, access terminal, subscriber unit, subscriber station, mobile station, mobile station, remote station, remote terminal, mobile equipment, user terminal, terminal, wireless communication device, or user agent
  • both the above-mentioned first device and the second device may be a terminal with a wireless transceiver function or a chip or a chip system that can be provided in the terminal
  • the above-mentioned first processor and the second processor may be: ARM (advanced) RISC machines) processors, X86 processors, or application processors, etc.
  • ARM advanced RISC machines
  • X86 X86 processors
  • application processors etc.
  • both the above-mentioned first processor and second processor may be APs.
  • the above-mentioned first data synchronizer and second data synchronizer may be: MCU, general-purpose processor, digital signal processor (digital signal processor, DSP), application specific integrated circuit (application specific integrated circuit, ASIC), ready-made programmable gate Field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, coprocessors, etc.
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • both the above-mentioned first data synchronizer and second data synchronizer may be SensorHub.
  • FIG. 3 is a block diagram of a device system architecture provided by an embodiment of the present application.
  • the device system architecture may include one or more of the following modules: AP, SensorHub, or bluetooth chip (BT chip).
  • the AP may include one or more of the following layers: an application layer (applications, APPs), an application framework layer (application framework), a hardware abstraction layer (hardware abstraction layer, HAL), or a kernel layer (kernel).
  • an application layer applications, APPs
  • an application framework layer application framework
  • a hardware abstraction layer hardware abstraction layer
  • kernel layer kernel layer
  • the SensorHub may include one or more of the following modules: a subscription service, a Bluetooth application (bluetooth application, BT APP), or a Bluetooth driver (bluetooth driver, BT driver).
  • a subscription service a Bluetooth application (bluetooth application, BT APP), or a Bluetooth driver (bluetooth driver, BT driver).
  • the Bluetooth chip may include one or more of the following modules: a translation switch module or a scan filter module.
  • the specific implementation of the conversion module and the scanning filter module can refer to the existing Bluetooth technology, which will not be repeated here.
  • Data communication can be performed between the AP and the Bluetooth chip through a universal asynchronous receiver transmitter (UART).
  • Data communication between the SensorHub and the Bluetooth chip can be performed through a built-in integrated circuit (inter integrated circuit, I2C), or data communication can be performed through an improved inter integrated circuit (I3C).
  • I2C inter integrated circuit
  • I3C improved inter integrated circuit
  • the application layer may include one or more of the following programs: bus service, smart life, express delivery, or video, etc.
  • the application framework layer may include one or more of the following framework modules: a Bluetooth framework (bluetooth framework, BT FW), a WiFi framework (WiFi framework, WiFi FW), or a sensor framework (sensor framework, Sensor FW), etc.
  • a Bluetooth framework bluetooth framework, BT FW
  • WiFi framework WiFi framework, WiFi FW
  • sensor framework sensor framework, Sensor FW
  • the hardware abstraction layer may include one or more of the following hardware abstraction modules: bluetooth hardware abstraction layer (BT HAL), WiFi hardware abstraction layer (WiFi HAL), or sensor hardware abstraction layer (sensor hardware abstraction layer) , Sensor HAL) and so on.
  • BT HAL bluetooth hardware abstraction layer
  • WiFi HAL WiFi hardware abstraction layer
  • sensor hardware abstraction layer sensor hardware abstraction layer
  • Sensor HAL Sensor HAL
  • the kernel layer may include one or more of the following driver modules: a Bluetooth driver (bluetooth driver, BT driver), a WiFi driver (WiFi driver), or a sensor driver (Sensor driver).
  • a Bluetooth driver bluetooth driver, BT driver
  • WiFi driver WiFi driver
  • Sensor driver a sensor driver
  • the program in the AP can generate various synchronous data.
  • the express program can generate synchronous data including the express delivery time, the express delivery address, the express delivery person, etc.
  • the video program can generate the synchronous data including the name of the episode , episode progress, video synchronization data, etc.
  • the bus service can obtain synchronization data generated by programs in the AP.
  • the bus service can also communicate data with SensorHub. For example, when the bus service needs to send synchronous data to SensorHub, the bus service can send the synchronous data to SensorHub by calling Sensor Driver, Sensor HAL, and Sensor FW in sequence. Or, for example, when SensorHub needs to send synchronous data to the bus service, SensorHub can sequentially call Sensor Driver, Sensor HAL, and Sensor FW to send the synchronous data to the bus service, thereby realizing the purpose of data communication between the bus service and SensorHub.
  • SensorHub After the above SensorHub receives the data from the AP, it can send the data to other devices. For example, when SensorHub receives synchronous data from AP, SensorHub can control the Bluetooth chip to perform BLE scan and BLE broadcast to discover the second device. After discovering the second device, the first device may establish a communication connection with the second device (the communication connection may include: WiFi connection, Bluetooth connection, etc.), and then send the synchronization data to the second device. In addition, the aforementioned SensorHub can also receive data from other devices and send the data to the AP. For example, when SensorHub receives synchronization data from the second device, SensorHub can send the synchronization data to the AP. That is to say, SensorHub can communicate with other devices by controlling the Bluetooth chip.
  • the bus service can send the synchronization data to SensorHub after obtaining the synchronization data generated by the program in the AP, and then This sync data is sent by SensorHub to other devices.
  • SensorHub can receive synchronization data from other devices, and then forward it to the AP.
  • the above-mentioned subscription service can save the data.
  • the aforementioned subscription services can also save that data.
  • the subscription service may also store the following subscription parameters.
  • For the subscription parameter reference may be made to the explanation of S402-3 in the following method embodiments, which will not be repeated here.
  • the device system architecture provided by the above embodiments may be the device system architecture of the first device in the wireless communication system shown in FIG. 2, or the device system architecture of the second device, which is not limited in the embodiments of the present application .
  • an embodiment of the present application further provides a schematic diagram of a service framework of a device, please refer to FIG. 4 .
  • the service framework may include one or more of the following modules: AP, SensorHub, or Bluetooth chip.
  • the AP may include one or more of the following programs: express delivery, video, smart life, or bus service.
  • the smart life may include the following sub-modules: a user experience (UX) display module, a content service (CS) module, and a distribution service (DS) module.
  • UX user experience
  • CS content service
  • DS distribution service
  • the SensorHub may include one or more of the following modules: an application management module, a communication management module, or a Board Support Package (BSP) module.
  • the application management module may include the following submodules: a notification (Notify) module and a data update (data update) module.
  • the content service module may be used to detect and acquire the synchronization data generated by the program in the AP, and may also be used to send the synchronization data to the distribution service module. After receiving the synchronization data from the content service module, the distribution service module can send the synchronization data to the bus service.
  • the communication management module can be encapsulated with a communication protocol, which can be used to control the Bluetooth chip to perform BLE scanning and BLE broadcast, thereby realizing sending data to or receiving data from other devices.
  • the data update module may be used to store synchronization data from other devices, and may be used to store synchronization data from APs.
  • the notification module may be used to send synchronization data to other devices, and may be used to send received synchronization data to the AP.
  • SensorHub when SensorHub receives synchronous data from the bus service, it can store the synchronous data in the data update module, and then the notification module calls the communication management module and the board-level support package module to send the synchronous data to the second device. .
  • the synchronization data can also be stored in the data update module, and then the notification module calls the communication management module and the board-level support package module to send the synchronization data to the bus service.
  • the AP can also output the data.
  • the user experience display module may control the display of the first device to display the data (eg, a notification bar pops up on the display interface), or control the speaker of the first device to play the data.
  • the communication connection between the first device and the second device is not limited to a Bluetooth connection, but may also be a WiFi connection, a fourth-generation mobile communication connection, a fifth-generation mobile communication connection, etc. Not limited.
  • the internal connection mode of the first device and the second device is not limited to UART, I2C, or I3C, which is not limited in this embodiment of the present application.
  • the steps performed by the first device may be performed by the second device, and the steps performed by the second device may be performed by the first device , that is, the first device and the second device in this embodiment of the present application have the same status, and they can be executed interchangeably when executing the method provided by this embodiment.
  • the first device may receive synchronization data sent by the second device, and may also send synchronization data to the second device.
  • FIG. 2 is only a simplified schematic diagram for easy understanding, and the wireless communication system may further include other network devices and/or other terminal devices, which are not shown in FIG. 2 .
  • FIG. 5 is a schematic flowchart 1 of a data synchronization method provided by an embodiment of the present application. The method is applied to the first device and the second device.
  • the first device includes a first data synchronizer and a first processor
  • the second device includes a second data synchronizer and a second processor.
  • the method includes the following steps S501-S503:
  • the second processor sends synchronization data to the second data synchronizer, and the second data synchronizer receives the synchronization data from the second processor.
  • the synchronization data may include one or more of the following: schedule data, itinerary data, express data, video data, music data, album data, or data to be read, and the like.
  • the schedule data may include schedule time, schedule content, and the like.
  • Trip data can include trip content, trip time, trip recommendations, and more.
  • the express data may include express delivery time, express delivery address, express delivery person, and the like.
  • Video data may include episode names, episode progress, videos, and the like.
  • the music data may include playing records of music applications, music, and the like.
  • Album data may include album previews, recently captured images, and the like.
  • the data to be read may include an introduction to be read, a link to be read, and the like.
  • the above-mentioned schedule data, itinerary data, express data, video data, music data, album data, or data to be read may also include a device identification code.
  • the device identification code may include one or more of the following: a media access control (media access control, MAC) address of the device, an internet protocol (internet protocol, IP) address, or a device name, and the like. It should be understood that setting the device identification code in the synchronization data can enable the first device to remind the user which device sent the synchronization data when the first device outputs the synchronization data, so that the user can determine the next operation, thereby improving user experience.
  • media access control media access control
  • IP internet protocol
  • schedule data does not specifically limit schedule data, itinerary data, express data, video data, music data, album data, or data to be read.
  • the second data synchronizer sends synchronization data to the first data synchronizer, and the first data synchronizer receives the synchronization data from the second data synchronizer.
  • the second data synchronizer may send the synchronization data to the first data synchronizer immediately or later. Therefore, the second processor does not have to send synchronization data to the first device in real time. Furthermore, in the process of the second data synchronizer sending the synchronization data to the first data synchronizer, the second processor may be in a dormant state or in a working state. In this way, during the process of the second data synchronizer sending synchronization data to the first data synchronizer, the second processor may choose to enter the sleep state to reduce the power consumption of the device, or process other data to improve the operation efficiency of the device.
  • the second data synchronizer sends the synchronization data to the first data synchronizer, which may include the following steps:
  • the second data synchronizer when the second processor is in a sleep state, the second data synchronizer sends synchronization data to the first data synchronizer.
  • the hibernation state may be that the second processor is in a low power consumption running state, for example, the second processor is in a state of standby, hibernation, or sleep. That is to say, the above-mentioned hibernation state may include: standby, hibernation, or sleep.
  • the second data synchronizer may first confirm whether the second processor is in a sleep state. When confirming that the second processor is in the sleep state, the second data synchronizer sends synchronization data to the first data synchronizer.
  • the manner in which the second data synchronizer confirms the state of the second processor may be: after the second data synchronizer receives the synchronization data from the second processor and reaches a first time period (for example, 5 seconds), confirms The second processor is in a dormant state; or, when the second data synchronizer receives a dormancy message from the second processor, it can confirm that the second processor is in a dormant state; or, when the second data synchronizer receives a message from the second processor After synchronizing data of the second processor, send start dormancy information (used to instruct the second processor to enter the dormancy state) to the second processor, and confirm that the second processor is in the dormant state.
  • start dormancy information used to instruct the second processor to enter the dormancy state
  • the manner in which the second processor enters the sleep state may be: after sending the synchronization data to the second data synchronizer for a second period of time, the second processor enters the sleep state; or after receiving the second data processor After sending the start dormancy information, the second processor enters a dormant state. It can be understood that the embodiment of the present application does not specifically limit the manner in which the second processor enters the sleep state.
  • the second processor can enter the sleep state after sending the synchronization data to the second data synchronizer, and then the second data synchronizer synchronizes the first data with the second device. to send synchronization data.
  • the power consumption of the device can be further reduced, the standby time of the device can be prolonged, the power consumption of the device can be reduced, and the user experience can be improved.
  • the second data synchronizer may also send synchronization data to the first data synchronizer when the second processor is in an off state. That is to say, when the second processor is in a sleep state or a shutdown state, the second data synchronizer sends synchronization data to the first data synchronizer.
  • the first processor does not need to receive the synchronization data in real time. Synchronous data sent by the second device. Furthermore, during the process that the first data synchronizer receives the synchronization data from the second data synchronizer, the first processor may be in a sleep state or in a working state. In this way, during the process of the first data synchronizer receiving the synchronization data from the second data synchronizer, the first processor may choose to enter the sleep state to reduce the power consumption of the device, or process other data to improve the operation efficiency of the device.
  • the first data synchronizer receives the synchronization data from the second data synchronizer, which may include the following sub-steps:
  • the first data synchronizer receives synchronization data from the second data synchronizer.
  • the above-mentioned sleep state may mean that the first processor is in a low power consumption running state, for example, the first processor is in a state of standby, hibernation, or sleep. That is to say, the above-mentioned hibernation state may include: standby, hibernation, or sleep.
  • the first data synchronizer receives the synchronization data from the second data synchronizer when the first processor is in a sleep state. In this way, the power consumption of the device can be further reduced, the standby time of the device can be prolonged, the power consumption of the device can be reduced, and the user experience can be improved.
  • the first data synchronizer may also receive synchronization data from the second data synchronizer when the first processor is in an off state. That is, when the first processor is in a sleep state or a shutdown state, the first data synchronizer receives synchronization data from the second data synchronizer.
  • the first processor only needs to receive the synchronization data sent by the first data synchronizer
  • the second processor only needs to receive the synchronization data sent by the first data synchronizer.
  • the synchronization data needs to be sent to the second data synchronizer, so that the two processors do not need to be in a working state frequently, nor need to frequently establish a communication connection, and the local data transfer speed is faster. In this way, the embodiments of the present application can also improve the data synchronization efficiency between devices.
  • the second data synchronizer sends the synchronization data to the first device, which may include the following sub-steps:
  • the second data synchronizer sends synchronization data to the first device according to the subscription parameter.
  • the subscription parameter is used by the first device to obtain synchronization data from the second device.
  • the above-mentioned subscription parameters may include one or more of the following: a first device identification code, a second device identification code, or subscription information for synchronizing data.
  • the above-mentioned subscription information of the synchronization data is used to indicate the synchronization data to be acquired.
  • the subscription information of the synchronization data may indicate that one or more of the following data need to be acquired: schedule data, itinerary data, express data, video data, music data, album data, or data to be read, etc. This is not specifically limited.
  • schedule data, itinerary data, express data, video data, music data, album data, or data to be read reference may be made to the corresponding records in S501 above, which will not be repeated here.
  • the second data synchronizer may send video data (for example, the name of the episode of the video the user watches, the progress of the episode, etc.) to the first device according to the subscription parameter.
  • the first device needs to acquire the synchronization data of the second device as an example, first, the first device sends indication information for instructing the second device to feed back the synchronization data to the second device. Then, the second device sends synchronization data to the first device according to the indication information.
  • the indication information may be understood as the above-mentioned subscription parameter.
  • the process of establishing a mutual subscription relationship between devices may be: the device requesting to synchronize data sends subscription parameters to the device requested to synchronize data.
  • the first device may be understood as a device requesting synchronization data
  • the second device may be understood as a device requested to synchronize data. Therefore, the process of establishing a subscription relationship between the first device and the second device is: the first device sends subscription parameters to the second device, and the second device receives the subscription parameters.
  • the data synchronization method shown in FIG. 5 may further include the following sub-steps:
  • the second data synchronizer receives the subscription parameters from the first device.
  • the data synchronization method shown in FIG. 5 may further include the following sub-steps:
  • the second data synchronizer sends subscription parameters to the second processor.
  • the data synchronization method shown in FIG. 5 may further include the following sub-steps:
  • the second data synchronizer if the second data synchronizer stores synchronization data, the second data synchronizer sends the synchronization data stored by the second data synchronizer to the first device according to the subscription parameter.
  • the second data synchronizer may first send the video data to the first device according to the subscription parameter.
  • this enables the second data synchronizer to send the synchronization data to the first device in time when the synchronization data is already stored, thereby reducing the data synchronization time and further improving the data synchronization efficiency.
  • the data synchronization method shown in Figure 5 can also include one of the following substeps S502-7, S502-8:
  • the second data synchronizer wakes up the second processor.
  • the second data synchronizer can send the subscription parameters to the second processor in time, so that the second device can timely feed back the synchronization data to the first device, and further Improve data synchronization efficiency.
  • the second data synchronizer waits for the second processor to wake up, in the process of waiting for the second processor to wake up, the second data synchronizer can receive as much synchronization data as possible to increase the data volume of the synchronization data. and completeness.
  • the wake-up frequency of the second processor can also be reduced, thereby reducing the number of times that the second processor receives synchronous data, so as to save the computing resources of the second processor, further reduce the power consumption of the device, and improve the overall efficiency of the device operation.
  • the data synchronization method shown in FIG. 5 may further include the following sub-steps:
  • the second processor receives the subscription parameters from the second data synchronizer, acquires synchronization data generated by the application according to the subscription parameters, and sends the synchronization data to the second data synchronizer.
  • the second processor may monitor whether the video application generates new video data after receiving the subscription parameter. If the video application program generates new video data, the second processor acquires the video data and sends it to the second data synchronizer as synchronization data.
  • the second device can send the synchronization data generated by the application program to the first device in time, thereby further improving the data synchronization efficiency.
  • S502-6 may be executed before S502-7 and S502-8, or may be executed after S502-7 and S502-8, which is not limited in this embodiment of the present application.
  • the first data synchronizer sends synchronization data to the first processor, and the first processor receives the synchronization data from the first data synchronizer.
  • the first processor may be in a sleep state or in a working state during the process of receiving the synchronization data from the second data synchronizer by the first data synchronizer. Therefore, when the first data synchronizer sends synchronization data to the first processor, the first processor may be in a dormant state or may be in a working state.
  • the first data synchronizer may first detect whether the first processor is in the working state, and send the synchronization data to the first processor when the first processor is in the working state.
  • the first data synchronizer sends the synchronization data to the first processor, which may include the following sub-steps:
  • the first data synchronizer if the first data synchronizer detects that the first processor is in a working state, the first data synchronizer sends synchronization data to the first processor.
  • the first data synchronizer can send synchronization data to the first processor in time, thereby reducing data synchronization time and improving data synchronization efficiency.
  • the first data synchronizer sends the synchronization data to the first processor, which may include the following sub-steps:
  • the first data synchronizer receives a synchronization instruction from the first processor, and sends synchronization data to the first processor according to the synchronization instruction.
  • the synchronization instruction is used to obtain synchronization data from the second device.
  • the first processor can generate a synchronization instruction (an instruction instructing the first data synchronizer to feed back the synchronization data of the second device), and send the synchronization instruction to the first data synchronizer so as to receive the synchronization instruction in time.
  • the synchronization data fed back by the first data synchronizer completes the data synchronization process as soon as possible.
  • the manner in which the first processor generates the synchronization instruction may be to generate the synchronization instruction every time it wakes up. Or, in the working state, a synchronization instruction is generated at a third time period. This embodiment of the present application does not limit this.
  • the lengths of the first time period, the second time period, and the third time period may be the same or different, which are not limited in this embodiment of the present application.
  • the first processor can send a synchronization instruction to the first data synchronizer, and then actively acquire the synchronization data from the second device from the first data synchronizer, thereby improving the reliability of data synchronization.
  • S503-1 may be executed before S503-2, or may be executed after S503-2, which is not limited in this embodiment of the present application.
  • the data synchronization method shown in FIG. 5 may further include the following steps:
  • the first data synchronizer detects that the first processor is in a sleep state, the first data synchronizer actively wakes up the first processor.
  • the first data synchronizer can actively wake it up and send the synchronization data to the first processor in a fast and timely manner, thereby further improving data synchronization efficiency.
  • the data synchronization method shown in FIG. 5 may also include the following steps:
  • the first data synchronizer receives the subscription parameters from the first processor, and sends the subscription parameters to the second device.
  • the subscription parameter is used by the first device to obtain synchronization data from the second device.
  • the second device may provide synchronization data according to the requirements of the first device, that is, the first device may customize the synchronization data to reduce unnecessary data synchronization operations, thereby further improving data synchronization efficiency.
  • the data synchronization method shown in FIG. 5 may also include the following steps:
  • the first processor outputs synchronization data.
  • the first processor may control the display of the first device to display the synchronization data, or control the speaker of the first device to play the synchronization data.
  • the first device can remind the user to check the synchronization data output by the first processor, so that the user can determine the next operation, thereby improving user experience.
  • the system architectures of the first device and the second device can both be the device system architectures shown in FIG. 3 .
  • the first processor in the first device can be the first AP
  • the first data synchronizer can be The first SensorHub
  • the second processor in the second device may be the second AP
  • the second data synchronizer may be the second SensorHub.
  • the first AP may include the first application and the first bus service
  • the second AP may include the second application and the second bus service.
  • the first application program may be a program in the application program layer of the first AP (for example, a smart life, synchronization program, etc.), and the second application program may be a program in the application program layer of the second AP (for example, express, video, itinerary, etc.), which is not limited in this embodiment of the present application.
  • FIG. 6 is a second schematic flowchart of a data synchronization method provided by an embodiment of the present application.
  • the data synchronization method can be applied to the wireless communication system shown in FIG. 2 , and the data synchronization method shown in FIG. 5 can be implemented.
  • the data synchronization method includes a process of establishing a subscription relationship based on subscription parameters and a synchronization process of synchronizing data.
  • S601-S609 and S610-S616 respectively:
  • the first application sends subscription parameters to the first bus service.
  • the subscription parameter is used by the first device to obtain synchronization data from the second device.
  • the first application may generate subscription parameters, and send the subscription parameters to the first bus service.
  • the manner in which the first application generates the subscription parameters may be as follows:
  • the second device sends subscribeable program information to the first device.
  • the subscribeable program information may represent one or more applications in the second device that may generate synchronization data.
  • the second device has the following application programs that can generate synchronous data, namely: video, itinerary, and express delivery
  • the second device can send a message to the first device that characterizes "applications in the second device that can generate synchronous data"
  • the program includes: video, itinerary, express" information (you can subscribe to program information).
  • the first application may output the subscribeable program data.
  • the subscribeable program information represents "the application programs in the second device that can generate synchronous data include: video, itinerary, and express delivery”
  • the first application program can control the display of the first device to display the text message "Please select to subscribe.
  • the program of the second device A. video, B. itinerary, C. express”, or control the speaker of the first device to play the sound message “Please answer the program of the second device that needs to be subscribed: video, itinerary, express”.
  • the first application may respond to the user operation, determine the application selected by the user according to the user operation, and generate subscription parameters according to the application selected by the user. For example, if the subscribable program information represents "application programs that can generate synchronized data in the second device include: video, itinerary, express delivery", and the application program selected by the user is "video", the first application program can generate a program including " Second device identification code, information indicating subscription video” information.
  • the information indicating the subscription of the video indicates that the first device needs to obtain the video data of the second device, that is, the information indicating the subscription of the video may also be understood as the above-mentioned subscription information of the synchronization data.
  • the second device can send the application program that can provide synchronization data to the first device, and the first device can output the service capability of the second device (that is, subscribe to program information), so that the user can synchronize the feedback of the second device according to the needs.
  • Data is customized to reduce unnecessary data synchronization operations, thereby further improving data synchronization efficiency.
  • the first bus service receives the subscription parameter from the first application, and sends the subscription parameter to the first SensorHub.
  • the first bus service may save the subscription parameters.
  • the first bus service can send a synchronization command to the first SensorHub according to the subscription parameter, so as to actively obtain synchronization data from the first SensorHub.
  • the first bus service may periodically send a synchronization command to the first SensorHub to periodically obtain synchronization data from the first SensorHub.
  • the first AP may enter a sleep state.
  • the first SensorHub receives the subscription parameter from the first bus service, and sends the subscription parameter to the second SensorHub.
  • the first SensorHub may save the subscription parameters.
  • the second SensorHub if the second SensorHub stores the synchronization data, the second SensorHub sends the synchronization data to the first SensorHub according to the subscription parameter.
  • the second SensorHub may save the subscription parameters.
  • the second SensorHub may directly send the synchronization data to the first SensorHub according to the subscription parameters, without having to send the synchronization data to the first SensorHub again.
  • the device sends subscription parameters, thereby reducing data synchronization steps and improving synchronization efficiency.
  • the second SensorHub waits for the second AP to wake up.
  • the second SensorHub sends a wake-up instruction to the second AP to actively wake up the second AP.
  • the second SensorHub when the second AP is in the working state, the second SensorHub sends the subscription parameter to the second bus service.
  • the second bus service receives the subscription parameters from the second SensorHub, and sends the subscription parameters to the second application.
  • the second application acquires the synchronization data generated by the second application according to the subscription parameter.
  • the second bus service may save the subscription parameters.
  • the second bus service can send an acquisition instruction (used to instruct to acquire the synchronization data generated by the second application) to the second application according to the subscription parameter, so as to actively acquire from the second application Synchronous Data.
  • the second bus service may periodically send an acquisition instruction to the second application to acquire synchronization data from the second application periodically.
  • S601-S609 are the processes of establishing a subscription relationship based on subscription parameters, and the synchronization process of synchronizing data will be described in detail below.
  • the synchronization process of synchronizing data may include the following S610-S616:
  • the second application sends synchronization data to the second bus service.
  • the second application can actively send the new synchronization data to the second bus service when generating new synchronization data, so that the newly generated synchronization data can be fed back to the second bus service in time.
  • the first device improves data synchronization efficiency.
  • the second bus service receives the synchronization data from the second application, and sends the synchronization data to the second SensorHub.
  • the second AP may enter a sleep state.
  • the second SensorHub receives the synchronization data from the second bus service, and sends the synchronization data to the first SensorHub.
  • the first bus service sends a synchronization command to the first SensorHub.
  • the synchronization instruction is used to acquire synchronization data from the second device.
  • the first SensorHub may send synchronization data to the first processor according to the synchronization instruction.
  • the first SensorHub if the first SensorHub detects that the first AP is in a working state, the first SensorHub sends synchronization data to the first bus service.
  • the first bus service receives the synchronization data from the first SensorHub, and sends the synchronization data to the first application.
  • the first application program outputs the synchronization data.
  • the second device since the second SensorHub, the second bus service and the second application have all received the subscription parameters from the first device, when the second device generates synchronous data subsequently, it can directly Feedback to the first device according to the subscription parameter, that is, a subscription relationship has been established between the first device and the second device based on the subscription parameter. That is to say, when data synchronization is performed between the first device and the second device, the above-mentioned S601-S609 are first performed, and after the subscription relationship between the first device and the second device is established, the second application of the second device follows. When new synchronization data is generated in the program, S610-S616 can be directly executed (it is not necessary to execute S601-S609 again) to efficiently synchronize data.
  • S604 may refer to S502-6, and S605 may refer to Refer to S502-8 for S606, refer to S502-7 for S609, refer to S502-9 for S609, refer to S503-2 for S613, refer to S503-1 for S614, etc., which will not be repeated here.
  • Table 1 shows the power consumption of the mobile phone in the same test process of different scenarios and different modules in the laboratory.
  • Table 1 is collected from a mobile phone of a certain brand with a broadcast cycle of 1 second and a scanning duty cycle of 10% (2.3 mA).
  • the test time of the mobile phone of a certain brand is 10 minutes, an average of 6 seconds to receive a broadcast, and an average wake-up of a broadcast AP time 3.5 seconds.
  • the power consumption value of "AP power consumption increment” is much larger than that of "SensorHub power consumption increment".
  • the test time of the mobile phone is 10 minutes, and an average of 6 seconds to receive a broadcast
  • the average time to wake up the AP for one broadcast is 3.5 seconds
  • the "machine power consumption” during this period is 34 mA
  • the power consumption value of "AP power consumption increment” is 24.35 mA
  • the power consumption value of "SensorHub power consumption increment” is only 0.008 mA.
  • the method of "using the data synchronizer to complete the data synchronization function without the participation of the processor” can greatly reduce the power consumption of the device, and the device does not need to wake up the AP frequently, that is, the data synchronization method provided by the embodiment of the present application can reduce the power consumption of the device Power consumption when synchronizing data between devices. Furthermore, since the communication connection between the devices does not need to be re-established, and the data transmission speed between the AP and the SensorHub is fast, the method provided by the embodiment of the present application can also improve the data synchronization efficiency.
  • the operating voltage of the SensorHub can be 0.75V (volts)
  • the operating current of the SensorHub can be 11 mA
  • the battery voltage can be 3.8V
  • the empirical value of the transmission loss rate can be 0.58.
  • the battery terminal current value of SensorHub can be calculated to be 3.74 mA, while the operating current required by the existing data synchronization technology is 49 mA.
  • the embodiment of the present application can reduce the power consumption of the first device and the second device, and improve the data synchronization efficiency.
  • the data synchronization function of the first device can be completed by the first data synchronizer, and the data synchronization function of the second device can be completed by the second data synchronization function.
  • Synchronizer to complete that is, the data synchronization function can be completed by the data synchronizer, and does not require the participation of the processor.
  • the first data synchronizer can receive synchronization data from the second data synchronizer in real time, and even if the second processor is in a sleep state, the second data synchronizer can also Send synchronization data to the first device.
  • the embodiments of the present application can reduce the power consumption of the first device and the second device, and improve the data synchronization efficiency.
  • the data synchronization method provided by the embodiments of the present application has been described in detail above with reference to FIGS. 5 to 6 .
  • a communication apparatus for executing the data synchronization method provided by the embodiments of the present application will be described in detail below with reference to FIGS. 7 to 9 .
  • FIG. 7 is a first structural schematic diagram of a communication apparatus provided by an embodiment of the present application.
  • the communication apparatus 700 includes: a first processor 701 and a first data synchronizer 702 .
  • FIG. 7 only shows the main components of the communication device.
  • the communication apparatus 700 may be applied to the wireless communication system shown in FIG. 2 to perform the function of the first device in the data synchronization method shown in FIG. 5 or FIG. 6 .
  • the first data synchronizer 702 is configured to receive synchronization data from the second device and send the synchronization data to the first processor 701 .
  • the first data synchronizer 702 is configured to receive synchronization data from the second device when the first processor 701 is in a dormant state, and send synchronization data to the first device when the first processor 701 is in a working state.
  • Processor 701 sends synchronization data.
  • the first data synchronizer 702 is configured to send synchronization data to the first processor 701 if it is detected that the first processor 701 is in a working state.
  • the first data synchronizer 702 is configured to receive a synchronization instruction from the first processor 701, and send synchronization data to the first processor 701 according to the synchronization instruction.
  • the synchronization instruction is used to obtain synchronization data from the second device.
  • the first data synchronizer 702 is further configured to actively wake up the first processor if it is detected that the first processor 701 is in a sleep state before sending the synchronization data to the first processor 701 701.
  • the first data synchronizer 702 is further configured to receive the subscription parameters from the first processor 701 and send the subscription parameters to the second device.
  • the subscription parameter is used for the communication apparatus 700 to obtain synchronization data from the second device.
  • the first processor 701 is further configured to output synchronization data.
  • the first data synchronizer 702 may include a receiver and a transmitter (not shown in FIG. 7 ).
  • the first data synchronizer 702 is used to implement the sending function and the receiving function of the communication device 700 .
  • the communication apparatus 700 may further include a memory (not shown in FIG. 7 ), which stores programs or instructions.
  • the communication apparatus 700 can execute the function of the first device in the data synchronization method shown in any one of FIGS. 5-6 .
  • the first processor 701 involved in the communication apparatus 700 may be implemented by a processor or a processor-related circuit component, and may be a processor or a processing unit; the first data synchronizer 702 may be a transceiver or a transceiver-related circuit component The implementation can be a transceiver or a transceiver unit.
  • the communication device 700 may be a terminal device or a network device, or a chip (system) or other components or components that can be provided in the terminal device or the network device, or a device including the terminal device or the network device, This application does not limit this.
  • FIG. 8 is a second schematic structural diagram of a communication apparatus provided by an embodiment of the present application.
  • the communication apparatus 800 includes: a second processor 801 and a second data synchronizer 802 .
  • FIG. 8 only shows the main components of the communication device 800 .
  • the communication apparatus 800 can be applied to the wireless communication system shown in FIG. 2 to perform the function of the second device in the data synchronization method shown in FIG. 5 or FIG. 6 .
  • the second data synchronizer 802 is configured to receive synchronization data from the second processor 801 and send the synchronization data to the first device.
  • the second data synchronizer 802 is configured to send synchronization data to the first device when the second processor 801 is in a sleep state.
  • the second data synchronizer 802 is configured to send synchronization data to the first device according to the subscription parameters.
  • the subscription parameter is used by the first device to obtain synchronization data from the communication apparatus 800 .
  • the second data synchronizer 802 is further configured to receive the subscription parameters from the first device before sending the synchronization data to the first device according to the subscription parameters.
  • the second data synchronizer 802 is further configured to send the subscription parameters to the second processor 801 after receiving the subscription parameters from the first device.
  • the second data synchronizer 802 is further configured to send the synchronization data to the first device according to the subscription parameters if synchronization data is stored before sending the subscription parameters to the second processor 801 .
  • the second data synchronizer 802 is further configured to wake up the second processor 801 if the second processor 801 is in a dormant state before sending the subscription parameters to the second processor 801; or, the second data synchronizer 802 is further configured to wait for the second processor 801 to wake up if the second processor 801 is in a dormant state before sending the subscription parameters to the second processor 801 .
  • the second processor 801 is further configured to receive the subscription parameters from the second data synchronizer 802, obtain the synchronization data generated by the application according to the subscription parameters, and send the data to the second data synchronizer. 802 Send synchronization data.
  • the second data synchronizer 802 may also be referred to as a transceiver.
  • the transceiver may include a receiver and a transmitter (not shown in Figure 8).
  • the transceiver is used to implement the sending function and the receiving function of the communication device 800 .
  • the communication device 800 may further include a memory (not shown in FIG. 8 ), which stores programs or instructions.
  • the communication apparatus 800 can perform the function of the second device in the data synchronization method shown in any one of FIGS. 5-6 .
  • the second processor 801 involved in the communication apparatus 800 may be implemented by a processor or a processor-related circuit component, and may be a processor or a processing unit; the second data synchronizer 802 may be a transceiver or a transceiver-related circuit component The implementation can be a transceiver or a transceiver unit.
  • the communication apparatus 800 may be a terminal device or a network device, or a chip (system) or other components or components that can be provided in the terminal device or the network device, or may be a device including the terminal device or the network device, This application does not limit this.
  • FIG. 9 is a third schematic structural diagram of a communication apparatus provided by an embodiment of the present application.
  • the communication device may be a terminal device or a network device, or may be a chip (system) or other components or assemblies that can be provided in the terminal device or the network device.
  • the communication apparatus 900 may include a processor 901 .
  • the communication device 900 may further include a memory 902 and/or a transceiver 903 .
  • the processor 901 is coupled with the memory 902 and the transceiver 903, such as can be connected through a communication bus.
  • Each component of the communication device 900 will be described in detail below with reference to FIG. 9 :
  • the processor 901 is the control center of the communication device 900, which may be one processor or a general term for multiple processing elements.
  • the processor 901 is one or more central processing units (CPUs), may also be a specific integrated circuit (application specific integrated circuit, ASIC), or is configured to implement one or more of the embodiments of the present application
  • An integrated circuit such as: one or more microprocessors (digital signal processor, DSP), or, one or more field programmable gate array (field programmable gate array, FPGA).
  • the processor 901 may execute various functions of the communication device 900 by running or executing software programs stored in the memory 902 and calling data stored in the memory 902 .
  • the processor 901 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG. 9 .
  • the communication apparatus 900 may also include multiple processors, for example, the processor 901 and the processor 904 shown in FIG. 9 .
  • processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU).
  • a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
  • the memory 902 is used to store the software program for executing the solution of the present application, and is controlled and executed by the processor 901.
  • the memory 902 is used to store the software program for executing the solution of the present application, and is controlled and executed by the processor 901.
  • the processor 901. For the specific implementation, reference may be made to the above method embodiments, which will not be repeated here.
  • memory 902 may be read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM), or other types of static storage devices that can store information and instructions.
  • ROM read-only memory
  • RAM random access memory
  • Other types of dynamic storage devices for instructions which may also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM), or other optical disks storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), magnetic disk storage medium or other magnetic storage device, or capable of carrying or storing desired program code in the form of instructions or data structures and any other medium that can be accessed by a computer, but is not limited thereto.
  • the memory 902 may be integrated with the processor 901, or may exist independently, and be coupled to the processor 901 through an interface circuit (not shown in FIG. 9) of the communication device 900, which is not specifically limited in this embodiment of the present application.
  • the transceiver 903 is used for communication with other communication devices.
  • the communication apparatus 900 is a terminal device, and the transceiver 903 may be used to communicate with a network device or communicate with another terminal device.
  • the communication apparatus 900 is a network device, and the transceiver 903 can be used to communicate with a terminal device or communicate with another network device.
  • transceiver 903 may include a receiver and a transmitter (not shown separately in FIG. 9). Among them, the receiver is used to realize the receiving function, and the transmitter is used to realize the sending function.
  • the transceiver 903 may be integrated with the processor 901, or may exist independently, and be coupled to the processor 901 through an interface circuit (not shown in FIG. 9 ) of the communication device 900, which is not made in this embodiment of the present application Specific restrictions.
  • the structure of the communication device 900 shown in FIG. 9 does not constitute a limitation on the communication device, and an actual communication device may include more or less components than those shown in the figure, or combine some components, or Different component arrangements.
  • An embodiment of the present application further provides a chip system, including: a processor, where the processor is coupled with a memory, the memory is used to store a program or an instruction, and when the program or instruction is executed by the processor, the The chip system implements the method in any of the foregoing method embodiments.
  • the number of processors in the chip system may be one or more.
  • the processor can be implemented by hardware or by software.
  • the processor may be a logic circuit, an integrated circuit, or the like.
  • the processor may be a general-purpose processor implemented by reading software codes stored in memory.
  • the memory may be integrated with the processor, or may be provided separately from the processor, which is not limited in this application.
  • the memory can be a non-transitory processor, such as a read-only memory ROM, which can be integrated with the processor on the same chip, or can be provided on different chips.
  • the setting method of the processor is not particularly limited.
  • the system-on-chip may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), or a system on chip (SoC), It can also be a central processing unit (CPU), a network processor (NP), a digital signal processing circuit (DSP), or a microcontroller (microcontroller).
  • controller unit, MCU it can also be a programmable logic device (PLD) or other integrated chips.
  • Embodiments of the present application provide a communication system.
  • the communication system includes the above-mentioned first device and second device.
  • processors in the embodiments of the present application may be a central processing unit (central processing unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (digital signal processors, DSP), dedicated integrated Circuit (application specific integrated circuit, ASIC), off-the-shelf programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the memory in the embodiments of the present application may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically programmable Erase programmable read-only memory (electrically EPROM, EEPROM) or flash memory.
  • Volatile memory may be random access memory (RAM), which acts as an external cache.
  • RAM random access memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • SDRAM synchronous dynamic random access memory
  • DDR SDRAM double data rate synchronous dynamic random access memory
  • enhanced SDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous connection dynamic random access memory Fetch memory
  • direct memory bus random access memory direct rambus RAM, DR RAM
  • the above embodiments may be implemented in whole or in part by software, hardware (eg, circuits), firmware, or any other combination.
  • the above-described embodiments may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated.
  • the computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server, or data center Transmission to another website site, computer, server or data center by wire (eg, infrared, wireless, microwave, etc.).
  • the computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that contains one or more sets of available media.
  • the usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media.
  • the semiconductor medium may be a solid state drive.
  • At least one means one or more, and “plurality” means two or more.
  • At least one item(s) below” or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s).
  • at least one (a) of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c may be single or multiple .
  • the size of the sequence numbers of the above-mentioned processes does not mean the sequence of execution, and the execution sequence of each process should be determined by its functions and internal logic, and should not be dealt with in the embodiments of the present application. implementation constitutes any limitation.
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium.
  • the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution, and the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

Provided by the present application are a data synchronization method and device, which can solve the problems of low efficiency and high device power consumption of existing data synchronization technology, improve data synchronization efficiency, and reduce device power consumption, and can be applied to a wireless communication system, such as a low-power Bluetooth communication system, a wireless fidelity system, etc. The method comprises: a first data synchronizer receives synchronization data from a second device, and sends the synchronization data to a first processor. A data synchronization function of a first device may be achieved by the first data synchronizer, so that even if the first processor is in a dormant state, the first data synchronizer may also receive the synchronization data from the second device in real time. Similarly, even if a second processor is in a dormant state, a second data synchronizer may also send the synchronization data to the first device. That is, the data synchronization function may be achieved by the data synchronizers, and the processors are not required to participate, so that the power consumption of the first device and the second device may be reduced, and the data synchronization efficiency may be improved.

Description

数据同步方法及装置Data synchronization method and device
本申请要求于2020年10月31日提交国家知识产权局、申请号为202011198816.1、申请名称为“数据同步方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202011198816.1 and the application name "Data Synchronization Method and Apparatus" filed with the State Intellectual Property Office on October 31, 2020, the entire contents of which are incorporated into this application by reference.
技术领域technical field
本申请涉及数据同步领域,尤其涉及一种数据同步方法及装置。The present application relates to the field of data synchronization, and in particular, to a data synchronization method and device.
背景技术Background technique
目前,设备与设备之间可以进行数据的同步,以共享数据。例如,手机将最新的快递信息同步给电视,或者电视将最新的剧集观看记录同步给手机。Currently, data synchronization can be performed between devices to share data. For example, the mobile phone synchronizes the latest express information to the TV, or the TV synchronizes the latest episode viewing records to the mobile phone.
但是,设备与设备之间在进行数据的同步时,设备的应用处理器(application processor,AP)必须处于工作状态(即唤醒状态)下,才能实现数据的同步。这会导致在进行数据的同步时,设备消耗大量时间频繁地唤醒AP、建立设备之间的通信连接。因此,现有的数据同步技术存在着效率低下、设备功耗高的问题。However, when synchronizing data between devices, an application processor (application processor, AP) of the device must be in a working state (ie, a wake-up state) to achieve data synchronization. This will cause the device to spend a lot of time frequently waking up the AP and establishing a communication connection between the devices when synchronizing data. Therefore, the existing data synchronization technology has the problems of low efficiency and high device power consumption.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种数据同步方法及装置,能够解决现有的数据同步技术效率低下、设备功耗高的问题,从而提高数据同步效率、降低设备功耗。The embodiments of the present application provide a data synchronization method and apparatus, which can solve the problems of low efficiency and high device power consumption of the existing data synchronization technology, thereby improving data synchronization efficiency and reducing device power consumption.
为达到上述目的,本申请采用如下技术方案:To achieve the above object, the application adopts the following technical solutions:
第一方面,提供一种数据同步方法。该方法应用于第一设备。其中,第一设备包括第一数据同步器和第一处理器。该方法包括:第一数据同步器接收来自第二设备的同步数据,并向第一处理器发送同步数据。In a first aspect, a data synchronization method is provided. The method is applied to the first device. Wherein, the first device includes a first data synchronizer and a first processor. The method includes: the first data synchronizer receives synchronization data from the second device, and sends the synchronization data to the first processor.
基于第一方面和下述第二方面所述的数据同步方法,第一设备的数据同步功能可以由第一数据同步器来完成,第二设备的数据同步功能可以由第二数据同步器来完成,即数据同步功能可以由数据同步器完成,且不需要处理器参与。如此,可以实现即使第一处理器处于休眠状态,第一数据同步器也可以从第二数据同步器实时地接收同步数据,并且即使第二处理器处于进入休眠状态,第二数据同步器也可以向第一设备发送同步数据。进而,本申请可以降低第一设备和第二设备的功耗,且提高数据同步效率。Based on the data synchronization method described in the first aspect and the following second aspect, the data synchronization function of the first device can be completed by the first data synchronizer, and the data synchronization function of the second device can be completed by the second data synchronizer , that is, the data synchronization function can be completed by the data synchronizer without the involvement of the processor. In this way, even if the first processor is in a sleep state, the first data synchronizer can receive synchronization data from the second data synchronizer in real time, and even if the second processor is in a sleep state, the second data synchronizer can also Send synchronization data to the first device. Furthermore, the present application can reduce the power consumption of the first device and the second device, and improve the data synchronization efficiency.
一种可能的设计方案中,上述第一数据同步器接收来自第二设备的同步数据,并向第一处理器发送同步数据,可以包括:在第一处理器处于休眠状态下,第一数据同步器接收来自第二设备的同步数据,并在第一处理器处于工作状态下向第一处理器发送同步数据。第一设备在接收第二设备发送的同步数据过程中,在第一处理器处于休眠状态下,由第一数据同步器接收来自第二设备的同步数据。如此,更能够降低设备的功耗,延长设备的使用时间,提升用户体验。In a possible design solution, the above-mentioned first data synchronizer receives the synchronization data from the second device, and sends the synchronization data to the first processor, which may include: when the first processor is in a dormant state, the first data synchronization is performed. The processor receives the synchronization data from the second device, and sends the synchronization data to the first processor when the first processor is in a working state. During the process of receiving the synchronization data sent by the second device, the first device receives the synchronization data from the second device by the first data synchronizer when the first processor is in a sleep state. In this way, the power consumption of the device can be further reduced, the use time of the device can be prolonged, and the user experience can be improved.
可选地,上述第一数据同步器向第一处理器发送同步数据,可以包括:若第一数 据同步器检测到第一处理器处于工作状态,则第一数据同步器向第一处理器发送同步数据。如此,在第一处理器唤醒时,第一数据同步器可以及时将同步数据发送给第一处理器,减少数据同步时间,进一步提高数据同步效率。Optionally, the above-mentioned first data synchronizer sending synchronization data to the first processor may include: if the first data synchronizer detects that the first processor is in a working state, sending the first data synchronizer to the first processor Synchronous Data. In this way, when the first processor wakes up, the first data synchronizer can send the synchronization data to the first processor in time, thereby reducing the data synchronization time and further improving the data synchronization efficiency.
或者,可选地,上述第一数据同步器向第一处理器发送同步数据,可以包括:第一数据同步器接收来自第一处理器的同步指令,并根据同步指令向第一处理器发送同步数据。其中,同步指令用于获取来自第二设备的同步数据。如此,第一处理器可以向第一数据同步器发送同步指令,进而主动地从第一数据同步器处获取到来自第二设备的同步数据,提高数据同步的可靠性。Or, optionally, the above-mentioned first data synchronizer sending synchronization data to the first processor may include: the first data synchronizer receiving a synchronization instruction from the first processor, and sending synchronization instructions to the first processor according to the synchronization instruction data. The synchronization instruction is used to obtain synchronization data from the second device. In this way, the first processor can send a synchronization instruction to the first data synchronizer, and then actively acquire the synchronization data from the second device from the first data synchronizer, thereby improving the reliability of data synchronization.
另一种可能的设计方案中,在上述第一数据同步器向第一处理器发送同步数据之前,第一方面所述的方法还可以包括:若第一数据同步器检测到第一处理器处于休眠状态,则第一数据同步器主动唤醒第一处理器。如此,在第一处理器休眠时,第一数据同步器可以主动唤醒第一处理器,并向第一处理器快速及时地发送同步数据,从而进一步提高数据同步效率。In another possible design solution, before the first data synchronizer sends the synchronization data to the first processor, the method described in the first aspect may further include: if the first data synchronizer detects that the first processor is in In the sleep state, the first data synchronizer actively wakes up the first processor. In this way, when the first processor sleeps, the first data synchronizer can actively wake up the first processor and send synchronization data to the first processor in a fast and timely manner, thereby further improving data synchronization efficiency.
又一种可能的设计方案中,第一方面所述的方法还可以包括:第一数据同步器接收来自第一处理器的订阅参数,并向第二设备发送订阅参数。其中,订阅参数用于第一设备获取来自第二设备的同步数据。如此,第二设备可以根据第一设备的需求提供同步数据,即第一设备可以定制同步数据,以减少不必要的数据同步操作,从而进一步提高数据同步效率。In another possible design solution, the method described in the first aspect may further include: the first data synchronizer receives the subscription parameters from the first processor, and sends the subscription parameters to the second device. The subscription parameter is used by the first device to obtain synchronization data from the second device. In this way, the second device can provide synchronization data according to the requirements of the first device, that is, the first device can customize the synchronization data to reduce unnecessary data synchronization operations, thereby further improving data synchronization efficiency.
再一种可能的设计方案中,第一方面所述的方法还可以包括:第一处理器输出同步数据,如此,第一设备可以提醒用户查看第一处理器输出的同步数据,以便用户根据同步数据确定下一步操作,进而提升用户体验。例如,第一处理器可以控制第一设备的显示器显示同步数据,或者控制第一设备的扬声器播放同步数据。In another possible design solution, the method described in the first aspect may further include: the first processor outputs synchronization data, so that the first device can remind the user to check the synchronization data output by the first processor, so that the user can check the synchronization data according to the synchronization data. The data determines the next action to improve the user experience. For example, the first processor may control the display of the first device to display the synchronization data, or control the speaker of the first device to play the synchronization data.
第二方面,提供一种数据同步方法。该方法应用于第二设备。其中,第二设备包括第二数据同步器和第二处理器。该方法包括:第二数据同步器接收来自第二处理器的同步数据,并向第一设备发送同步数据。In a second aspect, a data synchronization method is provided. The method is applied to the second device. Wherein, the second device includes a second data synchronizer and a second processor. The method includes: the second data synchronizer receives synchronization data from the second processor, and sends the synchronization data to the first device.
一种可能的设计方案中,上述第二数据同步器向第一设备发送同步数据,可以包括:在第二处理器处于休眠状态下,第二数据同步器向第一设备发送同步数据。第二设备在将同步数据发送给第一设备的过程中,第二处理器将同步数据发送给第二数据同步器后即可进入休眠状态,并在第二处理器处于休眠状态下,由第二数据同步器向第一设备发送同步数据。如此,更能够降低设备的功耗,延长设备的使用时间,提升用户体验。In a possible design solution, the above-mentioned second data synchronizer sending synchronization data to the first device may include: when the second processor is in a sleep state, the second data synchronizer sending synchronization data to the first device. In the process of sending the synchronization data to the first device by the second device, the second processor can enter the sleep state after sending the synchronization data to the second data synchronizer, and when the second processor is in the sleep state, the second processor is in the sleep state. The second data synchronizer sends synchronization data to the first device. In this way, the power consumption of the device can be further reduced, the use time of the device can be prolonged, and the user experience can be improved.
可选地,上述第二数据同步器向第一设备发送同步数据,可以包括:第二数据同步器根据订阅参数向第一设备发送同步数据。其中,订阅参数用于第一设备获取来自第二设备的同步数据。Optionally, the above-mentioned second data synchronizer sending synchronization data to the first device may include: the second data synchronizer sending synchronization data to the first device according to a subscription parameter. The subscription parameter is used by the first device to obtain synchronization data from the second device.
进一步地,在第二数据同步器根据订阅参数向第一设备发送同步数据之前,第二方面所述的方法还可以包括:第二数据同步器接收来自第一设备的订阅参数。Further, before the second data synchronizer sends the synchronization data to the first device according to the subscription parameters, the method of the second aspect may further include: the second data synchronizer receives the subscription parameters from the first device.
进一步地,在第二数据同步器接收来自第一设备的订阅参数之后,第二方面所述的方法还可以包括:第二数据同步器向第二处理器发送订阅参数。Further, after the second data synchronizer receives the subscription parameters from the first device, the method described in the second aspect may further include: the second data synchronizer sends the subscription parameters to the second processor.
进一步地,在第二数据同步器向第二处理器发送订阅参数之前,第二方面所述的 方法还可以包括:若第二数据同步器存储有同步数据,第二数据同步器根据订阅参数向第一设备发送同步数据。如此,第二数据同步器可以及时将同步数据发送给第一设备,减少数据同步时间,进一步提高数据同步效率。Further, before the second data synchronizer sends the subscription parameters to the second processor, the method described in the second aspect may further include: if the second data synchronizer stores synchronization data, the second data synchronizer sends the subscription parameters to the second processor according to the subscription parameters. The first device sends synchronization data. In this way, the second data synchronizer can send the synchronization data to the first device in time, thereby reducing the data synchronization time and further improving the data synchronization efficiency.
进一步地,在第二数据同步器向第二处理器发送订阅参数之前,第二方面所述的方法还可以包括如下之一:若第二处理器处于休眠状态,则第二数据同步器唤醒第二处理器;或者,若第二处理器处于休眠状态,则第二数据同步器等待第二处理器唤醒。如此,若第二数据同步器主动唤醒第二处理器,则第二数据同步器可以及时将订阅参数发送给第二处理器,以使得第二设备及时地将同步数据反馈给第一设备,进一步提高数据同步效率。若第二数据同步器等待第二处理器唤醒,则可以减少第二处理器的唤醒频率,进一步降低设备功耗。Further, before the second data synchronizer sends the subscription parameters to the second processor, the method described in the second aspect may further include one of the following: if the second processor is in a dormant state, the second data synchronizer wakes up the first two processors; or, if the second processor is in a dormant state, the second data synchronizer waits for the second processor to wake up. In this way, if the second data synchronizer actively wakes up the second processor, the second data synchronizer can send the subscription parameters to the second processor in time, so that the second device can timely feed back the synchronization data to the first device, and further Improve data synchronization efficiency. If the second data synchronizer waits for the second processor to wake up, the wake-up frequency of the second processor can be reduced, thereby further reducing the power consumption of the device.
另一种可能的设计方案中,第二方面所述的方法还可以包括:第二处理器接收到来自第二数据同步器的订阅参数,并根据订阅参数获取应用程序生成的同步数据,以及向第二数据同步器发送同步数据。如此,第二设备可以及时将应用程序生成的同步数据发送给第一设备,以进一步提高数据同步效率。In another possible design solution, the method described in the second aspect may further include: the second processor receives the subscription parameters from the second data synchronizer, obtains the synchronization data generated by the application according to the subscription parameters, and sends The second data synchronizer sends synchronization data. In this way, the second device can send the synchronization data generated by the application to the first device in time, so as to further improve the data synchronization efficiency.
此外,第二方面所述的数据同步方法的技术效果可以参考第一方面所述的数据同步方法的技术效果,此处不再赘述。In addition, for the technical effect of the data synchronization method described in the second aspect, reference may be made to the technical effect of the data synchronization method described in the first aspect, which will not be repeated here.
第三方面,提供一种通信装置。该装置包括第一数据同步器和第一处理器。其中,第一数据同步器,用于接收来自第二设备的同步数据,并向第一处理器发送同步数据。In a third aspect, a communication device is provided. The apparatus includes a first data synchronizer and a first processor. The first data synchronizer is configured to receive synchronization data from the second device and send the synchronization data to the first processor.
一种可能的设计方案中,第一数据同步器,用于在第一处理器处于休眠状态下接收来自第二设备的同步数据,并在第一处理器处于工作状态下向第一处理器发送同步数据。In a possible design solution, the first data synchronizer is configured to receive synchronization data from the second device when the first processor is in a sleep state, and send synchronization data to the first processor when the first processor is in a working state. Synchronous Data.
可选地,第一数据同步器,用于若检测到第一处理器处于工作状态,则向第一处理器发送同步数据。Optionally, the first data synchronizer is configured to send synchronization data to the first processor if it is detected that the first processor is in a working state.
或者,可选地,第一数据同步器,用于接收来自第一处理器的同步指令,并根据同步指令向第一处理器发送同步数据。其中,同步指令用于获取来自第二设备的同步数据。Or, optionally, the first data synchronizer is configured to receive a synchronization instruction from the first processor, and send synchronization data to the first processor according to the synchronization instruction. The synchronization instruction is used to obtain synchronization data from the second device.
另一种可能的设计方案中,第一数据同步器,还用于在向第一处理器发送同步数据之前,若检测到第一处理器处于休眠状态,则主动唤醒第一处理器。In another possible design solution, the first data synchronizer is further configured to actively wake up the first processor if it is detected that the first processor is in a sleep state before sending the synchronization data to the first processor.
又一种可能的设计方案中,第一数据同步器,还用于接收来自第一处理器的订阅参数,并向第二设备发送订阅参数。其中,订阅参数用于第三方面所述的通信装置获取来自第二设备的同步数据。In another possible design solution, the first data synchronizer is further configured to receive subscription parameters from the first processor and send the subscription parameters to the second device. Wherein, the subscription parameter is used for the communication apparatus described in the third aspect to acquire synchronization data from the second device.
再一种可能的设计方案中,第一处理器,还用于输出同步数据。In another possible design solution, the first processor is further configured to output synchronization data.
可选地,上述第一数据同步器可以包括接收器和发送器。其中,第一数据同步器用于实现第三方面所述的通信装置的发送功能和接收功能。Optionally, the above-mentioned first data synchronizer may include a receiver and a transmitter. Wherein, the first data synchronizer is used to implement the sending function and the receiving function of the communication device described in the third aspect.
可选地,第三方面所述的通信装置还可以包括存储器,该存储器存储有程序或指令。当第一数据同步器、第一处理器执行该程序或指令时,使得第三方面所述的通信装置可以执行第一方面所述的数据同步方法。Optionally, the communication apparatus described in the third aspect may further include a memory, where the memory stores programs or instructions. When the first data synchronizer and the first processor execute the program or the instruction, the communication apparatus described in the third aspect can execute the data synchronization method described in the first aspect.
需要说明的是,第三方面所述的通信装置可以是终端设备或网络设备,也可以是可设置于终端设备或网络设备中的芯片(系统)或其他部件或组件,还可以是包含终 端设备或网络设备的装置,本申请对此不做限定。It should be noted that the communication device described in the third aspect may be terminal equipment or network equipment, or may be a chip (system) or other components or components that can be set in the terminal equipment or network equipment, or may include terminal equipment or a device of a network device, which is not limited in this application.
此外,第三方面所述的通信装置的技术效果可以参考第一方面所述的数据同步方法的技术效果,此处不再赘述。In addition, for the technical effect of the communication device described in the third aspect, reference may be made to the technical effect of the data synchronization method described in the first aspect, and details are not described herein again.
第四方面,提供一种通信装置。该装置包括第二数据同步器和第二处理器。其中,第二数据同步器,用于接收来自第二处理器的同步数据,并向第一设备发送同步数据。In a fourth aspect, a communication device is provided. The apparatus includes a second data synchronizer and a second processor. The second data synchronizer is configured to receive synchronization data from the second processor and send the synchronization data to the first device.
一种可能的设计方案中,第二数据同步器,用于在第二处理器处于休眠状态下,向第一设备发送同步数据。In a possible design solution, the second data synchronizer is configured to send synchronization data to the first device when the second processor is in a sleep state.
可选地,第二数据同步器,用于根据订阅参数向第一设备发送同步数据。其中,订阅参数用于第一设备获取来自第四方面所述的通信装置的同步数据。Optionally, the second data synchronizer is configured to send synchronization data to the first device according to the subscription parameter. Wherein, the subscription parameter is used by the first device to obtain synchronization data from the communication apparatus described in the fourth aspect.
进一步地,第二数据同步器,还用于在根据订阅参数向第一设备发送同步数据之前,接收来自第一设备的订阅参数。Further, the second data synchronizer is further configured to receive the subscription parameters from the first device before sending the synchronization data to the first device according to the subscription parameters.
进一步地,第二数据同步器,还用于在接收来自第一设备的订阅参数之后,向第二处理器发送订阅参数。Further, the second data synchronizer is further configured to send the subscription parameters to the second processor after receiving the subscription parameters from the first device.
进一步地,第二数据同步器,还用于在向第二处理器发送订阅参数之前,若存储有同步数据,则根据订阅参数向第一设备发送同步数据。Further, the second data synchronizer is further configured to send the synchronization data to the first device according to the subscription parameters if synchronization data is stored before sending the subscription parameters to the second processor.
进一步地,第二数据同步器,还用于在向第二处理器发送订阅参数之前,若第二处理器处于休眠状态,则唤醒第二处理器;或者,第二数据同步器,还用于在向第二处理器发送订阅参数之前,若第二处理器处于休眠状态,则等待第二处理器唤醒。Further, the second data synchronizer is further configured to wake up the second processor if the second processor is in a dormant state before sending the subscription parameters to the second processor; or, the second data synchronizer is further configured to Before sending the subscription parameters to the second processor, if the second processor is in a dormant state, wait for the second processor to wake up.
另一种可能的设计方案中,第二处理器,还用于接收到来自第二数据同步器的订阅参数,并根据订阅参数获取应用程序生成的同步数据,以及向第二数据同步器发送同步数据。In another possible design solution, the second processor is further configured to receive subscription parameters from the second data synchronizer, obtain synchronization data generated by the application according to the subscription parameters, and send synchronization data to the second data synchronizer data.
可选地,上述第二数据同步器也可以称为收发器。该收发器可以包括接收器和发送器。其中,收发器用于实现第四方面所述的通信装置的发送功能和接收功能。Optionally, the above-mentioned second data synchronizer may also be referred to as a transceiver. The transceiver may include a receiver and a transmitter. Wherein, the transceiver is used to implement the sending function and the receiving function of the communication device described in the fourth aspect.
可选地,第四方面所述的通信装置还可以包括存储器,该存储器存储有程序或指令。当第二数据同步器、第二处理器执行该程序或指令时,使得第四方面所述的通信装置可以执行第二方面所述的数据同步方法。Optionally, the communication apparatus described in the fourth aspect may further include a memory, where the memory stores programs or instructions. When the second data synchronizer and the second processor execute the program or instruction, the communication apparatus described in the fourth aspect can execute the data synchronization method described in the second aspect.
需要说明的是,第四方面所述的通信装置可以是终端设备或网络设备,也可以是可设置于终端设备或网络设备中的芯片(系统)或其他部件或组件,还可以是包含终端设备或网络设备的装置,本申请对此不做限定。It should be noted that the communication device described in the fourth aspect may be terminal equipment or network equipment, or may be a chip (system) or other components or components that can be set in the terminal equipment or network equipment, or may include terminal equipment or a device of a network device, which is not limited in this application.
此外,第四方面所述的通信装置的技术效果可以参考第二方面所述的数据同步方法的技术效果,此处不再赘述。In addition, for the technical effect of the communication device described in the fourth aspect, reference may be made to the technical effect of the data synchronization method described in the second aspect, which will not be repeated here.
第五方面,提供一种通信装置。该通信装置用于执行第一方面至第二方面中任意一种实现方式所述的数据同步方法。In a fifth aspect, a communication device is provided. The communication apparatus is configured to execute the data synchronization method described in any one of the implementation manners of the first aspect to the second aspect.
在本申请中,第五方面所述的通信装置可以为第一方面中所述的第一设备或第二方面中所述的第二设备,或者可设置于该第一设备或第二设备中的芯片(系统)或其他部件或组件,或者包含该第一设备或第二设备的装置。In this application, the communication device described in the fifth aspect may be the first device described in the first aspect or the second device described in the second aspect, or may be provided in the first device or the second device a chip (system) or other component or assembly, or an apparatus containing the first device or the second device.
应理解,第五方面所述的通信装置包括实现上述第一方面,第二方面中任一方面所述的数据同步方法相应的模块、单元、或手段(means),该模块、单元、或手段可以通过硬件实现,软件实现,或者通过硬件执行相应的软件实现。该硬件或软件包括 一个或多个用于执行上述数据同步方法所涉及的功能的模块或单元。It should be understood that the communication device described in the fifth aspect includes a corresponding module, unit, or means for implementing the data synchronization method described in any one of the first aspect and the second aspect. The module, unit, or means It can be realized by hardware, software, or by executing corresponding software by hardware. The hardware or software includes one or more modules or units for performing the functions involved in the above data synchronization method.
此外,第五方面所述的通信装置的技术效果可以参考第一方面至第二方面中任一方面所述的数据同步方法的技术效果,此处不再赘述。In addition, for the technical effect of the communication apparatus described in the fifth aspect, reference may be made to the technical effect of the data synchronization method described in any one of the first aspect to the second aspect, which will not be repeated here.
第六方面,提供一种通信装置。该通信装置包括:处理器,该处理器用于执行第一方面至第二方面中任意一种可能的实现方式所述的数据同步方法。In a sixth aspect, a communication device is provided. The communication device includes: a processor, where the processor is configured to execute the data synchronization method described in any one of the possible implementation manners of the first aspect to the second aspect.
在一种可能的设计方案中,第六方面所述的通信装置还可以包括收发器。该收发器可以为收发电路或接口电路。该收发器可以用于第六方面所述的通信装置与其他通信装置通信。In a possible design solution, the communication apparatus described in the sixth aspect may further include a transceiver. The transceiver may be a transceiver circuit or an interface circuit. The transceiver can be used for the communication device described in the sixth aspect to communicate with other communication devices.
在一种可能的设计方案中,第六方面所述的通信装置还可以包括存储器。该存储器可以与处理器集成在一起,也可以分开设置。该存储器可以用于存储第一方面至第二方面中任一方面所述的数据同步方法所涉及的计算机程序和/或数据。In a possible design solution, the communication apparatus described in the sixth aspect may further include a memory. The memory can be integrated with the processor, or it can be provided separately. The memory may be used to store the computer program and/or data involved in the data synchronization method described in any one of the first aspect to the second aspect.
在本申请中,第六方面所述的通信装置可以为第一方面中的第一设备或第二方面中的第二设备,或者可设置于该第一设备或第二设备中的芯片(系统)或其他部件或组件,或者包含该第一设备或第二设备的装置。In this application, the communication device described in the sixth aspect may be the first device in the first aspect or the second device in the second aspect, or a chip (system) that may be provided in the first device or the second device ) or other parts or assemblies, or apparatus comprising the first device or the second device.
此外,第六方面所述的通信装置的技术效果可以参考第一方面至第二方面中任意一种实现方式所述的数据同步方法的技术效果,此处不再赘述。In addition, for the technical effect of the communication apparatus described in the sixth aspect, reference may be made to the technical effect of the data synchronization method described in any one of the implementation manners of the first aspect to the second aspect, and details are not described herein again.
第七方面,提供一种通信装置。该通信装置包括:处理器,该处理器与存储器耦合,该处理器用于执行存储器中存储的计算机程序,以使得该通信装置执行第一方面至第二方面中任意一种可能的实现方式所述的数据同步方法。In a seventh aspect, a communication device is provided. The communication apparatus includes: a processor, which is coupled to the memory, and the processor is configured to execute a computer program stored in the memory, so that the communication apparatus executes any one of the possible implementations of the first aspect to the second aspect. data synchronization method.
在一种可能的设计方案中,第七方面所述的通信装置还可以包括收发器。该收发器可以为收发电路或接口电路。该收发器可以用于第七方面所述的通信装置与其他通信装置通信。In a possible design solution, the communication device according to the seventh aspect may further include a transceiver. The transceiver may be a transceiver circuit or an interface circuit. The transceiver can be used for the communication device described in the seventh aspect to communicate with other communication devices.
在本申请中,第七方面所述的通信装置可以为第一方面中的第一设备或第二方面中的第二设备,或者可设置于该第一设备或第二设备中的芯片(系统)或其他部件或组件,或者包含该第一设备或第二设备的装置。In this application, the communication apparatus described in the seventh aspect may be the first device in the first aspect or the second device in the second aspect, or may be a chip (system) provided in the first device or the second device ) or other parts or assemblies, or apparatus comprising the first device or the second device.
此外,第七方面所述的通信装置的技术效果可以参考第一方面至第二方面中任意一种实现方式所述的数据同步方法的技术效果,此处不再赘述。In addition, for the technical effect of the communication device described in the seventh aspect, reference may be made to the technical effect of the data synchronization method described in any one of the implementation manners of the first aspect to the second aspect, which will not be repeated here.
第八方面,提供了一种通信装置,包括:处理器和存储器;该存储器用于存储计算机程序,当该处理器执行该计算机程序时,以使该通信装置执行第一方面至第二方面中的任意一种实现方式所述的数据同步方法。In an eighth aspect, a communication device is provided, comprising: a processor and a memory; the memory is used for storing a computer program, when the processor executes the computer program, so that the communication device executes the first to second aspects The data synchronization method described in any implementation manner of .
在一种可能的设计方案中,第八方面所述的通信装置还可以包括收发器。该收发器可以为收发电路或接口电路。该收发器可以用于第八方面所述的通信装置与其他通信装置通信。In a possible design solution, the communication apparatus described in the eighth aspect may further include a transceiver. The transceiver may be a transceiver circuit or an interface circuit. The transceiver can be used for the communication device described in the eighth aspect to communicate with other communication devices.
在本申请中,第八方面所述的通信装置可以为第一方面中的第一设备或第二方面中的第二设备,或者可设置于该第一设备或第二设备中的芯片(系统)或其他部件或组件,或者包含该第一设备或第二设备的装置。In this application, the communication apparatus described in the eighth aspect may be the first device in the first aspect or the second device in the second aspect, or a chip (system) that may be provided in the first device or the second device ) or other parts or assemblies, or apparatus comprising the first device or the second device.
此外,第八方面所述的通信装置的技术效果可以参考第一方面至第二方面中任意一种实现方式所述的数据同步方法的技术效果,此处不再赘述。In addition, for the technical effect of the communication device described in the eighth aspect, reference may be made to the technical effect of the data synchronization method described in any one of the implementation manners of the first aspect to the second aspect, which will not be repeated here.
第九方面,提供了一种通信装置,包括:处理器;所述处理器用于与存储器耦合, 并读取存储器中的计算机程序之后,根据该计算机程序执行如第一方面至第二方面中的任意一种实现方式所述的数据同步方法。In a ninth aspect, a communication device is provided, comprising: a processor; the processor is configured to be coupled to a memory, and after reading a computer program in the memory, execute the first to second aspects according to the computer program Any one of the data synchronization methods described in the implementation manner.
在一种可能的设计方案中,第九方面所述的通信装置还可以包括收发器。该收发器可以为收发电路或接口电路。该收发器可以用于第九方面所述的通信装置与其他通信装置通信。In a possible design solution, the communication device according to the ninth aspect may further include a transceiver. The transceiver may be a transceiver circuit or an interface circuit. The transceiver can be used for the communication device described in the ninth aspect to communicate with other communication devices.
在本申请中,第九方面所述的通信装置可以为第一方面中的第一设备或第二方面中的第二设备,或者可设置于该第一设备或第二设备中的芯片(系统)或其他部件或组件,或者包含该第一设备或第二设备的装置。In this application, the communication device described in the ninth aspect may be the first device in the first aspect or the second device in the second aspect, or a chip (system) that may be provided in the first device or the second device ) or other parts or assemblies, or apparatus comprising the first device or the second device.
此外,第九方面所述的通信装置的技术效果可以参考第一方面至第二方面中任意一种实现方式所述的数据同步方法的技术效果,此处不再赘述。In addition, for the technical effect of the communication apparatus described in the ninth aspect, reference may be made to the technical effect of the data synchronization method described in any one of the implementation manners of the first aspect to the second aspect, which will not be repeated here.
第十方面,提供一种处理器。其中,处理器用于执行第一方面至第二方面中任意一种可能的实现方式所述的数据同步方法。A tenth aspect provides a processor. The processor is configured to execute the data synchronization method described in any possible implementation manner of the first aspect to the second aspect.
第十一方面,提供一种无线通信系统。该无线通信系统包括上述第一设备和第二设备。In an eleventh aspect, a wireless communication system is provided. The wireless communication system includes the above-mentioned first device and second device.
第十二方面,提供一种计算机可读存储介质,包括:计算机程序或指令;当该计算机程序或指令在计算机上运行时,使得该计算机执行第一方面至第二方面中任意一种可能的实现方式所述的数据同步方法。A twelfth aspect provides a computer-readable storage medium, comprising: a computer program or an instruction; when the computer program or instruction is run on a computer, the computer is made to execute any one of the possible possibilities of the first aspect to the second aspect. The data synchronization method described in the implementation mode is implemented.
第十三方面,提供一种计算机程序产品,包括计算机程序或指令,当该计算机程序或指令在计算机上运行时,使得该计算机执行第一方面至第二方面中任意一种可能的实现方式所述的数据同步方法。A thirteenth aspect provides a computer program product, comprising a computer program or instructions, when the computer program or instructions are run on a computer, the computer is made to execute any one of the possible implementations of the first aspect to the second aspect. The data synchronization method described above.
附图说明Description of drawings
图1为现有数据同步技术的应用场景及流程示意图;1 is a schematic diagram of an application scenario and a flowchart of an existing data synchronization technology;
图2为本申请实施例提供的一种无线通信系统的架构示意图;FIG. 2 is a schematic structural diagram of a wireless communication system according to an embodiment of the present application;
图3为本申请实施例提供的一种设备系统架构的框图;3 is a block diagram of a device system architecture provided by an embodiment of the present application;
图4为本申请实施例提供的一种设备的业务框架示意图;FIG. 4 is a schematic diagram of a service framework of a device provided by an embodiment of the present application;
图5为本申请实施例提供的数据同步方法的流程示意图一;FIG. 5 is a schematic flowchart 1 of a data synchronization method provided by an embodiment of the present application;
图6为本申请实施例提供的数据同步方法的流程示意图二;6 is a second schematic flowchart of a data synchronization method provided by an embodiment of the present application;
图7为本申请实施例提供的通信装置的结构示意图一;FIG. 7 is a schematic structural diagram 1 of a communication device provided by an embodiment of the present application;
图8为本申请实施例提供的通信装置的结构示意图二;FIG. 8 is a second schematic structural diagram of a communication device according to an embodiment of the present application;
图9为本申请实施例提供的通信装置的结构示意图三。FIG. 9 is a third schematic structural diagram of a communication apparatus according to an embodiment of the present application.
具体实施方式Detailed ways
首先,介绍本申请实施例所涉及的技术术语。First, the technical terms involved in the embodiments of the present application are introduced.
传感器控制中心(SensorHub),是一种微控制单元(microcontroller unit,MCU),可以在设备的CPU休眠状态下,实时控制设备的传感器,以及处理来自各种传感器的数据。The Sensor Hub (SensorHub) is a microcontroller unit (MCU) that can control the sensors of the device in real time and process data from various sensors when the CPU of the device is in sleep state.
低功耗蓝牙(bluetooth low energy,BLE),是一种低成本、短距离、可互操作的无线通信技术。Bluetooth low energy (BLE) is a low-cost, short-range, interoperable wireless communication technology.
应用处理器,可以处理设备的订阅服务的数据更新监控、数据分发处理及数据呈现。The application processor can process data update monitoring, data distribution processing and data presentation of the subscription service of the device.
在实现本申请实施例的过程中,本申请发明人发现:In the process of implementing the embodiments of the present application, the inventors of the present application found that:
以图1所示的应用场景为例,手机包括第一AP和通信模块,电视包括第二AP和通信模块。第一AP中包括快递程序、日程程序、第一内容服务、第一分发服务、第一显示模块等程序,第二AP中包括视频程序、第二内容服务、第二分发服务、第二显示模块等程序。Taking the application scenario shown in FIG. 1 as an example, the mobile phone includes a first AP and a communication module, and the TV includes a second AP and a communication module. The first AP includes programs such as express programs, schedule programs, first content services, first distribution services, and first display modules, and the second AP includes video programs, second content services, second distribution services, and second display modules. and so on.
在图1所示的应用场景中,电视可以将最新的剧集观看记录同步给手机(参考图1中的步骤1-步骤7),或者手机也可以将最新的快递信息同步给电视(参考图1中的步骤①-步骤⑦),步骤①-步骤⑦可以对应参考步骤1-步骤7,下面仅对图中的步骤1-步骤7作具体介绍。In the application scenario shown in Figure 1, the TV can synchronize the latest episode viewing records to the mobile phone (refer to steps 1 to 7 in Figure 1), or the mobile phone can also synchronize the latest express information to the TV (refer to Figure 1). Step 1-Step ⑦) in Step 1, Step 1-Step ⑦ can refer to Step 1-Step 7, and only step 1-Step 7 in the figure will be introduced in detail below.
步骤1,第二分发服务程序通过通信模块向手机发送可提供视频服务信息(该信息表示电视可以发送视频程序生成的同步数据)。 Step 1, the second distribution service program sends the mobile phone the information that the video service can be provided (the information indicates that the TV can send the synchronization data generated by the video program) to the mobile phone through the communication module.
步骤2,第一分发服务程序接收来自电视的可提供视频服务信息,并向电视发送订阅视频服务信息。 Step 2, the first distribution service program receives the video service information available from the TV, and sends the subscription video service information to the TV.
步骤3,电视在接收到来自手机的订阅视频服务信息后,若视频程序生成了新的视频数据(如视频观看进度、用户收藏的剧集等),则将这些数据作为同步数据发送给第二内容服务程序。 Step 3, after the TV receives the subscription video service information from the mobile phone, if the video program generates new video data (such as the video viewing progress, the episodes collected by the user, etc.), then these data are sent to the second as synchronous data. content service program.
步骤4,第二内容服务程序接收到来自视频程序的同步数据后,则向第二分发服务程序发送该同步数据。Step 4: After receiving the synchronization data from the video program, the second content service program sends the synchronization data to the second distribution service program.
步骤5,第二分发服务程序通过通信模块向手机发送同步数据。 Step 5, the second distribution service program sends synchronization data to the mobile phone through the communication module.
步骤6,第一分发服务程序接收来自电视的同步数据。 Step 6, the first distribution service program receives the synchronization data from the TV.
步骤7,第一分发服务程序向第一显示模块发送同步数据,以使第一显示模块显示该同步数据。Step 7, the first distribution service program sends the synchronization data to the first display module, so that the first display module displays the synchronization data.
应理解,在步骤6中,手机必须处于工作状态(即唤醒状态,例如,用户使用手机唤醒第一AP)下,第一分发服务程序才能接收来自电视的同步数据,实现数据的同步。也即是说,手机与电视之间在进行数据的同步时,手机、电视的AP必须处于工作状态(即唤醒状态)下,才能实现数据的同步。It should be understood that in step 6, the mobile phone must be in a working state (ie, a wake-up state, for example, the user uses the mobile phone to wake up the first AP), so that the first distribution service program can receive the synchronization data from the TV to realize data synchronization. That is to say, when synchronizing data between the mobile phone and the TV, the AP of the mobile phone and the TV must be in a working state (ie, a wake-up state) to achieve data synchronization.
进而可以理解,现有的数据同步技术实时性较差,通常需要用户使用设备,唤醒设备后,设备才能进行数据同步。并且,由于设备在唤醒后,设备与设备之间还需要重新建立通信连接,传输数据,因此传输速度较慢。以及,若设备与设备之间经常同步数据,还会频繁地唤醒AP,设备功耗高。It can be further understood that the existing data synchronization technology has poor real-time performance, and usually requires the user to use the device and wake up the device before the device can perform data synchronization. Moreover, after the device wakes up, the communication connection between the device and the device needs to be re-established to transmit data, so the transmission speed is slow. Also, if the device frequently synchronizes data with the device, the AP will be woken up frequently, and the device consumes a lot of power.
为了解决现有的数据同步技术存在着数据同步效率低下、设备功耗高的问题,本申请实施例提供了一种数据同步方法及装置,以提高数据同步效率、降低设备功耗。需要说明的是,上述现有技术中的技术方案所存在的种种缺陷,均是发明人经过仔细实践研究后得出的结果。因此,上述问题的发现过程以及下文中本申请实施例针对上述问题所提出的解决方案,都应是发明人在实现本申请过程中对本申请做出的贡献。In order to solve the problems of low data synchronization efficiency and high device power consumption in the existing data synchronization technology, the embodiments of the present application provide a data synchronization method and device to improve data synchronization efficiency and reduce device power consumption. It should be noted that the various defects existing in the technical solutions in the above-mentioned prior art are the results obtained by the inventor after careful practical research. Therefore, the discovery process of the above-mentioned problems and the solutions to the above-mentioned problems proposed in the following embodiments of the present application should be contributions made by the inventor to the present application in the process of realizing the present application.
下面将结合附图,对本申请中的技术方案进行描述。The technical solutions in the present application will be described below with reference to the accompanying drawings.
本申请实施例的技术方案可以应用于各种无线通信系统,例如低功耗蓝牙通信系 统,无线保真(wireless fidelity,WiFi)系统,第4代(4th generation,4G)移动通信系统,如长期演进(long term evolution,LTE)系统,全球互联微波接入(worldwide interoperability for microwave access,WiMAX)通信系统,第五代(5th generation,5G)移动通信系统,如新空口(new radio,NR)系统,以及未来的通信系统,如第六代(6th generation,6G)移动通信系统,车到任意物体(vehicle to everything,V2X)通信系统,设备间(device-todevie,D2D)通信系统,车联网通信系统等。The technical solutions of the embodiments of the present application can be applied to various wireless communication systems, such as low-power Bluetooth communication systems, wireless fidelity (WiFi) systems, and 4th generation (4G) mobile communication systems, such as long-term Evolution (long term evolution, LTE) systems, worldwide interoperability for microwave access (WiMAX) communication systems, fifth generation (5th generation, 5G) mobile communication systems, such as new radio (new radio, NR) systems , and future communication systems, such as the 6th generation (6G) mobile communication system, vehicle-to-everything (V2X) communication system, device-todevie (D2D) communication system, Internet of Vehicles communication system, etc.
本申请将围绕可包括多个设备、组件、模块等的系统来呈现各个方面、实施例或特征。应当理解和明白的是,各个系统可以包括另外的设备、组件、模块等,并且/或者可以并不包括结合附图讨论的所有设备、组件、模块等。此外,还可以使用这些方案的组合。This application will present various aspects, embodiments, or features around a system that may include a plurality of devices, components, modules, and the like. It is to be understood and appreciated that the various systems may include additional devices, components, modules, etc., and/or may not include all of the devices, components, modules, etc. discussed in connection with the figures. In addition, combinations of these schemes can also be used.
另外,在本申请实施例中,“示例地”、“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用示例的一词旨在以具体方式呈现概念。In addition, in the embodiments of the present application, words such as "exemplarily" and "for example" are used to represent examples, illustrations or illustrations. Any embodiment or design described in this application as "exemplary" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of the word example is intended to present a concept in a concrete way.
本申请实施例中,“信息(information)”,“信号(signal)”,“消息(message)”,“信道(channel)”、“信令(singaling)”有时可以混用,应当指出的是,在不强调其区别时,其所要表达的含义是一致的。“的(of)”,“相应的(corresponding,relevant)”和“对应的(corresponding)”有时可以混用,应当指出的是,在不强调其区别时,其所要表达的含义是一致的。In the embodiments of the present application, "information", "signal", "message", "channel", and "signaling" may sometimes be used interchangeably. It should be noted that, When not emphasizing their differences, their intended meanings are the same. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be pointed out that when the difference is not emphasized, the meanings they intend to express are the same.
本申请实施例中,有时候下标如W 1可能会笔误为非下标的形式如W1,在不强调其区别时,其所要表达的含义是一致的。 In the embodiments of the present application, sometimes a subscript such as W1 may be mistakenly written in a non-subscript form such as W1. When the difference is not emphasized, the meaning to be expressed is the same.
本申请实施例描述的系统架构以及业务场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着系统架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。The system architecture and business scenarios described in the embodiments of the present application are for the purpose of illustrating the technical solutions of the embodiments of the present application more clearly, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. The evolution of the architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
为便于理解本申请实施例,首先以图2中示出的无线通信系统为例详细说明适用于本申请实施例的无线通信系统。示例性地,图2为本申请实施例提供的数据同步方法所适用的一种无线通信系统的架构示意图。To facilitate understanding of the embodiments of the present application, firstly, a wireless communication system applicable to the embodiments of the present application is described in detail by taking the wireless communication system shown in FIG. 2 as an example. Exemplarily, FIG. 2 is a schematic structural diagram of a wireless communication system to which the data synchronization method provided by the embodiment of the present application is applied.
如图2所示,该无线通信系统可以包括第一设备和第二设备,第一设备和第二设备之间存在通信连接。As shown in FIG. 2 , the wireless communication system may include a first device and a second device, and a communication connection exists between the first device and the second device.
其中,第一设备和第二设备均可以为具有无线收发功能的终端或可设置于该终端的芯片或芯片系统。在实际应用中,第一设备和第二设备可以是:手机(mobile phone)、平板电脑(Pad)、带无线收发功能的电脑、虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备、工业控制(industrial control)中的无线终端、无人驾驶(self driving)中的无线终端、远程医疗(remote medical)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端、车载终端、具有终端功能的路侧单元(road side unit,RSU)等。进而,上述的第一设备和第二设备也可以称为用户装置、接入终端、用户单元、用户站、移动站、移动台、远方站、远程终端、移动设备、用户终端、终端、无线通信设备、或用户代理。Wherein, both the first device and the second device may be a terminal with a wireless transceiver function or a chip or a chip system that may be provided in the terminal. In practical applications, the first device and the second device may be: a mobile phone (mobile phone), a tablet computer (Pad), a computer with a wireless transceiver function, a virtual reality (virtual reality, VR) terminal device, an augmented reality (augmented reality) , AR) terminal equipment, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical, wireless terminals in smart grid , wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, in-vehicle terminals, roadside units (RSUs) with terminal functions )Wait. Furthermore, the above-mentioned first device and second device may also be referred to as user equipment, access terminal, subscriber unit, subscriber station, mobile station, mobile station, remote station, remote terminal, mobile equipment, user terminal, terminal, wireless communication device, or user agent.
由于上述的第一设备和第二设备均可以为具有无线收发功能的终端或可设置于该终端的芯片或芯片系统,因此,上述的第一处理器和第二处理器可以是:ARM(advanced RISC machines)处理器、X86处理器、或者应用处理器等。例如,当第一设备为手机,第二设备为电视时,上述的第一处理器和第二处理器均可以是AP。Since both the above-mentioned first device and the second device may be a terminal with a wireless transceiver function or a chip or a chip system that can be provided in the terminal, the above-mentioned first processor and the second processor may be: ARM (advanced) RISC machines) processors, X86 processors, or application processors, etc. For example, when the first device is a mobile phone and the second device is a TV, both the above-mentioned first processor and second processor may be APs.
上述的第一数据同步器和第二数据同步器可以是:MCU、通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件、协处理器等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。例如,当第一设备为手机,第二设备为电视时,上述的第一数据同步器和第二数据同步器均可以是SensorHub。The above-mentioned first data synchronizer and second data synchronizer may be: MCU, general-purpose processor, digital signal processor (digital signal processor, DSP), application specific integrated circuit (application specific integrated circuit, ASIC), ready-made programmable gate Field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, coprocessors, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. For example, when the first device is a mobile phone and the second device is a TV, both the above-mentioned first data synchronizer and second data synchronizer may be SensorHub.
进一步地,在图2所示的无线通信系统的基础上,当上述的第一处理器是AP,且第一数据同步器是SensorHub时,对于第一设备的系统架构,本申请实施例还提供了一种可行的实施方式,请参照图3,图3为本申请实施例提供的一种设备系统架构的框图。该设备系统架构可以包括如下一个或多个模块:AP、SensorHub、或蓝牙芯片(bluetooth chip,BT chip)。Further, on the basis of the wireless communication system shown in FIG. 2 , when the above-mentioned first processor is an AP and the first data synchronizer is a SensorHub, for the system architecture of the first device, the embodiment of the present application also provides For a feasible implementation manner, please refer to FIG. 3 , which is a block diagram of a device system architecture provided by an embodiment of the present application. The device system architecture may include one or more of the following modules: AP, SensorHub, or bluetooth chip (BT chip).
其中,AP可以包括如下一个或多个层:应用程序层(applications,APPs)、应用框架层(application framework)、硬件抽象层(hardware abstraction layer,HAL)、或内核层(kernel)。The AP may include one or more of the following layers: an application layer (applications, APPs), an application framework layer (application framework), a hardware abstraction layer (hardware abstraction layer, HAL), or a kernel layer (kernel).
SensorHub可以包括如下一个或多个模块:订阅服务、蓝牙应用程序(bluetooth application,BT APP)、或蓝牙驱动(bluetooth driver,BT driver)。The SensorHub may include one or more of the following modules: a subscription service, a Bluetooth application (bluetooth application, BT APP), or a Bluetooth driver (bluetooth driver, BT driver).
蓝牙芯片可以包括如下一个或多个模块:转换(translation switch)模块、或扫描滤波器(scan filter)模块。转换模块、扫描滤波器模块的具体实现可以参照现有的蓝牙技术,在此不作赘述。The Bluetooth chip may include one or more of the following modules: a translation switch module or a scan filter module. The specific implementation of the conversion module and the scanning filter module can refer to the existing Bluetooth technology, which will not be repeated here.
AP与蓝牙芯片之间可以通过通用异步收发传输器(universal asynchronous receiver transmitter,UART)进行数据通信。SensorHub与蓝牙芯片之间可以通过内置集成电路(inter integrated circuit,I2C)进行数据通信,或者可以通过改进型内部集成电路(improved inter integrated circuit,I3C)进行数据通信。Data communication can be performed between the AP and the Bluetooth chip through a universal asynchronous receiver transmitter (UART). Data communication between the SensorHub and the Bluetooth chip can be performed through a built-in integrated circuit (inter integrated circuit, I2C), or data communication can be performed through an improved inter integrated circuit (I3C).
具体地,应用程序层中可以包括如下一个或多个程序:总线服务、智慧生活、快递、或视频等。Specifically, the application layer may include one or more of the following programs: bus service, smart life, express delivery, or video, etc.
应用框架层中可以包括如下一个或多个框架模块:蓝牙框架(bluetooth framework,BT FW)、WiFi框架(WiFi framework,WiFi FW)、或传感器框架(sensor framework,Sensor FW)等。The application framework layer may include one or more of the following framework modules: a Bluetooth framework (bluetooth framework, BT FW), a WiFi framework (WiFi framework, WiFi FW), or a sensor framework (sensor framework, Sensor FW), etc.
硬件抽象层中可以包括如下一个或多个硬件抽象模块:蓝牙硬件抽象(bluetooth hardware abstraction layer,BT HAL)、WiFi硬件抽象(WiFi hardware abstraction layer,WiFi HAL)、或传感器硬件抽象(sensor hardware abstraction layer,Sensor HAL)等。The hardware abstraction layer may include one or more of the following hardware abstraction modules: bluetooth hardware abstraction layer (BT HAL), WiFi hardware abstraction layer (WiFi HAL), or sensor hardware abstraction layer (sensor hardware abstraction layer) , Sensor HAL) and so on.
内核层中可以包括如下一个或多个驱动模块:蓝牙驱动(bluetooth driver,BT driver)、WiFi驱动(WiFi driver)、或传感器驱动(Sensor driver)等。The kernel layer may include one or more of the following driver modules: a Bluetooth driver (bluetooth driver, BT driver), a WiFi driver (WiFi driver), or a sensor driver (Sensor driver).
在本申请实施例中,AP中的程序可以生成各种同步数据,例如,快递程序可以生 成包括快递派送时间、快递派送地址、快递派送人等数据的同步数据,视频程序可以生成包括剧集名称、剧集进度、视频等数据的同步数据。总线服务可以获取AP中的程序所生成的同步数据。In the embodiment of the present application, the program in the AP can generate various synchronous data. For example, the express program can generate synchronous data including the express delivery time, the express delivery address, the express delivery person, etc. The video program can generate the synchronous data including the name of the episode , episode progress, video synchronization data, etc. The bus service can obtain synchronization data generated by programs in the AP.
总线服务还可以与SensorHub进行数据通信。例如,当总线服务需要向SensorHub发送同步数据时,总线服务可以通过依次调用Sensor Driver、Sensor HAL、Sensor FW,以向SensorHub发送该同步数据。或者例如,当SensorHub需要向总线服务发送同步数据时,SensorHub可以通过依次调用Sensor Driver、Sensor HAL、Sensor FW,以向总线服务发送该同步数据,进而实现总线服务与SensorHub进行数据通信的目的。The bus service can also communicate data with SensorHub. For example, when the bus service needs to send synchronous data to SensorHub, the bus service can send the synchronous data to SensorHub by calling Sensor Driver, Sensor HAL, and Sensor FW in sequence. Or, for example, when SensorHub needs to send synchronous data to the bus service, SensorHub can sequentially call Sensor Driver, Sensor HAL, and Sensor FW to send the synchronous data to the bus service, thereby realizing the purpose of data communication between the bus service and SensorHub.
上述SensorHub在接收到来自AP的数据后,可以向其他设备发送该数据。例如,当SensorHub接收到来自AP的同步数据时,SensorHub可以控制蓝牙芯片进行BLE扫描和BLE广播,发现第二设备。在发现第二设备后,第一设备可以与第二设备建立通信连接(该通信连接的方式可以包括:WiFi连接、蓝牙连接等),然后向第二设备发送该同步数据。另外,上述SensorHub也可以接收来自其他设备的数据,并向AP发送该数据。例如,当SensorHub接收到来自第二设备的同步数据时,SensorHub可以向AP发送该同步数据。也即是说,SensorHub通过控制蓝牙芯片可以与其他设备进行数据通信。After the above SensorHub receives the data from the AP, it can send the data to other devices. For example, when SensorHub receives synchronous data from AP, SensorHub can control the Bluetooth chip to perform BLE scan and BLE broadcast to discover the second device. After discovering the second device, the first device may establish a communication connection with the second device (the communication connection may include: WiFi connection, Bluetooth connection, etc.), and then send the synchronization data to the second device. In addition, the aforementioned SensorHub can also receive data from other devices and send the data to the AP. For example, when SensorHub receives synchronization data from the second device, SensorHub can send the synchronization data to the AP. That is to say, SensorHub can communicate with other devices by controlling the Bluetooth chip.
基于上述总线服务、SensorHub的功能描述,可以理解,为了实现向其他设备发送该同步数据的功能,总线服务在获取到AP中的程序所生成的同步数据后,可以向SensorHub发送该同步数据,然后由SensorHub向其他设备发送该同步数据。类似地,为了实现接收来自其他设备的同步数据的功能,SensorHub可以接收来自其他设备的同步数据,然后转发给AP。Based on the functional description of the above bus service and SensorHub, it can be understood that in order to realize the function of sending the synchronization data to other devices, the bus service can send the synchronization data to SensorHub after obtaining the synchronization data generated by the program in the AP, and then This sync data is sent by SensorHub to other devices. Similarly, in order to realize the function of receiving synchronization data from other devices, SensorHub can receive synchronization data from other devices, and then forward it to the AP.
可选地,当SensorHub接收到来自AP的数据时,上述订阅服务可以保存该数据。当SensorHub接收到来自其他设备的数据时,上述订阅服务也可以保存该数据。Optionally, when SensorHub receives data from the AP, the above-mentioned subscription service can save the data. When SensorHub receives data from other devices, the aforementioned subscription services can also save that data.
在一些可能的实施例中,订阅服务还可以存储下述订阅参数。其中,该订阅参数可以参照下述方法实施例中S402-3的解释说明,在此不作赘述。In some possible embodiments, the subscription service may also store the following subscription parameters. For the subscription parameter, reference may be made to the explanation of S402-3 in the following method embodiments, which will not be repeated here.
需要说明的是,上述实施例提供的设备系统架构可以是图2所示无线通信系统中第一设备的设备系统架构,也可以是第二设备的设备系统架构,本申请实施例对此不作限定。It should be noted that, the device system architecture provided by the above embodiments may be the device system architecture of the first device in the wireless communication system shown in FIG. 2, or the device system architecture of the second device, which is not limited in the embodiments of the present application .
可选地,基于上述图3所示的设备系统架构,本申请实施例还提供了一种设备的业务框架示意图,请参照图4。该业务框架可以包括如下一个或多个模块:AP、SensorHub、或蓝牙芯片。Optionally, based on the device system architecture shown in FIG. 3 , an embodiment of the present application further provides a schematic diagram of a service framework of a device, please refer to FIG. 4 . The service framework may include one or more of the following modules: AP, SensorHub, or Bluetooth chip.
其中,AP中可以包括如下一个或多个程序:快递、视频、智慧生活、或总线服务等。具体地,智慧生活中可以包括如下子模块:用户体验(user experience,UX)显示模块、内容服务(content service,CS)模块、分发服务(distribute service,DS)模块。The AP may include one or more of the following programs: express delivery, video, smart life, or bus service. Specifically, the smart life may include the following sub-modules: a user experience (UX) display module, a content service (CS) module, and a distribution service (DS) module.
SensorHub中可以包括如下一个或多个模块:应用管理模块、通信管理(communication management)模块、或板级支持包(Board Support Package,BSP)模块。具体地,应用管理模块中可以包括如下子模块:通知(Notify)模块、数据更新(data update)模块。The SensorHub may include one or more of the following modules: an application management module, a communication management module, or a Board Support Package (BSP) module. Specifically, the application management module may include the following submodules: a notification (Notify) module and a data update (data update) module.
本申请实施例中,内容服务模块可以用于检测并获取AP中的程序所生成的同步 数据,以及还可以用于向分发服务模块发送该同步数据。分发服务模块在接收到来自内容服务模块的同步数据后,可以向总线服务发送该同步数据。In this embodiment of the present application, the content service module may be used to detect and acquire the synchronization data generated by the program in the AP, and may also be used to send the synchronization data to the distribution service module. After receiving the synchronization data from the content service module, the distribution service module can send the synchronization data to the bus service.
通信管理模块中可以封装有通信协议,可以用于控制蓝牙芯片进行BLE扫描和BLE广播,进而实现向其他设备发送数据或接受来自其他设备的数据。The communication management module can be encapsulated with a communication protocol, which can be used to control the Bluetooth chip to perform BLE scanning and BLE broadcast, thereby realizing sending data to or receiving data from other devices.
数据更新模块可以用于存储来自其他设备的同步数据,以及可以用于存储来自AP的同步数据。通知模块可以用于向其他设备发送同步数据,以及可以用于向AP发送接收到的同步数据。示例性地,当SensorHub接收到来自总线服务的同步数据时,可以将该同步数据存储至数据更新模块,然后由通知模块调用通信管理模块和板级支持包模块,向第二设备发送该同步数据。当SensorHub接收到来自第二设备的同步数据时,也可以将该同步数据存储至数据更新模块,然后由通知模块调用通信管理模块和板级支持包模块,向总线服务发送该同步数据。The data update module may be used to store synchronization data from other devices, and may be used to store synchronization data from APs. The notification module may be used to send synchronization data to other devices, and may be used to send received synchronization data to the AP. Exemplarily, when SensorHub receives synchronous data from the bus service, it can store the synchronous data in the data update module, and then the notification module calls the communication management module and the board-level support package module to send the synchronous data to the second device. . When the SensorHub receives the synchronization data from the second device, the synchronization data can also be stored in the data update module, and then the notification module calls the communication management module and the board-level support package module to send the synchronization data to the bus service.
可选地,AP在接收到来自SensorHub的数据后,还可以输出该数据。例如,用户体验显示模块可以控制第一设备的显示器显示该数据(如在显示界面弹出通知栏),或者控制第一设备的扬声器播放该数据。Optionally, after receiving the data from SensorHub, the AP can also output the data. For example, the user experience display module may control the display of the first device to display the data (eg, a notification bar pops up on the display interface), or control the speaker of the first device to play the data.
需要说明的是,第一设备与第二设备之间的通信连接方式不限于蓝牙连接,还可以是WiFi连接、第4代移动通信连接、第5代移动通信连接等,本申请实施例对此不作限定。另外,第一设备和第二设备内部的连接方式也不仅限于UART、I2C或I3C,本申请实施例对此不作限定。It should be noted that the communication connection between the first device and the second device is not limited to a Bluetooth connection, but may also be a WiFi connection, a fourth-generation mobile communication connection, a fifth-generation mobile communication connection, etc. Not limited. In addition, the internal connection mode of the first device and the second device is not limited to UART, I2C, or I3C, which is not limited in this embodiment of the present application.
还需要说明的是,本实施例中的业务框架未提及的部分,可参考上述设备系统架构实施例中相应内容,在此不作赘述。It should also be noted that, for the parts not mentioned in the service framework in this embodiment, reference may be made to the corresponding content in the above-mentioned embodiment of the device system architecture, which will not be repeated here.
还需要说明的是,本申请实施例提供的下述数据同步方法,在一些可能的实施例中,第一设备所执行的步骤可由第二设备执行,第二设备执行的步骤可由第一设备执行,即本申请实施例中的第一设备和第二设备地位相同,两者在执行本实施例提供的方法时可以互换执行。示例性地,第一设备可以接收第二设备发送的同步数据,也可以向第二设备发送同步数据。It should also be noted that, in the following data synchronization methods provided by the embodiments of the present application, in some possible embodiments, the steps performed by the first device may be performed by the second device, and the steps performed by the second device may be performed by the first device , that is, the first device and the second device in this embodiment of the present application have the same status, and they can be executed interchangeably when executing the method provided by this embodiment. Exemplarily, the first device may receive synchronization data sent by the second device, and may also send synchronization data to the second device.
应当指出的是,本申请实施例中的方案还可以应用于其他通信系统中,相应的名称也可以用其他通信系统中的对应功能的名称进行替代。It should be noted that the solutions in the embodiments of the present application may also be applied to other communication systems, and the corresponding names may also be replaced by the names of corresponding functions in other communication systems.
应理解,图2仅为便于理解而示例的简化示意图,该无线通信系统中还可以包括其他网络设备,和/或,其他终端设备,图2中未予以画出。It should be understood that FIG. 2 is only a simplified schematic diagram for easy understanding, and the wireless communication system may further include other network devices and/or other terminal devices, which are not shown in FIG. 2 .
下面将结合图5-图6对本申请实施例提供的数据同步方法进行具体阐述。The data synchronization method provided by the embodiment of the present application will be described in detail below with reference to FIG. 5 to FIG. 6 .
图5为本申请实施例提供的数据同步方法的流程示意图一。该方法应用于第一设备和第二设备。其中,第一设备包括第一数据同步器和第一处理器,第二设备包括第二数据同步器和第二处理器。FIG. 5 is a schematic flowchart 1 of a data synchronization method provided by an embodiment of the present application. The method is applied to the first device and the second device. The first device includes a first data synchronizer and a first processor, and the second device includes a second data synchronizer and a second processor.
如图5所示,该方法包括如下步骤S501-S503:As shown in Figure 5, the method includes the following steps S501-S503:
S501,第二处理器向第二数据同步器发送同步数据,第二数据同步器接收来自第二处理器的同步数据。S501, the second processor sends synchronization data to the second data synchronizer, and the second data synchronizer receives the synchronization data from the second processor.
其中,同步数据可以包括如下一项或多项:日程数据、行程数据、快递数据、视频数据、音乐数据、相册数据、或待阅读数据等。The synchronization data may include one or more of the following: schedule data, itinerary data, express data, video data, music data, album data, or data to be read, and the like.
示例性地,日程数据可以包括日程时间、日程内容等。行程数据可以包括行程内 容、行程时间、行程建议等。快递数据可以包括快递派送时间、快递派送地址、快递派送人等。视频数据可以包括剧集名称、剧集进度、视频等。音乐数据可以包括音乐应用程序的播放记录、音乐等。相册数据可以包括相册预览、最近拍摄的图像等。待阅读数据可以包括待阅读的简介、待阅读的链接等。Illustratively, the schedule data may include schedule time, schedule content, and the like. Trip data can include trip content, trip time, trip recommendations, and more. The express data may include express delivery time, express delivery address, express delivery person, and the like. Video data may include episode names, episode progress, videos, and the like. The music data may include playing records of music applications, music, and the like. Album data may include album previews, recently captured images, and the like. The data to be read may include an introduction to be read, a link to be read, and the like.
另外,上述日程数据、行程数据、快递数据、视频数据、音乐数据、相册数据、或待阅读数据均还可以包括设备标识码。例如,该设备标识码可以包括如下一项或多项:设备的媒体访问控制(media access control,MAC)地址、互联网协议(internet protocol,IP)地址、或设备名称等。应理解,在同步数据中设置设备标识码,可以使得第一设备输出该同步数据时,能够提醒用户是哪个设备发送了该同步数据,以便用户确定下一操作,进而提升用户体验。In addition, the above-mentioned schedule data, itinerary data, express data, video data, music data, album data, or data to be read may also include a device identification code. For example, the device identification code may include one or more of the following: a media access control (media access control, MAC) address of the device, an internet protocol (internet protocol, IP) address, or a device name, and the like. It should be understood that setting the device identification code in the synchronization data can enable the first device to remind the user which device sent the synchronization data when the first device outputs the synchronization data, so that the user can determine the next operation, thereby improving user experience.
需要说明的是,本申请实施例对于日程数据、行程数据、快递数据、视频数据、音乐数据、相册数据、或待阅读数据等均不作具体限定。It should be noted that the embodiments of the present application do not specifically limit schedule data, itinerary data, express data, video data, music data, album data, or data to be read.
S502,第二数据同步器向第一数据同步器发送同步数据,第一数据同步器接收来自第二数据同步器的同步数据。S502, the second data synchronizer sends synchronization data to the first data synchronizer, and the first data synchronizer receives the synchronization data from the second data synchronizer.
具体地,在第二数据同步器接收到来自第二处理器的同步数据后,第二数据同步器可以立即或稍后向第一数据同步器发送同步数据。因此,第二处理器不必实时地向第一设备发送同步数据。进而,在第二数据同步器向第一数据同步器发送同步数据的过程中,第二处理器可以处于休眠状态,也可以处于工作状态。如此,在第二数据同步器向第一数据同步器发送同步数据的过程中,第二处理器可以选择进入休眠状态以降低设备功耗,或者处理其他数据,以提高设备的运行效率。Specifically, after the second data synchronizer receives the synchronization data from the second processor, the second data synchronizer may send the synchronization data to the first data synchronizer immediately or later. Therefore, the second processor does not have to send synchronization data to the first device in real time. Furthermore, in the process of the second data synchronizer sending the synchronization data to the first data synchronizer, the second processor may be in a dormant state or in a working state. In this way, during the process of the second data synchronizer sending synchronization data to the first data synchronizer, the second processor may choose to enter the sleep state to reduce the power consumption of the device, or process other data to improve the operation efficiency of the device.
为了达到降低设备功耗的目的,可选地,在上述S502中,第二数据同步器向第一数据同步器发送同步数据,可以包括如下步骤:In order to achieve the purpose of reducing the power consumption of the device, optionally, in the above S502, the second data synchronizer sends the synchronization data to the first data synchronizer, which may include the following steps:
S502-1,在第二处理器处于休眠状态下,第二数据同步器向第一数据同步器发送同步数据。S502-1, when the second processor is in a sleep state, the second data synchronizer sends synchronization data to the first data synchronizer.
其中,休眠状态可以是第二处理器处于低功耗运行状态,例如,第二处理器处于待机、休眠、或睡眠等状态。也即是说,上述的休眠状态可以包括:待机、休眠、或睡眠等。The hibernation state may be that the second processor is in a low power consumption running state, for example, the second processor is in a state of standby, hibernation, or sleep. That is to say, the above-mentioned hibernation state may include: standby, hibernation, or sleep.
在第二数据同步器接收到来自第二处理器的同步数据后,第二数据同步器可以首先确认第二处理器是否处于休眠状态。第二数据同步器在确认第二处理器处于休眠状态时,即向第一数据同步器发送同步数据。After the second data synchronizer receives the synchronization data from the second processor, the second data synchronizer may first confirm whether the second processor is in a sleep state. When confirming that the second processor is in the sleep state, the second data synchronizer sends synchronization data to the first data synchronizer.
其中,第二数据同步器确认第二处理器的状态的方式可以是:第二数据同步器在接收到来自第二处理器的同步数据并达到第一时间段后(例如,5秒),确认第二处理器处于休眠状态;或者,第二数据同步器在接收到来自第二处理器的休眠消息时,即可确认第二处理器处于休眠状态;或者,第二数据同步器在接收到来自第二处理器的同步数据后,向第二处理器发送启动休眠信息(用于指示第二处理器进入休眠状态),并确认第二处理器处于休眠状态。The manner in which the second data synchronizer confirms the state of the second processor may be: after the second data synchronizer receives the synchronization data from the second processor and reaches a first time period (for example, 5 seconds), confirms The second processor is in a dormant state; or, when the second data synchronizer receives a dormancy message from the second processor, it can confirm that the second processor is in a dormant state; or, when the second data synchronizer receives a message from the second processor After synchronizing data of the second processor, send start dormancy information (used to instruct the second processor to enter the dormancy state) to the second processor, and confirm that the second processor is in the dormant state.
需要说明的是,第二处理器进入休眠状态的方式可以是:在向第二数据同步器发送同步数据第二时间段后,第二处理器进入休眠状态;或者在接收到第二数据处理器发送的启动休眠信息后,第二处理器进入休眠状态。可以理解,本申请实施例对于第 二处理器进入休眠状态的方式不作具体限定。It should be noted that the manner in which the second processor enters the sleep state may be: after sending the synchronization data to the second data synchronizer for a second period of time, the second processor enters the sleep state; or after receiving the second data processor After sending the start dormancy information, the second processor enters a dormant state. It can be understood that the embodiment of the present application does not specifically limit the manner in which the second processor enters the sleep state.
应理解,第二设备在向第一设备发送同步数据的过程中,第二处理器向第二数据同步器发送同步数据后即可进入休眠状态,然后由第二数据同步器向第一数据同步器发送同步数据。如此,更能够降低设备的功耗,延长设备的待机时间,减少设备的电量消耗,提升用户体验。It should be understood that when the second device sends the synchronization data to the first device, the second processor can enter the sleep state after sending the synchronization data to the second data synchronizer, and then the second data synchronizer synchronizes the first data with the second device. to send synchronization data. In this way, the power consumption of the device can be further reduced, the standby time of the device can be prolonged, the power consumption of the device can be reduced, and the user experience can be improved.
另外,在一些可能的实施例中,为了进一步降低设备的功耗,第二数据同步器还可以在第二处理器处于关闭状态下,向第一数据同步器发送同步数据。也即是说,在第二处理器处于休眠状态或关闭状态下,第二数据同步器向第一数据同步器发送同步数据。In addition, in some possible embodiments, in order to further reduce the power consumption of the device, the second data synchronizer may also send synchronization data to the first data synchronizer when the second processor is in an off state. That is to say, when the second processor is in a sleep state or a shutdown state, the second data synchronizer sends synchronization data to the first data synchronizer.
类似地,第一设备在接收第二设备发送的同步数据过程中,由于是由第一数据同步器接收来自第二数据同步器的同步数据的,因此,第一处理器也不必实时地接收第二设备发送的同步数据。进而,在第一数据同步器接收来自第二数据同步器的同步数据的过程中,第一处理器可以处于休眠状态,也可以处于工作状态。如此,在第一数据同步器接收来自第二数据同步器的同步数据的过程中,第一处理器可以选择进入休眠状态以降低设备功耗,或者处理其他数据,以提高设备的运行效率。Similarly, when the first device receives the synchronization data sent by the second device, since the first data synchronizer receives the synchronization data from the second data synchronizer, the first processor does not need to receive the synchronization data in real time. Synchronous data sent by the second device. Furthermore, during the process that the first data synchronizer receives the synchronization data from the second data synchronizer, the first processor may be in a sleep state or in a working state. In this way, during the process of the first data synchronizer receiving the synchronization data from the second data synchronizer, the first processor may choose to enter the sleep state to reduce the power consumption of the device, or process other data to improve the operation efficiency of the device.
进而可选地,为了达到降低设备功耗的目的,在上述S502中,第一数据同步器接收来自第二数据同步器的同步数据,可以包括如下子步骤:Further optionally, in order to achieve the purpose of reducing the power consumption of the device, in the above S502, the first data synchronizer receives the synchronization data from the second data synchronizer, which may include the following sub-steps:
S502-2,在第一处理器处于休眠状态下,第一数据同步器接收来自第二数据同步器的同步数据。S502-2, when the first processor is in a sleep state, the first data synchronizer receives synchronization data from the second data synchronizer.
与S502-1类似,上述的休眠状态可以是指第一处理器处于低功耗运行状态,例如,第一处理器处于待机、休眠、或睡眠等状态。也即是说,上述的休眠状态可以包括:待机、休眠、或睡眠等。Similar to S502-1, the above-mentioned sleep state may mean that the first processor is in a low power consumption running state, for example, the first processor is in a state of standby, hibernation, or sleep. That is to say, the above-mentioned hibernation state may include: standby, hibernation, or sleep.
应理解,第一设备在接收第二设备发送的同步数据过程中,在第一处理器处于休眠状态下,由第一数据同步器接收来自第二数据同步器的同步数据。如此,更能够降低设备的功耗,延长设备的待机时间,减少设备的电量消耗,提升用户体验。It should be understood that, in the process of receiving the synchronization data sent by the second device, the first data synchronizer receives the synchronization data from the second data synchronizer when the first processor is in a sleep state. In this way, the power consumption of the device can be further reduced, the standby time of the device can be prolonged, the power consumption of the device can be reduced, and the user experience can be improved.
另外需要补充的是,在一些可能的实施例中,为了进一步降低设备的功耗,还可以在第一处理器处于关闭状态下,第一数据同步器接收来自第二数据同步器的同步数据。也即是说,在第一处理器处于休眠状态或关闭状态下,第一数据同步器接收来自第二数据同步器的同步数据。It should be added that, in some possible embodiments, in order to further reduce the power consumption of the device, the first data synchronizer may also receive synchronization data from the second data synchronizer when the first processor is in an off state. That is, when the first processor is in a sleep state or a shutdown state, the first data synchronizer receives synchronization data from the second data synchronizer.
基于上述S502所示的步骤,还应理解,第一设备在接收第二设备发送的同步数据过程中,第一处理器只需接收第一数据同步器发送的同步数据,第二处理器也只需将同步数据发送给第二数据同步器,从而两个处理器均不必频繁地处于工作状态,也不必频繁地建立通信连接,并且本地数据传送速度更快。如此,本申请实施例还能够提高设备与设备之间数据同步效率。Based on the steps shown in the above S502, it should also be understood that in the process of receiving the synchronization data sent by the second device, the first processor only needs to receive the synchronization data sent by the first data synchronizer, and the second processor only needs to receive the synchronization data sent by the first data synchronizer. The synchronization data needs to be sent to the second data synchronizer, so that the two processors do not need to be in a working state frequently, nor need to frequently establish a communication connection, and the local data transfer speed is faster. In this way, the embodiments of the present application can also improve the data synchronization efficiency between devices.
可选地,在上述S502中,第二数据同步器向第一设备发送同步数据,可以包括如下子步骤:Optionally, in the above S502, the second data synchronizer sends the synchronization data to the first device, which may include the following sub-steps:
S502-3,第二数据同步器根据订阅参数向第一设备发送同步数据。S502-3, the second data synchronizer sends synchronization data to the first device according to the subscription parameter.
其中,订阅参数用于第一设备获取来自第二设备的同步数据。The subscription parameter is used by the first device to obtain synchronization data from the second device.
上述订阅参数可以包括如下一项或多项:第一设备标识码、第二设备标识码、或 同步数据的订阅信息。The above-mentioned subscription parameters may include one or more of the following: a first device identification code, a second device identification code, or subscription information for synchronizing data.
上述第一设备标识码、第二设备标识码可以参照S501中对于设备标识码的解释说明,在此不作赘述。For the above-mentioned first device identification code and second device identification code, reference may be made to the explanation of the device identification code in S501, which will not be repeated here.
上述同步数据的订阅信息用于指示需要获取的同步数据。例如,该同步数据的订阅信息可以是指示需要获取如下一项或多项数据:日程数据、行程数据、快递数据、视频数据、音乐数据、相册数据、或待阅读数据等,本申请实施例对此不作具体限定。其中,日程数据、行程数据、快递数据、视频数据、音乐数据、相册数据、或待阅读数据等的具体解释说明可以参照上述S501中相应记载,在此不作赘述。The above-mentioned subscription information of the synchronization data is used to indicate the synchronization data to be acquired. For example, the subscription information of the synchronization data may indicate that one or more of the following data need to be acquired: schedule data, itinerary data, express data, video data, music data, album data, or data to be read, etc. This is not specifically limited. For specific explanations of schedule data, itinerary data, express data, video data, music data, album data, or data to be read, reference may be made to the corresponding records in S501 above, which will not be repeated here.
在第一设备请求第二设备发送同步数据的过程中,示例性地,假设订阅参数中包括有第一设备标识码和同步数据的订阅信息,且该同步数据的订阅信息用于指示需要获取视频数据,则第二数据同步器可以根据该订阅参数向第一设备发送视频数据(例如,用户观看视频的剧集名称、剧集进度等)。In the process of the first device requesting the second device to send synchronization data, for example, it is assumed that the subscription parameter includes the first device identification code and the subscription information of the synchronization data, and the subscription information of the synchronization data is used to indicate that the video needs to be acquired data, the second data synchronizer may send video data (for example, the name of the episode of the video the user watches, the progress of the episode, etc.) to the first device according to the subscription parameter.
可以理解,设备与设备之间在进行数据同步的过程中,首先需要建立互相之间的订阅关系。以第一设备需要获取第二设备的同步数据为例,首先,第一设备向第二设备发送用于指示第二设备反馈同步数据的指示信息。然后,第二设备根据该指示信息向第一设备发送同步数据。其中,该指示信息可理解为上述的订阅参数。It can be understood that, in the process of data synchronization between devices, a subscription relationship with each other needs to be established first. Taking the first device needing to acquire the synchronization data of the second device as an example, first, the first device sends indication information for instructing the second device to feed back the synchronization data to the second device. Then, the second device sends synchronization data to the first device according to the indication information. The indication information may be understood as the above-mentioned subscription parameter.
也即是说,设备与设备建立互相之间的订阅关系的过程可以是:请求同步数据的设备向被请求同步数据的设备发送订阅参数。示例性地,在第一设备请求第二设备发送同步数据的过程中,第一设备可以理解为请求同步数据的设备,第二设备可以理解为被请求同步数据的设备。由此,第一设备与第二设备建立订阅关系的过程是:第一设备向第二设备发送订阅参数,第二设备接收订阅参数。That is to say, the process of establishing a mutual subscription relationship between devices may be: the device requesting to synchronize data sends subscription parameters to the device requested to synchronize data. Exemplarily, in a process in which the first device requests the second device to send synchronization data, the first device may be understood as a device requesting synchronization data, and the second device may be understood as a device requested to synchronize data. Therefore, the process of establishing a subscription relationship between the first device and the second device is: the first device sends subscription parameters to the second device, and the second device receives the subscription parameters.
进而可选地,在S502-3,第二数据同步器根据订阅参数向第一设备发送同步数据之前,图5所示的数据同步方法还可以包括如下子步骤:Further optionally, in S502-3, before the second data synchronizer sends synchronization data to the first device according to the subscription parameters, the data synchronization method shown in FIG. 5 may further include the following sub-steps:
S502-4,第二数据同步器接收来自第一设备的订阅参数。S502-4, the second data synchronizer receives the subscription parameters from the first device.
可选地,在S502-4,第二数据同步器接收来自第一设备的订阅参数之后,图5所示的数据同步方法还可以包括如下子步骤:Optionally, in S502-4, after the second data synchronizer receives the subscription parameters from the first device, the data synchronization method shown in FIG. 5 may further include the following sub-steps:
S502-5,第二数据同步器向第二处理器发送订阅参数。S502-5, the second data synchronizer sends subscription parameters to the second processor.
应理解,S502-4,S502-5这两个步骤对应第一设备与第二设备建立订阅关系的过程。It should be understood that the two steps of S502-4 and S502-5 correspond to the process of establishing a subscription relationship between the first device and the second device.
可选地,在S502-5,第二数据同步器向第二处理器发送订阅参数之前,图5所示的数据同步方法还可以包括如下子步骤:Optionally, in S502-5, before the second data synchronizer sends the subscription parameters to the second processor, the data synchronization method shown in FIG. 5 may further include the following sub-steps:
S502-6,若第二数据同步器存储有同步数据,第二数据同步器根据订阅参数向第一设备发送第二数据同步器存储的同步数据。S502-6, if the second data synchronizer stores synchronization data, the second data synchronizer sends the synchronization data stored by the second data synchronizer to the first device according to the subscription parameter.
示例性地,假设订阅参数中的同步数据的订阅信息指示需要获取视频数据,而在第二数据同步器中正好存储有视频数据。在此情况下,第二数据同步器在向第二处理器发送订阅参数之前,可以根据该订阅参数先向第一设备发送该视频数据。Exemplarily, it is assumed that the subscription information of the synchronization data in the subscription parameter indicates that video data needs to be acquired, and the second data synchronizer just stores the video data. In this case, before sending the subscription parameter to the second processor, the second data synchronizer may first send the video data to the first device according to the subscription parameter.
应理解,这可以使得第二数据同步器在已经存储有同步数据的情况下,及时将同步数据发送给第一设备,减少数据同步时间,以进一步提高数据同步效率。It should be understood that this enables the second data synchronizer to send the synchronization data to the first device in time when the synchronization data is already stored, thereby reducing the data synchronization time and further improving the data synchronization efficiency.
可选地,在S502-5,第二数据同步器向第二处理器发送订阅参数之前,图5所示 的数据同步方法还可以包括如下子步骤S502-7,S502-8之一:Optionally, in S502-5, before the second data synchronizer sends subscription parameters to the second processor, the data synchronization method shown in Figure 5 can also include one of the following substeps S502-7, S502-8:
S502-7,若第二处理器处于休眠状态,则第二数据同步器唤醒第二处理器。S502-7, if the second processor is in a sleep state, the second data synchronizer wakes up the second processor.
S502-8,若第二处理器处于休眠状态,则第二数据同步器等待第二处理器唤醒。S502-8, if the second processor is in a dormant state, the second data synchronizer waits for the second processor to wake up.
如此,若第二数据同步器主动唤醒第二处理器,则第二数据同步器可以及时将订阅参数发送给第二处理器,以使得第二设备及时地将同步数据反馈给第一设备,进一步提高数据同步效率。In this way, if the second data synchronizer actively wakes up the second processor, the second data synchronizer can send the subscription parameters to the second processor in time, so that the second device can timely feed back the synchronization data to the first device, and further Improve data synchronization efficiency.
还应理解,若第二数据同步器等待第二处理器唤醒,则在等待第二处理器唤醒的过程中,第二数据同步器可以尽可能多地接收同步数据,以提高同步数据的数据量和完整程度。另外,也可以减少第二处理器的唤醒频率,从而减少第二处理器接收同步数据的次数,以节省第二处理器的计算资源,进一步降低设备功耗,提高设备运行的总体效率。It should also be understood that if the second data synchronizer waits for the second processor to wake up, in the process of waiting for the second processor to wake up, the second data synchronizer can receive as much synchronization data as possible to increase the data volume of the synchronization data. and completeness. In addition, the wake-up frequency of the second processor can also be reduced, thereby reducing the number of times that the second processor receives synchronous data, so as to save the computing resources of the second processor, further reduce the power consumption of the device, and improve the overall efficiency of the device operation.
需要说明的是,为了进一步提高数据同步效率,可选地,图5所示的数据同步方法还可以包括如下子步骤:It should be noted that, in order to further improve the data synchronization efficiency, optionally, the data synchronization method shown in FIG. 5 may further include the following sub-steps:
S502-9,第二处理器接收到来自第二数据同步器的订阅参数,并根据订阅参数获取应用程序生成的同步数据,以及向第二数据同步器发送同步数据。S502-9: The second processor receives the subscription parameters from the second data synchronizer, acquires synchronization data generated by the application according to the subscription parameters, and sends the synchronization data to the second data synchronizer.
示例性地,假设订阅参数中的同步数据的订阅信息指示需要获取视频数据,则第二处理器在接收到该订阅参数后可以监控视频应用程序是否生成新的视频数据。若视频应用程序生成了新的视频数据,则第二处理器获取该视频数据,并作为同步数据发送给第二数据同步器。Exemplarily, assuming that the subscription information of the synchronization data in the subscription parameter indicates that video data needs to be acquired, the second processor may monitor whether the video application generates new video data after receiving the subscription parameter. If the video application program generates new video data, the second processor acquires the video data and sends it to the second data synchronizer as synchronization data.
如此,第二设备可以及时向第一设备发送应用程序生成的同步数据,进一步提高数据同步效率。In this way, the second device can send the synchronization data generated by the application program to the first device in time, thereby further improving the data synchronization efficiency.
在本申请实施例中,关于上述S502-3,S502-4,S502-5,S502-6,S502-7,S502-8,S502-9中基于订阅参数建立订阅关系的流程的实现,可以参照下述S604-S609,在此不作赘述。In the embodiments of the present application, regarding the implementation of the process of establishing a subscription relationship based on subscription parameters in the above S502-3, S502-4, S502-5, S502-6, S502-7, S502-8, and S502-9, please refer to The following S604-S609 are not repeated here.
其中,需要说明的是,上述S502-6可以在S502-7和S502-8之前执行,也可以在S502-7和S502-8之后执行,本申请实施例对此不作限定。It should be noted that the foregoing S502-6 may be executed before S502-7 and S502-8, or may be executed after S502-7 and S502-8, which is not limited in this embodiment of the present application.
S503,第一数据同步器向第一处理器发送同步数据,第一处理器接收来自第一数据同步器的同步数据。S503, the first data synchronizer sends synchronization data to the first processor, and the first processor receives the synchronization data from the first data synchronizer.
由于在第一数据同步器接收来自第二数据同步器的同步数据的过程中,第一处理器可以处于休眠状态,也可以处于工作状态。因此,当第一数据同步器向第一处理器发送同步数据时,第一处理器可能处于休眠状态,也可能处于工作状态。Because the first processor may be in a sleep state or in a working state during the process of receiving the synchronization data from the second data synchronizer by the first data synchronizer. Therefore, when the first data synchronizer sends synchronization data to the first processor, the first processor may be in a dormant state or may be in a working state.
需要说明的是,第一处理器处于工作状态时才能接收到来自第一数据同步器的同步数据。因此,第一数据同步器可以首先检测第一处理器是否处于工作状态,在第一处理器处于工作状态下向第一处理器发送同步数据。It should be noted that the synchronization data from the first data synchronizer can only be received when the first processor is in a working state. Therefore, the first data synchronizer may first detect whether the first processor is in the working state, and send the synchronization data to the first processor when the first processor is in the working state.
在一种可能的设计中,为了进一步提高数据同步效率,上述S503中,第一数据同步器向第一处理器发送同步数据,可以包括如下子步骤:In a possible design, in order to further improve the data synchronization efficiency, in the above S503, the first data synchronizer sends the synchronization data to the first processor, which may include the following sub-steps:
S503-1,若第一数据同步器检测到第一处理器处于工作状态,则第一数据同步器向第一处理器发送同步数据。S503-1, if the first data synchronizer detects that the first processor is in a working state, the first data synchronizer sends synchronization data to the first processor.
应理解,在第一处理器唤醒(包括主动唤醒和被动唤醒)时,第一数据同步器可 以及时将同步数据发送给第一处理器,减少数据同步时间,进而提高了数据同步效率。It should be understood that when the first processor wakes up (including active wake-up and passive wake-up), the first data synchronizer can send synchronization data to the first processor in time, thereby reducing data synchronization time and improving data synchronization efficiency.
在另一种可能的设计中,为了解决数据同步过程中的可靠性问题,上述S503中,第一数据同步器向第一处理器发送同步数据,可以包括如下子步骤:In another possible design, in order to solve the reliability problem in the data synchronization process, in the above S503, the first data synchronizer sends the synchronization data to the first processor, which may include the following sub-steps:
S503-2,第一数据同步器接收来自第一处理器的同步指令,并根据同步指令向第一处理器发送同步数据。S503-2: The first data synchronizer receives a synchronization instruction from the first processor, and sends synchronization data to the first processor according to the synchronization instruction.
其中,同步指令用于获取来自第二设备的同步数据。The synchronization instruction is used to obtain synchronization data from the second device.
在第一设备请求第二设备发送同步数据的过程中,由于第一处理器并不直接感知第一数据同步器是否已经接收到了来自第二设备的同步数据,因此,为了确保第一设备可靠稳定地接收第二设备的同步数据,第一处理器可以生成同步指令(指示第一数据同步器反馈第二设备的同步数据的指令),并向第一数据同步器发送同步指令,以便及时接收到第一数据同步器反馈的同步数据,尽快完成数据同步过程。In the process that the first device requests the second device to send synchronization data, since the first processor does not directly perceive whether the first data synchronizer has received the synchronization data from the second device, in order to ensure the reliability and stability of the first device to receive the synchronization data of the second device, the first processor can generate a synchronization instruction (an instruction instructing the first data synchronizer to feed back the synchronization data of the second device), and send the synchronization instruction to the first data synchronizer so as to receive the synchronization instruction in time. The synchronization data fed back by the first data synchronizer completes the data synchronization process as soon as possible.
需要说明的是,第一处理器生成同步指令的方式可以是,在每次唤醒时,生成同步指令。或者是,在工作状态时,间隔第三时间段生成同步指令。本申请实施例对此不作限定。It should be noted that, the manner in which the first processor generates the synchronization instruction may be to generate the synchronization instruction every time it wakes up. Or, in the working state, a synchronization instruction is generated at a third time period. This embodiment of the present application does not limit this.
此外,上述第一时间段、第二时间段和第三时间段的长度可以相同,也可以不同,本申请实施例对此不作限定。In addition, the lengths of the first time period, the second time period, and the third time period may be the same or different, which are not limited in this embodiment of the present application.
可以理解,第一处理器可以向第一数据同步器发送同步指令,进而主动地从第一数据同步器处获取到来自第二设备的同步数据,提高数据同步的可靠性。It can be understood that the first processor can send a synchronization instruction to the first data synchronizer, and then actively acquire the synchronization data from the second device from the first data synchronizer, thereby improving the reliability of data synchronization.
其中,需要说明的是,上述S503-1可以在S503-2之前执行,也可以在S503-2之后执行,本申请实施例对此不作限定。It should be noted that the foregoing S503-1 may be executed before S503-2, or may be executed after S503-2, which is not limited in this embodiment of the present application.
可选地,在S503之前,图5所示的数据同步方法还可以包括如下步骤:Optionally, before S503, the data synchronization method shown in FIG. 5 may further include the following steps:
S503-3,若第一数据同步器检测到第一处理器处于休眠状态,则第一数据同步器主动唤醒第一处理器。S503-3, if the first data synchronizer detects that the first processor is in a sleep state, the first data synchronizer actively wakes up the first processor.
应理解,在第一处理器休眠时,第一数据同步器可以主动将其唤醒,并将同步数据快速及时地发送给第一处理器,进一步提高数据同步效率。It should be understood that when the first processor sleeps, the first data synchronizer can actively wake it up and send the synchronization data to the first processor in a fast and timely manner, thereby further improving data synchronization efficiency.
可选地,图5所示的数据同步方法还可以包括如下步骤:Optionally, the data synchronization method shown in FIG. 5 may also include the following steps:
S503-4,第一数据同步器接收来自第一处理器的订阅参数,并向第二设备发送订阅参数。S503-4, the first data synchronizer receives the subscription parameters from the first processor, and sends the subscription parameters to the second device.
其中,订阅参数用于第一设备获取来自第二设备的同步数据。The subscription parameter is used by the first device to obtain synchronization data from the second device.
应理解,第二设备可以根据第一设备的需求提供同步数据,即第一设备可以定制同步数据,以减少不必要的数据同步操作,从而进一步提高数据同步效率。It should be understood that the second device may provide synchronization data according to the requirements of the first device, that is, the first device may customize the synchronization data to reduce unnecessary data synchronization operations, thereby further improving data synchronization efficiency.
在本申请实施例中,关于上述S503-4中,基于订阅参数建立订阅关系的流程的实现,可以参照下述S601-S603,在此不作赘述。In the embodiment of the present application, regarding the implementation of the process of establishing a subscription relationship based on subscription parameters in the above S503-4, reference may be made to the following S601-S603, which will not be repeated here.
可选地,图5所示的数据同步方法还可以包括如下步骤:Optionally, the data synchronization method shown in FIG. 5 may also include the following steps:
S503-5,第一处理器输出同步数据。S503-5, the first processor outputs synchronization data.
示例性地,第一处理器可以控制第一设备的显示器显示同步数据,或者控制第一设备的扬声器播放同步数据。如此,第一设备可以提醒用户查看上述第一处理器输出的同步数据,以便用户确定下一操作,从而提升用户体验。Exemplarily, the first processor may control the display of the first device to display the synchronization data, or control the speaker of the first device to play the synchronization data. In this way, the first device can remind the user to check the synchronization data output by the first processor, so that the user can determine the next operation, thereby improving user experience.
下面,以图2中所示出的无线通信系统为例,详细说明本申请实施例提供的数据 同步方法在实际应用中的实现过程。Hereinafter, taking the wireless communication system shown in FIG. 2 as an example, the implementation process of the data synchronization method provided in the embodiment of the present application in practical application will be described in detail.
其中,第一设备和第二设备的系统架构均可以是图3中所示的设备系统架构,具体地,第一设备中的第一处理器可以是第一AP,第一数据同步器可以是第一SensorHub,第二设备中的第二处理器可以是第二AP,第二数据同步器可以是第二SensorHub。第一AP中可以包括第一应用程序和第一总线服务,第二AP中可以包括第二应用程序和第二总线服务。其中,第一应用程序可以是第一AP的应用程序层中的一个程序(如,智慧生活、同步程序等),第二应用程序可以是第二AP的应用程序层中的一个程序(如,快递、视频、行程等),本申请实施例对此不作限定。The system architectures of the first device and the second device can both be the device system architectures shown in FIG. 3 . Specifically, the first processor in the first device can be the first AP, and the first data synchronizer can be The first SensorHub, the second processor in the second device may be the second AP, and the second data synchronizer may be the second SensorHub. The first AP may include the first application and the first bus service, and the second AP may include the second application and the second bus service. Wherein, the first application program may be a program in the application program layer of the first AP (for example, a smart life, synchronization program, etc.), and the second application program may be a program in the application program layer of the second AP (for example, express, video, itinerary, etc.), which is not limited in this embodiment of the present application.
示例性地,图6为本申请实施例提供的数据同步方法的流程示意图二。该数据同步方法可以适用于图2中所示出的无线通信系统中,可以实现图5中所示出的数据同步方法。Exemplarily, FIG. 6 is a second schematic flowchart of a data synchronization method provided by an embodiment of the present application. The data synchronization method can be applied to the wireless communication system shown in FIG. 2 , and the data synchronization method shown in FIG. 5 can be implemented.
如图6所示,该数据同步方法包括基于订阅参数建立订阅关系的流程和同步数据的同步流程,分别参考下述S601-S609和S610-S616:As shown in FIG. 6 , the data synchronization method includes a process of establishing a subscription relationship based on subscription parameters and a synchronization process of synchronizing data. Refer to the following S601-S609 and S610-S616 respectively:
S601,第一应用程序向第一总线服务发送订阅参数。S601, the first application sends subscription parameters to the first bus service.
其中,订阅参数用于第一设备获取来自第二设备的同步数据。The subscription parameter is used by the first device to obtain synchronization data from the second device.
本申请实施例中,第一应用程序可以生成订阅参数,并向第一总线服务发送该订阅参数。第一应用程序生成订阅参数的方式可以如下:In this embodiment of the present application, the first application may generate subscription parameters, and send the subscription parameters to the first bus service. The manner in which the first application generates the subscription parameters may be as follows:
首先,第二设备向第一设备发送可订阅程序信息。该可订阅程序信息可以表征第二设备中的一个或多个可生成同步数据的应用程序。例如,若第二设备中有如下几个可生成同步数据的应用程序,分别为:视频、行程、快递,则第二设备可以向第一设备发送表征“第二设备中可生成同步数据的应用程序包括:视频、行程、快递”的信息(即可订阅程序信息)。First, the second device sends subscribeable program information to the first device. The subscribeable program information may represent one or more applications in the second device that may generate synchronization data. For example, if the second device has the following application programs that can generate synchronous data, namely: video, itinerary, and express delivery, the second device can send a message to the first device that characterizes "applications in the second device that can generate synchronous data" The program includes: video, itinerary, express" information (you can subscribe to program information).
然后,第一设备在接收到来自第二设备的可订阅程序数据后,第一应用程序可以输出该可订阅程序数据。示例性地,若可订阅程序信息表征“第二设备中可生成同步数据的应用程序包括:视频、行程、快递”,则第一应用程序可以控制第一设备的显示器显示文字信息“请选择订阅的第二设备的程序:A.视频、B.行程、C.快递”,或者控制第一设备的扬声器播放声音信息“请回答需要订阅的第二设备的程序:视频、行程、快递”。Then, after the first device receives the subscribeable program data from the second device, the first application may output the subscribeable program data. Exemplarily, if the subscribeable program information represents "the application programs in the second device that can generate synchronous data include: video, itinerary, and express delivery", the first application program can control the display of the first device to display the text message "Please select to subscribe. The program of the second device: A. video, B. itinerary, C. express”, or control the speaker of the first device to play the sound message “Please answer the program of the second device that needs to be subscribed: video, itinerary, express”.
最后,第一应用程序可以响应用户操作,根据用户操作确定用户选定的应用程序,并根据用户选定的应用程序生成订阅参数。例如,若可订阅程序信息表征“第二设备中可生成同步数据的应用程序包括:视频、行程、快递”,且用户选定的应用程序为“视频”,则第一应用程序可以生成包括“第二设备标识码、指示订阅视频的信息”的信息。指示订阅视频的信息表示第一设备需要获取第二设备的视频数据,即指示订阅视频的信息也可理解为上述的同步数据的订阅信息。Finally, the first application may respond to the user operation, determine the application selected by the user according to the user operation, and generate subscription parameters according to the application selected by the user. For example, if the subscribable program information represents "application programs that can generate synchronized data in the second device include: video, itinerary, express delivery", and the application program selected by the user is "video", the first application program can generate a program including " Second device identification code, information indicating subscription video" information. The information indicating the subscription of the video indicates that the first device needs to obtain the video data of the second device, that is, the information indicating the subscription of the video may also be understood as the above-mentioned subscription information of the synchronization data.
如此,第二设备可以将能够提供同步数据的应用程序发送给第一设备,第一设备可以输出第二设备的服务能力(即可订阅程序信息),以便用户根据需求对第二设备反馈的同步数据进行定制,以减少不必要的数据同步操作,从而进一步提高数据同步效率。In this way, the second device can send the application program that can provide synchronization data to the first device, and the first device can output the service capability of the second device (that is, subscribe to program information), so that the user can synchronize the feedback of the second device according to the needs. Data is customized to reduce unnecessary data synchronization operations, thereby further improving data synchronization efficiency.
S602,第一总线服务接收来自第一应用程序的订阅参数,并向第一SensorHub发 送该订阅参数。S602, the first bus service receives the subscription parameter from the first application, and sends the subscription parameter to the first SensorHub.
可选地,第一总线服务在接收到订阅参数后,可以保存该订阅参数。如此,在后续的数据同步过程中,第一总线服务可以根据该订阅参数向第一SensorHub发送同步指令,以主动从第一SensorHub获取同步数据。例如,在工作状态下,第一总线服务可以周期性地向第一SensorHub发送同步指令,以周期性地从第一SensorHub获取同步数据。Optionally, after receiving the subscription parameters, the first bus service may save the subscription parameters. In this way, in the subsequent data synchronization process, the first bus service can send a synchronization command to the first SensorHub according to the subscription parameter, so as to actively obtain synchronization data from the first SensorHub. For example, in a working state, the first bus service may periodically send a synchronization command to the first SensorHub to periodically obtain synchronization data from the first SensorHub.
可选地,第一总线服务在向第一SensorHub发送该订阅参数后,第一AP可以进入休眠状态。Optionally, after the first bus service sends the subscription parameter to the first SensorHub, the first AP may enter a sleep state.
S603,第一SensorHub接收来自第一总线服务的订阅参数,并向第二SensorHub发送该订阅参数。S603, the first SensorHub receives the subscription parameter from the first bus service, and sends the subscription parameter to the second SensorHub.
可选地,第一SensorHub在接收到订阅参数后,可以保存该订阅参数。Optionally, after receiving the subscription parameters, the first SensorHub may save the subscription parameters.
S604,若第二SensorHub存储有同步数据,则第二SensorHub根据订阅参数向第一SensorHub发送该同步数据。S604, if the second SensorHub stores the synchronization data, the second SensorHub sends the synchronization data to the first SensorHub according to the subscription parameter.
可选地,第二SensorHub在接收到订阅参数后,可以保存该订阅参数。如此,在后续的数据同步过程中,若第二SensorHub接收到新的需要发送给第一设备的同步数据,则可以直接根据该订阅参数向第一SensorHub发送该同步数据,而不必再次由第一设备发送订阅参数,进而减少数据同步的步骤,提高同步效率。Optionally, after receiving the subscription parameters, the second SensorHub may save the subscription parameters. In this way, in the subsequent data synchronization process, if the second SensorHub receives new synchronization data that needs to be sent to the first device, it can directly send the synchronization data to the first SensorHub according to the subscription parameters, without having to send the synchronization data to the first SensorHub again. The device sends subscription parameters, thereby reducing data synchronization steps and improving synchronization efficiency.
S605,若第二AP处于休眠状态,则第二SensorHub等待第二AP唤醒。S605, if the second AP is in a dormant state, the second SensorHub waits for the second AP to wake up.
S606,若第二AP处于休眠状态,则第二SensorHub向第二AP发送唤醒指令,以主动唤醒第二AP。S606, if the second AP is in a dormant state, the second SensorHub sends a wake-up instruction to the second AP to actively wake up the second AP.
S607,在第二AP处于工作状态时,第二SensorHub向第二总线服务发送订阅参数。S607, when the second AP is in the working state, the second SensorHub sends the subscription parameter to the second bus service.
S608,第二总线服务接收来自第二SensorHub的订阅参数,并向第二应用程序发送该订阅参数。S608, the second bus service receives the subscription parameters from the second SensorHub, and sends the subscription parameters to the second application.
S609,第二应用程序根据订阅参数获取第二应用程序生成的同步数据。S609, the second application acquires the synchronization data generated by the second application according to the subscription parameter.
可选地,第二总线服务在接收到订阅参数后,可以保存该订阅参数。如此,在后续的数据同步过程中,第二总线服务可以根据该订阅参数向第二应用程序发送获取指令(用于指示获取第二应用程序生成的同步数据),以主动从第二应用程序获取同步数据。例如,在工作状态下,第二总线服务可以周期性地向第二应用程序发送获取指令,以周期性地从第二应用程序获取同步数据。Optionally, after receiving the subscription parameters, the second bus service may save the subscription parameters. In this way, in the subsequent data synchronization process, the second bus service can send an acquisition instruction (used to instruct to acquire the synchronization data generated by the second application) to the second application according to the subscription parameter, so as to actively acquire from the second application Synchronous Data. For example, in a working state, the second bus service may periodically send an acquisition instruction to the second application to acquire synchronization data from the second application periodically.
上述S601-S609为基于订阅参数建立订阅关系的流程,下面详细说明同步数据的同步流程。The above-mentioned S601-S609 are the processes of establishing a subscription relationship based on subscription parameters, and the synchronization process of synchronizing data will be described in detail below.
如图6所示,同步数据的同步流程可以包括如下S610-S616:As shown in FIG. 6 , the synchronization process of synchronizing data may include the following S610-S616:
S610,第二应用程序向第二总线服务发送同步数据。S610, the second application sends synchronization data to the second bus service.
可选地,第二应用程序在第二总线服务发送同步数据后,可以在生成新的同步数据时,主动向第二总线服务发送新的同步数据,如此能够将新生成的同步数据及时反馈给第一设备,提高数据同步效率。Optionally, after the second bus service sends the synchronization data, the second application can actively send the new synchronization data to the second bus service when generating new synchronization data, so that the newly generated synchronization data can be fed back to the second bus service in time. The first device improves data synchronization efficiency.
S611,第二总线服务接收来自第二应用程序的同步数据,并向第二SensorHub发送该同步数据。S611, the second bus service receives the synchronization data from the second application, and sends the synchronization data to the second SensorHub.
可选地,第二总线服务在向第二SensorHub发送同步数据后,第二AP可以进入休眠状态。Optionally, after the second bus service sends synchronization data to the second SensorHub, the second AP may enter a sleep state.
S612,第二SensorHub接收来自第二总线服务的同步数据,并向第一SensorHub发送该同步数据。S612, the second SensorHub receives the synchronization data from the second bus service, and sends the synchronization data to the first SensorHub.
S613,第一总线服务向第一SensorHub发送同步指令。S613, the first bus service sends a synchronization command to the first SensorHub.
其中,同步指令用于获取来自第二设备的同步数据。The synchronization instruction is used to acquire synchronization data from the second device.
进而可选地,若第一SensorHub接收到来自第一总线服务的同步指令,则可以根据该同步指令向第一处理器发送同步数据。Further optionally, if the first SensorHub receives a synchronization instruction from the first bus service, it may send synchronization data to the first processor according to the synchronization instruction.
S614,若第一SensorHub检测到第一AP处于工作状态,则第一SensorHub向第一总线服务发送同步数据。S614, if the first SensorHub detects that the first AP is in a working state, the first SensorHub sends synchronization data to the first bus service.
S615,第一总线服务接收来自第一SensorHub的同步数据,并向第一应用程序发送该同步数据。S615, the first bus service receives the synchronization data from the first SensorHub, and sends the synchronization data to the first application.
S616,第一应用程序输出该同步数据。S616, the first application program outputs the synchronization data.
可以理解,在执行完上述S601-S609后,由于第二SensorHub、第二总线服务和第二应用程序均接收到了来自第一设备的订阅参数,第二设备后续再有同步数据生成时,可以直接根据该订阅参数反馈给第一设备,即第一设备与第二设备之间已经基于订阅参数建立了订阅关系。也即是说,第一设备和第二设备之间在进行数据同步时,首先执行上述S601-S609,建立完第一设备和第二设备之间订阅关系后,后续第二设备的第二应用程序若有新的同步数据生成时,可直接执行S610-S616(不必再次执行S601-S609),以高效地进行数据的同步。It can be understood that after the execution of the above S601-S609, since the second SensorHub, the second bus service and the second application have all received the subscription parameters from the first device, when the second device generates synchronous data subsequently, it can directly Feedback to the first device according to the subscription parameter, that is, a subscription relationship has been established between the first device and the second device based on the subscription parameter. That is to say, when data synchronization is performed between the first device and the second device, the above-mentioned S601-S609 are first performed, and after the subscription relationship between the first device and the second device is established, the second application of the second device follows. When new synchronization data is generated in the program, S610-S616 can be directly executed (it is not necessary to execute S601-S609 again) to efficiently synchronize data.
需要说明的是,图6示出的数据同步方法实施例中未提及的部分,可参考上述图5示出的数据同步方法实施例中相应内容,例如,S604可以参照S502-6,S605可以参照S502-8,S606可以参照S502-7,S609可以参照S502-9,S613可以参照S503-2,S614可以参照S503-1等等,在此不作赘述。It should be noted that, for parts not mentioned in the data synchronization method embodiment shown in FIG. 6, reference may be made to the corresponding content in the data synchronization method embodiment shown in FIG. 5. For example, S604 may refer to S502-6, and S605 may refer to Refer to S502-8 for S606, refer to S502-7 for S609, refer to S502-9 for S609, refer to S503-2 for S613, refer to S503-1 for S614, etc., which will not be repeated here.
下面结合实际应用场景对上述方法实施例的有益效果作进一步阐述。The beneficial effects of the above method embodiments are further described below in combination with practical application scenarios.
如下表1所示,表1示出了在实验室中,手机在不同场景、不同模块的同一测试过程的功耗。其中,表1采集自广播周期1秒,扫描占空比为10%(2.3毫安)的某品牌手机,该某品牌手机的测试时间10分钟,平均6秒收到一个广播,一次广播平均唤醒AP时间3.5秒。As shown in Table 1 below, Table 1 shows the power consumption of the mobile phone in the same test process of different scenarios and different modules in the laboratory. Among them, Table 1 is collected from a mobile phone of a certain brand with a broadcast cycle of 1 second and a scanning duty cycle of 10% (2.3 mA). The test time of the mobile phone of a certain brand is 10 minutes, an average of 6 seconds to receive a broadcast, and an average wake-up of a broadcast AP time 3.5 seconds.
表1Table 1
Figure PCTCN2021126219-appb-000001
Figure PCTCN2021126219-appb-000001
Figure PCTCN2021126219-appb-000002
Figure PCTCN2021126219-appb-000002
其中可以看到,在不同的运行场景下,“AP功耗增量”的功耗值均远远大于“SensorHub功耗增量”的功耗值。例如,在“手机1秒一个广播”的场景下,手机的测试时间为10分钟,平均6秒收到一个广播,一次广播平均唤醒AP时间3.5秒,期间“整机功耗”为34毫安,而“AP功耗增量”的功耗值为24.35毫安,“SensorHub功耗增量”的功耗值仅为0.008毫安。It can be seen that in different operating scenarios, the power consumption value of "AP power consumption increment" is much larger than that of "SensorHub power consumption increment". For example, in the scenario of "one broadcast per second on a mobile phone", the test time of the mobile phone is 10 minutes, and an average of 6 seconds to receive a broadcast, the average time to wake up the AP for one broadcast is 3.5 seconds, and the "machine power consumption" during this period is 34 mA , while the power consumption value of "AP power consumption increment" is 24.35 mA, and the power consumption value of "SensorHub power consumption increment" is only 0.008 mA.
显然,“使用数据同步器完成数据同步功能,不需要处理器参与”的方式可以极大地降低设备功耗,且设备不需频繁地唤醒AP,即,本申请实施例提供的数据同步方法可以降低设备与设备之间在进行数据的同步时的功耗。并且,由于设备与设备之间不需要重新建立通信连接,且AP与SensorHub之间的数据传输速度很快,因此,本申请实施例提供的方法还能够提高数据同步效率。Obviously, the method of "using the data synchronizer to complete the data synchronization function without the participation of the processor" can greatly reduce the power consumption of the device, and the device does not need to wake up the AP frequently, that is, the data synchronization method provided by the embodiment of the present application can reduce the power consumption of the device Power consumption when synchronizing data between devices. Furthermore, since the communication connection between the devices does not need to be re-established, and the data transmission speed between the AP and the SensorHub is fast, the method provided by the embodiment of the present application can also improve the data synchronization efficiency.
另外,SensorHub的电池端电流值的计算可以参照如下公式:In addition, the calculation of the battery terminal current value of SensorHub can refer to the following formula:
Figure PCTCN2021126219-appb-000003
Figure PCTCN2021126219-appb-000003
其中,在实际应用场景下,SensorHub工作电压可以为0.75V(伏特),SensorHub工作电流可以为11毫安,电池电压可以为3.8V,传输损失率的经验值可以为0.58。Among them, in the actual application scenario, the operating voltage of the SensorHub can be 0.75V (volts), the operating current of the SensorHub can be 11 mA, the battery voltage can be 3.8V, and the empirical value of the transmission loss rate can be 0.58.
因此,根据上述公式可以计算出SensorHub的电池端电流值为3.74毫安,而现有的数据同步技术需要的工作电流为49毫安。Therefore, according to the above formula, the battery terminal current value of SensorHub can be calculated to be 3.74 mA, while the operating current required by the existing data synchronization technology is 49 mA.
进而,在实际应用中,由于SensorHub处理一次广播数据约2ms(毫秒),如果按10min(分钟)处理100次广播计算,则通过应用SensorHub实时地接收/发送同步数据(即应用上述图5或图6所示的方法实施例),设备增加的功耗约为:3.74*(0.002*100/600)=0.001毫安。Furthermore, in practical applications, since SensorHub processes broadcast data for about 2ms (milliseconds) once, if 100 broadcast calculations are processed in 10min (minutes), the synchronized data is received/sent in real time by applying SensorHub (that is, applying the above Figure 5 or Figure 5). 6), the increased power consumption of the device is about: 3.74*(0.002*100/600)=0.001 mA.
而若应用现有的数据同步技术来进行数据同步,由于现有的数据同步技术需要的工作电流为49毫安,则应用现有的数据同步技术时,设备增加的功耗约为:49*3.74*(0.002*100/600)=0.016毫安。If the existing data synchronization technology is used for data synchronization, since the operating current required by the existing data synchronization technology is 49 mA, when the existing data synchronization technology is applied, the increased power consumption of the device is about: 49* 3.74*(0.002*100/600)=0.016 mA.
显然,相较于现有的数据同步技术,本申请实施例可以降低第一设备和第二设备的功耗,且提高数据同步效率。Obviously, compared with the existing data synchronization technology, the embodiment of the present application can reduce the power consumption of the first device and the second device, and improve the data synchronization efficiency.
应理解,基于图5-图6中任一项所示出的数据同步方法,第一设备的数据同步功能可以由第一数据同步器来完成,第二设备的数据同步功能可以由第二数据同步器来完成,即数据同步功能可以由数据同步器完成,且不需要处理器参与。如此,可以实 现即使第一处理器处于休眠状态,第一数据同步器也可以从第二数据同步器实时地接收同步数据,并且即使第二处理器处于进入休眠状态,第二数据同步器也可以向第一设备发送同步数据。进而,本申请实施例可以降低第一设备和第二设备的功耗,且提高数据同步效率。It should be understood that, based on the data synchronization method shown in any one of FIG. 5-FIG. 6, the data synchronization function of the first device can be completed by the first data synchronizer, and the data synchronization function of the second device can be completed by the second data synchronization function. Synchronizer to complete, that is, the data synchronization function can be completed by the data synchronizer, and does not require the participation of the processor. In this way, even if the first processor is in a sleep state, the first data synchronizer can receive synchronization data from the second data synchronizer in real time, and even if the second processor is in a sleep state, the second data synchronizer can also Send synchronization data to the first device. Furthermore, the embodiments of the present application can reduce the power consumption of the first device and the second device, and improve the data synchronization efficiency.
以上结合图5-图6详细说明了本申请实施例提供的数据同步方法。以下结合图7-图9详细说明用于执行本申请实施例提供的数据同步方法的通信装置。The data synchronization method provided by the embodiments of the present application has been described in detail above with reference to FIGS. 5 to 6 . A communication apparatus for executing the data synchronization method provided by the embodiments of the present application will be described in detail below with reference to FIGS. 7 to 9 .
示例性地,图7是本申请实施例提供的通信装置的结构示意图一。如图7所示,通信装置700包括:第一处理器701和第一数据同步器702。为了便于说明,图7仅示出了该通信装置的主要部件。Exemplarily, FIG. 7 is a first structural schematic diagram of a communication apparatus provided by an embodiment of the present application. As shown in FIG. 7 , the communication apparatus 700 includes: a first processor 701 and a first data synchronizer 702 . For convenience of description, FIG. 7 only shows the main components of the communication device.
一些实施例中,通信装置700可适用于图2中所示出的无线通信系统中,执行图5或图6中所示出的数据同步方法中第一设备的功能。In some embodiments, the communication apparatus 700 may be applied to the wireless communication system shown in FIG. 2 to perform the function of the first device in the data synchronization method shown in FIG. 5 or FIG. 6 .
其中,第一数据同步器702,用于接收来自第二设备的同步数据,并向第一处理器701发送同步数据。The first data synchronizer 702 is configured to receive synchronization data from the second device and send the synchronization data to the first processor 701 .
一种可能的设计方案中,第一数据同步器702,用于在第一处理器701处于休眠状态下接收来自第二设备的同步数据,并在第一处理器701处于工作状态下向第一处理器701发送同步数据。In a possible design solution, the first data synchronizer 702 is configured to receive synchronization data from the second device when the first processor 701 is in a dormant state, and send synchronization data to the first device when the first processor 701 is in a working state. Processor 701 sends synchronization data.
可选地,第一数据同步器702,用于若检测到第一处理器701处于工作状态,则向第一处理器701发送同步数据。Optionally, the first data synchronizer 702 is configured to send synchronization data to the first processor 701 if it is detected that the first processor 701 is in a working state.
或者,可选地,第一数据同步器702,用于接收来自第一处理器701的同步指令,并根据同步指令向第一处理器701发送同步数据。其中,同步指令用于获取来自第二设备的同步数据。Or, optionally, the first data synchronizer 702 is configured to receive a synchronization instruction from the first processor 701, and send synchronization data to the first processor 701 according to the synchronization instruction. The synchronization instruction is used to obtain synchronization data from the second device.
另一种可能的设计方案中,第一数据同步器702,还用于在向第一处理器701发送同步数据之前,若检测到第一处理器701处于休眠状态,则主动唤醒第一处理器701。In another possible design solution, the first data synchronizer 702 is further configured to actively wake up the first processor if it is detected that the first processor 701 is in a sleep state before sending the synchronization data to the first processor 701 701.
又一种可能的设计方案中,第一数据同步器702,还用于接收来自第一处理器701的订阅参数,并向第二设备发送订阅参数。其中,订阅参数用于通信装置700获取来自第二设备的同步数据。In another possible design solution, the first data synchronizer 702 is further configured to receive the subscription parameters from the first processor 701 and send the subscription parameters to the second device. The subscription parameter is used for the communication apparatus 700 to obtain synchronization data from the second device.
再一种可能的设计方案中,第一处理器701,还用于输出同步数据。In another possible design solution, the first processor 701 is further configured to output synchronization data.
可选地,第一数据同步器702可以包括接收器和发送器(图7中未示出)。其中,第一数据同步器702用于实现通信装置700的发送功能和接收功能。Optionally, the first data synchronizer 702 may include a receiver and a transmitter (not shown in FIG. 7 ). The first data synchronizer 702 is used to implement the sending function and the receiving function of the communication device 700 .
可选地,通信装置700还可以包括存储器(图7中未示出),该存储器存储有程序或指令。当第一处理器701、第一数据同步器702执行该程序或指令时,使得该通信装置700可以执行图5-图6中任一项所示出的数据同步方法中第一设备的功能。Optionally, the communication apparatus 700 may further include a memory (not shown in FIG. 7 ), which stores programs or instructions. When the first processor 701 and the first data synchronizer 702 execute the program or instruction, the communication apparatus 700 can execute the function of the first device in the data synchronization method shown in any one of FIGS. 5-6 .
应理解,通信装置700中涉及的第一处理器701可以由处理器或处理器相关电路组件实现,可以为处理器或处理单元;第一数据同步器702可以由收发器或收发器相关电路组件实现,可以为收发器或收发单元。It should be understood that the first processor 701 involved in the communication apparatus 700 may be implemented by a processor or a processor-related circuit component, and may be a processor or a processing unit; the first data synchronizer 702 may be a transceiver or a transceiver-related circuit component The implementation can be a transceiver or a transceiver unit.
需要说明的是,通信装置700可以是终端设备或网络设备,也可以是可设置于终端设备或网络设备的芯片(系统)或其他部件或组件,还可以是包含终端设备或网络设备的装置,本申请对此不做限定。It should be noted that the communication device 700 may be a terminal device or a network device, or a chip (system) or other components or components that can be provided in the terminal device or the network device, or a device including the terminal device or the network device, This application does not limit this.
此外,通信装置700的技术效果可以参考图5-图6中任一项所示出的数据同步方 法的技术效果,此处不再赘述。In addition, for the technical effect of the communication apparatus 700, reference may be made to the technical effect of the data synchronization method shown in any one of FIG. 5-FIG. 6, which will not be repeated here.
示例性地,图8是本申请实施例提供的通信装置的结构示意图二。如图8所示,通信装置800包括:第二处理器801和第二数据同步器802。为了便于说明,图8仅示出了通信装置800的主要部件。Exemplarily, FIG. 8 is a second schematic structural diagram of a communication apparatus provided by an embodiment of the present application. As shown in FIG. 8 , the communication apparatus 800 includes: a second processor 801 and a second data synchronizer 802 . For convenience of explanation, FIG. 8 only shows the main components of the communication device 800 .
一些实施例中,通信装置800可适用于图2中所示出的无线通信系统中,执行图5或图6中所示出的数据同步方法中第二设备的功能。In some embodiments, the communication apparatus 800 can be applied to the wireless communication system shown in FIG. 2 to perform the function of the second device in the data synchronization method shown in FIG. 5 or FIG. 6 .
其中,第二数据同步器802,用于接收来自第二处理器801的同步数据,并向第一设备发送同步数据。The second data synchronizer 802 is configured to receive synchronization data from the second processor 801 and send the synchronization data to the first device.
一种可能的设计方案中,第二数据同步器802,用于在第二处理器801处于休眠状态下,向第一设备发送同步数据。In a possible design solution, the second data synchronizer 802 is configured to send synchronization data to the first device when the second processor 801 is in a sleep state.
可选地,第二数据同步器802,用于根据订阅参数向第一设备发送同步数据。其中,订阅参数用于第一设备获取来自通信装置800的同步数据。Optionally, the second data synchronizer 802 is configured to send synchronization data to the first device according to the subscription parameters. The subscription parameter is used by the first device to obtain synchronization data from the communication apparatus 800 .
进一步地,第二数据同步器802,还用于在根据订阅参数向第一设备发送同步数据之前,接收来自第一设备的订阅参数。Further, the second data synchronizer 802 is further configured to receive the subscription parameters from the first device before sending the synchronization data to the first device according to the subscription parameters.
进一步地,第二数据同步器802,还用于在接收来自第一设备的订阅参数之后,向第二处理器801发送订阅参数。Further, the second data synchronizer 802 is further configured to send the subscription parameters to the second processor 801 after receiving the subscription parameters from the first device.
进一步地,第二数据同步器802,还用于在向第二处理器801发送订阅参数之前,若存储有同步数据,则根据订阅参数向第一设备发送同步数据。Further, the second data synchronizer 802 is further configured to send the synchronization data to the first device according to the subscription parameters if synchronization data is stored before sending the subscription parameters to the second processor 801 .
进一步地,第二数据同步器802,还用于在向第二处理器801发送订阅参数之前,若第二处理器801处于休眠状态,则唤醒第二处理器801;或者,第二数据同步器802,还用于在向第二处理器801发送订阅参数之前,若第二处理器801处于休眠状态,则等待第二处理器801唤醒。Further, the second data synchronizer 802 is further configured to wake up the second processor 801 if the second processor 801 is in a dormant state before sending the subscription parameters to the second processor 801; or, the second data synchronizer 802 is further configured to wait for the second processor 801 to wake up if the second processor 801 is in a dormant state before sending the subscription parameters to the second processor 801 .
另一种可能的设计方案中,第二处理器801,还用于接收到来自第二数据同步器802的订阅参数,并根据订阅参数获取应用程序生成的同步数据,以及向第二数据同步器802发送同步数据。In another possible design solution, the second processor 801 is further configured to receive the subscription parameters from the second data synchronizer 802, obtain the synchronization data generated by the application according to the subscription parameters, and send the data to the second data synchronizer. 802 Send synchronization data.
可选地,第二数据同步器802也可以称为收发器。该收发器可以包括接收器和发送器(图8中未示出)。其中,收发器用于实现通信装置800的发送功能和接收功能。Optionally, the second data synchronizer 802 may also be referred to as a transceiver. The transceiver may include a receiver and a transmitter (not shown in Figure 8). The transceiver is used to implement the sending function and the receiving function of the communication device 800 .
可选地,通信装置800还可以包括存储器(图8中未示出),该存储器存储有程序或指令。当第二处理器801、第二数据同步器802执行该程序或指令时,使得该通信装置800可以执行图5-图6中任一项所示出的数据同步方法中第二设备的功能。Optionally, the communication device 800 may further include a memory (not shown in FIG. 8 ), which stores programs or instructions. When the second processor 801 and the second data synchronizer 802 execute the program or instruction, the communication apparatus 800 can perform the function of the second device in the data synchronization method shown in any one of FIGS. 5-6 .
应理解,通信装置800中涉及的第二处理器801可以由处理器或处理器相关电路组件实现,可以为处理器或处理单元;第二数据同步器802可以由收发器或收发器相关电路组件实现,可以为收发器或收发单元。It should be understood that the second processor 801 involved in the communication apparatus 800 may be implemented by a processor or a processor-related circuit component, and may be a processor or a processing unit; the second data synchronizer 802 may be a transceiver or a transceiver-related circuit component The implementation can be a transceiver or a transceiver unit.
需要说明的是,通信装置800可以是终端设备或网络设备,也可以是可设置于终端设备或网络设备的芯片(系统)或其他部件或组件,还可以是包含终端设备或网络设备的装置,本申请对此不做限定。It should be noted that the communication apparatus 800 may be a terminal device or a network device, or a chip (system) or other components or components that can be provided in the terminal device or the network device, or may be a device including the terminal device or the network device, This application does not limit this.
此外,通信装置800的技术效果可以参考图5-图6中任一项所示出的数据同步方法的技术效果,此处不再赘述。In addition, for the technical effect of the communication apparatus 800, reference may be made to the technical effect of the data synchronization method shown in any one of FIG. 5-FIG. 6, which will not be repeated here.
示例性地,图9为本申请实施例提供的通信装置的结构示意图三。该通信装置可 以是终端设备或网络设备,也可以是可设置于终端设备或网络设备的芯片(系统)或其他部件或组件。如图9所示,通信装置900可以包括处理器901。可选地,通信装置900还可以包括存储器902和/或收发器903。其中,处理器901与存储器902和收发器903耦合,如可以通过通信总线连接。Exemplarily, FIG. 9 is a third schematic structural diagram of a communication apparatus provided by an embodiment of the present application. The communication device may be a terminal device or a network device, or may be a chip (system) or other components or assemblies that can be provided in the terminal device or the network device. As shown in FIG. 9 , the communication apparatus 900 may include a processor 901 . Optionally, the communication device 900 may further include a memory 902 and/or a transceiver 903 . Wherein, the processor 901 is coupled with the memory 902 and the transceiver 903, such as can be connected through a communication bus.
下面结合图9对通信装置900的各个构成部件进行具体的介绍:Each component of the communication device 900 will be described in detail below with reference to FIG. 9 :
其中,处理器901是通信装置900的控制中心,可以是一个处理器,也可以是多个处理元件的统称。例如,处理器901是一个或多个中央处理器(central processing unit,CPU),也可以是特定集成电路(application specific integrated circuit,ASIC),或者是被配置成实施本申请实施例的一个或多个集成电路,例如:一个或多个微处理器(digital signal processor,DSP),或,一个或者多个现场可编程门阵列(field programmable gate array,FPGA)。The processor 901 is the control center of the communication device 900, which may be one processor or a general term for multiple processing elements. For example, the processor 901 is one or more central processing units (CPUs), may also be a specific integrated circuit (application specific integrated circuit, ASIC), or is configured to implement one or more of the embodiments of the present application An integrated circuit, such as: one or more microprocessors (digital signal processor, DSP), or, one or more field programmable gate array (field programmable gate array, FPGA).
可选地,处理器901可以通过运行或执行存储在存储器902内的软件程序,以及调用存储在存储器902内的数据,执行通信装置900的各种功能。Optionally, the processor 901 may execute various functions of the communication device 900 by running or executing software programs stored in the memory 902 and calling data stored in the memory 902 .
在具体的实现中,作为一种实施例,处理器901可以包括一个或多个CPU,例如图9中所示出的CPU0和CPU1。In a specific implementation, as an embodiment, the processor 901 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG. 9 .
在具体实现中,作为一种实施例,通信装置900也可以包括多个处理器,例如图9中所示的处理器901和处理器904。这些处理器中的每一个可以是一个单核处理器(single-CPU),也可以是一个多核处理器(multi-CPU)。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。In a specific implementation, as an embodiment, the communication apparatus 900 may also include multiple processors, for example, the processor 901 and the processor 904 shown in FIG. 9 . Each of these processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
其中,所述存储器902用于存储执行本申请方案的软件程序,并由处理器901来控制执行,具体实现方式可以参考上述方法实施例,此处不再赘述。The memory 902 is used to store the software program for executing the solution of the present application, and is controlled and executed by the processor 901. For the specific implementation, reference may be made to the above method embodiments, which will not be repeated here.
可选地,存储器902可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器902可以和处理器901集成在一起,也可以独立存在,并通过通信装置900的接口电路(图9中未示出)与处理器901耦合,本申请实施例对此不作具体限定。Alternatively, memory 902 may be read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM), or other types of static storage devices that can store information and instructions. Other types of dynamic storage devices for instructions, which may also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM), or other optical disks storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), magnetic disk storage medium or other magnetic storage device, or capable of carrying or storing desired program code in the form of instructions or data structures and any other medium that can be accessed by a computer, but is not limited thereto. The memory 902 may be integrated with the processor 901, or may exist independently, and be coupled to the processor 901 through an interface circuit (not shown in FIG. 9) of the communication device 900, which is not specifically limited in this embodiment of the present application.
收发器903,用于与其他通信装置之间的通信。例如,通信装置900为终端设备,收发器903可以用于与网络设备通信,或者与另一个终端设备通信。又例如,通信装置900为网络设备,收发器903可以用于与终端设备通信,或者与另一个网络设备通信。The transceiver 903 is used for communication with other communication devices. For example, the communication apparatus 900 is a terminal device, and the transceiver 903 may be used to communicate with a network device or communicate with another terminal device. For another example, the communication apparatus 900 is a network device, and the transceiver 903 can be used to communicate with a terminal device or communicate with another network device.
可选地,收发器903可以包括接收器和发送器(图9中未单独示出)。其中,接收器用于实现接收功能,发送器用于实现发送功能。Optionally, transceiver 903 may include a receiver and a transmitter (not shown separately in FIG. 9). Among them, the receiver is used to realize the receiving function, and the transmitter is used to realize the sending function.
可选地,收发器903可以和处理器901集成在一起,也可以独立存在,并通过通信装置900的接口电路(图9中未示出)与处理器901耦合,本申请实施例对此不作 具体限定。Optionally, the transceiver 903 may be integrated with the processor 901, or may exist independently, and be coupled to the processor 901 through an interface circuit (not shown in FIG. 9 ) of the communication device 900, which is not made in this embodiment of the present application Specific restrictions.
需要说明的是,图9中示出的通信装置900的结构并不构成对该通信装置的限定,实际的通信装置可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。It should be noted that the structure of the communication device 900 shown in FIG. 9 does not constitute a limitation on the communication device, and an actual communication device may include more or less components than those shown in the figure, or combine some components, or Different component arrangements.
此外,通信装置900的技术效果可以参考上述方法实施例所述的数据同步方法的技术效果,此处不再赘述。In addition, for the technical effect of the communication apparatus 900, reference may be made to the technical effect of the data synchronization method described in the above method embodiments, and details are not described herein again.
本申请实施例还提供一种芯片系统,包括:处理器,所述处理器与存储器耦合,所述存储器用于存储程序或指令,当所述程序或指令被所述处理器执行时,使得该芯片系统实现上述任一方法实施例中的方法。An embodiment of the present application further provides a chip system, including: a processor, where the processor is coupled with a memory, the memory is used to store a program or an instruction, and when the program or instruction is executed by the processor, the The chip system implements the method in any of the foregoing method embodiments.
可选地,该芯片系统中的处理器可以为一个或多个。该处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现。Optionally, the number of processors in the chip system may be one or more. The processor can be implemented by hardware or by software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, or the like. When implemented in software, the processor may be a general-purpose processor implemented by reading software codes stored in memory.
可选地,该芯片系统中的存储器也可以为一个或多个。该存储器可以与处理器集成在一起,也可以和处理器分离设置,本申请并不限定。示例性的,存储器可以是非瞬时性处理器,例如只读存储器ROM,其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请对存储器的类型,以及存储器与处理器的设置方式不作具体限定。Optionally, there may also be one or more memories in the chip system. The memory may be integrated with the processor, or may be provided separately from the processor, which is not limited in this application. Exemplarily, the memory can be a non-transitory processor, such as a read-only memory ROM, which can be integrated with the processor on the same chip, or can be provided on different chips. The setting method of the processor is not particularly limited.
示例性的,该芯片系统可以是现场可编程门阵列(field programmable gate array,FPGA),可以是专用集成芯片(application specific integrated circuit,ASIC),还可以是系统芯片(system on chip,SoC),还可以是中央处理器(central processor unit,CPU),还可以是网络处理器(network processor,NP),还可以是数字信号处理电路(digital signal processor,DSP),还可以是微控制器(micro controller unit,MCU),还可以是可编程控制器(programmable logic device,PLD)或其他集成芯片。Exemplarily, the system-on-chip may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), or a system on chip (SoC), It can also be a central processing unit (CPU), a network processor (NP), a digital signal processing circuit (DSP), or a microcontroller (microcontroller). controller unit, MCU), it can also be a programmable logic device (PLD) or other integrated chips.
本申请实施例提供一种通信系统。该通信系统包括上述第一设备和第二设备。Embodiments of the present application provide a communication system. The communication system includes the above-mentioned first device and second device.
应理解,在本申请实施例中的处理器可以是中央处理单元(central processing unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that the processor in the embodiments of the present application may be a central processing unit (central processing unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (digital signal processors, DSP), dedicated integrated Circuit (application specific integrated circuit, ASIC), off-the-shelf programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
还应理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的随机存取存储器(random access memory,RAM)可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(DRAM)、同步动态随机存取存储器(synchronous  DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。It should also be understood that the memory in the embodiments of the present application may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically programmable Erase programmable read-only memory (electrically EPROM, EEPROM) or flash memory. Volatile memory may be random access memory (RAM), which acts as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (DRAM) Access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory Fetch memory (synchlink DRAM, SLDRAM) and direct memory bus random access memory (direct rambus RAM, DR RAM).
上述实施例,可以全部或部分地通过软件、硬件(如电路)、固件或其他任意组合来实现。当使用软件实现时,上述实施例可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令或计算机程序。在计算机上加载或执行所述计算机指令或计算机程序时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以为通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集合的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质。半导体介质可以是固态硬盘。The above embodiments may be implemented in whole or in part by software, hardware (eg, circuits), firmware, or any other combination. When implemented in software, the above-described embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer may be a general purpose computer, special purpose computer, computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server, or data center Transmission to another website site, computer, server or data center by wire (eg, infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that contains one or more sets of available media. The usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media. The semiconductor medium may be a solid state drive.
应理解,本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况,其中A,B可以是单数或者复数。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系,但也可能表示的是一种“和/或”的关系,具体可参考前后文进行理解。It should be understood that the term "and/or" in this document is only an association relationship to describe associated objects, indicating that there can be three kinds of relationships, for example, A and/or B, which can mean that A exists alone, and A and B exist at the same time , there are three cases of B alone, where A and B can be singular or plural. In addition, the character "/" in this document generally indicates that the related objects before and after are an "or" relationship, but may also indicate an "and/or" relationship, which can be understood with reference to the context.
本申请中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。In this application, "at least one" means one or more, and "plurality" means two or more. "At least one item(s) below" or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (a) of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c may be single or multiple .
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that, in various embodiments of the present application, the size of the sequence numbers of the above-mentioned processes does not mean the sequence of execution, and the execution sequence of each process should be determined by its functions and internal logic, and should not be dealt with in the embodiments of the present application. implementation constitutes any limitation.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described systems, devices and units may refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执 行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution, and the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this. should be covered within the scope of protection of this application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (33)

  1. 一种数据同步方法,其特征在于,应用于第一设备,所述第一设备包括第一数据同步器和第一处理器,所述方法包括:A data synchronization method, characterized in that it is applied to a first device, the first device includes a first data synchronizer and a first processor, and the method includes:
    所述第一数据同步器接收来自第二设备的同步数据;the first data synchronizer receives synchronization data from the second device;
    所述第一数据同步器向所述第一处理器发送所述同步数据。The first data synchronizer sends the synchronization data to the first processor.
  2. 根据权利要求1所述的方法,其特征在于,所述第一数据同步器向所述第一处理器发送所述同步数据,包括:The method according to claim 1, wherein sending the synchronization data to the first processor by the first data synchronizer comprises:
    若所述第一数据同步器检测到所述第一处理器处于工作状态,则所述第一数据同步器向所述第一处理器发送所述同步数据。If the first data synchronizer detects that the first processor is in a working state, the first data synchronizer sends the synchronization data to the first processor.
  3. 根据权利要求1所述的方法,其特征在于,所述第一数据同步器向所述第一处理器发送所述同步数据,包括:The method according to claim 1, wherein sending the synchronization data to the first processor by the first data synchronizer comprises:
    所述第一数据同步器接收来自所述第一处理器的同步指令;所述同步指令用于获取来自所述第二设备的所述同步数据;The first data synchronizer receives a synchronization instruction from the first processor; the synchronization instruction is used to obtain the synchronization data from the second device;
    所述第一数据同步器根据所述同步指令向所述第一处理器发送所述同步数据。The first data synchronizer sends the synchronization data to the first processor according to the synchronization instruction.
  4. 根据权利要求1-3中任意一项所述的方法,其特征在于,在所述第一数据同步器向所述第一处理器发送所述同步数据之前,所述方法还包括:The method according to any one of claims 1-3, wherein before the first data synchronizer sends the synchronization data to the first processor, the method further comprises:
    若所述第一数据同步器检测到所述第一处理器处于休眠状态,则所述第一数据同步器主动唤醒所述第一处理器。If the first data synchronizer detects that the first processor is in a sleep state, the first data synchronizer actively wakes up the first processor.
  5. 根据权利要求1-4中任意一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-4, wherein the method further comprises:
    所述第一数据同步器接收来自所述第一处理器的订阅参数;所述订阅参数用于所述第一设备获取来自所述第二设备的所述同步数据;The first data synchronizer receives subscription parameters from the first processor; the subscription parameters are used by the first device to obtain the synchronization data from the second device;
    所述第一数据同步器向所述第二设备发送所述订阅参数。The first data synchronizer sends the subscription parameter to the second device.
  6. 根据权利要求1-5中任意一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-5, wherein the method further comprises:
    所述第一处理器输出所述同步数据。The first processor outputs the synchronization data.
  7. 根据权利要求1-6中任意一项所述的方法,其特征在于,所述第一数据同步器接收来自第二设备的同步数据,包括:The method according to any one of claims 1-6, wherein the first data synchronizer receives synchronization data from the second device, comprising:
    在所述第一处理器处于休眠状态下,所述第一数据同步器接收来自所述第二设备的同步数据。The first data synchronizer receives synchronization data from the second device while the first processor is in a sleep state.
  8. 一种数据同步方法,其特征在于,应用于第二设备,所述第二设备包括第二数据同步器和第二处理器,所述方法包括:A data synchronization method, characterized in that it is applied to a second device, the second device includes a second data synchronizer and a second processor, and the method includes:
    所述第二数据同步器接收来自所述第二处理器的同步数据;the second data synchronizer receives synchronization data from the second processor;
    所述第二数据同步器向第一设备发送所述同步数据。The second data synchronizer sends the synchronization data to the first device.
  9. 根据权利要求8所述的方法,其特征在于,所述第二数据同步器向第一设备发送所述同步数据,包括:The method according to claim 8, wherein the second data synchronizer sends the synchronization data to the first device, comprising:
    所述第二数据同步器根据订阅参数向所述第一设备发送所述同步数据;所述订阅参数用于所述第一设备获取来自所述第二设备的所述同步数据。The second data synchronizer sends the synchronization data to the first device according to a subscription parameter; the subscription parameter is used by the first device to obtain the synchronization data from the second device.
  10. 根据权利要求9所述的方法,其特征在于,在所述第二数据同步器根据订阅参数向所述第一设备发送所述同步数据之前,所述方法还包括:The method according to claim 9, wherein before the second data synchronizer sends the synchronization data to the first device according to a subscription parameter, the method further comprises:
    所述第二数据同步器接收来自所述第一设备的所述订阅参数。The second data synchronizer receives the subscription parameters from the first device.
  11. 根据权利要求10所述的方法,其特征在于,在所述第二数据同步器接收来自所述第一设备的所述订阅参数之后,所述方法还包括:The method according to claim 10, wherein after the second data synchronizer receives the subscription parameter from the first device, the method further comprises:
    所述第二数据同步器向所述第二处理器发送所述订阅参数。The second data synchronizer sends the subscription parameters to the second processor.
  12. 根据权利要求11所述的方法,在所述第二数据同步器向所述第二处理器发送所述订阅参数之前,所述方法还包括:The method of claim 11, before the second data synchronizer sends the subscription parameter to the second processor, the method further comprising:
    若所述第二数据同步器存储有所述同步数据,所述第二数据同步器根据所述订阅参数向所述第一设备发送所述同步数据。If the second data synchronizer stores the synchronization data, the second data synchronizer sends the synchronization data to the first device according to the subscription parameter.
  13. 根据权利要求11或12所述的方法,其特征在于,在所述第二数据同步器向所述第二处理器发送所述订阅参数之前,所述方法还包括如下之一:The method according to claim 11 or 12, wherein before the second data synchronizer sends the subscription parameter to the second processor, the method further comprises one of the following:
    若所述第二处理器处于休眠状态,则所述第二数据同步器唤醒所述第二处理器;或者,If the second processor is in a sleep state, the second data synchronizer wakes up the second processor; or,
    若所述第二处理器处于休眠状态,则所述第二数据同步器等待所述第二处理器唤醒。If the second processor is in a sleep state, the second data synchronizer waits for the second processor to wake up.
  14. 根据权利要求9-13中任意一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 9-13, wherein the method further comprises:
    所述第二处理器接收到来自所述第二数据同步器的订阅参数;the second processor receives the subscription parameter from the second data synchronizer;
    所述第二处理器根据所述订阅参数获取应用程序生成的所述同步数据;The second processor obtains the synchronization data generated by the application according to the subscription parameter;
    所述第二处理器向所述第二数据同步器发送所述同步数据。The second processor sends the synchronization data to the second data synchronizer.
  15. 根据权利要求8-14中任意一项所述的方法,其特征在于,所述第二数据同步器向第一设备发送所述同步数据,包括:The method according to any one of claims 8-14, wherein the second data synchronizer sends the synchronization data to the first device, comprising:
    在所述第二处理器处于休眠状态下,所述第二数据同步器向所述第一设备发送所述同步数据。When the second processor is in a sleep state, the second data synchronizer sends the synchronization data to the first device.
  16. 一种通信装置,其特征在于,所述装置包括第一数据同步器和第一处理器;A communication device, characterized in that the device comprises a first data synchronizer and a first processor;
    所述第一数据同步器,用于接收来自第二设备的同步数据;the first data synchronizer for receiving synchronization data from the second device;
    所述第一数据同步器,还用于向所述第一处理器发送所述同步数据。The first data synchronizer is further configured to send the synchronization data to the first processor.
  17. 根据权利要求16所述的装置,其特征在于,所述第一数据同步器,用于若检测到所述第一处理器处于工作状态,则向所述第一处理器发送所述同步数据。The apparatus according to claim 16, wherein the first data synchronizer is configured to send the synchronization data to the first processor if it is detected that the first processor is in a working state.
  18. 根据权利要求16所述的装置,其特征在于,所述第一数据同步器,用于接收来自所述第一处理器的同步指令;所述同步指令用于获取来自所述第二设备的所述同步数据;The apparatus according to claim 16, wherein the first data synchronizer is configured to receive a synchronization instruction from the first processor; the synchronization instruction is used to obtain all the data from the second device. the synchronization data;
    所述第一数据同步器,还用于根据所述同步指令向所述第一处理器发送所述同步数据。The first data synchronizer is further configured to send the synchronization data to the first processor according to the synchronization instruction.
  19. 根据权利要求16-18中任意一项所述的装置,其特征在于,所述第一数据同步器,还用于在向所述第一处理器发送所述同步数据之前,若检测到所述第一处理器处于休眠状态,则主动唤醒所述第一处理器。The apparatus according to any one of claims 16-18, wherein the first data synchronizer is further configured to, before sending the synchronization data to the first processor, if the synchronization data is detected If the first processor is in a dormant state, the first processor is actively woken up.
  20. 根据权利要求16-19中任意一项所述的装置,其特征在于,所述第一数据同步器,还用于接收来自所述第一处理器的订阅参数;所述订阅参数用于所述装置获取来自所述第二设备的所述同步数据;The apparatus according to any one of claims 16-19, wherein the first data synchronizer is further configured to receive subscription parameters from the first processor; the subscription parameters are used for the the apparatus obtains the synchronization data from the second device;
    所述第一数据同步器,还用于向所述第二设备发送所述订阅参数。The first data synchronizer is further configured to send the subscription parameter to the second device.
  21. 根据权利要求16-20中任意一项所述的装置,其特征在于,所述第一处理器,还用于输出所述同步数据。The apparatus according to any one of claims 16-20, wherein the first processor is further configured to output the synchronization data.
  22. 根据权利要求16-21中任意一项所述的装置,其特征在于,所述第一数据同步器,用于在所述第一处理器处于休眠状态下接收来自所述第二设备的同步数据。The apparatus according to any one of claims 16-21, wherein the first data synchronizer is configured to receive synchronization data from the second device when the first processor is in a sleep state .
  23. 一种通信装置,其特征在于,所述装置包括第二数据同步器和第二处理器;A communication device, characterized in that the device comprises a second data synchronizer and a second processor;
    所述第二数据同步器,用于接收来自所述第二处理器的同步数据;the second data synchronizer for receiving synchronization data from the second processor;
    所述第二数据同步器,还用于向第一设备发送所述同步数据。The second data synchronizer is further configured to send the synchronization data to the first device.
  24. 根据权利要求23所述的装置,其特征在于,所述第二数据同步器,用于根据订阅参数向所述第一设备发送所述同步数据;所述订阅参数用于所述第一设备获取来自所述装置的所述同步数据。The apparatus according to claim 23, wherein the second data synchronizer is configured to send the synchronization data to the first device according to a subscription parameter; the subscription parameter is used for the first device to acquire the synchronization data from the device.
  25. 根据权利要求24所述的装置,其特征在于,所述第二数据同步器,还用于在根据订阅参数向所述第一设备发送所述同步数据之前,接收来自所述第一设备的所述订阅参数。The apparatus according to claim 24, wherein the second data synchronizer is further configured to receive all data from the first device before sending the synchronization data to the first device according to subscription parameters. the subscription parameters.
  26. 根据权利要求25所述的装置,其特征在于,所述第二数据同步器,还用于在接收来自所述第一设备的所述订阅参数之后,向所述第二处理器发送所述订阅参数。The apparatus according to claim 25, wherein the second data synchronizer is further configured to send the subscription to the second processor after receiving the subscription parameter from the first device parameter.
  27. 根据权利要求26所述的装置,其特征在于,所述第二数据同步器,还用于在向所述第二处理器发送所述订阅参数之前,若存储有所述同步数据,则根据所述订阅参数向所述第一设备发送所述同步数据。The apparatus according to claim 26, wherein the second data synchronizer is further configured to, before sending the subscription parameters to the second processor, if the synchronization data is stored, Send the synchronization data to the first device using the subscription parameter.
  28. 根据权利要求26或27所述的装置,其特征在于,所述第二数据同步器,还用于在向所述第二处理器发送所述订阅参数之前,若所述第二处理器处于休眠状态,则唤醒所述第二处理器;或者,The apparatus according to claim 26 or 27, wherein the second data synchronizer is further configured to, before sending the subscription parameter to the second processor, if the second processor is in sleep mode state, wake up the second processor; or,
    所述第二数据同步器,还用于在向所述第二处理器发送所述订阅参数之前,若所述第二处理器处于休眠状态,则等待所述第二处理器唤醒。The second data synchronizer is further configured to wait for the second processor to wake up if the second processor is in a dormant state before sending the subscription parameter to the second processor.
  29. 根据权利要求24-28中任意一项所述的装置,其特征在于,所述第二处理器,还用于接收到来自所述第二数据同步器的订阅参数;The apparatus according to any one of claims 24-28, wherein the second processor is further configured to receive a subscription parameter from the second data synchronizer;
    所述第二处理器,还用于根据所述订阅参数获取应用程序生成的所述同步数据;The second processor is further configured to obtain the synchronization data generated by the application according to the subscription parameter;
    所述第二处理器,还用于向所述第二数据同步器发送所述同步数据。The second processor is further configured to send the synchronization data to the second data synchronizer.
  30. 根据权利要求23-29中任意一项所述的装置,其特征在于,所述第二数据同步器,用于在所述第二处理器处于休眠状态下,向所述第一设备发送所述同步数据。The apparatus according to any one of claims 23-29, wherein the second data synchronizer is configured to send the data to the first device when the second processor is in a sleep state Synchronous Data.
  31. 一种通信装置,其特征在于,所述通信装置包括处理器和收发器,所述收发器用于所述通信装置和其他通信装置之间进行信息交互,所述处理器执行程序指令,用以执行如权利要求1-15中任一项所述的数据同步方法。A communication device, characterized in that the communication device includes a processor and a transceiver, the transceiver is used for information interaction between the communication device and other communication devices, and the processor executes program instructions to execute The data synchronization method according to any one of claims 1-15.
  32. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质包括计算机程序或指令,当所述计算机程序或指令在计算机上运行时,使得所述计算机执行如权利要求1-15中任一项所述的数据同步方法。A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a computer program or instruction, which, when the computer program or instruction is executed on a computer, causes the computer to perform as in claims 1-15 Any one of the data synchronization methods.
  33. 一种计算机程序产品,其特征在于,所述计算机程序产品包括:计算机程序或指令,当所述计算机程序或指令在计算机上运行时,使得所述计算机执行如权利要求1-15中任一项所述的数据同步方法。A computer program product, characterized in that the computer program product comprises: a computer program or instruction, when the computer program or instruction is run on a computer, the computer is made to execute any one of claims 1-15 The described data synchronization method.
PCT/CN2021/126219 2020-10-31 2021-10-25 Data synchronization method and device WO2022089384A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011198816.1A CN114531449A (en) 2020-10-31 2020-10-31 Data synchronization method and device
CN202011198816.1 2020-10-31

Publications (1)

Publication Number Publication Date
WO2022089384A1 true WO2022089384A1 (en) 2022-05-05

Family

ID=81381523

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/126219 WO2022089384A1 (en) 2020-10-31 2021-10-25 Data synchronization method and device

Country Status (2)

Country Link
CN (1) CN114531449A (en)
WO (1) WO2022089384A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115514587B (en) * 2022-09-20 2024-03-08 杭州萤石软件有限公司 Communication device, method, electronic device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180329713A1 (en) * 2014-12-10 2018-11-15 Intel Corporation Fitness sensor with low power attributes in sensor hub
US20200022599A1 (en) * 2017-03-31 2020-01-23 Shanghai Zhangmen Science And Technology Co., Ltd. Energy-saving switching method and a smart watch with heart rate detection function
CN111263339A (en) * 2020-01-14 2020-06-09 华为技术有限公司 Wireless communication method and device with wireless communication function
CN111328020A (en) * 2018-12-17 2020-06-23 华为技术有限公司 Service processing method and device based on indoor positioning system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9883456B2 (en) * 2015-09-16 2018-01-30 Microsoft Technology Licensing, Llc. Application specific internet access
CN107071697A (en) * 2017-05-05 2017-08-18 杭州米越科技有限公司 A kind of base station data of combination wearing kind equipment is kept in and rapid data synchronization system
CN109962967A (en) * 2018-01-04 2019-07-02 证通股份有限公司 The method of data synchronization subscribed to based on increment
US11310646B2 (en) * 2018-04-04 2022-04-19 Huawei Technologies Co., Ltd. Bluetooth-based playback method and electronic device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180329713A1 (en) * 2014-12-10 2018-11-15 Intel Corporation Fitness sensor with low power attributes in sensor hub
US20200022599A1 (en) * 2017-03-31 2020-01-23 Shanghai Zhangmen Science And Technology Co., Ltd. Energy-saving switching method and a smart watch with heart rate detection function
CN111328020A (en) * 2018-12-17 2020-06-23 华为技术有限公司 Service processing method and device based on indoor positioning system
CN111263339A (en) * 2020-01-14 2020-06-09 华为技术有限公司 Wireless communication method and device with wireless communication function

Also Published As

Publication number Publication date
CN114531449A (en) 2022-05-24

Similar Documents

Publication Publication Date Title
US11611863B2 (en) Method and apparatus for low energy discovery
US10007327B2 (en) HSIC communication system and method
EP3000217B1 (en) Electronic device using logical channels for communication
JP6742465B2 (en) Method, device and bluetooth speaker for continuous wakeup delay reduction in bluetooth speaker
US9584411B2 (en) Power save mechanism for low-power network devices
JP2020537449A (en) Service registration in communication network
EP4311314A1 (en) Sleep scheduling method and device
CN106658064B (en) Virtual gift display method and device
JP2023510368A (en) Wireless communication method and device having wireless communication function
US11678267B2 (en) Apparatus and method for communication between devices in close proximity in wireless network
EP3779690A1 (en) Processor core scheduling method and apparatus, terminal, and storage medium
CN113596781B (en) Subscription method, service network element and user data management network element
WO2022089384A1 (en) Data synchronization method and device
US8854959B2 (en) Communication apparatus using super frame to reconfigure dynamic protocol, and sensor node and hub device to reconfigure dynamic protocol
US11057951B2 (en) Communication apparatus, method of controlling communication apparatus, and non-transitory computer-readable storage medium
CN115640149A (en) RDMA event management method, device and storage medium
US20200177679A1 (en) Device Connection Method and Terminal
CN109451354B (en) Terminal and method for awakening same
CN114265713A (en) RDMA event management method, device, computer equipment and storage medium
CN114217759A (en) Screen projection method and device, storage medium and electronic equipment
JP2019185771A (en) Method, device for processing data of bluetooth speaker, and bluetooth speaker
US10856129B2 (en) Method and apparatus for performing short range wireless communication in communication system
WO2023202295A1 (en) Memory management and control method and apparatus, storage medium and electronic device
CN113934677A (en) Data processing method and device, electronic equipment and storage medium
WO2023124567A1 (en) Data communication method and apparatus, terminal, storage medium, and program product

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21885111

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21885111

Country of ref document: EP

Kind code of ref document: A1