CN117692466A - Data synchronization method, related device and system - Google Patents

Data synchronization method, related device and system Download PDF

Info

Publication number
CN117692466A
CN117692466A CN202211100244.8A CN202211100244A CN117692466A CN 117692466 A CN117692466 A CN 117692466A CN 202211100244 A CN202211100244 A CN 202211100244A CN 117692466 A CN117692466 A CN 117692466A
Authority
CN
China
Prior art keywords
water level
level information
central
data
equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211100244.8A
Other languages
Chinese (zh)
Inventor
龚阿世
李有福
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202211100244.8A priority Critical patent/CN117692466A/en
Priority to PCT/CN2023/117140 priority patent/WO2024051718A1/en
Publication of CN117692466A publication Critical patent/CN117692466A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • 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

Abstract

The embodiment of the application provides a data synchronization method, a related device and a related system, which can be applied to a communication system comprising at least three devices for data synchronization. The method comprises the following steps: under the condition that data are updated, a first device in the communication system sends water level information to a central device in the communication system, wherein the water level information is used for indicating the updating state of the data, and the central device is used for maintaining the water level information of each device in the communication system; a second device in the communication system acquires water level information from a central device under the condition that data synchronization requirements exist; the second device performs data synchronization based on the water level information. The method and the device for the water level synchronization based on the central equipment are capable of avoiding frequent awakening of all other equipment in the system due to data synchronization without awakening all other equipment in the system when the equipment is updated every time, reducing the times of establishing connection between the equipment and reducing power consumption loss caused by data synchronization.

Description

