WO2017181520A1 - Method and device for data synchronization - Google Patents

Method and device for data synchronization Download PDF

Info

Publication number
WO2017181520A1
WO2017181520A1 PCT/CN2016/087117 CN2016087117W WO2017181520A1 WO 2017181520 A1 WO2017181520 A1 WO 2017181520A1 CN 2016087117 W CN2016087117 W CN 2016087117W WO 2017181520 A1 WO2017181520 A1 WO 2017181520A1
Authority
WO
WIPO (PCT)
Prior art keywords
synchronization
period
application
frequency factor
time period
Prior art date
Application number
PCT/CN2016/087117
Other languages
French (fr)
Chinese (zh)
Inventor
张更
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017181520A1 publication Critical patent/WO2017181520A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/535Tracking the activity of the user
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • This document relates to, but is not limited to, the field of mobile communications, and relates to a data synchronization method and apparatus.
  • the e-mail in the mobile phone plays the role of the client.
  • the e-mail client actively takes the e-mail to the server to view it. This process is called synchronization.
  • the synchronization is mainly initiated by the background, and is generally set to be synchronized once every 15 minutes or half an hour, that is, at a fixed period (frequency).
  • the synchronization period is a fixed value. If the setting is long, the new message cannot be received in time. If the setting is short, the "useless" synchronization is often initiated, which has a great impact on the power consumption of the terminal, and is also a waste of user data traffic.
  • the embodiment of the invention provides a data synchronization method and device, which can adapt to the usage habits of different users and solve the contradiction between the timeliness of data synchronization and the system power consumption.
  • the embodiment of the invention provides a data synchronization method, including:
  • Data synchronization is performed on the application according to the synchronization period during the same synchronization period of the next cycle.
  • the setting, according to the frequency factor, the synchronization period of the application in the synchronization period includes:
  • a synchronization period of the application in the synchronization period is set according to a relationship in which the magnitude of the frequency factor is negatively correlated with the length of the synchronization period.
  • the method further includes: before the step of acquiring a frequency factor of using an application in at least one synchronization period in the current cycle period,
  • a time period in which the frequency factor is greater than the first threshold is used as the synchronization time period; a time period in which the frequency factor is less than or equal to the first threshold is used as the non-synchronization time period, and the non-synchronization time period is closed for the application. data synchronization.
  • the obtaining a frequency factor for using an application in each of the time periods includes:
  • the frequency factor of the application during the time period is calculated according to the number of operations of different operations, the weight, and the running time of the application.
  • the method further includes: using, as the time period, the frequency factor is greater than the first threshold a synchronization period; after the time period in which the frequency factor is less than or equal to the first threshold is used as the non-synchronization period,
  • the frequency factor of the combined synchronization time period is not greater than a maximum value of the frequency factor in the synchronization time period included therein, and the frequency factor of the combined synchronization time period Not less than the minimum of the frequency factor in the synchronization period it includes.
  • the embodiment of the invention further provides a data synchronization device, comprising:
  • An obtaining module configured to acquire a frequency factor of using an application in at least one synchronization period in a current cycle period, where the frequency factor is used to indicate a frequency of how the user uses the application during the synchronization period;
  • a module configured to set a synchronization period of the application in the synchronization period according to the frequency factor
  • the synchronization module is configured to perform data synchronization on the application according to the synchronization period within the same synchronization period of the next cycle.
  • the setting module is set to:
  • a synchronization period of the application in the synchronization period is set according to a relationship in which the magnitude of the frequency factor is negatively correlated with the length of the synchronization period.
  • the device further includes: a pre-processing module, configured to:
  • a time period in which the frequency factor is greater than the first threshold is used as the synchronization time period; a time period in which the frequency factor is less than or equal to the first threshold is used as the non-synchronization time period, and the non-synchronization time period is closed for the application. data synchronization.
  • the preprocessing module includes:
  • a first processing sub-module configured to acquire a number of operations of the application performing different operations in each time period of a preset plurality of historical cycle periods, and assign a weight to each operation
  • a second processing submodule configured to acquire a running time of the application in each time period preset by a plurality of historical cycle periods
  • the third processing submodule is configured to calculate a frequency factor of the application during the time period according to the number of operations of different operations, the weight, and the running time of the application.
  • the device further includes a merge module, configured to:
  • the frequency factor of the combined synchronization time period is not greater than a maximum value of the frequency factor in the synchronization time period included therein, and the frequency factor of the combined synchronization time period Not less than the minimum of the frequency factor in the synchronization period it includes.
  • the embodiment of the invention further provides a computer readable storage medium, wherein the computer readable storage medium stores computer executable instructions, and the computer executable instructions are implemented to implement a data synchronization method.
  • the data synchronization method of the embodiment of the present invention can adapt to the usage habits of different users by adjusting the synchronization period of the data in time by using the frequency of the application program.
  • the data synchronization method ensures that the synchronization function is turned off during the period when the application is not used, and the synchronization period is set to be shorter when the application is used frequently, which solves the time synchronization of the data synchronization and the system power consumption to some extent.
  • the contradiction at the same time, it prevents the data from being synchronized during the period when the application is not used, and reduces the accidental interruption and traffic loss caused by data synchronization.
  • FIG. 1 is a schematic flowchart of a data synchronization method in Embodiment 1 of the present invention
  • FIG. 2 is a schematic flowchart of dividing a current cycle period according to Embodiment 1 of the present invention
  • FIG. 3 is a schematic flowchart of calculating a frequency factor of each divided time period according to Embodiment 1 of the present invention
  • FIG. 4 is a schematic flowchart of combining the current cycle period and combining the current cycle according to the first embodiment of the present invention
  • FIG. 5 is a schematic flowchart of synchronizing emails by using a data synchronization method according to Embodiment 2 of the present invention.
  • FIG. 6 is a schematic flowchart of recording time and weight of each operation of an email according to Embodiment 2 of the present invention.
  • FIG. 7 is a schematic flowchart of pushing a video application by using a data synchronization method according to Embodiment 3 of the present invention.
  • FIG. 8 is a schematic flowchart of recording time and weight of each operation of a video screen application according to Embodiment 3 of the present invention.
  • FIG. 9 is a schematic structural diagram of a data synchronization apparatus according to Embodiment 4 of the present invention.
  • an embodiment of the present invention provides a data synchronization method, including:
  • Step 1 Obtain a frequency factor of using an application in at least one synchronization time period in the current cycle period, where the frequency factor is used to indicate how frequently the user uses the application during the synchronization time period;
  • the cycle period is not limited to one day, and may be adjusted according to actual use.
  • the frequency factor of using an application in at least one synchronization period is obtained to obtain how frequently the user uses the application in the different time period.
  • the frequency with which the application is used is directly related to the user's need for the synchronization cycle of the application.
  • Step 2 according to the frequency factor, setting a synchronization period of the application in the synchronization period;
  • the synchronization period is set according to the frequency factor, which fully satisfies the user's usage habits.
  • the method of setting the synchronization period is different from the method of setting the synchronization period to a fixed value in the related art, fully considering the habit of the user, and setting different synchronization periods for the time periods of different usage frequencies.
  • Step 3 in the same synchronization period of the next cycle, according to the synchronization period The application performs data synchronization.
  • the application runs the next cycle of the current cycle, it runs to the same synchronization time period, and synchronizes the application with the synchronization cycle set for the synchronization time period to achieve the purpose of running a new synchronization cycle.
  • the data synchronization method in the embodiment of the present invention can adapt to the usage habits of different users by adjusting the synchronization period of the data in time by using the frequency of the application.
  • step 2 setting a synchronization period of the application in the synchronization period according to the frequency factor, including:
  • a synchronization period of the application in the synchronization period is set according to a relationship in which the magnitude of the frequency factor is negatively correlated with the length of the synchronization period.
  • the synchronization period of the application is adjusted to be shorter; if an acquired application is in the synchronization period in the current cycle period, If the frequency factor of the program is small, the synchronization period of the application is adjusted to be longer.
  • the data synchronization method ensures that the synchronization setting is shorter in a period in which the application is used more frequently, and the synchronization period is longer in a period in which the application is used less, thereby solving the timeliness and system of the data synchronization to some extent.
  • the size of the frequency factor is positively correlated with the length of the synchronization period, and the synchronization period of the application within the synchronization period is set.
  • the method further includes:
  • Step 10 Before the step of acquiring a frequency factor of using an application in at least one synchronization period in the current cycle period, dividing the current cycle period into multiple time segments;
  • the day is divided equally into four time periods, that is, from 0 o'clock, every 6 hours as a time period.
  • Step 20 Obtain a frequency factor of using an application in each of the time periods
  • Step 30 The time period in which the frequency factor is greater than the first threshold is used as the synchronization time period; the time period in which the frequency factor is less than or equal to the first threshold is used as the non-synchronization time period, and the application is closed in the non-synchronization time period.
  • the frequency factor from 0 o'clock to 6 o'clock is less than the first threshold, and the frequency factor from 6 o'clock to 12 o'clock is greater than the first threshold, then 0 o'clock to 6 o'clock is the non-synchronization time period, and 6 o'clock to 12 o'clock is the synchronization time period.
  • the step is to determine that the time period factor is less than the first threshold time period as the non-synchronization time period, and the synchronization is not performed during the non-synchronization time period, preventing data synchronization from being performed during the time period when the application is not used, and reducing the data synchronization band. Unexpected interruptions and traffic losses.
  • step 20 obtaining a frequency factor of each of the time segments, including:
  • Step 201 Acquire a number of operations in which the application performs different operations in each time period preset for a plurality of historical cycle periods, and assign a weight to each operation;
  • the number of times each operation is performed on the application in each time period of the previous cycle of the current cycle is obtained.
  • each time period of the week before the current day is taken.
  • the number of times the application performs various operations is collected. For example, the number of times an application is opened, the number of times the first function of the application is clicked, or the number of times the second function of the application is clicked. Because each operation of the application has a different weight for determining the frequency factor, a weight is assigned to each operation.
  • Step 202 Acquire a running time of the application in each time period preset by a plurality of historical cycle periods
  • Step 203 Calculate a frequency factor of the application in the time period according to the number of operations of different operations, the weight, and the running time of the application.
  • the number of operations, weights, and application runtime of different operations can determine the frequency factor by which the user uses the application.
  • the user's habit data such as the number of operations of an application, the weight, and the application, are stored in the user's habit database.
  • Frequency factor in different time periods Refers to the ratio of all users' habitual data samples in a cycle of the user's habits of data samples during this time period.
  • step 10, step 20, and step 30 are capable of distinguishing the divided time segments from which time period the data of the application is synchronized, and which time period the application data is not synchronized, thereby avoiding Synchronizing the application's data during periods of low user manipulation frequency causes an interruption to the user.
  • the method further includes:
  • Step 40 The time period in which the frequency factor is greater than the first threshold is used as the synchronization time period; after the time period in which the frequency factor is less than or equal to the first threshold is used as the non-synchronization time period, multiple consecutive non-synchronization time segments are used. Merging, and combining a plurality of consecutive synchronization time periods in which the frequency factors differ by no more than the second threshold;
  • Step 50 Determine a frequency factor of the combined synchronization time period.
  • a plurality of consecutive synchronization periods in which the frequency factors differ by no more than the second threshold are combined, or a plurality of consecutive non-synchronization periods are combined.
  • the frequency factor of each time segment can be determined by the number of operations of different operations, the weight, and the running time of the application. If the difference between the frequency factors in the plurality of consecutive synchronization periods does not exceed the second threshold, the plurality of time segments are combined, and the synchronized time period after the synchronization uses the same synchronization period to synchronize the application, thereby reducing the synchronization time period.
  • the number of non-synchronized time periods reduces the amount of control resources that are occupied.
  • the frequency factor of the merged synchronization period is not greater than a maximum of a plurality of consecutive frequency factors in the synchronization period, and is not less than a minimum of a plurality of consecutive frequency factors in the synchronization period.
  • the frequency factors of the combined time periods are 0.02, 0.03, 0.01, 0.04, and 0.02
  • the frequency factor of the combined time period may be between 0.01 and 0.04. Setting the frequency factor of the combined time period can reduce the excessive processing frequency factor data and reduce the load on the system.
  • the method further includes: after step 3, after data synchronization of the application in a synchronization period of the next cycle period, determining the next time after the synchronization time period according to the merge situation of the divided multiple time segments
  • the time of the synchronization period generally refers to the start time of the next synchronization period. Determine the start time of each synchronization time period in turn, so that the system can enter a cycle Planning for line synchronization.
  • the method for intelligently synchronizing emails includes:
  • Step S1 dividing each day equally into a plurality of time periods
  • Step S2 Counting user habit data such as the number of operations, the weight, and the running time of the application for different operations of the e-mail in each time period of the plurality of historical loop periods, and acquiring the users in different time periods according to the user habit data. Frequency factor of the email;
  • Step S3 setting a synchronization period of the email in each time period according to the frequency factor of each time period;
  • Step S4 performing data synchronization on the email according to the set synchronization period in a certain period of the next cycle period;
  • step S5 it is determined the time when the email is synchronized next time.
  • step S1 24 hours a day can be divided into 12 time segments, each time period is two hours, and is defined as T0 to T11, T0 represents 0:00 to 2:00, and T1 represents 2 :00 ⁇ 4:00...T11 stands for 22:00 ⁇ 24:00.
  • step S2 the user habit data such as the number of operations, the weight, and the running time of the application for different operations of the e-mail in each time period of the preset plurality of historical loop periods are statistically included:
  • S203 When exiting the mail application, record the time of exiting the mail application and the duration of using the mail application;
  • step S2 user habit data such as the number of operations of different operations of the e-mail, the weight and the running time of the application in each time period of the plurality of historical loop periods are saved in the habit number.
  • user habit data such as the number of operations of different operations of the e-mail, the weight and the running time of the application in each time period of the plurality of historical loop periods are saved in the habit number.
  • the correspondence between user habit data is shown in Table 1.
  • step S2 the user presets the user habit data for operating the e-mail in each time period of the plurality of historical cycle periods, and takes the user data of the past week as a statistical sample, and firstly clears the record in the user habit database earlier than one week. And then calculate the frequency factor for the user to use the email for different time periods according to the following formula:
  • the correspondence between the frequency factors for calculating the e-mail used by the user for each time period of the day is as shown in Table 2.
  • step S3 according to the frequency factor of each time period, the synchronization period of the email in each time period is set, including the following cases:
  • the synchronization period When the frequency factor is small, set the synchronization period to be longer; for example, the T4 time period synchronization factor is 0.13, and the T4 time period synchronization period is set to 30 minutes;
  • the synchronization period When the frequency factor is large, set the synchronization period to be shorter; for example, the T5 time period synchronization factor is 0.26, and the T5 time period synchronization period is set to 5 minutes;
  • the email synchronization is turned off; for example, the T0, T1, T2, T3, T10, and T11 time periods, and the email synchronization function is turned off;
  • Step S3 according to the frequency factor of each time period, before setting the synchronization period of the email in each time period, the method further comprises: combining several time periods into one when the frequency factors of the consecutive time periods are the same or similar Longer time period. Wherein, when a plurality of consecutive time period frequency factors do not exceed a certain threshold (for example, 0.02), the time periods are combined. For example, T0 to T3 and T10 to T11 are combined into the same time period. If the frequency factors of several consecutive time segments are less than a set threshold, the consecutive time segments are regarded as non-synchronized time segments, and the application is not synchronized during the combined time period. Reduce the use of traffic and avoid the impact on users.
  • a certain threshold for example, 0.02
  • step S5 after the email client synchronizes the mail with the new synchronization week, it determines the time for adjusting the email synchronization period for the next time, which generally refers to the start time of the next time period. For example, when T0 is set to turn off e-mail synchronization, the next adjustment of the e-mail synchronization period is the start time of T4, and the synchronization period is set to 30 minutes in sequence at T4.
  • the data synchronization method of the embodiment of the present invention is described in detail below by taking a day as a cycle and applying an intelligent synchronization (pushing) method to an online video.
  • Step S10 dividing each day equally into a plurality of time periods
  • Step S20 Counting user habit data such as the number of operations, the weight, and the running time of the application for different operations of the video in each time period of the plurality of historical loop periods, and acquiring the users in different time periods according to the user habit data. Frequency factor of the video application;
  • Step S30 setting a push period of the video application in each time period according to a frequency factor of each time period
  • Step S40 Perform data push on the video application according to the set push period in a certain period of the next cycle period;
  • step S50 the time for pushing the video application next time is determined.
  • step S10 six time periods are divided each day, each time period is 4 hours, and is defined as T0 to T5.
  • step S20 statistics are preset for each time period of a plurality of historical cycle periods.
  • User habits such as the number of operations, weights, and application runtime of different operations on the video, including:
  • the frequency factor correspondence of the user using the online video application in each time period of the day is calculated as shown in Table 3.
  • step S30
  • the data push is turned on, and the push cycle is set to a default value, such as a T5 time period.
  • the method further includes, before step S30, combining the several time periods into one longer time period when the frequency factors of the consecutive time periods are the same or similar.
  • a certain threshold for example, 0.02
  • the time periods T0 to T4 are combined. If the frequency factors of several consecutive time segments are less than a set threshold, the consecutive time segments are regarded as non-synchronized time segments, and the application is not synchronized during the combined time period. Reduce the use of traffic and avoid the impact on users.
  • step S50 after the video application pushes with the new push week, the push time of the next screen application is determined, which is generally the start time of the next time period for pushing. For example, the data push is turned off during the T0 period, and the start time of the next time period T5 of pushing is determined, and Turn on data push at T5 and set the push cycle to the default value.
  • an embodiment of the present invention further provides a data synchronization apparatus, including:
  • the obtaining module 100 is configured to acquire a frequency factor of using an application in at least one synchronization period in the current cycle period, where the frequency factor is used to indicate how frequently the user uses the application during the synchronization period;
  • the setting module 200 is configured to set a synchronization period of the application in the synchronization period according to the frequency factor;
  • the synchronization module 300 is configured to perform data synchronization on the application according to the synchronization period within the same synchronization period of the next cycle.
  • the data synchronization device further includes: a pre-processing module 400, configured to:
  • a time period in which the frequency factor is greater than the first threshold is used as the synchronization time period; a time period in which the frequency factor is less than or equal to the first threshold is used as the non-synchronization time period, and the non-synchronization time period is closed for the application. data synchronization.
  • the pre-processing module 400 includes:
  • the first processing sub-module 401 is configured to acquire, for a preset number of operations, that the application performs different operations in each time period of the plurality of historical cycle periods, and assign a weight to each operation;
  • the second processing sub-module 402 is configured to acquire a running time of the application in each time period preset by a plurality of historical cycle periods;
  • the third processing sub-module 403 is configured to calculate a frequency factor of the application in the time period according to the number of operations of different operations, the weight, and the running time of the application.
  • the setting module 200 is configured to:
  • a synchronization period of the application in the synchronization period is set according to a relationship in which the magnitude of the frequency factor is negatively correlated with the length of the synchronization period.
  • the data synchronization device further includes a merge module 500,
  • the frequency factor of the combined synchronization time period is not greater than a maximum value of the frequency factor in the synchronization time period included therein, and the frequency of the combined synchronization time period
  • the factor is not less than the minimum of the frequency factor in the synchronization period it includes.
  • the modules may be implemented in software for execution by a plurality of types of processors.
  • an acquisition module can include one or more physical or logical blocks of computer instructions, which can be constructed, for example, as an object, procedure, or function. Nevertheless, the executable code of the acquisition module need not be physically located together, but may comprise different instructions stored in different bits, and when these instructions are logically combined, they constitute a module and achieve the specified purpose of the module. .
  • the acquisition module can be a single instruction or a number of instructions, and can even be distributed over multiple different code segments, distributed among different programs, and distributed across multiple memory devices.
  • operational data may be identified within the modules and may be implemented in any suitable form and organized within any suitable type of data structure. The operational data may be collected as a single data set, or may be distributed at different locations (including on different storage devices), and may at least partially exist as an electronic signal on a system or network.
  • the module can be implemented by software, considering the level of the related hardware process, the module can be implemented in software, and the technician can construct the corresponding hardware circuit to realize the corresponding function without considering the cost.
  • the hardware circuits include conventional Very Large Scale Integration (VLSI) circuits or gate arrays and existing semiconductors such as logic chips, transistors, or other discrete components.
  • VLSI Very Large Scale Integration
  • the modules can also be implemented with programmable hardware devices such as field programmable gate arrays, programmable array logic, programmable logic devices, and the like.
  • the embodiment of the invention further provides a computer readable storage medium, wherein the computer readable storage medium stores computer executable instructions, and the computer executable instructions are implemented to implement a data synchronization method.
  • each module/unit in the above embodiment may be implemented in the form of hardware, for example, by implementing an integrated circuit to implement its corresponding function, or may be implemented in the form of a software function module, for example, executing a program stored in the memory by a processor. / instruction to achieve its corresponding function.
  • This application is not limited to any specific combination of hardware and software.
  • the above technical solution can adapt to the usage habits of different users, and solves the contradiction between the timeliness of data synchronization and the system power consumption to some extent, and reduces the accidental interruption and traffic loss caused by data synchronization.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Telephonic Communication Services (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A method for data synchronization, comprising: acquiring the frequency factor at which an application program is used during at least one synchronization time period in a current loop cycle, the frequency factor being used for indicating the frequency at which the application program is used by a user during the synchronization time period; setting, according to the frequency factor, the synchronization cycle of the application program during the synchronization time period; performing data synchronization on the application program according to the synchronization cycle during the same synchronization time period of the next loop cycle. By adjusting the synchronization cycle of data in a timely manner according to the frequency at which the application program is used, the described technical solution can adapt to the usage habits of different users. The method for data synchronization solves, to a certain extent, the contradiction between the timeliness of data synchronization and system power consumption, and meanwhile, prevents data from being synchronized during the time period when the application is not used, reducing the accidental disturbance and traffic loss arising from data synchronization.

Description

一种数据同步方法和装置Data synchronization method and device 技术领域Technical field
本文涉及但不限于移动通讯领域,涉及一种数据同步方法和装置。This document relates to, but is not limited to, the field of mobile communications, and relates to a data synchronization method and apparatus.
背景技术Background technique
目前手机中很多应用程序都是采用C/S(客户端/服务器)架构设计的,手机中的应用程序以Client(客户端)的身份与Server(服务器)之间进行数据的同步,一般同步都是以固定的周期在后台进行的。At present, many applications in mobile phones are designed using C/S (client/server) architecture. The application in the mobile phone synchronizes data between the client (client) and the server (server). It is done in the background with a fixed cycle.
以电子邮件为例,手机中的电子邮件扮演客户端的角色,电子邮件客户端都是主动去服务器上获取邮件到本地来查看,这个过程称为同步。除了用户手动去同步电子邮件外,同步主要是由后台发起,一般会设置为15分钟或半小时进行同步一次,也就是以固定的周期(频率)来进行频率。部分应用程序也向用户提供了设置项,用户也可以根据自己的需要设置不同的同步周期。In the case of e-mail, the e-mail in the mobile phone plays the role of the client. The e-mail client actively takes the e-mail to the server to view it. This process is called synchronization. In addition to the user manually synchronizing the e-mail, the synchronization is mainly initiated by the background, and is generally set to be synchronized once every 15 minutes or half an hour, that is, at a fixed period (frequency). Some applications also provide settings for users, and users can set different synchronization cycles according to their needs.
同步周期为固定值,设置较长则无法及时收到新消息,设置较短则经常会发起“无用”的同步,对终端功耗影响较大,同时对用户数据流量也是一种浪费。The synchronization period is a fixed value. If the setting is long, the new message cannot be received in time. If the setting is short, the "useless" synchronization is often initiated, which has a great impact on the power consumption of the terminal, and is also a waste of user data traffic.
每次同步手机都必须唤醒,然后再进行同步,即便是在深夜用户睡觉的时候手机也会自动完成这一系列的唤醒过程。同步周期越短,就意味着用户可能更及时地收到新信息,同时也意味着更多的唤醒次数及更大的功耗。另外,“无用”的同步也会给用户带来打扰。例如目前很多在线视频应用都会进行信息推送,而实际上用户很少关注这些推送信息,特别是在上班期间不停地推送信息,会给用户带来一定程度上的打扰,同时也浪费用户的流量。Every time you sync your phone, you must wake up and then sync, even if the user sleeps late at night, the phone will automatically complete this series of wake-up process. The shorter the synchronization period, the more likely the user will receive new information in a timely manner, and it will mean more wake-ups and more power. In addition, "useless" synchronization can also cause user disruption. For example, many online video applications currently push information, but in fact, users rarely pay attention to these push information, especially when they push information continuously during work, which will cause some disturbance to users and waste user traffic. .
发明内容Summary of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。 The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.
本发明实施例提供了一种数据同步方法和装置,能够适应不同用户的使用习惯,解决了数据同步的及时性与系统功耗之间的矛盾。The embodiment of the invention provides a data synchronization method and device, which can adapt to the usage habits of different users and solve the contradiction between the timeliness of data synchronization and the system power consumption.
本发明实施例提供了一种数据同步方法,包括:The embodiment of the invention provides a data synchronization method, including:
获取当前循环周期中至少一同步时间段内使用一应用程序的频率因子,所述频率因子用于指示用户在所述同步时间段内使用所述应用程序的频繁程度;Obtaining a frequency factor of using an application in at least one synchronization time period in a current cycle period, the frequency factor being used to indicate a frequency of how the user uses the application during the synchronization time period;
根据所述频率因子,设置所述同步时间段内的所述应用程序的同步周期;Setting a synchronization period of the application in the synchronization period according to the frequency factor;
在下一循环周期相同的同步时间段内,根据所述同步周期对所述应用程序进行数据同步。Data synchronization is performed on the application according to the synchronization period during the same synchronization period of the next cycle.
可选地,所述根据所述频率因子,设置所述同步时间段内的所述应用程序的同步周期包括:Optionally, the setting, according to the frequency factor, the synchronization period of the application in the synchronization period includes:
根据所述频率因子的大小与同步周期的长短成负相关的关系,设置所述同步时间段内的所述应用程序的同步周期。A synchronization period of the application in the synchronization period is set according to a relationship in which the magnitude of the frequency factor is negatively correlated with the length of the synchronization period.
可选地,所述方法还包括:所述获取当前循环周期中至少一同步时间段内使用一应用程序的频率因子的步骤之前,Optionally, the method further includes: before the step of acquiring a frequency factor of using an application in at least one synchronization period in the current cycle period,
将所述当前循环周期划分成多个时间段;Dividing the current cycle period into a plurality of time periods;
获取每个所述时间段内使用一应用程序的频率因子;Obtaining a frequency factor for using an application during each of the time periods;
将频率因子大于第一阈值的时间段作为同步时间段;将频率因子小于或等于所述第一阈值的时间段作为非同步时间段,所述非同步时间段内关闭对所述应用程序进行的数据同步。a time period in which the frequency factor is greater than the first threshold is used as the synchronization time period; a time period in which the frequency factor is less than or equal to the first threshold is used as the non-synchronization time period, and the non-synchronization time period is closed for the application. data synchronization.
可选地,所述获取每个所述时间段内使用一应用程序的频率因子包括:Optionally, the obtaining a frequency factor for using an application in each of the time periods includes:
获取预设多个历史循环周期的每个时间段内所述应用程序进行不同操作的操作次数,并对每个操作分配权值;Obtaining an operation operation time for the application to perform different operations in each time period preset for a plurality of historical cycle periods, and assigning a weight value to each operation;
获取预设多个历史循环周期每个时间段内所述应用程序的运行时间;Obtaining a running time of the application in each time period preset by a plurality of historical cycle periods;
根据不同操作的操作次数、权值及所述应用程序的运行时间,计算所述应用程序于所述时间段内的频率因子。The frequency factor of the application during the time period is calculated according to the number of operations of different operations, the weight, and the running time of the application.
可选地,所述方法还包括:所述将频率因子大于第一阈值的时间段作为 同步时间段;将频率因子小于或等于所述第一阈值的时间段作为非同步时间段之后,Optionally, the method further includes: using, as the time period, the frequency factor is greater than the first threshold a synchronization period; after the time period in which the frequency factor is less than or equal to the first threshold is used as the non-synchronization period,
将多个连续的非同步时间段进行合并,以及将频率因子相差不超过第二阈值的多个连续的同步时间段进行合并;Combining a plurality of consecutive non-synchronized time periods, and merging a plurality of consecutive synchronization time periods in which the frequency factors do not exceed the second threshold;
确定合并后的同步时间段的频率因子;其中,该合并后的同步时间段的频率因子不大于其所包括的同步时间段中频率因子的最大值,且该合并后的同步时间段的频率因子不小于其所包括的同步时间段中频率因子的最小值。Determining a frequency factor of the combined synchronization time period; wherein, the frequency factor of the combined synchronization time period is not greater than a maximum value of the frequency factor in the synchronization time period included therein, and the frequency factor of the combined synchronization time period Not less than the minimum of the frequency factor in the synchronization period it includes.
本发明实施例还提供一种数据同步装置,包括:The embodiment of the invention further provides a data synchronization device, comprising:
获取模块,设置为获取当前循环周期中至少一同步时间段内使用一应用程序的频率因子,所述频率因子用于指示用户在所述同步时间段内使用所述应用程序的频繁程度;An obtaining module, configured to acquire a frequency factor of using an application in at least one synchronization period in a current cycle period, where the frequency factor is used to indicate a frequency of how the user uses the application during the synchronization period;
设置模块,设置为根据所述频率因子,设置所述同步时间段内的所述应用程序的同步周期;Setting a module, configured to set a synchronization period of the application in the synchronization period according to the frequency factor;
同步模块,设置为在下一循环周期相同的同步时间段内,根据所述同步周期对所述应用程序进行数据同步。The synchronization module is configured to perform data synchronization on the application according to the synchronization period within the same synchronization period of the next cycle.
可选地,所述设置模块是设置为:Optionally, the setting module is set to:
根据所述频率因子的大小与同步周期的长短成负相关的关系,设置所述同步时间段内的所述应用程序的同步周期。A synchronization period of the application in the synchronization period is set according to a relationship in which the magnitude of the frequency factor is negatively correlated with the length of the synchronization period.
可选地,所述装置还包括:预处理模块,设置为:Optionally, the device further includes: a pre-processing module, configured to:
将所述当前循环周期划分成多个时间段;Dividing the current cycle period into a plurality of time periods;
获取每个所述时间段内使用一应用程序的频率因子;Obtaining a frequency factor for using an application during each of the time periods;
将频率因子大于第一阈值的时间段作为同步时间段;将频率因子小于或等于所述第一阈值的时间段作为非同步时间段,所述非同步时间段内关闭对所述应用程序进行的数据同步。a time period in which the frequency factor is greater than the first threshold is used as the synchronization time period; a time period in which the frequency factor is less than or equal to the first threshold is used as the non-synchronization time period, and the non-synchronization time period is closed for the application. data synchronization.
可选地,所述预处理模块包括:Optionally, the preprocessing module includes:
第一处理子模块,设置为获取预设多个历史循环周期每个时间段内所述应用程序进行不同操作的操作次数,并对每个操作分配权值; a first processing sub-module, configured to acquire a number of operations of the application performing different operations in each time period of a preset plurality of historical cycle periods, and assign a weight to each operation;
第二处理子模块,设置为获取预设多个历史循环周期每个时间段内所述应用程序的运行时间;a second processing submodule configured to acquire a running time of the application in each time period preset by a plurality of historical cycle periods;
第三处理子模块,设置为根据不同操作的操作次数、权值及所述应用程序的运行时间,计算所述应用程序于所述时间段内的频率因子。The third processing submodule is configured to calculate a frequency factor of the application during the time period according to the number of operations of different operations, the weight, and the running time of the application.
可选地,所述装置还包括合并模块,设置为:Optionally, the device further includes a merge module, configured to:
将多个连续的非同步时间段进行合并,以及将频率因子相差不超过第二阈值的多个连续的同步时间段进行合并;Combining a plurality of consecutive non-synchronized time periods, and merging a plurality of consecutive synchronization time periods in which the frequency factors do not exceed the second threshold;
确定合并后的同步时间段的频率因子;其中,该合并后的同步时间段的频率因子不大于其所包括的同步时间段中频率因子的最大值,且该合并后的同步时间段的频率因子不小于其所包括的同步时间段中频率因子的最小值。Determining a frequency factor of the combined synchronization time period; wherein, the frequency factor of the combined synchronization time period is not greater than a maximum value of the frequency factor in the synchronization time period included therein, and the frequency factor of the combined synchronization time period Not less than the minimum of the frequency factor in the synchronization period it includes.
本发明实施例还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机可执行指令,所述计算机可执行指令被执行时实现数据同步方法。The embodiment of the invention further provides a computer readable storage medium, wherein the computer readable storage medium stores computer executable instructions, and the computer executable instructions are implemented to implement a data synchronization method.
本发明实施例的有益效果是:本发明实施例的数据同步方法,通过对使用应用程序的频率来及时调整数据的同步周期,能够适应不同用户的使用习惯。该数据同步方法确保了在不使用应用程序的时间段关闭同步功能,而在应用程序使用比较频繁的时间段将同步周期设置较短,一定程度上解决了数据同步的及时性与系统功耗之间的矛盾;同时也防止了不使用应用的时间段内不进行数据同步,减少了数据同步带来的意外打扰及流量损失。在阅读并理解了附图和详细描述后,可以明白其它方面。The data synchronization method of the embodiment of the present invention can adapt to the usage habits of different users by adjusting the synchronization period of the data in time by using the frequency of the application program. The data synchronization method ensures that the synchronization function is turned off during the period when the application is not used, and the synchronization period is set to be shorter when the application is used frequently, which solves the time synchronization of the data synchronization and the system power consumption to some extent. The contradiction; at the same time, it prevents the data from being synchronized during the period when the application is not used, and reduces the accidental interruption and traffic loss caused by data synchronization. Other aspects will be apparent upon reading and understanding the drawings and detailed description.
附图说明DRAWINGS
图1为本发明实施例一中的数据同步方法的流程示意图;1 is a schematic flowchart of a data synchronization method in Embodiment 1 of the present invention;
图2为本发明实施例一中的对当前循环周期进行划分的流程示意图;2 is a schematic flowchart of dividing a current cycle period according to Embodiment 1 of the present invention;
图3为本发明实施例一中的计算每个划分的时间段的频率因子的流程示意图;FIG. 3 is a schematic flowchart of calculating a frequency factor of each divided time period according to Embodiment 1 of the present invention; FIG.
图4为本发明实施例一中的对当前循环周期进行划分后进行合并的流程示意图; FIG. 4 is a schematic flowchart of combining the current cycle period and combining the current cycle according to the first embodiment of the present invention;
图5为本发明实施例二中的利用数据同步方法对电子邮件进行同步的流程示意图;FIG. 5 is a schematic flowchart of synchronizing emails by using a data synchronization method according to Embodiment 2 of the present invention; FIG.
图6为本发明实施例二中的记录对电子邮件的各个操作的时间及权值的流程示意图;6 is a schematic flowchart of recording time and weight of each operation of an email according to Embodiment 2 of the present invention;
图7为本发明实施例三中的利用数据同步方法对视频应用进行推送的流程示意图;7 is a schematic flowchart of pushing a video application by using a data synchronization method according to Embodiment 3 of the present invention;
图8为本发明实施例三中的记录对视屏应用的各个操作的时间及权值的流程示意图;FIG. 8 is a schematic flowchart of recording time and weight of each operation of a video screen application according to Embodiment 3 of the present invention; FIG.
图9为本发明实施例四中的数据同步装置的构成示意图。FIG. 9 is a schematic structural diagram of a data synchronization apparatus according to Embodiment 4 of the present invention.
具体实施方式detailed description
下面将结合附图及具体实施例对本申请进行详细描述。The present application will be described in detail below with reference to the accompanying drawings and specific embodiments.
实施例一Embodiment 1
参照图1所示,本发明实施例提供了一种数据同步方法,包括:Referring to FIG. 1, an embodiment of the present invention provides a data synchronization method, including:
步骤1,获取当前循环周期中至少一同步时间段内使用一应用程序的频率因子,频率因子用于指示用户在同步时间段内使用应用程序的频繁程度;Step 1: Obtain a frequency factor of using an application in at least one synchronization time period in the current cycle period, where the frequency factor is used to indicate how frequently the user uses the application during the synchronization time period;
用户使用应用程序时,往往以一天24小时的时间作为循环周期,周而复始。在本发明实施例中,循环周期不限定为一天,还可以根据实际使用进行调整。在当前的循环周期中,获取至少一同步时间段内使用一应用程序的频率因子,来得到用户在该不同时间段内使用应用程序的频繁程度。在同步时间段内,使用应用程序的频繁程度直接关系用户对该应用程序的同步周期的需求。When users use the application, they often use the 24 hours a day as a cycle and repeat it. In the embodiment of the present invention, the cycle period is not limited to one day, and may be adjusted according to actual use. In the current cycle, the frequency factor of using an application in at least one synchronization period is obtained to obtain how frequently the user uses the application in the different time period. During the synchronization period, the frequency with which the application is used is directly related to the user's need for the synchronization cycle of the application.
步骤2,根据频率因子,设置同步时间段内的应用程序的同步周期; Step 2, according to the frequency factor, setting a synchronization period of the application in the synchronization period;
根据频率因子对同步周期进行设置,充分地满足了用户的使用习惯。该设置同步周期的方法不同于相关技术中设置同步周期为固定值的方法,充分考虑了用户的习惯,针对不同的使用频率的时间段设置不同的同步周期。The synchronization period is set according to the frequency factor, which fully satisfies the user's usage habits. The method of setting the synchronization period is different from the method of setting the synchronization period to a fixed value in the related art, fully considering the habit of the user, and setting different synchronization periods for the time periods of different usage frequencies.
步骤3,在下一循环周期相同的同步时间段内,根据所述同步周期对所 述应用程序进行数据同步。Step 3: in the same synchronization period of the next cycle, according to the synchronization period The application performs data synchronization.
在应用程序运行当前循环周期的下一个循环周期时,运行到相同的同步时间段内,以对该同步时间段设置的同步周期对应用程序进行同步,以达到运行新的同步周期的目的。When the application runs the next cycle of the current cycle, it runs to the same synchronization time period, and synchronizes the application with the synchronization cycle set for the synchronization time period to achieve the purpose of running a new synchronization cycle.
本发明实施例的数据同步方法,通过对使用应用程序的频率来及时调整数据的同步周期,能够适应不同用户的使用习惯。The data synchronization method in the embodiment of the present invention can adapt to the usage habits of different users by adjusting the synchronization period of the data in time by using the frequency of the application.
可选地,步骤2,根据所述频率因子,设置所述同步时间段内的所述应用程序的同步周期,包括:Optionally, in step 2, setting a synchronization period of the application in the synchronization period according to the frequency factor, including:
根据所述频率因子的大小与同步周期的长短成负相关的关系,设置同步时间段内的所述应用程序的同步周期。A synchronization period of the application in the synchronization period is set according to a relationship in which the magnitude of the frequency factor is negatively correlated with the length of the synchronization period.
也就是说,若获取的当前循环周期中的同步时间段内一应用程序的频率因子较大,则调整该应用程序的同步周期较短;若获取的当前循环周期中的同步时间段内一应用程序的频率因子较小,则调整该应用程序的同步周期较长。该数据同步方法确保了在应用程序使用比较频繁的时间段将同步设置较短,在使用应用程序较少的时间段设置同步周期较长,从而在一定程度上解决了数据同步的及时性与系统功耗之间的矛盾;同时也防止了不使用应用的时间段内不进行数据同步,减少了数据同步带来的意外打扰及流量损失。In other words, if the frequency factor of an application in the synchronization period in the current loop period is large, the synchronization period of the application is adjusted to be shorter; if an acquired application is in the synchronization period in the current cycle period, If the frequency factor of the program is small, the synchronization period of the application is adjusted to be longer. The data synchronization method ensures that the synchronization setting is shorter in a period in which the application is used more frequently, and the synchronization period is longer in a period in which the application is used less, thereby solving the timeliness and system of the data synchronization to some extent. The contradiction between power consumption; at the same time, it prevents the data from being synchronized during the time period when the application is not used, and reduces the accidental interruption and traffic loss caused by data synchronization.
在本实施例中,根据应用程序特殊的运行和使用情况,存在根据频率因子的大小与同步周期的长短成正相关的关系,设置同步时间段内的所述应用程序的同步周期的情况。In the present embodiment, depending on the particular operation and usage of the application, there is a case where the size of the frequency factor is positively correlated with the length of the synchronization period, and the synchronization period of the application within the synchronization period is set.
可选地,参照图2所示,所述方法还包括:Optionally, referring to FIG. 2, the method further includes:
步骤10,所述获取当前循环周期中至少一同步时间段内使用一应用程序的频率因子的步骤之前,将所述当前循环周期划分成多个时间段;Step 10: Before the step of acquiring a frequency factor of using an application in at least one synchronization period in the current cycle period, dividing the current cycle period into multiple time segments;
例如,以一天作为一个循环周期,将一天平均分为4个时间段,即从0时开始,每6个小时作为一个时间段。For example, taking one day as a cycle, the day is divided equally into four time periods, that is, from 0 o'clock, every 6 hours as a time period.
步骤20,获取每个所述时间段内使用一应用程序的频率因子;Step 20: Obtain a frequency factor of using an application in each of the time periods;
例如,获取0点到6点、6点到12点、12点到18点和18点到24点内应用程序的频率因子。 For example, get the frequency factor of the application from 0 to 6, 6 to 12, 12 to 18, and 18 to 24.
步骤30,将频率因子大于第一阈值的时间段作为同步时间段;将频率因子小于或等于所述第一阈值的时间段作为非同步时间段,所述非同步时间段内关闭对所述应用程序进行的数据同步。Step 30: The time period in which the frequency factor is greater than the first threshold is used as the synchronization time period; the time period in which the frequency factor is less than or equal to the first threshold is used as the non-synchronization time period, and the application is closed in the non-synchronization time period. The data synchronization performed by the program.
例如,若0点到6点的频率因子小于第一阈值,6点到12点的频率因子大于第一阈值,则0点到6点为非同步时间段,6点到12点为同步时间段。该步骤是为了确定平率因子小于第一阈值的时间段作为非同步时间段,在非同步时间段内不进行同步,防止了不使用应用的时间段内不进行数据同步,减少了数据同步带来的意外打扰及流量损失。For example, if the frequency factor from 0 o'clock to 6 o'clock is less than the first threshold, and the frequency factor from 6 o'clock to 12 o'clock is greater than the first threshold, then 0 o'clock to 6 o'clock is the non-synchronization time period, and 6 o'clock to 12 o'clock is the synchronization time period. . The step is to determine that the time period factor is less than the first threshold time period as the non-synchronization time period, and the synchronization is not performed during the non-synchronization time period, preventing data synchronization from being performed during the time period when the application is not used, and reducing the data synchronization band. Unexpected interruptions and traffic losses.
可选地,参照图3所示,步骤20中,获取每个所述时间段的频率因子,包括:Optionally, referring to FIG. 3, in step 20, obtaining a frequency factor of each of the time segments, including:
步骤201,获取预设多个历史循环周期的每个时间段内所述应用程序进行不同操作的操作次数,并对每个操作分配权值;Step 201: Acquire a number of operations in which the application performs different operations in each time period preset for a plurality of historical cycle periods, and assign a weight to each operation;
在本实施例中,获取当前循环周期前几次的历史循环周期的每个时间段内对应用程序进行每个操作的次数,一般来说,取当日之前一周的每天的每个时间段内对对应用程序进行各个操作的次数进行采集。例如打开应用程序的次数、点击该应用程序第一功能的次数或者点击该应用程序第二功能的次数。因为对应用程序进行每个操作对于确定频率因子的权重不同,所以对每个操作分配权值。In this embodiment, the number of times each operation is performed on the application in each time period of the previous cycle of the current cycle is obtained. Generally, each time period of the week before the current day is taken. The number of times the application performs various operations is collected. For example, the number of times an application is opened, the number of times the first function of the application is clicked, or the number of times the second function of the application is clicked. Because each operation of the application has a different weight for determining the frequency factor, a weight is assigned to each operation.
步骤202,获取预设多个历史循环周期每个时间段内所述应用程序的运行时间;Step 202: Acquire a running time of the application in each time period preset by a plurality of historical cycle periods;
举例来说,确定当日的前一周的每天的0点到6点使用该应用程序的总时间,6点到12点使用该程序的总时间等。从而可以确定该应用程序在每个时间段内运行时间的长度。For example, determine the total time to use the application from 0:00 to 6:00 on the day of the previous day of the day, the total time to use the program from 6 to 12, and so on. It is thus possible to determine the length of time the application is running in each time period.
步骤203,根据不同操作的操作次数、权值及所述应用程序的运行时间,计算所述应用程序于所述时间段内的频率因子。Step 203: Calculate a frequency factor of the application in the time period according to the number of operations of different operations, the weight, and the running time of the application.
不同操作的操作次数、权值及应用程序的运行时间,可以确定用户使用该应用程序的频率因子。对一应用程序的操作次数、权值及所述应用程序等用户习惯数据采集后,保存于用户习惯数据库中。不同时间段内的频率因子 是指此时间段内用户习惯数据样本在一循环周期中所有用户习惯数据样本的比率。The number of operations, weights, and application runtime of different operations can determine the frequency factor by which the user uses the application. The user's habit data, such as the number of operations of an application, the weight, and the application, are stored in the user's habit database. Frequency factor in different time periods Refers to the ratio of all users' habitual data samples in a cycle of the user's habits of data samples during this time period.
在本实施例中,步骤10、步骤20和步骤30能够将划分的多个时间段区分出哪个时间段内对应用程序的数据进行同步,哪个时间段内对应用数据不进行同步,从而避免了用户操纵频率低的时间段内同步应用程序的数据造成对用户的打扰。In this embodiment, step 10, step 20, and step 30 are capable of distinguishing the divided time segments from which time period the data of the application is synchronized, and which time period the application data is not synchronized, thereby avoiding Synchronizing the application's data during periods of low user manipulation frequency causes an interruption to the user.
可选地,参照图4所示,所述方法还包括:Optionally, referring to FIG. 4, the method further includes:
步骤40,所述将频率因子大于第一阈值的时间段作为同步时间段;将频率因子小于或等于所述第一阈值的时间段作为非同步时间段之后,将多个连续的非同步时间段进行合并,以及将频率因子相差不超过第二阈值的多个连续的同步时间段进行合并;Step 40: The time period in which the frequency factor is greater than the first threshold is used as the synchronization time period; after the time period in which the frequency factor is less than or equal to the first threshold is used as the non-synchronization time period, multiple consecutive non-synchronization time segments are used. Merging, and combining a plurality of consecutive synchronization time periods in which the frequency factors differ by no more than the second threshold;
步骤50,确定合并后的同步时间段的频率因子。Step 50: Determine a frequency factor of the combined synchronization time period.
将频率因子相差不超过第二阈值的多个连续的同步时间段进行合并,或者将多个连续的非同步时间段进行合并。当前的循环周期划分成多个时间段后,每个时间段的频率因子可以通过不同操作的操作次数、权值及应用程序的运行时间确定。若多个连续的同步时间段内的频率因子之差不超过第二阈值,则将多个时间段合并,合并之后的同步时间段采用同一同步周期对应用程序进行同步,从而减少了同步时间段和非同步时间段的数量,降低了占用较多的控制资源。A plurality of consecutive synchronization periods in which the frequency factors differ by no more than the second threshold are combined, or a plurality of consecutive non-synchronization periods are combined. After the current cycle period is divided into multiple time segments, the frequency factor of each time segment can be determined by the number of operations of different operations, the weight, and the running time of the application. If the difference between the frequency factors in the plurality of consecutive synchronization periods does not exceed the second threshold, the plurality of time segments are combined, and the synchronized time period after the synchronization uses the same synchronization period to synchronize the application, thereby reducing the synchronization time period. The number of non-synchronized time periods reduces the amount of control resources that are occupied.
合并后的同步时间段的频率因子不大于多个连续的所述同步时间段中频率因子的最大值,且不小于多个连续的所述同步时间段中频率因子的最小值。例如,若合并后的多个时间段的频率因子是0.02、0.03、0.01、0.04和0.02,则合并后的时间段的频率因子可以取值为0.01至0.04之间。将合并后的时间段的频率因子进行设定,能够降低过多处理频率因子数据,减少了系统的负荷。The frequency factor of the merged synchronization period is not greater than a maximum of a plurality of consecutive frequency factors in the synchronization period, and is not less than a minimum of a plurality of consecutive frequency factors in the synchronization period. For example, if the frequency factors of the combined time periods are 0.02, 0.03, 0.01, 0.04, and 0.02, the frequency factor of the combined time period may be between 0.01 and 0.04. Setting the frequency factor of the combined time period can reduce the excessive processing frequency factor data and reduce the load on the system.
可选地,所述方法还包括:步骤3之后,在下一循环周期一同步时间段内对应用程序进行数据同步后,根据划分的多个时间段的合并情况,确定该同步时间段之后下一个同步时间段的时间,一般是指下一个同步时间段的起始时间。依次确定每个同步时间段的开始时间,便于系统对一个循环周期进 行同步的规划。Optionally, the method further includes: after step 3, after data synchronization of the application in a synchronization period of the next cycle period, determining the next time after the synchronization time period according to the merge situation of the divided multiple time segments The time of the synchronization period generally refers to the start time of the next synchronization period. Determine the start time of each synchronization time period in turn, so that the system can enter a cycle Planning for line synchronization.
实施例二 Embodiment 2
下面以一天作为一个循环周期,对电子邮件进行智能同步的方法为例来详细介绍本发明实施例的数据同步方法。The following is a detailed description of the data synchronization method of the embodiment of the present invention by taking a day as a cycle and a method of intelligently synchronizing emails.
参照图5所示,该电子邮件智能同步的方法包括:Referring to FIG. 5, the method for intelligently synchronizing emails includes:
步骤S1,将每一天平均地划分为多个时间段;Step S1, dividing each day equally into a plurality of time periods;
步骤S2,统计预设多个历史循环周期每个时间段内对电子邮件不同操作的操作次数、权值和应用程序的运行时间等用户习惯数据,并根据用户习惯数据,获取不同时间段用户使用电子邮件的频率因子;Step S2: Counting user habit data such as the number of operations, the weight, and the running time of the application for different operations of the e-mail in each time period of the plurality of historical loop periods, and acquiring the users in different time periods according to the user habit data. Frequency factor of the email;
步骤S3,根据每个时间段的频率因子,设置每个时间段内电子邮件的同步周期;Step S3, setting a synchronization period of the email in each time period according to the frequency factor of each time period;
步骤S4,在下一循环周期的某一时间段内,根据设置的同步周期对电子邮件进行数据同步;Step S4: performing data synchronization on the email according to the set synchronization period in a certain period of the next cycle period;
步骤S5,确定下一次对电子邮件进行同步的时间。In step S5, it is determined the time when the email is synchronized next time.
在本实施例中,步骤S1中可以将一天24小时划分为12个时间段,每个时间段为两个小时,并定义为T0~T11,T0代表0:00~2:00、T1代表2:00~4:00...T11代表22:00~24:00。In this embodiment, in step S1, 24 hours a day can be divided into 12 time segments, each time period is two hours, and is defined as T0 to T11, T0 represents 0:00 to 2:00, and T1 represents 2 :00~4:00...T11 stands for 22:00~24:00.
参照图6所示,其中步骤S2中,统计预设多个历史循环周期每个时间段内对电子邮件不同操作的操作次数、权值和应用程序的运行时间等用户习惯数据包括:Referring to FIG. 6, in step S2, the user habit data such as the number of operations, the weight, and the running time of the application for different operations of the e-mail in each time period of the preset plurality of historical loop periods are statistically included:
S201:当接收到新邮件时,记录接收新邮件的时间及权值P;S201: When receiving a new mail, record the time and weight P of receiving the new mail;
S202:当打开邮件应用时,记录打开邮件应用的时间及权值M;S202: When opening the mail application, record the time and weight M of opening the mail application;
S203:当退出邮件应用时,记录退出邮件应用的时间及使用邮件应用的时长;S203: When exiting the mail application, record the time of exiting the mail application and the duration of using the mail application;
S204:当手动同步邮件时,记录手动同步邮件的时间及权值N。S204: When manually synchronizing the mail, record the time and weight N of manually synchronizing the mail.
其中步骤S2中,多个历史循环周期每个时间段内对电子邮件不同操作的操作次数、权值和应用程序的运行时间等用户习惯数据保存在用于习惯数 据库中,用户习惯数据的对应关系如表1所示。In step S2, user habit data such as the number of operations of different operations of the e-mail, the weight and the running time of the application in each time period of the plurality of historical loop periods are saved in the habit number. According to the database, the correspondence between user habit data is shown in Table 1.
时间time 类型Types of 权值Weight
时间1Time 1 新邮件New mail PP
时间2Time 2 打开邮件应用Open the mail app MM
时间3Time 3 退出邮件应用Exit the mail app 使用时长Length of use
时间4Time 4 手动同步邮件Manually sync mail NN
表1Table 1
其中步骤S2中,统计预设多个历史循环周期每个时间段内操作电子邮件的用户习惯数据中,取过去一周用户数据作为统计样本,每天零点时间首先清除用户习惯数据库中早于一周的记录,然后根据以下式计算出不同时间段用户使用电子邮件的频率因子:In step S2, the user presets the user habit data for operating the e-mail in each time period of the plurality of historical cycle periods, and takes the user data of the past week as a statistical sample, and firstly clears the record in the user habit database earlier than one week. And then calculate the frequency factor for the user to use the email for different time periods according to the following formula:
Figure PCTCN2016087117-appb-000001
Figure PCTCN2016087117-appb-000001
例如,计算出一天每个时间段用户使用电子邮件的频率因子的对应关系如表2所示。For example, the correspondence between the frequency factors for calculating the e-mail used by the user for each time period of the day is as shown in Table 2.
时间段period T0T0 T1T1 T2T2 T3T3 T4T4 T5T5 T6T6 T7T7 T8T8 T9T9 T10T10 T11T11
频率因子Frequency factor 00 00 00 0.020.02 0.130.13 0.260.26 0.080.08 0.220.22 0.180.18 0.070.07 0.020.02 00
表2Table 2
其中步骤S3中,根据每个时间段的频率因子,设置每个时间段内电子邮件的同步周期,包括以下几种情况:In step S3, according to the frequency factor of each time period, the synchronization period of the email in each time period is set, including the following cases:
1)当频率因子较小时,设置同步周期较长;例如T4时间段同步因子为0.13,将T4时间段同步周期设置为30分钟;1) When the frequency factor is small, set the synchronization period to be longer; for example, the T4 time period synchronization factor is 0.13, and the T4 time period synchronization period is set to 30 minutes;
2)当频率因子较大时,设置同步周期较短;例如T5时间段同步因子为0.26,将T5时间段同步周期设置为5分钟;2) When the frequency factor is large, set the synchronization period to be shorter; for example, the T5 time period synchronization factor is 0.26, and the T5 time period synchronization period is set to 5 minutes;
3)当频率因子小于某个固定阈值时(例如0.05),则关闭电子邮件同步;例如T0、T1、T2、T3、T10、T11时间段,关闭电子邮件同步功能; 3) When the frequency factor is less than a certain fixed threshold (for example, 0.05), the email synchronization is turned off; for example, the T0, T1, T2, T3, T10, and T11 time periods, and the email synchronization function is turned off;
其中步骤S3,根据每个时间段的频率因子,设置每个时间段内电子邮件的同步周期之前还包括,当几个连续的时间段频率因子相同或相近时将这个几个时间段合并为一个较长的时间段。其中,当多个连续的时间段频率因子相差不超过特定阈值(例如0.02)时,将这些时间段进行合并。例如将T0~T3、T10~T11合并为同一个时间段。若几个连续的时间段的频率因子均小于一个设定的阈值时,则将这几个连续的时间段作为非同步时间段,在此合并后的时间段内对应用程序不进行同步,以达到减少流量使用、避免对用户产生影响的目的。Step S3, according to the frequency factor of each time period, before setting the synchronization period of the email in each time period, the method further comprises: combining several time periods into one when the frequency factors of the consecutive time periods are the same or similar Longer time period. Wherein, when a plurality of consecutive time period frequency factors do not exceed a certain threshold (for example, 0.02), the time periods are combined. For example, T0 to T3 and T10 to T11 are combined into the same time period. If the frequency factors of several consecutive time segments are less than a set threshold, the consecutive time segments are regarded as non-synchronized time segments, and the application is not synchronized during the combined time period. Reduce the use of traffic and avoid the impact on users.
其中步骤S5中,电子邮件客户端以新的同步周进行邮件同步后,确定下一次调整电子邮件同步周期的时间,一般是指下一个时间段的起始时间。例如,在T0时设置关闭电子邮件同步,则下一次调整电子邮件同步周期的时间为T4的开始时间,依次在T4时将同步周期设置为30分钟。In step S5, after the email client synchronizes the mail with the new synchronization week, it determines the time for adjusting the email synchronization period for the next time, which generally refers to the start time of the next time period. For example, when T0 is set to turn off e-mail synchronization, the next adjustment of the e-mail synchronization period is the start time of T4, and the synchronization period is set to 30 minutes in sequence at T4.
实施例三 Embodiment 3
下面以一天作为一个循环周期,以对一在线视频应用智能同步(推送)的方法为例来详细介绍本发明实施例的数据同步方法。The data synchronization method of the embodiment of the present invention is described in detail below by taking a day as a cycle and applying an intelligent synchronization (pushing) method to an online video.
参照图7所示,包括以下步骤:Referring to Figure 7, the following steps are included:
步骤S10,将每一天平均地划分为多个时间段;Step S10, dividing each day equally into a plurality of time periods;
步骤S20,统计预设多个历史循环周期每个时间段内对视频应用不同操作的操作次数、权值和应用程序的运行时间等用户习惯数据,并根据用户习惯数据,获取不同时间段用户使用视频应用的频率因子;Step S20: Counting user habit data such as the number of operations, the weight, and the running time of the application for different operations of the video in each time period of the plurality of historical loop periods, and acquiring the users in different time periods according to the user habit data. Frequency factor of the video application;
步骤S30,根据每个时间段的频率因子,设置每个时间段内视频应用的推送周期;Step S30, setting a push period of the video application in each time period according to a frequency factor of each time period;
步骤S40,在下一循环周期的某一时间段内,根据设置的推送周期对视频应用进行数据推送;Step S40: Perform data push on the video application according to the set push period in a certain period of the next cycle period;
步骤S50,确定下一次对视频应用进行推送的时间。In step S50, the time for pushing the video application next time is determined.
在步骤S10中,将每天划分了6个时间段,每个时间段4小时,并定义为T0~T5。In step S10, six time periods are divided each day, each time period is 4 hours, and is defined as T0 to T5.
参照图8所示,在步骤S20中,统计预设多个历史循环周期每个时间段 内对视频应用不同操作的操作次数、权值和应用程序的运行时间等用户习惯数据,包括:Referring to FIG. 8, in step S20, statistics are preset for each time period of a plurality of historical cycle periods. User habits such as the number of operations, weights, and application runtime of different operations on the video, including:
S2001,当打开在线视频应用时,记录打开视屏软件的时间及权值M;S2001, when opening the online video application, recording the time and weight M of opening the video software;
S2002,当退出在线视频应用时,记录退出在线视频应用的时间及使用在线视频的时长。S2002, when exiting the online video application, record the time of exiting the online video application and the duration of using the online video.
则用户某一时间段内使用在线视频应用的频率因子为:Then the frequency factor of the online video application used by the user during a certain period of time is:
Figure PCTCN2016087117-appb-000002
Figure PCTCN2016087117-appb-000002
例如,计算出一天每一时间段内用户使用在线视频应用的频率因子对应关系如表3所示。For example, the frequency factor correspondence of the user using the online video application in each time period of the day is calculated as shown in Table 3.
时间段period T0T0 T1T1 T2T2 T3T3 T4T4 T5T5
频率因子Frequency factor 00 00 00 0.020.02 0.130.13 0.850.85
表3table 3
在步骤S30中;In step S30;
1)当频率因子较小时关闭数据推送,例如T0、T1、T2、T3、T4时间段关闭视频应用的数据推送;1) Turn off data push when the frequency factor is small, for example, turn off the data push of the video application during the time period of T0, T1, T2, T3, and T4;
2)当频率因子较大时则打开数据推送,并将推送周期设置为默认值,例如T5时间段。2) When the frequency factor is large, the data push is turned on, and the push cycle is set to a default value, such as a T5 time period.
在本实施例中,所述方法还包括:在步骤S30之前,当几个连续的时间段频率因子相同或相近时将这个几个时间段合并为一个较长的时间段。其中,当多个连续的时间段频率因子相差不超过特定阈值(例如0.02)时,将T0~T4时间段进行合并。若几个连续的时间段的频率因子均小于一个设定的阈值时,则将这几个连续的时间段作为非同步时间段,在此合并后的时间段内对应用程序不进行同步,以达到减少流量使用、避免对用户产生影响的目的。In this embodiment, the method further includes, before step S30, combining the several time periods into one longer time period when the frequency factors of the consecutive time periods are the same or similar. Wherein, when the frequency factors of the plurality of consecutive time periods do not exceed a certain threshold (for example, 0.02), the time periods T0 to T4 are combined. If the frequency factors of several consecutive time segments are less than a set threshold, the consecutive time segments are regarded as non-synchronized time segments, and the application is not synchronized during the combined time period. Reduce the use of traffic and avoid the impact on users.
在步骤S50中,视频应用以新的推送周进行推送后,确定下一次进行视屏应用的推送时间,一般是指下一个进行推送的时间段的起始时间。例如在T0时间段关闭数据推送,确定下一次进行推送的时间段T5的开始时间,并 在T5时打开数据推送,并将推送周期设置为默认值。In step S50, after the video application pushes with the new push week, the push time of the next screen application is determined, which is generally the start time of the next time period for pushing. For example, the data push is turned off during the T0 period, and the start time of the next time period T5 of pushing is determined, and Turn on data push at T5 and set the push cycle to the default value.
实施例四Embodiment 4
参照图9所示,本发明实施例还提供了一种数据同步装置,包括:Referring to FIG. 9, an embodiment of the present invention further provides a data synchronization apparatus, including:
获取模块100,设置为获取当前循环周期中至少一同步时间段内使用一应用程序的频率因子,所述频率因子用于指示用户在所述同步时间段内使用所述应用程序的频繁程度;The obtaining module 100 is configured to acquire a frequency factor of using an application in at least one synchronization period in the current cycle period, where the frequency factor is used to indicate how frequently the user uses the application during the synchronization period;
设置模块200,设置为根据所述频率因子,设置所述同步时间段内的所述应用程序的同步周期;The setting module 200 is configured to set a synchronization period of the application in the synchronization period according to the frequency factor;
同步模块300,设置为在下一循环周期相同的同步时间段内,根据所述同步周期对所述应用程序进行数据同步。The synchronization module 300 is configured to perform data synchronization on the application according to the synchronization period within the same synchronization period of the next cycle.
可选地,该数据同步装置还包括:预处理模块400,设置为:Optionally, the data synchronization device further includes: a pre-processing module 400, configured to:
将所述当前循环周期划分成多个时间段;Dividing the current cycle period into a plurality of time periods;
获取每个所述时间段内使用一应用程序的频率因子;Obtaining a frequency factor for using an application during each of the time periods;
将频率因子大于第一阈值的时间段作为同步时间段;将频率因子小于或等于所述第一阈值的时间段作为非同步时间段,所述非同步时间段内关闭对所述应用程序进行的数据同步。a time period in which the frequency factor is greater than the first threshold is used as the synchronization time period; a time period in which the frequency factor is less than or equal to the first threshold is used as the non-synchronization time period, and the non-synchronization time period is closed for the application. data synchronization.
可选地,所述预处理模块400包括:Optionally, the pre-processing module 400 includes:
第一处理子模块401,设置为获取预设多个历史循环周期每个时间段内所述应用程序进行不同操作的操作次数,并对每个操作分配权值;The first processing sub-module 401 is configured to acquire, for a preset number of operations, that the application performs different operations in each time period of the plurality of historical cycle periods, and assign a weight to each operation;
第二处理子模块402,设置为获取预设多个历史循环周期每个时间段内所述应用程序的运行时间;The second processing sub-module 402 is configured to acquire a running time of the application in each time period preset by a plurality of historical cycle periods;
第三处理子模块403,用于根据不同操作的操作次数、权值及所述应用程序的运行时间,计算所述应用程序于所述时间段内的频率因子。The third processing sub-module 403 is configured to calculate a frequency factor of the application in the time period according to the number of operations of different operations, the weight, and the running time of the application.
可选地,所述设置模块200是设置为:Optionally, the setting module 200 is configured to:
根据所述频率因子的大小与同步周期的长短成负相关的关系,设置所述同步时间段内的所述应用程序的同步周期。 A synchronization period of the application in the synchronization period is set according to a relationship in which the magnitude of the frequency factor is negatively correlated with the length of the synchronization period.
可选地,该数据同步装置,还包括合并模块500,Optionally, the data synchronization device further includes a merge module 500,
设置为:将多个连续的非同步时间段进行合并,以及将频率因子相差不超过第二阈值的多个连续的同步时间段进行合并;Set to: combine a plurality of consecutive non-synchronized time periods, and combine a plurality of consecutive synchronization time periods whose frequency factors do not exceed a second threshold;
确定合并后的同步时间段的频率因子;其中,该合并后的同步时间段的频率因子,不大于其所包括的同步时间段中频率因子的最大值,且该合并后的同步时间段的频率因子不小于其所包括的同步时间段中频率因子的最小值。Determining a frequency factor of the combined synchronization time period; wherein, the frequency factor of the combined synchronization time period is not greater than a maximum value of the frequency factor in the synchronization time period included therein, and the frequency of the combined synchronization time period The factor is not less than the minimum of the frequency factor in the synchronization period it includes.
本发明实施例中,模块可以用软件实现,以便由多种类型的处理器执行。举例来说,一个获取模块可以包括计算机指令的一个或多个物理或者逻辑块,举例来说,其可以被构建为对象、过程或函数。尽管如此,获取模块的可执行代码无需物理地位于一起,而是可以包括存储在不同位里上的不同的指令,当这些指令逻辑上结合在一起时,其构成模块并且实现该模块的规定目的。In an embodiment of the invention, the modules may be implemented in software for execution by a plurality of types of processors. For example, an acquisition module can include one or more physical or logical blocks of computer instructions, which can be constructed, for example, as an object, procedure, or function. Nevertheless, the executable code of the acquisition module need not be physically located together, but may comprise different instructions stored in different bits, and when these instructions are logically combined, they constitute a module and achieve the specified purpose of the module. .
实际上,获取模块可以是单条指令或者是许多条指令,并且甚至可以分布在多个不同的代码段上,分布在不同程序当中,以及跨越多个存储器设备分布。同样地,操作数据可以在模块内被识别,并且可以依照任何适当的形式实现并且被组织在任何适当类型的数据结构内。所述操作数据可以作为单个数据集被收集,或者可以分布在不同位置上(包括在不同存储设备上),并且至少部分地可以仅作为电子信号存在于系统或网络上。In fact, the acquisition module can be a single instruction or a number of instructions, and can even be distributed over multiple different code segments, distributed among different programs, and distributed across multiple memory devices. As such, operational data may be identified within the modules and may be implemented in any suitable form and organized within any suitable type of data structure. The operational data may be collected as a single data set, or may be distributed at different locations (including on different storage devices), and may at least partially exist as an electronic signal on a system or network.
在模块可以利用软件实现时,考虑到相关硬件工艺的水平,所以可以以软件实现的模块,在不考虑成本的情况下,本领域技术人员都可以搭建对应的硬件电路来实现对应的功能,所述硬件电路包括常规的超大规模集成(VLSI)电路或者门阵列以及诸如逻辑芯片、晶体管之类的现有半导体或者是其它分立的元件。模块还可以用可编程硬件设备,诸如现场可编程门阵列、可编程阵列逻辑、可编程逻辑设备等实现。When the module can be implemented by software, considering the level of the related hardware process, the module can be implemented in software, and the technician can construct the corresponding hardware circuit to realize the corresponding function without considering the cost. The hardware circuits include conventional Very Large Scale Integration (VLSI) circuits or gate arrays and existing semiconductors such as logic chips, transistors, or other discrete components. The modules can also be implemented with programmable hardware devices such as field programmable gate arrays, programmable array logic, programmable logic devices, and the like.
本发明实施例还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机可执行指令,所述计算机可执行指令被执行时实现数据同步方法。The embodiment of the invention further provides a computer readable storage medium, wherein the computer readable storage medium stores computer executable instructions, and the computer executable instructions are implemented to implement a data synchronization method.
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件(例如处理器)完成,所述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。可选地,上述实施例的全部或部分 步骤也可以使用一个或多个集成电路来实现。相应地,上述实施例中的各模块/单元可以采用硬件的形式实现,例如通过集成电路来实现其相应功能,也可以采用软件功能模块的形式实现,例如通过处理器执行存储于存储器中的程序/指令来实现其相应功能。本申请不限制于任何特定形式的硬件和软件的结合。本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或者等同替换,而不脱离本申请技术方案的精神和范围,均应涵盖在本申请的权利要求范围当中。One of ordinary skill in the art will appreciate that all or a portion of the above steps may be performed by a program to instruct related hardware, such as a processor, which may be stored in a computer readable storage medium, such as a read only memory, disk or optical disk. Wait. Optionally, all or part of the above embodiment The steps can also be implemented using one or more integrated circuits. Correspondingly, each module/unit in the above embodiment may be implemented in the form of hardware, for example, by implementing an integrated circuit to implement its corresponding function, or may be implemented in the form of a software function module, for example, executing a program stored in the memory by a processor. / instruction to achieve its corresponding function. This application is not limited to any specific combination of hardware and software. A person skilled in the art should understand that the technical solutions of the present application can be modified or equivalent, without departing from the spirit and scope of the technical solutions of the present application, and should be included in the scope of the claims of the present application.
工业实用性Industrial applicability
上述技术方案能够适应不同用户的使用习惯,一定程度上解决了数据同步的及时性与系统功耗之间的矛盾,减少了数据同步带来的意外打扰及流量损失。 The above technical solution can adapt to the usage habits of different users, and solves the contradiction between the timeliness of data synchronization and the system power consumption to some extent, and reduces the accidental interruption and traffic loss caused by data synchronization.

Claims (10)

  1. 一种数据同步方法,包括:A data synchronization method includes:
    获取当前循环周期中至少一同步时间段内使用一应用程序的频率因子,所述频率因子用于指示用户在所述同步时间段内使用所述应用程序的频繁程度;Obtaining a frequency factor of using an application in at least one synchronization time period in a current cycle period, the frequency factor being used to indicate a frequency of how the user uses the application during the synchronization time period;
    根据所述频率因子,设置所述同步时间段内的所述应用程序的同步周期;Setting a synchronization period of the application in the synchronization period according to the frequency factor;
    在下一循环周期相同的同步时间段内,根据所述同步周期对所述应用程序进行数据同步。Data synchronization is performed on the application according to the synchronization period during the same synchronization period of the next cycle.
  2. 如权利要求1所述的数据同步方法,其中,所述根据所述频率因子,设置所述同步时间段内的所述应用程序的同步周期包括:The data synchronization method according to claim 1, wherein said setting a synchronization period of said application within said synchronization period according to said frequency factor comprises:
    根据所述频率因子的大小与同步周期的长短成负相关的关系,设置所述同步时间段内的所述应用程序的同步周期。A synchronization period of the application in the synchronization period is set according to a relationship in which the magnitude of the frequency factor is negatively correlated with the length of the synchronization period.
  3. 如权利要求1所述的数据同步方法,所述方法还包括:所述获取当前循环周期中至少一同步时间段内使用一应用程序的频率因子的步骤之前,The data synchronization method according to claim 1, further comprising: said step of: obtaining a frequency factor of using an application during at least one synchronization period in the current cycle period,
    将所述当前循环周期划分成多个时间段;Dividing the current cycle period into a plurality of time periods;
    获取每个所述时间段内使用一应用程序的频率因子;Obtaining a frequency factor for using an application during each of the time periods;
    将频率因子大于第一阈值的时间段作为同步时间段;将频率因子小于或等于所述第一阈值的时间段作为非同步时间段,所述非同步时间段内关闭对所述应用程序进行的数据同步。a time period in which the frequency factor is greater than the first threshold is used as the synchronization time period; a time period in which the frequency factor is less than or equal to the first threshold is used as the non-synchronization time period, and the non-synchronization time period is closed for the application. data synchronization.
  4. 如权利要求3所述的数据同步方法,其中,所述获取每个所述时间段内使用一应用程序的频率因子包括:The data synchronization method according to claim 3, wherein said obtaining a frequency factor for using an application in each of said time periods comprises:
    获取预设多个历史循环周期的每个时间段内所述应用程序进行不同操作的操作次数,并对每个操作分配权值;Obtaining an operation operation time for the application to perform different operations in each time period preset for a plurality of historical cycle periods, and assigning a weight value to each operation;
    获取预设多个历史循环周期每个时间段内所述应用程序的运行时间;Obtaining a running time of the application in each time period preset by a plurality of historical cycle periods;
    根据不同操作的操作次数、权值及所述应用程序的运行时间,计算所述应用程序于所述时间段内的频率因子。The frequency factor of the application during the time period is calculated according to the number of operations of different operations, the weight, and the running time of the application.
  5. 如权利要求3所述的数据同步方法,所述方法还包括:所述将频率因 子大于第一阈值的时间段作为同步时间段;将频率因子小于或等于所述第一阈值的时间段作为非同步时间段之后,The data synchronization method according to claim 3, further comprising: said frequency factor a period in which the sub-threshold is greater than the first threshold is used as the synchronization period; after the period in which the frequency factor is less than or equal to the first threshold is used as the non-synchronization period,
    将多个连续的非同步时间段进行合并,以及将频率因子相差不超过第二阈值的多个连续的同步时间段进行合并;Combining a plurality of consecutive non-synchronized time periods, and merging a plurality of consecutive synchronization time periods in which the frequency factors do not exceed the second threshold;
    确定合并后的同步时间段的频率因子;其中,该合并后的同步时间段的频率因子不大于其所包括的同步时间段中频率因子的最大值,且该合并后的同步时间段的频率因子不小于其所包括的同步时间段中频率因子的最小值。Determining a frequency factor of the combined synchronization time period; wherein, the frequency factor of the combined synchronization time period is not greater than a maximum value of the frequency factor in the synchronization time period included therein, and the frequency factor of the combined synchronization time period Not less than the minimum of the frequency factor in the synchronization period it includes.
  6. 一种数据同步装置,包括:A data synchronization device comprising:
    获取模块,设置为获取当前循环周期中至少一同步时间段内使用一应用程序的频率因子,所述频率因子用于指示用户在所述同步时间段内使用所述应用程序的频繁程度;An obtaining module, configured to acquire a frequency factor of using an application in at least one synchronization period in a current cycle period, where the frequency factor is used to indicate a frequency of how the user uses the application during the synchronization period;
    设置模块,设置为根据所述频率因子,设置所述同步时间段内的所述应用程序的同步周期;Setting a module, configured to set a synchronization period of the application in the synchronization period according to the frequency factor;
    同步模块,设置为在下一循环周期相同的同步时间段内,根据所述同步周期对所述应用程序进行数据同步。The synchronization module is configured to perform data synchronization on the application according to the synchronization period within the same synchronization period of the next cycle.
  7. 如权利要求6所述的数据同步装置,其中,所述设置模块是设置为:The data synchronization device of claim 6, wherein said setting module is configured to:
    根据所述频率因子的大小与同步周期的长短成负相关的关系,设置所述同步时间段内的所述应用程序的同步周期。A synchronization period of the application in the synchronization period is set according to a relationship in which the magnitude of the frequency factor is negatively correlated with the length of the synchronization period.
  8. 如权利要求6所述的数据同步装置,所述装置还包括:预处理模块,设置为:The data synchronization device of claim 6, further comprising: a preprocessing module, configured to:
    将所述当前循环周期划分成多个时间段;Dividing the current cycle period into a plurality of time periods;
    获取每个所述时间段内使用一应用程序的频率因子;Obtaining a frequency factor for using an application during each of the time periods;
    将频率因子大于第一阈值的时间段作为同步时间段;将频率因子小于或等于所述第一阈值的时间段作为非同步时间段,所述非同步时间段内关闭对所述应用程序进行的数据同步。a time period in which the frequency factor is greater than the first threshold is used as the synchronization time period; a time period in which the frequency factor is less than or equal to the first threshold is used as the non-synchronization time period, and the non-synchronization time period is closed for the application. data synchronization.
  9. 如权利要求8所述的数据同步装置,其中,所述预处理模块包括:The data synchronization device of claim 8 wherein said pre-processing module comprises:
    第一处理子模块,设置为获取预设多个历史循环周期每个时间段内所述 应用程序进行不同操作的操作次数,并对每个操作分配权值;a first processing sub-module configured to acquire a preset plurality of historical cycle periods, each of the time periods The number of operations the application performs for different operations, and assigns weights to each operation;
    第二处理子模块,设置为获取预设多个历史循环周期每个时间段内所述应用程序的运行时间;a second processing submodule configured to acquire a running time of the application in each time period preset by a plurality of historical cycle periods;
    第三处理子模块,设置为根据不同操作的操作次数、权值及所述应用程序的运行时间,计算所述应用程序于所述时间段内的频率因子。The third processing submodule is configured to calculate a frequency factor of the application during the time period according to the number of operations of different operations, the weight, and the running time of the application.
  10. 如权利要求8所述的数据同步装置,所述装置还包括合并模块,设置为:The data synchronization device of claim 8 further comprising a merge module configured to:
    将多个连续的非同步时间段进行合并,以及将频率因子相差不超过第二阈值的多个连续的同步时间段进行合并;Combining a plurality of consecutive non-synchronized time periods, and merging a plurality of consecutive synchronization time periods in which the frequency factors do not exceed the second threshold;
    确定合并后的同步时间段的频率因子;其中,该合并后的同步时间段的频率因子不大于其所包括的同步时间段中频率因子的最大值,且该合并后的同步时间段的频率因子不小于其所包括的同步时间段中频率因子的最小值。 Determining a frequency factor of the combined synchronization time period; wherein, the frequency factor of the combined synchronization time period is not greater than a maximum value of the frequency factor in the synchronization time period included therein, and the frequency factor of the combined synchronization time period Not less than the minimum of the frequency factor in the synchronization period it includes.
PCT/CN2016/087117 2016-04-20 2016-06-24 Method and device for data synchronization WO2017181520A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610248648.XA CN107306283B (en) 2016-04-20 2016-04-20 Data synchronization method and device
CN201610248648.X 2016-04-20

Publications (1)

Publication Number Publication Date
WO2017181520A1 true WO2017181520A1 (en) 2017-10-26

Family

ID=60116518

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/087117 WO2017181520A1 (en) 2016-04-20 2016-06-24 Method and device for data synchronization

Country Status (2)

Country Link
CN (1) CN107306283B (en)
WO (1) WO2017181520A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109062396B (en) * 2018-07-24 2020-01-21 百度在线网络技术(北京)有限公司 Method and device for controlling equipment
CN109087419A (en) * 2018-07-25 2018-12-25 珠海格力电器股份有限公司 Monitoring frequency setting method and device
CN109299088A (en) * 2018-08-22 2019-02-01 中国平安人寿保险股份有限公司 Mass data storage means, device, storage medium and electronic equipment
CN111125127B (en) * 2019-12-06 2023-01-31 腾讯科技(深圳)有限公司 Data synchronization method and device, storage medium and electronic device
CN113098645A (en) * 2019-12-23 2021-07-09 中兴通讯股份有限公司 Configuration method and device of synchronization information, network equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103154928A (en) * 2010-06-24 2013-06-12 奥比融移动有限公司 Network server arrangement for processing non-parametric, multi-dimensional, spatial and temporal human behavior or technical observations measured pervasively, and related method for the same
CN104360925A (en) * 2014-11-21 2015-02-18 北京奇虎科技有限公司 Method and device for counting and recording use frequency of application program
CN105389073A (en) * 2014-09-05 2016-03-09 富泰华工业(深圳)有限公司 Desktop icon display system and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103154928A (en) * 2010-06-24 2013-06-12 奥比融移动有限公司 Network server arrangement for processing non-parametric, multi-dimensional, spatial and temporal human behavior or technical observations measured pervasively, and related method for the same
CN105389073A (en) * 2014-09-05 2016-03-09 富泰华工业(深圳)有限公司 Desktop icon display system and method
CN104360925A (en) * 2014-11-21 2015-02-18 北京奇虎科技有限公司 Method and device for counting and recording use frequency of application program

Also Published As

Publication number Publication date
CN107306283B (en) 2020-01-07
CN107306283A (en) 2017-10-31

Similar Documents

Publication Publication Date Title
WO2017181520A1 (en) Method and device for data synchronization
CN107391527B (en) Data processing method and device based on block chain
CN107577694B (en) Data processing method and device based on block chain
WO2018177235A1 (en) Block chain consensus method and device
EP2863306B1 (en) Predictive auto scaling engine
WO2018177250A1 (en) Block chain based data processing method and device
WO2016041468A1 (en) Wakeup method, device and terminal
WO2017206749A1 (en) Adaptive resource allocation method and apparatus
CN104715020B (en) Data cached delet method and server
US9939869B2 (en) Methods and systems for coordination of operating states amongst multiple SOCs within a computing device
CN103561354B (en) Method and device for calculating and processing video smoothness
CN110599148B (en) Cluster data processing method and device, computer cluster and readable storage medium
CN108243032B (en) Method, device and equipment for acquiring service level information
CN110213620B (en) Bandwidth allocation method and device
CN109766167B (en) Method, device, system and equipment for distributing timed tasks
EP2551767A1 (en) Method and device for adjusting clock interrupt cycle
US5758137A (en) Method and system for processing timer requests within a computer
CN110389842A (en) A kind of dynamic resource allocation method, device, storage medium and equipment
US20220060420A1 (en) Distributed processing system throttling using a timestamp
CN111245732A (en) Flow control method, device and equipment
WO2016197458A1 (en) Traffic control method and apparatus
CN110865877B (en) Task request response method and device
CN104317611B (en) Application rousing setting device and method and mobile terminal
CN112328289B (en) Firmware upgrading method, device, equipment and storage medium
US20220027201A1 (en) Resource and operation management on a cloud platform

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

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

Ref document number: 16899107

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16899107

Country of ref document: EP

Kind code of ref document: A1