CN114503076A - Incremental data determining method and device, server and terminal equipment - Google Patents

Incremental data determining method and device, server and terminal equipment Download PDF

Info

Publication number
CN114503076A
CN114503076A CN201980099820.1A CN201980099820A CN114503076A CN 114503076 A CN114503076 A CN 114503076A CN 201980099820 A CN201980099820 A CN 201980099820A CN 114503076 A CN114503076 A CN 114503076A
Authority
CN
China
Prior art keywords
file
target
original
computing
block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201980099820.1A
Other languages
Chinese (zh)
Inventor
赵杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd, Shenzhen Huantai Technology Co Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Publication of CN114503076A publication Critical patent/CN114503076A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

An incremental data determining method, a determining device, a server and a readable storage medium are provided, the method comprises the following steps: acquiring an original file to be updated in terminal equipment, and acquiring an updated target file corresponding to the original file (S101); blocking the updated target file to obtain N target blocks, wherein N is an integer greater than 1 (S102); according to a load balancing algorithm, respectively allocating the N target blocks to different computing modules to instruct each computing module to execute: calculating the increment data of the obtained target block and the original block, wherein the original block is the original file or a partial file of the original file (S103); and obtaining the incremental data respectively returned by each computing module, and returning each incremental data to the terminal equipment to instruct the terminal equipment to update the original file according to each incremental data (S104). The method can improve the file updating efficiency of the terminal equipment to a certain extent.

Description

Incremental data determining method and device, server and terminal equipment Technical Field
The present application belongs to the field of file updating technologies, and in particular, to a method and an apparatus for determining incremental data, a terminal device, and a computer-readable storage medium.
Background
At present, when a file in a terminal device is updated, in order to reduce the data processing amount of the terminal device, an incremental updating method is often adopted, that is, the terminal device only updates a place which needs to be changed, and the place which does not need to be updated or is updated does not need to be updated repeatedly.
The traditional incremental update algorithm is: and comparing the difference between the updated target file and the original file to be updated at the Server by adopting a Server/Client (C/S) architecture so as to obtain incremental data, and then returning the incremental data to the terminal equipment so as to update the file in the terminal equipment.
However, when the conventional incremental update algorithm is used, if the updated target file and the updated original file are large, the server needs to spend a lot of time for comparison, and thus, a lot of time is needed to calculate the incremental data, and therefore, the conventional incremental update algorithm cannot efficiently update the file.
Technical problem
One of the purposes of the embodiment of the application is as follows: the incremental data determining method, the incremental data determining device, the terminal equipment and the computer readable storage medium are provided, and the technical problem that a traditional incremental updating algorithm cannot efficiently update files is solved to a certain extent.
Technical solution
In order to solve the technical problem, the embodiment of the application adopts the following technical scheme:
in a first aspect, an incremental data determining method is provided, and is applied to a server, and the method includes:
acquiring an original file to be updated in terminal equipment, and acquiring an updated target file corresponding to the original file;
partitioning the updated target file to obtain N target partitions, wherein N is an integer greater than 1;
according to a load balancing algorithm, distributing the N target blocks to different computing modules respectively to instruct each computing module to execute: calculating the increment data of the obtained target block and the original block, wherein the original block is the original file or a partial file of the original file;
and acquiring each incremental data returned by each calculation module respectively, and returning each incremental data to the terminal equipment to instruct the terminal equipment to update the original file according to each incremental data.
In a second aspect, an incremental data determining apparatus is provided, which is applied to a server, and includes:
the file acquisition module is used for acquiring an original file to be updated in the terminal equipment and acquiring an updated target file corresponding to the original file;
the block dividing module is used for dividing the updated target file into N target blocks, wherein N is an integer greater than 1;
the distribution module is used for distributing the N target blocks to different calculation modules respectively according to a load balancing algorithm so as to instruct each calculation module to execute: calculating the increment data of the obtained target block and the original block, wherein the original block is the original file or a partial file of the original file;
and the increment returning module is used for acquiring each increment data returned by each calculation module respectively and returning each increment data to the terminal equipment so as to instruct the terminal equipment to update the original file according to each increment data.
In a third aspect, there is provided a server comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to the first aspect when executing the computer program.
In a fourth aspect, there is provided a computer readable storage medium storing a computer program which, when executed by a processor, performs the steps of the method of the first aspect as described above.
In a fifth aspect, there is provided a computer program product comprising a computer program which, when executed by one or more processors, performs the steps of the method of the first aspect as described above.
Technical effects
As can be seen from the above, the present application provides a method for determining incremental data applied to a server side, first, obtaining an original file to be updated (for example, the original file may be an old version of an application installation package stored in a terminal device), and obtaining an updated target file corresponding to the original file (for example, the updated target file may be a new version of the application installation package stored at the server side); secondly, partitioning the updated target file to obtain a plurality of target partitions; then, according to a load balancing algorithm, respectively allocating the target blocks to different computing modules to instruct each computing module to execute: calculating the obtained incremental data of the target blocks and the original blocks, wherein the original blocks are the original file or partial files of the original file (that is, the target blocks are equally allocated to different calculation modules, for example, if there are 3 target blocks and 2 calculation modules, the first and third target blocks may be allocated to the calculation module 1, and the second target block may be allocated to the calculation module 2, so that the calculation module 1 and the calculation module 2 respectively execute the calculation operation of the incremental data); and finally, obtaining each incremental data respectively returned by each calculation module, and returning each incremental data to the terminal equipment to instruct the terminal equipment to update the original file according to each incremental data.
Therefore, in the technical scheme provided by the application, the plurality of calculation modules can be ensured to calculate the incremental data respectively and simultaneously, and therefore, compared with the traditional incremental updating algorithm, the method can accelerate the acquisition speed of the incremental data to a certain extent, so that the file updating efficiency of the terminal equipment can be improved to a certain extent.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or exemplary technical descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without inventive efforts.
Fig. 1 is a schematic flowchart of an incremental data determination method according to an embodiment of the present application;
FIG. 2 is a block diagram of an updated target file according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a computing module shown in an embodiment of the present application;
FIG. 4 is a schematic flowchart of another incremental data determination method provided in the second embodiment of the present application;
FIG. 5 is a diagram of a target block, an original block, and a computing unit in the second embodiment of the present application;
fig. 6 is a schematic flowchart of another incremental data determination method provided in the third embodiment of the present application;
fig. 7 is a schematic structural diagram of an incremental data determining apparatus according to a fourth embodiment of the present application;
fig. 8 is a schematic structural diagram of a server according to a fifth embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
In addition, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not intended to indicate or imply relative importance.
In order to explain the technical solution of the present application, the following description will be given by way of specific examples.
In the following, a method for determining incremental data provided in an embodiment of the present application is described, where the method is applied to a server side, and please refer to fig. 1, where the method for determining incremental data includes:
in step S101, an original file to be updated in the terminal device is acquired, and an updated target file corresponding to the original file is acquired;
in this embodiment of the application, the server may execute the step S101 after receiving the file update request sent by the terminal device. For example, when the terminal device needs to update the file X to the file X1, a file update request may be sent to the server, and the server obtains the file X and the file X1 when receiving the file update request.
In general, the updated target file is often already stored in the server, and therefore, the updated target file may be directly read from the memory. However, the present application does not limit the manner of acquiring the updated target file.
In this embodiment of the present application, the obtaining of the original file to be updated in the terminal device may specifically be: and acquiring the version identification of the original file to be updated in the terminal equipment, and acquiring the original file to be updated in the terminal equipment based on the version identification. By adopting the method, the server can quickly acquire the original file to be updated (because the server usually stores files with different version identifications, the original file to be updated can be directly acquired from the memory after the identification is acquired, and the original file with large transmission data volume is avoided). However, the method for determining the original file to be updated by obtaining the version identifier may cause the original file obtained by the server to be different from the original file actually stored in the terminal device (for example, the user may modify the file to be updated), so as to cause an update failure, and therefore, to avoid the file update failure phenomenon caused by this situation, the original file to be updated may be determined in the following manner: and receiving the original file to be updated sent by the terminal equipment. This method can ensure that the original file obtained by the server is completely consistent with the original file to be updated in the terminal device, but this requires a large amount of data transmission between the terminal device and the server, and therefore, the file updating efficiency may be reduced.
Therefore, in order to avoid file update failure and not reduce file update efficiency, the server may receive the version identifier of the original file to be updated and the number of times of modification of the original file by the user; if the user does not modify the file, directly obtaining the original file to be updated from the memory; and if the file is modified, communicating with the terminal equipment to acquire the original file to be updated.
In step S102, blocking the updated target file to obtain N target blocks, where N is an integer greater than 1;
in the embodiment of the present application, each target block may be as shown in fig. 2(a) and 2(b), and there is no cross-repeated data between two target blocks; alternatively, as shown in fig. 2(c), at least two target blocks may have cross-repeated data, and the present application does not limit the splitting manner of the target blocks. It should be understood by those skilled in the art that, when there are at least two target blocks of data with cross repetition, the calculation amount of the calculation module in the subsequent step S103 is increased, and the terminal device needs to perform a deduplication operation after receiving the incremental data, but this blocking method may improve the interference resistance between the terminal device and the server to some extent (for example, when the terminal device performs a file update operation, if there is no piece of duplicate data between the target block 1 and the target block 2 obtained according to the incremental data, it is described that the incremental data interferes in transmission, and the server may be requested to retransmit the incremental data).
In addition, the blocking method in step S102 may be, as shown in fig. 2(a), that the data volumes of the target blocks are completely the same except for the last target block (the data volume of the last target block depends on the size of the updated target file, and may be the same as or smaller than the size of the previous target blocks); as shown in fig. 2(b), the size of each target block may not be limited, for example, the updated target file may be randomly divided to obtain N target blocks. In addition, the following second and third embodiments will provide specific segmentation methods, and the descriptions of the second and third embodiments can be specifically reviewed.
In addition, it should be obvious to those skilled in the art that the union of the N target blocks should be equal to the updated target file, otherwise, the update of the original file cannot be realized at all. Therefore, the union of the N target blocks is not equal to the technical solution of the updated target file, and is not within the protection scope of the present application.
In step S103, according to a load balancing algorithm, the N target blocks are respectively allocated to different computing modules to instruct each computing module to execute: calculating the increment data of the obtained target block and the original block, wherein the original block is the original file or a partial file of the original file;
the "computing module" in step S103 may be a computing terminal (such as the terminal devices 302 and 303 shown in fig. 3) separately set up from the server, or may also be a thread or a process in the server, which is not limited in this application.
In this step, the server needs to allocate corresponding target blocks to multiple computing modules according to the computing burden of each current computing module, so as to ensure that the computing burden of each computing module is balanced, thereby obtaining the incremental data more quickly. For example, if 3 target blocks are segmented in step S102, there are 2 computing modules in total, and both computing modules are in an idle state before the target blocks are allocated, at this time, one target block may be allocated to one computing module, and two target blocks may be allocated to the other computing module.
In addition, it should be noted by those skilled in the art that, for a certain computation module, the original blocks adopted by the computation module when computing the incremental data may be the same as or different from the original blocks adopted by other computation modules, and this application is not limited to this. However, it should be understood by those skilled in the art that, in general, when the original blocks adopted by each computing module are all original files themselves, the data amount of incremental data obtained by each computing module is the minimum (because the current incremental data is generally calculated in a manner of obtaining the same part and the increased part of the target block as the original file, when the original file is more complete, the same part of the original file occupies a larger percentage of the same part, and the part only needs to record the identifier, so that the obtained data amount of the incremental data is less), and accordingly, the time for returning each incremental data to the terminal device is also shorter, which facilitates faster file updating.
In step S104, obtaining incremental data respectively returned by each computing module, and returning each incremental data to the terminal device to instruct the terminal device to update the original file according to each incremental data;
in this embodiment of the application, the server may summarize each incremental data to obtain a total incremental data, and then return the total incremental data to the terminal device; or, the incremental data may be sequentially returned to the terminal device according to the calculation speed of each calculation module, and the advantage of sequentially returning to the terminal device is that: the terminal equipment has small data processing amount at a single time point, and the operation burden of the terminal equipment is favorably reduced.
Therefore, in the technical scheme provided by the first embodiment of the application, it can be ensured that the plurality of computing modules respectively compute the incremental data at the same time, and therefore, compared with a traditional incremental updating algorithm, the method can accelerate the acquisition speed of the incremental data to a certain extent, so that the file of the terminal device can be updated quickly to a certain extent.
Another incremental data determining method provided in the second embodiment of the present application is described below, and the same as the first embodiment, the incremental data determining method is also applied to the server side, and different from the first embodiment, in the second embodiment of the present application, the computing module is specifically a computing terminal separately set up from the server, please refer to fig. 4, and the incremental data determining method includes:
in step S201, an original file to be updated in the terminal device is obtained, and an updated target file corresponding to the original file is obtained;
the specific implementation manner of step S201 is exactly the same as that of step S101 in the first embodiment, and specific reference may be made to the description of the first embodiment, which is not repeated herein.
In step S202, dividing the updated target file into N target blocks based on the file types of the files included in the updated target file, where the file types of the files included in each target block are the same, and N is an integer greater than 1;
in the second embodiment of the present application, a way of dividing the target blocks is given, and accordingly, in the subsequent step S203, for each target block, each file in the original files with the same file type is determined as the original block corresponding to the target block. In the second embodiment of the present application, for each target partition, since the target partition and the corresponding original file have the same file type, in principle, the difference between the two is small, and therefore, for each computing terminal, the incremental data can be computed faster. In addition, in the second embodiment of the present application, the original blocks corresponding to each target block may be the original files to be updated obtained in step S201, and although the original files still ensure that each incremental data is small, it may be that large data needs to be transmitted between the terminal device and the computing terminal, and the transmission time is long.
The steps involved in the second embodiment of the present application are described below with reference to fig. 5. First, referring to fig. 2, the step S202 is described as follows:
as shown in fig. 5, the updated target file is divided into 4 target blocks, where target block 1 is a jpg type file, target block 2-bit dll type file, target block 3 is a dat type file, and target block 4 is a txt type file. In addition, it should be understood by those skilled in the art that in this step S202, the file types of the two target blocks are allowed to be the same, for example, when the ratio of the file of a certain type in the updated target file is greater than a preset ratio (for example, 80%), the file of the type may be divided into a plurality of target blocks, that is, there may be a case where the file types of the target block 1 and the target block 2 are the same.
In step S203, for each target partition, extracting each file corresponding to the file type in the original file based on the file type of the file included in the target partition, and determining each file as the original partition corresponding to the target partition;
in general, the file types included in the updated target file all appear in the original file to be updated, and therefore, the original file may be partitioned based on this step S203. See in particular fig. 5.
As shown in fig. 5, each file with a file type jpg in the original file is determined as an original block 1 corresponding to a target block 1, each file with a file type dll in the original file is determined as an original block 2 corresponding to a target block 2, each file with a file type dat in the original file is determined as an original block 3 corresponding to a target block 3, and each file with a file type txt in the original file is determined as an original block 4 corresponding to a target block 4.
In addition, in some cases, there may be file types that are not included in the original file in the updated target file, for example, the updated target file includes 3 target blocks, where the types are type X, type Y, and type Z, respectively, however, the original file only includes files of type X and type Y, at this time, each file in the original file of type X may be determined as an original block corresponding to the target block of type X, each file in the original file of type Y may be determined as an original block corresponding to the target block of type Y, and the original file itself may be determined as an original block corresponding to the target block of type Z.
That is, the step S203 may specifically be: for each target block, if the original file includes files of the same file type as the target block, the files may be determined as the original blocks corresponding to the target block.
Accordingly, before step S204, the incremental data determining method further includes the steps of:
for each target block, if the original file does not include files of the same file type as the target block, the original file itself may be determined as the original block corresponding to the target block.
In step S204, for each target block, determining the target block and an original block corresponding to the target block as a calculation unit corresponding to the target block;
as shown in fig. 5, 4 calculation units are obtained from the results of step S202 and step S203.
In step S205, according to the load balancing algorithm, the above N computing units are respectively allocated to different computing terminals to instruct each computing terminal to execute: calculating the obtained target blocks in the calculating unit and the obtained incremental data of the original blocks in the calculating unit;
in the second embodiment of the present application, before target partition allocation is performed, data operation burdens of each computing terminal may be obtained, and if a difference between the data operation burdens of two computing terminals is smaller than a preset difference, each target partition may be allocated by using the following method 1 or method 2 (where the data operation burden is a parameter indicating an operation status of computing terminal data or a program, and the data operation burden may be determined by parameters such as a CPU occupation situation, a memory occupation situation, and/or a system skin average load):
mode 1: and respectively distributing each computing unit to different computing terminals according to the identification serial number of each computing unit, wherein the identification serial number takes the values of 1 and 2 … … N. For example, as shown in fig. 5, assuming that there are two computing terminals, computing unit 1 and computing unit 2 may be assigned to computing terminal 1, and computing unit 3 and computing unit 4 may be assigned to computing terminal 2.
It should be understood by those skilled in the art that in the method 1, it is necessary to ensure that the number of computing units acquired by each computing terminal is as consistent as possible.
Mode 2: and determining the check value of each calculation unit, and respectively allocating each calculation unit to different calculation terminals based on the check value of each calculation unit. For example, as shown in fig. 5, assuming that there are two computing terminals, a check value of Message-Digest Algorithm 5 (MD 5) of each computing unit may be calculated, and it is determined that the computing unit is allocated to the computing terminal according to the last 1 bit of the check value, for example, if the last bit is 0, it is allocated to computing terminal 1, and if the last bit is 1, it is allocated to computing terminal 2.
Usually, a plurality of computing terminals are specially equipped to compute incremental data, in this case, the busy time and the idle time between every two computing terminals are often the same, that is, the difference of data operation loads between the two computing terminals is often small, so that the method 1 or the method 2 can be directly adopted to allocate the target blocks. However, it should be understood by those skilled in the art that the above-mentioned mode 1 and mode 2 are examples, and other distribution modes can be conceived by those skilled in the art without inventive effort, and are within the protection scope of the present application.
In step S206, obtaining incremental data respectively returned by each computing terminal, and returning each incremental data to the terminal device to instruct the terminal device to update the original file according to each incremental data;
the step S206 is the same as the step S104 in the first embodiment, and specific reference is made to the description of the first embodiment, which is not repeated herein.
Compared with the first embodiment, the second embodiment of the application makes clear that the computing module is a computing terminal which is separated from the server, so that the requirements on hardware and software of the server and the maintenance cost are reduced. In addition, the second embodiment of the present application also defines the determination method of the target block and the original block, which can ensure that the calculation burden of the calculation terminal is small, the calculated incremental data is also small, and the file update speed can be further increased.
Referring to fig. 6, a description is provided below of another incremental data determining method provided in the third embodiment of the present application, where the incremental data determining method is applied to a server side, and the determining method includes:
in step S301, an original file to be updated in the terminal device is acquired, and an updated target file corresponding to the original file is acquired;
the specific implementation manner of step S301 is completely the same as that of step S101 in the first embodiment, and details may be specifically mentioned in the description of the first embodiment, which is not described herein again.
In step S302, dividing the updated target file into N target blocks based on a storage order of data in the updated target file, where each target block includes files having consecutive storage orders, and N is an integer greater than 1;
the target block segmentation method described in step S302 is a simpler segmentation method, and is convenient for programmers to research and develop.
In step S303, for each target block, determining the target block and the original file as a calculation unit corresponding to the target block;
the third embodiment of the present application is different from the second embodiment, and the second embodiment is divided according to file types, so that each original partition may be each file of a corresponding file type. However, in the third embodiment of the present application, because the incremental data is simply divided according to the storage sequence, in order to ensure that the data amount of the incremental data is small, the original file itself needs to be determined as the original partition corresponding to each target partition (the specific reason is described in step S103 in the first embodiment, which can be described in detail in the first embodiment, and is not described here again).
In step S304, according to a load balancing algorithm, the N computing units are respectively allocated to different computing terminals to instruct each computing terminal to perform: calculating the obtained target blocks in the calculating unit and the obtained incremental data of the original blocks in the calculating unit;
in step S305, incremental data returned by each computing terminal is obtained, and each incremental data is returned to the terminal device to instruct the terminal device to update the original file according to each incremental data.
The specific implementation manner of the steps S304-S305 is completely the same as the steps S205-S206 in the second embodiment, and the description of the second embodiment can be specifically referred to, and the details are not repeated herein.
Compared with the second embodiment, the incremental data determining method provided by the third embodiment is much simpler, and therefore, the incremental data determining method is more convenient for a programmer to research and develop.
The fourth embodiment of the application provides an incremental data determining device, which is applied to a server. For convenience of explanation, only the portions related to the present application are shown, and as shown in fig. 7, the incremental data determining apparatus 400 includes:
a file obtaining module 401, configured to obtain an original file to be updated in a terminal device, and obtain an updated target file corresponding to the original file;
a block module 402, configured to block the updated target file to obtain N target blocks, where N is an integer greater than 1;
an allocating module 403, configured to allocate, according to a load balancing algorithm, the N target blocks to different computing modules respectively, so as to instruct each computing module to execute: calculating the increment data of the obtained target block and the original block, wherein the original block is the original file or a partial file of the original file;
an increment returning module 404, configured to obtain each increment data returned by each computing module, and return each increment data to the terminal device, so as to instruct the terminal device to update the original file according to each increment data.
Optionally, the computing module is a computing terminal in communication connection with the server;
accordingly, the allocating module 403 includes:
a calculating unit determining unit, configured to determine, for each target partition, a calculating unit corresponding to the target partition, where the calculating unit includes the target partition and an original partition, and the original partition is the original file itself or a partial file of the original file;
the computing unit distributing unit is used for distributing the N computing units to different computing terminals respectively according to a load balancing algorithm so as to instruct each computing terminal to execute: and calculating the increment data of the obtained target block in the calculating unit and the obtained original block in the calculating unit.
Optionally, the blocking module 402 is specifically configured to:
dividing the updated target file into N target blocks based on the storage sequence of the data in the updated target file, wherein each target block comprises each file with continuous storage sequence;
correspondingly, the calculating unit determining unit is specifically configured to:
for each target block, determining the original file itself as the original block corresponding to the target block, and determining the target block and the original file as the computing unit corresponding to the target block.
Optionally, the blocking module 402 is specifically configured to:
dividing the updated target file into N target blocks based on the file types of the files contained in the updated target file, wherein the file types of the files contained in each target block are the same;
accordingly, the calculation unit determination unit includes:
an original file determining subunit, configured to, for each target partition, extract, based on a file type of a file included in the target partition, each file corresponding to the file type in the original file, and determine each file as an original partition corresponding to the target partition;
and the calculating unit determining subunit is used for determining the target block and the original block corresponding to the target block as the calculating unit corresponding to the target block for each target block.
Optionally, if the difference between the data operation burdens of two computing terminals is smaller than a preset difference, the computing unit allocating unit is specifically configured to:
according to the identification serial number of each computing unit, distributing each computing unit to different computing terminals respectively, wherein the identification serial number takes values as follows: 1. 2 … … N;
wherein the data operation burden is a parameter representing the operation status of the data or program of the computing terminal.
Optionally, if the difference between the data operation burdens of two computing terminals is smaller than a preset difference, the computing unit allocating unit is specifically configured to:
determining a check value of each computing unit, and respectively allocating each computing unit to different computing terminals based on the check value of each computing unit;
wherein the data operation burden is a parameter representing the data or program operation status of the computing terminal.
Optionally, the blocking module 402 is specifically configured to:
and partitioning the updated target file to obtain N target partitions, wherein at least two target partitions have cross repeated data.
Optionally, the server stores files with respective version identifiers;
accordingly, the file obtaining module 401 obtains the original file to be updated in the terminal device specifically by the following steps:
acquiring the version identification of the original file to be updated in the terminal equipment and the modification times of the original file sent by the terminal equipment by a user;
if the number of times of modification is zero, acquiring the original file to be updated indicated by the version identification from each locally stored file based on the version identification;
and if the modification times are not zero, requesting the terminal equipment to send the original file to be updated.
Optionally, the increment returning module 404 is specifically configured to:
and sequentially returning each incremental data to the terminal equipment according to the calculation speed of each calculation module.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, since the first method embodiment and the second method embodiment are based on the same concept, specific functions and technical effects thereof may be specifically referred to a corresponding method embodiment part, and details are not described herein again.
Fig. 8 is a schematic diagram of a server provided in the fifth embodiment of the present application. As shown in fig. 8, the server 500 of this embodiment includes: a processor 501, a memory 502 and a computer program 503 stored in the memory 502 and executable on the processor 501. The steps in the various method embodiments described above are implemented when the processor 501 executes the computer program 503 described above. Alternatively, the processor 501 implements the functions of the modules/units in the device embodiments when executing the computer program 503.
Illustratively, the computer program 503 may be divided into one or more modules/units, which are stored in the memory 502 and executed by the processor 501 to complete the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 503 in the server 500. For example, the computer program 503 may be divided into a file acquiring module, a blocking module, an allocating module, and an increment returning module, and each module has the following specific functions:
acquiring an original file to be updated in terminal equipment, and acquiring an updated target file corresponding to the original file;
partitioning the updated target file to obtain N target partitions, wherein N is an integer greater than 1;
according to a load balancing algorithm, respectively allocating the N target blocks to different computing modules to instruct each computing module to execute: calculating the increment data of the obtained target block and the original block, wherein the original block is the original file or a partial file of the original file;
and acquiring each incremental data returned by each calculation module respectively, and returning each incremental data to the terminal equipment to instruct the terminal equipment to update the original file according to each incremental data.
The server may include, but is not limited to, a processor 501, a memory 502. Those skilled in the art will appreciate that fig. 8 is merely an example of a server 500 and is not intended to be limiting of server 500, and may include more or fewer components than those shown, or some components in combination, or different components, e.g., the server may also include input output devices, network access devices, buses, etc.
The Processor 501 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 502 may be an internal storage unit of the server 500, such as a hard disk or a memory of the server 500. The memory 502 may also be an external storage device of the server 500, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) and the like provided on the server 500. Further, the memory 502 may include both an internal storage unit and an external storage device of the server 500. The memory 502 is used to store the computer programs and other programs and data required by the server. The memory 502 described above may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned functions may be distributed as different functional units and modules according to needs, that is, the internal structure of the apparatus may be divided into different functional units or modules to implement all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The units described above as separate parts may or may not be physically separate, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units described above, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the above method embodiments may be implemented by a computer program, which may be stored in a computer readable storage medium and used by a processor to implement the steps of the above method embodiments. The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file or some intermediate form. The computer readable medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signal, telecommunication signal, software distribution medium, etc. It should be noted that the computer readable medium described above may include content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media that does not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (20)

  1. An incremental data determination method applied to a server, the method comprising:
    acquiring an original file to be updated in terminal equipment, and acquiring an updated target file corresponding to the original file;
    partitioning the updated target file to obtain N target partitions, wherein N is an integer greater than 1;
    according to a load balancing algorithm, distributing the N target blocks to different computing modules respectively to instruct each computing module to execute: calculating the increment data of the obtained target block and the original block, wherein the original block is the original file or a partial file of the original file;
    and obtaining each incremental data respectively returned by each calculation module, and returning each incremental data to the terminal equipment to instruct the terminal equipment to update the original file according to each incremental data.
  2. The incremental data determination method of claim 1 wherein said computing module is a computing terminal communicatively coupled to said server;
    correspondingly, according to a load balancing algorithm, the N target blocks are respectively allocated to different computing modules to instruct each computing module to execute: calculating the obtained incremental data of the target block and the original block, wherein the incremental data comprises:
    for each target block, determining a computing unit corresponding to the target block, wherein the computing unit comprises the target block and an original block, and the original block is the original file or a partial file of the original file;
    according to a load balancing algorithm, distributing the N computing units to different computing terminals respectively to instruct each computing terminal to execute: and calculating the increment data of the obtained target block in the calculating unit and the obtained original block in the calculating unit.
  3. The method for determining incremental data according to claim 2, wherein the blocking the updated target file to obtain N target blocks comprises:
    dividing the updated target file into N target blocks based on the storage sequence of the data in the updated target file, wherein each target block comprises each file with continuous storage sequence;
    correspondingly, for each target block, determining a computing unit corresponding to the target block includes:
    for each target block, determining the original file itself as the original block corresponding to the target block, and determining the target block and the original file as the computing unit corresponding to the target block.
  4. The method for determining incremental data according to claim 2, wherein the blocking the updated target file to obtain N target blocks includes:
    dividing the updated target file into N target blocks based on the file types of the files contained in the updated target file, wherein the file types of the files contained in each target block are the same;
    correspondingly, for each target block, determining a computing unit corresponding to the target block includes:
    for each target block, extracting each file corresponding to the file type in the original file based on the file type of the file contained in the target block, and determining each file as the original block corresponding to the target block;
    for each target block, the target block and an original block corresponding to the target block are determined as a calculation unit corresponding to the target block.
  5. The method according to any one of claims 2 to 4, wherein if the difference between the data operation loads of two computing terminals is smaller than a preset difference, the allocating the N computing units to different computing terminals according to the load balancing algorithm respectively comprises:
    according to the identification serial number of each computing unit, distributing each computing unit to different computing terminals respectively, wherein the identification serial number takes the value as: 1. 2 … … N;
    wherein the data operation burden is a parameter representing the operation status of the data or program of the computing terminal.
  6. The method according to any one of claims 2 to 4, wherein if the difference between the data operation loads of two computing terminals is smaller than a preset difference, the allocating the N computing units to different computing terminals according to the load balancing algorithm respectively comprises:
    determining a check value of each computing unit, and respectively allocating each computing unit to different computing terminals based on the check value of each computing unit;
    wherein the data operation burden is a parameter representing the operation status of the data or program of the computing terminal.
  7. The incremental data determination method according to any one of claims 1 to 3, wherein blocking the updated target file to obtain N target blocks includes:
    and partitioning the updated target file to obtain N target partitions, wherein at least two target partitions have cross repeated data.
  8. The incremental data determination method of any one of claims 1 to 4, wherein a file having each version identification is saved in the server;
    correspondingly, the acquiring the original file to be updated in the terminal device includes:
    acquiring the version identification of the original file to be updated in the terminal equipment and the modification times of the original file sent by the terminal equipment by a user;
    if the number of times of modification is zero, acquiring the original file to be updated indicated by the version identification from each locally stored file based on the version identification;
    and if the modification times are not zero, requesting the terminal equipment to send the original file to be updated.
  9. The method for determining incremental data according to any one of claims 1 to 4, wherein the obtaining each incremental data returned by each computing module and returning each incremental data to the terminal device includes:
    and sequentially returning each incremental data to the terminal equipment according to the calculation speed of each calculation module.
  10. An incremental data determination apparatus applied to a server, the apparatus comprising:
    the file acquisition module is used for acquiring an original file to be updated in the terminal equipment and acquiring an updated target file corresponding to the original file;
    the blocking module is used for blocking the updated target file to obtain N target blocks, wherein N is an integer greater than 1;
    the distribution module is used for distributing the N target blocks to different calculation modules respectively according to a load balancing algorithm so as to instruct each calculation module to execute: calculating the increment data of the obtained target block and the original block, wherein the original block is the original file or a partial file of the original file;
    and the increment returning module is used for acquiring each increment datum respectively returned by each calculating module and returning each increment datum to the terminal equipment so as to indicate the terminal equipment to update the original file according to each increment datum.
  11. A server comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor when executing the computer program implements the steps of:
    acquiring an original file to be updated in terminal equipment, and acquiring an updated target file corresponding to the original file;
    partitioning the updated target file to obtain N target partitions, wherein N is an integer greater than 1;
    according to a load balancing algorithm, distributing the N target blocks to different computing modules respectively to instruct each computing module to execute: calculating the increment data of the obtained target block and the original block, wherein the original block is the original file or a partial file of the original file;
    and obtaining each incremental data respectively returned by each calculation module, and returning each incremental data to the terminal equipment to instruct the terminal equipment to update the original file according to each incremental data.
  12. The server of claim 11, wherein the computing module is a computing terminal communicatively connected to the server;
    correspondingly, according to a load balancing algorithm, the N target blocks are respectively allocated to different computing modules to instruct each computing module to execute: calculating the obtained incremental data of the target block and the original block, wherein the incremental data comprises:
    for each target block, determining a computing unit corresponding to the target block, wherein the computing unit comprises the target block and an original block, and the original block is the original file or a partial file of the original file;
    according to a load balancing algorithm, distributing the N computing units to different computing terminals respectively to instruct each computing terminal to execute: and calculating the increment data of the obtained target block in the calculating unit and the obtained original block in the calculating unit.
  13. The server according to claim 12, wherein the blocking the updated target file to obtain N target blocks comprises:
    dividing the updated target file into N target blocks based on the storage sequence of the data in the updated target file, wherein each target block comprises each file with continuous storage sequence;
    correspondingly, for each target block, determining a computing unit corresponding to the target block includes:
    for each target block, determining the original file itself as the original block corresponding to the target block, and determining the target block and the original file as the computing unit corresponding to the target block.
  14. The server according to claim 12, wherein the blocking the updated target file to obtain N target blocks comprises:
    dividing the updated target file into N target blocks based on the file types of the files contained in the updated target file, wherein the file types of the files contained in each target block are the same;
    correspondingly, for each target block, determining a computing unit corresponding to the target block includes:
    for each target block, extracting each file corresponding to the file type in the original file based on the file type of the file contained in the target block, and determining each file as the original block corresponding to the target block;
    for each target block, the target block and an original block corresponding to the target block are determined as a calculation unit corresponding to the target block.
  15. The server according to any one of claims 12 to 14, wherein if a difference between data operation loads of two computing terminals is smaller than a preset difference, the allocating the N computing units to different computing terminals according to a load balancing algorithm respectively comprises:
    according to the identification serial number of each computing unit, distributing each computing unit to different computing terminals respectively, wherein the identification serial number takes the value as: 1. 2 … … N;
    wherein the data operation burden is a parameter representing the operation status of the data or program of the computing terminal.
  16. The server according to any one of claims 12 to 14, wherein if a difference between data operation loads of two computing terminals is smaller than a preset difference, the allocating the N computing units to different computing terminals according to a load balancing algorithm respectively comprises:
    determining a check value of each computing unit, and respectively allocating each computing unit to different computing terminals based on the check value of each computing unit;
    wherein the data operation burden is a parameter representing the operation status of the data or program of the computing terminal.
  17. The server according to any one of claims 11 to 13, wherein blocking the updated target file to obtain N target blocks comprises:
    and partitioning the updated target file to obtain N target partitions, wherein at least two target partitions have cross repeated data.
  18. The server according to any one of claims 11 to 14, wherein files with respective version identifications are stored in the server;
    correspondingly, the acquiring the original file to be updated in the terminal device includes:
    acquiring the version identification of the original file to be updated in the terminal equipment and the modification times of the original file sent by the terminal equipment by a user;
    if the number of times of modification is zero, acquiring the original file to be updated indicated by the version identification from each locally stored file based on the version identification;
    and if the modification times are not zero, requesting the terminal equipment to send the original file to be updated.
  19. The server according to any one of claims 11 to 14, wherein the obtaining of each incremental data returned by each computing module and returning each incremental data to the terminal device includes:
    and sequentially returning each incremental data to the terminal equipment according to the calculation speed of each calculation module.
  20. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 9.
CN201980099820.1A 2019-12-09 2019-12-09 Incremental data determining method and device, server and terminal equipment Pending CN114503076A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/124035 WO2021114025A1 (en) 2019-12-09 2019-12-09 Incremental data determination method, incremental data determination apparatus, server and terminal device

Publications (1)

Publication Number Publication Date
CN114503076A true CN114503076A (en) 2022-05-13

Family

ID=76329285

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201980099820.1A Pending CN114503076A (en) 2019-12-09 2019-12-09 Incremental data determining method and device, server and terminal equipment

Country Status (2)

Country Link
CN (1) CN114503076A (en)
WO (1) WO2021114025A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117170690A (en) * 2023-11-02 2023-12-05 湖南三湘银行股份有限公司 Distributed component management system

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113641388A (en) * 2021-08-24 2021-11-12 北京百度网讯科技有限公司 Cloud mobile phone updating method, related device and computer program product
CN114116031A (en) * 2021-11-22 2022-03-01 曙光信息产业股份有限公司 Method and device for synchronizing option parameters, computer equipment and storage medium
CN114928580B (en) * 2022-04-12 2023-06-02 深圳市优必选科技股份有限公司 Data increment transmitting method, receiving method, terminal device and storage medium
CN116894014B (en) * 2023-09-08 2024-02-27 荣耀终端有限公司 Cache updating method, server, terminal equipment and chip system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102123279B (en) * 2010-12-28 2013-01-23 乐视网信息技术(北京)股份有限公司 Distributed real-time transcoding method and system
CN104572340A (en) * 2013-10-18 2015-04-29 宇宙互联有限公司 Incremental backup system and method
CN105162855A (en) * 2015-08-18 2015-12-16 浪潮(北京)电子信息产业有限公司 Incremental data synchronization method and device
CN107506260B (en) * 2017-07-27 2019-11-05 南京南瑞集团公司 A kind of dynamic division database incremental backup method
CN107835206A (en) * 2017-09-19 2018-03-23 平安普惠企业管理有限公司 Data-updating method, server and computer-readable recording medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117170690A (en) * 2023-11-02 2023-12-05 湖南三湘银行股份有限公司 Distributed component management system
CN117170690B (en) * 2023-11-02 2024-03-22 湖南三湘银行股份有限公司 Distributed component management system

Also Published As

Publication number Publication date
WO2021114025A1 (en) 2021-06-17

Similar Documents

Publication Publication Date Title
CN114503076A (en) Incremental data determining method and device, server and terminal equipment
CN109213600B (en) GPU resource scheduling method and device based on AI cloud
CN112667405B (en) Information processing method, device, equipment and storage medium
CN112269661B (en) Partition migration method and device based on Kafka cluster
CN108243254B (en) Electronic device, method for releasing application upgrading version and storage medium
US10133688B2 (en) Method and apparatus for transmitting information
CN112631994A (en) Data migration method and system
CN112667270A (en) Voice processing resource updating method, computer equipment and storage device
CN111190548A (en) SPDK-based ceph distributed storage performance improving method, device and equipment
CN112860506A (en) Monitoring data processing method, device, system and storage medium
CN109614242B (en) Computing capacity sharing method, device, equipment and medium
CN114443629A (en) Cluster bloom filter data duplication removing method, terminal equipment and storage medium
CN112269665A (en) Memory processing method and device, electronic equipment and storage medium
CN113760876A (en) Data filtering method and device
CN109062702B (en) Computing resource allocation method, related device and readable storage medium
CN109614386B (en) Data processing method, device, server and computer readable storage medium
CN113760940A (en) Quota management method, device, equipment and medium applied to distributed system
CN113051077A (en) User request processing method and device, terminal equipment and storage medium
CN112131257A (en) Data query method and device
CN111177478A (en) Query method, device and system
WO2018067047A1 (en) Method and module for assigning task to server entity
CN112948106B (en) Task allocation method and device
CN115103020B (en) Data migration processing method and device
CN117806571B (en) Cloud host I/O parameter value determining method, computer equipment and cloud platform thereof
CN111679909B (en) Data processing method and device and terminal equipment

Legal Events

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