WO2019071858A1 - 一种更新文件的方法、装置和设备 - Google Patents

一种更新文件的方法、装置和设备 Download PDF

Info

Publication number
WO2019071858A1
WO2019071858A1 PCT/CN2017/120167 CN2017120167W WO2019071858A1 WO 2019071858 A1 WO2019071858 A1 WO 2019071858A1 CN 2017120167 W CN2017120167 W CN 2017120167W WO 2019071858 A1 WO2019071858 A1 WO 2019071858A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
updated
local
array
name
Prior art date
Application number
PCT/CN2017/120167
Other languages
English (en)
French (fr)
Inventor
汪刚
陈少杰
张文明
Original Assignee
武汉斗鱼网络科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 武汉斗鱼网络科技有限公司 filed Critical 武汉斗鱼网络科技有限公司
Publication of WO2019071858A1 publication Critical patent/WO2019071858A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Definitions

  • the present invention relates to the field of Internet technologies, and in particular, to a method, an apparatus, and a device for updating a file.
  • N files stored locally on the mobile terminal and M files of the N files are available, deletion is not required; in the prior art, all N files are usually deleted, or both are deleted. Do not delete. Therefore, the prior art has at least the following technical defects: no deletion of N files will occupy a large amount of storage space on the mobile terminal, affecting the use of the mobile terminal; and all deletions will result in the available M files needing to be served from the next use. The end of the download again, wasting traffic.
  • the present invention provides a method, apparatus and apparatus for updating a file.
  • An aspect of the present invention provides a method for updating a file, including: S1, after sending a request message for acquiring configuration file data to a server, receiving configuration file data returned by the server; wherein the configuration file is generated in advance by the server. a text type file for storing file information to be updated; S2, parsing the configuration file data, and obtaining a name and an MD5 value of at least one file to be updated in the configuration file data; wherein the MD5 value is used for Whether the file information is consistent; S3, if there are files to be updated and local files whose names and MD5 values are the same, the file to be updated is cancelled and the local file is retained.
  • the step of sending the request message for acquiring the configuration file data to the server in the S1 further includes: S11: acquiring an address of the configuration file download link, and sending the request message to the server according to the address; S12, receiving the server The returned error code, if the error code is 0, the request is successful, and the configuration file data returned by the server is received.
  • the step S2 further includes: S21, parsing the configuration file data to obtain a data dictionary; S22, performing value processing on the data dictionary, and acquiring an array to be updated including at least one element; wherein each The element records at least one name of the file to be updated and an MD5 value.
  • the step S3 further includes: obtaining a name of the local file by looping through the traversal, and storing the name of the local file to a local array; acquiring a path corresponding to the name of the local file;
  • the local file is MD5 encrypted, and the MD5 value corresponding to the local file is obtained.
  • the step S3 further includes: S31, traversing the array to be updated, comparing each file to be updated in the array to be updated with a local file in the local array; if there is a name and an MD5 value The same file to be updated and the local file are added to the pre-created cancel download array; S32, traversing the array to be updated, and determining each file to be updated in the array to be updated If the file to be updated has a corresponding download link, and the name of the file to be updated is not included in the cancel download array, the file to be updated is downloaded according to the download link, and the deleted name is not included in the file. The cancel downloading the local file in the array.
  • the step S22 further includes: S23, determining whether the array to be updated is an array type, and if not an array type, terminating the file update.
  • the step of obtaining the address of the configuration file download link in the step S11 further includes: acquiring a base address and a fixed address of the configuration file download link; splicing the base address and the fixed address to obtain an address of the configuration file download link .
  • Another aspect of the present invention provides an apparatus for updating a file, including: a receiving module, configured to: after receiving a request message for acquiring configuration file data from a server, receive configuration file data returned by a server; wherein the configuration file is a pre-service a text type file generated by the terminal for storing the file information to be updated; an obtaining module, configured to parse the configuration file data, and obtain a name and an MD5 value of at least one file to be updated in the configuration file data; The MD5 value is used to check whether the file information is consistent.
  • the update module is configured to cancel downloading the file to be updated and retain the local file if there are files to be updated and local files whose names and MD5 values are the same.
  • Yet another aspect of the present invention provides an apparatus for updating a file, comprising: at least one processor; and at least one memory communicatively coupled to the processor, wherein: the memory stores a program executable by the processor The instruction, the processor, the method, the method, the method, the method, the method, the Wherein, the configuration file is a text type file for storing the information of the file to be updated generated by the server in advance; S2, parsing the configuration file data, obtaining a name of at least one file to be updated in the configuration file data, and An MD5 value, wherein the MD5 value is used to check whether the file information is consistent; S3, if there are files to be updated and local files whose names and MD5 values are the same, canceling downloading the file to be updated, and retaining the local file.
  • the configuration file is a text type file for storing the information of the file to be updated generated by the server in advance
  • S2 parsing the configuration file data, obtaining a name of at least one file to be updated in the configuration file data
  • Yet another aspect of the present invention provides a non-transitory computer readable storage medium storing computer instructions that cause the computer to perform an update file provided by the above aspects of the present invention
  • the method includes, for example, S1, after receiving a request message for obtaining configuration file data from the server, receiving configuration file data returned by the server; wherein the configuration file is a text type generated by the server in advance for storing the information of the file to be updated.
  • Yet another aspect of the present invention provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer
  • the method for causing the computer to execute the update file provided by the present invention includes, for example, S1, after sending a request message for acquiring configuration file data to the server, receiving configuration file data returned by the server; wherein the configuration file is a pre-service And generating a text type file for storing file information to be updated; S2, parsing the configuration file data, and obtaining a name and an MD5 value of at least one file to be updated in the configuration file data; wherein the MD5 value For verifying whether the file information is consistent; S3, if there are files to be updated and local files whose names and MD5 values are the same, cancel the downloading of the file to be updated, and retain the local file.
  • the method, device and device for updating a file provided by the present invention obtain a partial reservation of a local file and a file to be updated by obtaining a name of the file to be updated and an MD5 value, and determining whether the file is the same as the local file.
  • the partial download saves the traffic consumed by the mobile terminal for file update, and releases the local storage space of the mobile terminal, so that the local file is consistent with the server.
  • FIG. 1 is a schematic flowchart of a method for updating a file according to an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of an apparatus for updating a file according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of an apparatus for updating a file according to an embodiment of the present invention.
  • FIG. 1 is a schematic flowchart of a method for updating a file according to an embodiment of the present invention.
  • the method includes: S1, after receiving a request message for acquiring configuration file data from a server, receiving configuration file data returned by a server;
  • the configuration file is a text type file for storing the information of the file to be updated generated by the server in advance; S2, parsing the configuration file data, and obtaining a name and an MD5 value of at least one file to be updated in the configuration file data.
  • the MD5 value is used to check whether the file information is consistent; S3, if there are files to be updated and local files whose names and MD5 values are the same, the file to be updated is cancelled and the local file is retained.
  • the configuration file is a text type file preset in the server; the file records the information of the file to be updated, and includes at least the name or ID of the file to be updated, the download link, and the MD5 value.
  • the mobile terminal may The data in the configuration file is obtained by sending a request message.
  • MD5 Message-Digest Algorithm 5
  • hash algorithms also known as abstract algorithm, hash algorithm
  • hash algorithm There are MD5 implementations; computing data (such as Chinese characters) to another fixed length value is the basic principle of the hash algorithm.
  • the predecessors of MD5 are MD2, MD3 and MD4.
  • the embodiment of the present invention selects the MD5 as a means for confirming whether the file information is the same, but the scope of protection of the embodiment of the present invention is not limited thereto.
  • step S1 the mobile terminal first sends a request message to the server, where the request message carries information requesting to acquire configuration file data; after receiving the request message, the server may return a sending configuration file to the mobile terminal according to the request message. data.
  • the file configuration interface function chaackCustomEmblemConfig is added on the mobile terminal, and the function is used to determine which files to be updated (compressed package files) are downloaded by the mobile terminal.
  • the mobile terminal may further parse the configuration file data, and obtain information carried in the configuration file, where the information includes at least one related information of the file to be updated, and the related information includes at least File name and MD5 value. For example, if the file to be updated is a compressed package file, the name of the compressed package and the MD5 value corresponding to the compressed package are included after parsing.
  • step S3 according to the name of the file to be updated and the MD5 value obtained in step S2, the name of the local file and the MD5 value are compared, as follows:
  • the MD5 value and the name of a local file and a file to be updated are the same, the information of the file to be updated and the information of the local file are not changed, and the local file does not need to be updated, then the file to be updated is cancelled. Similarly, The local file is reserved on the mobile side without deleting the local file.
  • the method for updating a file obtained by the embodiment of the present invention obtains a part of the local file and a partial download of the file to be updated by obtaining the name of the file to be updated and the MD5 value, and determining whether the file is the same as the local file.
  • the traffic consumed by the mobile terminal for file update is saved, and the local storage space of the mobile terminal is released, so that the local file is consistent with the server.
  • the step of sending the request message for acquiring the configuration file data to the server in the S1 further includes: S11: acquiring an address of the configuration file download link, and sending, according to the address, the server to the server The request message; S12, receiving an error code returned by the server, if the error code is 0, the request is successful, and receiving the configuration file data returned by the server.
  • step S11 the mobile terminal first obtains the address of the download link of the configuration file, and then takes the address to the server to request the data of the configuration file.
  • step S12 after requesting data in step S11, the server sends an error code to the mobile terminal to inform whether the network request is successful or not; if successful, the error code is 0, and the server returns configuration file data. .
  • the step S2 further includes: S21, parsing the profile data to obtain a data dictionary; S22, performing value processing on the data dictionary to obtain at least one element An array to be updated; wherein each of the elements records at least one name of the file to be updated and an MD5 value.
  • the data dictionary refers to defining and describing data items, data structures, data streams, data storage, processing logic, external entities, and the like.
  • step S21 the mobile terminal parses the received profile data and parses it into a data dictionary; then performs a related processing operation on the data dictionary.
  • step S22 according to the data dictionary acquired in step S21, the data dictionary is subjected to a value operation, for example, using the objectForKey method to extract an array to be updated newListArray from the data dictionary; the array to be updated stores at least one element, each element The name of the file to be updated (the name of the ID or the compressed package) and the MD5 value are recorded; in addition, a download link of the file to be updated may be included.
  • a value operation for example, using the objectForKey method to extract an array to be updated newListArray from the data dictionary; the array to be updated stores at least one element, each element The name of the file to be updated (the name of the ID or the compressed package) and the MD5 value are recorded; in addition, a download link of the file to be updated may be included.
  • the method further includes: obtaining a name of the local file by looping through the traversal, and storing the name of the local file to a local array; acquiring the name corresponding to the local file
  • the path is obtained by performing MD5 encryption on the local file according to the path, and obtaining an MD5 value corresponding to the local file.
  • a local array localZipFile may be created in advance for storing information of a local file; a local file that has been stored on the mobile end may be traversed, a name of each local file (compressed package) is obtained, and each name is stored in In the local array.
  • the storage path filePath corresponding to the local file is obtained; the local file is MD5-encrypted according to the storage path, and the MD5 value corresponding to the local file is obtained; and the MD5 value can be stored in the local array.
  • the name file of the local file is obtained; the local file is MD5-encrypted according to the storage path, and the MD5 value corresponding to the local file is obtained; and the MD5 value can be stored in the local array.
  • the step S3 further includes: S31, traversing the array to be updated, comparing each file to be updated in the array to be updated with a local file in the local array If there are files to be updated and local files whose names and MD5 values are the same, the name of the local file is added to the pre-created cancel download array, and the local file is retained; S32, traversing the array to be updated, Determining, for each file to be updated, the file to be updated; if the file to be updated has a corresponding download link, and the name of the file to be updated is not included in the cancel download array, according to the The download link downloads the file to be updated and deletes the local file whose name is not included in the cancel download array.
  • step S31 traversing the array to be updated, comparing the name of each file to be updated and the MD5 value to the name of the text file and the MD5 value; if the name of the file to be updated and the name of the local file and the MD5 value are the same, The description file information has not changed. The local file does not need to be updated. The same name is stored in the pre-created cancel download array doNotNeedDownLoadRoomIDArray. After traversing, canceling the download array saves the names of all files to be updated that do not need to be downloaded, and correspondingly, the names of all local files that need to be retained.
  • step S32 performing a traversal operation on the array to be updated, first determining whether each file name to be updated has a corresponding download link zipUrl, and if so, proving that the file to be updated is downloadable; Whether the name is included in the cancel download array. If it is not included, it means that there is no file to be updated locally, and the file to be updated needs to be downloaded; otherwise, no download is required. After traversing, it is possible to complete the download operation for all files that are not present locally.
  • the name of the local file that needs to be preserved is also saved in the cancel download array, and then the delete operation is performed on the local file that does not contain the name in the cancel download array.
  • Double-layer loop traversal through arrays can effectively save code and improve performance.
  • the step S22 further includes: S23, determining whether the array to be updated is an array type, and if not an array type, terminating the file update.
  • the step of obtaining the address of the configuration file download link in the step S11 further includes: acquiring a base address and a fixed address of the configuration file download link; and splicing the base address and the fixed address to obtain The address of the configuration file download link.
  • the address includes the base address (baseUrl) of the first half and the fixed address (Url) of the second half; wherein baseUrl is corresponding to various environments.
  • Address which is different in different environments (test environment or formal environment); Url is usually fixed; splicing baseUrl and Url into a complete download link address (requestStr), you can request configuration by requestStr to the server File data.
  • the method includes: a receiving module 201, configured to send a request message for obtaining configuration file data to a server, and receive a configuration returned by a server.
  • the file data wherein the configuration file is a text type file generated by the server in advance for storing the information of the file to be updated;
  • the obtaining module 202 is configured to parse the configuration file data, and obtain at least one of the configuration file data.
  • the receiving module 201 first sends a request message to the server, where the request message carries information requesting to acquire configuration file data; after receiving the request message, the server may return a sending configuration file to the receiving module 201 according to the request message. data.
  • the receiving module 201 can specifically determine which files to be updated (compressed file files) to be downloaded by adding a file configuration interface function function, cheackCustomEmblemConfig.
  • the obtaining module 202 may further parse the configuration file data, and obtain information carried in the configuration file, where the information includes at least one related information of the file to be updated, and related information.
  • the information includes at least the file name and the MD5 value. For example, if the file to be updated is a compressed package file, the name of the compressed package and the MD5 value corresponding to the compressed package are included after parsing.
  • the update module 203 compares the name of the file to be updated and the MD5 value obtained in the obtaining module 202 with the name of the local file and the MD5 value, as follows:
  • the update module 203 cancels downloading the file to be updated; Similarly, the update module 203 does not delete the local file and retains the local file.
  • the update module 203 should perform the download; for other local files than the reserved local file, the update module 203 should delete.
  • the device for updating the file obtained by the embodiment of the present invention obtains the partial reservation of the local file and the partial download of the file to be updated by obtaining the name of the file to be updated and the MD5 value, and determining whether the file is the same as the local file.
  • the traffic consumed by the mobile terminal for file update is saved, and the local storage space of the mobile terminal is released, so that the local file is consistent with the server.
  • the receiving module 201 further includes: an obtaining unit, configured to acquire an address of the configuration file download link, send the request message to the server according to the address, and receive a unit, configured to receive The error code returned by the server. If the error code is 0, the request is successful, and the configuration file data returned by the server is received.
  • the obtaining module 202 further includes: a parsing unit, configured to parse the configuration file data, and obtain a data dictionary; and a value unit, configured to perform value on the data dictionary Processing, obtaining an array to be updated that includes at least one element; wherein each of the elements records at least one name of the file to be updated and an MD5 value.
  • a parsing unit configured to parse the configuration file data, and obtain a data dictionary
  • a value unit configured to perform value on the data dictionary Processing, obtaining an array to be updated that includes at least one element; wherein each of the elements records at least one name of the file to be updated and an MD5 value.
  • the device further includes: a storage module, configured to obtain a name of the local file by looping through the traversal, and store the name of the local file to a local array; and an encryption module, configured to acquire The path corresponding to the name of the local file is performed; the local file is MD5-encrypted according to the path, and the MD5 value corresponding to the local file is obtained.
  • a storage module configured to obtain a name of the local file by looping through the traversal, and store the name of the local file to a local array
  • an encryption module configured to acquire The path corresponding to the name of the local file is performed; the local file is MD5-encrypted according to the path, and the MD5 value corresponding to the local file is obtained.
  • the updating module 203 further includes: a first traversing unit, configured to traverse the array to be updated, and each file to be updated in the array to be updated and the local array The local files in the comparison are compared; if there are files to be updated and local files whose names and MD5 values are the same, the name of the local file is added to the pre-created cancel download array; the second traversal unit is used to traverse the An array to be updated is determined for each file to be updated in the array to be updated; if the file to be updated has a corresponding download link, and the name of the file to be updated is not included in the cancel download array, And downloading the file to be updated according to the download link, and deleting a local file whose name is not included in the cancel download array.
  • a first traversing unit configured to traverse the array to be updated, and each file to be updated in the array to be updated and the local array
  • the local files in the comparison are compared; if there are files to be updated and local files whose names and MD5 values are the same
  • the obtaining module 202 further includes: a terminating unit, configured to determine whether the array to be updated is an array type, and if not an array type, terminate the file update.
  • the obtaining unit further includes: an address obtaining subunit, configured to acquire a base address and a fixed address of the configuration file download link; and a splicing subunit, configured to splicing the base address and the Fixed address, the address of the configuration file download link.
  • FIG. 3 is a schematic structural diagram of an apparatus for updating a file according to an embodiment of the present invention.
  • the apparatus includes: at least one processor 301; and at least one memory 302 communicatively coupled to the processor 301, where:
  • the memory 302 stores a program instruction that can be executed by the processor 301, and the processor 301 invokes the method that the program instruction can execute the update file provided by each embodiment, for example, including: S1, to the server After the request message for obtaining the configuration file data is sent, the configuration file data returned by the server is received; wherein the configuration file is a text type file generated by the server for storing the information of the file to be updated in advance; S2, the configuration file data is Performing a parsing to obtain a name and an MD5 value of at least one file to be updated in the configuration file data; wherein the MD5 value is used to check whether the file information is consistent; S3, if there is a file to be updated with the same name and MD5 value And the local file, the downloading of the file to
  • the embodiment of the present invention further provides a non-transitory computer readable storage medium, where the non-transitory computer readable storage medium stores a computer instruction, and the computer instruction causes the computer to execute the method for updating the file provided by the corresponding embodiment, for example, including: S1, after sending the request message for obtaining the configuration file data to the server, receiving the configuration file data returned by the server; wherein the configuration file is a text type file generated by the server for storing the information of the file to be updated in advance; S2, The configuration file data is parsed, and the name and MD5 value of the at least one file to be updated in the configuration file data are obtained; wherein the MD5 value is used to check whether the file information is consistent; S3, if there is a name and an MD5 value If the same file to be updated and the local file are the same, the file to be updated is cancelled and the local file is retained.
  • S1 after sending the request message for obtaining the configuration file data to the server, receiving the configuration file data returned by the server
  • the configuration file is a
  • the embodiment discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer, the computer
  • the method for executing the update file provided by each of the foregoing method embodiments includes, for example, S1, after sending a request message for obtaining configuration file data to the server, receiving configuration file data returned by the server; wherein the configuration file is a pre-service And generating a text type file for storing file information to be updated; S2, parsing the configuration file data, and obtaining a name and an MD5 value of at least one file to be updated in the configuration file data; wherein the MD5 value For verifying whether the file information is consistent; S3, if there are files to be updated and local files whose names and MD5 values are the same, cancel the downloading of the file to be updated, and retain the local file.
  • the foregoing program may be stored in a computer readable storage medium, and the program is executed when executed.
  • the foregoing steps include the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
  • the method, the device and the device for updating the file provided by the embodiment of the present invention obtain the name of the file to be updated and the value of the MD5, and determine whether the file is the same as the local file, and then perform corresponding operations on the file, thereby realizing partial reservation and updating of the local file.
  • the partial download of the file saves the traffic consumed by the mobile terminal when the file is updated, and the local storage space of the mobile terminal is released, so that the local file is consistent with the server.

Landscapes

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

Abstract

一种更新文件的方法、装置和设备,该方法包括:向服务端发送获取配置文件数据的请求消息后,接收服务端返回的配置文件数据(S1);对配置文件数据进行解析,获取配置文件数据中至少一个待更新文件的名称和MD5值(S2);其中,所述MD5值用于校验文件信息是否一致;若存在名称及MD5值均相同的待更新文件和本地文件,则取消下载所述待更新文件,并保留所述本地文件(S3)。通过获取待更新文件的名称和MD5值,并判断与本地文件是否相同后进行相应地操作,实现了对本地文件的部分保留和对待更新文件的部分下载,节约了移动端进行文件更新时消耗的流量,释放了移动端本地的存储空间,使本地文件与服务端保持一致。

Description

一种更新文件的方法、装置和设备
交叉引用
本申请引用于2017年10月09日提交的专利名称为“一种更新文件的方法、装置和设备”的第2017109315250号中国专利申请,其通过引用被全部并入本申请。
技术领域
本发明涉及互联网技术领域,具体涉及一种更新文件的方法、装置和设备。
背景技术
随着例如手机的移动端的快速发展,移动端经常需要下载或更新文件;而针对经下载后存储在移动端本地的文件,经过一段时间后,如果这个文件过期了,则需要删除;如果这个文件没有过期,则需要正常使用该文件,不应当删除;针对上述情况,由于移动端的存储容量是有限的,因此需要对这些文件进行管理。
例如,对于存储在移动端本地的N个文件,而N个文件中的M个文件是可用的,是不需要删除的;现有技术中,通常是对全部的N个文件都删除,或者都不删除。因此,现有技术至少存在以下技术缺陷:N个文件都不删除会占用移动端大量的存储空间,影响移动端的使用;而全部都删除,会导致可用的M个文件在下次使用时需要从服务端重新下载,浪费了流量。
发明内容
针对现有技术中存在的上述缺陷,本发明提供一种更新文件的方法、装置和设备。
本发明的一方面提供一种更新文件的方法,包括:S1,向服务端发送获取配置文件数据的请求消息后,接收服务端返回的配置文件数据;其中,配置文件是预先通过服务端生成的用于存储待更新文件信息的文本类型文件;S2,对所述配置文件数据进行解析,获取所述配置文件数据中至少一个待更新文件的名称和MD5值;其中,所述MD5值用于校验文件信息是否一致;S3,若存在名称及MD5值均相同的待更新文件和本地文件,则取消下载所述待更新文件,并保留所述本地文件。
其中,所述S1中向服务端发送获取配置文件数据的请求消息的步骤进一步包括:S11,获取配置文件下载链接的地址,根据所述地址向服务端发送所述请求消息;S12,接收服务端返回的错误码,若所述错误码为0,则请求成功,并接收服务端返回的所述配置文件数据。
其中,所述步骤S2进一步包括:S21,对所述配置文件数据进行解析,获取数据字典;S22,对所述数据字典进行取值处理,获取包含至少一个元素的待更新数组;其中,每个所述元素至少记录一个待更新文件的名称和MD5值。
其中,所述步骤S3前还包括:通过循环遍历获取本地文件的名称,并将所述本地文件的名称存储至本地数组;获取所述本地文件的名称所对应的路径;根据所述路径对所述本地文件进行MD5加密,获取所述本地文件对应的MD5值。
其中,所述步骤S3进一步包括:S31,遍历所述待更新数组,将所述待更新数组中的每个待更新文件与所述本地数组中的本地文件进行比较;若存在名称及MD5值均相同的待更新文件和本地文件,则将所述本地文件的名称添加至预先创建的取消下载数组;S32,遍历所述待更新数组,对所述待更新数组中的每个待更新文件进行判断;若所述待更新文件具有对应的下载链接,且所述待更新文件的名称不包含 在所述取消下载数组中,则根据所述下载链接下载所述待更新文件,并删除名称不包含在所述取消下载数组中的本地文件。
其中,所述步骤S22后还包括:S23,判断所述待更新数组是否为数组类型,若不是数组类型,则终止文件更新。
其中,所述S11中获取配置文件下载链接的地址的步骤进一步包括:获取配置文件下载链接的基础地址和固定地址;拼接所述基础地址和所述固定地址,获取所述配置文件下载链接的地址。
本发明另一方面提供一种更新文件的装置,包括:接收模块,用于向服务端发送获取配置文件数据的请求消息后,接收服务端返回的配置文件数据;其中,配置文件是预先通过服务端生成的用于存储待更新文件信息的文本类型文件;获取模块,用于对所述配置文件数据进行解析,获取所述配置文件数据中至少一个待更新文件的名称和MD5值;其中,所述MD5值用于校验文件信息是否一致;更新模块,用于若存在名称及MD5值均相同的待更新文件和本地文件,则取消下载所述待更新文件,并保留所述本地文件。
本发明的又一方面提供一种更新文件的设备,包括:至少一个处理器;以及与所述处理器通信连接的至少一个存储器,其中:所述存储器存储有可被所述处理器执行的程序指令,所述处理器调用所述程序指令能够执行本发明上述方面提供的更新文件的方法,例如包括:S1,向服务端发送获取配置文件数据的请求消息后,接收服务端返回的配置文件数据;其中,配置文件是预先通过服务端生成的用于存储待更新文件信息的文本类型文件;S2,对所述配置文件数据进行解析,获取所述配置文件数据中至少一个待更新文件的名称和MD5值;其中,所述MD5值用于校验文件信息是否一致;S3,若存在名称及MD5值均相同的待更新文件和本地文件,则取消下载所述待更新文件,并保留所述本地文件。
本发明的又一方面提供一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令使所述计算机执行本发明上述方面提供的更新文件的方法,例如包括:S1,向服务端发送获取配置文件数据的请求消息后,接收服务端返回的配置文件数据;其中,配置文件是预先通过服务端生成的用于存储待更新文件信息的文本类型文件;S2,对所述配置文件数据进行解析,获取所述配置文件数据中至少一个待更新文件的名称和MD5值;其中,所述MD5值用于校验文件信息是否一致;S3,若存在名称及MD5值均相同的待更新文件和本地文件,则取消下载所述待更新文件,并保留所述本地文件。
本发明又一方面提供一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行本发明提供的更新文件的方法,例如包括:S1,向服务端发送获取配置文件数据的请求消息后,接收服务端返回的配置文件数据;其中,配置文件是预先通过服务端生成的用于存储待更新文件信息的文本类型文件;S2,对所述配置文件数据进行解析,获取所述配置文件数据中至少一个待更新文件的名称和MD5值;其中,所述MD5值用于校验文件信息是否一致;S3,若存在名称及MD5值均相同的待更新文件和本地文件,则取消下载所述待更新文件,并保留所述本地文件。
本发明提供的更新文件的方法、装置和设备,通过获取待更新文件的名称和MD5值,并判断与本地文件是否相同后进行相应地操作,实现了对本地文件的部分保留和对待更新文件的部分下载,节约了移动端进行文件更新时消耗的流量,释放了移动端本地的存储空间,使本地文件与服务端保持一致。
附图说明
图1为本发明实施例提供的更新文件的方法的流程示意图;
图2为本发明实施例提供的更新文件的装置的结构示意图;
图3为本发明实施例提供的更新文件的设备的结构示意图。
具体实施方式
下面结合附图和实施例,对本发明的具体实施方式作进一步详细描述。以下实施例用于说明本发明,但不用来限制本发明的范围。
图1为本发明实施例提供的更新文件的方法的流程示意图,如图1所示,包括:S1,向服务端发送获取配置文件数据的请求消息后,接收服务端返回的配置文件数据;其中,配置文件是预先通过服务端生成的用于存储待更新文件信息的文本类型文件;S2,对所述配置文件数据进行解析,获取所述配置文件数据中至少一个待更新文件的名称和MD5值;其中,所述MD5值用于校验文件信息是否一致;S3,若存在名称及MD5值均相同的待更新文件和本地文件,则取消下载所述待更新文件,并保留所述本地文件。
其中,配置文件为在服务端预先设置的文本类型文件;该文件记录了待更新文件的信息,至少包括待更新文件的名称或ID、下载链接和MD5值;本发明实施例中,移动端可以通过发送请求消息,获取到配置文件中的数据。
其中,MD5即Message-Digest Algorithm 5(信息-摘要算法5),用于确保信息传输完整一致;是计算机广泛使用的杂凑算法之一(又译摘要算法、哈希算法),主流编程语言普遍已有MD5实现;将数据(如汉字)运算为另一固定长度值,是杂凑算法的基础原理,MD5的前身有MD2、MD3和MD4。本发明实施例选择MD5作为确认文件信息是否相同的手段,但本发明实施例的保护范围不限于此。
在步骤S1中,移动端首先向服务端发送一个请求消息,该请求消 息中携带了请求获取配置文件数据的信息;服务端接收到请求消息后,可以根据该请求消息向移动端返回发送配置文件数据。
具体可以通过在移动端增加文件配置接口功能函数cheackCustomEmblemConfig,通过该函数实现移动端判断下载哪些待更新文件(压缩包文件)。
在步骤S2中,根据步骤S1中得到的配置文件数据,移动端可以对配置文件数据进行进一步解析;获取配置文件中携带的信息,该信息包括至少一个待更新文件的相关信息,相关信息至少包括文件名称和MD5值。例如待更新文件为压缩包文件,则解析后包括该压缩包的名称和压缩包对应的MD5值。
在步骤S3中,根据步骤S2中得到的待更新文件的名称和MD5值,与本地文件的名称和MD5值进行比较,具体如下:
如果一个本地文件与一个待更新文件的MD5值和名称都相同,说明该待更新文件和该本地文件的信息没有改变,该本地文件不需要更新,那么就取消下载这个待更新文件;同样的,在移动端不用删除这个本地文件,对该本地文件进行保留。
相应地,对于除了取消下载的待更新文件之外的其他待更新文件应当进行下载;对除了保留的本地文件之外的其他本地文件应当进行删除。
本发明实施例提供的更新文件的方法,通过获取待更新文件的名称和MD5值,并判断与本地文件是否相同后进行相应地操作,实现了对本地文件的部分保留和对待更新文件的部分下载,节约了移动端进行文件更新时消耗的流量,释放了移动端本地的存储空间,使本地文件与服务端保持一致。
在上述任一实施例的基础上,所述S1中向服务端发送获取配置文 件数据的请求消息的步骤进一步包括:S11,获取配置文件下载链接的地址,根据所述地址向服务端发送所述请求消息;S12,接收服务端返回的错误码,若所述错误码为0,则请求成功,并接收服务端返回的所述配置文件数据。
在步骤S11中,移动端首先获取到配置文件的下载链接的地址,再拿这个地址去服务端请求配置文件的数据。
在步骤S12中,在步骤S11中请求数据后,服务端会向移动端发送一个错误码告知本次网络请求是成功还是失败;如果成功,则错误码为0,并且服务端会返回配置文件数据。
在上述任一实施例的基础上,所述步骤S2进一步包括:S21,对所述配置文件数据进行解析,获取数据字典;S22,对所述数据字典进行取值处理,获取包含至少一个元素的待更新数组;其中,每个所述元素至少记录一个待更新文件的名称和MD5值。
其中,数据字典是指对数据的数据项、数据结构、数据流、数据存储、处理逻辑、外部实体等进行定义和描述。
在步骤S21中,移动端对接收到的配置文件数据进行解析,解析后成为了数据字典;之后对数据字典执行相关的处理操作。
在步骤S22中,根据步骤S21中获取的数据字典,对数据字典进行取值操作,例如使用objectForKey方法从数据字典中取出一个待更新数组newListArray;这个待更新数组存储了至少一个元素,每个元素记录了一个待更新文件的名称(ID或压缩包的名称)和MD5值;另外,还可以包括待更新文件的下载链接。
在上述任一实施例的基础上,所述步骤S3前还包括:通过循环遍历获取本地文件的名称,并将所述本地文件的名称存储至本地数组;获取所述本地文件的名称所对应的路径;根据所述路径对所述本地文 件进行MD5加密,获取所述本地文件对应的MD5值。
具体地,可以预先创建一个本地数组localZipFile,用于存储本地文件的信息;可以使用一个循环遍历已经存储在移动端的本地文件,获取每个本地文件(压缩包)的名称,并且将各个名称存储在本地数组中。
然后根据本地文件的名称file,获取本地文件对应的存储路径filePath;根据存储路径对本地文件进行MD5加密,获取到本地文件分别对应的MD5值;并且,可以将MD5值存储到本地数组中对应的本地文件的名称下。
在上述任一实施例的基础上,所述步骤S3进一步包括:S31,遍历所述待更新数组,将所述待更新数组中的每个待更新文件与所述本地数组中的本地文件进行比较;若存在名称及MD5值均相同的待更新文件和本地文件,则将所述本地文件的名称添加至预先创建的取消下载数组,并保留所述本地文件;S32,遍历所述待更新数组,对所述待更新数组中的每个待更新文件进行判断;若所述待更新文件具有对应的下载链接,且所述待更新文件的名称不包含在所述取消下载数组中,则根据所述下载链接下载所述待更新文件,并删除名称不包含在所述取消下载数组中的本地文件。
在步骤S31中,遍历待更新数组,将每个待更新文件的名称和MD5值都比文本文件的名称和MD5值比较一遍;如果待更新文件和本地文件的名称和MD5值的名称都相同,说明文件信息没有改变,本地文件不需要更新,就把相同的名称存储在预先创建的取消下载数组doNotNeedDownLoadRoomIDArray。遍历后,取消下载数组就保存了所有不需要下载的待更新文件的名称,相应地,也是所有需要保留的本地文件的名称。
在步骤S32中,对待更新数组执行再执行一次遍历操作,首先判 断每个待更新文件名称是否有对应的下载链接zipUrl,如果存在,则证明该待更新文件是可下载的;再判断更新文件的名称是否包含在取消下载数组中,如果不包含,则说明本地没有该待更新文件,需要对该待更新文件进行下载;否则,无需下载。经过遍历后,就能够对所有本地不存在的待更新文件完成下载操作。
另外,取消下载数组中同样保存了需要保留的本地文件的名称,那么对于取消下载数组中不包含名称的本地文件执行删除操作。
通过数组的双层循环遍历能够有效节约代码量,提高性能。
在上述任一实施例的基础上,所述步骤S22后还包括:S23,判断所述待更新数组是否为数组类型,若不是数组类型,则终止文件更新。
具体地,获取到待更新数组后,应当判断是否为数组类型,例如使用判断方法isKindOfClass,如果其真实类型不是数组类型,则应当终结更新方法,这样能够避免之后对数组的处理由于其并不是数组类型而造成运行时的崩溃。
在上述任一实施例的基础上,所述S11中获取配置文件下载链接的地址的步骤进一步包括:获取配置文件下载链接的基础地址和固定地址;拼接所述基础地址和所述固定地址,获取所述配置文件下载链接的地址。
具体地,为了读取配置文件,需要获得配置文件的下载链接的地址;该地址包括前半部分的基础地址(baseUrl)和后半部分的固定地址(Url);其中,baseUrl是各种环境对应的地址,其在不同的环境(测试环境或者正式环境)不一样;Url通常是比较固定的;将baseUrl和Url拼接为一个完整的下载链接的地址(requestStr),就可以通过requestStr去服务端请求配置文件数据。
图2为本发明实施例提供的更新文件的装置的结构示意图,如图 2所示,包括:接收模块201,用于向服务端发送获取配置文件数据的请求消息后,接收服务端返回的配置文件数据;其中,配置文件是预先通过服务端生成的用于存储待更新文件信息的文本类型文件;获取模块202,用于对所述配置文件数据进行解析,获取所述配置文件数据中至少一个待更新文件的名称和MD5值;其中,所述MD5值用于校验文件信息是否一致;更新模块203,用于若存在名称及MD5值均相同的待更新文件和本地文件,则取消下载所述待更新文件,并保留所述本地文件。
具体地,接收模块201首先向服务端发送一个请求消息,该请求消息中携带了请求获取配置文件数据的信息;服务端接收到请求消息后,可以根据该请求消息向接收模块201返回发送配置文件数据。
接收模块201具体可以通过增加文件配置接口功能函数cheackCustomEmblemConfig,通过该函数实现判断下载哪些待更新文件(压缩包文件)。
具体地,获取模块202根据接收模块201中得到的配置文件数据,获取模块202可以对配置文件数据进行进一步解析;获取配置文件中携带的信息,该信息包括至少一个待更新文件的相关信息,相关信息至少包括文件名称和MD5值。例如待更新文件为压缩包文件,则解析后包括该压缩包的名称和压缩包对应的MD5值。
具体地,更新模块203根据获取模块202中得到的待更新文件的名称和MD5值,与本地文件的名称和MD5值进行比较,具体如下:
如果一个本地文件与一个待更新文件的MD5值和名称都相同,说明该待更新文件和该本地文件的信息没有改变,该本地文件不需要更新,那么更新模块203就取消下载这个待更新文件;同样的,更新模块203不用删除这个本地文件,对该本地文件进行保留。
相应地,对于除了取消下载的待更新文件之外的其他待更新文件, 更新模块203应当进行下载;对除了保留的本地文件之外的其他本地文件,更新模块203应当进行删除。
本发明实施例提供的更新文件的装置,通过获取待更新文件的名称和MD5值,并判断与本地文件是否相同后进行相应地操作,实现了对本地文件的部分保留和对待更新文件的部分下载,节约了移动端进行文件更新时消耗的流量,释放了移动端本地的存储空间,使本地文件与服务端保持一致。
在上述任一实施例的基础上,所述接收模块201进一步包括:获取单元,用于获取配置文件下载链接的地址,根据所述地址向服务端发送所述请求消息;接收单元,用于接收服务端返回的错误码,若所述错误码为0,则请求成功,并接收服务端返回的所述配置文件数据。
在上述任一实施例的基础上,所述获取模块202进一步包括:解析单元,用于对所述配置文件数据进行解析,获取数据字典;取值单元,用于对所述数据字典进行取值处理,获取包含至少一个元素的待更新数组;其中,每个所述元素至少记录一个待更新文件的名称和MD5值。
在上述任一实施例的基础上,所述装置还包括:存储模块,用于通过循环遍历获取本地文件的名称,并将所述本地文件的名称存储至本地数组;加密模块,用于获取所述本地文件的名称所对应的路径;根据所述路径对所述本地文件进行MD5加密,获取所述本地文件对应的MD5值。
在上述任一实施例的基础上,所述更新模块203进一步包括:第一遍历单元,用于遍历所述待更新数组,将所述待更新数组中的每个待更新文件与所述本地数组中的本地文件进行比较;若存在名称及MD5值均相同的待更新文件和本地文件,则将所述本地文件的名称添加至预先创建的取消下载数组;第二遍历单元,用于遍历所述待更新 数组,对所述待更新数组中的每个待更新文件进行判断;若所述待更新文件具有对应的下载链接,且所述待更新文件的名称不包含在所述取消下载数组中,则根据所述下载链接下载所述待更新文件,并删除名称不包含在所述取消下载数组中的本地文件。
在上述任一实施例的基础上,所述获取模块202还包括:终止单元,用于判断所述待更新数组是否为数组类型,若不是数组类型,则终止文件更新。
在上述任一实施例的基础上,所述获取单元进一步包括:地址获取子单元,用于获取配置文件下载链接的基础地址和固定地址;拼接子单元,用于拼接所述基础地址和所述固定地址,获取所述配置文件下载链接的地址。
图3为本发明实施例提供的更新文件的设备的结构示意图,如图3所示,该设备包括:至少一个处理器301;以及与所述处理器301通信连接的至少一个存储器302,其中:所述存储器302存储有可被所述处理器301执行的程序指令,所述处理器301调用所述程序指令能够执行上述各实施例所提供的更新文件的方法,例如包括:S1,向服务端发送获取配置文件数据的请求消息后,接收服务端返回的配置文件数据;其中,配置文件是预先通过服务端生成的用于存储待更新文件信息的文本类型文件;S2,对所述配置文件数据进行解析,获取所述配置文件数据中至少一个待更新文件的名称和MD5值;其中,所述MD5值用于校验文件信息是否一致;S3,若存在名称及MD5值均相同的待更新文件和本地文件,则取消下载所述待更新文件,并保留所述本地文件。
本发明实施例还提供一种非暂态计算机可读存储介质,该非暂态计算机可读存储介质存储计算机指令,该计算机指令使计算机执行对应实施例所提供的更新文件的方法,例如包括:S1,向服务端发送获 取配置文件数据的请求消息后,接收服务端返回的配置文件数据;其中,配置文件是预先通过服务端生成的用于存储待更新文件信息的文本类型文件;S2,对所述配置文件数据进行解析,获取所述配置文件数据中至少一个待更新文件的名称和MD5值;其中,所述MD5值用于校验文件信息是否一致;S3,若存在名称及MD5值均相同的待更新文件和本地文件,则取消下载所述待更新文件,并保留所述本地文件。
本实施例公开一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,计算机能够执行上述各方法实施例所提供的更新文件的方法,例如包括:S1,向服务端发送获取配置文件数据的请求消息后,接收服务端返回的配置文件数据;其中,配置文件是预先通过服务端生成的用于存储待更新文件信息的文本类型文件;S2,对所述配置文件数据进行解析,获取所述配置文件数据中至少一个待更新文件的名称和MD5值;其中,所述MD5值用于校验文件信息是否一致;S3,若存在名称及MD5值均相同的待更新文件和本地文件,则取消下载所述待更新文件,并保留所述本地文件。
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
以上所描述的更新文件的设备等实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技 术人员在不付出创造性的劳动的情况下,即可以理解并实施。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。
本发明实施例提供的更新文件的方法、装置和设备,通过获取待更新文件的名称和MD5值,并判断与本地文件是否相同后进行相应地操作,实现了对本地文件的部分保留和对待更新文件的部分下载,节约了移动端进行文件更新时消耗的流量,释放了移动端本地的存储空间,使本地文件与服务端保持一致。
最后,本申请的方法仅为较佳的实施方案,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (11)

  1. 一种更新文件的方法,其特征在于,包括:
    S1,向服务端发送获取配置文件数据的请求消息后,接收服务端返回的配置文件数据;其中,配置文件是预先通过服务端生成的用于存储待更新文件信息的文本类型文件;
    S2,对所述配置文件数据进行解析,获取所述配置文件数据中至少一个待更新文件的名称和MD5值;其中,所述MD5值用于校验文件信息是否一致;
    S3,若存在名称及MD5值均相同的待更新文件和本地文件,则取消下载所述待更新文件,并保留所述本地文件。
  2. 根据权利要求1所述的方法,其特征在于,所述S1中向服务端发送获取配置文件数据的请求消息的步骤进一步包括:
    S11,获取配置文件下载链接的地址,根据所述地址向服务端发送所述请求消息;
    S12,接收服务端返回的错误码,若所述错误码为0,则请求成功,并接收服务端返回的所述配置文件数据。
  3. 根据权利要求1所述的方法,其特征在于,所述步骤S2进一步包括:
    S21,对所述配置文件数据进行解析,获取数据字典;
    S22,对所述数据字典进行取值处理,获取包含至少一个元素的待更新数组;其中,每个所述元素至少记录一个待更新文件的名称和MD5值。
  4. 根据权利要求1或3所述的方法,其特征在于,所述步骤S3前还包括:
    通过循环遍历获取本地文件的名称,并将所述本地文件的名称存储至本地数组;
    获取所述本地文件的名称所对应的路径;根据所述路径对所述本地文件进行MD5加密,获取所述本地文件对应的MD5值。
  5. 根据权利要求4所述的方法,其特征在于,所述步骤S3进一步包括:
    S31,遍历所述待更新数组,将所述待更新数组中的每个待更新文件与所述本地数组中的本地文件进行比较;
    若存在名称及MD5值均相同的待更新文件和本地文件,则将所述本地文件的名称添加至预先创建的取消下载数组;
    S32,遍历所述待更新数组,对所述待更新数组中的每个待更新文件进行判断;
    若所述待更新文件具有对应的下载链接,且所述待更新文件的名称不包含在所述取消下载数组中,则根据所述下载链接下载所述待更新文件,并删除名称不包含在所述取消下载数组中的本地文件。
  6. 根据权利要求3所述的方法,其特征在于,所述步骤S22后还包括:
    S23,判断所述待更新数组是否为数组类型,若不是数组类型,则终止文件更新。
  7. 根据权利要求2所述的方法,其特征在于,所述S11中获取配置文件下载链接的地址的步骤进一步包括:
    获取配置文件下载链接的基础地址和固定地址;
    拼接所述基础地址和所述固定地址,获取所述配置文件下载链接的地址。
  8. 一种更新文件的装置,其特征在于,包括:
    接收模块,用于向服务端发送获取配置文件数据的请求消息后,接收服务端返回的配置文件数据;其中,配置文件是预先通过服务端生成的用于存储待更新文件信息的文本类型文件;
    获取模块,用于对所述配置文件数据进行解析,获取所述配置文件数据中至少一个待更新文件的名称和MD5值;其中,所述MD5值用于校验文件信息是否一致;
    更新模块,用于若存在名称及MD5值均相同的待更新文件和本地文件,则取消下载所述待更新文件,并保留所述本地文件。
  9. 一种更新文件的设备,其特征在于,包括:
    至少一个处理器;
    以及与所述处理器通信连接的至少一个存储器,其中:所述存储器存储有可被所述处理器执行的程序指令,所述处理器调用所述程序指令能够执行如权利要求1至7任一所述的方法。
  10. 一种非暂态计算机可读存储介质,其特征在于,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令使所述计算机执行如权利要求1至7任一所述的方法。
  11. 一种计算机程序产品,其特征在于,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行如权利要求1至7任一所述的方法。
PCT/CN2017/120167 2017-10-09 2017-12-29 一种更新文件的方法、装置和设备 WO2019071858A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710931525.0A CN107682436A (zh) 2017-10-09 2017-10-09 一种更新文件的方法、装置和设备
CN201710931525.0 2017-10-09

Publications (1)

Publication Number Publication Date
WO2019071858A1 true WO2019071858A1 (zh) 2019-04-18

Family

ID=61139967

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/120167 WO2019071858A1 (zh) 2017-10-09 2017-12-29 一种更新文件的方法、装置和设备

Country Status (2)

Country Link
CN (1) CN107682436A (zh)
WO (1) WO2019071858A1 (zh)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111580884A (zh) * 2020-04-30 2020-08-25 北京金山云网络技术有限公司 配置更新方法、装置、服务器和电子设备
CN112099831A (zh) * 2020-09-28 2020-12-18 中国银行股份有限公司 配置文件的批量更新方法及装置
CN112948389A (zh) * 2021-03-05 2021-06-11 上海上讯信息技术股份有限公司 基于md5的数据库表数据比对方法及设备
CN113157307A (zh) * 2020-01-07 2021-07-23 普天信息技术有限公司 一种软件版本升级方法及装置
CN113360169A (zh) * 2021-06-08 2021-09-07 康佳集团股份有限公司 一种画质参数升级***和方法
CN113590155A (zh) * 2021-07-29 2021-11-02 深圳锦弘霖科技有限公司 远程增量式更新自研rtos的方法
CN114595199A (zh) * 2022-05-10 2022-06-07 太平金融科技服务(上海)有限公司 文件解析方法、装置、计算机设备和存储介质
CN114745268A (zh) * 2022-03-31 2022-07-12 杭州视洞科技有限公司 一种网络摄像头在线更新加载算法库的方法
CN116680012A (zh) * 2023-08-01 2023-09-01 浙江春风动力股份有限公司 工业软件配置管理***及方法

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109409933A (zh) * 2018-09-26 2019-03-01 深圳壹账通智能科技有限公司 智能计费方法、计算机可读存储介质和终端设备
CN109543155A (zh) * 2018-10-18 2019-03-29 恒峰信息技术有限公司 一种数据自动更新方法及***
CN111324362A (zh) * 2018-12-14 2020-06-23 北京宝沃汽车有限公司 车辆、车辆电控***程序更新的方法和装置
CN109582350B (zh) * 2018-12-24 2022-06-28 广东金赋科技股份有限公司 自动化维护自助办税终端中配置文件的方法
CN109999489A (zh) * 2019-03-29 2019-07-12 北京金山安全软件有限公司 资源更新方法、装置和电子设备
CN111090446A (zh) * 2019-12-20 2020-05-01 北京海益同展信息科技有限公司 一种配置文件更新方法及***
CN111416863A (zh) * 2020-03-20 2020-07-14 上海圣剑网络科技股份有限公司 基于客户端的多元化下载管理方法、终端及介质
CN111988296A (zh) * 2020-08-12 2020-11-24 深圳杰微芯片科技有限公司 算力设备超频方法、服务器和存储介质
CN112988691A (zh) * 2021-03-31 2021-06-18 深圳市优必选科技股份有限公司 一种基于嵌入式***的文件更新方法、装置及终端设备
CN113778997B (zh) * 2021-09-26 2024-02-02 杭州安恒信息技术股份有限公司 一种数据库版本管理方法、***及设备
CN116647732B (zh) * 2023-07-27 2024-04-19 深圳市华曦达科技股份有限公司 一种基于智能电视盒安全的更新配置方法和装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104426924A (zh) * 2013-08-21 2015-03-18 腾讯科技(深圳)有限公司 一种更新应用软件的方法、装置、客户端、服务器及***
CN104657170A (zh) * 2013-11-25 2015-05-27 腾讯科技(上海)有限公司 一种数据更新方法、装置及***
CN105160253A (zh) * 2015-09-29 2015-12-16 网易(杭州)网络有限公司 修复客户端程序的方法、装置、***及服务器
CN105446829A (zh) * 2015-09-29 2016-03-30 网易(杭州)网络有限公司 客户端程序的修复方法、装置、***及服务器
CN106302592A (zh) * 2015-05-28 2017-01-04 腾讯科技(深圳)有限公司 终端应用的更新方法、服务器和终端

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101425931A (zh) * 2008-12-08 2009-05-06 上海华为技术有限公司 一种通信设备软件升级的方法、相关设备及通信***
KR20120034550A (ko) * 2010-07-20 2012-04-12 한국전자통신연구원 스트리밍 컨텐츠 제공 장치 및 방법
CN102456027A (zh) * 2010-10-21 2012-05-16 北京市金蝶政务软件有限公司 一种在分布式***中复制文件的方法、终端及***
CN102053853A (zh) * 2010-12-30 2011-05-11 北京像素软件科技股份有限公司 一种网络游戏版本更新方法
CN102833350A (zh) * 2012-09-11 2012-12-19 优视科技有限公司 WebApp更新的处理方法和处理装置
CN106326310B (zh) * 2015-07-06 2021-05-14 北京壹平台科技有限公司 一种手机客户端软件的资源加密更新方法
CN107040615B (zh) * 2017-06-22 2021-07-02 深圳Tcl数字技术有限公司 媒体分片的下载方法、终端和计算机可读存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104426924A (zh) * 2013-08-21 2015-03-18 腾讯科技(深圳)有限公司 一种更新应用软件的方法、装置、客户端、服务器及***
CN104657170A (zh) * 2013-11-25 2015-05-27 腾讯科技(上海)有限公司 一种数据更新方法、装置及***
CN106302592A (zh) * 2015-05-28 2017-01-04 腾讯科技(深圳)有限公司 终端应用的更新方法、服务器和终端
CN105160253A (zh) * 2015-09-29 2015-12-16 网易(杭州)网络有限公司 修复客户端程序的方法、装置、***及服务器
CN105446829A (zh) * 2015-09-29 2016-03-30 网易(杭州)网络有限公司 客户端程序的修复方法、装置、***及服务器

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113157307A (zh) * 2020-01-07 2021-07-23 普天信息技术有限公司 一种软件版本升级方法及装置
CN111580884A (zh) * 2020-04-30 2020-08-25 北京金山云网络技术有限公司 配置更新方法、装置、服务器和电子设备
CN111580884B (zh) * 2020-04-30 2024-04-19 北京金山云网络技术有限公司 配置更新方法、装置、服务器和电子设备
CN112099831A (zh) * 2020-09-28 2020-12-18 中国银行股份有限公司 配置文件的批量更新方法及装置
CN112948389A (zh) * 2021-03-05 2021-06-11 上海上讯信息技术股份有限公司 基于md5的数据库表数据比对方法及设备
CN113360169A (zh) * 2021-06-08 2021-09-07 康佳集团股份有限公司 一种画质参数升级***和方法
CN113590155B (zh) * 2021-07-29 2023-06-20 深圳锦弘霖科技有限公司 远程增量式更新自研rtos的方法
CN113590155A (zh) * 2021-07-29 2021-11-02 深圳锦弘霖科技有限公司 远程增量式更新自研rtos的方法
CN114745268A (zh) * 2022-03-31 2022-07-12 杭州视洞科技有限公司 一种网络摄像头在线更新加载算法库的方法
CN114595199B (zh) * 2022-05-10 2022-09-02 太平金融科技服务(上海)有限公司 文件解析方法、装置、计算机设备和存储介质
CN114595199A (zh) * 2022-05-10 2022-06-07 太平金融科技服务(上海)有限公司 文件解析方法、装置、计算机设备和存储介质
CN116680012A (zh) * 2023-08-01 2023-09-01 浙江春风动力股份有限公司 工业软件配置管理***及方法
CN116680012B (zh) * 2023-08-01 2023-10-24 浙江春风动力股份有限公司 工业软件配置管理***及方法