Data synchronization method, related device and system
Technical Field
The present disclosure relates to the field of terminals, and in particular, to a data synchronization method, and related devices and systems.
Background
In a terminal set comprising a plurality of terminal devices, data synchronization is required between the terminal devices for reasons such as data sharing, so that data accessed by users on different terminal devices can be kept consistent.
At present, the data synchronization between the terminal devices is mainly realized by an end-to-end synchronization mode. When the data of one terminal device in the terminal set changes, the terminal device wakes up other terminal devices in the terminal set, and establishes connection with other terminal devices respectively to perform data synchronization.
A terminal set typically includes a plurality of terminal devices. If the data of each terminal device changes, the data is synchronized once by the end-to-end synchronization mode, which may cause a great deal of power consumption loss.
Disclosure of Invention
The application provides a data synchronization method, a related device and a related system, so as to reduce power consumption generated by data synchronization among multiple devices.
In a first aspect, the present application provides a data synchronization method applied to a communication system in which three or more terminal devices exist.
The method comprises the following steps: under the condition that data are updated, a first device in the communication system sends water level information to a central device in the communication system, wherein the water level information is used for indicating the updating state of the data, and the central device is used for maintaining the water level information of each device in the communication system; a second device in the communication system acquires water level information from a central device under the condition that data synchronization requirements exist; the second device performs data synchronization based on the water level information.
The water level information is information for recording the data updating state of the terminal equipment, and when the data synchronization is carried out among the terminal equipment, the water level information of the data is compared first, so that the increase or decrease of the data is determined.
Based on the scheme, the water level information of each terminal device in the communication system can be synchronized to the central device, and other terminal devices do not need to be frequently awakened to synchronize the water level information. When the terminal equipment has data synchronization requirement, the terminal equipment can firstly interact water level information with the central equipment and perform data synchronization based on the water level information. Therefore, frequent awakening of other terminal devices in the communication system due to data synchronization can be avoided, and the number of times of establishing connection between the devices is reduced, so that the power consumption of the communication system due to the data synchronization is reduced.
With reference to the first aspect, in some possible implementation manners of the first aspect, the water level information includes first water level information corresponding to system function related data of the first device, where the first water level information is used to indicate an update state of the system function related data; and the first device sending water level information to the central device in case of data update, comprising: and the first equipment sends the first water level information to the central equipment under the condition that the system function related data are updated.
Accordingly, the second device obtains the water level information from the central device in the case of the data synchronization requirement, including: the second device determines that the synchronization requirement exists for the system function related data of the first device under the condition that the second device detects the screen-lighting operation of the user; the second device obtains the first water level information from the central device; the second device performs data synchronization based on the water level information, including: and the second equipment synchronizes the system function related data based on the first water level information.
The system function related data of the terminal device is data required for normal use of the terminal device, such as a device name, a configuration file, etc., and when the user starts to use the terminal device, such as when the user wakes up the screen of the terminal device, the terminal device starts to synchronize water level information of the data to the center device and performs data synchronization based on the water level information. Thus, the normal operation of the terminal equipment can be ensured.
With reference to the first aspect, in some possible implementation manners of the first aspect, a first application program is installed in the first device, and the water level information includes second water level information corresponding to data of the first application program; and the first device sending water level information to the central device in case of data update, comprising: and the first equipment sends the second water level information to the central equipment under the condition that the data of the first application program is updated.
Correspondingly, the first application program is also installed in the second device; the second device obtains the water level information from the central device under the condition that the data synchronization requirement exists, and the second device comprises: the second device determines that the data synchronization requirement of the first application program exists under the condition that the first application program is opened; the second device obtains the second water level information from the central device; the second device performs data synchronization based on the water level information, including: the second device performs data synchronization of the first application program based on the second water level information.
When the data of a specific application program in the terminal equipment is updated, the water level information of the data is synchronized with the central equipment, and when other terminal equipment opens the application program, the data synchronization is triggered, the water level information of the data is acquired from the central equipment and is connected with the corresponding terminal equipment for data synchronization, so that all the data are not required to be synchronized every time the terminal equipment is awakened. Compared with the method that the user wakes up the terminal equipment, the frequency of opening the specific application program on the terminal equipment by the user is smaller, so that the data synchronization frequency based on the application program is also smaller, and the power consumption generated by the data synchronization can be further reduced.
With reference to the first aspect, in some possible implementation manners of the first aspect, the performing, by the second device, data synchronization based on the water level information includes: the second device performs data synchronization with the first device based on the water level information.
After the terminal device acquires the water level information from the central device, the terminal device can be connected with the terminal device for updating the data indicated by the water level information, and data synchronization is performed.
Of course, the data of the update indicated by the water level information may be stored in the central device, and the terminal device may perform data synchronization with the central device based on the water level information when there is a data synchronization requirement.
With reference to the first aspect, in some possible implementation manners of the first aspect, the central device is a device in the communication system that meets a preset condition; the preset conditions include one or more of the following: the mode of being active equipment, being passive equipment, but the residual electric quantity exceeding a first preset threshold, the processing resource exceeding a second preset threshold, the storage space exceeding a third preset threshold, the on-line time length exceeding a fourth preset threshold or accessing the communication system is one of preset modes.
The central equipment needs to be active equipment or equipment with sufficient electric quantity so as to meet the power consumption requirement generated by frequently receiving and transmitting water level information; the central equipment has high processing speed and large storage space when needed, so as to meet the storage requirement of water level information; the central device needs to be able to exist in the communication system for a long time and to be able to establish a high-speed communication connection with other terminal devices in order to provide a fast, stable data synchronization service.
By selecting the equipment meeting the preset conditions as the central equipment, the central equipment can rapidly, stably and long-term provide the synchronization service of the water level information for other terminal equipment in the communication system.
The device satisfying the preset condition in the communication system may be a plurality of devices, the plurality of devices are a plurality of candidate center devices, the center device is selected from the plurality of candidate center devices by a voting device, and the voting device is a device except the plurality of candidate center devices in the communication system.
In one possible implementation, each voting device determines the central device from a plurality of candidate central devices based on one or more of: network connection with each candidate center device, connection frequency with each candidate center device in a preset period, or demand amount synchronized with data of each candidate center device.
After judging that the terminal equipment in the communication system meets the preset condition, recommending the terminal equipment as candidate center equipment; when a plurality of candidate center devices exist, other terminal devices which do not meet the preset conditions in the communication system can become voting devices to vote for the candidate center devices, and the basis of the voting can be the network connection mode of the voting devices and the candidate center devices, the connection frequency of the voting devices and each candidate center device in a preset period or the requirement amount of data synchronization of the voting devices and each candidate center device; therefore, the most suitable center equipment can be selected from the communication system, and quick and stable water level information synchronization service can be provided for other terminal equipment in the system.
It should be appreciated that there may be one or more central devices in the communication system.
With reference to the first aspect, in certain possible implementation manners of the first aspect, the central device in the communication system includes a first central device and a second central device, where the first central device and the second central device synchronize respective maintained water level information in real time.
When two or more than two central devices exist in the communication system, stable continuous communication connection exists between the central devices, and water level information maintained by the central devices is synchronized in real time, so that when other devices in the system have data synchronization requirements, the central devices can be connected with any central device, and the real-time water level information is obtained. When one of the center devices leaves the communication system due to disconnection and the like, the center device storing real-time water level information is arranged in the communication system, so that the process of selecting the center device again by each terminal device in a referring and voting mode is avoided.
With reference to the first aspect, in some possible implementation manners of the first aspect, a third device in a communication system receives a query message from a fourth device, where the query message is used to query a central device of the communication system, and the fourth device is a device that newly joins the communication system; the third device sends a reply message to the fourth device, the reply message indicating the central device.
When new terminal equipment joins the communication system, firstly, a query message is sent to any one of the terminal equipment in the system to query whether the center equipment exists in the system, and the terminal equipment receiving the query message replies the existence condition of the current center equipment and the information of the center equipment to the terminal equipment. If the center equipment exists, the new terminal equipment synchronizes data based on the center equipment; if the center equipment does not exist, the new terminal equipment judges whether the new terminal equipment is suitable to be the center equipment according to whether the state of the new terminal equipment meets the condition.
With reference to the first aspect, in some possible implementation manners of the first aspect, each device in the communication system re-determines a central device of the communication system in a case that the central device exits the communication system.
When the central equipment in the communication system exits the communication system and the communication system does not have the central equipment, each terminal equipment in the system selects whether to become a candidate central equipment according to the self condition, and finally determines a new central equipment.
In a second aspect, the present application provides a communication system, where the communication system includes a first device, a second device, and a central device, where the first device is configured to send water level information to the central device when data is updated, where the water level information is used to indicate an update status of the data; the central equipment is used for maintaining water level information of each equipment in the communication system; the second device is used for acquiring the water level information from the central device and performing data synchronization based on the water level information under the condition that the data synchronization requirement exists.
With reference to the second aspect, in some possible implementation manners of the second aspect, the water level information includes first water level information corresponding to system function related data of the first device, where the first water level information is used to indicate an update state of the system function related data; and the first device is specifically configured to send the first water level information to the central device when the system function related data is updated.
Correspondingly, the second device is specifically configured to: under the condition that the screen-on operation of a user is detected, determining that the synchronization requirement exists for the system function related data of the first equipment, acquiring the first water level information from the central equipment, and synchronizing the system function related data of the first equipment based on the first water level information.
With reference to the second aspect, in some possible implementation manners of the second aspect, a first application program is installed in the first device, and the water level information includes second water level information corresponding to data of the first application program; and the first device is specifically configured to send the second water level information to the central device when the data of the first application program is updated.
Correspondingly, the first application program is also installed in the second device; the second device is specifically configured to: and under the condition that the first application program is opened, determining that the data synchronization requirement of the first application program exists, acquiring the second water level information from the central equipment, and performing data synchronization of the first application program based on the second water level information.
With reference to the second aspect, in some possible implementations of the second aspect, the second device is specifically configured to perform data synchronization with the first device based on the water level information.
With reference to the second aspect, in some possible implementations of the second aspect, the central device is a device in the communication system that meets a preset condition; the preset conditions include one or more of the following: the mode of being active equipment, being passive equipment, but the residual electric quantity exceeding a first preset threshold, the processing resource exceeding a second preset threshold, the storage space exceeding a third preset threshold, the on-line time length exceeding a fourth preset threshold or accessing the communication system is one of preset modes.
The device satisfying the preset condition in the communication system may be a plurality of devices, the plurality of devices are a plurality of candidate center devices, the center device is selected from the plurality of candidate center devices by a voting device, and the voting device is a device except the plurality of candidate center devices in the communication system.
In one possible implementation, the voting device is configured to determine the central device from a plurality of candidate central devices based on one or more of: network connection with each candidate center device, connection frequency with each candidate center device in a preset period, or demand amount synchronized with data of each candidate center device.
With reference to the second aspect, in some possible implementations of the second aspect, the central device in the communication system includes a first central device and a second central device, and the first central device and the second central device synchronize respective maintained water level information in real time.
With reference to the second aspect, in some possible implementation manners of the second aspect, the communication system further includes a third device and a fourth device, where the third device is configured to receive a query message from the fourth device, the query message is configured to query a central device of the communication system, and the fourth device is a device newly joining the communication system; the third device is further configured to send a reply message to the fourth device, where the reply message indicates the central device.
With reference to the second aspect, in some possible implementations of the second aspect, each device in the communication system is further configured to re-determine a central device of the communication system in case the central device exits the communication system.
In a third aspect, the present application provides a data synchronization method, which may be applied to the terminal device in the first aspect, and the method includes: under the condition that data are updated, water level information is sent to central equipment, wherein the water level information is used for indicating the updating state of the data, and the central equipment is used for maintaining the water level information of the first equipment; and carrying out data synchronization with the second device based on the water level information under the condition of being awakened by the second device.
In a fourth aspect, the present application provides a data synchronization method, which may be applied to the terminal device in the first aspect, and the method includes: receiving water level information from a first device, wherein the water level information is used for indicating the update state of the data; and sending the water level information to the second equipment.
In a fifth aspect, the present application provides a data synchronization method, which may be applied to the terminal device in the first aspect, and the method includes: under the condition that data synchronization requirements exist, water level information is acquired from central equipment, wherein the water level information is used for indicating the update state of data, and the central equipment is used for maintaining the water level information; the second device performs data synchronization based on the water level information.
In a sixth aspect, the present application provides a terminal device, which may implement a method performed by a first device in the above aspects, or may implement a method performed by a second device in the above aspects, or may implement a method performed by a central device in the above aspects. The terminal device comprises modules or units for implementing the above method. It should be understood that the unit or module included in the terminal device may be implemented in software and/or hardware.
In a seventh aspect, the present application provides a terminal device, including a processor, where the processor may implement a method performed by a first device in the foregoing aspects, or may implement a method performed by a second device in the foregoing aspects, or may implement a method performed by a central device in the foregoing aspects.
The terminal device may also include a memory for storing instructions and data. The memory is coupled to the processor, which when executing instructions stored in the memory, can implement the methods described in the above aspects. The terminal device may also include a communication interface for the terminal device to communicate with other devices, which may be, for example, a transceiver, circuit, bus, module, or other type of communication interface.
In an eighth aspect, the present application provides a chip system, where the chip system includes at least one processor, and is configured to support a function related to implementing a method performed by a first device in the above aspects, or may implement a function related to a method performed by a second device in the above aspects, or may implement a function related to a method performed by a central device in the above aspects, for example, receiving or processing data and/or information related to the above method.
In one possible design, the system on a chip further includes a memory to hold program instructions and data, the memory being located either within the processor or external to the processor.
The chip system may be formed of a chip or may include a chip and other discrete devices.
In a ninth aspect, the present application provides a computer readable storage medium comprising a computer program which, when run on a computer, causes the computer to implement the method performed by the first device in the above aspects, or to implement the method performed by the second device in the above aspects, or to implement the method performed by the central device in the above aspects.
In a tenth aspect, the present application provides a computer program product comprising: a computer program (which may also be referred to as code, or instructions), which when executed, causes a computer to perform the method performed by the first device of the above aspects, or to perform the method performed by the second device of the above aspects, or to perform the method performed by the central device of the above aspects. It should be understood that, the second aspect to the tenth aspect of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects obtained by each aspect and the corresponding possible embodiments are similar, and are not repeated.
Drawings
Fig. 1 is a schematic structural diagram of a terminal device provided in an embodiment of the present application;
fig. 2 is a schematic software structure of a terminal device according to an embodiment of the present application;
fig. 3 is an application scenario schematic diagram of a data synchronization method provided in an embodiment of the present application;
FIG. 4 is a schematic diagram of a data synchronization method;
FIG. 5 is a schematic flow chart of a data synchronization method provided by an embodiment of the present application;
fig. 6 is an application scenario schematic diagram of a data synchronization method provided in an embodiment of the present application;
FIG. 7 is a schematic flow chart of determining a center device by a terminal device in an embodiment of the present application;
fig. 8 is a schematic flowchart of a terminal device confirmation of becoming a candidate center device provided in the embodiment of the present application;
fig. 9 is a flowchart of data synchronization after a terminal device joins a terminal system in the embodiment of the present application;
fig. 10 is a schematic diagram of internal interaction of a terminal device provided in an embodiment of the present application;
fig. 11 is a schematic block diagram of a data synchronization device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the present application will be described below with reference to the accompanying drawings.
The terms "first," "second," and the like in this application are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the present application described herein may be implemented in other sequences than those illustrated or otherwise described herein.
In this embodiment of the present application, the "predefining" may be implemented by pre-storing a corresponding code, a table, or other means that may be used to indicate relevant information in the terminal device, and the specific implementation manner of the present application is not limited.
Where "saving" may mean saving in one or more memories, which may be separate settings or integrated in an encoder, decoder, or electronic device. The one or more memories may also be provided separately as part of a decoder, processor, or electronic device. The type of memory may be any form of storage medium, and this application is not limited in this regard.
The following is a brief description of the terminology used in the embodiments of the present application.
Terminal set: a terminal set comprising three or more terminal devices, wherein one or more wireless communication technologies can be used for wireless communication among the terminal devices in the terminal set, and the used wireless communication technologies include, but are not limited to: bluetooth (BT) technology, wireless fidelity (wireless fidelity, WI-FI) technology, peer-to-peer (P2P) technology, near field wireless transmission (near field communication, NFC) technology, zigBee (ZigBee) technology.
The terminal devices in the terminal set can perform mutual transmission of data, signals and information through wired or wireless communication, and the information which can be mutually transmitted includes but is not limited to: text, documents, pictures, audio, video, user operation instructions, configuration information of terminal equipment, and the like.
Water level information: information for indicating the update status of data in the terminal device. The water level information may contain a time stamp that records changes in the data, with each change in the data recording a time stamp in the water level information. By the water level information, the interval between the time when the data last changed and the current time can be obtained. When data synchronization is performed between terminal devices, the update time of the data in the terminal devices can be compared through the water level information, so that the change of the data can be determined.
The first terminal device and the second terminal device perform data synchronization at a first time, the first data of the first terminal device is the same as the second data of the second terminal device, and the first water level information indicating the first data and the second water level information indicating the second data both record that the data is changed at the first time; if the first data is changed at a second moment after the first moment, the water level information used for indicating the first data is recorded, and the first data is changed at the second moment; when the first device and the second device perform data synchronization at a third time after the second time, the first device may compare the data change time indicated by the first water level information and the second water level information, and if the interval between the time when the first data is changed and the current time is smaller than the interval between the time when the second data is changed and the current time, the second device updates the second data to be identical to the first data.
In the embodiment of the present application, the terminal device may also be referred to as a User Equipment (UE), a subscriber unit, a subscriber station, a mobile device, a user terminal, a wireless communication device, a user agent, or a user apparatus.
Illustratively, fig. 1 shows a schematic structural diagram of a terminal device 100. The terminal device 100 may be any device having a wireless transceiver function and a data storage function, and may be a mobile phone (mobile phone), a tablet computer (pad), a computer with a wireless transceiver function (such as a notebook computer, a palm computer, etc.), a smart television, a personal digital assistant (personal digital assistant, PDA), a smart printer, a smart home appliance, a handheld device with a wireless communication function, a computer or other processing device, a vehicle-mounted terminal, a wearable device (smart watch, smart bracelet, smart glasses, etc.), a Virtual Reality (VR) terminal device, an augmented reality (augmented reality, AR) terminal device, etc., which are not limited in this embodiment of the present application.
As shown in fig. 1, the terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, a subscriber identity module (subscriber identification module, SIM) card interface 195, and the like.
The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The processor can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 may be a cache memory. The memory may hold instructions or data that are used or used more frequently by the processor 110. If the processor 110 needs to use the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others. The processor 110 may be connected to the touch sensor, the audio module, the wireless communication module, the display, the camera, etc. module through at least one of the above interfaces.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is only illustrative, and does not constitute a structural limitation of the terminal device 100. In other embodiments of the present application, the terminal device 100 may also use different interfacing manners, or a combination of multiple interfacing manners in the foregoing embodiments.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130. In some wireless charging embodiments, the charge management module 140 may receive wireless charging input through a wireless charging coil of the terminal device 100. The charging management module 140 may also supply power to the terminal device through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 to power the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
The wireless communication function of the terminal device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the terminal device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the terminal device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional module, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wi-Fi network), bluetooth low energy (bluetooth low energy, BLE), ultra Wideband (UWB), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), NFC technology, infrared technology (IR), etc. applied on the terminal device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 150 of terminal device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that terminal device 100 may communicate with networks and other terminal devices via wireless communication techniques. The wireless communication techniques may include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The terminal device 100 may implement a display function through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The terminal device 100 may include one or more display screens 194.
The terminal device 100 may implement a photographing function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The ISP is used to process data fed back by the camera 193. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and is converted into an image visible to naked eyes. ISP can also optimize the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, the terminal device 100 may include one or more cameras 193.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the terminal device 100 selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
Video codecs are used to compress or decompress digital video. The terminal device 100 may support one or more video codecs. In this way, the terminal device 100 can play or record video in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to realize expansion of the memory capability of the terminal device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer executable program code including instructions. The processor 110 executes various functional applications of the terminal device 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data (e.g., audio data, address book, etc.) created during use of the terminal device 100, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
The terminal device 100 may implement audio functions through an audio module 170 such as a speaker 170A, a receiver 170B, a microphone 170C, and an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or a portion of the functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. The terminal device 100 can listen to music or to handsfree talk through the speaker 170A.
A receiver 170B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When the terminal device 100 receives a call or voice message, it is possible to receive voice by approaching the receiver 170B to the human ear.
Microphone 170C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 170C through the mouth, inputting a sound signal to the microphone 170C. The terminal device 100 may be provided with at least one microphone 170C. In other embodiments, the terminal device 100 may be provided with two microphones 170C, and may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the terminal device 100 may further be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the source of sound, implement directional recording functions, etc.
The earphone interface 170D is used to connect a wired earphone. The earphone interface 170D may be a USB interface 130 or a 3.5mm open mobile terminal platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The keys 190 include a power key (or power key), a volume key, etc. The keys 190 may be mechanical keys or touch keys. The terminal device 100 may receive key inputs, generating key signal inputs related to user settings and function controls of the terminal device 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects by touching different areas of the display screen 194. Different application scenarios (such as time reminding, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be contacted and separated from the terminal apparatus 100 by being inserted into the SIM card interface 195 or by being withdrawn from the SIM card interface 195. The terminal device 100 may support one or more SIM card interfaces. The SIM card interface 195 may support Nano SIM cards, micro SIM cards, and the like. The same SIM card interface 195 may be used to insert multiple cards simultaneously. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The terminal device 100 interacts with the network through the SIM card to realize functions such as call and data communication. In some embodiments, the terminal device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100.
It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, terminal device 100 may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Fig. 2 is a schematic software structure of a terminal device according to an embodiment of the present application.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the system is divided into four layers, from top to bottom, an application framework layer (which may be abbreviated as framework layer), a system service layer (which may be abbreviated as system layer), and a kernel layer, respectively.
The application layer may include a series of application packages. As shown in fig. 2, the application layer may include gallery, contacts, memos, messages, maps, music, video, calendars, and like applications.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application layer applications. The application framework layer includes a number of predefined functions. As shown in FIG. 2, the application framework layers may include a User Interface (UI) framework, an application framework, a capability framework, and the like. The embodiments of the present application are not limited in any way.
The system services layer may include a plurality of functional modules. For example: data management services, distributed soft buses, etc.
Wherein the data management service is operable for distributed data management, comprising: data storage, data synchronization, synchronized water level management, distributed clocks, conflict resolution, and the like. The data management service includes a database for storing data. The update status of the data in the database may be characterized by water level information. In the embodiment of the application, the data of different application programs can be stored in different data tables in the database, and can be characterized by different water level information.
A distributed soft bus may be used to automatically discover surrounding devices and connect the devices to form a network. By adopting the distributed soft bus technology, the devices can be accessed into the network based on different connection technologies, so that the devices can be interconnected more conveniently and efficiently.
The kernel layer is a layer between hardware and software. The kernel layer contains bluetooth drivers, wi-Fi drivers, display services (also called display drivers), memory drivers, audio drivers, etc. The embodiments of the present application do not impose any limitation on this.
The data synchronization is a mode of data sharing among the terminal devices, so that the data in different terminal devices can be kept consistent, and further, users can obtain the same data on different devices. Fig. 3 is an application scenario schematic diagram of a data synchronization method provided in an embodiment of the present application. As shown in fig. 3, the terminal set includes a plurality of terminal devices. The plurality of terminal devices may include, for example, smart phones, tablet computers, smart televisions, computers, smart watches, and the like. Each terminal device has a wireless receiving and transmitting function and a data storage function, and the terminal devices can communicate in a wireless connection mode to form a communication system. The terminal device may send data to other terminal devices in the terminal set, or may receive data from other terminal devices. The wireless connection may include, but is not limited to, bluetooth, wi-Fi, P2P, NFC, zigbee, and the like, including but not limited to.
When there is no data synchronization requirement, the terminal devices in the terminal set can be connected through a low-power wireless communication technology, such as using BLE keep-alive. For example, heartbeat packets may be periodically sent between terminal devices to indicate that they are still in the terminal set. When the data synchronization is needed, the terminal equipment can establish data transmission connection, such as Wi-Fi, P2P and other technologies, so as to perform data synchronization.
It should be understood that the scenario illustrated in fig. 3 is only an example of the embodiment of the present application, and should not be construed as limiting the embodiment of the present application, and the terminal devices in the terminal set may further include other devices with wireless transceiving functions, and the number of the terminal devices may be any number of three or more.
In the terminal set, when the data stored in the terminal equipment is changed, the terminal set is connected with other terminal equipment, the water level information of the terminal set and the changed data are sent to other terminals, and the other terminals update the corresponding data of the terminal set according to the water level information and the data, so that the consistency of the data among the terminal equipment is realized.
Currently, in a terminal set independent of a cloud server, synchronization of data between terminal devices is performed through interconnection between terminals. When no data synchronization is required, the terminal devices in the terminal set can be connected through a low-power wireless communication technology. After the data in one of the terminal devices is updated, the terminal device can communicate through the low-power-consumption connection, send a data packet to the other terminal devices, instruct that the data change occurs, wake up the data transmission service of the other terminal devices, finally wake up all the other terminal devices in the terminal set, establish data transmission connection between every two pairs, and exemplarily establish Wi-Fi connection, so as to perform water level information exchange and data synchronization based on the data transmission connection.
Fig. 4 is a schematic diagram of a data synchronization method. As shown in fig. 4, when the data in the terminal device #1 changes, the terminal device #1 may wake up the terminal devices #2 to #5 in the terminal set, and respectively establish data transmission connections with the terminal devices #2 to #5, so as to perform data synchronization of the end.
And by analogy, when any one of the terminal devices in the terminal set is subjected to data change and needs to synchronize data, data transmission connection between the terminal devices and other terminal devices in the terminal set is established, and data synchronization of the terminal is performed. Fig. 4 shows the connections that each terminal device needs to establish for end-to-end data synchronization with other terminal devices. Therefore, the terminal equipment can be frequently awakened by the data synchronization of the terminal end, and communication connection is established, so that power consumption loss is caused.
In order to reduce the power consumption loss caused by data synchronization, the application provides a data synchronization method, wherein when the water level is updated due to data updating of terminal equipment in a terminal set, the water level information of the terminal equipment is synchronized through a central equipment, and the data synchronization is not performed in the whole terminal set immediately. When other terminal equipment needs to perform data synchronization, according to the water level information synchronized from the central equipment, performing data synchronization based on the water level information.
In this way, when any one of the terminal devices in the terminal set generates data update, the other terminal devices in the terminal set are not immediately awakened, but the water level information is firstly synchronized with the central device. Therefore, the power consumption loss caused by frequently waking up all other terminal devices in the terminal set in each data update can be avoided. When the other terminal equipment has the data synchronization requirement, the other terminal equipment can perform data synchronization based on the water level information synchronized from the central equipment, namely, perform data synchronization according to the requirement. Therefore, the terminal equipment with the data synchronization requirement can wake up the central equipment and the terminal equipment which needs to be synchronized, other terminal equipment in the terminal set does not need to be woken up, the wake-up times of the equipment are reduced, and the power consumption loss of the other terminal equipment is avoided. For terminal equipment which has no data synchronization requirement temporarily, the current state can be kept without being influenced by data synchronization among other equipment, so that the power consumption loss caused by unnecessary data synchronization can be reduced.
The method provided by the embodiment of the present application will be described in detail below with reference to the accompanying drawings.
Fig. 5 is a schematic flowchart of a data synchronization method provided in an embodiment of the present application, where the method may be applied to a terminal set, for example, may be applied to the terminal set shown in fig. 3. In this terminal set, three or more terminal devices are included, and for convenience of description, different terminal devices are named differently hereinafter, such as the first device, the second device, the central device, etc., which are only convenient for distinguishing different terminal devices, and should not constitute any limitation. The first device and the second device may be any type of terminal device, including but not limited to: cell phones, tablet computers, smart watches, smart televisions, computers, etc.
The method shown in fig. 5 may include steps 501 to 505. The various steps in method 500 are described in detail below.
In step 501, the first device performs data update.
The data herein may include, but is not limited to: data related to the application program in the first device, such as contact name and mobile phone number data in an address book, photo data in a gallery, and the like; data related to the first device system functionality, such as device name data, wi-Fi password data, profile data, and the like.
The application program installed in the first device may include, but is not limited to, the address book and the gallery listed above, which is not limited to the application program installed in the first device.
In step 502, the first device sends water level information to the central device, where the water level information is used to indicate an update status of the data.
The central equipment is terminal equipment in the terminal set and is used for maintaining water level information of all the terminal equipment including the first equipment in the terminal set. The central device may receive and store water level information from other terminal devices in the terminal set, and may also receive and store data indicated by the water level information. The central device may be a terminal device selected in advance from each terminal device in the terminal set, or a terminal device defined in advance. The number of central devices may be one or more. When there are a plurality of center devices, the plurality of center devices may be standby with each other.
Optionally, the first device sends the water level information to the central device, specifically including: the first device wakes up the central device; the method comprises the steps that a first device establishes data transmission connection with a central device; the first device sends water level information to the central device via the data transmission connection. One possible implementation manner is that the first device sends a signal to the central device through BLE, wakes up a Wi-Fi chip of the central device and data synchronization service, the first device establishes Wi-Fi connection with the central device, and sends water level information to the central device through Wi-Fi connection, wherein the water level information is used for indicating an update state of data.
After the data updating, the first device only needs to establish connection with the central device to synchronize the water level information, and does not need to wake up other terminal devices in the terminal set, establish transmission connection and synchronize the water level information, so that the power consumption caused by waking up the device, establishing connection and synchronizing the water level information is reduced.
Each terminal device in the terminal set stores data and water level information corresponding to the data, the updated water level information can be sent to the central device after the data of one terminal device is updated, and the central device can maintain the water level information of each terminal device in the terminal set. The other terminal devices only need to be connected with the central device to acquire the water level information, so that the data updating state of each terminal device in the terminal set can be acquired.
In step 503, the second device determines that a data synchronization need exists. One possible scenario in which the second device determines that there is a data synchronization requirement is that the second device has a synchronization requirement for system function related data. The second device may determine whether there is a synchronization requirement for the system function related data according to whether the user needs to use the device.
The system function related data may specifically refer to data affecting normal use of the device function by the user, for example, but not limited to, a device name, a Wi-Fi password, a profile, and the like.
In an example, the second device is a mobile phone, and when the user does not use the mobile phone, the mobile phone is in a screen-off state, and the mobile phone can determine that there is no data and a synchronization requirement. When the user performs a screen-lighting operation on the mobile phone, the mobile phone can light the screen. Responding to the screen-lighting operation of the user, the mobile phone confirms that the user will use the mobile phone, and in order to ensure the normal use of the mobile phone, the mobile phone needs to acquire the system function related data, and the mobile phone determines that the synchronous requirement of the system function related data exists. The operation of displaying the screen may include, but is not limited to, pressing a switch key, turning the mobile phone to a vertical direction, clicking the screen, and the like.
Another possible scenario where the second device determines that there is a data synchronization requirement is where the second device has a data synchronization requirement of an application. The second device may determine whether a data synchronization requirement of an application exists according to whether the user opens the application.
In an example, the second device is a mobile phone, and when the user uses the mobile phone, the mobile phone does not open the address book (i.e. an example of an application program), and then the mobile phone determines that there is no need for synchronizing address book data. When a user opens a mobile phone address book, the mobile phone determines that the user needs to acquire contact person data in the address book, and determines that the data synchronization requirement of an application program exists.
Another possible case where the second device determines that there is a data synchronization requirement is that the second device may display a button or an operation interface for indicating data synchronization, and the user may issue an indication of data synchronization through a manual operation, and the second device determines that there is a data synchronization requirement for the user based on this operation by the user.
It should be appreciated that the method of determining that a data synchronization need exists by the second device has been described above in connection with different examples, which are shown for ease of understanding only and should not be construed as limiting the present application in any way.
The second device obtains water level information from the central device, step 504.
The second device may actively obtain water level information from the central device after determining that a data synchronization requirement exists. Optionally, step 504 may specifically include: the second device wakes up the central device, the second device establishes connection with the central device, the second device sends a water level information synchronization request to the central device, and after receiving the water level information synchronization request sent by the second device, the central device sends corresponding water level information to the second device, wherein the water level information can be sent to the central device by the first device.
One possible implementation manner is that the second device wakes up a Wi-Fi chip and a data synchronization component of the central device by sending a data packet to the central device through BLE, and establishes Wi-Fi connection with the central device; the second device sends a water level information synchronization request to the center device through Wi-Fi, and the center device sends water level information to the second device through Wi-Fi.
The second device may also passively acquire water level information from the central device. For example, after detecting that the second device is on line, the central device may actively send water level information to the second device, so that the second device makes a determination as to whether data synchronization is required. In this case, step 504 may be performed before step 503.
In step 505, the second device performs data synchronization based on the water level information.
The second device obtains the water level information from the central device, and can perform data synchronization with the first device corresponding to the water level information under the condition that the data synchronization requirement is determined to exist.
One possible implementation manner is that the second device may wake up the first device, establish a data transmission connection with the first device, send a data synchronization request to the first device, send updated data to the second device, and update local data based on the data by the second device. The second device may send a data packet to the first device through BLE, wake up a Wi-Fi chip and a data synchronization component of the first device, establish a Wi-Fi connection with the first device, send a data synchronization request to the first device through Wi-Fi, send updated data to the second device through Wi-Fi, and update local data based on the data.
In another possible implementation manner, when each device in the terminal set synchronizes the water level information to the central device, the data corresponding to the water level information may also be synchronized to the central device; after the second device obtains the water level information, the second device may also send a data synchronization request to the central device, where the central device sends data to be synchronized by the second device to the second device, and the second device updates local data based on the data.
For a better understanding of the data synchronization method provided in the present application, a specific procedure of data synchronization is described below in conjunction with the scenario shown in fig. 6.
The terminal set shown in fig. 6 includes a smart phone, a tablet computer, a smart television and a computer. Wherein, assume that the computer is a central device. When no data synchronization is required, the terminal devices are connected with each other through BLE. After the data of the smart phone (i.e., one example of the first device) is updated, the smart phone may establish a Wi-Fi connection with the computer, and send water level information to the computer through the Wi-Fi connection, where the water level information is used to indicate an update status of the data in the smart phone. When the intelligent television (namely, one example of the second equipment) has a synchronous requirement for the data, the intelligent television can establish Wi-Fi connection with the computer, send a water level synchronous request to the computer, and send water level information to the intelligent television after the computer receives the water level synchronous request. The intelligent television determines that data synchronization with the intelligent mobile phone is needed based on the water level information, so that the intelligent mobile phone can be awakened, wi-Fi connection is established with the intelligent mobile phone, a data synchronization request is sent to the intelligent mobile phone, after the intelligent mobile phone receives the data synchronization request, data is sent to the intelligent television, and the intelligent television updates local data based on the data.
Therefore, the intelligent television and the tablet personal computer cannot be awakened when the mobile phone and the computer synchronize water level information, and the tablet personal computer cannot be awakened when the intelligent television synchronizes data.
It should be understood that fig. 6 is only an example, and the present application is not limited to the connection technology that is relied upon to establish a data transmission connection between devices, nor is the number of first devices, second devices, and central devices, respectively, and the respective configurations.
Based on the scheme, the first device sends the water level information to the central device after the data update occurs, and the data synchronization in the terminal set is not initiated immediately. Therefore, the power consumption loss caused by frequently waking up all other terminal devices in the terminal set in each data update can be avoided. Then, if the second device in the terminal set needs to perform data synchronization, the water level information may be acquired from the central device first, and after determining that updated data exists, data synchronization may be performed. Therefore, when the terminal equipment in the terminal set has data synchronization requirement, the terminal equipment to be synchronized and the central equipment are awakened to establish connection, and other terminal equipment in the terminal set is not required to be awakened to establish a plurality of connections, so that the awakening times and the connection establishment number of the equipment are reduced, and the power consumption can be reduced. For terminal equipment which has no data synchronization requirement temporarily, the current state can be kept without being influenced by data synchronization among other equipment, so that the power consumption loss caused by unnecessary data synchronization can be reduced.
As mentioned above, the terminal set may also include a plurality of central devices, and the plurality of central devices may be backup to each other. For example, the plurality of central apparatuses may synchronize the water level information maintained locally in real time, and each time the water level information maintained by one of the central apparatuses changes, the synchronization of the water level information is performed so that the two central apparatuses have the same water level information. In this way, the water level information provided by all the central apparatuses is consistent.
For example, when the data of the first device changes, the water level information may be uploaded to either of the two center devices. When the second device has data synchronization requirement, the second device can acquire water level information with any one of the two central devices, and establish connection with the terminal device corresponding to the water level information to perform data synchronization.
Illustratively, the central devices include a first central device and a second central device, between which a water level information transmission connection and a data transmission connection are maintained, and the water level information maintained by the two central devices may be synchronized in real time and thus be consistent. After the water level information of the first central equipment changes, the water level information can be immediately sent to the second central equipment, and the second central equipment updates the water level information thereof according to the water level information; similarly, after the water level information of the second central device changes, the water level information can be immediately sent to the first central device, and the first central device updates the water level information thereof. Assuming that a first device has a communication connection with a first central device, a second device has a communication connection with a second central device, and the first central device and the second central device have a communication connection. The first device may upload the water level information to the first central device, and the first central device and the second central device may perform synchronization of the water level information. Thereafter, the second device may obtain water level information from the second central device when there is a data synchronization demand.
The communication connection between the terminal devices may include, but is not limited to, a Wi-Fi connection or a bluetooth connection, etc., which is not specifically limited in this application.
The plurality of center devices can be mutually backed up, and when one of the center devices cannot be connected with other terminal devices and the water level information is synchronized due to disconnection, faults and the like, the functions of the center devices can be executed by the other center devices, so that the reliability of the data synchronization service of the terminal devices in the terminal system is improved.
The central device may be preset by the user, or may be determined by each terminal device in the terminal system. The process of determining the center device will be described below in connection with fig. 7.
Fig. 7 is a schematic flow chart of determining a center device by a terminal device in an embodiment of the present application. As shown in fig. 7, the method for determining a center device by a terminal device may include steps 701 to 703. The steps in fig. 7 are described in detail below.
In step 701, three or more terminal devices are networked to form a terminal set.
In step 702, each terminal device in the terminal set determines whether to be a candidate center device according to whether the self condition satisfies a preset condition.
Wherein, the preset conditions may include one or more of the following: the terminal equipment is active equipment; the terminal equipment is passive equipment, but the residual electric quantity exceeds a first preset threshold; processing resources of the terminal equipment exceed a second preset threshold; the storage space of the terminal equipment exceeds a third preset threshold; the online time length of the terminal equipment exceeds a fourth preset threshold; the mode of accessing the terminal equipment into the communication system is one of preset modes. The preset thresholds may be threshold values predefined by the user or threshold values preset in the terminal device.
The terminal equipment is active equipment, the terminal equipment is passive equipment, the residual electric quantity is larger than a first preset threshold, the equipment with sufficient electric quantity is selected as central equipment, and the power consumption requirements that the central equipment is frequently awakened and transmission connection is frequently established with the terminal equipment due to water level information synchronization can be met.
The terminal device being an active device and the terminal device being a passive device but having a sufficient amount of power may be two optional conditions for determining whether the terminal device has a sufficient amount of power, as long as one of them is satisfied. Alternatively, the active device may be used as a preferred condition, and if the active device is present, the active device may be preferentially selected as the center device; and selecting the passive device with the residual electric quantity exceeding a first preset threshold as the central device under the condition that the active device is not present.
The processing resource may be the computing capability of the chip in the terminal device, or the capability of responding to data synchronization requests of other terminal devices, or the capability of the terminal device to read and send own data. The equipment with the processing resource exceeding the second preset threshold is selected as the central equipment, the equipment with strong processing capacity is selected as the central equipment, and the central equipment can rapidly respond to the water level synchronization requirement of the terminal equipment.
The memory space may be the available memory space of the terminal device. The equipment with the storage space length exceeding the third preset threshold is selected as the central equipment, the equipment with the large storage space is selected as the central equipment, and the requirement of the central equipment for storing the water level information of a plurality of terminal equipment in the terminal set can be met.
The online time period may be a time period in which the terminal device exists in the terminal set. The equipment with the online time length exceeding the fourth preset threshold is selected as the central equipment, and the equipment with the online time length is selected as the central equipment, so that the central equipment can be stably located in the terminal set for a long time, the frequency of center node election caused by offline of the center node can be reduced, and the stability of the data synchronization service is improved.
The manner in which the terminal device accesses the communication system may refer to a manner in which the terminal device connects with other terminal devices in the terminal set. The preset manner includes Wi-Fi connection, P2P connection, and the like, for example. The preset mode can be defined as a network connection mode with higher reliability, so that the center equipment determined based on the preset mode can mutually and rapidly transmit data with other terminal equipment, and the reliability of data transmission is improved.
The process of the terminal device determining whether to self-referral to a hub device is described in more detail below in connection with FIG. 8. The flow shown in fig. 8 is applicable to any one of the terminal devices in the terminal set.
The process shown in fig. 8 uses the terminal device as an execution body, and describes a process in which the terminal device determines whether a preset condition is satisfied, and further determines whether to self-recommend as a central device. It will be appreciated that the terminal device may become a candidate center device after being referred to as a center device, and may further combine with the situations of other terminals in the terminal set to determine whether it is able to become a center device.
The method specifically comprises the following steps:
step 801, obtaining a power connection condition;
step 802, determining whether the device is an active device according to the power connection condition, if yes, executing step 806, and if not, executing step 803;
step 803, obtaining the residual electric quantity;
step 804, determining whether the remaining power exceeds a first preset threshold, if yes, executing step 806, and if not, executing step 805;
step 805, determining that the non-referral is a candidate hub device. If the terminal device determines that the self-recommendation is not the center device, that is, the terminal device cannot become the candidate center device, the terminal device can not execute the subsequent steps, and the process can be ended.
Step 806, obtaining the size of the processing resource;
step 807, determining whether the processing resource exceeds a second preset threshold, if so, executing step 807, and if not, executing step 805;
step 808, obtaining the size of the storage space of the user;
step 809, determining whether the storage space exceeds a third preset threshold, if yes, executing step 810, and if not, executing step 805;
step 810, acquiring self online time length;
step 811, judging whether the online time length exceeds a fourth preset threshold, if yes, executing step 812, and if not, executing step 805;
step 812, obtaining the mode of accessing the communication system by itself;
step 813, judging whether the access mode is one of the preset modes, if yes, executing step 814, and if not, executing step 805;
step 814, self-referral is to a central device.
It should be understood that the process shown in fig. 8 is only one possible implementation of determining whether to self-recommend as a central device for a terminal device, and should not be construed as limiting the application, in some embodiments, steps may be omitted or added, or the execution sequence of some steps may be further adjusted, for example, steps 806, 807 and 808, 809 may be performed in alternative execution sequences, steps 808, 809 and 810, 811 may be performed in alternative execution sequences, and so on, which are not listed herein. In another implementation, the terminal device may also determine the above conditions simultaneously, for example, step 802, step 804, step 807, step 809, step 811, and step 813 are performed simultaneously, and determine whether to self-recommend as the central device according to the result of the determination of each step.
It can be seen that the above-described preset conditions constrain the center device from different dimensions such that the determined center device satisfies at least one of: has sufficient power, has higher processing capacity, has sufficient storage space, has longer on-line time length, and has higher transmission reliability.
It should be understood that these conditions may be used in combination or alone. Some or all of these conditions may also be used in combination with other conditions. The present application is not limited in this regard.
Each terminal device in the terminal set can judge based on the same preset condition, and whether the terminal device meets the preset condition or not is determined.
If a certain terminal device in the terminal set meets the preset condition, the terminal device becomes a candidate center device and sends the information to other terminal devices, and accordingly, the other terminal devices receive the information.
If another terminal device in the terminal set does not meet the preset condition, the terminal device cannot become a candidate center device. The terminal device may become a voting device for voting in the presence of a plurality of candidate center devices to determine the center device.
If all the terminal devices in the terminal set do not meet the preset conditions, all the terminal devices cannot become candidate center devices. Because the central equipment cannot be determined, the data synchronization among the terminal equipment is performed according to the method in the prior art.
In step 703, the voting device determines a central device from the candidate central devices.
Each terminal device, after becoming a candidate center device, may send a broadcast message to broadcast that terminal device as a candidate center device. The voting device may determine a central device from among the candidate central devices based on the received broadcast message.
If the number of candidate center devices is one, the voting device confirms that the candidate center device is the center device.
If the number of candidate center devices is greater than one, the voting device may vote for a center device from among the plurality of candidate center devices.
Each voting device may score each candidate center device based on one or more of the following: the voting device has a network connection status with each candidate center device, a connection frequency with each candidate center device for a preset period, or a demand amount synchronized with data of each candidate center device.
The network connection state between the voting device and each candidate center device may refer to a transmission rate of transmitting a preset data packet between the voting device and a later selected center device. The connection frequency with each candidate center device in the preset period may be a connection frequency calculated by the voting device based on a predefined usage period in which no center device exists and the number of connections with the candidate center device in the period. The required amount of data synchronization with each candidate center device may be an amount of data that the voting device needs to transmit when confirming data synchronization based on the water level information of the candidate center device.
The voting device votes from the plurality of candidate center devices for selecting a center device, and the candidate center device may send a scoring request to the voting device, and the voting device scores each candidate center device based on the voting basis, and then sends the score to the candidate center device. The candidate center device may determine whether it may act as a center device for the communication system based on the respective score values.
Illustratively, the voting device classifies the network connection status of each candidate center device into different levels, scoring 1-5 points, the higher the transmission rate, the higher the score; dividing the connection frequency of each candidate center device in a preset period into different levels, and scoring 1-5 points, wherein the higher the connection frequency is, the higher the score is; dividing the demand amount synchronized with the data of each candidate center device into different levels, scoring 1-5 points, and scoring higher the demand amount; the voting equipment adds the scores corresponding to the same candidate center equipment and sends the scores to the candidate center equipment, the candidate center equipment obtains own scores from the voting equipment, the total scores are obtained after the addition, and the candidate center equipment compares the total score values to determine the center equipment.
One possible way is that each candidate center device sends the respective score value to other candidate center devices, and then selects the candidate center device with the highest score as the center device. At this time, one center device may be determined from a plurality of candidate center devices.
Another possible way is that the candidate center device determines itself to be a center device if the respective score value is greater than a preset value. At this time, one center device may be determined from among the plurality of candidate center devices, and a plurality of center devices may be determined.
After the center device is determined by the above method, each terminal device in the terminal set may perform the data synchronization method as shown in fig. 5. If the central equipment is not determined by the method, each terminal equipment in the terminal set can perform data synchronization according to the data synchronization method in the prior art.
Based on the scheme, each terminal device in the terminal set selects candidate center devices according to the power state, the processing resources, the storage space, the online time length and the network state, and determines the center devices according to the network connection state, the short-term internal connection frequency and the data synchronization demand between other terminal devices and the candidate center devices, so that the center devices which can be online for a long time and provide rapid and stable water level information synchronization can be selected, meanwhile, unnecessary device awakening can be reduced, and the reduction of power consumption is realized.
It should be appreciated that the method of determining a center device from a set of terminals is not limited to the methods illustrated herein. The specific method of determining the center device is not limited in this application. Due to the high mobility of the terminal devices, the terminal devices in the terminal set may change. For example, some terminal devices may exit the terminal set and some terminal devices may join the terminal set. Thus, the state of the center device may also change, for example, exiting the terminal device set, the terminal set changing from a centered device state to a non-centered device state; in addition, the center device may not be suitable as the center device due to other reasons such as power off, and the terminal set may be changed from the center device-present state to the center device-absent state. After the terminal set is changed into a state without central equipment, the central equipment can be reselected, and data synchronization is performed based on the reselected central equipment; the data synchronization can also be performed according to the prior art method.
When a terminal device joins a terminal set, the newly joined terminal device can first determine whether a center device exists in the terminal set, and then perform data synchronization based on the center device. Fig. 9 illustrates, by taking the fourth device as an example, a process of determining a center device after the fourth device joins the terminal set, and further performing data synchronization.
As shown in fig. 9, after the fourth device joins the terminal set, it is determined whether or not there is a center device.
The fourth device sends a query message to the third device in the terminal set, querying whether a center device is present in the terminal set. The query message may be a broadcast message and the terminal device receiving the query message may reply to the fourth device with a message indicating whether or not a center device is present. For example, the third device receives the query message of the fourth device and replies a message to the fourth device to indicate whether the center device is present.
If the center equipment exists in the terminal set, the third equipment indicates the center equipment in a reply message sent to the fourth equipment after receiving the query message of the fourth equipment. The fourth device then performs data synchronization using the method shown in fig. 5.
If the terminal set does not have the center equipment, the third equipment indicates that the center equipment does not exist in the reply message sent to the fourth equipment after receiving the query message of the fourth equipment. The fourth device then determines whether itself satisfies the preset condition, where the preset condition is the preset condition in step 702. If the fourth device meets the preset condition, the device becomes a central device in the terminal set, and other terminal devices in the terminal set perform data synchronization according to the method shown in fig. 5 based on the central device. If the fourth device does not meet the preset condition, the terminal set has no central device, and the data synchronization between the terminal devices is performed according to the data synchronization method in the prior art, which is not repeated here.
The method for data synchronization provided by the embodiment of the application is described above with reference to the accompanying drawings. The specific flow of each terminal device when used to implement the above method will be described below in connection with fig. 10 from the perspective of device internal interaction.
Fig. 10 shows the flow of interactions between modules in the data management service in more detail.
As shown in fig. 10, the data management service may include a data synchronization component including a central node maintenance module, a data policy synchronization module, a central node election module, and a device information maintenance module.
The device information maintenance module may maintain basic information of the terminal device, where the basic information may include any one or more of the following: the method comprises the steps of active state of terminal equipment, residual electric quantity of the terminal equipment, processing resources of the terminal equipment, storage space of the terminal equipment, online time of the terminal equipment and a mode of accessing the terminal equipment into the communication system. It should be understood that the basic information herein may be used in the above step 702, as a basis for the terminal device to confirm itself as a candidate center device.
The device information maintenance module may also maintain interaction information of the present terminal device, where the interaction information may include any one or more of the following: the network connection state of the terminal equipment and other terminal equipment, the connection frequency of the terminal equipment and other terminal equipment in a preset period, and the data synchronization requirement of the terminal equipment and other terminal equipment. It should be appreciated that the interaction information herein may be used in step 703 described above as a basis for scoring each candidate center device by the voting device.
The central node election module may determine whether itself is a candidate central device. Illustratively, the central node election module executes step 702 to determine whether the central node election module itself becomes a candidate central device according to the basic information of the terminal device in the device information maintenance module.
If the candidate center device is the center node election module may also broadcast participation election information, and confirm the center device from the plurality of candidate center devices according to the score received from the voting device in the predefined time, and the specific steps are described in the foregoing step 703, which is not repeated here.
If the central node election module becomes the voting device, the central node election module may also execute step 703, and score the candidate central device according to the basic information of the terminal device in the device information maintenance module.
The central node maintenance module may maintain state information of the central device, and illustratively, after the central node election module selects the central device, the central node maintenance module may store information for indicating the central device; after receiving the inquiry broadcast of the central device of the other terminal device, the information indicating the central device may be transmitted in response to the inquiry broadcast. Or after the central node election module elects, the central node maintenance module can store information indicating that the central equipment is not selected; after receiving the inquiry broadcast of the central equipment of other terminal equipment, the inquiry broadcast can be responded to, and no central node in the terminal set is indicated.
The data synchronization policy module may select a data synchronization policy according to the central device status information in the central node maintenance module. For example, if there is a central device in the terminal set, when there is a data synchronization requirement, the data synchronization policy module generates a data synchronization policy based on a central node as shown in fig. 5; if the terminal set does not have the center equipment, the data synchronization strategy module generates a data synchronization strategy based on the prior art when the data synchronization requirement exists.
Fig. 11 is a schematic block diagram of a data synchronization device provided in an embodiment of the present application. As shown in fig. 11, the data sync 1100 may include a transceiving unit 1110 and a processing unit 1120.
Alternatively, the data synchronization apparatus 1100 may correspond to the first device in the above method embodiments, and may be, for example, the first device, or a component configured in the first device, such as a chip, a chip system, a processor, or the like. The apparatus 1100, when corresponding to a first device, is operable to perform a method performed by the first device. Illustratively, the transceiver 1110 is configured to send water level information to a central device when data is updated; the processing unit 1120 is configured to perform data synchronization with a second device based on the water level information when the second device wakes up.
Alternatively, the data synchronization apparatus 1100 may correspond to the central device in the above method embodiment, for example, may be the central device, or a component configured in the central device, such as a chip, a chip system, a processor, or the like. The apparatus 1100, when corresponding to a central device, may be configured to perform a method performed by the central device. Illustratively, the transceiver 1110 is configured to receive water level information from a first device, where the water level information is used to indicate an update status of the data; the transceiver 1110 is further configured to send the water level information to a second device.
Alternatively, the data synchronization apparatus 1100 may correspond to the second device in the above method embodiments, and may be, for example, the second device, or a component configured in the second device, such as a chip, a chip system, a processor, or the like. The apparatus 1100, when corresponding to a second device, is operable to perform a method performed by the second device. Illustratively, the transceiver 1110 is configured to obtain, in the case where there is a data synchronization requirement, water level information from a central device, where the water level information is used to indicate an update status of data, and the central device is used to maintain the water level information; the processing unit 1120 is configured to perform data synchronization based on the water level information.
It should be understood that the specific process of each unit performing the corresponding steps has been described in detail in the above method embodiments, and is not described herein for brevity.
It should be understood that, when the data synchronization device is a terminal device, the transceiver 1110 in the data synchronization device may be implemented through a communication interface; the processing unit 1120 in the data synchronization device may be implemented by at least one processor.
It should be further understood that, when the data synchronization device is a chip or a chip system configured in a terminal device, the transceiver 1110 in the data synchronization device may be implemented by an input/output interface, a circuit, etc., and the processing unit 1120 in the data synchronization device may be implemented by a processor, a microprocessor, an integrated circuit, etc. integrated on the chip or the chip system.
The application also provides a communication system which comprises the first equipment, the second equipment and the central equipment in the embodiment of the method.
The application also provides a processing device, which comprises at least one processor, and the at least one processor is used for executing a computer program stored in a memory, so that the processing device executes the method executed by the first device, the second device or the central device in the method embodiment.
It should be understood that the processing means described above may be one or more chips. For example, the processing device may be a field programmable gate array (field programmable gate array, FPGA), an application specific integrated chip (application specific integrated circuit, ASIC), a system on chip (SoC), a central processing unit (central processor unit, CPU), a network processor (network processor, NP), a digital signal processing circuit (digital signal processor, DSP), a microcontroller (micro controller unit, MCU), a programmable controller (programmable logic device, PLD) or other integrated chip.
The present application also provides a computer program product comprising: a computer program (which may also be referred to as code, or instructions), which when executed, causes a computer to perform the method performed by the first device, or the method performed by the second device, or the method performed by the central device in the above-described embodiments.
The present application also provides a computer-readable storage medium storing a computer program (which may also be referred to as code, or instructions). The computer program, when executed, causes a computer to perform the method performed by the first device, or the method performed by the second device, or the method performed by the center device in the above-described embodiments.
It should be noted that the processor in the embodiments of the present application may be an integrated circuit chip with signal processing capability. In implementation, the steps of the above method embodiments may be implemented by integrated logic circuits of hardware in a processor or instructions in software form.
The processor described above may be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof. The general purpose processor may be a microprocessor, but in the alternative, it may be any conventional processor or the like.
The memory in embodiments of the present application may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The nonvolatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an electrically Erasable EPROM (EEPROM), or a flash memory. The volatile memory may be random access memory (random access memory, RAM) which acts as an external cache. By way of example, and not limitation, many forms of RAM are available, such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous DRAM (SLDRAM), and direct memory bus RAM (DR RAM). It should be noted that the memory of the methods and apparatus described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
The methods provided by the above embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product may include one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, fiber optic, digital Subscriber (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means from one website, computer, server, or data center. The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic disk), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a Solid State Disk (SSD)), or the like.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk or an optical disk.
The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (20)

