WO2021139238A1 - Method and apparatus for upgrading cloud service application - Google Patents

Method and apparatus for upgrading cloud service application Download PDF

Info

Publication number
WO2021139238A1
WO2021139238A1 PCT/CN2020/118328 CN2020118328W WO2021139238A1 WO 2021139238 A1 WO2021139238 A1 WO 2021139238A1 CN 2020118328 W CN2020118328 W CN 2020118328W WO 2021139238 A1 WO2021139238 A1 WO 2021139238A1
Authority
WO
WIPO (PCT)
Prior art keywords
files
fragment
check value
fragment files
file
Prior art date
Application number
PCT/CN2020/118328
Other languages
French (fr)
Chinese (zh)
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 WO2021139238A1 publication Critical patent/WO2021139238A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Definitions

  • This application relates to the technical field of cloud services, and in particular to methods, devices, electronic equipment, and storage media for cloud-based service application upgrades.
  • the client When the client upgrades the cloud service application, the client needs to obtain the corresponding installation software package from the cloud server.
  • the client sends an upgrade request to the cloud server, and the cloud server directly issues the corresponding upgrade installation package to the client.
  • the inventor realized that due to the large amount of data contained in the upgrade installation package, the transmission process is easily affected by the network environment.
  • it is generally necessary to perform a message summary based on all the contents contained in the upgrade installation package. Calculate, and verify data integrity based on the calculated message digest.
  • the data volume of the upgrade installation package is large, the calculation complexity of the message digest calculation is relatively large, which leads to a long upgrade time for cloud business applications.
  • the application upgrade efficiency is low.
  • this application provides a cloud service application upgrade method, device, electronic device, and storage medium, which can effectively reduce the upgrade time of cloud service applications and improve cloud service while ensuring the data integrity of the upgrade installation package.
  • Application upgrade efficiency is a cloud service application upgrade method, device, electronic device, and storage medium, which can effectively reduce the upgrade time of cloud service applications and improve cloud service while ensuring the data integrity of the upgrade installation package.
  • this application provides a cloud service application upgrade method, which includes: sending an upgrade request for upgrading a cloud service application to a cloud server, where the upgrade request includes an upgrade version number of the cloud service application; and receiving the cloud server Response information fed back to the upgrade request, where the response information includes identification information of a plurality of fragmented files and a message digest calculation determined based on the content of the plurality of fragmented files respectively for the plurality of fragmented files
  • the first file verification value is verified separately, and the multiple fragment files are generated when the cloud server performs fragmentation processing on the installation software package corresponding to the upgraded version number; based on the plurality of fragment files Send a download request for downloading a plurality of the fragmented files to the cloud server; receive a plurality of fragmented files fed back by the cloud server for the download request; according to the received plurality of fragmented files Perform message digest calculations on the content of each of the fragmented files to determine the first calculated check value corresponding to the plurality of fragmented files; if the first calculated check value
  • this application provides a cloud service application upgrade device, including: a first sending unit, configured to send an upgrade request for upgrading a cloud service application to a cloud server, where the upgrade request includes an upgraded version of the cloud service application Number; first receiving unit for receiving response information fed back by the cloud server to the upgrade request, the response information including the identification information of a plurality of fragmented files and the content of the plurality of fragmented files The plurality of fragmented files determined by the message digest calculation are respectively verified with the first file check value, and the plurality of fragmented files are divided by the cloud server for the installation software package corresponding to the upgraded version number.
  • a second sending unit configured to send a download request for downloading a plurality of the slice files to the cloud server based on the identification information of the plurality of slice files
  • a second receiving unit used to Receive a plurality of fragmented files fed back by the cloud server in response to the download request
  • a calculation unit configured to perform message digest calculations according to the content of the received plurality of fragmented files, and determine the corresponding to the plurality of fragmented files The first calculated check value;
  • the upgrading unit is configured to if it is detected that the first calculated check value corresponding to a plurality of said fragmented files is consistent with the first file check value corresponding to the plurality of said fragmented files, Then, the cloud service application is upgraded according to the multiple fragment files.
  • the present application provides an electronic device, including a memory and a processor, the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes The following steps: sending an upgrade request for upgrading a cloud service application to a cloud server, where the upgrade request includes the upgrade version number of the cloud service application; receiving response information fed back by the cloud server to the upgrade request, the response information including The identification information of a plurality of fragmented files and the first file check value determined by performing message digest calculations on the plurality of fragmented files respectively according to the content of the plurality of fragmented files, the plurality of fragmented files The fragmented file is generated when the cloud server performs fragmentation processing on the installation software package corresponding to the upgraded version number; based on the identification information of the plurality of fragmented files, a download of the plurality of fragmented files is sent and downloaded Request to the cloud server; receive multiple fragment files fed back by the cloud server in response to the download request; perform message digest calculations on the received multiple fragment files to determine
  • this application provides a storage medium storing computer-readable instructions.
  • the computer-readable instructions When the computer-readable instructions are executed by one or more processors, the one or more processors perform the following steps: An upgrade request for an upgrade of a business application is sent to the cloud server, where the upgrade request includes the upgrade version number of the cloud service application; the response information fed back by the cloud server to the upgrade request is received, and the response information includes information about multiple fragmented files.
  • the identification information and the first file check value determined by performing message digest calculations on the plurality of fragment files respectively according to the content of the plurality of fragment files, and the plurality of fragment files are the Generated when the cloud server performs fragmentation processing on the installation software package corresponding to the upgrade version number; based on the identification information of the plurality of fragment files, sending a download request for downloading the plurality of fragment files to the cloud server ; Receive multiple fragmented files fed back by the cloud server for the download request; perform message digest calculations respectively according to the content of the received multiple fragmented files, and determine the first calculation corresponding to the multiple fragmented files Check value; if it is detected that the first calculated check value corresponding to a plurality of the fragment files is consistent with the first file check value corresponding to the plurality of fragment files, then according to the plurality of fragment files Upgrade the cloud service application.
  • this application avoids directly performing message digest calculations based on the entire upgrade installation package, reducing the complexity of calculations, and effectively reducing the amount of data calculations during data integrity verification. In turn, the occupation of system resources is reduced, and at the same time, the upgrade time of cloud business applications is reduced, and the upgrade efficiency of cloud business applications is improved.
  • Fig. 1 shows a schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of the present application can be applied.
  • Fig. 2 is a flowchart of a method for upgrading a cloud service application according to an exemplary embodiment of the application.
  • Fig. 3 is a flowchart of a method for upgrading a cloud service application according to an exemplary embodiment of the application.
  • FIG. 4 is a specific flowchart of step S230 of the cloud service application upgrade method shown in an exemplary embodiment of this application.
  • Fig. 5 is a flowchart of a method for upgrading a cloud service application according to an exemplary embodiment of the application.
  • FIG. 6 is a specific flowchart of step S260 of the cloud service application upgrade method shown in an exemplary embodiment of this application.
  • Fig. 7 is a block diagram of an apparatus for upgrading a cloud service application according to an exemplary embodiment of the present application.
  • Fig. 8 is an exemplary block diagram of an electronic device for implementing the foregoing cloud service application upgrade method according to an exemplary embodiment of the present application.
  • Fig. 9 is a computer-readable storage medium used to implement the foregoing cloud service application upgrade method according to an exemplary embodiment of the present application.
  • the technical solution of this application can be applied to the field of blockchain and/or big data technology.
  • the data involved such as fragmented files, can be stored in the server or in the blockchain, such as distributed storage through the blockchain ,
  • This application is not limited.
  • the cloud server can be a node in the blockchain.
  • Fig. 1 shows a schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of the present application can be applied.
  • the system architecture may include a client 101, a network 102, and a cloud server 103.
  • the cloud server 103 may be a server that provides cloud services and provides cloud service application upgrade services.
  • the client 101 is required to perform cloud service applications.
  • the network 102 is used as a medium for providing a communication link between the client 101 and the cloud server 103.
  • the network 102 may include various connection types, such as wired communication links, wireless communication links, and so on.
  • the numbers of the client 101, the network 102, and the cloud server 103 in FIG. 1 are merely illustrative. According to implementation needs, there may be any number of clients 101, networks 102, and cloud servers 103.
  • the cloud server 103 may be a server cluster composed of multiple servers.
  • the cloud server 103 of the present application may be composed of multiple node servers of the blockchain server system, and the client 101 may obtain the fragment file corresponding to the installation software package from any node server of the blockchain server system. Then the cloud service application upgrade method is performed. The client 101 also feeds back the upgrade result of the cloud service application upgrade to the multiple node servers of the blockchain server system, and the node server stores them, based on the security of blockchain data sharing And unchangeable features, effectively ensuring the security and reliability of cloud business application upgrades.
  • the client 101 sends an upgrade request for upgrading a cloud service application to the cloud server, the upgrade request includes the upgrade version number of the cloud service application; and receives response information from the cloud server for the upgrade request, and the response information includes the multiple
  • the content of a fragmented file is determined by the message digest calculation to verify the first file check value of multiple fragmented files respectively, and the multiple fragmented files are the cloud server fragments the installation software package corresponding to the upgraded version number Generated during processing.
  • the first calculation check value corresponding to the multiple fragment files is determined, and the received cloud service application installation software package is installed.
  • the first calculated check value corresponding to the multiple fragmented files corresponds to the first file check value corresponding to the multiple fragmented files. If the first calculated check value corresponding to the multiple fragmented files is detected, the first calculated check value corresponds to the multiple fragmented files. If the check values of the first file corresponding to the fragment files are all consistent, the cloud service application is upgraded according to multiple fragment files. While ensuring the data integrity of the upgrade installation package, it is avoided to directly send messages based on the entire upgrade installation package.
  • the summary calculation reduces the complexity of the calculation, which can effectively reduce the amount of data calculation when verifying data integrity, thereby reducing the occupation of system resources, and at the same time reducing the upgrade time of cloud business applications and improving the efficiency of cloud business applications. Upgrade efficiency.
  • the cloud service application upgrade method provided in the embodiments of the present application is generally executed by the client 101, and accordingly, the cloud service application upgrade apparatus is generally set in the client 101.
  • the implementation details of the technical solutions of the embodiments of the present application will be described in detail below.
  • FIG. 2 is a flowchart of a cloud service application upgrade method shown in an exemplary embodiment of this application.
  • the execution subject of the cloud service application upgrade method in this embodiment is the client 101, as shown in FIG.
  • the service application upgrade method may include the following steps S210 to S260, which are described in detail as follows.
  • step S210 an upgrade request for upgrading the cloud service application is sent to the cloud server, and the upgrade request includes the upgrade version number of the cloud service application.
  • the cloud service application is used as the client application software to realize the cloud service.
  • the upgrade request for upgrading the cloud service application can be sent to the cloud server.
  • the upgrade request carries at least the upgrade version number of the cloud service application that needs to be upgraded.
  • the upgrade request may also include the unique identification information of the client.
  • step S220 receive response information fed back by the cloud server to the upgrade request.
  • the response information includes the identification information of the multiple fragment files and the message digest calculation determined based on the content of the multiple fragment files.
  • the check value of the first file is verified separately, and multiple fragmented files are generated when the cloud server performs fragmentation processing on the installation software package corresponding to the upgraded version number.
  • the server after the server receives the upgrade request from the client, it feeds back to the client response information for the upgrade request.
  • the response information includes the information generated according to the installation software package information corresponding to the upgrade version number carried in the upgrade request. Multiple fragmented files. Due to the large amount of data corresponding to a single installation software package, in order to ensure the smooth transmission of data and the security of transmission, the cloud server can perform fragmentation processing on the installation software package corresponding to the upgraded version number to generate corresponding multiple fragment files , And calculate the content of the multiple fragment files respectively through the message digest algorithm to obtain the calculation result, and the calculation result is used as the first file check value for performing integrity verification on the content of the multiple fragment files. It is understandable that the response information also includes identification information of each fragmented file, and the identification information is unique identification information for identifying each fragmented file, and is used for the cloud server and the client to identify the fragmented file.
  • the split file obtained by splitting may include one or more files, and the data size of each split file is generally within a predetermined data size range.
  • the MD5 message digest algorithm or the SHA secure hash algorithm can be used to calculate the corresponding first file check value, so as to facilitate the calibration based on the first file.
  • the verification value verifies the content integrity of the installation software package, thereby ensuring the data integrity of the installation software package.
  • step S230 based on the identification information of the multiple fragment files, a download request for downloading the multiple fragment files is sent to the cloud server.
  • the client after the client receives the response information from the cloud server, it can generate a download request for downloading the multiple fragment files according to the identification information of the multiple fragment files contained in the response information, and Send the download request to the cloud server. It is understandable that the download request also includes identification information of each fragmented file.
  • step S240 a plurality of fragmented files fed back by the cloud server in response to the download request are received.
  • the cloud server when the cloud server receives the download request from the client, it feeds back the identification information of the multiple fragment files contained in the download request to the client the corresponding multiple fragment files, and the client receives the multiple fragment files from the cloud. Multiple fragmented files of the server.
  • step S250 a message digest calculation is performed respectively according to the content of the received multiple fragment files, and the first calculated check value corresponding to the multiple fragment files is determined.
  • the client calculates the first calculated check value corresponding to each fragment file according to the content contained in each fragment file received by the message digest algorithm, that is, according to the content contained in each fragment file Content, the first calculated check value of the fragment file is generated.
  • step S260 if it is detected that the first calculated check value corresponding to the multiple fragment files is consistent with the first file check value corresponding to the multiple fragment files, the cloud service application is performed according to the multiple fragment files. upgrade.
  • the client verifies the first calculated check value corresponding to the plurality of fragment files with the first file corresponding to the plurality of fragment files. The values are compared to determine whether the two are consistent. If it is detected that the first calculated check value corresponding to each fragment file is consistent with the first file check value corresponding to the fragment file, it indicates that the installation software package of the cloud business application received from the cloud server corresponds to Each of the fragmented files is complete. In other words, the content of each fragmented file has not been tampered with or the data has not been lost during the transmission process, and the client can perform operations on the cloud service application according to multiple fragmented files. Upgrade; otherwise, it means that the fragment file corresponding to the installation software package of the cloud service application received from the cloud server is not complete. At this time, the client can stop upgrading the cloud service application based on multiple fragment files.
  • the installation software package by splitting the installation software package into multiple fragmented files for transmission, when the installation software package is large, it can also enable the client to download the installation software package from the cloud server smoothly, reducing network fluctuations and upgrading
  • the first calculated check value corresponding to the multiple fragment files corresponding to the received cloud service application installation software package is combined with the first file check value corresponding to the multiple fragment files.
  • the cloud service application is upgraded according to the multiple fragmented files to ensure that the upgrade installation can be realized
  • it avoids directly calculating the message digest according to the entire upgrade installation package, reducing the complexity of the calculation, which can effectively reduce the amount of data calculation during data integrity verification, thereby reducing the occupation of system resources.
  • the upgrade time of cloud business applications is reduced, and the upgrade efficiency of cloud business applications is improved.
  • the response information fed back by the cloud server may also include the second file check value obtained by the cloud server according to the first file check value corresponding to the plurality of fragmented files through the message digest calculation.
  • the cloud server in this embodiment The service application upgrade method further includes: performing a message digest calculation according to the first calculation check value corresponding to the multiple fragment files to determine the second calculation check value; step S260 in this embodiment may specifically include: if multiple fragment files are detected The first calculated check value corresponding to a fragmented file is consistent with the first file check value corresponding to multiple fragmented files, and the second calculated check value is consistent with the second file check value, then according to multiple fragments
  • the file upgrades cloud business applications may be performed by the cloud server according to the first file check value corresponding to the plurality of fragmented files through the message digest calculation.
  • the cloud server in this embodiment The service application upgrade method further includes: performing a message digest calculation according to the first calculation check value corresponding to the multiple fragment files to determine the second calculation check value; step S260 in this embodiment may specifically include: if
  • the cloud server may also use the first file check value corresponding to the multiple fragment files as the calculation content, and pass the message summary
  • the algorithm performs message digest calculation on the calculated content to obtain the calculation result, which can be used as the second file check value for further checking the content integrity of the installation software package, and the cloud server adds the second file check value To the response message.
  • the client After determining the first calculated check value corresponding to multiple fragment files, the client can also use the first calculated check value corresponding to multiple fragment files as the calculation content, and send a message to the calculation content through the message digest algorithm
  • the digest calculation obtains the calculation result, and the calculation result may be used as the second calculated verification value for verifying the received fragment file.
  • the client When the client detects that the first calculated check value corresponding to multiple fragmented files is consistent with the first file check value corresponding to multiple fragmented files, the client can also compare the second calculated check value obtained by calculation with the response The second file check value contained in the information is compared. If the calculated second calculated check value is consistent with the second file check value contained in the response message, then it indicates the installation of the cloud service application received from the cloud server Each fragment file corresponding to the software package is complete, and the cloud service application can be upgraded based on multiple fragment files.
  • the response information fed back by the cloud server may also include fragmentation order information corresponding to multiple fragment files obtained when the cloud server performs fragmentation processing on the upgrade software package corresponding to the upgrade version number, and then according to the multiple
  • the message digest calculation is performed on the first calculated check value corresponding to the fragmented file
  • the step of determining the second calculated check value may specifically include: based on the first calculated check value corresponding to the plurality of fragmented files and the calculation of the plurality of fragmented files The message digest calculation is performed on the fragment order information, and the second calculation check value is determined.
  • the fragmentation order information corresponding to the multiple fragment files is used to identify the fragmentation order corresponding to the multiple fragment files when the cloud server performs fragmentation processing on the upgrade software package corresponding to the upgrade version number
  • the fragment sequence information can be a string of identification sequence information.
  • the fragment sequence information of the first fragment file obtained by fragmentation can be "000000001”
  • the second fragment file The fragment order information of can be "000000010”, and so on, of course, it is not limited to this.
  • the cloud server may also use the first file check value corresponding to the multiple fragment files and the fragment order information of the multiple fragment files as the calculation content, and perform the message digest calculation on the calculation content through the message digest algorithm to obtain the calculation result.
  • the calculation result can be used as the second file verification value for further verification of the content integrity of the installation software package.
  • the client may also use the first calculation check value corresponding to the multiple fragment files and the fragment order information of the multiple fragment files as the calculation content.
  • a message digest calculation is performed on the calculation content through a message digest algorithm to obtain a calculation result, and the calculation result can be used as a second calculated verification value for verifying the received fragment file.
  • FIG. 3 is a flowchart of a method for upgrading a cloud service application according to an exemplary embodiment of the application.
  • the first calculated check value corresponding to multiple fragment files and multiple fragments are used.
  • the message digest calculation is performed on the fragment order information of the file, and the step of determining the second calculation check value may specifically include step S310 to step S330, which are described in detail as follows.
  • step S310 the content attribute information corresponding to each fragment file is generated according to the first calculated check value corresponding to each fragment file and the fragment sequence information corresponding to each fragment file.
  • step S320 the content attribute information of each segment file is spliced based on the segment sequence information corresponding to each segment file to obtain the spliced information.
  • step S330 a message digest calculation is performed based on the spliced information, and a second calculation check value is determined.
  • the client When the client performs the message digest calculation based on the first calculated check value corresponding to multiple fragment files and the fragment order information of the multiple fragment files to determine the second calculated check value, it can firstly determine the second calculated check value according to the corresponding value of each fragment file.
  • the first calculated check value and the fragment order information corresponding to each fragment file generate the content attribute information corresponding to each fragment file, for example, when the first calculated check value corresponding to the fragment file is "ABC11100BNQ" and the fragment file corresponds If the fragment sequence information of is "000000001", the content attribute information corresponding to the fragment file can be "ABC11100BNQ000000001".
  • the client then performs splicing processing on the content attribute information of each slice file based on the slice order information corresponding to each slice file to obtain the spliced information. If the content attribute information of each slice file is A1, A2...An, then The spliced information is (A1, A2,..., An); finally, the message digest calculation is performed based on the spliced information, and the second calculation check value is determined.
  • the client performs message digest calculation based on the first calculated check value corresponding to multiple fragment files and the fragment order information of the multiple fragment files to determine the second calculated check value in a way that is based on the cloud server
  • the check value of the first file corresponding to the plurality of fragment files and the fragment sequence information of the plurality of fragment files are calculated in the same manner to determine the check value of the second file.
  • the complexity of the message digest calculation can be further increased. It can effectively detect the situation that criminals intercept the fragment files of the installation software package and tamper with the content of the installation software package, which improves the security of data transmission.
  • FIG. 4 is a specific flowchart of step S230 of the cloud service application upgrade method shown in an exemplary embodiment of this application.
  • step S230 when the response information fed back by the cloud server includes the fragmentation sequence information corresponding to the multiple fragment files obtained by the cloud server performing fragmentation processing on the upgrade software package corresponding to the upgrade version number, step S230 is specifically It may include step S410 to step S430, which are described in detail as follows.
  • Step S410 Determine the download sequence of the multiple fragment files based on the fragment order information of the multiple fragment files.
  • the client can determine the download sequence of the multiple fragment files based on the fragment sequence information of the multiple fragment files.
  • the fragment order information of multiple fragment files can be directly used as the download order of multiple fragment files.
  • the first one obtained when the installation software package is fragmented can be divided according to the fragment order information.
  • the fragment file is used as the first fragment file to be downloaded, and so on, so as to realize the determination of the download sequence of the multiple fragment files based on the fragment sequence information of the multiple fragment files.
  • step S420 the segment files to be downloaded are selected based on the download order, and a download request is generated using identification information corresponding to the selected segment files.
  • the client can select the fragment files to be downloaded based on the download order. Specifically, it can generate a download request based on the identification information corresponding to the selected fragment files, so as to facilitate the granting of multiple fragment files.
  • the slicing sequence of the slice file, the slice file is downloaded from the cloud server.
  • Step S430 Send a download request to the cloud server.
  • the client sends the generated download request to the cloud server, so as to download the corresponding fragmented file from the cloud server.
  • the download order of the multiple fragment files is determined based on the fragment order information of the multiple fragment files, and the fragment files are downloaded one by one from the cloud server according to the download order of the multiple fragment files .
  • FIG. 5 is a flowchart of a cloud service application upgrade method shown in an exemplary embodiment of this application.
  • the cloud service application upgrade method in this embodiment may further include steps S510 to S520, which are described in detail as follows.
  • step S510 if the first calculated check value calculated according to the content of the received fragment file is inconsistent with the first file check value corresponding to the received fragment file, stop generating a download request to the cloud server, and generate Notification of failure to download the upgrade package.
  • the client calculates the first calculated check value according to the content of the received fragmented file, and compares the calculated first calculated check value with the first file check value corresponding to the received fragmented file. If the calculated first calculated check value is inconsistent with the first file check value corresponding to the received fragment file, it means that the content of the received fragment file has been tampered with or the received fragment file has data loss In case, the client stops making a download request to the cloud server, and a failed request for downloading the upgrade software package fails.
  • Step S520 Send a failure notification to the cloud server.
  • the client sends a failure notification to the cloud server, so that the cloud server can re-issue the upgrade software package to ensure the normal progress of the upgrade.
  • the client stops making download requests to the server, which can reduce unnecessary data processing.
  • the client also generates a failed request for downloading the upgrade software package and sends the failed request to the cloud server to make the cloud server Obtaining the failure of the client to download the upgrade package in a timely manner can also enable the cloud server to reduce unnecessary data processing, thereby reducing the occupation of cloud server system resources, and improving the utilization of cloud server system resources.
  • step S260 is a specific flowchart of step S260 of the cloud service application upgrade method shown in an exemplary embodiment of this application.
  • step S260 when the response information fed back by the cloud server includes the fragmentation sequence information corresponding to the multiple fragment files obtained by the cloud server performing fragmentation processing on the upgrade software package corresponding to the upgrade version number, step S260 is specifically It may include step S610 to step S620, which are described in detail as follows.
  • step S610 the multiple fragment files are reorganized according to the fragment sequence information corresponding to the multiple fragment files to generate an upgrade software package.
  • the client determines that the respective fragment files corresponding to the upgrade software package obtained from the cloud server are complete, it can reorganize the multiple fragment files according to the fragment order information corresponding to the multiple fragment files. Generate the corresponding upgrade package.
  • step S620 the cloud service application is upgraded based on the upgrade software package.
  • the client generates the corresponding upgrade software package, and performs the upgrade operation based on the generated upgrade software package to upgrade the cloud service application, and then realizes the upgrade of the cloud service application based on the cloud service application corresponding to the upgraded version number. After a complete upgrade, you can also delete the installation software package with the old version number.
  • FIG. 7 schematically shows a block diagram of a cloud service application upgrading apparatus according to an embodiment of the present application.
  • the cloud service application upgrading apparatus may be integrated in an electronic device.
  • the cloud service application according to an embodiment of the present application The upgrading apparatus 700 may include: a first sending unit 710, a first receiving unit 720, a second sending unit 730, a second receiving unit 740, a first calculating unit 750, and an upgrading unit 760; and a first sending unit 710 for sending
  • the upgrade request for the upgrade of the cloud service application is sent to the cloud server, and the upgrade request includes the upgrade version number of the cloud service application;
  • the first receiving unit 720 is configured to receive response information fed back by the cloud server to the upgrade request, and the response information includes multiple fragment files
  • the first file verification value is determined by performing the message digest calculation on the multiple fragment files respectively according to the content of the multiple fragment files, and the multiple fragment files are corresponding to the upgrade version number of the cloud server
  • the second sending unit 730 is configured to send a download request
  • the response information further includes a second file check value obtained by the cloud server performing a message digest calculation based on the first file check value corresponding to the multiple fragmented files
  • the cloud service application upgrade apparatus further includes: a second calculation unit, It is used to calculate the message digest according to the first calculation check value corresponding to the multiple fragment files to determine the second calculation check value;
  • the upgrading unit 760 is configured to: if the first calculation check value corresponding to the multiple fragment files is detected If the verification value is consistent with the first file verification value corresponding to the multiple fragment files, and the second calculated verification value is consistent with the second file verification value, the cloud service application is upgraded according to the multiple fragment files.
  • the response information further includes fragmentation sequence information corresponding to multiple fragment files obtained when the cloud server performs fragmentation processing on the upgrade software package corresponding to the upgrade version number
  • the second calculation unit is configured to: The message digest calculation is performed on the first calculated check value corresponding to the multiple fragment files and the fragment order information of the multiple fragment files, and the second calculated check value is determined.
  • the second calculation unit is configured to: generate content attribute information corresponding to each fragment file according to the first calculation check value corresponding to each fragment file and the fragment sequence information corresponding to each fragment file;
  • the piece sequence information corresponding to the piece file performs splicing processing on the content attribute information of each piece file to obtain the spliced information; based on the spliced information, the message digest calculation is performed to determine the second calculation check value.
  • the second sending unit 730 is configured to: determine the download order of the plurality of fragment files based on the fragment order information of the plurality of fragment files; select the fragment files to be downloaded based on the download order to select the selected fragment files.
  • the identification information corresponding to the slice file generates a download request; the download request is sent to the cloud server.
  • the cloud service application upgrade device further includes: an execution unit, configured to: if the first calculated check value calculated according to the content of the received fragment file is the first file check value corresponding to the received fragment file If they are not consistent, stop generating a download request to the cloud server, and generate a failure notification that downloads the upgrade software package failed; the third sending unit is used to send a failure notification to the cloud server.
  • an execution unit configured to: if the first calculated check value calculated according to the content of the received fragment file is the first file check value corresponding to the received fragment file If they are not consistent, stop generating a download request to the cloud server, and generate a failure notification that downloads the upgrade software package failed; the third sending unit is used to send a failure notification to the cloud server.
  • the upgrade unit is configured to: reorganize the multiple fragment files according to the fragment sequence information corresponding to the multiple fragment files to generate an upgrade software package; and upgrade the cloud service application based on the upgrade software package.
  • the example embodiments described here can be implemented by software, or can be implemented by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network , Including several instructions to make a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) execute the method according to the embodiment of the present application.
  • a non-volatile storage medium which can be a CD-ROM, U disk, mobile hard disk, etc.
  • Including several instructions to make a computing device which can be a personal computer, a server, a mobile terminal, or a network device, etc.
  • an electronic device capable of implementing the above method is also provided.
  • FIG. 8 is an exemplary block diagram of an electronic device for implementing the foregoing cloud service application upgrade method according to an exemplary embodiment of this application.
  • the electronic device 800 shown in FIG. 8 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present application.
  • the electronic device 800 is represented in the form of a general-purpose computing device.
  • the components of the electronic device 800 may include, but are not limited to: the aforementioned at least one processing unit 810, the aforementioned at least one storage unit 820, and a bus 830 connecting different system components (including the storage unit 820 and the processing unit 810).
  • the storage unit stores program code, and the program code can be executed by the processing unit 810, so that the processing unit 810 executes the various exemplary methods described in the “Exemplary Method” section of this specification. Steps of implementation.
  • the processing unit 810 may perform step S210 to step S240 as shown in FIG. 2.
  • the storage unit 820 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 8201 and/or a cache storage unit 8202, and may further include a read-only storage unit (ROM) 8203.
  • RAM random access storage unit
  • ROM read-only storage unit
  • the storage unit 820 may also include a program/utility tool 8204 having a set of (at least one) program module 8205.
  • program module 8205 includes but is not limited to: an operating system, one or more application programs, other program modules, and program data, Each of these examples or some combination may include the implementation of a network environment.
  • the bus 830 may represent one or more of several types of bus structures, including a storage unit bus or a storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local area using any bus structure among multiple bus structures. bus.
  • the electronic device 800 can also communicate with one or more external devices 1000 (such as keyboards, pointing devices, Bluetooth devices, etc.), and can also communicate with one or more devices that enable users to interact with the electronic device 800, and/or communicate with Any device (such as a router, modem, etc.) that enables the electronic device 800 to communicate with one or more other computing devices. Such communication may be performed through an input/output (I/O) interface 740.
  • the electronic device 800 may also communicate with one or more networks (for example, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 860. As shown in the figure, the network adapter 860 communicates with other modules of the electronic device 800 through the bus 830.
  • LAN local area network
  • WAN wide area network
  • public network such as the Internet
  • the processing unit may be a processor
  • the storage unit may be a memory
  • the program code may be computer readable instructions.
  • the electronic device may include a memory and a processor, and computer-readable instructions are stored in the memory, and when the computer-readable instructions are executed by the processor, the processor can cause the processor to perform part or all of the steps in the foregoing method.
  • the example embodiments described here can be implemented by software, or can be implemented by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network , Including several instructions to make a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) execute the method according to the embodiment of the present application.
  • a computing device which can be a personal computer, a server, a terminal device, or a network device, etc.
  • the embodiments of the present application also provide a storage medium (such as a computer-readable storage medium) storing computer-readable instructions.
  • a storage medium such as a computer-readable storage medium
  • the one or more processors Perform some or all of the steps in the above method.
  • a computer-readable storage medium is also provided, on which is stored a program product capable of implementing the above-mentioned method in this specification.
  • each aspect of the present application can also be implemented in the form of a program product, which includes program code.
  • the program product runs on a terminal device, the program code is used to make the The electronic device executes the steps described in the above-mentioned "Exemplary Method" section of this specification according to various exemplary embodiments of the present application.
  • FIG. 9 is a computer-readable storage medium for implementing the above-mentioned data verification method according to an exemplary embodiment of the present application.
  • FIG. 9 depicts a program product 900 for implementing the above method according to an embodiment of the present application, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be installed on an electronic device, such as a personal computer run.
  • CD-ROM portable compact disk read-only memory
  • the program product of this application is not limited to this.
  • the readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, device, or device.
  • the program product can use any combination of one or more readable media.
  • the readable medium may be a readable signal medium or a readable storage medium.
  • the readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above. More specific examples (non-exhaustive list) of readable storage media include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Type programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • the computer-readable signal medium may include a data signal propagated in baseband or as a part of a carrier wave, and readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the readable signal medium may also be any readable medium other than a readable storage medium, and the readable medium may send, propagate, or transmit a program for use by or in combination with the instruction execution system, apparatus, or device.
  • the program code contained on the readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
  • the medium involved in this application such as a computer-readable storage medium, may be non-volatile or volatile.
  • the program code used to perform the operations of this application can be written in any combination of one or more programming languages.
  • the programming languages include object-oriented programming languages—such as Java, C++, etc., as well as conventional procedural programming languages. Programming language-such as "C" language or similar programming language.
  • the program code can be executed entirely on the user's computing device, partly on the user's device, executed as an independent software package, partly on the user's computing device and partly executed on the remote computing device, or entirely on the remote computing device or server Executed on.
  • the remote computing device can be connected to a user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (for example, using Internet service providers). Business to connect via the Internet).
  • LAN local area network
  • WAN wide area network
  • Internet service providers for example, using Internet service providers.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

A method and an apparatus for upgrading a cloud service application, an electronic device, and a storage medium, relating to the technical field of cloud services. The method for upgrading a cloud service application comprises: sending an upgrade request for upgrading a cloud service application to a cloud server (S210), the upgrade request comprising an upgrade version number for the cloud service application; and receiving response information returned by the cloud server for the upgrade request (S220), the response information comprising identification information of a plurality of fragmentary files and first file checksum values for respectively checking the fragmentary files, determined by respectively performing message digest calculation on the basis of the content of the fragmentary files. The fragmentary files in the present method may be acquired from any node in a blockchain. The present method is able to effectively reduce data computation during data integrity checking, thereby reducing system resource occupation, while also reducing upgrading time for a cloud service application, improving upgrading efficiency for the cloud service application.

Description

云业务应用升级方法、装置、电子设备和存储介质Cloud service application upgrade method, device, electronic equipment and storage medium
本申请要求于2020年7月28日提交中国专利局、申请号为202010739625.5,发明名称为“云业务应用升级方法、装置、电子设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on July 28, 2020, the application number is 202010739625.5, and the invention title is "cloud service application upgrade methods, devices, electronic equipment, and storage media". The entire content of the application is approved The reference is incorporated in this application.
技术领域Technical field
本申请涉及云服务技术领域,特别是涉及基于云业务应用升级方法、装置、电子设备和存储介质。This application relates to the technical field of cloud services, and in particular to methods, devices, electronic equipment, and storage media for cloud-based service application upgrades.
背景技术Background technique
在客户端对云业务应用进行升级时,客户端需要从云服务器中获取对应的安装软件包。When the client upgrades the cloud service application, the client needs to obtain the corresponding installation software package from the cloud server.
相关技术中,一般通过客户端向云端服务器发送升级请求,再由云端服务器将对应的升级安装包直接下发至客户端。发明人意识到,由于升级安装包包含的数据量较大,因此传输过程容易受到网路环境的影响,此外,为了保证升级的成功率,一般需要根据升级安装包所包含的全部内容进行消息摘要计算,并根据计算的消息摘要校验数据完整性,而在升级安装包的数据量较大的情况下,进行消息摘要计算的计算复杂度较大,导致云业务应用的升级时间长,云业务应用的升级效率较低。In related technologies, generally, the client sends an upgrade request to the cloud server, and the cloud server directly issues the corresponding upgrade installation package to the client. The inventor realized that due to the large amount of data contained in the upgrade installation package, the transmission process is easily affected by the network environment. In addition, in order to ensure the success rate of the upgrade, it is generally necessary to perform a message summary based on all the contents contained in the upgrade installation package. Calculate, and verify data integrity based on the calculated message digest. However, when the data volume of the upgrade installation package is large, the calculation complexity of the message digest calculation is relatively large, which leads to a long upgrade time for cloud business applications. The application upgrade efficiency is low.
发明内容Summary of the invention
基于此,本申请提供了一种云业务应用升级方法、装置、电子设备和存储介质,在保证可以对升级安装包的数据完整性的同时,可以有效减少云业务应用的升级时间,提高云业务应用的升级效率。Based on this, this application provides a cloud service application upgrade method, device, electronic device, and storage medium, which can effectively reduce the upgrade time of cloud service applications and improve cloud service while ensuring the data integrity of the upgrade installation package. Application upgrade efficiency.
第一方面,本申请提供了一种云业务应用升级方法,包括:发送对云业务应用进行升级的升级请求至云端服务器,所述升级请求包括云业务应用的升级版本号;接收所述云端服务器针对所述升级请求反馈的响应信息,所述响应信息包括多个分片文件的标识信息以及分别根据多个所述分片文件的内容进行消息摘要计算所确定的对多个所述分片文件分别进行校验第一文件校验值,所述多个分片文件是所述云端服务器对所述升级版本号对应的安装软件包进行分片处理时所生成;基于多个所述分片文件的标识信息,发送下载多个所述分片文件的下载请求至所述云端服务器;接收所述云端服务器针对所述下载请求反馈的多个分片文件;根据接收的多个所述分片文件的内容分别进行消息摘要计算,确定多个所述分片文件对应的第一计算校验值;若检测到多个所述分片文件对应的第一计算校验值与多个所述分片文件对应的第一文件校验值均一致,则根据多个所述分片文件对所述云业务应用进行升级。In the first aspect, this application provides a cloud service application upgrade method, which includes: sending an upgrade request for upgrading a cloud service application to a cloud server, where the upgrade request includes an upgrade version number of the cloud service application; and receiving the cloud server Response information fed back to the upgrade request, where the response information includes identification information of a plurality of fragmented files and a message digest calculation determined based on the content of the plurality of fragmented files respectively for the plurality of fragmented files The first file verification value is verified separately, and the multiple fragment files are generated when the cloud server performs fragmentation processing on the installation software package corresponding to the upgraded version number; based on the plurality of fragment files Send a download request for downloading a plurality of the fragmented files to the cloud server; receive a plurality of fragmented files fed back by the cloud server for the download request; according to the received plurality of fragmented files Perform message digest calculations on the content of each of the fragmented files to determine the first calculated check value corresponding to the plurality of fragmented files; if the first calculated check value corresponding to the plurality of fragmented files and the plurality of fragmented files are detected If the first file check values corresponding to the files are all consistent, the cloud service application is upgraded according to the multiple fragment files.
第二方面,本申请提供了一种云业务应用升级装置,包括:第一发送单元,用于发送对云业务应用进行升级的升级请求至云端服务器,所述升级请求包括云业务应用的升级版本号;第一接收单元,用于接收所述云端服务器针对所述升级请求反馈的响应信息,所述响应信息包括多个分片文件的标识信息以及分别根据多个所述分片文件的内容进行消息摘要计算所确定的对多个所述分片文件分别进行校验第一文件校验值,所述多个分片文件是所述云端服务器对所述升级版本号对应的安装软件包进行分片处理时所生成;第二发送单元,用于基于多个所述分片文件的标识信息,发送下载多个所述分片文件的下载请求至所述云端服务器;第二接收单元,用于接收所述云端服务器针对所述下载请求反馈的多个分片文件;计算单元,用于根据接收的多个所述分片文件的内容分别进行消息摘要计算,确定多个所述分片文件对应的第一计算校验值;升级单元,用于若检测到多个所述分片文件对应的第一计算校验值与多个所述分片文件对应的第一文件校验值均一致,则根据多个所述分片文件对所述云业务应用进行升级。In a second aspect, this application provides a cloud service application upgrade device, including: a first sending unit, configured to send an upgrade request for upgrading a cloud service application to a cloud server, where the upgrade request includes an upgraded version of the cloud service application Number; first receiving unit for receiving response information fed back by the cloud server to the upgrade request, the response information including the identification information of a plurality of fragmented files and the content of the plurality of fragmented files The plurality of fragmented files determined by the message digest calculation are respectively verified with the first file check value, and the plurality of fragmented files are divided by the cloud server for the installation software package corresponding to the upgraded version number. Generated during slice processing; a second sending unit, configured to send a download request for downloading a plurality of the slice files to the cloud server based on the identification information of the plurality of slice files; a second receiving unit, used to Receive a plurality of fragmented files fed back by the cloud server in response to the download request; a calculation unit, configured to perform message digest calculations according to the content of the received plurality of fragmented files, and determine the corresponding to the plurality of fragmented files The first calculated check value; the upgrading unit is configured to if it is detected that the first calculated check value corresponding to a plurality of said fragmented files is consistent with the first file check value corresponding to the plurality of said fragmented files, Then, the cloud service application is upgraded according to the multiple fragment files.
第三方面,本申请提供了一种电子设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行以下步 骤:发送对云业务应用进行升级的升级请求至云端服务器,所述升级请求包括云业务应用的升级版本号;接收所述云端服务器针对所述升级请求反馈的响应信息,所述响应信息包括多个分片文件的标识信息以及分别根据多个所述分片文件的内容进行消息摘要计算所确定的对多个所述分片文件分别进行校验第一文件校验值,所述多个分片文件是所述云端服务器对所述升级版本号对应的安装软件包进行分片处理时所生成;基于多个所述分片文件的标识信息,发送下载多个所述分片文件的下载请求至所述云端服务器;接收所述云端服务器针对所述下载请求反馈的多个分片文件;根据接收的多个所述分片文件的内容分别进行消息摘要计算,确定多个所述分片文件对应的第一计算校验值;若检测到多个所述分片文件对应的第一计算校验值与多个所述分片文件对应的第一文件校验值均一致,则根据多个所述分片文件对所述云业务应用进行升级。In a third aspect, the present application provides an electronic device, including a memory and a processor, the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes The following steps: sending an upgrade request for upgrading a cloud service application to a cloud server, where the upgrade request includes the upgrade version number of the cloud service application; receiving response information fed back by the cloud server to the upgrade request, the response information including The identification information of a plurality of fragmented files and the first file check value determined by performing message digest calculations on the plurality of fragmented files respectively according to the content of the plurality of fragmented files, the plurality of fragmented files The fragmented file is generated when the cloud server performs fragmentation processing on the installation software package corresponding to the upgraded version number; based on the identification information of the plurality of fragmented files, a download of the plurality of fragmented files is sent and downloaded Request to the cloud server; receive multiple fragment files fed back by the cloud server in response to the download request; perform message digest calculations on the received multiple fragment files to determine multiple fragments The first calculated check value corresponding to the file; if it is detected that the first calculated check value corresponding to a plurality of the fragmented files is consistent with the first file check value corresponding to the plurality of fragmented files, then according to the Each of the fragmented files upgrades the cloud service application.
第四方面,本申请提供了一种存储有计算机可读指令的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:发送对云业务应用进行升级的升级请求至云端服务器,所述升级请求包括云业务应用的升级版本号;接收所述云端服务器针对所述升级请求反馈的响应信息,所述响应信息包括多个分片文件的标识信息以及分别根据多个所述分片文件的内容进行消息摘要计算所确定的对多个所述分片文件分别进行校验第一文件校验值,所述多个分片文件是所述云端服务器对所述升级版本号对应的安装软件包进行分片处理时所生成;基于多个所述分片文件的标识信息,发送下载多个所述分片文件的下载请求至所述云端服务器;接收所述云端服务器针对所述下载请求反馈的多个分片文件;根据接收的多个所述分片文件的内容分别进行消息摘要计算,确定多个所述分片文件对应的第一计算校验值;若检测到多个所述分片文件对应的第一计算校验值与多个所述分片文件对应的第一文件校验值均一致,则根据多个所述分片文件对所述云业务应用进行升级。In a fourth aspect, this application provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors perform the following steps: An upgrade request for an upgrade of a business application is sent to the cloud server, where the upgrade request includes the upgrade version number of the cloud service application; the response information fed back by the cloud server to the upgrade request is received, and the response information includes information about multiple fragmented files. The identification information and the first file check value determined by performing message digest calculations on the plurality of fragment files respectively according to the content of the plurality of fragment files, and the plurality of fragment files are the Generated when the cloud server performs fragmentation processing on the installation software package corresponding to the upgrade version number; based on the identification information of the plurality of fragment files, sending a download request for downloading the plurality of fragment files to the cloud server ; Receive multiple fragmented files fed back by the cloud server for the download request; perform message digest calculations respectively according to the content of the received multiple fragmented files, and determine the first calculation corresponding to the multiple fragmented files Check value; if it is detected that the first calculated check value corresponding to a plurality of the fragment files is consistent with the first file check value corresponding to the plurality of fragment files, then according to the plurality of fragment files Upgrade the cloud service application.
本申请在保证可以对升级安装包的数据完整性的同时,避免根据整个升级安装包直接进行消息摘要计算,降低计算的复杂度,从而可以有效减少对数据完整性校验时的数据计算量,进而减少了***资源的占用,同时还减少了云业务应用的升级时间,提高了云业务应用的升级效率。While ensuring the data integrity of the upgrade installation package, this application avoids directly performing message digest calculations based on the entire upgrade installation package, reducing the complexity of calculations, and effectively reducing the amount of data calculations during data integrity verification. In turn, the occupation of system resources is reduced, and at the same time, the upgrade time of cloud business applications is reduced, and the upgrade efficiency of cloud business applications is improved.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性的,并不能限制本申请。It should be understood that the above general description and the following detailed description are only exemplary and cannot limit the application.
附图说明Description of the drawings
图1示出了可以应用本申请实施例的技术方案的示例性***架构的示意图。Fig. 1 shows a schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of the present application can be applied.
图2为本申请一示例性实施例示出的云业务应用升级方法的流程图。Fig. 2 is a flowchart of a method for upgrading a cloud service application according to an exemplary embodiment of the application.
图3为本申请一示例性实施例示出的云业务应用升级方法的流程图。Fig. 3 is a flowchart of a method for upgrading a cloud service application according to an exemplary embodiment of the application.
图4为本申请一示例性实施例示出的云业务应用升级方法的步骤S230的具体流程图。FIG. 4 is a specific flowchart of step S230 of the cloud service application upgrade method shown in an exemplary embodiment of this application.
图5为本申请一示例性实施例示出的云业务应用升级方法的流程图。Fig. 5 is a flowchart of a method for upgrading a cloud service application according to an exemplary embodiment of the application.
图6为本申请一示例性实施例示出的云业务应用升级方法的步骤S260的具体流程图。FIG. 6 is a specific flowchart of step S260 of the cloud service application upgrade method shown in an exemplary embodiment of this application.
图7是本申请一示例性实施例示出的一种云业务应用升级装置的框图。Fig. 7 is a block diagram of an apparatus for upgrading a cloud service application according to an exemplary embodiment of the present application.
图8是本申请一示例性实施例示出的一种用于实现上述云业务应用升级方法的电子设备示例框图。Fig. 8 is an exemplary block diagram of an electronic device for implementing the foregoing cloud service application upgrade method according to an exemplary embodiment of the present application.
图9是本申请一示例性实施例示出的一种用于实现上述云业务应用升级方法的计算机可读存储介质。Fig. 9 is a computer-readable storage medium used to implement the foregoing cloud service application upgrade method according to an exemplary embodiment of the present application.
具体实施方式Detailed ways
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本申请将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms, and should not be construed as being limited to the examples set forth herein; on the contrary, the provision of these embodiments makes this application more comprehensive and complete, and fully conveys the concept of the example embodiments To those skilled in the art.
此外,所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施例中。 在下面的描述中,提供许多具体细节从而给出对本申请的实施例的充分理解。然而,本领域技术人员将意识到,可以实践本申请的技术方案而没有特定细节中的一个或更多,或者可以采用其它的方法、组元、装置、步骤等。在其它情况下,不详细示出或描述公知方法、装置、实现或者操作以避免模糊本申请的各方面。In addition, the described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to give a sufficient understanding of the embodiments of the present application. However, those skilled in the art will realize that the technical solutions of the present application can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. can be used. In other cases, well-known methods, devices, implementations or operations are not shown or described in detail in order to avoid obscuring various aspects of the present application.
附图中所示的方框图仅仅是功能实体,不一定必须与物理上独立的实体相对应。即,可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。The block diagrams shown in the drawings are merely functional entities, and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in the form of software, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and/or processor devices and/or microcontroller devices. entity.
附图中所示的流程图仅是示例性说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解,而有的操作/步骤可以合并或部分合并,因此实际执行的顺序有可能根据实际情况改变。The flowchart shown in the drawings is only an exemplary description, and does not necessarily include all contents and operations/steps, nor does it have to be performed in the described order. For example, some operations/steps can be decomposed, and some operations/steps can be combined or partially combined, so the actual execution order may be changed according to actual conditions.
本申请的技术方案可应用于区块链和/或大数据技术领域,涉及的数据如分片文件等可存储于服务器中,也可以存储于区块链中,比如通过区块链分布式存储,本申请不做限定。例如,云服务器可以为区块链中的节点。The technical solution of this application can be applied to the field of blockchain and/or big data technology. The data involved, such as fragmented files, can be stored in the server or in the blockchain, such as distributed storage through the blockchain , This application is not limited. For example, the cloud server can be a node in the blockchain.
图1示出了可以应用本申请实施例的技术方案的示例性***架构的示意图。Fig. 1 shows a schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of the present application can be applied.
如图1所示,***架构可以包括客户端101、网络102和云端服务器103,该云端服务器103可以为提供云业务以及提供云业务应用升级服务的服务器,客户端101为需要进行云业务应用进行升级的目标电子设备。网络102用以在客户端101和云端服务器103之间提供通信链路的介质。网络102可以包括各种连接类型,例如有线通信链路、无线通信链路等等。As shown in Figure 1, the system architecture may include a client 101, a network 102, and a cloud server 103. The cloud server 103 may be a server that provides cloud services and provides cloud service application upgrade services. The client 101 is required to perform cloud service applications. The target electronic device for the upgrade. The network 102 is used as a medium for providing a communication link between the client 101 and the cloud server 103. The network 102 may include various connection types, such as wired communication links, wireless communication links, and so on.
应该理解,图1中的客户端101、网络102和云端服务器103的数目仅仅是示意性的。根据实现需要,可以具有任意数目的客户端101、网络102和云端服务器103,例如云端服务器103可以是多个服务器组成的服务器集群等。It should be understood that the numbers of the client 101, the network 102, and the cloud server 103 in FIG. 1 are merely illustrative. According to implementation needs, there may be any number of clients 101, networks 102, and cloud servers 103. For example, the cloud server 103 may be a server cluster composed of multiple servers.
可选的,本申请的云端服务器103可以由区块链服务器***的多个节点服务器组成,客户端101可以从区块链服务器***的任意一个节点服务器中获取安装软件包对应的分片文件,然后进行云业务应用升级方法,客户端101还将云业务应用升级的升级结果反馈至区块链服务器***的多个节点服务器中,并由节点服务器进行存储,基于区块链数据共享的安全性和不可更改特性,有效保证云业务应用升级的安全性和可靠性。Optionally, the cloud server 103 of the present application may be composed of multiple node servers of the blockchain server system, and the client 101 may obtain the fragment file corresponding to the installation software package from any node server of the blockchain server system. Then the cloud service application upgrade method is performed. The client 101 also feeds back the upgrade result of the cloud service application upgrade to the multiple node servers of the blockchain server system, and the node server stores them, based on the security of blockchain data sharing And unchangeable features, effectively ensuring the security and reliability of cloud business application upgrades.
本实施例中的客户端101发送对云业务应用进行升级的升级请求至云端服务器,升级请求包括云业务应用的升级版本号;接收云端服务器针对升级请求反馈的响应信息,响应信息包括分别根据多个分片文件的内容进行消息摘要计算所确定的对多个分片文件分别进行校验第一文件校验值,多个分片文件是云端服务器对升级版本号对应的安装软件包进行分片处理时所生成。发送下载多个分片文件的下载请求至云端服务器;接收云端服务器针对下载请求反馈的多个分片文件;根据接收的多个分片文件的内容分别进行消息摘要计算,确定多个分片文件对应的第一计算校验值;若检测到多个分片文件对应的第一计算校验值与多个分片文件对应的第一文件校验值均一致,则根据多个分片文件对云业务应用进行升级。In this embodiment, the client 101 sends an upgrade request for upgrading a cloud service application to the cloud server, the upgrade request includes the upgrade version number of the cloud service application; and receives response information from the cloud server for the upgrade request, and the response information includes the multiple The content of a fragmented file is determined by the message digest calculation to verify the first file check value of multiple fragmented files respectively, and the multiple fragmented files are the cloud server fragments the installation software package corresponding to the upgraded version number Generated during processing. Send a download request for downloading multiple fragmented files to the cloud server; receive multiple fragmented files fed back by the cloud server for the download request; perform message digest calculations based on the content of the received multiple fragmented files to determine multiple fragmented files Corresponding first calculated check value; if it is detected that the first calculated check value corresponding to multiple fragmented files is consistent with the first file check value corresponding to multiple fragmented files, then according to the multiple fragmented file pairs Cloud business applications are upgraded.
通过根据接收的云业务应用安装软件包对应的多个分片文件的内容分别进行消息摘要计算,确定多个分片文件对应的第一计算校验值,并将接收的云业务应用安装软件包对应的多个分片文件对应的第一计算校验值与多个分片文件对应的第一文件校验值,若检测到多个分片文件对应的第一计算校验值与多个分片文件对应的第一文件校验值均一致,则根据多个分片文件对云业务应用进行升级,在保证可以对升级安装包的数据完整性的同时,避免根据整个升级安装包直接进行消息摘要计算,降低计算的复杂度,从而可以有效减少对数据完整性校验时的数据计算量,进而减少了***资源的占用,同时还减少了云业务应用的升级时间,提高了云业务应用的升级效率。By respectively performing message digest calculations according to the contents of the multiple fragment files corresponding to the received cloud service application installation software package, the first calculation check value corresponding to the multiple fragment files is determined, and the received cloud service application installation software package is installed The first calculated check value corresponding to the multiple fragmented files corresponds to the first file check value corresponding to the multiple fragmented files. If the first calculated check value corresponding to the multiple fragmented files is detected, the first calculated check value corresponds to the multiple fragmented files. If the check values of the first file corresponding to the fragment files are all consistent, the cloud service application is upgraded according to multiple fragment files. While ensuring the data integrity of the upgrade installation package, it is avoided to directly send messages based on the entire upgrade installation package. The summary calculation reduces the complexity of the calculation, which can effectively reduce the amount of data calculation when verifying data integrity, thereby reducing the occupation of system resources, and at the same time reducing the upgrade time of cloud business applications and improving the efficiency of cloud business applications. Upgrade efficiency.
需要说明的是,本申请实施例所提供的云业务应用升级方法一般由客户端101执行,相应地,云业务应用升级装置一般设置于客户端101中。以下对本申请实施例的技术方案的实现细节进行详细阐述。It should be noted that the cloud service application upgrade method provided in the embodiments of the present application is generally executed by the client 101, and accordingly, the cloud service application upgrade apparatus is generally set in the client 101. The implementation details of the technical solutions of the embodiments of the present application will be described in detail below.
参考图2,图2为本申请一示例性实施例示出的云业务应用升级方法的流程图,本实施例中的云业务应用升级方法的执行主体为客户端101,如图2所示的云业务应用升级方法可包括如下步骤S210至步骤S260,详细说明如下。Referring to FIG. 2, FIG. 2 is a flowchart of a cloud service application upgrade method shown in an exemplary embodiment of this application. The execution subject of the cloud service application upgrade method in this embodiment is the client 101, as shown in FIG. The service application upgrade method may include the following steps S210 to S260, which are described in detail as follows.
在步骤S210中,发送对云业务应用进行升级的升级请求至云端服务器,升级请求包括云业务应用的升级版本号。In step S210, an upgrade request for upgrading the cloud service application is sent to the cloud server, and the upgrade request includes the upgrade version number of the cloud service application.
在一个实施例中,云业务应用作为客户端用以实现云业务的应用软件,在用户需要对客户端的云业务应用进行升级时,可以向云端服务器发送对云业务应用进行升级的升级请求,该升级请求中至少携带有需要对云业务应用进行升级的升级版本号,当然,升级请求中还可以包括客户端的唯一标识信息。In one embodiment, the cloud service application is used as the client application software to realize the cloud service. When the user needs to upgrade the cloud service application of the client, the upgrade request for upgrading the cloud service application can be sent to the cloud server. The upgrade request carries at least the upgrade version number of the cloud service application that needs to be upgraded. Of course, the upgrade request may also include the unique identification information of the client.
在步骤S220中,接收云端服务器针对升级请求反馈的响应信息,响应信息包括多个分片文件的标识信息以及分别根据多个分片文件的内容进行消息摘要计算所确定的对多个分片文件分别进行校验第一文件校验值,多个分片文件是云端服务器对升级版本号对应的安装软件包进行分片处理时所生成。In step S220, receive response information fed back by the cloud server to the upgrade request. The response information includes the identification information of the multiple fragment files and the message digest calculation determined based on the content of the multiple fragment files. The check value of the first file is verified separately, and multiple fragmented files are generated when the cloud server performs fragmentation processing on the installation software package corresponding to the upgraded version number.
在一个实施例中,服务器接收到来自客户端的升级请求后,向客户端反馈针对升级请求的响应信息,该响应信息包括根据升级请求中携带的升级版本号所对应的安装软件包信息所生成的多个分片文件。由于单个安装软件包所对应的数据量较大,为了保证数据的顺利传输以及传输的安全性,云端服务器可以对该升级版本号对应的安装软件包进行分片处理生成对应的多个分片文件,并对多个分片文件的内容分别通过消息摘要算法进行计算得到计算结果,该计算结果作为对多个分片文件的内容进行完整性校验的第一文件校验值。可以理解的是,该响应信息还包括各个分片文件的标识信息,该标识信息为标识各个分片文件的唯一标识信息,用于云端服务器和客户端识别分片文件。In one embodiment, after the server receives the upgrade request from the client, it feeds back to the client response information for the upgrade request. The response information includes the information generated according to the installation software package information corresponding to the upgrade version number carried in the upgrade request. Multiple fragmented files. Due to the large amount of data corresponding to a single installation software package, in order to ensure the smooth transmission of data and the security of transmission, the cloud server can perform fragmentation processing on the installation software package corresponding to the upgraded version number to generate corresponding multiple fragment files , And calculate the content of the multiple fragment files respectively through the message digest algorithm to obtain the calculation result, and the calculation result is used as the first file check value for performing integrity verification on the content of the multiple fragment files. It is understandable that the response information also includes identification information of each fragmented file, and the identification information is unique identification information for identifying each fragmented file, and is used for the cloud server and the client to identify the fragmented file.
需要指出的是,对安装软件包进行拆分所得到的分片文件,单个分片文件是无法打开的,对安装软件包进行分片操作时,具体可以以文件为单位来对安装软件包进行拆分,拆分所得到的分片文件可以包括一个或多个文件,各个分片文件的数据量大小一般处于预定数据量大小范围内。It should be pointed out that, for the fragmented file obtained by splitting the installation software package, a single fragmented file cannot be opened. When the installation software package is fragmented, the installation software package can be performed in units of files. Splitting. The split file obtained by splitting may include one or more files, and the data size of each split file is generally within a predetermined data size range.
在对多个分片文件的内容通过消息摘要算法进行计算时,具体可以采用MD5消息摘要算法或SHA安全散列算法进行计算得到对应的第一文件校验值,以便于基于该第一文件校验值对安装软件包的内容完整性进行验证,进而保证安装软件包的数据完整性。When calculating the content of multiple fragmented files through the message digest algorithm, the MD5 message digest algorithm or the SHA secure hash algorithm can be used to calculate the corresponding first file check value, so as to facilitate the calibration based on the first file. The verification value verifies the content integrity of the installation software package, thereby ensuring the data integrity of the installation software package.
在步骤S230中,基于多个分片文件的标识信息,发送下载多个分片文件的下载请求至云端服务器。In step S230, based on the identification information of the multiple fragment files, a download request for downloading the multiple fragment files is sent to the cloud server.
在一个实施例中,客户端在接收到来自云端服务器的响应信息后,可以根据该响应信息中包含的多个分片文件的标识信息来生成对多个分片文件进行下载的下载请求,并将该下载请求发送至云端服务器。可以理解的是,下载请求还包括各个分片文件的标识信息。In one embodiment, after the client receives the response information from the cloud server, it can generate a download request for downloading the multiple fragment files according to the identification information of the multiple fragment files contained in the response information, and Send the download request to the cloud server. It is understandable that the download request also includes identification information of each fragmented file.
在步骤S240中,接收云端服务器针对下载请求反馈的多个分片文件。In step S240, a plurality of fragmented files fed back by the cloud server in response to the download request are received.
在一个实施例中,云端服务器在接收到来自客户端的下载请求,将针对该下载请求中包含的多个分片文件的标识信息向客户端反馈对应的多个分片文件,客户端接收来自云端服务器的多个分片文件。In one embodiment, when the cloud server receives the download request from the client, it feeds back the identification information of the multiple fragment files contained in the download request to the client the corresponding multiple fragment files, and the client receives the multiple fragment files from the cloud. Multiple fragmented files of the server.
在步骤S250中,根据接收的多个分片文件的内容分别进行消息摘要计算,确定多个分片文件对应的第一计算校验值。In step S250, a message digest calculation is performed respectively according to the content of the received multiple fragment files, and the first calculated check value corresponding to the multiple fragment files is determined.
在一个实施例中,客户端根据接收的各个分片文件所包含的内容通过消息摘要算法进行计算,得到各个分片文件对应的第一计算校验值,即根据每一个分片文件所包含的内容, 生成该分片文件的第一计算校验值。In one embodiment, the client calculates the first calculated check value corresponding to each fragment file according to the content contained in each fragment file received by the message digest algorithm, that is, according to the content contained in each fragment file Content, the first calculated check value of the fragment file is generated.
在步骤S260中,若检测到多个分片文件对应的第一计算校验值与多个分片文件对应的第一文件校验值均一致,则根据多个分片文件对云业务应用进行升级。In step S260, if it is detected that the first calculated check value corresponding to the multiple fragment files is consistent with the first file check value corresponding to the multiple fragment files, the cloud service application is performed according to the multiple fragment files. upgrade.
在一个实施例中,在得到各个分片文件对应的第一计算校验值,客户端将多个分片文件对应的第一计算校验值与多个分片文件对应的第一文件校验值进行比对,以确定两者是否一致。如果检测到每个分片文件对应的第一计算校验值与该分片文件对应的第一文件校验值均一致时,说明从云端服务器所接收到的云业务应用的安装软件包所对应的各个分片文件都是完整的,换而言之,各个分片文件在传输过程中,内容未被篡改或数据未丢失,则客户端可以根据多个分片文件对所述云业务应用进行升级;否则,则说明从云端服务器所接收到的云业务应用的安装软件包所对应的分片文件不是完整的,此时,客户端可以停止根据多个分片文件对云业务应用进行升级。In one embodiment, after obtaining the first calculated check value corresponding to each fragment file, the client verifies the first calculated check value corresponding to the plurality of fragment files with the first file corresponding to the plurality of fragment files. The values are compared to determine whether the two are consistent. If it is detected that the first calculated check value corresponding to each fragment file is consistent with the first file check value corresponding to the fragment file, it indicates that the installation software package of the cloud business application received from the cloud server corresponds to Each of the fragmented files is complete. In other words, the content of each fragmented file has not been tampered with or the data has not been lost during the transmission process, and the client can perform operations on the cloud service application according to multiple fragmented files. Upgrade; otherwise, it means that the fragment file corresponding to the installation software package of the cloud service application received from the cloud server is not complete. At this time, the client can stop upgrading the cloud service application based on multiple fragment files.
以上可以看出,通过将安装软件包拆分成多个分片文件来进行传输,在安装软件包较大时,也能使得客户端顺利从云端服务器下载安装软件包,降低了网络波动对升级造成的影响,此外,通过将接收的云业务应用安装软件包对应的多个分片文件对应的第一计算校验值与多个分片文件对应的第一文件校验值,若检测到多个分片文件对应的第一计算校验值与多个分片文件对应的第一文件校验值均一致,则根据多个分片文件对云业务应用进行升级,在保证可以实现对升级安装包的数据完整性的同时,避免根据整个升级安装包直接进行消息摘要计算,降低计算的复杂度,从而可以有效减少对数据完整性校验时的数据计算量,进而减少了***资源的占用,同时还减少了云业务应用的升级时间,提高了云业务应用的升级效率。It can be seen from the above that by splitting the installation software package into multiple fragmented files for transmission, when the installation software package is large, it can also enable the client to download the installation software package from the cloud server smoothly, reducing network fluctuations and upgrading In addition, the first calculated check value corresponding to the multiple fragment files corresponding to the received cloud service application installation software package is combined with the first file check value corresponding to the multiple fragment files. If the first calculated check value corresponding to one fragmented file is consistent with the first file check value corresponding to multiple fragmented files, then the cloud service application is upgraded according to the multiple fragmented files to ensure that the upgrade installation can be realized At the same time as the data integrity of the package, it avoids directly calculating the message digest according to the entire upgrade installation package, reducing the complexity of the calculation, which can effectively reduce the amount of data calculation during data integrity verification, thereby reducing the occupation of system resources. At the same time, the upgrade time of cloud business applications is reduced, and the upgrade efficiency of cloud business applications is improved.
在一个实施例中,云端服务器反馈的响应信息还可以包括云端服务器根据多个分片文件对应的第一文件校验值进行消息摘要计算得到的第二文件校验值,本实施例中的云业务应用升级方法还包括:根据多个分片文件对应的第一计算校验值进行消息摘要计算,确定第二计算校验值;本实施例中的步骤S260具体可以包括:若检测到多个分片文件对应的第一计算校验值与多个分片文件对应的第一文件校验值均一致,且第二计算校验值与第二文件校验值一致,则根据多个分片文件对云业务应用进行升级。In one embodiment, the response information fed back by the cloud server may also include the second file check value obtained by the cloud server according to the first file check value corresponding to the plurality of fragmented files through the message digest calculation. The cloud server in this embodiment The service application upgrade method further includes: performing a message digest calculation according to the first calculation check value corresponding to the multiple fragment files to determine the second calculation check value; step S260 in this embodiment may specifically include: if multiple fragment files are detected The first calculated check value corresponding to a fragmented file is consistent with the first file check value corresponding to multiple fragmented files, and the second calculated check value is consistent with the second file check value, then according to multiple fragments The file upgrades cloud business applications.
在本实施例中,云端服务器在确定得到多个分片文件对应的第一文件校验值后,还可以将多个分片文件对应的第一文件校验值作为计算内容,并通过消息摘要算法对该计算内容进行消息摘要计算得到计算结果,该计算结果可以作为该对安装软件包的内容完整性进行进一步校验的第二文件校验值,云端服务器将该第二文件校验值添加至响应信息中。In this embodiment, after the cloud server determines that the first file check value corresponding to the multiple fragment files is obtained, it may also use the first file check value corresponding to the multiple fragment files as the calculation content, and pass the message summary The algorithm performs message digest calculation on the calculated content to obtain the calculation result, which can be used as the second file check value for further checking the content integrity of the installation software package, and the cloud server adds the second file check value To the response message.
客户端在确定多个分片文件对应的第一计算校验值后,还可以将多个分片文件对应的第一计算校验值作为计算内容,并通过消息摘要算法对该计算内容进行消息摘要计算得到计算结果,该计算结果可以作为对接收的分片文件进行校验的第二计算校验值。After determining the first calculated check value corresponding to multiple fragment files, the client can also use the first calculated check value corresponding to multiple fragment files as the calculation content, and send a message to the calculation content through the message digest algorithm The digest calculation obtains the calculation result, and the calculation result may be used as the second calculated verification value for verifying the received fragment file.
客户端在检测到多个分片文件对应的第一计算校验值与多个分片文件对应的第一文件校验值均一致时,还可以将计算得到的第二计算校验值与响应信息中包含的第二文件校验值比较,若计算得到的第二计算校验值与响应信息包含的第二文件校验值也一致,那么说明从云端服务器所接收到的云业务应用的安装软件包所对应的各个分片文件都是完整的,则可以根据多个分片文件对云业务应用进行升级。When the client detects that the first calculated check value corresponding to multiple fragmented files is consistent with the first file check value corresponding to multiple fragmented files, the client can also compare the second calculated check value obtained by calculation with the response The second file check value contained in the information is compared. If the calculated second calculated check value is consistent with the second file check value contained in the response message, then it indicates the installation of the cloud service application received from the cloud server Each fragment file corresponding to the software package is complete, and the cloud service application can be upgraded based on multiple fragment files.
在该实施例的技术方案中,通过采用计算得到的第二计算校验值与响应信息中包含的第二文件校验值进行比较的方式,可以进一步确保服务器中获取的安装软件包的数据完整性,提高进行数据完整性校验的准确度。In the technical solution of this embodiment, by comparing the second calculated check value obtained by calculation with the second file check value contained in the response information, it is possible to further ensure that the data of the installation software package obtained in the server is complete Improve the accuracy of data integrity verification.
在一个实施例中,云端服务器反馈的响应信息还可以包括云端服务器对升级版本号对应的升级软件包进行分片处理时得到的多个分片文件所对应的分片顺序信息,则根据多个分片文件对应的第一计算校验值进行消息摘要计算,确定第二计算校验值的步骤具体可以 包括:基于多个分片文件对应的第一计算校验值以及多个分片文件的分片顺序信息进行消息摘要计算,确定第二计算校验值。In one embodiment, the response information fed back by the cloud server may also include fragmentation order information corresponding to multiple fragment files obtained when the cloud server performs fragmentation processing on the upgrade software package corresponding to the upgrade version number, and then according to the multiple The message digest calculation is performed on the first calculated check value corresponding to the fragmented file, and the step of determining the second calculated check value may specifically include: based on the first calculated check value corresponding to the plurality of fragmented files and the calculation of the plurality of fragmented files The message digest calculation is performed on the fragment order information, and the second calculation check value is determined.
在本实施例中,多个分片文件所对应的分片顺序信息为云端服务器对升级版本号对应的升级软件包进行分片处理时,用于标识多个分片文件所对应的分片顺序的标识信息,具体的,分片顺序信息可以为一种标识顺序信息的字符串,例如,分片得到的第一个分片文件的分片顺序信息可以为“000000001”,第二分片文件的分片顺序信息可以为“000000010”,以此类推,当然,并不限定于此。In this embodiment, the fragmentation order information corresponding to the multiple fragment files is used to identify the fragmentation order corresponding to the multiple fragment files when the cloud server performs fragmentation processing on the upgrade software package corresponding to the upgrade version number Specifically, the fragment sequence information can be a string of identification sequence information. For example, the fragment sequence information of the first fragment file obtained by fragmentation can be "000000001", and the second fragment file The fragment order information of can be "000000010", and so on, of course, it is not limited to this.
云端服务器还可以将多个分片文件对应的第一文件校验值以及多个分片文件的分片顺序信息作为计算内容,并通过消息摘要算法对该计算内容进行消息摘要计算得到计算结果,该计算结果可以作为该对安装软件包的内容完整性进行进一步校验的第二文件校验值。客户端在确定多个分片文件对应的第一计算校验值后,还可以将多个分片文件对应的第一计算校验值和多个分片文件的分片顺序信息作为计算内容,并通过消息摘要算法对该计算内容进行消息摘要计算得到计算结果,该计算结果可以作为对接收的分片文件进行校验的第二计算校验值。The cloud server may also use the first file check value corresponding to the multiple fragment files and the fragment order information of the multiple fragment files as the calculation content, and perform the message digest calculation on the calculation content through the message digest algorithm to obtain the calculation result. The calculation result can be used as the second file verification value for further verification of the content integrity of the installation software package. After determining the first calculation check value corresponding to the multiple fragment files, the client may also use the first calculation check value corresponding to the multiple fragment files and the fragment order information of the multiple fragment files as the calculation content. A message digest calculation is performed on the calculation content through a message digest algorithm to obtain a calculation result, and the calculation result can be used as a second calculated verification value for verifying the received fragment file.
参考图3,图3为本申请一示例性实施例示出的云业务应用升级方法的流程图,在该实施例中,基于多个分片文件对应的第一计算校验值以及多个分片文件的分片顺序信息进行消息摘要计算,确定第二计算校验值的步骤具体可以包括步骤S310至步骤S330,详细描述如下。Referring to FIG. 3, FIG. 3 is a flowchart of a method for upgrading a cloud service application according to an exemplary embodiment of the application. In this embodiment, the first calculated check value corresponding to multiple fragment files and multiple fragments are used. The message digest calculation is performed on the fragment order information of the file, and the step of determining the second calculation check value may specifically include step S310 to step S330, which are described in detail as follows.
在步骤S310中,根据各个分片文件对应的第一计算校验值和各个分片文件对应的分片顺序信息生成各个分片文件对应的内容属性信息。In step S310, the content attribute information corresponding to each fragment file is generated according to the first calculated check value corresponding to each fragment file and the fragment sequence information corresponding to each fragment file.
在步骤S320中,基于各个分片文件对应的分片顺序信息对各个分片文件的内容属性信息进行拼接处理,得到拼接后的信息。In step S320, the content attribute information of each segment file is spliced based on the segment sequence information corresponding to each segment file to obtain the spliced information.
在步骤S330中,基于拼接后的信息进行消息摘要计算,确定第二计算校验值。In step S330, a message digest calculation is performed based on the spliced information, and a second calculation check value is determined.
客户端在基于多个分片文件对应的第一计算校验值以及多个分片文件的分片顺序信息进行消息摘要计算确定第二计算校验值时,可以先根据各个分片文件对应的第一计算校验值和各个分片文件对应的分片顺序信息生成各个分片文件对应的内容属性信息,如,当分片文件对应的第一计算校验值为“ABC11100BNQ”且分片文件对应的分片顺序信息为“000000001”,则分片文件对应的内容属性信息可以为“ABC11100BNQ000000001”。客户端再基于各个分片文件对应的分片顺序信息对各个分片文件的内容属性信息进行拼接处理,得到拼接后的信息,若各个分片文件的内容属性信息为A1,A2…An,则拼接后的信息为(A1,A2,…,An);最后基于拼接后的信息进行消息摘要计算,确定第二计算校验值。When the client performs the message digest calculation based on the first calculated check value corresponding to multiple fragment files and the fragment order information of the multiple fragment files to determine the second calculated check value, it can firstly determine the second calculated check value according to the corresponding value of each fragment file. The first calculated check value and the fragment order information corresponding to each fragment file generate the content attribute information corresponding to each fragment file, for example, when the first calculated check value corresponding to the fragment file is "ABC11100BNQ" and the fragment file corresponds If the fragment sequence information of is "000000001", the content attribute information corresponding to the fragment file can be "ABC11100BNQ000000001". The client then performs splicing processing on the content attribute information of each slice file based on the slice order information corresponding to each slice file to obtain the spliced information. If the content attribute information of each slice file is A1, A2...An, then The spliced information is (A1, A2,..., An); finally, the message digest calculation is performed based on the spliced information, and the second calculation check value is determined.
可以理解的是,客户端基于多个分片文件对应的第一计算校验值以及多个分片文件的分片顺序信息进行消息摘要计算确定第二计算校验值的方式为与云端服务器基于多个分片文件对应的第一文件校验值以及多个分片文件的分片顺序信息进行消息摘要计算确定第二文件校验值的方式一致。It is understandable that the client performs message digest calculation based on the first calculated check value corresponding to multiple fragment files and the fragment order information of the multiple fragment files to determine the second calculated check value in a way that is based on the cloud server The check value of the first file corresponding to the plurality of fragment files and the fragment sequence information of the plurality of fragment files are calculated in the same manner to determine the check value of the second file.
在该实施例的技术方案中,通过基于多个分片文件的内容以及多个分片文件的分片顺序信息来对分片文件的完整性进行校验,可以进一步提高进行消息摘要计算的复杂度,能有效检测不法分子截获该安装软件包的分片文件并对安装软件包的内容进行篡改的情况,提高了数据传输的安全性。In the technical solution of this embodiment, by verifying the integrity of the fragment files based on the content of the multiple fragment files and the fragment sequence information of the multiple fragment files, the complexity of the message digest calculation can be further increased. It can effectively detect the situation that criminals intercept the fragment files of the installation software package and tamper with the content of the installation software package, which improves the security of data transmission.
参考图4,图4为本申请一示例性实施例示出的云业务应用升级方法的步骤S230的具体流程图。在该实施例中,在云端服务器反馈的响应信息中包括有云端服务器对升级版本号对应的升级软件包进行分片处理得到的多个分片文件所对应的分片顺序信息时,步骤S230具体可以包括步骤S410至步骤S430,详细描述如下。Referring to FIG. 4, FIG. 4 is a specific flowchart of step S230 of the cloud service application upgrade method shown in an exemplary embodiment of this application. In this embodiment, when the response information fed back by the cloud server includes the fragmentation sequence information corresponding to the multiple fragment files obtained by the cloud server performing fragmentation processing on the upgrade software package corresponding to the upgrade version number, step S230 is specifically It may include step S410 to step S430, which are described in detail as follows.
步骤S410,基于多个分片文件的分片顺序信息,确定多个分片文件的下载顺序。Step S410: Determine the download sequence of the multiple fragment files based on the fragment order information of the multiple fragment files.
客户端在从云端服务器下载各个分片文件时,可以基于多个分片文件的分片顺序信息来确定多个分片文件的下载顺序。具体的,可以将多个分片文件的分片顺序信息直接作为多个分片文件的下载顺序,如,可以根据分片顺序信息将对安装软件包进行分片处理时所得到的第一个分片文件作为第一个进行下载的分片文件,以此类推,进而实现基于多个分片文件的分片顺序信息,确定多个分片文件的下载顺序。When downloading each fragment file from the cloud server, the client can determine the download sequence of the multiple fragment files based on the fragment sequence information of the multiple fragment files. Specifically, the fragment order information of multiple fragment files can be directly used as the download order of multiple fragment files. For example, the first one obtained when the installation software package is fragmented can be divided according to the fragment order information. The fragment file is used as the first fragment file to be downloaded, and so on, so as to realize the determination of the download sequence of the multiple fragment files based on the fragment sequence information of the multiple fragment files.
步骤S420,基于下载顺序选择要下载的分片文件,以选择的分片文件对应的标识信息生成下载请求。In step S420, the segment files to be downloaded are selected based on the download order, and a download request is generated using identification information corresponding to the selected segment files.
在确定多个分片文件的下载顺序后,客户端可以基于下载顺序选择要下载的分片文件,具体的,可以以选择的分片文件对应的标识信息生成下载请求,进而便于给予多个分片文件的分片顺序,从云端服务器下载分片文件。After determining the download order of multiple fragment files, the client can select the fragment files to be downloaded based on the download order. Specifically, it can generate a download request based on the identification information corresponding to the selected fragment files, so as to facilitate the granting of multiple fragment files. The slicing sequence of the slice file, the slice file is downloaded from the cloud server.
步骤S430,发送下载请求至云端服务器。Step S430: Send a download request to the cloud server.
客户端发送所生成的下载请求至云端服务器,以便于从云端服务器下载对应的分片文件。The client sends the generated download request to the cloud server, so as to download the corresponding fragmented file from the cloud server.
图4所示实施例的技术方案中,基于多个分片文件的分片顺序信息,确定多个分片文件的下载顺序,按照多个分片文件的下载顺序从云端服务器逐个下载分片文件,可以在接收到的某个分片文件被篡改或数据丢失的情况下,停止从云端服务器下载剩余的分片文件,可以减少不必要的数据处理,进而减少对客户端***资源的占用,提高客户端***资源的利用率。In the technical solution of the embodiment shown in FIG. 4, the download order of the multiple fragment files is determined based on the fragment order information of the multiple fragment files, and the fragment files are downloaded one by one from the cloud server according to the download order of the multiple fragment files , You can stop downloading the remaining fragment files from the cloud server when a received fragment file is tampered with or data is lost, which can reduce unnecessary data processing, thereby reducing the occupation of client system resources and improving Utilization of client system resources.
可选的,参考图5,图5为本申请一示例性实施例示出的云业务应用升级方法的流程图,本实施例中的云业务应用升级方法还可以包括步骤S510至步骤S520,详细描述如下。Optionally, referring to FIG. 5, FIG. 5 is a flowchart of a cloud service application upgrade method shown in an exemplary embodiment of this application. The cloud service application upgrade method in this embodiment may further include steps S510 to S520, which are described in detail as follows.
在步骤S510中,若根据接收的分片文件的内容计算得到的第一计算校验值与接收的分片文件对应的第一文件校验值不一致,则停止向云端服务器发生下载请求,且生成下载升级软件包失败的失败通知。In step S510, if the first calculated check value calculated according to the content of the received fragment file is inconsistent with the first file check value corresponding to the received fragment file, stop generating a download request to the cloud server, and generate Notification of failure to download the upgrade package.
客户端根据接收的分片文件的内容计算得到第一计算校验值,并将计算得到第一计算校验值与接收的分片文件对应的第一文件校验值进行比对。若计算得到的第一计算校验值与接收的分片文件对应的第一文件校验值不一致,则说明接收的分片文件的内容存在被篡改的情况或接收的分片文件存在数据丢失的情况,客户端停止向云端服务器发生下载请求,且成下载升级软件包失败的失败请求。The client calculates the first calculated check value according to the content of the received fragmented file, and compares the calculated first calculated check value with the first file check value corresponding to the received fragmented file. If the calculated first calculated check value is inconsistent with the first file check value corresponding to the received fragment file, it means that the content of the received fragment file has been tampered with or the received fragment file has data loss In case, the client stops making a download request to the cloud server, and a failed request for downloading the upgrade software package fails.
步骤S520,发送失败通知至云端服务器。Step S520: Send a failure notification to the cloud server.
客户端将失败通知发送至云端服务器,以便于云端服务器重新下发升级软件包,从而保证升级的正常进行。The client sends a failure notification to the cloud server, so that the cloud server can re-issue the upgrade software package to ensure the normal progress of the upgrade.
图5所示实施例的技术方案中,通过将计算得到的第一计算校验值与第一文件校验值进行比较,在接收的分片文件的内容存在被篡改的情况或接收的分片文件存在数据丢失的情况,客户端停止向服务器发生下载请求,可以减少不必要的数据处理,客户端同时生成下载升级软件包失败的失败请求,并将失败请求发送至云端服务器,以使得云端服务器及时获取客户端下载升级软件包失败的情况,还可以使得云端服务器减少不必要的数据处理,进而减少对云端服务器***资源的占用,提高云端服务器***资源的利用率。In the technical solution of the embodiment shown in FIG. 5, by comparing the first calculated check value obtained by calculation with the first file check value, the content of the received fragment file has been tampered with or the received fragment If the file has data loss, the client stops making download requests to the server, which can reduce unnecessary data processing. The client also generates a failed request for downloading the upgrade software package and sends the failed request to the cloud server to make the cloud server Obtaining the failure of the client to download the upgrade package in a timely manner can also enable the cloud server to reduce unnecessary data processing, thereby reducing the occupation of cloud server system resources, and improving the utilization of cloud server system resources.
参考图6,图6为本申请一示例性实施例示出的云业务应用升级方法的步骤S260的具体流程图。在该实施例中,在云端服务器反馈的响应信息中包括有云端服务器对升级版本号对应的升级软件包进行分片处理得到的多个分片文件所对应的分片顺序信息时,步骤S260具体可以包括步骤S610至步骤S620,详细描述如下。Referring to FIG. 6, FIG. 6 is a specific flowchart of step S260 of the cloud service application upgrade method shown in an exemplary embodiment of this application. In this embodiment, when the response information fed back by the cloud server includes the fragmentation sequence information corresponding to the multiple fragment files obtained by the cloud server performing fragmentation processing on the upgrade software package corresponding to the upgrade version number, step S260 is specifically It may include step S610 to step S620, which are described in detail as follows.
步骤S610中,根据多个分片文件所对应的分片顺序信息对多个分片文件进行重组处理,生成升级软件包。In step S610, the multiple fragment files are reorganized according to the fragment sequence information corresponding to the multiple fragment files to generate an upgrade software package.
客户端在确定从云端服务器获取的升级软件包所对应的各个分片文件是完整的情况下, 则可以根据多个分片文件所对应的分片顺序信息对多个分片文件进行重组处理,生成对应的升级软件包。In the case where the client determines that the respective fragment files corresponding to the upgrade software package obtained from the cloud server are complete, it can reorganize the multiple fragment files according to the fragment order information corresponding to the multiple fragment files. Generate the corresponding upgrade package.
步骤S620中,基于升级软件包对云业务应用进行升级。In step S620, the cloud service application is upgraded based on the upgrade software package.
客户端在生成得到对应的升级软件包,基于该生成的升级软件包执行升级操作,以实现对云业务应用进行升级,进而实现基于升级版本号对应的云业务应用对云业务应用进行升级,在完整升级后,还可以将旧版本号的安装软件包进行删除。The client generates the corresponding upgrade software package, and performs the upgrade operation based on the generated upgrade software package to upgrade the cloud service application, and then realizes the upgrade of the cloud service application based on the cloud service application corresponding to the upgraded version number. After a complete upgrade, you can also delete the installation software package with the old version number.
参考图7,图7示意性示出了根据本申请的一个实施例的云业务应用升级装置的框图,云业务应用升级装置可以集成于电子设备中,根据本申请的一个实施例的云业务应用升级装置700可以包括:第一发送单元710、第一接收单元720、第二发送单元730、第二接收单元740、第一计算单元750以及升级单元760;第一发送单元710,用于发送对云业务应用进行升级的升级请求至云端服务器,升级请求包括云业务应用的升级版本号;第一接收单元720,用于接收云端服务器针对升级请求反馈的响应信息,响应信息包括多个分片文件的标识信息以及分别根据多个分片文件的内容进行消息摘要计算所确定的对多个分片文件分别进行校验第一文件校验值,多个分片文件是云端服务器对升级版本号对应的安装软件包进行分片处理时所生成;第二发送单元730,用于基于多个分片文件的标识信息,发送下载多个分片文件的下载请求至云端服务器;第二接收单元740,接收云端服务器针对下载请求反馈的多个分片文件;第一计算单元750,用于根据接收的多个分片文件的内容分别进行消息摘要计算,确定多个分片文件对应的第一计算校验值;升级单元,用于若检测到多个分片文件对应的第一计算校验值与多个分片文件对应的第一文件校验值均一致,则根据多个分片文件对云业务应用进行升级。Referring to FIG. 7, FIG. 7 schematically shows a block diagram of a cloud service application upgrading apparatus according to an embodiment of the present application. The cloud service application upgrading apparatus may be integrated in an electronic device. The cloud service application according to an embodiment of the present application The upgrading apparatus 700 may include: a first sending unit 710, a first receiving unit 720, a second sending unit 730, a second receiving unit 740, a first calculating unit 750, and an upgrading unit 760; and a first sending unit 710 for sending The upgrade request for the upgrade of the cloud service application is sent to the cloud server, and the upgrade request includes the upgrade version number of the cloud service application; the first receiving unit 720 is configured to receive response information fed back by the cloud server to the upgrade request, and the response information includes multiple fragment files The first file verification value is determined by performing the message digest calculation on the multiple fragment files respectively according to the content of the multiple fragment files, and the multiple fragment files are corresponding to the upgrade version number of the cloud server The second sending unit 730 is configured to send a download request for downloading multiple piece files to the cloud server based on the identification information of the multiple piece files; the second receiving unit 740, Receive multiple fragmented files fed back by the cloud server in response to the download request; the first calculation unit 750 is configured to perform message digest calculations respectively according to the content of the received multiple fragmented files, and determine the first calculation school corresponding to the multiple fragmented files The upgrade unit, if it is detected that the first calculated check value corresponding to multiple shard files is consistent with the first file check value corresponding to the multiple shard files, then the cloud based on the multiple shard files Business applications are upgraded.
可选的,响应信息还包括云端服务器根据多个分片文件对应的第一文件校验值进行消息摘要计算得到的第二文件校验值,云业务应用升级装置还包括:第二计算单元,用于根据多个分片文件对应的第一计算校验值进行消息摘要计算,确定第二计算校验值;升级单元760被配置为:若检测到多个分片文件对应的第一计算校验值与多个分片文件对应的第一文件校验值均一致,且第二计算校验值与第二文件校验值一致,则根据多个分片文件对云业务应用进行升级。Optionally, the response information further includes a second file check value obtained by the cloud server performing a message digest calculation based on the first file check value corresponding to the multiple fragmented files, and the cloud service application upgrade apparatus further includes: a second calculation unit, It is used to calculate the message digest according to the first calculation check value corresponding to the multiple fragment files to determine the second calculation check value; the upgrading unit 760 is configured to: if the first calculation check value corresponding to the multiple fragment files is detected If the verification value is consistent with the first file verification value corresponding to the multiple fragment files, and the second calculated verification value is consistent with the second file verification value, the cloud service application is upgraded according to the multiple fragment files.
可选的,响应信息还包括云端服务器对升级版本号对应的升级软件包进行分片处理时得到的多个分片文件所对应的分片顺序信息,所述第二计算单元被配置为:基于多个分片文件对应的第一计算校验值以及多个分片文件的分片顺序信息进行消息摘要计算,确定第二计算校验值。Optionally, the response information further includes fragmentation sequence information corresponding to multiple fragment files obtained when the cloud server performs fragmentation processing on the upgrade software package corresponding to the upgrade version number, and the second calculation unit is configured to: The message digest calculation is performed on the first calculated check value corresponding to the multiple fragment files and the fragment order information of the multiple fragment files, and the second calculated check value is determined.
可选的,第二计算单元被配置为:根据各个分片文件对应的第一计算校验值和各个分片文件对应的分片顺序信息生成各个分片文件对应的内容属性信息;基于各个分片文件对应的分片顺序信息对各个分片文件的内容属性信息进行拼接处理,得到拼接后的信息;基于拼接后的信息进行消息摘要计算,确定第二计算校验值。Optionally, the second calculation unit is configured to: generate content attribute information corresponding to each fragment file according to the first calculation check value corresponding to each fragment file and the fragment sequence information corresponding to each fragment file; The piece sequence information corresponding to the piece file performs splicing processing on the content attribute information of each piece file to obtain the spliced information; based on the spliced information, the message digest calculation is performed to determine the second calculation check value.
可选的,第二发送单元730被配置为:基于多个分片文件的分片顺序信息,确定多个分片文件的下载顺序;基于下载顺序选择要下载的分片文件,以选择的分片文件对应的标识信息生成下载请求;发送下载请求至云端服务器。Optionally, the second sending unit 730 is configured to: determine the download order of the plurality of fragment files based on the fragment order information of the plurality of fragment files; select the fragment files to be downloaded based on the download order to select the selected fragment files. The identification information corresponding to the slice file generates a download request; the download request is sent to the cloud server.
可选的,云业务应用升级装置,还包括:执行单元,用于若根据接收的分片文件的内容计算得到的第一计算校验值与接收的分片文件对应的第一文件校验值不一致,则停止向云端服务器发生下载请求,且生成下载升级软件包失败的失败通知;第三发送单元,用于发送失败通知至云端服务器。Optionally, the cloud service application upgrade device further includes: an execution unit, configured to: if the first calculated check value calculated according to the content of the received fragment file is the first file check value corresponding to the received fragment file If they are not consistent, stop generating a download request to the cloud server, and generate a failure notification that downloads the upgrade software package failed; the third sending unit is used to send a failure notification to the cloud server.
可选的,升级单元被配置为:根据多个分片文件所对应的分片顺序信息对多个分片文件进行重组处理,生成升级软件包;基于升级软件包对云业务应用进行升级。Optionally, the upgrade unit is configured to: reorganize the multiple fragment files according to the fragment sequence information corresponding to the multiple fragment files to generate an upgrade software package; and upgrade the cloud service application based on the upgrade software package.
上述装置中各个模块的功能和作用的实现过程具体详见上述基于云业务应用升级方法 中对应步骤的实现过程,在此不再赘述。For the implementation process of the functions and roles of each module in the above-mentioned device, please refer to the implementation process of the corresponding steps in the above-mentioned cloud-based service application upgrade method, which will not be repeated here.
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本申请公开的实施方式,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments disclosed in the present application, the features and functions of two or more modules or units described above may be embodied in one module or unit. Conversely, the features and functions of a module or unit described above can be further divided into multiple modules or units to be embodied.
此外,尽管在附图中以特定顺序描述了本申请中方法的各个步骤,但是,这并非要求或者暗示必须按照该特定顺序来执行这些步骤,或是必须执行全部所示的步骤才能实现期望的结果。附加的或备选的,可以省略某些步骤,将多个步骤合并为一个步骤执行,以及/或者将一个步骤分解为多个步骤执行等。In addition, although the various steps of the method in the present application are described in a specific order in the drawings, this does not require or imply that these steps must be performed in the specific order, or that all the steps shown must be performed to achieve the desired result. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and/or one step may be decomposed into multiple steps for execution, etc.
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本申请实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、移动终端、或者网络设备等)执行根据本申请实施方式的方法。Through the description of the above embodiments, those skilled in the art can easily understand that the example embodiments described here can be implemented by software, or can be implemented by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network , Including several instructions to make a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) execute the method according to the embodiment of the present application.
在本申请的示例性实施例中,还提供了一种能够实现上述方法的电子设备。In an exemplary embodiment of the present application, an electronic device capable of implementing the above method is also provided.
所属技术领域的技术人员能够理解,本申请的各个方面可以实现为***、方法或程序产品。因此,本申请的各个方面可以具体实现为以下形式,即:完全的硬件实施方式、完全的软件实施方式(包括固件、微代码等),或硬件和软件方面结合的实施方式,这里可以统称为“电路”、“模块”或“***”。Those skilled in the art can understand that various aspects of the present application can be implemented as a system, a method, or a program product. Therefore, each aspect of the present application can be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which can be collectively referred to herein as "Circuit", "Module" or "System".
参考图8,图8为本申请一示例性实施例示出的一种用于实现上述云业务应用升级方法的电子设备示例框图。图8显示的电子设备800仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。Referring to FIG. 8, FIG. 8 is an exemplary block diagram of an electronic device for implementing the foregoing cloud service application upgrade method according to an exemplary embodiment of this application. The electronic device 800 shown in FIG. 8 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present application.
如图8所示,电子设备800以通用计算设备的形式表现。电子设备800的组件可以包括但不限于:上述至少一个处理单元810、上述至少一个存储单元820、连接不同***组件(包括存储单元820和处理单元810)的总线830。As shown in FIG. 8, the electronic device 800 is represented in the form of a general-purpose computing device. The components of the electronic device 800 may include, but are not limited to: the aforementioned at least one processing unit 810, the aforementioned at least one storage unit 820, and a bus 830 connecting different system components (including the storage unit 820 and the processing unit 810).
其中,所述存储单元存储有程序代码,所述程序代码可以被所述处理单元810执行,使得所述处理单元810执行本说明书上述“示例性方法”部分中描述的根据本申请各种示例性实施方式的步骤。例如,所述处理单元810可以执行如图2中所示的步骤S210至步骤S240。Wherein, the storage unit stores program code, and the program code can be executed by the processing unit 810, so that the processing unit 810 executes the various exemplary methods described in the “Exemplary Method” section of this specification. Steps of implementation. For example, the processing unit 810 may perform step S210 to step S240 as shown in FIG. 2.
存储单元820可以包括易失性存储单元形式的可读介质,例如随机存取存储单元(RAM)8201和/或高速缓存存储单元8202,还可以进一步包括只读存储单元(ROM)8203。The storage unit 820 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 8201 and/or a cache storage unit 8202, and may further include a read-only storage unit (ROM) 8203.
存储单元820还可以包括具有一组(至少一个)程序模块8205的程序/实用工具8204,这样的程序模块8205包括但不限于:操作***、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。The storage unit 820 may also include a program/utility tool 8204 having a set of (at least one) program module 8205. Such program module 8205 includes but is not limited to: an operating system, one or more application programs, other program modules, and program data, Each of these examples or some combination may include the implementation of a network environment.
总线830可以为表示几类总线结构中的一种或多种,包括存储单元总线或者存储单元控制器、***总线、图形加速端口、处理单元或者使用多种总线结构中的任意总线结构的局域总线。The bus 830 may represent one or more of several types of bus structures, including a storage unit bus or a storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local area using any bus structure among multiple bus structures. bus.
电子设备800也可以与一个或多个外部设备1000(例如键盘、指向设备、蓝牙设备等)通信,还可与一个或者多个使得用户能与该电子设备800交互的设备通信,和/或与使得该电子设备800能与一个或多个其它计算设备进行通信的任何设备(例如路由器、调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口740进行。并且,电子设备800还可以通过网络适配器860与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器860通过总线830与电子设备 800的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备800使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID***、磁带驱动器以及数据备份存储***等。The electronic device 800 can also communicate with one or more external devices 1000 (such as keyboards, pointing devices, Bluetooth devices, etc.), and can also communicate with one or more devices that enable users to interact with the electronic device 800, and/or communicate with Any device (such as a router, modem, etc.) that enables the electronic device 800 to communicate with one or more other computing devices. Such communication may be performed through an input/output (I/O) interface 740. In addition, the electronic device 800 may also communicate with one or more networks (for example, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 860. As shown in the figure, the network adapter 860 communicates with other modules of the electronic device 800 through the bus 830. It should be understood that although not shown in the figure, other hardware and/or software modules can be used in conjunction with the electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives And data backup storage system, etc.
可选的,该处理单元可以为处理器,存储单元可以为存储器,程序代码可以为计算机可读指令。例如,电子设备可包括存储器和处理器,该存储器中存储有计算机可读指令,该计算机可读指令被处理器执行时,可以使得处理器执行上述方法中的部分或全部步骤。Optionally, the processing unit may be a processor, the storage unit may be a memory, and the program code may be computer readable instructions. For example, the electronic device may include a memory and a processor, and computer-readable instructions are stored in the memory, and when the computer-readable instructions are executed by the processor, the processor can cause the processor to perform part or all of the steps in the foregoing method.
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本申请实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、终端装置、或者网络设备等)执行根据本申请实施方式的方法。Through the description of the above embodiments, those skilled in the art can easily understand that the example embodiments described here can be implemented by software, or can be implemented by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network , Including several instructions to make a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) execute the method according to the embodiment of the present application.
本申请实施例还提供了一种存储有计算机可读指令的存储介质(如计算机可读存储介质),所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述方法的部分或全部步骤。例如,在本申请的示例性实施例中,还提供了一种计算机可读存储介质,其上存储有能够实现本说明书上述方法的程序产品。在一些可能的实施方式中,本申请的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当所述程序产品在终端设备上运行时,所述程序代码用于使所述电子设备执行本说明书上述“示例性方法”部分中描述的根据本申请各种示例性实施方式的步骤。The embodiments of the present application also provide a storage medium (such as a computer-readable storage medium) storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors Perform some or all of the steps in the above method. For example, in the exemplary embodiment of the present application, a computer-readable storage medium is also provided, on which is stored a program product capable of implementing the above-mentioned method in this specification. In some possible implementation manners, each aspect of the present application can also be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to make the The electronic device executes the steps described in the above-mentioned "Exemplary Method" section of this specification according to various exemplary embodiments of the present application.
参考图9所示,图9是本申请一示例性实施例示出的一种用于实现上述数据校验方法的计算机可读存储介质。图9描述了根据本申请的实施方式的用于实现上述方法的程序产品900,其可以采用便携式紧凑盘只读存储器(CD-ROM)并包括程序代码,并可以在电子设备,例如个人电脑上运行。然而,本申请的程序产品不限于此,在本文件中,可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行***、装置或者器件使用或者与其结合使用。Refer to FIG. 9, which is a computer-readable storage medium for implementing the above-mentioned data verification method according to an exemplary embodiment of the present application. FIG. 9 depicts a program product 900 for implementing the above method according to an embodiment of the present application, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be installed on an electronic device, such as a personal computer run. However, the program product of this application is not limited to this. In this document, the readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, device, or device.
所述程序产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以为但不限于电、磁、光、电磁、红外线、或半导体的***、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。The program product can use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above. More specific examples (non-exhaustive list) of readable storage media include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Type programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读信号介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行***、装置或者器件使用或者与其结合使用的程序。The computer-readable signal medium may include a data signal propagated in baseband or as a part of a carrier wave, and readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The readable signal medium may also be any readable medium other than a readable storage medium, and the readable medium may send, propagate, or transmit a program for use by or in combination with the instruction execution system, apparatus, or device.
可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。The program code contained on the readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
可选的,本申请涉及的介质如计算机可读存储介质可以是非易失性的,也可以是易失性的。Optionally, the medium involved in this application, such as a computer-readable storage medium, may be non-volatile or volatile.
可以以一种或多种程序设计语言的任意组合来编写用于执行本申请操作的程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备 上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。The program code used to perform the operations of this application can be written in any combination of one or more programming languages. The programming languages include object-oriented programming languages—such as Java, C++, etc., as well as conventional procedural programming languages. Programming language-such as "C" language or similar programming language. The program code can be executed entirely on the user's computing device, partly on the user's device, executed as an independent software package, partly on the user's computing device and partly executed on the remote computing device, or entirely on the remote computing device or server Executed on. In the case of a remote computing device, the remote computing device can be connected to a user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (for example, using Internet service providers). Business to connect via the Internet).
此外,上述附图仅是根据本申请示例性实施例的方法所包括的处理的示意性说明,而不是限制目的。易于理解,上述附图所示的处理并不表明或限制这些处理的时间顺序。另外,也易于理解,这些处理可以是例如在多个模块中同步或异步执行的。In addition, the above-mentioned drawings are merely schematic illustrations of the processing included in the method according to the exemplary embodiments of the present application, and are not intended for limitation. It is easy to understand that the processing shown in the above drawings does not indicate or limit the time sequence of these processings. In addition, it is easy to understand that these processes can be executed synchronously or asynchronously in multiple modules, for example.
本领域技术人员在考虑说明书及实践这里公开的申请后,将容易想到本申请的其他实施例。本申请旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本申请的一般性原理并包括本申请未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本申请的真正范围和精神由权利要求指出。After considering the specification and practicing the application disclosed herein, those skilled in the art will easily think of other embodiments of the application. This application is intended to cover any variations, uses, or adaptive changes of this application. These variations, uses, or adaptive changes follow the general principles of this application and include common knowledge or customary technical means in the technical field that are not disclosed in this application. . The description and the embodiments are only regarded as exemplary, and the true scope and spirit of the application are pointed out by the claims.

Claims (20)

  1. 一种云业务应用升级方法,其中,包括:A cloud service application upgrade method, which includes:
    发送对云业务应用进行升级的升级请求至云端服务器,所述升级请求包括云业务应用的升级版本号;Sending an upgrade request for upgrading the cloud service application to the cloud server, where the upgrade request includes the upgrade version number of the cloud service application;
    接收所述云端服务器针对所述升级请求反馈的响应信息,所述响应信息包括多个分片文件的标识信息以及分别根据多个所述分片文件的内容进行消息摘要计算所确定的对多个所述分片文件分别进行校验第一文件校验值,所述多个分片文件是所述云端服务器对所述升级版本号对应的安装软件包进行分片处理时所生成;Receive response information fed back by the cloud server to the upgrade request, where the response information includes identification information of a plurality of fragmented files and a pair of information determined by performing a message digest calculation on the content of the plurality of fragmented files. The fragmented files are respectively verified with a first file check value, and the plurality of fragmented files are generated when the cloud server performs fragmentation processing on the installation software package corresponding to the upgraded version number;
    基于多个所述分片文件的标识信息,发送下载多个所述分片文件的下载请求至所述云端服务器;Based on the identification information of the plurality of fragment files, sending a download request for downloading the plurality of fragment files to the cloud server;
    接收所述云端服务器针对所述下载请求反馈的多个分片文件;Receiving multiple fragmented files fed back by the cloud server in response to the download request;
    根据接收的多个所述分片文件的内容分别进行消息摘要计算,确定多个所述分片文件对应的第一计算校验值;Perform message digest calculations respectively according to the received contents of the plurality of fragment files, and determine the first calculated check value corresponding to the plurality of fragment files;
    若检测到多个所述分片文件对应的第一计算校验值与多个所述分片文件对应的第一文件校验值均一致,则根据多个所述分片文件对所述云业务应用进行升级。If it is detected that the first calculated check value corresponding to a plurality of the fragment files is consistent with the first file check value corresponding to the plurality of fragment files, then the cloud is checked according to the plurality of fragment files. Business applications are upgraded.
  2. 根据权利要求1所述的云业务应用升级方法,其中,所述响应信息还包括所述云端服务器根据多个所述分片文件对应的第一文件校验值进行消息摘要计算得到的第二文件校验值,所述云业务应用升级方法,还包括:The cloud service application upgrade method according to claim 1, wherein the response information further includes a second file obtained by the cloud server performing a message digest calculation according to the first file check value corresponding to the plurality of fragment files The check value, the cloud service application upgrade method, further includes:
    根据多个所述分片文件对应的第一计算校验值进行消息摘要计算,确定第二计算校验值;Perform message digest calculation according to the first calculated check value corresponding to the plurality of fragmented files, and determine the second calculated check value;
    所述若检测到多个所述分片文件对应的第一计算校验值与多个所述分片文件对应的第一文件校验值均一致,则根据多个所述分片文件对所述云业务应用进行升级,包括:If it is detected that the first calculated check values corresponding to a plurality of the fragment files are consistent with the first file check values corresponding to the plurality of fragment files, then the plurality of fragment files are compared with each other. The cloud business applications are upgraded, including:
    若检测到多个所述分片文件对应的第一计算校验值与多个所述分片文件对应的第一文件校验值均一致,且所述第二计算校验值与所述第二文件校验值一致,则根据多个所述分片文件对所述云业务应用进行升级。If it is detected that the first calculated check value corresponding to a plurality of the fragment files is consistent with the first file check value corresponding to the plurality of fragment files, and the second calculated check value is the same as the first file check value If the check values of the two files are consistent, the cloud service application is upgraded according to the multiple fragment files.
  3. 根据权利要求2所述的云业务应用升级方法,其中,所述响应信息还包括所述云端服务器对所述升级版本号对应的升级软件包进行分片处理时得到的多个分片文件所对应的分片顺序信息,所述根据多个所述分片文件对应的第一计算校验值进行消息摘要计算,确定第二计算校验值,包括:The cloud service application upgrade method according to claim 2, wherein the response information further includes a plurality of fragmented files obtained when the cloud server performs fragmentation processing on the upgrade software package corresponding to the upgrade version number. According to the fragmentation sequence information of the plurality of fragment files, the calculation of the message digest according to the first calculation check value corresponding to the plurality of fragment files to determine the second calculation check value includes:
    基于多个所述分片文件对应的第一计算校验值以及多个所述分片文件的分片顺序信息进行消息摘要计算,确定第二计算校验值。The message digest calculation is performed based on the first calculated check value corresponding to the plurality of fragment files and the fragment order information of the plurality of fragment files, and the second calculated check value is determined.
  4. 根据权利要求3所述的云业务应用升级方法,其中,所述基于多个所述分片文件对应的第一计算校验值以及多个所述分片文件的分片顺序信息进行消息摘要计算,确定第二计算校验值,包括:The cloud service application upgrade method according to claim 3, wherein the message digest calculation is performed based on the first calculation check value corresponding to the plurality of fragment files and the fragment order information of the plurality of fragment files , Determine the second calculation check value, including:
    根据各个所述分片文件对应的第一计算校验值和各个所述分片文件对应的分片顺序信息生成各个所述分片文件对应的内容属性信息;Generating content attribute information corresponding to each of the fragment files according to the first calculated check value corresponding to each of the fragment files and the fragment sequence information corresponding to each of the fragment files;
    基于各个所述分片文件对应的分片顺序信息对各个所述分片文件的内容属性信息进行拼接处理,得到拼接后的信息;Performing splicing processing on the content attribute information of each fragment file based on the fragment sequence information corresponding to each fragment file to obtain the spliced information;
    基于拼接后的信息进行消息摘要计算,确定所述第二计算校验值。The message digest calculation is performed based on the spliced information, and the second calculation check value is determined.
  5. 根据权利要求3所述的云业务应用升级方法,其中,所述基于多个所述分片文件的标识信息,发送下载多个所述分片文件的下载请求至所述云端服务器,包括:The cloud service application upgrade method according to claim 3, wherein the sending a download request for downloading a plurality of the fragment files to the cloud server based on the identification information of a plurality of the fragment files comprises:
    基于多个分片文件的分片顺序信息,确定多个分片文件的下载顺序;Determine the download sequence of multiple fragmented files based on the fragmentation order information of multiple fragmented files;
    基于下载顺序选择要下载的分片文件,以选择的分片文件对应的标识信息生成下载请求;Select the fragment files to be downloaded based on the download order, and generate a download request with the identification information corresponding to the selected fragment files;
    发送所述下载请求至所述云端服务器。Sending the download request to the cloud server.
  6. 根据权利要求5所述的云业务应用升级方法,其中,所述云业务应用升级方法,还包括:The cloud service application upgrade method according to claim 5, wherein the cloud service application upgrade method further comprises:
    若根据接收的分片文件的内容计算得到的第一计算校验值与接收的分片文件对应的第一文件校验值不一致,则停止向云端服务器发生下载请求,且生成下载所述升级软件包失败的失败通知;If the first calculated check value calculated according to the content of the received fragment file is inconsistent with the first file check value corresponding to the received fragment file, the download request to the cloud server is stopped, and the download of the upgrade software is generated Failure notification of package failure;
    发送所述失败通知至所述云端服务器。Sending the failure notification to the cloud server.
  7. 根据权利要求3-6任意一项所述的云业务应用升级方法,其中,所述根据多个所述分片文件对所述云业务应用进行升级的步骤,包括:The cloud service application upgrade method according to any one of claims 3-6, wherein the step of upgrading the cloud service application according to a plurality of the fragment files comprises:
    根据多个分片文件所对应的分片顺序信息对多个所述分片文件进行重组处理,生成所述升级软件包;Performing reorganization processing on the plurality of fragment files according to the fragment order information corresponding to the plurality of fragment files to generate the upgrade software package;
    基于所述升级软件包对所述云业务应用进行升级。The cloud service application is upgraded based on the upgrade software package.
  8. 一种云业务应用升级装置,其中,包括:A cloud service application upgrade device, which includes:
    第一发送单元,用于发送对云业务应用进行升级的升级请求至云端服务器,所述升级请求包括云业务应用的升级版本号;The first sending unit is configured to send an upgrade request for upgrading the cloud service application to the cloud server, where the upgrade request includes the upgrade version number of the cloud service application;
    第一接收单元,用于接收所述云端服务器针对所述升级请求反馈的响应信息,所述响应信息包括多个分片文件的标识信息以及分别根据多个所述分片文件的内容进行消息摘要计算所确定的对多个所述分片文件分别进行校验第一文件校验值,所述多个分片文件是所述云端服务器对所述升级版本号对应的安装软件包进行分片处理时所生成;The first receiving unit is configured to receive response information fed back by the cloud server to the upgrade request, where the response information includes identification information of a plurality of fragmented files and a message digest based on the content of the plurality of fragmented files. The first file check value is calculated and determined to verify the plurality of fragmented files respectively, and the plurality of fragmented files are fragmented processing performed by the cloud server on the installation software package corresponding to the upgraded version number Time generated
    第二发送单元,用于基于多个所述分片文件的标识信息,发送下载多个所述分片文件的下载请求至所述云端服务器;The second sending unit is configured to send a download request for downloading a plurality of the fragment files to the cloud server based on the identification information of the plurality of fragment files;
    第二接收单元,用于接收所述云端服务器针对所述下载请求反馈的多个分片文件;The second receiving unit is configured to receive multiple fragmented files fed back by the cloud server in response to the download request;
    第一计算单元,用于根据接收的多个所述分片文件的内容分别进行消息摘要计算,确定多个所述分片文件对应的第一计算校验值;The first calculation unit is configured to perform message digest calculations respectively according to the received contents of the plurality of fragment files, and determine the first calculated check value corresponding to the plurality of fragment files;
    升级单元,用于若检测到多个所述分片文件对应的第一计算校验值与多个所述分片文件对应的第一文件校验值均一致,则根据多个所述分片文件对所述云业务应用进行升级。The upgrading unit is configured to: if it is detected that the first calculated check value corresponding to a plurality of the fragment files is consistent with the first file check value corresponding to the plurality of fragment files, then according to the plurality of fragment files The file upgrades the cloud service application.
  9. 一种电子设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行以下步骤:An electronic device includes a memory and a processor, the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the following steps:
    发送对云业务应用进行升级的升级请求至云端服务器,所述升级请求包括云业务应用的升级版本号;Sending an upgrade request for upgrading the cloud service application to the cloud server, where the upgrade request includes the upgrade version number of the cloud service application;
    接收所述云端服务器针对所述升级请求反馈的响应信息,所述响应信息包括多个分片文件的标识信息以及分别根据多个所述分片文件的内容进行消息摘要计算所确定的对多个所述分片文件分别进行校验第一文件校验值,所述多个分片文件是所述云端服务器对所述升级版本号对应的安装软件包进行分片处理时所生成;Receive response information fed back by the cloud server to the upgrade request, where the response information includes identification information of a plurality of fragmented files and a pair of information determined by performing a message digest calculation on the content of the plurality of fragmented files. The fragmented files are respectively verified with a first file check value, and the plurality of fragmented files are generated when the cloud server performs fragmentation processing on the installation software package corresponding to the upgraded version number;
    基于多个所述分片文件的标识信息,发送下载多个所述分片文件的下载请求至所述云端服务器;Based on the identification information of the plurality of fragment files, sending a download request for downloading the plurality of fragment files to the cloud server;
    接收所述云端服务器针对所述下载请求反馈的多个分片文件;Receiving multiple fragmented files fed back by the cloud server in response to the download request;
    根据接收的多个所述分片文件的内容分别进行消息摘要计算,确定多个所述分片文件对应的第一计算校验值;Perform message digest calculations respectively according to the received contents of the plurality of fragment files, and determine the first calculated check value corresponding to the plurality of fragment files;
    若检测到多个所述分片文件对应的第一计算校验值与多个所述分片文件对应的第一文件校验值均一致,则根据多个所述分片文件对所述云业务应用进行升级。If it is detected that the first calculated check value corresponding to a plurality of the fragment files is consistent with the first file check value corresponding to the plurality of fragment files, then the cloud is checked according to the plurality of fragment files. Business applications are upgraded.
  10. 根据权利要求9所述的电子设备,其中,所述响应信息还包括所述云端服务器根据多个所述分片文件对应的第一文件校验值进行消息摘要计算得到的第二文件校验值,所述处理器还用于执行:The electronic device according to claim 9, wherein the response information further comprises a second file check value obtained by the cloud server performing a message digest calculation based on the first file check value corresponding to the plurality of fragment files , The processor is also used to execute:
    根据多个所述分片文件对应的第一计算校验值进行消息摘要计算,确定第二计算校验值;Perform message digest calculation according to the first calculated check value corresponding to the plurality of fragmented files, and determine the second calculated check value;
    所述若检测到多个所述分片文件对应的第一计算校验值与多个所述分片文件对应的第一文件校验值均一致,则根据多个所述分片文件对所述云业务应用进行升级,包括:If it is detected that the first calculated check values corresponding to a plurality of the fragment files are consistent with the first file check values corresponding to the plurality of fragment files, then the plurality of fragment files are compared with each other. The cloud business applications are upgraded, including:
    若检测到多个所述分片文件对应的第一计算校验值与多个所述分片文件对应的第一文件校验值均一致,且所述第二计算校验值与所述第二文件校验值一致,则根据多个所述分片文件对所述云业务应用进行升级。If it is detected that the first calculated check value corresponding to a plurality of the fragment files is consistent with the first file check value corresponding to the plurality of fragment files, and the second calculated check value is the same as the first file check value If the check values of the two files are consistent, the cloud service application is upgraded according to the multiple fragment files.
  11. 根据权利要求10所述的电子设备,其中,所述响应信息还包括所述云端服务器对所述升级版本号对应的升级软件包进行分片处理时得到的多个分片文件所对应的分片顺序信息,所述根据多个所述分片文件对应的第一计算校验值进行消息摘要计算,确定第二计算校验值时,具体执行以下步骤:The electronic device according to claim 10, wherein the response information further comprises the fragments corresponding to the multiple fragment files obtained when the cloud server performs fragmentation processing on the upgrade software package corresponding to the upgrade version number Sequence information, the message digest calculation is performed according to the first calculation check value corresponding to the plurality of fragment files, and the second calculation check value is determined, the following steps are specifically performed:
    基于多个所述分片文件对应的第一计算校验值以及多个所述分片文件的分片顺序信息进行消息摘要计算,确定第二计算校验值。The message digest calculation is performed based on the first calculated check value corresponding to the plurality of fragment files and the fragment order information of the plurality of fragment files, and the second calculated check value is determined.
  12. 根据权利要求11所述的电子设备,其中,所述基于多个所述分片文件对应的第一计算校验值以及多个所述分片文件的分片顺序信息进行消息摘要计算,确定第二计算校验值时,具体执行以下步骤:11. The electronic device according to claim 11, wherein the message digest calculation is performed based on the first calculated check value corresponding to the plurality of fragment files and the fragment order information of the plurality of fragment files, and the determination of the first 2. When calculating the check value, perform the following steps:
    根据各个所述分片文件对应的第一计算校验值和各个所述分片文件对应的分片顺序信息生成各个所述分片文件对应的内容属性信息;Generating content attribute information corresponding to each of the fragment files according to the first calculated check value corresponding to each of the fragment files and the fragment sequence information corresponding to each of the fragment files;
    基于各个所述分片文件对应的分片顺序信息对各个所述分片文件的内容属性信息进行拼接处理,得到拼接后的信息;Performing splicing processing on the content attribute information of each fragment file based on the fragment sequence information corresponding to each fragment file to obtain the spliced information;
    基于拼接后的信息进行消息摘要计算,确定所述第二计算校验值。The message digest calculation is performed based on the spliced information, and the second calculation check value is determined.
  13. 根据权利要求11所述的电子设备,其中,所述基于多个所述分片文件的标识信息,发送下载多个所述分片文件的下载请求至所述云端服务器时,具体执行以下步骤:11. The electronic device according to claim 11, wherein when the download request for downloading the plurality of fragment files is sent to the cloud server based on the identification information of the plurality of fragment files, the following steps are specifically executed:
    基于多个分片文件的分片顺序信息,确定多个分片文件的下载顺序;Determine the download sequence of multiple fragmented files based on the fragmentation order information of multiple fragmented files;
    基于下载顺序选择要下载的分片文件,以选择的分片文件对应的标识信息生成下载请求;Select the fragment files to be downloaded based on the download order, and generate a download request with the identification information corresponding to the selected fragment files;
    发送所述下载请求至所述云端服务器。Sending the download request to the cloud server.
  14. 根据权利要求13所述的电子设备,其中,所述处理器还用于执行:The electronic device according to claim 13, wherein the processor is further configured to execute:
    若根据接收的分片文件的内容计算得到的第一计算校验值与接收的分片文件对应的第一文件校验值不一致,则停止向云端服务器发生下载请求,且生成下载所述升级软件包失败的失败通知;If the first calculated check value calculated according to the content of the received fragment file is inconsistent with the first file check value corresponding to the received fragment file, the download request to the cloud server is stopped, and the download of the upgrade software is generated Failure notification of package failure;
    发送所述失败通知至所述云端服务器。Sending the failure notification to the cloud server.
  15. 根据权利要求11-14任意一项所述的电子设备,其中,所述根据多个所述分片文件对所述云业务应用进行升级的步骤时,具体执行以下步骤:The electronic device according to any one of claims 11-14, wherein, in the step of upgrading the cloud service application according to a plurality of the fragment files, the following steps are specifically executed:
    根据多个分片文件所对应的分片顺序信息对多个所述分片文件进行重组处理,生成所述升级软件包;Performing reorganization processing on the plurality of fragment files according to the fragment order information corresponding to the plurality of fragment files to generate the upgrade software package;
    基于所述升级软件包对所述云业务应用进行升级。The cloud service application is upgraded based on the upgrade software package.
  16. 一种存储有计算机可读指令的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:A storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the following steps:
    发送对云业务应用进行升级的升级请求至云端服务器,所述升级请求包括云业务应用的升级版本号;Sending an upgrade request for upgrading the cloud service application to the cloud server, where the upgrade request includes the upgrade version number of the cloud service application;
    接收所述云端服务器针对所述升级请求反馈的响应信息,所述响应信息包括多个分片文件的标识信息以及分别根据多个所述分片文件的内容进行消息摘要计算所确定的对多个所述分片文件分别进行校验第一文件校验值,所述多个分片文件是所述云端服务器对所述 升级版本号对应的安装软件包进行分片处理时所生成;Receive response information fed back by the cloud server to the upgrade request, where the response information includes identification information of a plurality of fragmented files and a pair of information determined by performing a message digest calculation on the content of the plurality of fragmented files. The fragmented files are respectively verified with a first file check value, and the plurality of fragmented files are generated when the cloud server performs fragmentation processing on the installation software package corresponding to the upgraded version number;
    基于多个所述分片文件的标识信息,发送下载多个所述分片文件的下载请求至所述云端服务器;Based on the identification information of the plurality of fragment files, sending a download request for downloading the plurality of fragment files to the cloud server;
    接收所述云端服务器针对所述下载请求反馈的多个分片文件;Receiving multiple fragmented files fed back by the cloud server in response to the download request;
    根据接收的多个所述分片文件的内容分别进行消息摘要计算,确定多个所述分片文件对应的第一计算校验值;Perform message digest calculations respectively according to the received contents of the plurality of fragment files, and determine the first calculated check value corresponding to the plurality of fragment files;
    若检测到多个所述分片文件对应的第一计算校验值与多个所述分片文件对应的第一文件校验值均一致,则根据多个所述分片文件对所述云业务应用进行升级。If it is detected that the first calculated check value corresponding to a plurality of the fragment files is consistent with the first file check value corresponding to the plurality of fragment files, then the cloud is checked according to the plurality of fragment files. Business applications are upgraded.
  17. 根据权利要求16所述的存储介质,其中,所述响应信息还包括所述云端服务器根据多个所述分片文件对应的第一文件校验值进行消息摘要计算得到的第二文件校验值,所述云业务应用升级方法,所述计算机可读指令被一个或多个处理器执行时还使得一个或多个处理器执行:The storage medium according to claim 16, wherein the response information further comprises a second file check value obtained by the cloud server performing a message digest calculation based on the first file check value corresponding to the plurality of fragmented files In the cloud service application upgrade method, when the computer-readable instructions are executed by one or more processors, they also cause one or more processors to execute:
    根据多个所述分片文件对应的第一计算校验值进行消息摘要计算,确定第二计算校验值;Perform message digest calculation according to the first calculated check value corresponding to the plurality of fragmented files, and determine the second calculated check value;
    所述若检测到多个所述分片文件对应的第一计算校验值与多个所述分片文件对应的第一文件校验值均一致,则根据多个所述分片文件对所述云业务应用进行升级,包括:If it is detected that the first calculated check values corresponding to a plurality of the fragment files are consistent with the first file check values corresponding to the plurality of fragment files, then the plurality of fragment files are compared with each other. The cloud business applications are upgraded, including:
    若检测到多个所述分片文件对应的第一计算校验值与多个所述分片文件对应的第一文件校验值均一致,且所述第二计算校验值与所述第二文件校验值一致,则根据多个所述分片文件对所述云业务应用进行升级。If it is detected that the first calculated check value corresponding to a plurality of the fragment files is consistent with the first file check value corresponding to the plurality of fragment files, and the second calculated check value is the same as the first file check value If the check values of the two files are consistent, the cloud service application is upgraded according to the multiple fragment files.
  18. 根据权利要求17所述的存储介质,其中,所述响应信息还包括所述云端服务器对所述升级版本号对应的升级软件包进行分片处理时得到的多个分片文件所对应的分片顺序信息,所述根据多个所述分片文件对应的第一计算校验值进行消息摘要计算,确定第二计算校验值时,具体执行以下步骤:The storage medium according to claim 17, wherein the response information further includes the fragments corresponding to the multiple fragment files obtained when the cloud server performs fragmentation processing on the upgrade software package corresponding to the upgrade version number Sequence information, the message digest calculation is performed according to the first calculation check value corresponding to the plurality of fragment files, and the second calculation check value is determined, the following steps are specifically performed:
    基于多个所述分片文件对应的第一计算校验值以及多个所述分片文件的分片顺序信息进行消息摘要计算,确定第二计算校验值。The message digest calculation is performed based on the first calculated check value corresponding to the plurality of fragment files and the fragment order information of the plurality of fragment files, and the second calculated check value is determined.
  19. 根据权利要求18所述的存储介质,其中,所述基于多个所述分片文件对应的第一计算校验值以及多个所述分片文件的分片顺序信息进行消息摘要计算,确定第二计算校验值时,具体执行以下步骤:18. The storage medium according to claim 18, wherein the message digest calculation is performed based on the first calculated check value corresponding to the plurality of fragment files and the fragment order information of the plurality of fragment files, and the determination of the first 2. When calculating the check value, perform the following steps:
    根据各个所述分片文件对应的第一计算校验值和各个所述分片文件对应的分片顺序信息生成各个所述分片文件对应的内容属性信息;Generating content attribute information corresponding to each of the fragment files according to the first calculated check value corresponding to each of the fragment files and the fragment sequence information corresponding to each of the fragment files;
    基于各个所述分片文件对应的分片顺序信息对各个所述分片文件的内容属性信息进行拼接处理,得到拼接后的信息;Performing splicing processing on the content attribute information of each fragment file based on the fragment sequence information corresponding to each fragment file to obtain the spliced information;
    基于拼接后的信息进行消息摘要计算,确定所述第二计算校验值。The message digest calculation is performed based on the spliced information, and the second calculation check value is determined.
  20. 根据权利要求18所述的存储介质,其中,所述基于多个所述分片文件的标识信息,发送下载多个所述分片文件的下载请求至所述云端服务器时,具体执行以下步骤:18. The storage medium according to claim 18, wherein when the download request for downloading the plurality of fragment files is sent to the cloud server based on the identification information of the plurality of fragment files, the following steps are specifically executed:
    基于多个分片文件的分片顺序信息,确定多个分片文件的下载顺序;Determine the download sequence of multiple fragmented files based on the fragmentation order information of multiple fragmented files;
    基于下载顺序选择要下载的分片文件,以选择的分片文件对应的标识信息生成下载请求;Select the fragment files to be downloaded based on the download order, and generate a download request with the identification information corresponding to the selected fragment files;
    发送所述下载请求至所述云端服务器。Sending the download request to the cloud server.
