Power data increment synchronization method and device

By obtaining network delay and file size, determining the trigger conditions for power data synchronization, and performing incremental synchronization, the problems of high and low efficiency of power data synchronization in the existing technology are solved, and efficient data synchronization is achieved in the environment of new power system.

CN119629184APending Publication Date: 2025-03-14国网河北省电力有限公司营销服务中心 +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202311806899.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-26
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

In the prior art, the power data synchronization delay is high, the efficiency is low, and the server is not effectively considered and the network channels are congested, resulting in inapplicability in the new power system environment.

Method used

By obtaining the network delay and file size of the file to be synchronized, it is determined whether the file to be synchronized meets the preset first synchronization trigger condition, and if it is satisfied, incremental synchronization is performed. The specific method includes obtaining the file size threshold, judging the synchronization trigger condition based on network delay and file size, and adding the to-sync file to the waiting queue when the conditions are not met, and cumulative waiting time to judge the second synchronization trigger condition.

Benefits of technology

By perceiving the server load and network channel conditions, we reasonably design the triggering timing of incremental data transmission, alleviate network congestion, and improve data synchronization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119629184A_ABST
    Figure CN119629184A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of electric power, and provides an electric power data increment synchronization method and device, and the method comprises the steps: obtaining network delay and the size of a to-be-synchronized file; judging whether the to-be-synchronized file meets a preset first synchronization triggering condition or not according to the network delay and the file size; and if the first synchronization triggering condition is met, performing incremental synchronization on the to-be-synchronized file. According to the invention, the problems of high power data synchronization delay and low efficiency in the prior art can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of electric power technology, and in particular relates to a method and device for synchronizing electric power data increments. Background Art

[0002] In the environment of new power systems, there are a large number of uncertain factors in social assets such as distributed photovoltaics, loads, and energy storage, and the collection frequency has become more complex. The data increment is large, with higher randomness and uncertainty. The traditional data incremental synchronization method does not take into account the high load of the server and congested network channels, resulting in high incremental synchronization delay and low efficiency, and may even further increase the pressure on the server and network channels. It is not suitable for the new power system environment.

[0003] Patent application number CN202010339724.4 proposes a "cloud-edge-end" data synchronization method for the power Internet of Things. By sharing the data in the cache area among several business terminals under the same edge node, it avoids all business terminals from obtaining data from the cloud platform separately, thus reducing the frequency of network access. However, the patent still does not fundamentally optimize the data synchronization method.

[0004] Therefore, there is an urgent need for a safe, reliable and efficient data synchronization method to ensure the synchronization of hundreds of GB of data per day in the power system and effectively improve the synchronization efficiency of the metering and acquisition system. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides a method and device for incremental synchronization of power data to solve the problems of high delay and low efficiency of power data synchronization in the prior art.

[0006] In a first aspect, an embodiment of the present invention provides a method for synchronizing power data increments, including:

[0007] Get the network delay and the file size of the file to be synchronized;

[0008] According to the network delay and the file size, determine whether the file to be synchronized meets the preset first synchronization trigger condition;

[0009] If the first synchronization triggering condition is met, incremental synchronization is performed on the files to be synchronized.

[0010] In combination with the first aspect, in a possible implementation of the first aspect, judging whether the file to be synchronized meets a preset first synchronization trigger condition according to the network delay and the file size includes:

[0011] Get the file size threshold;

[0012] If the network delay is less than the preset delay threshold, then when the file size is less than the file size threshold, it is determined that the file to be synchronized meets the first synchronization trigger condition;

[0013] If the network delay is not less than the delay threshold, then when the file size is greater than or equal to the file size threshold, it is determined that the file to be synchronized meets the first synchronization trigger condition.

[0014] In combination with the first aspect, in a possible implementation manner of the first aspect, obtaining the file size threshold includes:

[0015] Calculate the absolute value of the difference between the network delay and the delay threshold;

[0016] Determine the increase amount of the file size threshold according to the absolute value of the difference; wherein the absolute value of the difference is positively correlated with the increase amount of the file size threshold;

[0017] A preset file size threshold reference value is obtained, and the file size threshold is determined according to the file size threshold reference value and the file size threshold increase amount.

[0018] In combination with the first aspect, in a possible implementation manner of the first aspect, the power data incremental synchronization method further includes:

[0019] If the first synchronization trigger condition is not met, the file to be synchronized is added to the waiting queue, and the waiting time of the file to be synchronized is accumulated;

[0020] It is determined whether the file to be synchronized meets a preset second synchronization trigger condition according to the waiting time. If the second synchronization trigger condition is met, incremental synchronization is performed on the file to be synchronized.

[0021] In combination with the first aspect, in a possible implementation of the first aspect, judging whether the to-be-synchronized file meets a preset second synchronization trigger condition according to the waiting time includes:

[0022] If the waiting time is greater than or equal to the preset time threshold, it is determined that the file to be synchronized meets the second synchronization trigger condition;

[0023] If the waiting time is less than the time threshold, it is determined that the file to be synchronized does not meet the second synchronization triggering condition.

[0024] In combination with the first aspect, in a possible implementation of the first aspect, judging whether the to-be-synchronized file meets a preset second synchronization trigger condition according to the waiting time includes:

[0025] Calculate the target value of the files to be synchronized based on the waiting time and file size;

[0026] Based on the target value, it is determined whether the file to be synchronized satisfies the second synchronization triggering condition.

[0027] In combination with the first aspect, in a possible implementation of the first aspect, the target value is positively correlated with the waiting time and the file size;

[0028] Based on the target value, determining whether the file to be synchronized meets the second synchronization trigger condition includes:

[0029] If the target value is greater than or equal to the preset target value threshold, it is determined that the file to be synchronized meets the second synchronization trigger condition.

[0030] In combination with the first aspect, in a possible implementation of the first aspect, performing incremental synchronization on the to-be-synchronized file includes:

[0031] Calculate the incremental file of the file to be synchronized relative to the target file;

[0032] Based on the incremental file, the target file is updated synchronously.

[0033] In combination with the first aspect, in a possible implementation of the first aspect, calculating an incremental file of a file to be synchronized relative to a target file includes:

[0034] Split the to-be-synchronized file and the target file into multiple data blocks of equal size, and compare the data blocks of the to-be-synchronized file and the target file from the front to the back;

[0035] If it is detected that the data blocks of the file to be synchronized and the target file are different, the data blocks of the file to be synchronized and the target file are compared from back to front;

[0036] According to the comparison results, all different data blocks are determined;

[0037] All different data blocks are extracted and merged to obtain incremental files.

[0038] In a second aspect, an embodiment of the present invention provides a power data incremental synchronization device, including:

[0039] The acquisition module is used to obtain the network delay and the file size of the file to be synchronized;

[0040] A judgment module, used to judge whether the file to be synchronized meets a preset first synchronization trigger condition according to the network delay and the file size;

[0041] The synchronization module is used to perform incremental synchronization on the files to be synchronized if the first synchronization trigger condition is met.

[0042] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0043] The embodiment of the present invention obtains the network delay and the file size of the file to be synchronized, and determines whether the file to be synchronized meets the preset first synchronization trigger condition according to the network delay and the file size, and performs incremental synchronization on the file to be synchronized if it meets the first synchronization trigger condition. That is, by sensing the server load and network channel conditions, the incremental data transmission synchronization is triggered based on the load conditions and the network channel conditions, and by reasonably designing the triggering timing, network congestion is reduced and data synchronization efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0045] Figure 1 It is a flowchart of a method for synchronizing power data increments provided by an embodiment of the present invention;

[0046] Figure 2 is a schematic diagram of a file comparison method during incremental synchronization provided by an embodiment of the present invention;

[0047] Figure 3 It is a structural schematic diagram of a power data incremental synchronization device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0048] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.

[0049] In order to illustrate the technical solution of the present invention, a specific embodiment is provided below for illustration.

[0050] Existing data synchronization solutions can be mainly divided into full synchronization and incremental synchronization. The main idea of ​​full synchronization is that no matter how many changes are made to the old version of the file, the client will synchronize the contents of all new versions of the file to the server. Different from this, in the incremental synchronization solution, the client only synchronizes the differences between all new and old versions of the file to the server, where the differences are calculated through the interaction between the client and the server. The incremental synchronization solution can significantly reduce the network transmission traffic, reasonably improve the bandwidth utilization and synchronization concurrency performance, so the incremental synchronization solution is more popular.

[0051] However, for the incremental synchronization of hundreds of GB of data per day in the power system, incremental synchronization will occasionally cause network congestion. When network congestion occurs, data loss, increased latency, decreased throughput, and even crashes may occur in severe cases.

[0052] An embodiment of the present invention provides a method for synchronizing power data increments to address the above-mentioned problem. Figure 1 As shown, the method includes:

[0053] Step S101, obtaining the network delay and the file size of the file to be synchronized.

[0054] For the power system, incremental synchronization generally occurs between the server and the metering terminal, for example, synchronizing the data collected by the metering terminal to the server, or synchronizing the data of the server to the metering terminal. At this time, the network delay is the RTT (Round-Trip Time) value of the network between the metering terminal and the server. The synchronization process is to update the old file with the new file. Here, the file to be synchronized refers to the new file, and the file size of the file to be synchronized is the size of the new file.

[0055] Step S102: judging whether the file to be synchronized satisfies a preset first synchronization trigger condition according to the network delay and the file size.

[0056] Existing data synchronization solutions can be mainly divided into full synchronization and incremental synchronization. Among them, the main purpose of full synchronization is that no matter how many changes are made to the old version of the file, the client will synchronously transmit the contents of all new version files to the server. Different from this, in the incremental synchronization solution, the client only synchronously transmits the differences between all new and old versions of the file to the server, where the differences are calculated through the interaction between the client and the server. The incremental synchronization solution can significantly reduce the network transmission traffic and reasonably improve the bandwidth utilization and synchronization concurrency performance. However, the disadvantage of the incremental synchronization solution is that a large amount of computing overhead may be generated when calculating the differences between the new and old versions of the file.

[0057] Generally speaking, the larger the new and old files are, the greater the computational overhead and the longer the time required. Based on this feature of incremental synchronization, this embodiment makes a more reasonable design of the triggering conditions for incremental synchronization.

[0058] That is, in step S102, judging whether the file to be synchronized meets the preset first synchronization trigger condition according to the network delay and the file size includes:

[0059] Step S1021, obtaining a file size threshold;

[0060] Step S1022, if the network delay is less than the preset delay threshold, then when the file size is less than the file size threshold, it is determined that the file to be synchronized meets the first synchronization trigger condition;

[0061] Step S1023: If the network delay is not less than the delay threshold, then when the file size is greater than or equal to the file size threshold, it is determined that the file to be synchronized meets the first synchronization trigger condition.

[0062] It is understandable that when the network delay is small, it means that the network is good, and more attention should be paid to data transmission at this time, so small files are synchronized, and small files take less time to perform the comparison calculation between the new and old files, so that more files can be synchronized more efficiently, and the bandwidth utilization and synchronization concurrency performance can be reasonably improved. When the network delay is large, it means that the network is not very good, and large files are synchronized at this time. Large files take longer time to perform the comparison calculation between the new and old files, thereby reducing the number of file transfers.

[0063] Whether it is a large file or a small file, incremental synchronization only transmits the difference part, so the size of the incremental file is uncertain. The effect of this embodiment is to synchronize as many files as possible when the network is good, improve data synchronization efficiency, and reduce the number of file synchronizations when the network is poor, avoiding further aggravation of network congestion.

[0064] Step S103: If the first synchronization triggering condition is met, incremental synchronization is performed on the files to be synchronized.

[0065] That is, if the network delay is less than the preset delay threshold, the synchronization file is incrementally synchronized when the file size is less than the file size threshold. If the network delay is not less than the delay threshold, the synchronization file is incrementally synchronized when the file size is greater than or equal to the file size threshold.

[0066] The embodiment of the present invention obtains the network delay and the file size of the file to be synchronized, and determines whether the file to be synchronized meets the preset first synchronization trigger condition according to the network delay and the file size, and performs incremental synchronization on the file to be synchronized if it meets the first synchronization trigger condition. That is, by sensing the server load and network channel conditions, the incremental data transmission synchronization is triggered based on the load conditions and the network channel conditions, and by reasonably designing the triggering timing, network congestion is reduced and data synchronization efficiency is improved.

[0067] As a possible implementation, obtaining the file size threshold in step S1021 includes:

[0068] Calculate the absolute value of the difference between the network delay and the delay threshold;

[0069] Determine the increase amount of the file size threshold according to the absolute value of the difference; wherein the absolute value of the difference is positively correlated with the increase amount of the file size threshold;

[0070] A preset file size threshold reference value is obtained, and the file size threshold is determined according to the file size threshold reference value and the file size threshold increase amount.

[0071] In this embodiment, the file size threshold may be set to a fixed value, for example, the file size threshold may be the above-mentioned preset file size threshold reference value.

[0072] Alternatively, the file size threshold is set to a dynamic value that is related to network latency.

[0073] Specifically: the greater the difference between the network delay and the delay threshold, the greater the file size threshold.

[0074] In general, when the network delay is lower than the delay threshold, the larger the absolute value of the difference is, the better the network is. By increasing the file size threshold, as files smaller than the file size threshold are transmitted at this time, as many files as possible can be transmitted.

[0075] Similarly, when the network delay is higher than the delay threshold, the larger the absolute value of the difference, the worse the network. By increasing the file size threshold, since files greater than or equal to the file size threshold are transmitted at this time, the minimum number of files transmitted can be achieved.

[0076] As a possible implementation method, the power data incremental synchronization method also includes:

[0077] If the first synchronization trigger condition is not met, the file to be synchronized is added to the waiting queue, and the waiting time of the file to be synchronized is accumulated;

[0078] It is determined whether the file to be synchronized meets a preset second synchronization trigger condition according to the waiting time. If the second synchronization trigger condition is met, incremental synchronization is performed on the file to be synchronized.

[0079] Considering the synchronization requirement of power data, when the first synchronization triggering condition is not met all the time, it is impossible not to perform synchronization all the time.

[0080] In this embodiment, the to-be-synchronized files that do not meet the first synchronization trigger condition are added to the waiting queue, and the waiting time of the to-be-synchronized files is accumulated. When the waiting time reaches a certain level, the network condition is no longer considered, and the to-be-synchronized files are directly synchronized incrementally. Before the to-be-synchronized files in the waiting queue meet the second synchronization trigger condition, if they meet the first synchronization trigger condition, they can be directly synchronized incrementally.

[0081] As a possible implementation manner, judging whether the to-be-synchronized file meets a preset second synchronization trigger condition according to the waiting time includes:

[0082] If the waiting time is greater than or equal to the preset time threshold, it is determined that the file to be synchronized meets the second synchronization trigger condition;

[0083] If the waiting time is less than the time threshold, it is determined that the file to be synchronized does not meet the second synchronization triggering condition.

[0084] In this embodiment, when the waiting time is greater than or equal to the preset time threshold, it is directly determined that the file to be synchronized meets the second synchronization trigger condition, and incremental synchronization is performed. Here, the time threshold can be a unified threshold. Alternatively, different time thresholds are set for different metering terminals and different types of files to be synchronized, and this application does not limit this.

[0085] As a possible implementation manner, judging whether the to-be-synchronized file meets a preset second synchronization trigger condition according to the waiting time includes:

[0086] Calculate the target value of the files to be synchronized based on the waiting time and file size;

[0087] Based on the target value, it is determined whether the file to be synchronized satisfies the second synchronization triggering condition.

[0088] Considering that when the second synchronization trigger condition is met, the first synchronization trigger condition must not be met, and the files that meet the second synchronization trigger condition are all large files or all small files, performing incremental synchronization at the same time may cause great pressure on the computing power of the network or server. Therefore, this embodiment calculates the target value of the file to be synchronized in combination with the file size, and judges whether the file to be synchronized meets the second synchronization trigger condition based on the target value. Since the size of each file to be synchronized cannot be completely consistent, the actual satisfaction of the second synchronization trigger condition will also be different, so that each file to be synchronized is synchronized in an interlaced manner to relieve the pressure on the network or server. At the same time, the target value is also related to the waiting time to ensure the timeliness and rationality of the incremental synchronization of each file to be synchronized.

[0089] As a possible implementation method, the target value is positively correlated with the waiting time and the file size. For example, the target value z=ax+by, x is the waiting time, y is the file size, a and b are preset weight coefficients, and a and b are both greater than zero.

[0090] Based on the target value, determining whether the file to be synchronized meets the second synchronization trigger condition includes:

[0091] If the target value is greater than or equal to the preset target value threshold, it is determined that the file to be synchronized meets the second synchronization trigger condition.

[0092] As a possible implementation, in step S103, incremental synchronization is performed on the files to be synchronized, including:

[0093] Calculate the incremental file of the file to be synchronized relative to the target file;

[0094] Based on the incremental file, the target file is updated synchronously.

[0095] Furthermore, the incremental file of the file to be synchronized relative to the target file is calculated, including:

[0096] Split the to-be-synchronized file and the target file into multiple data blocks of equal size, and compare the data blocks of the to-be-synchronized file and the target file from the front to the back;

[0097] If it is detected that the data blocks of the file to be synchronized and the target file are different, the data blocks of the file to be synchronized and the target file are compared from back to front;

[0098] According to the comparison results, all different data blocks are determined;

[0099] All different data blocks are extracted and merged to obtain incremental files.

[0100] For large file synchronization, by eliminating redundant data blocks between new and old files, the incremental synchronization solution can reduce the total amount of data transmitted over the network. If the amount of data reduced accounts for a large proportion, the overall synchronization performance can also be greatly improved. However, this may be achieved at the cost of expensive computing overhead, which will also bring additional synchronization delays.

[0101] In the related art, a fixed-size block scheme is usually adopted. However, any update to any position in the file will cause the data blocks of the remaining part of the file to shift, making the hash check code originally calculated by the server of the fixed-size block scheme invalid, thereby greatly reducing the data matching degree. This is because the fixed-size block scheme divides the file data blocks from the head to the tail of the file, that is, from the front to the back, with a fixed size.

[0102] In order to discover more redundant data blocks and reduce computational overhead, see Figure 2 As shown, this embodiment considers adopting a fixed-size block algorithm combining forward and backward directions, as follows:

[0103] First, the server divides the old version of the file from front to back in fixed-size blocks, generates a set of hash check codes and sends it to the client. The client compares the new version of the file in the same way from front to back in fixed-size blocks based on the hash check code set. If different data blocks appear during the comparison process, that is, the hash check codes corresponding to the two data blocks do not match, then starting from the end of the new file, the remaining unmatched part of the new file is compared from back to front in a fixed-size block division method, thereby maximizing the discovery of redundant data blocks without incurring expensive computing overhead. After using the fixed-size block algorithm that combines forward and backward, the deduplication rate and block speed can be improved, greatly improving synchronization performance.

[0104] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0105] Figure 3 is a schematic diagram of the structure of the power data increment synchronization device 30 provided in an embodiment of the present invention. Figure 3 As shown, the device comprises:

[0106] The acquisition module 31 is used to acquire the network delay and the file size of the file to be synchronized.

[0107] The judgment module 32 is used to judge whether the file to be synchronized meets a preset first synchronization trigger condition according to the network delay and the file size.

[0108] The synchronization module 33 is configured to perform incremental synchronization on the file to be synchronized if the first synchronization triggering condition is met.

[0109] In a possible implementation, the determination module 32 is specifically configured to:

[0110] Get the file size threshold;

[0111] If the network delay is less than the preset delay threshold, then when the file size is less than the file size threshold, it is determined that the file to be synchronized meets the first synchronization trigger condition;

[0112] If the network delay is not less than the delay threshold, then when the file size is greater than or equal to the file size threshold, it is determined that the file to be synchronized meets the first synchronization trigger condition.

[0113] In a possible implementation, the determination module 32 is specifically configured to:

[0114] Calculate the absolute value of the difference between the network delay and the delay threshold;

[0115] Determine the increase amount of the file size threshold according to the absolute value of the difference; wherein the absolute value of the difference is positively correlated with the increase amount of the file size threshold;

[0116] A preset file size threshold reference value is obtained, and the file size threshold is determined according to the file size threshold reference value and the file size threshold increase amount.

[0117] In a possible implementation, the determination module 32 is further configured to:

[0118] If the first synchronization trigger condition is not met, the file to be synchronized is added to the waiting queue, and the waiting time of the file to be synchronized is accumulated;

[0119] It is determined whether the file to be synchronized meets a preset second synchronization trigger condition according to the waiting time. If the second synchronization trigger condition is met, incremental synchronization is performed on the file to be synchronized.

[0120] In a possible implementation, judging whether the to-be-synchronized file meets a preset second synchronization trigger condition according to the waiting time includes:

[0121] If the waiting time is greater than or equal to the preset time threshold, it is determined that the file to be synchronized meets the second synchronization trigger condition;

[0122] If the waiting time is less than the time threshold, it is determined that the file to be synchronized does not meet the second synchronization triggering condition.

[0123] In a possible implementation, judging whether the to-be-synchronized file meets a preset second synchronization trigger condition according to the waiting time includes:

[0124] Calculate the target value of the files to be synchronized based on the waiting time and file size;

[0125] Based on the target value, it is determined whether the file to be synchronized satisfies the second synchronization triggering condition.

[0126] As a possible implementation, the target value is positively correlated with the waiting time and the file size;

[0127] Based on the target value, determining whether the file to be synchronized meets the second synchronization trigger condition includes:

[0128] If the target value is greater than or equal to the preset target value threshold, it is determined that the file to be synchronized meets the second synchronization trigger condition.

[0129] In a possible implementation, the synchronization module 33 is specifically used for:

[0130] Calculate the incremental file of the file to be synchronized relative to the target file;

[0131] Based on the incremental file, the target file is updated synchronously.

[0132] In a possible implementation, calculating the incremental file of the file to be synchronized relative to the target file includes:

[0133] Split the to-be-synchronized file and the target file into multiple data blocks of equal size, and compare the data blocks of the to-be-synchronized file and the target file from the front to the back;

[0134] If it is detected that the data blocks of the file to be synchronized and the target file are different, the data blocks of the file to be synchronized and the target file are compared from back to front;

[0135] According to the comparison results, all different data blocks are determined;

[0136] All different data blocks are extracted and merged to obtain incremental files.

[0137] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0138] Those of ordinary skill in the art will appreciate that the templates, units, and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0139] If the module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned embodiments of the power data incremental synchronization method can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. Computer-readable media may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier signal, telecommunication signal and software distribution medium, etc.

[0140] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.

Claims

1. A method for synchronizing power data increments, characterized in that: include: Get the network delay and the file size of the file to be synchronized; Determining whether the file to be synchronized meets a preset first synchronization trigger condition according to the network delay and the file size; If the first synchronization triggering condition is met, incremental synchronization is performed on the file to be synchronized.