1. A method of data synchronization for use in a communication system comprising at least three devices, the method comprising:
under the condition that data are updated, a first device in the communication system sends water level information to a central device in the communication system, wherein the water level information is used for indicating the updating state of the data, and the central device is used for maintaining the water level information of each device in the communication system;
a second device in the communication system acquires the water level information from the central device under the condition that data synchronization requirements exist;
the second device performs data synchronization based on the water level information.
2. The method of claim 1, wherein the water level information includes first water level information corresponding to system function related data of the first device, the first water level information indicating an update status of the system function related data; and
The first device sends water level information to a central device under the condition that data is updated, and the method comprises the following steps:
and the first equipment sends the first water level information to the central equipment under the condition that the system function related data are updated.
3. The method of claim 2, wherein the second device obtaining the water level information from the central device in the presence of a data synchronization requirement comprises:
the second device determines that the system function related data of the first device has a synchronous requirement under the condition that the second device detects the bright screen operation of a user;
the second device obtains the first water level information from the central device;
the second device performs data synchronization based on the water level information, including:
and the second equipment synchronizes the system function related data based on the first water level information.
4. The method of claim 1, wherein the first device has a first application installed therein, the water level information including second water level information corresponding to data of the first application; and
the first device sends water level information to a central device under the condition that data is updated, and the method comprises the following steps:
And the first equipment sends the second water level information to the central equipment under the condition that the data of the first application program is updated.
5. The method of claim 4, wherein the first application is also installed in the second device;
the second device obtains the water level information from the central device under the condition that the data synchronization requirement exists, and the second device comprises:
the second device determines that the data synchronization requirement of the first application program exists under the condition that the first application program is opened;
the second device obtains the second water level information from the central device;
the second device performs data synchronization based on the water level information, including:
the second device performs data synchronization of the first application program based on the second water level information.
6. The method of any of claims 1 to 5, wherein the second device performs data synchronization based on the water level information, comprising:
the second device performs data synchronization with the first device based on the water level information.
7. The method according to any one of claims 1 to 6, wherein the central device is a device in the communication system that satisfies a preset condition; the preset conditions include one or more of the following: the mode of being active equipment, being passive equipment, but the residual electric quantity exceeding a first preset threshold, the processing resource exceeding a second preset threshold, the storage space exceeding a third preset threshold, the on-line time length exceeding a fourth preset threshold or accessing the communication system is one of preset modes.
8. The method according to claim 7, wherein in the case where the device satisfying the preset condition in the communication system is a plurality of devices, the plurality of devices are a plurality of candidate center devices, the center device is selected from the plurality of candidate center devices by a voting device, the voting device being a device other than the plurality of candidate center devices in the communication system.
9. The method of claim 8, wherein the method further comprises:
each voting device determines the central device from a plurality of candidate central devices based on one or more of: network connection with each candidate center device, connection frequency with each candidate center device in a preset period, or demand amount synchronized with data of each candidate center device.
10. The method of any one of claims 1 to 9, wherein the central devices comprise a first central device and a second central device; the method further comprises the steps of:
and the first center equipment and the second center equipment synchronize the water level information maintained by the first center equipment and the second center equipment in real time.
11. The method of any one of claims 1 to 10, wherein the method further comprises:
A third device in the communication system receives a query message from a fourth device, wherein the query message is used for querying a central device of the communication system, and the fourth device is a device newly added into the communication system;
the third device sends a reply message to the fourth device, the reply message indicating the central device.
12. The method of any one of claims 1 to 11, wherein the method further comprises:
each device in the communication system re-determines the central device of the communication system in the event that the central device exits the communication system.
13. A communication system comprising a first device, a second device, and a central device; wherein,
the first device is used for sending water level information to the central device under the condition that data is updated, and the water level information is used for indicating the updating state of the data;
the central equipment is used for maintaining water level information of each equipment in the communication system;
the second device is used for acquiring the water level information from the central device and performing data synchronization based on the water level information under the condition that data synchronization requirements exist.
14. A method of data synchronization, for use with a first device, the method comprising:
under the condition that data are updated, water level information is sent to central equipment, wherein the water level information is used for indicating the updating state of the data, and the central equipment is used for maintaining the water level information of the first equipment;
and carrying out data synchronization with the second device based on the water level information under the condition of being awakened by the second device.
15. A method of data synchronization, for use with a central facility, the method comprising:
receiving water level information from a first device, wherein the water level information is used for indicating the update state of the data;
and sending the water level information to the second equipment.
16. A method of data synchronization, for use with a second device, the method comprising:
under the condition that data synchronization requirements exist, water level information is acquired from central equipment, wherein the water level information is used for indicating the update state of data, and the central equipment is used for maintaining the water level information;
the second device performs data synchronization based on the water level information.
17. Terminal device, characterized by comprising means for implementing the method according to any of claims 14 to 16.
18. A terminal device comprising a processor for executing computer instructions stored in a memory, to cause the terminal device to perform the method of any of claims 14 to 16.
19. A computer readable storage medium having stored therein computer instructions which, when run on a computer, cause the computer to perform the method of any of claims 14 to 16.
20. A computer program product comprising a computer program which, when run, implements the method of any of claims 14 to 16.
CN202211100244.8A 2022-09-09 2022-09-09 Data synchronization method, related device and system Pending CN117692466A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202211100244.8A CN117692466A (en) 2022-09-09 2022-09-09 Data synchronization method, related device and system
PCT/CN2023/117140 WO2024051718A1 (en) 2022-09-09 2023-09-06 Data synchronization method, and related apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211100244.8A CN117692466A (en) 2022-09-09 2022-09-09 Data synchronization method, related device and system

