WO2021081758A1 - 数据更新方法、装置、终端设备及计算机可读存储介质 - Google Patents
数据更新方法、装置、终端设备及计算机可读存储介质 Download PDFInfo
- Publication number
- WO2021081758A1 WO2021081758A1 PCT/CN2019/114031 CN2019114031W WO2021081758A1 WO 2021081758 A1 WO2021081758 A1 WO 2021081758A1 CN 2019114031 W CN2019114031 W CN 2019114031W WO 2021081758 A1 WO2021081758 A1 WO 2021081758A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- update
- file
- data
- temporary
- downloaded
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
Definitions
- This application relates to the field of data update technology, and specifically to data update methods, devices, terminal equipment, and computer-readable storage media.
- Application distribution software (such as a software store) has two main functions, supporting new downloads of undownloaded applications and updates of installed applications.
- the update can be implemented in two ways: one is active update, and the other is automatic update.
- Active update means that the user actively starts the application distribution software, which starts the update process by clicking the update button; while automatic update does not require user interaction, as long as the user sets the automatic update switch, the system will regularly check whether the application on the terminal device is updated. If there is an update, it will automatically initiate a download and update.
- One of the objectives of the embodiments of the present application is to provide a data update method, device, terminal device, and computer-readable storage medium, which are designed to solve the problem of data traffic waste of CDN caused by the existing update method when updating applications, and user update consumption. Time increase the problem.
- a data update method including:
- the data is updated according to the downloaded update file.
- a data update device including:
- the active update request receiving unit is configured to, if an active update request is received when the automatic update operation is performed, verify the temporary file obtained by performing the automatic update operation, and all data of the temporary file is part of the data of the update file;
- a unit for determining the address of the initial data configured to determine the address of the initial data to be downloaded in the update file according to the data included in the temporary file if the verification is passed;
- the update file resuming unit is configured to continue to download the corresponding data from the source address where the update file is stored according to the starting data to be downloaded at the address of the update file, so as to realize the resuming of the update file;
- the data update unit is configured to update the data according to the downloaded update file if the resuming of the update file is successful.
- a terminal device including a memory, a processor, and a computer program that is stored in the memory and can run on the processor, and the processor implements the following steps when the processor executes the computer program:
- the data is updated according to the downloaded update file.
- a computer-readable storage medium stores a computer program, and the computer program implements the method according to any one of the first aspects when the computer program is executed by a processor.
- a computer program product which when the computer program product runs on a terminal device, causes the terminal device to execute the method described in the above-mentioned first aspect.
- FIG. 1 is a flowchart of a data update method provided by an embodiment of the present application
- FIG. 2 is a schematic structural diagram of a data update device provided by another embodiment of the present application.
- FIG. 3 is a schematic structural diagram of a terminal device provided by another embodiment of the present application.
- the term “if” can be construed as “when” or “once” or “in response to determination” or “in response to detecting “.
- the phrase “if determined” or “if detected [described condition or event]” can be interpreted as meaning “once determined” or “in response to determination” or “once detected [described condition or event]” depending on the context ]” or “in response to detection of [condition or event described]”.
- the data update method provided in the embodiments of the present application is mainly applied to scenarios when active update and automatic update overlap. For example, if there is an update file for application A of the server, a logo that needs to be updated will appear on application A installed on the terminal device. If the application A is an automatic update application set by the user, the software store of the terminal device will automatically download it in the background The update file of this application A.
- the user manually initiates an active update request, firstly verify the partial update file that has been downloaded-that is, the temporary file, and if the verification passes, then the temporary file Download the undownloaded update file, therefore, there is no need to re-download the downloaded temporary file, thereby reducing the traffic overhead of the CDN and the user, and reducing the update time for the user to actively update the application A.
- FIG. 1 shows a flowchart of a data update method provided by an embodiment of the present application, and the details are as follows:
- Step S11 if an active update request is received when the automatic update operation is performed, the temporary file obtained by performing the automatic update operation is verified, and all the data of the temporary file is part of the data of the update file;
- the application interface installed on the terminal device displays "update", or displays other identifiers for indicating update, it indicates that the application corresponding to the application interface needs to be updated.
- the update operation is automatically performed to obtain the update file corresponding to the application by means of automatic update, and the update file is stored in the server.
- the update file corresponding to the application is automatically obtained, if the user sends an active update request, the active update request is responded to, and the obtained temporary file is verified.
- the verification here is mainly to verify the integrity of temporary files.
- step S12 if the verification is passed, it is determined according to the data included in the temporary file that the starting data to be downloaded is at the address of the update file;
- the data length L1 of the temporary file that passed the verification is determined, and the address of the last bit of data in the data string with the data length of L1+1 is taken as the address to be downloaded
- the starting data is at the address of the update file. For example, assuming that the data of the update file is 1111000 and the data of the temporary file is 1111, the address where the "0" in "11110" is located is used as the address of the starting data to be downloaded in the update file.
- Step S13 according to the address where the starting data to be downloaded is in the update file, continue to download the corresponding data from the source address where the update file is stored, so as to realize the continuation of the update file;
- the source address for storing the update file can be preset, or, in order to further ensure the accuracy of the source address of the obtained update file, the update file can be obtained first when the automatic update operation is performed and before the temporary file is automatically obtained.
- Source address in this way, before downloading data in the active update mode, the source address of the update file obtained through the automatic update method is first obtained, and then the corresponding data is downloaded from the source address of the update file.
- step S14 if the resuming of the update file is successful, the data is updated according to the downloaded update file.
- the data of the corresponding application is updated according to the update file.
- the address of the initial data to be downloaded in the update file is determined according to the data included in the temporary file, and the temporary file is obtained by performing an automatic update operation, after receiving the active update request, According to the address where the starting data to be downloaded is in the update file, continue to download the corresponding data from the source address where the update file is stored, which is equivalent to changing the update mode from automatic update to active update.
- you can continue to download the undownloaded part of the update file which eliminates the need to re-download the downloaded temporary file, reduces the traffic overhead of the CDN and the user, and reduces the update time for the user to actively update the application A.
- the method includes:
- the number of the check value is greater than or equal to 2, and the number of the check value is equal to that of the The number of paragraphs divided by the update file is the same; among them, at least two check values corresponding to at least two paragraphs obtained by dividing the update file are used as check values for checking the temporary file.
- the verification of the temporary file obtained by performing the automatic update operation in the step S11 specifically includes:
- segment the temporary file obtained by performing the automatic update operation according to the length value specifically, segment the data included in the temporary file according to the length value of the paragraph obtained by dividing the update file. It should be pointed out that if different paragraphs of the updated file correspond to different length values, in the process of segmenting the temporary file, it is necessary to determine the sequence of the corresponding length values based on the sequence of the paragraphs obtained by dividing the updated file. . It should be pointed out that if the data length of the remaining unsegmented data of the temporary file is less than the data length of the corresponding sequential paragraphs divided by the update file, the remaining unsegmented data of the temporary file is discarded.
- the temporary file is segmented into data whose data length is equal to "111".
- the temporary file also includes other data, continue to segment the data with data length equal to "10" from the temporary file. If the temporary file has no other data, stop the segmentation. If the temporary file still has data remaining, but the remaining data If the data length is less than the data length corresponding to "00", the remaining data of the temporary file is discarded.
- the segmented data of the temporary file is verified according to the check values of different paragraphs.
- the first paragraph data of the temporary file is calculated according to the MD5 algorithm to obtain the corresponding MD5 value, and the MD5 value is compared with Compare the MD5 value corresponding to the first paragraph of the update file. If they are the same, it indicates that the data of the first paragraph of the temporary file has passed the verification; if they are not the same, it indicates that the data of the first paragraph of the temporary file has not passed the verification.
- step S12 specifically includes:
- segment verification part determines the address of the update file for the starting data to be downloaded according to the data of the first segment that fails the verification included in the temporary file. Specifically, if the segment verification is partially passed and partially failed, then only the data of the first paragraph that fails the verification (usually only the last data is needed) determines the address of the update file for the starting data to be downloaded. In some embodiments, in order to improve the verification speed, if it is determined that a certain paragraph fails the verification, the other paragraphs after the certain paragraph in the temporary file are no longer verified.
- the obtaining the check value used to check the temporary file and the length value of the paragraph obtained by dividing the update file in advance specifically includes:
- the check value for verification in order to obtain the check value for verification in time, when the automatic update starts, first obtain the check value for verifying the temporary file and the length of the paragraph obtained by dividing the update file in advance. Value, the temporary file for update will be obtained later.
- the check value and length value used for verification are acquired at the beginning of the automatic update, it can be ensured that the acquired check value and length value are both up to date, thereby ensuring the accuracy of the verification.
- the data update method further includes:
- verification can be performed on all paragraphs of the temporary file, and then it is determined whether the verification of all paragraphs fails.
- the source address of the stored update file can be obtained first, and then the update file can be re-downloaded according to the source address of the stored update file. It should be pointed out that if the update file is re-downloaded according to the source address of the stored update file, the re-downloaded update file is verified. If the verification fails, it indicates that there may be a problem with the source address of the update file.
- the terminal device will initiate a request to the server to obtain the source address of the stored update file to obtain the source address of the new update file, and then execute the re-download of the update file according to the source address of the new update file.
- the update file obtained by performing the automatic update operation is stored in the first folder, and the update file obtained by performing the active update operation is stored in the second folder, in order to ensure the accuracy of the storage address of the downloaded update file , After the verification is passed, including:
- the temporary file can be copied from the first folder to the second folder, and then the initial data to be downloaded is determined in the update according to the data included in the temporary file.
- the address of the file; or, after the verification is passed, it is determined that the starting data to be downloaded is at the address of the update file according to the data included in the temporary file, and then the temporary file is copied from the first folder to the second file Folder, there is no limitation here.
- the action of copying temporary files will occupy certain system resources. Therefore, in order to save system resources, the temporary file is executed only when the attributes of the first folder and the second folder are specific attributes.
- the file copy operation. At this time, the copying the temporary file from the first folder to the second folder includes:
- the attribute of the first folder is hidden, and the attribute of the second folder is displayed, that is, the update file downloaded by the terminal device through automatic update is invisible to the user after being stored in the first folder, but through active
- the update file downloaded in the update mode is visible to the user after it is stored in the second folder.
- the temporary file is copied from the first folder to the second folder.
- the method in order to determine whether the resuming of the update file is successful, before the step S14, the method includes:
- step S14 is specifically:
- the data update is implemented according to the downloaded update file.
- the size of the updated file after resuming is used to determine whether the resuming of the update file is successful. If the size of the resuming update file is equal to the standard size of the pre-obtained update file, it indicates that the resuming of the update file is successful. .
- the standard size of the update file can be obtained when the automatic update operation is performed and before the temporary file is automatically obtained. In this way, it can ensure that the standard size of the latest update file is obtained, thereby helping to improve the accuracy of judging whether the resuming is successful. Sex.
- the update file whose resuming is successful is verified. At this time, if the size of the resuming update file is the same as the size of the update file obtained in advance. If the standard size is equal, the data will be updated according to the downloaded update file, including:
- the size of the updated file after the resuming is equal to the standard size of the update file obtained in advance, the updated file after the resuming is checked, and if the check is passed, the data is updated according to the downloaded update file.
- the MD5 value corresponding to all the data included in the update file in the server can be used to verify the update file after the resuming is successful. Specifically, the MD5 value corresponding to the update file after the resuming is calculated, and then the The MD5 value corresponding to the update file after the resuming is successfully compared with the MD5 value corresponding to all the data included in the update file in the server, if the two are equal, the verification is passed, and if the two are not equal, the verification is not passed.
- the update file after the resuming transfer is successfully divided into segments, so that the number of paragraphs after segmentation and the data length of each paragraph are the same as the number of paragraphs divided into the update file stored in the server in advance and the corresponding paragraph.
- the data lengths are equal, and then the paragraphs divided by the updated file after the resuming transfer are verified separately.
- the starting data to be downloaded is determined at the address of the update file, and then the update stored from the server is updated according to the address. Download the corresponding data in the file.
- the method includes:
- the ratio value is determined according to the ratio of the temporary file and the updated file obtained by performing the automatic update operation; and the ratio value is displayed.
- the size of the update file needs to be obtained in advance. Specifically, the size of the temporary file is determined, and the size of the temporary file is compared with the size of the update file obtained in advance to obtain the ratio of the temporary file to the update file. In this embodiment, by displaying the ratio value, the user is informed of the download progress of the current update file.
- the method includes:
- the temporary file obtained by performing the automatic update operation is verified. Otherwise, continue to download the update file through the automatic update method.
- FIG. 2 shows a schematic structural diagram of a data update device provided in an embodiment of the present application. For ease of description, only the parts related to the embodiment of the present application are shown.
- the data update device 2 includes: an active update request receiving unit 21, a starting data address determination unit 22, an update file resuming unit 23, and a data update unit 24. among them:
- the active update request receiving unit 21 is configured to, if an active update request is received when the automatic update operation is performed, verify the temporary file obtained by performing the automatic update operation, and all the data of the temporary file is part of the data of the update file ;
- the application interface installed on the terminal device displays "update", or displays other identifiers for indicating update, it indicates that the application corresponding to the application interface needs to be updated. If the application is set to be automatically updated, an update operation is automatically performed to obtain an update file corresponding to the application in an automatic update manner, and the update file is stored in the server.
- the initial data address determining unit 22 is configured to, if the verification is passed, determine the address of the initial data to be downloaded in the update file according to the data included in the temporary file;
- the update file resuming unit 23 is configured to continue to download the corresponding data from the source address where the update file is stored according to the address of the update file in the starting data to be downloaded, so as to realize the resuming of the update file. ;
- the source address for storing the update file can be preset, or, in order to further ensure the accuracy of the source address of the obtained update file, the update file can be obtained first when the automatic update operation is performed and before the temporary file is automatically obtained. source address.
- the data update unit 24 is configured to update the data according to the downloaded update file if the resuming of the update file is successful.
- the address of the initial data to be downloaded in the update file is determined according to the data included in the temporary file, and the temporary file is obtained by performing an automatic update operation, after receiving the active update request, According to the address where the starting data to be downloaded is in the update file, continue to download the corresponding data from the source address where the update file is stored, which is equivalent to changing the update mode from automatic update to active update.
- you can continue to download the undownloaded part of the update file which eliminates the need to re-download the downloaded temporary file, reduces the traffic overhead of the CDN and the user, and reduces the update time for the user to actively update the application A.
- the data update device 2 includes:
- the check value acquisition unit is used to obtain the check value used to check the temporary file and the length value of the paragraph obtained by dividing the update file in advance, the number of the check value is greater than or equal to 2, and the The number of check values is the same as the number of paragraphs divided by the update file;
- the active update request receiving unit 21 verifies the temporary file obtained by performing the automatic update operation, which is specifically used for:
- Segment the temporary file obtained by performing an automatic update operation according to the length value; perform segment verification on the segmented temporary file according to the verification value;
- the check value can be an MD5 value.
- the address determining unit 22 of the initial data is specifically configured to:
- the data to be downloaded in the update file is determined based on the data of the last paragraph included in the temporary file; if the segment verification partially passes, then the data to be downloaded in the update file is determined based on the first paragraph included in the temporary file. The data of the paragraphs that failed the check determine the data to be downloaded in the update file.
- the address of the update file is determined based on the data of the last paragraph included in the temporary file (usually only the last data is required). If the segment verification partially passes and partially fails, then only the data of the first paragraph that fails the verification (usually only the last data is needed) determines the address of the update file for the starting data to be downloaded. In some embodiments, in order to improve the verification speed, if it is determined that a certain paragraph fails the verification, the other paragraphs after the certain paragraph in the temporary file are no longer verified.
- the check value obtaining unit specifically includes:
- the data update device further includes:
- the temporary file acquisition unit is used to automatically acquire temporary files.
- the data update device further includes:
- the update file re-downloading unit is configured to delete the temporary file and download the update file again if all the segment checks fail.
- verification can be performed on all paragraphs of the temporary file, and then it is determined whether the verification of all paragraphs fails.
- the source address of the stored update file can be obtained first, and then the update file can be re-downloaded according to the source address of the stored update file. It should be pointed out that if the update file is re-downloaded according to the source address of the stored update file, the re-downloaded update file is verified. If the verification fails, it indicates that there may be a problem with the source address of the update file.
- the terminal device will initiate a request to the server to obtain the source address of the stored update file to obtain the source address of the new update file, and then execute the re-download of the update file according to the source address of the new update file.
- the data update device further includes:
- the temporary file copying unit is configured to copy the temporary file from the first folder to the second folder.
- the action of copying temporary files will occupy certain system resources. Therefore, in order to save system resources, the temporary file is executed only when the attributes of the first folder and the second folder are specific attributes. File copy operation. At this time, the temporary file copy unit is specifically used for:
- the data update apparatus in order to determine whether the resuming of the update file is successful, the data update apparatus further includes:
- the size comparison unit is used to compare the size of the updated file after resuming the upload with the standard size of the updated file obtained in advance;
- the data update unit is specifically configured to:
- the data update is implemented according to the downloaded update file.
- the standard size of the update file can be obtained when the automatic update operation is performed and before the temporary file is automatically obtained. In this way, it can ensure that the standard size of the latest update file is obtained, thereby helping to improve the accuracy of judging whether the resuming is successful. Sex.
- the data update unit 24 is specifically configured to:
- the size of the updated file after the resuming is equal to the standard size of the update file obtained in advance, the updated file after the resuming is checked, and if the check is passed, the data is updated according to the downloaded update file.
- the MD5 value corresponding to all the data included in the update file in the server can be used to verify the update file after the resuming is successful. Specifically, the MD5 value corresponding to the update file after the resuming is calculated, and then the The MD5 value corresponding to the update file after the resuming is successfully compared with the MD5 value corresponding to all the data included in the update file in the server, if the two are equal, the verification is passed, and if the two are not equal, the verification is not passed.
- the update file after the resuming transfer is successfully divided into segments, so that the number of paragraphs after segmentation and the data length of each paragraph are the same as the number of paragraphs divided into the update file stored in the server in advance and the corresponding paragraph.
- the data lengths are equal, and then the paragraphs divided by the updated file after the resuming transfer are verified separately.
- the starting data to be downloaded is determined at the address of the update file, and then the update stored from the server is updated according to the address. Download the corresponding data in the file.
- the data update apparatus in order to facilitate the user to know that the download of the update file is currently being performed by means of automatic update, the data update apparatus further includes:
- the scale value display unit is used to determine the scale value according to the scale of the temporary file and the updated file obtained by performing the automatic update operation; and display the scale value.
- the data update apparatus in order to facilitate the user to know that the download of the update file is currently being performed by means of automatic update, the data update apparatus further includes:
- the update mode switch prompt unit is used to display the information currently being automatically updated and prompt the user to confirm whether to switch from the automatic update mode to the active update mode.
- the temporary file obtained by performing the automatic update operation is verified. Otherwise, continue to download the update file through automatic update.
- Fig. 3 is a schematic diagram of a terminal device provided by an embodiment of the present application.
- the terminal device 3 of this embodiment includes: a processor 30, a memory 31, and a computer program 32 stored in the memory 31 and running on the processor 30.
- the processor 30 implements the steps in the foregoing method embodiments when the computer program 32 is executed, for example, steps S11 to S14 shown in FIG. 1.
- the processor 30 executes the computer program 32, the functions of the modules/units in the foregoing device embodiments, for example, the functions of the modules 21 to 24 shown in FIG. 2 are realized.
- the computer program 32 may be divided into one or more modules/units, and the one or more modules/units are stored in the memory 31 and executed by the processor 30 to complete This application.
- the one or more modules/units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 32 in the terminal device 3.
- the computer program 32 can be divided into an active update request receiving unit, a starting data address determination unit, an update file retransmission unit, and a data update unit.
- the specific functions of each unit are as follows:
- the active update request receiving unit is configured to, if an active update request is received when the automatic update operation is performed, verify the temporary file obtained by performing the automatic update operation, and all the data of the temporary file is part of the data of the update file;
- a unit for determining the address of the initial data configured to determine the address of the initial data to be downloaded in the update file according to the data included in the temporary file if the verification is passed;
- the update file resuming unit is configured to continue to download the corresponding data from the source address where the update file is stored according to the starting data to be downloaded at the address of the update file, so as to realize the resuming of the update file;
- the data update unit is configured to update the data according to the downloaded update file if the resuming of the update file is successful.
- the terminal device 3 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
- the terminal device may include, but is not limited to, a processor 30 and a memory 31.
- FIG. 3 is only an example of the terminal device 3, and does not constitute a limitation on the terminal device 3. It may include more or less components than shown in the figure, or a combination of certain components, or different components.
- the terminal device may also include input and output devices, network access devices, buses, and the like.
- the so-called processor 30 may be a central processing unit (Central Processing Unit, CPU), other general processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
- the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
- the memory 31 may be an internal storage unit of the terminal device 3, such as a hard disk or a memory of the terminal device 3.
- the memory 31 may also be an external storage device of the terminal device 3, such as a plug-in hard disk equipped on the terminal device 3, a smart memory card (Smart Media Card, SMC), and a Secure Digital (SD) Card, Flash Card, etc. Further, the memory 31 may also include both an internal storage unit of the terminal device 3 and an external storage device.
- the memory 31 is used to store the computer program and other programs and data required by the terminal device.
- the memory 31 can also be used to temporarily store data that has been output or will be output.
- the disclosed device/terminal device and method may be implemented in other ways.
- the device/terminal device embodiments described above are merely illustrative.
- the division of the modules or units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units.
- components can be combined or integrated into another system, or some features can be omitted or not implemented.
- the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
- the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
- the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
- the integrated 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.
- the present application implements all or part of the processes in the above-mentioned embodiments and methods, and can also be completed by instructing relevant hardware through a computer program.
- the computer program can be stored in a computer-readable storage medium. When the program is executed by the processor, it can implement the steps of the foregoing method embodiments.
- the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate forms.
- the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electrical carrier signal, telecommunications signal, and software distribution media, etc.
- ROM Read-Only Memory
- RAM Random Access Memory
- electrical carrier signal telecommunications signal
- software distribution media etc.
- the content contained in the computer-readable medium can be appropriately added or deleted according to the requirements of the legislation and patent practice in the jurisdiction.
- the computer-readable medium Does not include electrical carrier signals and telecommunication signals.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
Description
Claims (20)
- 一种数据更新方法,其特征在于,包括:若在执行自动更新操作时接收到主动更新请求,则对通过执行自动更新操作得到的临时文件进行校验,所述临时文件的全部数据为更新文件的部分数据;若校验通过,则根据所述临时文件包括的数据确定将要下载的起始数据在所述更新文件的地址;根据所述将要下载的起始数据在所述更新文件的地址,从存储所述更新文件的源地址继续下载对应的数据,以实现所述更新文件的续传;若所述更新文件续传成功,则根据下载后的更新文件实现数据的更新。
- 如权利要求1所述的数据更新方法,其特征在于,在所述若在执行自动更新操作时接收到主动更新请求,则对通过执行自动更新操作得到的临时文件进行校验之前,包括:获取用于对临时文件进行校验的校验值以及预先对更新文件划分得到的段落的长度值,所述校验值的个数大于或等于2,且所述校验值的数量与所述更新文件划分的段落个数相同;对应地,所述对通过执行自动更新操作得到的临时文件进行校验,具体包括:根据所述长度值对通过执行自动更新操作得到的临时文件分段;根据所述校验值对分段后的所述临时文件进行分段校验;对应地,所述若校验通过,则根据所述临时文件包括的数据确定将要下载的起始数据在所述更新文件的地址,具体包括:若分段校验全部通过,则根据所述临时文件包括的最后一个段落的数据确定将要在所述更新文件下载的数据;若分段校验部分通过,则根据所述临时文件包括的第一个校验不通过的段落的数据确定将要在所述更新文件下载的数据。
- 如权利要求2所述的数据更新方法,其特征在于,所述获取用于对临时文件进行校验的校验值以及预先对更新文件划分得到的段落的长度值,具体包括:若检测到存在更新文件且更新方式为自动更新,则自动获取用于对临时文件进行校验的校验值以及预先对更新文件划分得到的段落的长度值;在所述自动获取用于对临时文件进行校验的校验值以及预先对更新文件划分得到的段落的长度值之后,包括:自动获取临时文件。
- 如权利要求2所述的数据更新方法,其特征在于,所述数据更新方法还包括:若分段校验全部不通过,则删除所述临时文件,重新下载所述更新文件。
- 如权利要求1所述的数据更新方法,其特征在于,若执行自动更新操作得到的更新文件存储在第一文件夹,执行主动更新操作得到的更新文件存储在第二文件夹,则在所述若校验通过之后,包括:将所述临时文件从所述第一文件夹拷贝至所述第二文件夹。
- 如权利要求5所述的数据更新方法,其特征在于,所述将所述临时文件从所述第一文件夹拷贝至所述第二文件夹,包括:若所述第一文件夹的属性为隐藏,所述第二文件夹的属性为显示,则将所述临时文件从所述第一文件夹拷贝至所述第二文件夹。
- 如权利要求1所述的数据更新方法,其特征在于,在所述若所述更新文件续传成功,则根据下载后的更新文件实现数据的更新之前,包括:将续传后的更新文件的大小与预先获取的更新文件的标准大小比较;对应地,所述若所述更新文件续传成功,则根据下载后的更新文件实现数据的更新,具体为:若续传后的更新文件的大小与预先获取的更新文件的标准大小相等,则根据下载后的更新文件实现数据的更新。
- 如权利要求7所述的数据更新方法,其特征在于,所述若续传后的更新文件的大小与预先获取的更新文件的标准大小相等,则根据下载后的更新文件实现数据的更新,包括:若续传后的更新文件的大小与预先获取的更新文件的标准大小相等,则对续传后的更新文件进行校验,若校验通过,则根据下载后的更新文件实现数据的更新。
- 如权利要求1所述的数据更新方法,其特征在于,在所述接收到主动更新请求之后,包括:根据通过执行自动更新操作得到的临时文件与更新文件的比例确定比例值;显示所述比例值。
- 一种数据更新装置,其特征在于,包括:主动更新请求接收单元,用于若在执行自动更新操作时接收到主动更新请求,则对通过执行自动更新操作得到的临时文件进行校验,所述临时文件的全部数据为更新文件的部分数据;起始数据的地址确定单元,用于若校验通过,则根据所述临时文件包括的数据确定将 要下载的起始数据在所述更新文件的地址;更新文件续传单元,用于根据所述将要下载的起始数据在所述更新文件的地址,从存储所述更新文件的源地址继续下载对应的数据,以实现所述更新文件的续传;数据更新单元,用于若所述更新文件续传成功,则根据下载后的更新文件实现数据的更新。
- 一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现以下步骤:若在执行自动更新操作时接收到主动更新请求,则对通过执行自动更新操作得到的临时文件进行校验,所述临时文件的全部数据为更新文件的部分数据;若校验通过,则根据所述临时文件包括的数据确定将要下载的起始数据在所述更新文件的地址;根据所述将要下载的起始数据在所述更新文件的地址,从存储所述更新文件的源地址继续下载对应的数据,以实现所述更新文件的续传;若所述更新文件续传成功,则根据下载后的更新文件实现数据的更新。
- 如权利要求11所述的终端设备,其特征在于,在所述若在执行自动更新操作时接收到主动更新请求,则对通过执行自动更新操作得到的临时文件进行校验之前,包括:获取用于对临时文件进行校验的校验值以及预先对更新文件划分得到的段落的长度值,所述校验值的个数大于或等于2,且所述校验值的数量与所述更新文件划分的段落个数相同;对应地,所述对通过执行自动更新操作得到的临时文件进行校验,具体包括:根据所述长度值对通过执行自动更新操作得到的临时文件分段;根据所述校验值对分段后的所述临时文件进行分段校验;对应地,所述若校验通过,则根据所述临时文件包括的数据确定将要下载的起始数据在所述更新文件的地址,具体包括:若分段校验全部通过,则根据所述临时文件包括的最后一个段落的数据确定将要在所述更新文件下载的数据;若分段校验部分通过,则根据所述临时文件包括的第一个校验不通过的段落的数据确定将要在所述更新文件下载的数据。
- 如权利要求12所述的终端设备,其特征在于,所述获取用于对临时文件进行校验的校验值以及预先对更新文件划分得到的段落的长度值,具体包括:若检测到存在更新文件且更新方式为自动更新,则自动获取用于对临时文件进行校验 的校验值以及预先对更新文件划分得到的段落的长度值;在所述自动获取用于对临时文件进行校验的校验值以及预先对更新文件划分得到的段落的长度值之后,包括:自动获取临时文件。
- 如权利要求12所述的终端设备,其特征在于,所述处理器执行所述计算机程序时还包括执行以下步骤:若分段校验全部不通过,则删除所述临时文件,重新下载所述更新文件。
- 如权利要求11所述的终端设备,其特征在于,若执行自动更新操作得到的更新文件存储在第一文件夹,执行主动更新操作得到的更新文件存储在第二文件夹,则在所述若校验通过之后,包括:将所述临时文件从所述第一文件夹拷贝至所述第二文件夹。
- 如权利要求15所述的终端设备,其特征在于,所述将所述临时文件从所述第一文件夹拷贝至所述第二文件夹,包括:若所述第一文件夹的属性为隐藏,所述第二文件夹的属性为显示,则将所述临时文件从所述第一文件夹拷贝至所述第二文件夹。
- 如权利要求11所述的终端设备,其特征在于,在所述若所述更新文件续传成功,则根据下载后的更新文件实现数据的更新之前,包括:将续传后的更新文件的大小与预先获取的更新文件的标准大小比较;对应地,所述若所述更新文件续传成功,则根据下载后的更新文件实现数据的更新,具体为:若续传后的更新文件的大小与预先获取的更新文件的标准大小相等,则根据下载后的更新文件实现数据的更新。
- 如权利要求17所述的终端设备,其特征在于,所述若续传后的更新文件的大小与预先获取的更新文件的标准大小相等,则根据下载后的更新文件实现数据的更新,包括:若续传后的更新文件的大小与预先获取的更新文件的标准大小相等,则对续传后的更新文件进行校验,若校验通过,则根据下载后的更新文件实现数据的更新。
- 如权利要求11所述的终端设备,其特征在于,在所述接收到主动更新请求之后,包括:根据通过执行自动更新操作得到的临时文件与更新文件的比例确定比例值;显示所述比例值。
- 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征 在于,所述计算机程序被处理器执行时实现如权利要求1至9任一项所述的方法。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2019/114031 WO2021081758A1 (zh) | 2019-10-29 | 2019-10-29 | 数据更新方法、装置、终端设备及计算机可读存储介质 |
CN201980099526.0A CN114258525A (zh) | 2019-10-29 | 2019-10-29 | 数据更新方法、装置、终端设备及计算机可读存储介质 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2019/114031 WO2021081758A1 (zh) | 2019-10-29 | 2019-10-29 | 数据更新方法、装置、终端设备及计算机可读存储介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021081758A1 true WO2021081758A1 (zh) | 2021-05-06 |
Family
ID=75715704
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/114031 WO2021081758A1 (zh) | 2019-10-29 | 2019-10-29 | 数据更新方法、装置、终端设备及计算机可读存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN114258525A (zh) |
WO (1) | WO2021081758A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114968312A (zh) * | 2022-07-12 | 2022-08-30 | 紫光同芯微电子有限公司 | 用于变更智能卡cap文件的方法、装置及系统 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101316256A (zh) * | 2007-05-28 | 2008-12-03 | 微码(北京)移动技术有限公司 | 一种数据更新的方法 |
WO2009140813A1 (zh) * | 2008-05-23 | 2009-11-26 | 中兴通讯股份有限公司 | 实现断点续传的文件下载的方法、系统及终端 |
CN105260202A (zh) * | 2015-09-15 | 2016-01-20 | 中国联合网络通信集团有限公司 | 一种客户端文件更新方法和系统 |
CN105487894A (zh) * | 2015-11-27 | 2016-04-13 | 浪潮软件集团有限公司 | 一种分布式软件系统的远程更新方法 |
CN108920621A (zh) * | 2018-06-28 | 2018-11-30 | 努比亚技术有限公司 | 数据更新方法、移动终端及计算机可读存储介质 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104363271B (zh) * | 2014-10-28 | 2018-01-16 | 广东欧珀移动通信有限公司 | 文件断点续传方法及装置 |
CN109391673B (zh) * | 2018-04-16 | 2021-01-05 | 深圳思为科技有限公司 | 一种管理更新文件的方法、系统及终端设备 |
-
2019
- 2019-10-29 WO PCT/CN2019/114031 patent/WO2021081758A1/zh active Application Filing
- 2019-10-29 CN CN201980099526.0A patent/CN114258525A/zh active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101316256A (zh) * | 2007-05-28 | 2008-12-03 | 微码(北京)移动技术有限公司 | 一种数据更新的方法 |
WO2009140813A1 (zh) * | 2008-05-23 | 2009-11-26 | 中兴通讯股份有限公司 | 实现断点续传的文件下载的方法、系统及终端 |
CN105260202A (zh) * | 2015-09-15 | 2016-01-20 | 中国联合网络通信集团有限公司 | 一种客户端文件更新方法和系统 |
CN105487894A (zh) * | 2015-11-27 | 2016-04-13 | 浪潮软件集团有限公司 | 一种分布式软件系统的远程更新方法 |
CN108920621A (zh) * | 2018-06-28 | 2018-11-30 | 努比亚技术有限公司 | 数据更新方法、移动终端及计算机可读存储介质 |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114968312A (zh) * | 2022-07-12 | 2022-08-30 | 紫光同芯微电子有限公司 | 用于变更智能卡cap文件的方法、装置及系统 |
Also Published As
Publication number | Publication date |
---|---|
CN114258525A (zh) | 2022-03-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108037946B (zh) | 一种应用程序热更新的方法、系统及服务器 | |
US11741046B2 (en) | Method and apparatus for creating system disk snapshot of virtual machine | |
US9244673B2 (en) | System and method for updating application archive files | |
US7698223B2 (en) | Pluggable file-based digital rights management API layer for applications and engines | |
WO2018049888A1 (zh) | 应用数据的迁移方法及装置 | |
US20030121033A1 (en) | Installing software on a mobile computing device using the rollback and security features of a configuration manager | |
US6564232B1 (en) | Method and apparatus for managing distribution of change-controlled data items in a distributed data processing system | |
CN110162429B (zh) | 系统修复方法、服务器及存储介质 | |
US20190005031A1 (en) | Accessing cloud based document libraries over unreliable networks | |
CN107656750A (zh) | 插件更新方法及装置 | |
WO2021081758A1 (zh) | 数据更新方法、装置、终端设备及计算机可读存储介质 | |
CN114780019A (zh) | 电子设备的管理方法、装置、电子设备及存储介质 | |
CN111176685A (zh) | 一种升级方法及装置 | |
CN106775835B (zh) | 获取升级文件的方法、服务器及终端 | |
CN110795495A (zh) | 数据处理方法、装置、电子设备及计算机可读介质 | |
CN112486546A (zh) | 一种sqlite数据库升级方法、装置、终端及系统 | |
CN106569841B (zh) | 一种文件加载方法和装置 | |
CN115086047B (zh) | 接口鉴权方法、装置、电子设备及存储介质 | |
TWI716969B (zh) | 經由資料塊段之復原影像下載技術 | |
CN109582330B (zh) | 数据模型升级方法、装置、设备及可读存储介质 | |
CN111367898A (zh) | 数据处理方法、装置、系统、电子设备及存储介质 | |
CN115314382B (zh) | 配置信息处理方法 | |
CN110096285A (zh) | 软件系统的部署方法、装置、计算机设备及存储介质 | |
CN117235609B (zh) | Bim构件的归纳分类方法、装置、设备及介质 | |
WO2021128269A1 (zh) | 文件处理方法、文件处理装置、移动终端及服务器 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19950684 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19950684 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 181022) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19950684 Country of ref document: EP Kind code of ref document: A1 |