2. The power data incremental synchronization method according to claim 1, characterized in that: The determining, according to the network delay and the file size, whether the file to be synchronized satisfies a preset first synchronization trigger condition includes: Get the file size threshold; If the network delay is less than a preset delay threshold, then when the file size is less than the file size threshold, it is determined that the file to be synchronized meets the first synchronization trigger condition; If the network delay is not less than the delay threshold, then when the file size is greater than or equal to the file size threshold, it is determined that the file to be synchronized meets the first synchronization trigger condition.

3. The power data incremental synchronization method according to claim 2, characterized in that: The obtaining of the file size threshold comprises: Calculating an absolute value of a difference between the network delay and the delay threshold; Determining the file size threshold increase amount according to the absolute value of the difference; wherein the absolute value of the difference is positively correlated with the file size threshold increase amount; A preset file size threshold reference value is obtained, and the file size threshold is determined according to the file size threshold reference value and the file size threshold increase amount.

4. The power data incremental synchronization method according to claim 1, characterized in that: The method further comprises: If the first synchronization triggering condition is not met, the to-be-synchronized file is added to a waiting queue, and the waiting time of the to-be-synchronized file is accumulated; It is determined whether the file to be synchronized satisfies a preset second synchronization trigger condition according to the waiting time; if the second synchronization trigger condition is satisfied, incremental synchronization is performed on the file to be synchronized.

5. The power data incremental synchronization method according to claim 4, characterized in that: The determining, according to the waiting time, whether the file to be synchronized satisfies a preset second synchronization triggering condition includes: If the waiting time is greater than or equal to a preset time threshold, it is determined that the file to be synchronized meets the second synchronization trigger condition; If the waiting time is less than the time threshold, it is determined that the file to be synchronized does not satisfy the second synchronization triggering condition.

6. The power data incremental synchronization method according to claim 4, characterized in that: The determining, according to the waiting time, whether the file to be synchronized satisfies a preset second synchronization triggering condition includes: Calculate the target value of the file to be synchronized according to the waiting time and the file size; Based on the target value, it is determined whether the file to be synchronized satisfies the second synchronization triggering condition.

7. The power data incremental synchronization method according to claim 6, characterized in that: The target value is positively correlated with the waiting time and the file size; The determining, based on the target value, whether the to-be-synchronized file satisfies the second synchronization triggering condition includes: If the target value is greater than or equal to a preset target value threshold, it is determined that the file to be synchronized meets the second synchronization trigger condition.

8. The power data incremental synchronization method according to any one of claims 1 to 7, characterized in that: The incremental synchronization of the to-be-synchronized files includes: Calculate the incremental file of the file to be synchronized relative to the target file; Based on the incremental file, the target file is synchronously updated.

9. The power data incremental synchronization method according to claim 8, characterized in that: The calculating the incremental file of the file to be synchronized relative to the target file includes: Splitting the to-be-synchronized file and the target file into a plurality of data blocks of equal size, and comparing the data blocks of the to-be-synchronized file and the target file from front to back; If it is detected that the data blocks of the to-be-synchronized file and the target file are different, comparing the data blocks of the to-be-synchronized file and the target file from back to front; According to the comparison results, all different data blocks are determined; All different data blocks are extracted and merged to obtain the incremental file.

10. A power data incremental synchronization device, characterized in that: include: The acquisition module is used to obtain the network delay and the file size of the file to be synchronized; A judgment module, used to judge whether the file to be synchronized meets a preset first synchronization trigger condition according to the network delay and the file size; A synchronization module is used to perform incremental synchronization on the file to be synchronized if the first synchronization trigger condition is met.

Citation Information

Patent Citations

  • A Cloud-Edge-Device Data Synchronization Method for the Power Internet of Things

    CN111552440B

  • Data synchronization cycle adjustment method, device and system

    CN106453597A

  • File synchronization method, server, client and device with storage function

    CN109739810A

  • Data increment synchronization method and system

    CN113626516A

  • Data synchronization method, system and device, storage medium and electronic equipment

    CN116467383A