Publications (1)

Publication Number Publication Date
CN117692466A true CN117692466A (en) 2024-03-12

Family

ID=90127099

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211100244.8A Pending CN117692466A (en) 2022-09-09 2022-09-09 Data synchronization method, related device and system

Country Status (2)

Country Link
CN (1) CN117692466A (en)
WO (1) WO2024051718A1 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105187472A (en) * 2015-06-02 2015-12-23 小米科技有限责任公司 Data synchronization method and data synchronization device
CN105141687B (en) * 2015-08-19 2018-05-04 焦点科技股份有限公司 A kind of method for producing message
CN107295097A (en) * 2017-07-17 2017-10-24 深圳市金立通信设备有限公司 Method of data synchronization, server and equipment
CN108183965A (en) * 2018-01-15 2018-06-19 郑州云海信息技术有限公司 A kind of method of data synchronization, device, equipment, system and readable storage medium storing program for executing
CN110688254B (en) * 2019-09-06 2022-06-03 北京达佳互联信息技术有限公司 Data synchronization method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
WO2024051718A1 (en) 2024-03-14

Similar Documents

Publication Publication Date Title
WO2020211733A1 (en) Bluetooth connection method, device and system
CN110364151B (en) Voice awakening method and electronic equipment
CN115209194B (en) Terminal equipment, method and system for realizing one touch screen through remote controller
WO2020133183A1 (en) Audio data synchronization method and device
CN111405681B (en) Wi-Fi Aware link establishment method, wi-Fi Aware link establishment system, electronic equipment and storage medium
WO2021043045A1 (en) Method and device for configuring network configuration information
WO2021017909A1 (en) Method, electronic device and system for realizing functions through nfc tag
CN112954819B (en) Equipment networking method, electronic equipment and system
WO2021043219A1 (en) Bluetooth reconnection method and related apparatus
WO2021043198A1 (en) Bluetooth pairing method, and related device
CN114499587B (en) Audio synchronization communication method, system, wireless earphone, terminal and storage medium
WO2021143314A1 (en) Method for reducing power consumption of mobile terminal and mobile terminal
CN114339709A (en) Wireless communication method and terminal device
CN113676339B (en) Multicast method, device, terminal equipment and computer readable storage medium
CN114125789B (en) Communication method, terminal device and storage medium
CN116133165A (en) Headset connection system, method, headset, electronic device, and readable storage medium
CN115134404B (en) Method for managing push connection and electronic equipment
WO2024051718A1 (en) Data synchronization method, and related apparatus and system
CN114339698A (en) Method for establishing wireless connection through equipment touch, electronic equipment and chip
CN114980238B (en) Wi-Fi access method and related equipment
CN115580541B (en) Information synchronization method and electronic equipment
CN114173317B (en) Method for transmitting data and electronic equipment
CN116667875B (en) Switching method and device of internet access and terminal equipment
CN114449492B (en) Data transmission method and terminal equipment
CN115550892B (en) Method and device for synchronizing system information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination