技术领域technical field
本发明涉及终端技术领域,特别是涉及一种数据同步周期的调整方法、装置及系统。The present invention relates to the technical field of terminals, in particular to a method, device and system for adjusting a data synchronization period.
背景技术Background technique
目前,云服务器主要是通过主动监听方式检测联系人、短信等需要同步的数据的变化。当检测到数据发生变化时,便向云服务器上传变化的数据,以实现数据的同步。At present, the cloud server mainly detects changes in data that needs to be synchronized, such as contacts and text messages, through active monitoring. When a change in data is detected, the changed data is uploaded to the cloud server to achieve data synchronization.
但是,随着移动终端用户的持续增长,服务器的访问压力也随之增大。如果仍然采用现有的同步方式,则容易导致云服务器超负荷运行,进而导致部分用户无法访问的情况,甚至会使云服务器瘫痪。由此可见,现有的同步方法的容易增大云服务器的访问压力。However, with the continuous growth of mobile terminal users, the access pressure of the server also increases. If the existing synchronization method is still used, it will easily cause the cloud server to be overloaded, which will cause some users to be unable to access, and even cause the cloud server to be paralyzed. It can be seen that the existing synchronization method easily increases the access pressure of the cloud server.
发明内容Contents of the invention
本发明实施例提供一种数据同步周期的调整方法、装置及系统,以解决现有同步方法容易增大云服务器的访问压力的技术问题。Embodiments of the present invention provide a data synchronization cycle adjustment method, device and system to solve the technical problem that the existing synchronization method tends to increase the access pressure of the cloud server.
为解决上述问题,本发明提供的技术方案如下:In order to solve the above problems, the technical solutions provided by the present invention are as follows:
第一方面,本发明实施例提供一种数据同步周期的调整方法,其包括:In a first aspect, an embodiment of the present invention provides a method for adjusting a data synchronization cycle, which includes:
向服务器发送同步请求;Send a synchronization request to the server;
当服务器的同步请求数量超过阈值时,接收所述服务器根据所述同步请求返回的提示信息;When the number of synchronization requests of the server exceeds a threshold, receiving prompt information returned by the server according to the synchronization request;
根据所述提示信息延长当前的同步周期。The current synchronization period is extended according to the prompt information.
第二方面,本发明实施例还提供一种数据同步周期的调整装置,其包括:In the second aspect, the embodiment of the present invention also provides a device for adjusting the data synchronization cycle, which includes:
发送模块,用于向服务器发送同步请求;A sending module, configured to send a synchronization request to the server;
接收模块,用于当服务器的同步请求数量超过阈值时,接收所述服务器根据所述同步请求返回的提示信息;A receiving module, configured to receive prompt information returned by the server according to the synchronization request when the number of synchronization requests of the server exceeds a threshold;
调整模块,用于根据所述提示信息延长当前的同步周期。An adjustment module, configured to extend the current synchronization period according to the prompt information.
第三方面,本发明实施例还提供一种数据同步周期的调整装置,其包括:In the third aspect, the embodiment of the present invention also provides a device for adjusting the data synchronization cycle, which includes:
接收模块,用于接收至少一个终端发送的同步请求,并获取所述同步请求的数量;A receiving module, configured to receive a synchronization request sent by at least one terminal, and obtain the number of synchronization requests;
判断模块,用于判断所述同步请求的数量是否超过预设阈值;A judging module, configured to judge whether the number of synchronization requests exceeds a preset threshold;
发送模块,用于当所述同步请求的数量超过预设阈值时,生成提示信息,并向所述终端发送所述提示信息;所述提示信息用于提示所述终端延长其当前的同步周期。A sending module, configured to generate prompt information when the number of synchronization requests exceeds a preset threshold, and send the prompt information to the terminal; the prompt information is used to prompt the terminal to extend its current synchronization period.
第四方面,本发明实施例还提供一种数据同步周期的调整系统,其包括服务器以及终端,所述终端包括上述第二方面提供的数据同步周期的调整装置。In a fourth aspect, an embodiment of the present invention further provides a system for adjusting a data synchronization period, which includes a server and a terminal, and the terminal includes the apparatus for adjusting a data synchronization period provided in the second aspect.
相较于现有技术,本实施例的数据同步周期的调整方法、装置及系统,通过向服务器发送同步请求;当服务器的同步请求数量超过阈值时,接收该服务器根据该同步请求返回的提示信息;根据该提示信息延长当前的同步周期。由于在服务器检测到待同步终端的数量比较多时,向终端发送提示信息,之后终端延长当前的同步周期。避免同一时段过多的终端访问服务器,从而降低了云服务器的访问压力。Compared with the prior art, the method, device and system for adjusting the data synchronization period of this embodiment send a synchronization request to the server; when the number of synchronization requests of the server exceeds the threshold, the prompt information returned by the server according to the synchronization request is received ; Extend the current synchronization period according to the prompt message. When the server detects that there are a large number of terminals to be synchronized, it sends a prompt message to the terminal, and then the terminal extends the current synchronization period. Avoid too many terminals accessing the server at the same time, thereby reducing the access pressure of the cloud server.
附图说明Description of drawings
图1为本发明实施例一提供的数据同步周期的调整方法的流程图。FIG. 1 is a flowchart of a method for adjusting a data synchronization period provided by Embodiment 1 of the present invention.
图2为本发明实施例二提供的数据同步周期的调整方法的流程图。FIG. 2 is a flowchart of a method for adjusting a data synchronization period provided by Embodiment 2 of the present invention.
图3为本发明实施例三提供的数据同步周期的调整方法的流程图。FIG. 3 is a flowchart of a method for adjusting a data synchronization period provided by Embodiment 3 of the present invention.
图4为本发明实施例四提供的数据同步周期的调整方法的流程图。FIG. 4 is a flowchart of a method for adjusting a data synchronization period provided in Embodiment 4 of the present invention.
图5为本发明实施例五提供的数据同步周期的调整装置的结构示意图。FIG. 5 is a schematic structural diagram of an apparatus for adjusting a data synchronization period provided in Embodiment 5 of the present invention.
图6为本发明实施例五提供的数据同步周期的调整装置的优选结构示意图。FIG. 6 is a schematic diagram of a preferred structure of an apparatus for adjusting a data synchronization period provided in Embodiment 5 of the present invention.
图7为本发明实施例六提供的数据同步周期的调整装置的结构示意图。FIG. 7 is a schematic structural diagram of an apparatus for adjusting a data synchronization period provided in Embodiment 6 of the present invention.
图8为本发明实施例七提供的终端的结构示意图。FIG. 8 is a schematic structural diagram of a terminal provided by Embodiment 7 of the present invention.
图9为本发明实施例提供的数据同步周期的调整系统的结构示意图。FIG. 9 is a schematic structural diagram of a system for adjusting a data synchronization period provided by an embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts fall within the protection scope of the present invention.
本发明中的术语“第一”、“第二”和“第三”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second" and "third" in the present invention are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "include" and "have", as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, or optionally further includes For other steps or units inherent in these processes, methods, products or apparatuses.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本发明的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present invention. The occurrences of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is understood explicitly and implicitly by those skilled in the art that the embodiments described herein can be combined with other embodiments.
本发明实施例一提供的数据同步周期的调整方法的执行主体,可以为本发明实施例提供六的数据同步周期的调整装置,或者集成了该数据同步周期的调整装置的服务器,该数据同步周期的调整装置可以采用硬件或者软件的方式实现。The execution subject of the method for adjusting the data synchronization cycle provided by Embodiment 1 of the present invention may provide the device for adjusting the data synchronization cycle of Embodiment 6 of the present invention, or a server integrating the device for adjusting the data synchronization cycle, the data synchronization cycle The adjusting device can be realized by hardware or software.
请参照图1,图1为本发明实施例一提供的数据同步周期的调整方法的流程图。Please refer to FIG. 1 . FIG. 1 is a flow chart of a method for adjusting a data synchronization cycle provided by Embodiment 1 of the present invention.
本优选实施例的数据同步周期的调整方法,包括:The method for adjusting the data synchronization period of this preferred embodiment includes:
步骤S101,接收至少一个终端发送的同步请求,并获取该同步请求的数量。Step S101, receiving a synchronization request sent by at least one terminal, and obtaining the number of the synchronization request.
例如,服务器(也即云服务器)接收一个或者一个以上的终端发送的同步请求。之后,服务器统计接收到的同步请求的数量,也即待同步的终端的数量。For example, a server (that is, a cloud server) receives synchronization requests sent by one or more terminals. Afterwards, the server counts the number of synchronization requests received, that is, the number of terminals to be synchronized.
步骤S102,判断该同步请求的数量是否超过预设阈值。Step S102, judging whether the number of synchronization requests exceeds a preset threshold.
例如,服务器将该待同步的终端的数量与预设阈值进行比较,其中该预设阈值具体可以根据经验值设定。优选地,该预设阈值可以根据服务器的负荷进行设定。如果服务器判定该待同步的终端的数量小于等于该预设阈值,则服务器可以返回步骤S101。如果服务器判定该待同步的终端的数量大于该预设阈值,则服务器执行步骤S103。For example, the server compares the number of terminals to be synchronized with a preset threshold, where the preset threshold can be specifically set according to empirical values. Preferably, the preset threshold can be set according to the load of the server. If the server determines that the number of terminals to be synchronized is less than or equal to the preset threshold, the server may return to step S101. If the server determines that the number of terminals to be synchronized is greater than the preset threshold, the server executes step S103.
步骤S103,若该同步请求的数量超过预设阈值,则生成提示信息,并向该终端发送该提示信息。Step S103, if the number of synchronization requests exceeds a preset threshold, generate prompt information and send the prompt information to the terminal.
例如,当服务器判定该待同步的终端的数量大于该预设阈值时,服务器生成当前服务器访问压力较大的,指示终端延长同步周期的标识信息,并将该信息发送至每个待同步的终端。其中该提示信息用于提示每个终端延长其当前的同步周期。For example, when the server determines that the number of terminals to be synchronized is greater than the preset threshold, the server generates identification information indicating that the current server access pressure is relatively high, instructing the terminal to extend the synchronization period, and sends this information to each terminal to be synchronized . The prompt information is used to prompt each terminal to extend its current synchronization period.
比如,该预设阈值为50,若有100个终端向服务器发送了同步请求,则同步请求的数量为100。由于100大于50,也即同步请求的数量超过了该预设阈值,因此服务器分别向上述100个终端分别发送提示信息,以使每个终端延长其当前的同步周期。For example, the preset threshold is 50, and if 100 terminals send synchronization requests to the server, the number of synchronization requests is 100. Since 100 is greater than 50, that is, the number of synchronization requests exceeds the preset threshold, the server sends reminder information to the above-mentioned 100 terminals respectively, so that each terminal extends its current synchronization period.
优选地,在当该同步请求的数量超过预设阈值时,生成提示信息,并向该终端发送该提示信息的步骤之后,该方法还包括:Preferably, after the step of generating prompt information and sending the prompt information to the terminal when the number of synchronization requests exceeds a preset threshold, the method further includes:
(1)接收该终端根据该提示信息返回的同步周期信息;(1) receiving the synchronization period information returned by the terminal according to the prompt information;
例如,当终端对当前的同步周期进行延长后,终端将延长后的周期发送至服务器,服务器接收该延长后的同步周期。For example, after the terminal extends the current synchronization period, the terminal sends the extended period to the server, and the server receives the extended synchronization period.
进一步地,服务器接收该终端根据该提示信息返回的同步周期信息和设备标识,也即终端在向服务器返回延长后的同步周期时,还返回设备标识。之后,服务器将同步周期信息与该设备标识建立关联并存储。也即服务器将该延长后的同步周期与终端的设备标识建立关联并存储。Further, the server receives the synchronization period information and the device identification returned by the terminal according to the prompt information, that is, when the terminal returns the extended synchronization period to the server, it also returns the device identification. Afterwards, the server associates and stores the synchronization cycle information with the device identifier. That is, the server associates and stores the extended synchronization period with the device identifier of the terminal.
(2)根据该同步周期信息对该同步请求进行处理。(2) Process the synchronization request according to the synchronization cycle information.
具体地,当服务器再次接收到终端发送的同步请求时,获取本次同步请求距离上一次同步请求之间的时间间隔,并判断该时间间隔是否与延长后的同步周期一致。如果该时间间隔与上述的延长后的同步周期一致,则响应终端的同步请求,比如服务器将待同步的数据发送至终端。否则,服务器可以不响应终端的同步请求。Specifically, when the server receives the synchronization request sent by the terminal again, it acquires the time interval between the current synchronization request and the previous synchronization request, and determines whether the time interval is consistent with the extended synchronization period. If the time interval is consistent with the above-mentioned extended synchronization period, then in response to the synchronization request of the terminal, for example, the server sends the data to be synchronized to the terminal. Otherwise, the server may not respond to the synchronization request of the terminal.
本实施例的数据同步周期的调整方法,通过接收至少一个终端发送的同步请求,并获取该同步请求的数量;判断该同步请求的数量是否超过预设阈值;若该同步请求的数量超过预设阈值,则生成提示信息,并向该终端发送该提示信息。由于在检测到待同步终端的数量较多时,提醒终端延长当前的同步周期,避免同一时段过多的终端访问服务器,从而可以降低服务器的访问压力,避免服务器瘫痪,提高了数据同步的灵活性。The method for adjusting the data synchronization period of this embodiment is to receive a synchronization request sent by at least one terminal, and obtain the number of the synchronization request; judge whether the number of the synchronization request exceeds a preset threshold; if the number of the synchronization request exceeds a preset threshold, generate prompt information and send the prompt information to the terminal. When a large number of terminals to be synchronized is detected, the terminal is reminded to extend the current synchronization cycle to avoid too many terminals accessing the server at the same time, thereby reducing the access pressure of the server, avoiding server paralysis, and improving the flexibility of data synchronization.
本发明实施例二至四提供的数据同步周期的调整方法的执行主体,可以为本发明实施例五提供的数据同步周期的调整装置,或者集成了该数据同步周期的调整装置的移动终端(譬如笔记本、平板电脑、手机、可穿戴设备等),该数据同步周期的调整装置可以采用硬件或者软件的方式实现。The execution subject of the method for adjusting the data synchronization period provided in Embodiments 2 to 4 of the present invention may be the device for adjusting the data synchronization period provided in Embodiment 5 of the present invention, or a mobile terminal integrated with the device for adjusting the data synchronization period (such as Notebooks, tablet computers, mobile phones, wearable devices, etc.), the device for adjusting the data synchronization cycle can be realized by hardware or software.
请参照图2,图2为本发明实施例二提供的数据同步周期的调整方法的流程图。Please refer to FIG. 2 . FIG. 2 is a flowchart of a method for adjusting a data synchronization period provided in Embodiment 2 of the present invention.
本优选实施例的数据同步周期的调整方法,包括:The method for adjusting the data synchronization period of this preferred embodiment includes:
步骤S201,向服务器发送同步请求。Step S201, sending a synchronization request to the server.
例如,终端向服务器(也即云服务器)发送数据同步的请求。For example, the terminal sends a data synchronization request to the server (that is, the cloud server).
步骤S202,当服务器的同步请求数量超过阈值时,接收该服务器根据该同步请求返回的提示信息。Step S202, when the number of synchronization requests of the server exceeds a threshold, receiving prompt information returned by the server according to the synchronization requests.
例如,当服务器接收终端的请求后,如果服务器判定接收到的请求的数量超过预设阈值时,向终端发送提示信息。之后终端接收该提示信息。可以理解的,该提示信息为当前服务器访问压力较大的,指示终端延长同步周期的信息。For example, after the server receives the request from the terminal, if the server determines that the number of received requests exceeds a preset threshold, it sends prompt information to the terminal. Then the terminal receives the prompt information. It can be understood that the prompt information is information indicating that the current server access pressure is relatively high, and the terminal is instructed to extend the synchronization period.
步骤S203,根据该提示信息延长当前的同步周期。Step S203, extend the current synchronization period according to the prompt information.
例如,在终端接收到该提示信息后,延长或者增大当前的同步周期。可以理解的,延长后的同步周期大于当前的同步周期。For example, after receiving the prompt information, the terminal extends or increases the current synchronization period. It can be understood that the extended synchronization period is greater than the current synchronization period.
本实施例的数据同步周期的调整方法,通过向服务器发送同步请求;当服务器的同步请求数量超过阈值时,接收该服务器根据该同步请求返回的提示信息;根据该提示信息延长当前的同步周期。由于在服务器检测到待同步终端的数量比较多时,向终端发送提示信息。之后终端延长当前的同步周期,避免同一时段过多的终端访问服务器,从而降低了云服务器的访问压力。The method for adjusting the data synchronization period in this embodiment is to send a synchronization request to the server; when the number of synchronization requests of the server exceeds a threshold, receive the prompt information returned by the server according to the synchronization request; and extend the current synchronization period according to the prompt information. Because when the server detects that there are a large number of terminals to be synchronized, it sends a prompt message to the terminal. After that, the terminal extends the current synchronization cycle to avoid too many terminals accessing the server at the same time, thereby reducing the access pressure of the cloud server.
请参照图3,图3为本发明实施例三提供的数据同步周期的调整方法的流程图。Please refer to FIG. 3 . FIG. 3 is a flowchart of a method for adjusting a data synchronization period provided by Embodiment 3 of the present invention.
本优选实施例的数据同步周期的调整方法,包括:The method for adjusting the data synchronization period of this preferred embodiment includes:
步骤S301,向服务器发送同步请求。Step S301, sending a synchronization request to the server.
例如,终端向服务器(也即云服务器)发送数据同步的请求。For example, the terminal sends a data synchronization request to the server (that is, the cloud server).
步骤S302,当服务器的同步请求数量超过阈值时,接收该服务器根据该同步请求返回的提示信息。Step S302, when the number of synchronization requests of the server exceeds a threshold, receiving prompt information returned by the server according to the synchronization requests.
例如,当服务器接收终端的请求后,如果服务器判定接收到的请求的数量超过预设阈值时,向终端发送提示信息,之后终端接收该提示信息。其可以理解的,该提示信息为当前服务器访问压力较大的,指示终端延长同步周期的信息。For example, after the server receives the request from the terminal, if the server determines that the number of received requests exceeds a preset threshold, it sends prompt information to the terminal, and then the terminal receives the prompt information. It can be understood that the prompt information is the information indicating that the current server access pressure is relatively high, and the terminal is instructed to extend the synchronization period.
步骤S303,根据该提示信息获取当前待同步数据的容量。In step S303, the capacity of the current data to be synchronized is acquired according to the prompt information.
例如,在终端接收到该提示信息后,终端获取其当前需要同步到服务器上的数据大小,也即待同步数据的容量。For example, after the terminal receives the prompt information, the terminal acquires the size of the data that it currently needs to synchronize to the server, that is, the capacity of the data to be synchronized.
步骤S304,根据该待同步数据的容量延长当前的同步周期。Step S304, extending the current synchronization period according to the capacity of the data to be synchronized.
例如,终端根据当前需要同步到服务器上的数据大小,延长当前的同步周期。可以理解的,延长后的同步周期大于当前的同步周期。比如,当待同步数据的容量较大时,将当前的同步周期延迟的多一些。当待同步数据的容量较小时,将当前的同步周期延迟的少一些。比如,当前的待同步数据的大小为300M,则终端将当前的同步周期延长一周;如果当前的待同步数据的大小为100M,则终端将当前的同步周期延长三天。For example, the terminal extends the current synchronization period according to the size of the data currently required to be synchronized to the server. It can be understood that the extended synchronization period is greater than the current synchronization period. For example, when the capacity of the data to be synchronized is relatively large, the current synchronization period is delayed a little longer. When the capacity of the data to be synchronized is small, the current synchronization cycle is delayed less. For example, if the size of the current data to be synchronized is 300M, the terminal will extend the current synchronization period by one week; if the current size of the data to be synchronized is 100M, the terminal will extend the current synchronization period by three days.
在另一实施例中,终端还可以查找与当前的待同步容量匹配的预设时间值,将当前的同步周期增加该预设时间值,也即该根据该待同步数据的容量延长当前的同步周期的步骤包括:In another embodiment, the terminal can also search for a preset time value that matches the current capacity to be synchronized, and increase the current synchronization period by the preset time value, that is, the current synchronization period should be extended according to the capacity of the data to be synchronized. The steps of the cycle include:
C、在预设数据库中查找与该待同步数据的容量匹配的预设容量样本,获取该预设容量样本对应的时间调整量。C. Find a preset capacity sample matching the capacity of the data to be synchronized in the preset database, and obtain a time adjustment amount corresponding to the preset capacity sample.
D、根据该时间调整量延长该当前的同步周期。D. Extending the current synchronization period according to the time adjustment amount.
例如,终端预先存储有对多个预设数据大小以及与该预设数据大小对应的预设时间值。具体地,终端在预设数据库中查找与当前需要同步到服务器上的数据大小对应的预设数据大小,并获取该预设数据大小对应的预设时间值。终端将当前的同步周期延长该预设时间值。For example, the terminal pre-stores multiple preset data sizes and preset time values corresponding to the preset data sizes. Specifically, the terminal searches the preset database for a preset data size corresponding to the data size currently to be synchronized to the server, and acquires a preset time value corresponding to the preset data size. The terminal extends the current synchronization period by the preset time value.
比如,预设数据库中的预设数据大小和预设时间值的关系如下:数据量为200M-500M,将同步周期延长一天;数据量为500M-800M,将同步周期延长三天。若当前待同步的数据量为300M,则将当前的备份周期延长一天。For example, the relationship between the preset data size and the preset time value in the preset database is as follows: if the data volume is 200M-500M, extend the synchronization cycle by one day; if the data volume is 500M-800M, extend the synchronization cycle by three days. If the current amount of data to be synchronized is 300M, extend the current backup cycle by one day.
本实施例的数据同步周期的调整方法,通过向服务器发送同步请求;当服务器的同步请求数量超过阈值时,接收该服务器根据该同步请求返回的提示信息;根据该提示信息获取当前待同步数据的容量;根据该待同步数据的容量延长当前的同步周期。由于在服务器检测到待同步终端的数量比较多时,终端获取待同步数据的容量,并根据待同步数据的容量延长当前的同步周期,避免同一时段过多的终端访问服务器。因此在降低了云服务器的访问压力的同时,提高了备份的效率。The method for adjusting the data synchronization cycle in this embodiment is to send a synchronization request to the server; when the number of synchronization requests of the server exceeds the threshold, receive the prompt information returned by the server according to the synchronization request; obtain the current data to be synchronized according to the prompt information Capacity; extend the current synchronization cycle according to the capacity of the data to be synchronized. When the server detects that there are a large number of terminals to be synchronized, the terminal obtains the capacity of the data to be synchronized, and extends the current synchronization period according to the capacity of the data to be synchronized, so as to prevent too many terminals from accessing the server at the same time. Therefore, while reducing the access pressure of the cloud server, the backup efficiency is improved.
请参照图4,图4为本发明实施例四提供的数据同步周期的调整方法的流程图。Please refer to FIG. 4 . FIG. 4 is a flowchart of a method for adjusting a data synchronization period provided in Embodiment 4 of the present invention.
本优选实施例的数据同步周期的调整方法,包括:The method for adjusting the data synchronization period of this preferred embodiment includes:
步骤S401,向服务器发送同步请求。Step S401, sending a synchronization request to the server.
例如,终端向服务器(也即云服务器)发送数据同步的请求。For example, the terminal sends a data synchronization request to the server (that is, the cloud server).
步骤S402,当服务器的同步请求数量超过阈值时,接收该服务器根据该同步请求返回的提示信息。Step S402, when the number of synchronization requests of the server exceeds a threshold, receiving prompt information returned by the server according to the synchronization requests.
例如,当服务器接收终端的请求后,如果服务器判定接收到的请求的数量超过预设阈值时,向终端发送提示信息,之后终端接收该提示信息。其可以理解的,该提示信息为当前服务器访问压力较大的,指示终端延长同步周期的信息。For example, after the server receives the request from the terminal, if the server determines that the number of received requests exceeds a preset threshold, it sends prompt information to the terminal, and then the terminal receives the prompt information. It can be understood that the prompt information is the information indicating that the current server access pressure is relatively high, and the terminal is instructed to extend the synchronization period.
步骤S403,根据该提示信息获取预设调整量。Step S403, acquiring a preset adjustment amount according to the prompt information.
例如,在终端接收到提示信息时,终端在数据库中获取预先存储的增量时间,也即预设调整量为增量时间。当然该预设增量时间也可为增量因子,比如该增量因子大于1。可以理解的,预设调整量不局限于时间值和常数,其他能够实现时间延长的方式均在本发明的保护范围内。For example, when the terminal receives the prompt information, the terminal acquires the pre-stored incremental time from the database, that is, the preset adjustment amount is the incremental time. Of course, the preset increment time may also be an increment factor, for example, the increment factor is greater than 1. It can be understood that the preset adjustment amount is not limited to the time value and constant, and other methods capable of extending the time are within the protection scope of the present invention.
步骤S404,按照该预设调整量延长当前的同步周期。Step S404, extending the current synchronization period according to the preset adjustment amount.
例如,当该预设调整量为增量时间时,终端将当前的同步周期延长该增量时间。比如当前的同步周期为1周,该增量时间为1周,具体地将当前的同步周期与该增量时间进行加法运算,也即延长后的同步周期为2周。之后,终端每2周将待同步数据同步至服务器。For example, when the preset adjustment amount is an incremental time, the terminal extends the current synchronization period by the incremental time. For example, the current synchronization period is 1 week, and the increment time is 1 week. Specifically, the current synchronization period is added to the increment time, that is, the extended synchronization period is 2 weeks. After that, the terminal will synchronize the data to be synchronized to the server every 2 weeks.
可以理解的,该增量时间能够使得调整后的同步周期与当前的同步周期之间的差值大于预设值。It can be understood that the delta time can make the difference between the adjusted synchronization period and the current synchronization period greater than a preset value.
当该预设增量时间为增量因子时,终端还可以将当前的同步周期乘以该增量因子。比如当前的同步周期为1周,该增量因子为3,则延长后的同步周期为3周。之后,终端每3周将待同步数据同步至服务器。When the preset increment time is an increment factor, the terminal may also multiply the current synchronization period by the increment factor. For example, the current synchronization period is 1 week, and the increment factor is 3, then the extended synchronization period is 3 weeks. After that, the terminal will synchronize the data to be synchronized to the server every 3 weeks.
本实施例的数据同步周期的调整方法,通过向服务器发送同步请求;当服务器的同步请求数量超过阈值时,接收该服务器根据该同步请求返回的提示信息;根据该提示信息获取预设调整量;按照该预设调整量延长当前的同步周期。由于在服务器检测到待同步终端的数量比较多时,终端根据预先设置一个增量参数,延长当前的同步周期,因此在降低了云服务器的访问压力的同时,提高了备份的效率。The method for adjusting the data synchronization period in this embodiment is to send a synchronization request to the server; when the number of synchronization requests of the server exceeds a threshold, receive the prompt information returned by the server according to the synchronization request; obtain a preset adjustment amount according to the prompt information; Extend the current sync period by the preset adjustment amount. When the server detects that there are a large number of terminals to be synchronized, the terminals extend the current synchronization cycle according to a preset incremental parameter, thereby reducing the access pressure of the cloud server and improving backup efficiency.
请参照图5,图5为本发明实施例五提供的数据同步周期的调整装置的结构示意图。本优选实施例的数据同步周期的调整装置40包括:发送模块41、接收模块42、调整模块43。Please refer to FIG. 5 . FIG. 5 is a schematic structural diagram of an apparatus for adjusting a data synchronization period provided in Embodiment 5 of the present invention. The device 40 for adjusting the data synchronization cycle in this preferred embodiment includes: a sending module 41 , a receiving module 42 , and an adjusting module 43 .
该发送模块41,用于向服务器发送同步请求。The sending module 41 is configured to send a synchronization request to the server.
例如,终端向服务器(也即云服务器)发送数据同步的请求。该同步请求用于进行数据同步。For example, the terminal sends a data synchronization request to the server (that is, the cloud server). The synchronization request is used for data synchronization.
该接收模块42,用于当服务器的同步请求数量超过阈值时,接收该服务器根据该同步请求返回的提示信息。The receiving module 42 is configured to receive prompt information returned by the server according to the synchronization request when the number of synchronization requests of the server exceeds a threshold.
例如,当服务器接收终端的请求后,如果服务器判定接收到的请求的数量超过预设阈值时,向终端发送提示信息。之后终端接收该提示信息。可以理解的,该提示信息为当前服务器访问压力较大的,指示终端延长同步周期的信息。For example, after the server receives the request from the terminal, if the server determines that the number of received requests exceeds a preset threshold, it sends prompt information to the terminal. Then the terminal receives the prompt information. It can be understood that the prompt information is information indicating that the current server access pressure is relatively high, and the terminal is instructed to extend the synchronization period.
该调整模块43,用于根据该提示信息延长当前的同步周期。The adjustment module 43 is configured to extend the current synchronization period according to the prompt information.
例如,在终端接收到该提示信息后,对当前的同步周期进行延长。可以理解的,延长后的同步周期大于当前的同步周期。For example, after receiving the prompt information, the terminal extends the current synchronization period. It can be understood that the extended synchronization period is greater than the current synchronization period.
如图6所示,该调整模块43包括:容量获取子模块431和第一调整子模块432。As shown in FIG. 6 , the adjustment module 43 includes: a capacity acquisition submodule 431 and a first adjustment submodule 432 .
该容量获取子模块431,用于根据该提示信息获取当前待同步数据的容量。The capacity acquisition sub-module 431 is configured to acquire the capacity of the current data to be synchronized according to the prompt information.
例如,在终端接收到该提示信息后,终端获取其当前需要同步到服务器上的数据大小,也即待同步数据的容量。For example, after the terminal receives the prompt information, the terminal acquires the size of the data that it currently needs to synchronize to the server, that is, the capacity of the data to be synchronized.
该第一调整子模块432,用于根据该待同步数据的容量延长当前的同步周期。The first adjustment sub-module 432 is configured to extend the current synchronization period according to the capacity of the data to be synchronized.
例如,终端根据当前需要同步到服务器上的数据大小,延长当前的同步周期。可以理解的,延长后的同步周期大于当前的同步周期。比如,当待同步数据的容量较大时,将当前的同步周期延迟的多一些。当待同步数据的容量较小时,将当前的同步周期延迟的少一些。For example, the terminal extends the current synchronization period according to the size of the data currently required to be synchronized to the server. It can be understood that the extended synchronization period is greater than the current synchronization period. For example, when the capacity of the data to be synchronized is relatively large, the current synchronization period is delayed a little longer. When the capacity of the data to be synchronized is small, the current synchronization cycle is delayed less.
该第一调整子模块432具体用于:The first adjustment submodule 432 is specifically used for:
在预设数据库中查找与该待同步数据的容量匹配的预设容量样本,获取该预设容量样本对应的时间调整量;以及根据该时间调整量延长该当前的同步周期。Searching for a preset capacity sample matching the capacity of the data to be synchronized in a preset database, obtaining a time adjustment amount corresponding to the preset capacity sample; and extending the current synchronization cycle according to the time adjustment amount.
例如,终端预先存储有对多个预设数据大小以及与该预设数据大小对应的预设时间值。具体地,终端在预设数据库中查找与当前需要同步到服务器上的数据大小对应的预设数据大小,并获取该预设数据大小对应的预设时间值。终端将当前的同步周期延长该预设时间值。For example, the terminal pre-stores multiple preset data sizes and preset time values corresponding to the preset data sizes. Specifically, the terminal searches the preset database for a preset data size corresponding to the data size currently to be synchronized to the server, and acquires a preset time value corresponding to the preset data size. The terminal extends the current synchronization period by the preset time value.
该调整模块43还包括:参数获取子模块433和第二调整子模块434。The adjustment module 43 also includes: a parameter acquisition submodule 433 and a second adjustment submodule 434 .
该参数获取子模块433,用于根据该提示信息获取预设调整量。The parameter acquisition sub-module 433 is configured to acquire a preset adjustment amount according to the prompt information.
该第二调整子模块434,用于按照该预设调整量延长当前的同步周期。The second adjustment sub-module 434 is configured to extend the current synchronization period according to the preset adjustment amount.
例如,在终端接收到提示信息时,终端在数据库中获取预先存储的增量时间,也即预设调整量。之后终端将当前的同步周期延长该增量时间。比如当前的同步周期为1周,该增量时间为1周,也即延长后的同步周期为2周,之后终端每2周将待同步数据同步至服务器。可以理解的,该增量时间能够使得调整后的同步周期与当前的同步周期之间的差值大于预设值。For example, when the terminal receives the prompt information, the terminal obtains the pre-stored incremental time, that is, the preset adjustment amount, from the database. Afterwards, the terminal extends the current synchronization period by the delta time. For example, the current synchronization period is 1 week, and the incremental time is 1 week, that is, the extended synchronization period is 2 weeks, after which the terminal synchronizes the data to be synchronized to the server every 2 weeks. It can be understood that the delta time can make the difference between the adjusted synchronization period and the current synchronization period greater than a preset value.
具体实施时,以上各个模块可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个模块的具体实施可参见前面的方法实施例,在此不再赘述。During specific implementation, each of the above modules may be implemented as an independent entity, or may be combined arbitrarily as the same or several entities. For the specific implementation of each of the above modules, please refer to the previous method embodiments, which will not be repeated here.
本优选实施例的数据同步周期的调整装置,通过向服务器发送同步请求;当服务器的同步请求数量超过阈值时,接收该服务器根据该同步请求返回的提示信息;根据该提示信息延长当前的同步周期。由于在服务器检测到待同步终端的数量比较多时,向终端发送提示信息,之后终端延长当前的同步周期,从而降低了云服务器的访问压力。The device for adjusting the data synchronization period in this preferred embodiment sends a synchronization request to the server; when the number of synchronization requests of the server exceeds the threshold, receives the prompt information returned by the server according to the synchronization request; extends the current synchronization period according to the prompt information . When the server detects that there are a large number of terminals to be synchronized, it sends a prompt message to the terminal, and then the terminal extends the current synchronization period, thereby reducing the access pressure of the cloud server.
请参照图7,图7为本发明实施例六提供的数据同步周期的调整装置的结构示意图。本优选实施例的数据同步周期的调整装置50包括:接收模块51、判断模块52、发送模块53。Please refer to FIG. 7 . FIG. 7 is a schematic structural diagram of an apparatus for adjusting a data synchronization period provided by Embodiment 6 of the present invention. The device 50 for adjusting the data synchronization cycle in this preferred embodiment includes: a receiving module 51 , a judging module 52 , and a sending module 53 .
接收模块51,用于接收至少一个终端发送的同步请求,并获取该同步请求的数量。The receiving module 51 is configured to receive a synchronization request sent by at least one terminal, and acquire the number of the synchronization request.
例如,服务器(也即云服务器)接收一个或者一个以上的终端发送的同步请求。之后,服务器统计接收到的同步请求的数量,也即待同步的终端的数量。For example, a server (that is, a cloud server) receives synchronization requests sent by one or more terminals. Afterwards, the server counts the number of synchronization requests received, that is, the number of terminals to be synchronized.
判断模块52,用于判断该同步请求的数量是否超过预设阈值。A judging module 52, configured to judge whether the number of synchronization requests exceeds a preset threshold.
例如,服务器将该待同步的终端的数量与预设阈值进行比较,其中该预设阈值具体可以根据经验值设定。优选地,该预设阈值可以根据服务器的负荷进行设定。For example, the server compares the number of terminals to be synchronized with a preset threshold, where the preset threshold can be specifically set according to empirical values. Preferably, the preset threshold can be set according to the load of the server.
发送模块53,用于当该同步请求的数量超过预设阈值时,生成提示信息,并向该终端发送该提示信息;该提示信息用于提示该终端延长其当前的同步周期。The sending module 53 is configured to generate prompt information when the number of synchronization requests exceeds a preset threshold, and send the prompt information to the terminal; the prompt information is used to prompt the terminal to extend its current synchronization period.
例如,当服务器判定该待同步的终端的数量大于该预设阈值时,服务器生成当前服务器访问压力较大的,指示每个上述终端延长同步周期的标识信息,并发送至每个待同步的终端。其中该提示信息用于提示每个终端延长其当前的同步周期。For example, when the server determines that the number of terminals to be synchronized is greater than the preset threshold, the server generates identification information indicating that the current server access pressure is relatively high, instructing each of the above-mentioned terminals to extend the synchronization period, and sends it to each terminal to be synchronized . The prompt information is used to prompt each terminal to extend its current synchronization period.
具体实施时,以上各个模块可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个模块的具体实施可参见前面的方法实施例,在此不再赘述。During specific implementation, each of the above modules may be implemented as an independent entity, or may be combined arbitrarily as the same or several entities. For the specific implementation of each of the above modules, please refer to the previous method embodiments, which will not be repeated here.
本实施例的数据同步周期的调整装置,通过接收至少一个终端发送的同步请求,并获取该同步请求的数量;判断该同步请求的数量是否超过预设阈值;若该同步请求的数量超过预设阈值,则生成提示信息,并向该终端发送该提示信息。由于在检测到待同步终端的数量较多时,提醒终端延长当前的同步周期,从而可以降低服务器的访问压力,避免服务器瘫痪,提高了数据同步的灵活性。The device for adjusting the data synchronization cycle of this embodiment receives the synchronization request sent by at least one terminal, and obtains the number of the synchronization request; judges whether the number of the synchronization request exceeds a preset threshold; if the number of the synchronization request exceeds the preset threshold, generate prompt information and send the prompt information to the terminal. When a large number of terminals to be synchronized is detected, the terminal is reminded to extend the current synchronization period, thereby reducing the access pressure of the server, avoiding server paralysis, and improving the flexibility of data synchronization.
请参照图8,图8为本发明实施例七提供的终端的结构示意图。Please refer to FIG. 8 , which is a schematic structural diagram of a terminal provided by Embodiment 7 of the present invention.
本实施例提供一种终端,该终端可以包括上述的数据同步周期的调整装置,该数据同步周期的调整装置具体请参见实施例五的具体描述,在此不再赘述。This embodiment provides a terminal, and the terminal may include the above-mentioned device for adjusting a data synchronization period. For details about the device for adjusting a data synchronization period, please refer to the specific description of Embodiment 5, and details are not repeated here.
本实施例还提供另一种终端,如图8所示,该终端60可以包括射频(RF,RadioFrequency)电路61、包括有一个或一个以上计算机可读存储介质的存储器62、输入单元63、显示单元64、传感器65、音频电路66、无线保真(WiFi,Wireless Fidelity)模块67、包括有一个或者一个以上处理核心的处理器68、以及电源69等部件。本领域技术人员可以理解,图8中示出的终端结构并不构成对终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。This embodiment also provides another terminal. As shown in FIG. 8, the terminal 60 may include a radio frequency (RF, Radio Frequency) circuit 61, a memory 62 including one or more computer-readable storage media, an input unit 63, a display A unit 64 , a sensor 65 , an audio circuit 66 , a wireless fidelity (WiFi, Wireless Fidelity) module 67 , a processor 68 including one or more processing cores, and a power supply 69 and other components. Those skilled in the art can understand that the terminal structure shown in FIG. 8 does not constitute a limitation on the terminal, and may include more or less components than those shown in the figure, or combine some components, or arrange different components.
射频电路61可用于收发信息,或通话过程中信号的接收和发送,特别地,将基站的下行信息接收后,交由一个或者一个以上处理器68处理;另外,将涉及上行的数据发送给基站。通常,射频电路61包括但不限于天线、至少一个放大器、调谐器、一个或多个振荡器、用户身份模块(SIM,Subscriber Identity Module)卡、收发信机、耦合器、低噪声放大器(LNA,Low Noise Amplifier)、双工器等。此外,射频电路61还可以通过无线通信与网络和其他设备通信。该无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(GSM,Global System of Mobile communication)、通用分组无线服务(GPRS,GeneralPacket Radio Service)、码分多址(CDMA,Code Division Multiple Access)、宽带码分多址(WCDMA,Wideband Code Division Multiple Access)、长期演进(LTE,Long TermEvolution)、电子邮件、短消息服务(SMS,Short Messaging Service)等。The radio frequency circuit 61 can be used to send and receive information, or to receive and send signals during a call. In particular, after receiving the downlink information from the base station, it is handed over to one or more processors 68 for processing; in addition, the uplink data is sent to the base station . Typically, the radio frequency circuit 61 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM, Subscriber Identity Module) card, a transceiver, a coupler, a low noise amplifier (LNA, Low Noise Amplifier), duplexer, etc. In addition, the radio frequency circuit 61 can also communicate with the network and other devices through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communications (GSM, Global System of Mobile communication), General Packet Radio Service (GPRS, General Packet Radio Service), Code Division Multiple Access (CDMA, Code Division Multiple Access), Wideband Code Division Multiple Access (WCDMA, Wideband Code Division Multiple Access), Long Term Evolution (LTE, Long Term Evolution), email, Short Message Service (SMS, Short Messaging Service), etc.
存储器62可用于存储软件程序以及模块。处理器68通过运行存储在存储器62的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器62可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据终端的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器62可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器62还可以包括存储器控制器,以提供处理器68和输入单元63对存储器62的访问。Memory 62 may be used to store software programs as well as modules. The processor 68 executes various functional applications and data processing by executing software programs and modules stored in the memory 62 . The memory 62 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playback function, an image playback function, etc.); Data created by the use of the terminal (such as audio data, phonebook, etc.) and the like. In addition, the memory 62 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory 62 may also include a memory controller to provide access to the memory 62 by the processor 68 and the input unit 63 .
输入单元63可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。具体地,在一些实施例中,输入单元63可包括触敏表面以及其他输入设备。触敏表面,也称为触摸显示屏或者触控板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触敏表面上或在触敏表面附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触敏表面可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器68,并能接收处理器68发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触敏表面。除了触敏表面,输入单元63还可以包括其他输入设备。具体地,其他输入设备可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The input unit 63 can be used to receive input numbers or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, in some embodiments, the input unit 63 may include a touch-sensitive surface as well as other input devices. A touch-sensitive surface, also known as a touch display or trackpad, collects user touch operations on or near it (for example, the user uses a finger, stylus, etc. any suitable object or accessory on the touch-sensitive surface or on the touch-sensitive Operation near the surface), and drive the corresponding connection device according to the preset program. Optionally, the touch-sensitive surface may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and sends it to the to the processor 68, and can receive and execute the commands sent by the processor 68. In addition, touch-sensitive surfaces can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to touch-sensitive surfaces, the input unit 63 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, joysticks, and the like.
显示单元64可用于显示由用户输入的信息或提供给用户的信息以及终端的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示单元64可包括显示面板,可选的,可以采用液晶显示器(LCD,Liquid Crystal Display)、有机发光二极管(OLED,Organic Light-Emitting Diode)等形式来配置显示面板。进一步的,触敏表面可覆盖显示面板,当触敏表面检测到在其上或附近的触摸操作后,传送给处理器68以确定触摸事件的类型,随后处理器68根据触摸事件的类型在显示面板上提供相应的视觉输出。虽然在图8中,触敏表面与显示面板是作为两个独立的部件来实现输入和输入功能,但是在某些实施例中,可以将触敏表面与显示面板集成而实现输入和输出功能。The display unit 64 can be used to display information input by or provided to the user and various graphical user interfaces of the terminal. These graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. The display unit 64 may include a display panel. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface can cover the display panel. When the touch-sensitive surface detects a touch operation on or near it, it is sent to the processor 68 to determine the type of the touch event, and then the processor 68 displays the touch event according to the type of the touch event. The corresponding visual output is provided on the panel. Although in FIG. 8, the touch-sensitive surface and the display panel are used as two independent components to realize the input and input functions, in some embodiments, the touch-sensitive surface and the display panel can be integrated to realize the input and output functions.
终端60还可包括至少一种传感器65,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板的亮度,接近传感器可在终端移动到耳边时,关闭显示面板和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于终端还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The terminal 60 may also include at least one sensor 65, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel according to the brightness of the ambient light, and the proximity sensor may turn off the display panel and/or the backlight when the terminal moves to the ear . As a kind of motion sensor, the gravitational acceleration sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when it is stationary, and can be used for applications that recognize the attitude of mobile phones (such as horizontal and vertical screen switching, related Games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tap), etc.; as for other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. repeat.
音频电路66可通过扬声器、传声器提供用户与终端之间的音频接口。音频电路66可将接收到的音频数据转换成电信号,传输到扬声器,由扬声器转换为声音信号输出;另一方面,传声器将收集的声音信号转换为电信号,由音频电路66接收后转换为音频数据,再将音频数据输出处理器68处理后,经射频电路61以发送给比如另一终端,或者将音频数据输出至存储器62以便进一步处理。音频电路66还可能包括耳塞插孔,以提供外设耳机与终端的通信。The audio circuit 66 can provide an audio interface between the user and the terminal through a speaker or a microphone. The audio circuit 66 can convert the received audio data into an electrical signal, transmit it to the loudspeaker, and convert it into a sound signal output by the loudspeaker; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is converted into The audio data, after being processed by the audio data output processor 68, is sent to another terminal through the radio frequency circuit 61, or the audio data is output to the memory 62 for further processing. The audio circuit 66 may also include an earplug jack to provide communication between an external earphone and the terminal.
无线保真(WiFi)属于短距离无线传输技术,终端通过无线保真模块67可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图8示出了无线保真模块67,但是可以理解的是,其并不属于终端的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。Wireless Fidelity (WiFi) is a short-distance wireless transmission technology. The terminal can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 67. It provides users with wireless broadband Internet access. Although Fig. 8 shows the wireless fidelity module 67, it can be understood that it is not an essential component of the terminal, and can be completely omitted as required without changing the essence of the invention.
处理器68是终端的控制中心,利用各种接口和线路连接整个终端的各个部分,通过运行或执行存储在存储器62内的软件程序和/或模块,以及调用存储在存储器62内的数据,执行终端的各种功能和处理数据,从而对终端进行整体监控。可选的,处理器68可包括一个或多个处理核心;优选的,处理器68可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器68中。The processor 68 is the control center of the terminal. It uses various interfaces and lines to connect various parts of the entire terminal. By running or executing software programs and/or modules stored in the memory 62, and calling data stored in the memory 62, execution Various functions and processing data of the terminal, so as to monitor the terminal as a whole. Optionally, the processor 68 may include one or more processing cores; preferably, the processor 68 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc. , the modem processor mainly handles wireless communications. It can be understood that the modem processor may not be integrated into the processor 68 .
终端60还包括给各个部件供电的电源69(比如电池)。优选的,电源可以通过电源管理系统与处理器68逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源69还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。Terminal 60 also includes a power source 69 (such as a battery) for powering various components. Preferably, the power supply can be logically connected to the processor 68 through a power management system, so that functions such as charging, discharging, and power consumption management can be realized through the power management system. The power supply 69 may also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.
尽管图8中未示出,终端还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown in FIG. 8 , the terminal may also include a camera, a Bluetooth module, etc., which will not be repeated here.
具体在本实施例中,终端中的处理器68会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行文件加载到存储器62中,并由处理器68来运行存储在存储器62中的应用程序,从而实现各种功能:Specifically, in this embodiment, the processor 68 in the terminal will load the executable file corresponding to the process of one or more application programs into the memory 62 according to the following instructions, and the processor 68 will run the executable file stored in the memory. 62 applications to achieve various functions:
向服务器发送同步请求;当服务器的同步请求数量超过阈值时,接收该服务器根据该同步请求返回的提示信息;以及根据该提示信息延长当前的同步周期。Sending a synchronization request to the server; when the number of synchronization requests of the server exceeds a threshold, receiving the prompt information returned by the server according to the synchronization request; and extending the current synchronization cycle according to the prompt information.
优选地,处理器68具有发送模块、接收模块、调整模块。Preferably, the processor 68 has a sending module, a receiving module, and an adjusting module.
处理器68,用于向服务器发送同步请求。The processor 68 is configured to send a synchronization request to the server.
处理器68,用于当服务器的同步请求数量超过阈值时,接收该服务器根据该同步请求返回的提示信息。The processor 68 is configured to receive prompt information returned by the server according to the synchronization request when the number of synchronization requests of the server exceeds a threshold.
处理器68,用于根据该提示信息延长当前的同步周期。The processor 68 is configured to extend the current synchronization period according to the prompt information.
上述操作具体可参见前面的方法实施例,在此不再赘述。For details of the above operations, reference may be made to the foregoing method embodiments, and details are not repeated here.
本优选实施例的终端,通过向服务器发送同步请求;当服务器的同步请求数量超过阈值时,接收该服务器根据该同步请求返回的提示信息;根据该提示信息延长当前的同步周期。由于在服务器检测到待同步终端的数量比较多时,向终端发送提示信息,之后终端延长当前的同步周期,从而降低了云服务器的访问压力。The terminal in this preferred embodiment sends a synchronization request to the server; when the number of synchronization requests of the server exceeds a threshold, receives the prompt information returned by the server according to the synchronization request; and extends the current synchronization cycle according to the prompt information. When the server detects that there are a large number of terminals to be synchronized, it sends a prompt message to the terminal, and then the terminal extends the current synchronization period, thereby reducing the access pressure of the cloud server.
另外,如图9所示,本发明还提供一种数据同步周期的调整系统100包括服务器70以及至少一个终端60,该终端60与服务器70之间建立网络连接。In addition, as shown in FIG. 9 , the present invention also provides a data synchronization cycle adjustment system 100 including a server 70 and at least one terminal 60 , and a network connection is established between the terminal 60 and the server 70 .
其中该终端60可以包括实施例五所提供的任一数据同步周期的调整装置,该服务器70包括实施例六提供的数据同步周期的调整装置,该终端60可具体为如平板电脑、手机等设备。The terminal 60 may include any data synchronization cycle adjustment device provided in Embodiment 5, the server 70 may include the data synchronization cycle adjustment device provided in Embodiment 6, and the terminal 60 may specifically be a device such as a tablet computer or a mobile phone.
具体地,工作时,至少一个终端60向服务器70发送同步请求,服务器70接收至少一个终端60发送的同步请求,并获取该同步请求的数量;之后服务器70判断该同步请求的数量是否超过预设阈值;当服务器70判定该同步请求的数量超过预设阈值时,生成提示信息,并向每个终端60发送该提示信息;该提示信息用于提示该终端60延长其当前的同步周期。之后终端60接收该服务器根据该同步请求返回的提示信息;并根据该提示信息延长当前的同步周期,从而降低了服务器的访问压力。Specifically, when working, at least one terminal 60 sends a synchronization request to the server 70, and the server 70 receives the synchronization request sent by at least one terminal 60, and obtains the number of the synchronization request; then the server 70 judges whether the number of the synchronization request exceeds the preset Threshold; when the server 70 determines that the number of synchronization requests exceeds the preset threshold, it generates prompt information and sends the prompt information to each terminal 60; the prompt information is used to prompt the terminal 60 to extend its current synchronization period. Afterwards, the terminal 60 receives the prompt information returned by the server according to the synchronization request; and extends the current synchronization cycle according to the prompt information, thereby reducing the access pressure on the server.
尽管图9给出一个终端的示意图,但是可以理解的,该系统还可以包括2个或者2个以上的终端。Although FIG. 9 shows a schematic diagram of one terminal, it can be understood that the system may also include two or more terminals.
可以理解的是,其中该数据同步周期的调整装置的结构以及功能实现可以参见上文的详细描述,此处不再赘述。It can be understood that, the structure and function realization of the device for adjusting the data synchronization period can refer to the detailed description above, and will not be repeated here.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,RandomAccess Memory)、磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above-mentioned embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium can include: Read Only Memory (ROM, Read Only Memory), Random Access Memory (RAM, Random Access Memory), disk or CD, etc.
以上对本发明实施例所提供的一种数据同步周期的调整方法、装置及系统进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。The method, device and system for adjusting the data synchronization cycle provided by the embodiments of the present invention are described above in detail. In this paper, specific examples are used to illustrate the principle and implementation of the present invention. The description of the above embodiments is only used To help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation and scope of application. In summary, the content of this specification It should not be construed as limiting the invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610949145.5ACN106453597B (en) | 2016-10-25 | 2016-10-25 | Method, device and system for adjusting data synchronization period |
| PCT/CN2017/094188WO2018076830A1 (en) | 2016-10-25 | 2017-07-24 | Method and device for adjusting data synchronization cycle, electronic device, storage medium, and system |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610949145.5ACN106453597B (en) | 2016-10-25 | 2016-10-25 | Method, device and system for adjusting data synchronization period |
| Publication Number | Publication Date |
|---|---|
| CN106453597Atrue CN106453597A (en) | 2017-02-22 |
| CN106453597B CN106453597B (en) | 2019-08-06 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610949145.5AActiveCN106453597B (en) | 2016-10-25 | 2016-10-25 | Method, device and system for adjusting data synchronization period |
| Country | Link |
|---|---|
| CN (1) | CN106453597B (en) |
| WO (1) | WO2018076830A1 (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106937372A (en)* | 2017-04-05 | 2017-07-07 | 深圳天珑无线科技有限公司 | A kind of method and device of synchronizing information |
| CN107450710A (en)* | 2017-07-31 | 2017-12-08 | 广东欧珀移动通信有限公司 | Using cycle synchronisation management method, device, storage medium and electronic equipment |
| WO2018076830A1 (en)* | 2016-10-25 | 2018-05-03 | 广东欧珀移动通信有限公司 | Method and device for adjusting data synchronization cycle, electronic device, storage medium, and system |
| CN109547983A (en)* | 2017-08-11 | 2019-03-29 | 浙江绍兴苏泊尔生活电器有限公司 | Cooking appliance and its control method and system, server |
| CN110830548A (en)* | 2019-09-23 | 2020-02-21 | 深圳市中景元科技有限公司 | Internet of things card operation platform, data updating method, device and storage medium |
| CN113315875A (en)* | 2021-05-25 | 2021-08-27 | 中国平安财产保险股份有限公司 | Call information synchronization method and device, call information synchronization equipment and storage medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103856517A (en)* | 2012-11-30 | 2014-06-11 | 英业达科技有限公司 | Synchronous equalization system and method thereof |
| CN104798069A (en)* | 2012-09-18 | 2015-07-22 | 诺基亚技术有限公司 | Methods, apparatuses and computer program products for providing a protocol to resolve synchronization conflicts when synchronizing between multiple devices |
| CN105210039A (en)* | 2013-03-14 | 2015-12-30 | 三星电子株式会社 | Terminal and method for synchronizing application thereof |
| EP3070619A1 (en)* | 2015-03-16 | 2016-09-21 | Canon Kabushiki Kaisha | Information processing apparatuses performing synchronization of data and data synchronization methods |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103841168B (en)* | 2012-11-27 | 2017-09-29 | 中国电信股份有限公司 | Data trnascription update method and meta data server |
| CN104253868B (en)* | 2014-09-24 | 2017-12-12 | 无锡清华信息科学与技术国家实验室物联网技术中心 | A kind of method and device of cloud storage data syn-chronization |
| CN106453597B (en)* | 2016-10-25 | 2019-08-06 | Oppo广东移动通信有限公司 | Method, device and system for adjusting data synchronization period |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104798069A (en)* | 2012-09-18 | 2015-07-22 | 诺基亚技术有限公司 | Methods, apparatuses and computer program products for providing a protocol to resolve synchronization conflicts when synchronizing between multiple devices |
| CN103856517A (en)* | 2012-11-30 | 2014-06-11 | 英业达科技有限公司 | Synchronous equalization system and method thereof |
| CN105210039A (en)* | 2013-03-14 | 2015-12-30 | 三星电子株式会社 | Terminal and method for synchronizing application thereof |
| EP3070619A1 (en)* | 2015-03-16 | 2016-09-21 | Canon Kabushiki Kaisha | Information processing apparatuses performing synchronization of data and data synchronization methods |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2018076830A1 (en)* | 2016-10-25 | 2018-05-03 | 广东欧珀移动通信有限公司 | Method and device for adjusting data synchronization cycle, electronic device, storage medium, and system |
| CN106937372A (en)* | 2017-04-05 | 2017-07-07 | 深圳天珑无线科技有限公司 | A kind of method and device of synchronizing information |
| CN107450710A (en)* | 2017-07-31 | 2017-12-08 | 广东欧珀移动通信有限公司 | Using cycle synchronisation management method, device, storage medium and electronic equipment |
| CN109547983A (en)* | 2017-08-11 | 2019-03-29 | 浙江绍兴苏泊尔生活电器有限公司 | Cooking appliance and its control method and system, server |
| CN109547983B (en)* | 2017-08-11 | 2024-05-28 | 浙江绍兴苏泊尔生活电器有限公司 | Cooking appliance, control method and system thereof and server |
| CN110830548A (en)* | 2019-09-23 | 2020-02-21 | 深圳市中景元科技有限公司 | Internet of things card operation platform, data updating method, device and storage medium |
| CN110830548B (en)* | 2019-09-23 | 2023-12-26 | 深圳市果壳跳动科技有限公司 | Internet of things card operation platform, data updating method and device and storage medium |
| CN113315875A (en)* | 2021-05-25 | 2021-08-27 | 中国平安财产保险股份有限公司 | Call information synchronization method and device, call information synchronization equipment and storage medium |
| CN113315875B (en)* | 2021-05-25 | 2022-12-02 | 中国平安财产保险股份有限公司 | Call information synchronization method and device, call information synchronization equipment and storage medium |
| Publication number | Publication date |
|---|---|
| CN106453597B (en) | 2019-08-06 |
| WO2018076830A1 (en) | 2018-05-03 |
| Publication | Publication Date | Title |
|---|---|---|
| CN106502834B (en) | Backup method, the apparatus and system of data | |
| CN106412093B (en) | Method, device and system for uploading data | |
| CN106453597B (en) | Method, device and system for adjusting data synchronization period | |
| CN106657251A (en) | A data synchronization method and device | |
| CN107040610B (en) | Data synchronization method, device, storage medium, terminal and server | |
| CN107786424B (en) | Audio and video communication method, terminal and server | |
| CN106357897A (en) | Method and device for obtaining drop information | |
| CN106357808A (en) | Data synchronization method and device | |
| CN106254924B (en) | Multimedia data playing method, system and related equipment | |
| CN106452644A (en) | Play control method, device and terminal | |
| CN106532876A (en) | Power supply control method and device and computer equipment | |
| CN106488391A (en) | A data migration method and terminal equipment | |
| CN106326072B (en) | Information processing method and mobile terminal | |
| CN106412625A (en) | Multimedia synchronous playing method, device, terminal and system | |
| CN106445739A (en) | A data migration method and terminal equipment | |
| CN106066769B (en) | Mobile terminal processing method and mobile terminal | |
| CN106254673A (en) | Terminal fall detection method and device | |
| CN106454953B (en) | Flow control method, device and terminal | |
| CN106227337A (en) | Method, device and terminal for adjusting screen brightness | |
| CN106385597A (en) | Clock adjustment method, device, terminal and multimedia synchronous playback system | |
| CN106445458A (en) | Play control method, device and terminal | |
| CN111954193A (en) | A Bluetooth device connection detection method, device and mobile terminal | |
| CN106201202A (en) | A kind of method, device and terminal to desktop icons sequence | |
| CN106484455A (en) | A kind of methods, devices and systems of the installation data of more new application | |
| CN106376022B (en) | The method and mobile terminal of information processing |
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| CB02 | Change of applicant information | ||
| CB02 | Change of applicant information | Address after:523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong Applicant after:OPPO Guangdong Mobile Communications Co., Ltd. Address before:523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong Applicant before:Guangdong OPPO Mobile Communications Co., Ltd. | |
| GR01 | Patent grant | ||
| GR01 | Patent grant |