PCT/CN2020/118328 2020-07-28 2020-09-28 Method and apparatus for upgrading cloud service application WO2021139238A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010739625.5 2020-07-28
CN202010739625.5A CN111880826A (en) 2020-07-28 2020-07-28 Cloud service application upgrading method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2021139238A1 true WO2021139238A1 (en) 2021-07-15

Family

ID=73200301

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/118328 WO2021139238A1 (en) 2020-07-28 2020-09-28 Method and apparatus for upgrading cloud service application

Country Status (2)

Country Link
CN (1) CN111880826A (en)
WO (1) WO2021139238A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113765688B (en) * 2020-12-29 2024-04-09 北京京东尚科信息技术有限公司 Proprietary cloud platform management method and system and proprietary cloud platform
CN113300875A (en) * 2021-02-10 2021-08-24 阿里巴巴集团控股有限公司 Return source data verification method, server, system and storage medium
CN113076125B (en) * 2021-04-25 2024-04-12 北京金山云网络技术有限公司 Live broadcast service upgrading processing method, device, medium and server
CN113515747B (en) * 2021-05-17 2024-02-09 深圳市友华通信技术有限公司 Equipment upgrading method, device, equipment and storage medium
CN114363321A (en) * 2021-12-30 2022-04-15 支付宝(杭州)信息技术有限公司 File transmission method, equipment and system
CN114676145B (en) * 2022-03-22 2023-05-30 阿里云计算有限公司 Data processing method and data collation system
CN115412275A (en) * 2022-05-23 2022-11-29 蚂蚁区块链科技(上海)有限公司 Trusted execution environment-based private computing system and method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120079277A1 (en) * 2010-09-24 2012-03-29 Patrick Ng Verification and protection of genuine software installation using hardware super key
CN105183519A (en) * 2015-09-18 2015-12-23 烽火通信科技股份有限公司 Device and method for fragmented upgrade of ONU software version
CN109683932A (en) * 2018-12-19 2019-04-26 深圳创维数字技术有限公司 Terminal staging method, device and computer readable storage medium
CN110008757A (en) * 2019-04-09 2019-07-12 江南大学 Data guard method and system in a kind of internet-of-things terminal firmware update
CN110633092A (en) * 2019-09-09 2019-12-31 北京方研矩行科技有限公司 Server for OTA (over the air) upgrading and embedded equipment upgrading method and device
CN110704077A (en) * 2018-07-10 2020-01-17 中兴通讯股份有限公司 Firmware remote upgrading method and device, terminal, mobile device and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103647816A (en) * 2013-12-03 2014-03-19 北京奇虎科技有限公司 Method and device for upgrading application software
CN105867934B (en) * 2016-04-13 2021-01-22 厦门雅迅网络股份有限公司 File remote upgrading method based on dichotomy and MD5 verification
CN109522270A (en) * 2018-10-19 2019-03-26 平安科技(深圳)有限公司 File storing and reading method, electronic device and readable storage medium storing program for executing based on block chain
CN109358883B (en) * 2018-11-05 2021-12-24 珠海格力电器股份有限公司 Program upgrading method, system, application system and storage medium
CN109358888A (en) * 2018-12-18 2019-02-19 郑州云海信息技术有限公司 Server firmware upgrade method, device, system and computer readable storage medium
CN111131450B (en) * 2019-12-23 2022-06-21 北京奇艺世纪科技有限公司 File uploading method, file recombining method and file recombining device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120079277A1 (en) * 2010-09-24 2012-03-29 Patrick Ng Verification and protection of genuine software installation using hardware super key
CN105183519A (en) * 2015-09-18 2015-12-23 烽火通信科技股份有限公司 Device and method for fragmented upgrade of ONU software version
CN110704077A (en) * 2018-07-10 2020-01-17 中兴通讯股份有限公司 Firmware remote upgrading method and device, terminal, mobile device and storage medium
CN109683932A (en) * 2018-12-19 2019-04-26 深圳创维数字技术有限公司 Terminal staging method, device and computer readable storage medium
CN110008757A (en) * 2019-04-09 2019-07-12 江南大学 Data guard method and system in a kind of internet-of-things terminal firmware update
CN110633092A (en) * 2019-09-09 2019-12-31 北京方研矩行科技有限公司 Server for OTA (over the air) upgrading and embedded equipment upgrading method and device

Also Published As

Publication number Publication date
CN111880826A (en) 2020-11-03

Similar Documents

Publication Publication Date Title
WO2021139238A1 (en) Method and apparatus for upgrading cloud service application
WO2021051563A1 (en) Target data archiving method and apparatus, and electronic device and computer non-volatile readable storage medium
WO2022121221A1 (en) Token-based application access method and apparatus, computer device, and medium
US10212034B1 (en) Automated network change management
US20210019418A1 (en) Technique for authentication and prerequisite checks for software updates
CN109391673A (en) A kind of method, system and the terminal device of management update file
CN112187799A (en) Resource access policy generation method and device, storage medium and electronic equipment
WO2021155683A1 (en) Log printing method and apparatus, electronic device, and storage medium
US11307790B2 (en) Method, device, and computer program product for managing data placement
CN111800223B (en) Method, device and system for generating sending message and processing receiving message
CN110442601B (en) Openstack mirror image data parallel acceleration method and device
CN109325002B (en) Text file processing method, device and system, electronic equipment and storage medium
CN116708034B (en) Method, device, medium and equipment for determining security attribute of domain name
CN113037850A (en) Application program upgrading method and device, electronic equipment and storage medium
CN110134419B (en) System upgrading method, device, equipment and storage medium for double-sided cabinet
CN115964721A (en) Program verification method and electronic equipment
CN114172998B (en) File transmission method and device, electronic equipment and storage medium
CN116028917A (en) Authority detection method and device, storage medium and electronic equipment
WO2021042745A1 (en) Method and device for building software installation package, computer device, and storage medium
CN112988738B (en) Data slicing method and device for block chain
CN114172894A (en) Data transmission method and device, server and computer equipment
CN113726885A (en) Method and device for adjusting flow quota
CN112882838B (en) Method and apparatus for vacating resource instances
US20230013018A1 (en) Data integrity verification optimized at unit level
CN116827879A (en) File transmission method and device, storage medium and electronic equipment

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

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

Country of ref document: EP

Kind code of ref document: A1