Also Published As

Publication number Publication date
CN107682436A (zh) 2018-02-09

Similar Documents

Publication Publication Date Title
WO2019071858A1 (zh) 一种更新文件的方法、装置和设备
CN110058873B (zh) 应用页面更新方法、装置、设备和存储介质
CN106302337B (zh) 漏洞检测方法和装置
CN102663281B (zh) 检测恶意软件的方法和装置
RU2538911C2 (ru) Способ и система для эффективной загрузки пакета данных
US9378370B2 (en) Scanning files for inappropriate content during synchronization
CN110162332A (zh) 一种rn项目的构建方法及***
CN102053853A (zh) 一种网络游戏版本更新方法
WO2016155635A1 (zh) 一种数据处理方法和设备
US8549165B2 (en) Processing devices and methods for transmitting and receiving data
CN105740259A (zh) 一种增量数据的处理方法和装置
CN106302595A (zh) 一种对服务器进行健康检查的方法及设备
US20150350299A1 (en) Method and apparatus for providing secure file transmission
CN111182060A (zh) 报文的检测方法及装置
CN105471665A (zh) 网站功能测试方法及***、网站服务器
US20190149571A1 (en) Method and device for repairing page vulnerability
CN109725912A (zh) 应用程序配置方法、装置、终端、服务器及可读存储介质
WO2017124736A1 (zh) 一种升级异常信息的传输方法、设备和***
CN111107133A (zh) 差异包的生成方法、数据更新方法、装置和存储介质
US9686310B2 (en) Method and apparatus for repairing a file
US10904746B2 (en) Implementation method, apparatus and system for remote access
CN111818179A (zh) 用户请求的处理方法、装置、计算设备和介质
US11151082B1 (en) File system operation cancellation
CN108008984A (zh) 一种资源文件下载更新方法及装置
JP6969676B2 (ja) 排他制御システム及び排他制御方法

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: 17928459

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: 17928459

Country of ref document: EP

Kind code of ref document: A1