A cloud platform control updating method, device, cloud platform control and storage medium

By distinguishing static files and library files in cloud platform controls and determining the update method according to file categories, efficient update of cloud platform controls is achieved, solving the problem of long download time and high risk of update failure, and improving the user experience.

CN118689522BActive Publication Date: 2024-12-03HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411185662.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-12-03
Estimated Expiration
2044-08-27

AI Technical Summary

Technical Problem

Cloud platform controls need to download all resource files when updating, resulting in a long download time and a high risk of failure in updates, and poor user experience.

Method used

By introducing first-level resource files, including static files and library files, the update method is determined according to the file category. Static files are updated without restarting the cloud platform control, and library files need to restart the cloud platform control for update, to achieve Download and update on demand.

Benefits of technology

It shortens the download time of cloud platform control updates, reduces the risk of update failure, improves user experience, and avoids unnecessary restart operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118689522B_ABST
    Figure CN118689522B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a cloud platform control update method, device, cloud platform control and storage medium. The cloud platform control can download the file to be updated; according to the file category of the primary resource file, the corresponding update method is determined. If it is an update method corresponding to a static file, the primary resource file is updated using the file to be updated without restarting the cloud platform control; if it is an update method corresponding to a library file, the primary resource file is updated using the file to be updated by restarting the cloud platform control. Since the category identifier can be used to identify the file category of the primary resource file, the file category of the primary resource file can be determined by the category identifier, and then the corresponding update method can be used to update it. Since only the primary resource files that need to be updated need to be downloaded and updated during the update, and there is no need to download all the primary resource files and then update them all, the download time required for the cloud platform control update can be shortened, reducing the risk of update failure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of control update technology, and in particular to a cloud platform control update method, device, cloud platform control and storage medium. Background Art

[0002] The cloud platform is a comprehensive service platform based on cloud computing technology, which can provide functions such as device debugging and LAN device management. The use of the cloud platform depends on the cloud platform controls. The cloud platform is used to provide background services and resource support, and the cloud platform controls are responsible for front-end user interaction. Specifically, users need to install the cloud platform controls on the terminal device and implement various functions of the cloud platform through the cloud platform controls. If the cloud platform updates a certain function, the cloud platform controls also need to be updated to support the updated function of the cloud platform.

[0003] In the current related technologies, cloud platform controls need to download all resource files when updating, and after the download is complete, the user needs to manually restart the cloud platform controls to complete the update of the cloud platform controls. The download time is long, the risk of update failure is high, and the user experience is poor. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a cloud platform control update method, device, cloud platform control and storage medium to shorten the download time required for cloud platform control update, reduce the risk of update failure, and improve user experience. The specific technical solution is as follows:

[0005] In a first aspect, an embodiment of the present application provides a cloud platform control update method, which is applied to a cloud platform control, wherein the cloud platform control implements the function of the cloud platform through a local primary resource file, wherein the primary resource file includes a static file and a library file, and both the static file and the library file can be updated separately, and the method includes:

[0006] When the primary resource file needs to be updated, download the file to be updated from the cloud platform;

[0007] Determine, according to the file category of the primary resource file, an update mode corresponding to the primary resource file, wherein the file category of the primary resource file is determined based on a category identifier, and the category identifier is used to identify the file category of the primary resource file;

[0008] If the determined update method is an update method corresponding to a static file, the primary resource file is updated using the file to be updated without restarting the cloud platform control;

[0009] If the determined update method is the update method corresponding to the library file, the primary resource file is updated using the file to be updated by restarting the cloud platform control.

[0010] Optionally, the method for determining the file category of the primary resource file includes at least one of the following:

[0011] Determine whether the primary resource file has a category identifier corresponding to a static file; if the primary resource file has a category identifier corresponding to a static file, determine that the file category of the primary resource file is a static file; if the primary resource file does not have a category identifier corresponding to a static file, record the file category of the primary resource file as a library file, and record the category identifier of the primary resource file as the category identifier corresponding to the library file; or,

[0012] Determine whether the primary resource file has a category identifier corresponding to a library file; if the primary resource file has a category identifier corresponding to a library file, determine that the file category of the primary resource file is a library file; if the primary resource file does not have a category identifier corresponding to a library file, record the file category of the primary resource file as a static file, and record the category identifier of the primary resource file as a category identifier corresponding to a static file; or,

[0013] Obtain the category identifier of the first-level resource file; if the category identifier is a category identifier corresponding to a static file, determine that the file category of the first-level resource file is a static file; if the category identifier is a category identifier corresponding to a library file, determine that the file category of the first-level resource file is a library file.

[0014] Optionally, the primary resource file includes multiple secondary files, each of which has a file identifier;

[0015] Before the step of downloading the file to be updated from the cloud platform, the method further includes:

[0016] Obtaining a file identifier and a local version of a secondary file included in the primary resource file, and obtaining a latest version corresponding to the file identifier from the cloud platform;

[0017] If the latest version is different from the local version, it is determined that the secondary file corresponding to the file identifier needs to be updated.

[0018] Optionally, the step of updating the primary resource file using the file to be updated without restarting the cloud platform control includes:

[0019] When there are multiple secondary files whose file categories are static files that need to be updated, for each secondary file that needs to be updated, the step of updating the primary resource file using the file to be updated without restarting the cloud platform control is synchronously executed.

[0020] Optionally, the step of updating the primary resource file by using the file to be updated by restarting the cloud platform control includes:

[0021] When there are multiple secondary files whose file category is library files that need to be updated, for each secondary file that needs to be updated, the step of updating the primary resource file using the file to be updated by restarting the cloud platform control is synchronously executed.

[0022] Optionally, before the step of downloading the file to be updated from the cloud platform, the method further includes:

[0023] Obtaining a category identifier of the primary resource file;

[0024] Determining, through the category identifier, that the file category of the primary resource file is a static file or a library file, and recording the file category of the primary resource file;

[0025] The step of determining the update mode corresponding to the primary resource file according to the file category of the primary resource file includes:

[0026] Based on the recorded file category of the primary resource file, it is determined that the update mode corresponding to the primary resource file is the update mode corresponding to the static file or the update mode corresponding to the library file.

[0027] Optionally, the step of determining the update mode corresponding to the first-level resource file according to the file category of the first-level resource file includes:

[0028] Obtaining a category identifier of the primary resource file;

[0029] Determining, by means of the category identifier, that the file category of the primary resource file is a static file or a library file;

[0030] If the file category of the primary resource file is a static file, determining that the update mode corresponding to the primary resource file is the update mode corresponding to the static file;

[0031] If the file type of the primary resource file is a library file, it is determined that the update mode corresponding to the primary resource file is the update mode corresponding to the library file.

[0032] Optionally, the cloud platform control communicates with the cloud platform via a persistent connection;

[0033] The step of updating the primary resource file using the file to be updated without restarting the cloud platform control comprises:

[0034] Without restarting the cloud platform control and without disconnecting the long connection with the cloud platform, updating the primary resource file using the file to be updated;

[0035] The step of updating the primary resource file by using the file to be updated by restarting the cloud platform control comprises:

[0036] Disconnecting the long connection with the cloud platform, and updating the primary resource file using the file to be updated;

[0037] When the primary resource file is updated, restart and establish a long connection with the cloud platform again.

[0038] Optionally, the step of updating the primary resource file using the file to be updated without restarting the cloud platform control includes:

[0039] Using the file to be updated to update the secondary file corresponding to the file identifier of the file to be updated included in the primary resource file, so that the cloud platform displays the cloud platform interface based on the updated secondary file when receiving the update completion message sent by the cloud platform control;

[0040] The local version corresponding to the secondary file is updated to the latest version without restarting the cloud platform control.

[0041] Optionally, the step of updating the primary resource file by using the file to be updated by restarting the cloud platform control includes:

[0042] Setting the update status of the secondary file corresponding to the file identifier of the file to be updated to a not-updated status, wherein the not-updated status is used to indicate that the cloud platform control has downloaded the file to be updated and has not completed the update;

[0043] In the case where the cloud platform control is disconnected from the cloud platform, the secondary file corresponding to the file identifier of the file to be updated included in the primary resource file is updated using the file to be updated, and the cloud platform is restarted, so that the cloud platform displays the cloud platform interface based on the updated secondary file after the cloud platform control is restarted;

[0044] The update status corresponding to the secondary file is set to an updated status, and the local version corresponding to the secondary file included in the primary resource file is updated to the latest version, wherein the updated status is used to indicate that the file to be updated has been updated.

[0045] Optionally, when the cloud platform control is disconnected from the cloud platform, the step of using the file to be updated to update the secondary file corresponding to the file identifier of the file to be updated included in the primary resource file, and restarting includes:

[0046] If the cloud platform control is disconnected from the cloud platform, the secondary file corresponding to the file identifier included in the primary resource file is updated using the file to be updated;

[0047] When the duration of disconnection between the cloud platform control and the cloud platform reaches a preset duration, restart.

[0048] In a second aspect, an embodiment of the present application provides a cloud platform control updating device, which is applied to a cloud platform control, wherein the cloud platform control implements the function of the cloud platform through a local primary resource file, wherein the primary resource file includes a static file and a library file, and both the static file and the library file can be updated separately, and the device includes:

[0049] A file download module, used to download the file to be updated from the cloud platform when the primary resource file needs to be updated;

[0050] A mode determination module, used to determine the update mode corresponding to the primary resource file according to the file category of the primary resource file, wherein the file category of the primary resource file is determined based on a category identifier, and the category identifier is used to identify the file category of the primary resource file;

[0051] A first updating module, configured to update the primary resource file using the file to be updated without restarting the cloud platform control if the determined updating mode is an updating mode corresponding to a static file;

[0052] The second updating module is used to update the primary resource file with the file to be updated by restarting the cloud platform control if the determined updating method is the updating method corresponding to the library file.

[0053] Optionally, the device further comprises:

[0054] A first category determination module is used to determine whether the first-level resource file has a category identifier corresponding to a static file; if the first-level resource file has a category identifier corresponding to a static file, determine that the file category of the first-level resource file is a static file; if the first-level resource file does not have a category identifier corresponding to a static file, record the file category of the first-level resource file as a library file, and record the category identifier of the first-level resource file as the category identifier corresponding to the library file;

[0055] A second category determination module is used to determine whether the primary resource file has a category identifier corresponding to a library file; if the primary resource file has a category identifier corresponding to a library file, determine that the file category of the primary resource file is a library file; if the primary resource file does not have a category identifier corresponding to a library file, record the file category of the primary resource file as a static file, and record the category identifier of the primary resource file as a category identifier corresponding to a static file;

[0056] The third category determination module is used to obtain the category identifier of the first-level resource file; if the category identifier is the category identifier corresponding to the static file, determine that the file category of the first-level resource file is a static file; if the category identifier is the category identifier corresponding to the library file, determine that the file category of the first-level resource file is a library file.

[0057] Optionally, the primary resource file includes multiple secondary files, each of which has a file identifier;

[0058] The device also includes:

[0059] A latest version acquisition module, used to acquire the file identifier and local version of the secondary file included in the primary resource file, and acquire the latest version corresponding to the file identifier from the cloud platform;

[0060] The version comparison module is used to determine that the secondary file corresponding to the file identifier needs to be updated if the latest version is different from the local version.

[0061] Optionally, the first update module includes:

[0062] A first file update submodule is used for synchronously executing the step of updating the primary resource file with the file to be updated without restarting the cloud platform control for each secondary file that needs to be updated when there are multiple secondary files whose file category is static files that need to be updated;

[0063] The second update module includes:

[0064] The second file update submodule is used to synchronously execute the step of updating the primary resource file with the file to be updated by restarting the cloud platform control for each secondary file that needs to be updated when there are multiple secondary files whose file category is library files.

[0065] Optionally, the device further comprises:

[0066] A category identification acquisition module, used to acquire the category identification of the primary resource file;

[0067] A file category recording module, used to determine that the file category of the primary resource file is a static file or a library file through the category identifier, and record the file category of the primary resource file;

[0068] The method determines the module, including:

[0069] The update mode determination submodule is used to determine, based on the recorded file category of the primary resource file, whether the update mode corresponding to the primary resource file is the update mode corresponding to the static file or the update mode corresponding to the library file.

[0070] Optionally, the mode determination module includes:

[0071] A category identification acquisition submodule, used to acquire the category identification of the primary resource file;

[0072] A category determination submodule, used to determine, through the category identifier, whether the file category of the primary resource file is a static file or a library file;

[0073] A first mode determination submodule is used to determine, if the file category of the primary resource file is a static file, that the update mode corresponding to the primary resource file is the update mode corresponding to the static file;

[0074] The second mode determination submodule is used to determine that the update mode corresponding to the first-level resource file is the update mode corresponding to the library file if the file category of the first-level resource file is a library file.

[0075] Optionally, the cloud platform control communicates with the cloud platform via a persistent connection;

[0076] The first update module includes:

[0077] A first updating submodule, configured to update the primary resource file using the file to be updated without restarting the cloud platform control and without disconnecting the long connection with the cloud platform;

[0078] The second update module includes:

[0079] A second updating submodule, used to disconnect the long connection with the cloud platform and update the primary resource file using the file to be updated;

[0080] The long connection establishment submodule is used to restart and re-establish a long connection with the cloud platform when the first-level resource file is updated.

[0081] Optionally, the first update module includes:

[0082] A third file update submodule, configured to update a secondary file corresponding to the file identifier of the file to be updated included in the primary resource file with the file to be updated, so that the cloud platform displays a cloud platform interface based on the updated secondary file when receiving an update completion message sent by the cloud platform control;

[0083] The version update submodule is used to update the local version corresponding to the secondary file to the latest version without restarting the cloud platform control.

[0084] Optionally, the second updating module includes:

[0085] A first update status setting submodule, used to set the update status corresponding to the secondary file corresponding to the file identifier of the file to be updated to a non-updated status, wherein the non-updated status is used to indicate that the cloud platform control has downloaded the file to be updated and has not completed the update;

[0086] A fourth file update submodule, configured to update a secondary file corresponding to a file identifier of the file to be updated included in the primary resource file with the file to be updated when the cloud platform control is disconnected from the cloud platform, and restart the cloud platform so that the cloud platform displays a cloud platform interface based on the updated secondary file after the cloud platform control is restarted;

[0087] The second update status setting submodule is used to set the update status corresponding to the secondary file to the updated status, and update the local version corresponding to the secondary file included in the primary resource file to the latest version, wherein the updated status is used to indicate that the file to be updated has been updated.

[0088] Optionally, the fourth file updating submodule includes:

[0089] A file updating unit, configured to update the secondary file corresponding to the file identifier included in the primary resource file with the file to be updated if the cloud platform control is disconnected from the cloud platform;

[0090] A restarting unit, configured to restart the cloud platform control when the duration of disconnection between the cloud platform control and the cloud platform reaches a preset duration;

[0091] In a third aspect, an embodiment of the present application provides a cloud platform control, including:

[0092] Memory, used to store computer programs;

[0093] The processor is used to implement any method described in the first aspect when executing a program stored in the memory.

[0094] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any method described in the first aspect is implemented.

[0095] Beneficial effects of the embodiments of the present application:

[0096] In the scheme provided by the embodiment of the present application, the cloud platform control can download the file to be updated from the cloud platform when the primary resource file needs to be updated; determine the update method corresponding to the primary resource file according to the file category of the primary resource file; if the determined update method is the update method corresponding to the static file, the primary resource file is updated using the file to be updated without restarting the cloud platform control; if the determined update method is the update method corresponding to the library file, the primary resource file is updated using the file to be updated by restarting the cloud platform control, wherein the file category of the primary resource file is determined based on the category identifier, and the category identifier is used to identify the file category of the primary resource file. Since the primary resource file has a category identifier, and the category identifier can be used to identify the file category of the primary resource file, the file category of the primary resource file can be determined as a static file or a library file by the category identifier. Since the update of the library file requires restarting the cloud platform control, but the static file does not, after determining the file category of the primary resource file, the update method corresponding to the primary resource file can be determined, and then the primary resource file is updated using the determined update method, which can avoid the need to restart the cloud platform control when updating the cloud platform control, and can improve the user experience. Since the cloud platform control only needs to download and update the first-level resource files that need to be updated when updating, and does not need to download all the first-level resource files and then update all the first-level resource files, the download time required for the cloud platform control update can be shortened, reducing the risk of update failure. Of course, implementing any product or method of the present application does not necessarily require all of the advantages described above to be achieved at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0098] Figure 1 A flowchart of a cloud platform control update method provided in an embodiment of the present application;

[0099] Figure 2 Based on Figure 1 A flow chart of determining whether a secondary file needs to be updated according to the embodiment shown;

[0100] Figure 3 Based on Figure 1 A flow chart of a file category recording method of the illustrated embodiment;

[0101] Figure 4 for Figure 1 A specific flow chart of step S102 in the illustrated embodiment;

[0102] Figure 5 for Figure 1 A specific flow chart of step S103 in the illustrated embodiment;

[0103] Figure 6 for Figure 1 A specific flow chart of step S104 in the illustrated embodiment;

[0104] Figure 7 for Figure 6 A specific flow chart of step S602 in the illustrated embodiment;

[0105] Figure 8 Based on Figure 1 A flow chart of updating a cloud platform control in the illustrated embodiment;

[0106] Fig. 9 Based on Figure 1 A signaling interaction diagram for updating a cloud platform control in the illustrated embodiment;

[0107] Fig.10 A schematic diagram of the structure of a cloud platform control updating device provided in an embodiment of the present application;

[0108] Fig.11 A schematic diagram of the structure of a cloud platform control provided in an embodiment of the present application. DETAILED DESCRIPTION

[0109] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.

[0110] In order to shorten the download time required for cloud platform control updates, reduce the risk of update failures, and improve user experience, the present application embodiment provides a cloud platform control update method, device, cloud platform control, computer-readable storage medium, and computer program product. The following first introduces a cloud platform control update method provided by the present application embodiment.

[0111] like Figure 1 As shown, a cloud platform control update method is applied to a cloud platform control, wherein the cloud platform control implements the functions of the cloud platform through a local primary resource file, wherein the primary resource file includes a static file and a library file, and both the static file and the library file can be updated separately, and the method includes:

[0112] S101, when the primary resource file needs to be updated, download the file to be updated from the cloud platform;

[0113] S102, determining the update mode corresponding to the first-level resource file according to the file category of the first-level resource file; if the determined update mode is the update mode corresponding to the static file, executing step S103; if the determined update mode is the update mode corresponding to the library file, executing step S104;

[0114] The file category of the first-level resource file is determined based on a category identifier, and the category identifier is used to identify the file category of the first-level resource file.

[0115] S103, updating the primary resource file using the file to be updated without restarting the cloud platform control;

[0116] S104: Restarting the cloud platform control to update the primary resource file using the file to be updated.

[0117] It can be seen that in the embodiment of the present application, the cloud platform control can download the file to be updated from the cloud platform when the primary resource file needs to be updated; determine the update method corresponding to the primary resource file according to the file category of the primary resource file; if the determined update method is the update method corresponding to the static file, the primary resource file is updated using the file to be updated without restarting the cloud platform control; if the determined update method is the update method corresponding to the library file, the primary resource file is updated using the file to be updated by restarting the cloud platform control, wherein the file category of the primary resource file is determined based on the category identifier, and the category identifier is used to identify the file category of the primary resource file. Since the primary resource file has a category identifier, and the category identifier can be used to identify the file category of the primary resource file, the file category of the primary resource file can be determined as a static file or a library file by the category identifier. Since the update of the library file requires restarting the cloud platform control, but the static file does not, after determining the file category of the primary resource file, the update method corresponding to the primary resource file can be determined, and then the primary resource file is updated using the determined update method, which can avoid the need to restart the cloud platform control when updating the cloud platform control, and improve the user experience. Since the cloud platform control only needs to download and update the first-level resource files that need to be updated when updating, instead of downloading all the first-level resource files and then updating all the first-level resource files, the download time required for the cloud platform control update can be shortened and the risk of update failure can be reduced.

[0118] The file category of the first-level resource files of the local cloud platform control can be static files or library files. Among them, static files are first-level resource files related to the cloud platform interface for front-end use, for example, they can be pictures, style sheets, etc. in the cloud platform interface of the Web front-end. Library files are first-level resource files containing reusable code. Since the first-level resource files are divided into static files and library files, both static corpus and library files can be updated separately.

[0119] The first-level resource file has a category identifier, which can be used to identify the file category of the first-level resource file. The category identifier can be the file name suffix of the first-level resource file, internal metadata, or a specific directory structure in the file path, which is not specifically limited here. For example, assuming that the category identifier is the file name suffix of the first-level resource file, the file name suffix of the static file can be '.html', '.jpg', '.jpg', '.mp4', and the file name suffix of the dynamic file can be '.lib', '.a', '.dll', '.so'.

[0120] When the primary resource file needs to be updated, the cloud platform control can download the file to be updated from the cloud platform, that is, execute step S101. The file to be updated is the latest version of the file corresponding to the primary resource file. In one embodiment, when the user logs in to the cloud platform through the cloud platform control, the cloud platform control establishes a link with the cloud platform, and the cloud platform control can periodically execute the above step S101 according to a preset time interval.

[0121] After downloading the file to be updated, you need to use the file to be updated to update the primary resource file. Different file categories have different update methods. Specifically:

[0122] For static files, since static files are usually front-end resources, they can be updated directly. For library files, when cloud platform controls use library files, they need to load the library files into memory. In this case, the library files will be locked by the process and cannot be updated. Therefore, you need to wait until the process ends, the cloud platform controls are disconnected from the cloud platform, and the lock on the library files is released before you can update the library files.

[0123] Since static files and library files correspond to different update methods, in order to determine the update method suitable for the file category of the primary resource file, the update method corresponding to the primary resource file can be determined according to the file category of the primary resource file, that is, step S102 is executed. The file category of the primary resource file can be determined based on the category identifier.

[0124] If the determined update method is the update method corresponding to the static file, the cloud platform control can update the primary resource file with the file to be updated without restarting the cloud platform control, that is, execute the above step S103. For example, for the primary resource file whose file category is a static file, the corresponding primary resource file can be directly replaced with the file to be updated during the process running without restarting the cloud platform control, and the cloud platform can display the cloud platform interface based on the updated primary resource file.

[0125] If the determined update method is the update method corresponding to the library file, the cloud platform control can update the first-level resource file with the file to be updated by restarting the cloud platform control. For example, for a first-level resource file whose file category is a library file, the corresponding first-level resource file can be replaced with the file to be updated when the cloud platform control is disconnected from the cloud platform. After the cloud platform control is restarted, the cloud platform can display the cloud platform interface based on the updated first-level resource file.

[0126] It can be seen that in the embodiment of the present application, since the primary resource file has a category identifier, and the category identifier can be used to identify the file category of the primary resource file, the file category of the primary resource file can be determined as a static file or a library file through the category identifier. Since the update of the library file requires restarting the cloud platform control, but the static file does not, after determining the file category of the primary resource file, the update method corresponding to the primary resource file can be determined, and then the primary resource file is updated using the determined update method, which can avoid the need to restart the cloud platform control when updating the cloud platform control, and can improve the user experience. Since the cloud platform control only needs to download and update the primary resource files that need to be updated when updating, and does not need to download all the primary resource files and then update all the primary resource files, the required download traffic and the user's waiting time can be reduced. Since static files and library files can be updated separately and do not depend on each other, there is no risk of insufficient download of primary resource files leading to abnormal user use. Since the update of the cloud platform control is divided into two parts, static files and library files, the first-level resource file is judged as a static file or a library file according to different category identifiers, and then it is confirmed whether the second-level files included in the first-level resource file need to be updated and downloaded, and the update and download of static files and library files can be completed independently without affecting each other, so the traffic required to download the files to be updated can be reduced, and the functional stability of the cloud platform control can be maintained. In addition, using the solution of this application, the cloud platform control will only download and update the first-level resource files that need to be updated. If the cloud platform releases updates only for local users, then users around the world will not receive update prompt messages, and they do not need to re-download all the first-level resource files, which can improve the user experience.

[0127] As an implementation of the embodiment of the present application, the method for determining the file category of the above-mentioned primary resource file may include at least one of the following three methods:

[0128] Determine whether the primary resource file has a category identifier corresponding to a static file; if the primary resource file has a category identifier corresponding to a static file, determine that the file category of the primary resource file is a static file; if the primary resource file does not have a category identifier corresponding to a static file, record the file category of the primary resource file as a library file, and record the category identifier of the primary resource file as the category identifier corresponding to the library file; or,

[0129] Determine whether the primary resource file has a category identifier corresponding to a library file; if the primary resource file has a category identifier corresponding to a library file, determine that the file category of the primary resource file is a library file; if the primary resource file does not have a category identifier corresponding to a library file, record the file category of the primary resource file as a static file, and record the category identifier of the primary resource file as a category identifier corresponding to a static file; or,

[0130] Obtain the category identifier of the first-level resource file; if the category identifier is a category identifier corresponding to a static file, determine that the file category of the first-level resource file is a static file; if the category identifier is a category identifier corresponding to a library file, determine that the file category of the first-level resource file is a library file.

[0131] In the first implementation, since the category identifier of the primary resource file can be used to determine the file category of the primary resource file, only the category identifier corresponding to the static file can be identified. If the primary resource file has the category identifier corresponding to the static file, then the file category of the primary resource file can be determined to be a static file. If the primary resource file does not have the category identifier corresponding to the static file, then the file category of the primary resource file can be recorded as a library file, and the category identifier of the primary resource file can be recorded as the category identifier corresponding to the library file.

[0132] For example, assuming that the first-level resource file 1 has a category identifier corresponding to a static file, and the first-level resource file 2 does not have a category identifier corresponding to a static file, then the file category of the first-level resource file 1 can be determined as a static file, and the file category of the first-level resource file 2 can be recorded as a library file, and the category identifier of the first-level resource file 2 can be recorded as the category identifier corresponding to the library file.

[0133] In the second implementation, since the category identifier of the primary resource file can be used to determine the file category of the primary resource file, only the category identifier corresponding to the library file can be identified. If the primary resource file has the category identifier corresponding to the library file, then the file category of the primary resource file can be determined to be a library file. If the primary resource file does not have the category identifier corresponding to the library file, then the file category of the primary resource file can be recorded as a static file, and the category identifier of the primary resource file can be recorded as the category identifier corresponding to the static file.

[0134] For example, assuming that the first-level resource file 3 has a category identifier corresponding to the library file, and the first-level resource file 4 does not have a category identifier corresponding to the library file, then the file category of the first-level resource file 3 can be determined as a library file, and the file category of the first-level resource file 4 can be recorded as a static file, and the category identifier of the first-level resource file 4 can be recorded as the category identifier corresponding to the static file.

[0135] In the third implementation, the category identifiers corresponding to the library file and the static file can be identified. In this case, the cloud platform control can obtain the category identifier of the primary resource file. If the category identifier is the category identifier corresponding to the static file, then the file category of the primary resource file can be determined to be a static file; if the category identifier is the category identifier corresponding to the library file, then the file category of the primary resource file can be determined to be a library file.

[0136] For example, assuming that the first-level resource file 5 has a category identifier corresponding to a library file, and the first-level resource file 6 has a category identifier corresponding to a static file, then it can be determined that the file category of the first-level resource file 5 is a library file, and the file category of the first-level resource file 6 is a static file.

[0137] It can be seen that in the embodiments of the present application, in the first two implementations, the category identifier of the first-level resource file of only one file category can be identified, without identifying the category identifiers of the first-level resource files of two file categories, and the file category of the first-level resource file can be determined based on whether the first-level resource file has the identified category identifier. In the third embodiment, the category identifiers of the first-level resource files of two file categories can be identified, and the file category of the first-level resource file can be determined directly based on the category identifier. In this way, the file category of the first-level resource file can be quickly and accurately determined through the above three implementations.

[0138] As an implementation method of the present application, a primary resource file may include multiple secondary files, each of which has a file identifier. In this case, Figure 2 As shown, before the step of downloading the file to be updated from the cloud platform, the method may further include:

[0139] S201, obtaining the file identifier and local version of the secondary file included in the primary resource file, and obtaining the latest version corresponding to the file identifier from the cloud platform; if the latest version is different from the local version, executing step S202; if the latest version is the same as the local version, executing step S203;

[0140] A primary resource file may include multiple secondary files. A secondary file is a subfile of a primary resource file. Each secondary file is parallel and independent of each other. Each secondary file may have a file identifier, which may be used to uniquely identify the secondary file. For example, the file identifier may be the file name, a universally unique identifier (UUID), a hash value, etc. of the secondary file, which is not specifically limited here.

[0141] The version of the secondary file stored in the cloud platform is the latest version, and the version of the secondary file stored locally in the cloud platform control is the local version. After the cloud platform is updated with functions, the local version may lag behind the latest version. In this case, the cloud platform control may not support the new functions updated by the cloud platform. Among them, the local version and the latest version can be digital version numbers, timestamp version numbers, subtitle version numbers, etc., which are not specifically limited here.

[0142] In order to avoid the above situation, the cloud platform control can obtain the file identifier and local version of the secondary file included in the primary resource file, and obtain the latest version corresponding to the file identifier from the cloud platform, that is, execute step S201. Next, the cloud platform control can compare the local version corresponding to the file identifier of the secondary file with the latest version, and then determine whether the secondary file needs to be updated.

[0143] S202, determining that the secondary file corresponding to the file identifier needs to be updated;

[0144] If the latest version corresponding to the file identifier of the secondary file is different from the local version, it means that the local version of the secondary file stored in the cloud platform control lags behind the latest version, then it can be determined that the secondary file corresponding to the file identifier needs to be updated.

[0145] For example, the cloud platform control can obtain the file identifier r398cja91 of a secondary file and the local version v1.0 of the secondary file. Next, the cloud platform control can obtain the latest version corresponding to the file identifier r398cja91 from the cloud platform, and the latest version obtained is v2.0. Since the local version v1.0 is different from the latest version v2.0, it is determined that the secondary file with the file identifier r398cja91 needs to be updated.

[0146] S203: Determine that the secondary file corresponding to the file identifier does not need to be updated.

[0147] If the latest version corresponding to the file identifier of the secondary file is the same as the local version, it means that the local version of the secondary file stored in the cloud platform control is the latest version, and it can be determined that the secondary file corresponding to the file identifier does not need to be updated.

[0148] It can be seen that in the embodiment of the present application, the cloud platform control can obtain the file identifier and local version of the secondary file included in the primary resource file, and obtain the latest version corresponding to the file identifier from the cloud platform; if the latest version is different from the local version, it is determined that the secondary file corresponding to the file identifier needs to be updated. If the latest version corresponding to the file identifier of the secondary file is different from the local version, it means that the local version of the secondary file stored by the cloud platform control lags behind the latest version, and then it is determined that the secondary file corresponding to the file identifier needs to be updated. In this way, it is possible to quickly and accurately determine whether the secondary file needs to be updated, thereby achieving the effect of the cloud platform control automatically detecting whether the secondary file needs to be updated.

[0149] As an implementation of an embodiment of the present application, the above step of updating the primary resource file using the file to be updated without restarting the cloud platform control may include:

[0150] When there are multiple secondary files whose file categories are static files that need to be updated, for each secondary file that needs to be updated, the step of updating the primary resource file using the file to be updated without restarting the cloud platform control is synchronously executed.

[0151] Since multiple secondary files are not dependent on each other, the update process of multiple secondary files will not affect each other. If there are multiple secondary files with the file category of static files that need to be updated, the cloud platform control can synchronously execute step S103 in the above embodiment for each secondary file that needs to be updated, that is, simultaneously update each secondary file with the file category of static files that needs to be updated.

[0152] Accordingly, the step of updating the primary resource file by using the file to be updated by restarting the cloud platform control may include:

[0153] When there are multiple secondary files whose file category is library files that need to be updated, for each secondary file that needs to be updated, the step of updating the primary resource file using the file to be updated by restarting the cloud platform control is synchronously executed.

[0154] Since multiple secondary files are not dependent on each other, the update process of multiple secondary files will not affect each other. If there are multiple secondary files with the file category of library files that need to be updated, the cloud platform control can synchronously execute step S104 in the above embodiment for each secondary file that needs to be updated, that is, simultaneously update each secondary file with the file category of library files that needs to be updated.

[0155] In one implementation, when there are multiple secondary files that need to be updated, the cloud platform control can synchronously update each secondary file that needs to be updated according to the update method corresponding to each secondary file.

[0156] For example, assuming that it is necessary to update secondary files 1-secondary files 5, the files to be updated corresponding to secondary files 1-secondary files 5 are files to be updated 1-file 5 respectively, among which secondary files 1-secondary files 3 are static files, and secondary files 4 and secondary files 5 are library files. Then the cloud platform control can simultaneously adopt the update method corresponding to the static files, using files 1-files to be updated 3 to update secondary files 1-secondary files 3, and adopt the update method corresponding to the library files, using files 4 and files 5 to be updated to update secondary files 4 and secondary files 5.

[0157] It can be seen that in the embodiment of the present application, when there are multiple secondary files that need to be updated, for each secondary file that needs to be updated, the cloud platform control can synchronously adopt the update method corresponding to each secondary file to update each secondary file. Since multiple secondary files are independent of each other, the update process between multiple secondary files will not affect each other. When multiple secondary files need to be updated, the cloud platform control can synchronously update multiple secondary files without having to update multiple secondary files one by one, which can improve the update efficiency.

[0158] As an implementation method of the present application, Figure 3 As shown, before the step of downloading the file to be updated from the cloud platform, the method may further include:

[0159] S301, obtaining a category identifier of the primary resource file;

[0160] Since different file categories correspond to different update methods, and the file category is determined based on the category identifier, in order to determine the update method of the primary resource file, the category identifier of the primary resource file may be obtained before downloading the file to be updated.

[0161] S302: Determine, through the category identifier, whether the file category of the primary resource file is a static file or a library file, and record the file category of the primary resource file.

[0162] Since the category identifier is used to identify the file category of the first-level resource file as a static file or a library file, the cloud platform control can determine the file category of the first-level resource file through the category identifier after obtaining the category identifier of the first-level resource file. Since the update method of the first-level resource file can be determined based on the file category of the first-level resource file, the cloud platform control can record the file category of the first-level resource file. In this way, when the first-level resource file is subsequently updated, the cloud platform control can determine the corresponding update method based on the recorded file category.

[0163] Accordingly, the step of determining the update method corresponding to the primary resource file according to the file category of the primary resource file may include:

[0164] Based on the recorded file category of the primary resource file, it is determined that the update mode corresponding to the primary resource file is the update mode corresponding to the static file or the update mode corresponding to the library file.

[0165] Since the file category of the first-level resource file has been recorded and the file category can be used to determine the update method of the first-level resource file, the cloud platform control can determine the update method corresponding to the first-level resource file as the update method corresponding to the static file or the update method corresponding to the library file based on the recorded file category of the first-level resource file.

[0166] For example, assuming that the category identifier is the file name suffix, before downloading the file to be updated, the cloud platform control can obtain the file name suffixes '.jpg' and '.lib' of the first-level resource file 1 and the first-level resource file 2. The cloud platform control can determine and record the file categories of the first-level resource file 1 and the first-level resource file 2 as static files and dynamic files, respectively, based on the file name suffixes. When the first-level resource file 1 and the first-level resource file 2 are subsequently updated, it can be determined based on the pre-recorded file categories that the update methods corresponding to the first-level resource file 1 and the first-level resource file 2 are the update methods corresponding to the static files and the update methods corresponding to the library files, respectively.

[0167] It can be seen that in the embodiment of the present application, the cloud platform control can obtain the category identification of the primary resource file; determine the file category of the primary resource file as a static file or a library file through the category identification, and record the file category of the primary resource file; based on the recorded file category of the primary resource file, determine the update method corresponding to the primary resource file as the update method corresponding to the static file or the update method corresponding to the library file. Since the update method corresponding to the primary resource file can be determined according to the file category of the primary resource file, the cloud platform control can determine and record the file category of the primary resource file before downloading the file to be updated, and then in the subsequent update process, the cloud platform control can determine the corresponding update method according to the recorded file category of the primary resource file. In this way, the update method suitable for the primary resource file can be determined quickly and accurately.

[0168] As an implementation method of the present application, Figure 4 As shown, the step of determining the update mode corresponding to the primary resource file according to the file category of the primary resource file may include:

[0169] S401, obtaining a category identifier of the primary resource file;

[0170] When updating a primary resource file, the cloud platform control can first determine the file category of the primary resource file, and then determine the corresponding update method to update the primary resource file according to the file category. Since the category identifier can identify the file category of the primary resource file, in order to determine the file category of the primary resource file, the cloud platform control can obtain the category identifier of the primary resource file.

[0171] S402, determining through the category identifier whether the file category of the primary resource file is a static file or a library file; if the file category of the primary resource file is a static file, executing step S403; if the file category of the primary resource file is a library file, executing step S404;

[0172] After obtaining the category identifier, the cloud platform control can use the category identifier to determine whether the file category of the first-level resource file is a static file or a library file, and then determine whether the update method corresponding to the first-level resource file is the update method corresponding to the static file or the update method corresponding to the library file based on the determined file category.

[0173] S403, determining that the update mode corresponding to the primary resource file is the update mode corresponding to the static file;

[0174] If the file category of the primary resource file is a static file, the cloud platform control may determine that the update method corresponding to the primary resource file is the update method corresponding to the static file.

[0175] S404: Determine that the update mode corresponding to the primary resource file is the update mode corresponding to the library file.

[0176] If the file category of the primary resource file is a library file, the cloud platform control may determine that the update method corresponding to the primary resource file is the update method corresponding to the library file.

[0177] It can be seen that in the embodiment of the present application, the cloud platform control can obtain the category identification of the first-level resource file; determine the file category of the first-level resource file as a static file or a library file through the category identification; if the file category of the first-level resource file is a static file, determine the update method corresponding to the first-level resource file as the update method corresponding to the static file; if the file category of the first-level resource file is a library file, determine the update method corresponding to the first-level resource file as the update method corresponding to the library file. Since the cloud platform control determines the file category of the first-level resource file when updating the first-level resource file, it can directly use the determined update method to update the first-level resource file after determining the update method corresponding to the first-level resource file, without the need to record the file category after determining the file category of the first-level resource file. Therefore, it is possible to more quickly determine the update method suitable for the first-level resource file, and thus the first-level resource file can be updated more quickly.

[0178] As an implementation method of an embodiment of the present application, the cloud platform control and the cloud platform may communicate through a long connection. In this case, the step of updating the primary resource file using the file to be updated without restarting the cloud platform control may include:

[0179] Without restarting the cloud platform control and without disconnecting the long connection with the cloud platform, the first-level resource file is updated using the file to be updated.

[0180] Since static files usually do not involve the core logic of the cloud platform control, when updating the static files, the first-level resource files can be updated using the files to be updated without disconnecting the long connection and restarting the cloud platform control.

[0181] Accordingly, the step of updating the primary resource file by using the file to be updated by restarting the cloud platform control may include:

[0182] Disconnect the long connection with the cloud platform, and use the file to be updated to update the primary resource file; when the updating of the primary resource file is completed, restart and establish a long connection with the cloud platform again.

[0183] Since library files usually contain the core code and core logic of cloud platform controls, and may involve running processes or services, when updating library files, cloud platform controls need to disconnect the persistent connection with the cloud platform and use the files to be updated to update the primary resource files. When the primary resource files are updated, the cloud platform controls can restart and establish a persistent connection with the cloud platform again.

[0184] It can be seen that in the embodiment of the present application, the cloud platform control can update static files without disconnecting the long connection, and update the library file when the long connection is disconnected. In this way, it can be ensured that when the static file is updated, the normal communication between the cloud platform control and the cloud platform is not affected, and the normal use of the user is not affected. In addition, it can also be ensured that when the library file is updated, the update of the library file is carried out normally.

[0185] As an implementation method of the present application, Figure 5 As shown, the above step of updating the primary resource file using the file to be updated without restarting the cloud platform control may include:

[0186] S501, using the file to be updated to update the secondary file corresponding to the file identifier of the file to be updated included in the primary resource file, so that the cloud platform displays the cloud platform interface based on the updated secondary file when receiving the update completion message sent by the cloud platform control;

[0187] Since static files are front-end resources, they usually only involve the display of the cloud platform interface and will not be locked by the process. Therefore, there is no need to restart the cloud platform control to update static files. In the case where the primary resource file is a static file, the cloud platform control can use the file to be updated to update the secondary file corresponding to the file identifier of the file to be updated included in the primary resource file. The method of updating the primary resource file can be to use the file to be updated to replace the secondary file of the local cloud platform control.

[0188] When the update is completed, the cloud platform control can send an update completion message to the cloud platform. When the cloud platform receives the update completion message, it can display the cloud platform interface based on the updated secondary file.

[0189] For example, assuming that the file ID of the file to be updated is 12894430, the cloud platform control can use the file to be updated to update the secondary file in the local primary resource file with the same file ID 12894430. If the latest version of the file to be updated is v3.0, and the local version of the local secondary file is v2.0, then after the update is completed, the cloud platform control can send an update completion message to the cloud platform, and when the cloud platform receives the update completion message, it can display the cloud platform interface based on the updated v3.0 version of the secondary file.

[0190] S502: Update the local version corresponding to the secondary file to the latest version without restarting the cloud platform control.

[0191] Since the local version is the version of the secondary file stored locally by the cloud platform control, after updating the secondary file, the local version corresponding to the secondary file can be updated to the latest version without restarting the cloud platform control, so that when the secondary file is subsequently detected to see if it needs to be updated, the version of the secondary file can be accurately determined. Continuing with the previous example, the cloud platform control can update the local version corresponding to the secondary file 12894430 from v2.0 to v3.0 without restarting the cloud platform control.

[0192] It can be seen that in the embodiment of the present application, the cloud platform control can use the file to be updated to update the secondary file corresponding to the file identifier of the file to be updated included in the primary resource file, so that when the cloud platform receives the update completion message sent by the cloud platform control, the cloud platform displays the cloud platform interface based on the updated secondary file; the local version corresponding to the secondary file is updated to the latest version without restarting the cloud platform control. Since static files are not locked by the process, it is not necessary to update static files by restarting the cloud platform control. In the process of users using the cloud platform, the secondary files included in the primary resource files whose file category is static files can also be updated. When the cloud platform receives the update completion message, the cloud platform interface can be displayed based on the updated secondary file. In this way, if the function update of the cloud platform is only an update of the interface function related to the business, then with the release of the updated version, the cloud platform control can directly update the relevant primary resource files, and the update can take effect immediately. Users can use the relevant functions of the latest version of the cloud platform in a timely manner, and no user intervention is required, and the silent update of the cloud platform control can be realized.

[0193] As an implementation method of the present application, Figure 6 As shown, the above step of updating the primary resource file by using the file to be updated by restarting the cloud platform control may include:

[0194] S601, setting the update status of the secondary file corresponding to the file identifier of the file to be updated to a non-updated status;

[0195] When the cloud platform control uses a library file, the library file will be locked by the process and cannot be updated. It is necessary to wait until the process ends, the cloud platform control disconnects from the cloud platform, and releases the lock on the library file before the library file can be updated. Therefore, in the case where the file category of the primary resource file is a library file, after the download of the file to be updated is completed, the update status corresponding to the secondary file can be set to the unupdated state, where the unupdated state is used to indicate that the cloud platform control has downloaded the file to be updated and has not completed the update. Among them, the way to establish a link between the cloud platform control and the cloud platform can be a long connection, a short connection, polling, etc.

[0196] S602, when the cloud platform control is disconnected from the cloud platform, updating the secondary file corresponding to the file identifier of the file to be updated included in the primary resource file with the file to be updated, and restarting, so that the cloud platform displays the cloud platform interface based on the updated secondary file after the cloud platform control is restarted;

[0197] When the cloud platform control is disconnected from the cloud platform, the cloud platform control can use the file to be updated to update the secondary file corresponding to the file identifier of the file to be updated included in the primary resource file. Since the update of the library file needs to restart the cloud platform control to take effect, the cloud platform control can be restarted, and the cloud platform can display the cloud platform interface based on the updated secondary file after the cloud platform control is restarted.

[0198] S603: Set the update status corresponding to the secondary file to an updated status, and update the local version corresponding to the secondary file included in the primary resource file to the latest version.

[0199] Since the update of the primary resource file has been completed, the cloud platform control can set the update status of the secondary file to the updated status, and update the local version of the secondary file included in the primary resource file to the latest version. The updated status is used to indicate that the file to be updated has been updated.

[0200] It can be seen that in the embodiment of the present application, the cloud platform control can set the update status corresponding to the secondary file to the unupdated status; when the cloud platform control is disconnected from the cloud platform, the secondary file corresponding to the file identifier of the to-be-updated file included in the primary resource file is updated using the to-be-updated file, and restarted, so that the cloud platform can display the cloud platform interface based on the updated secondary file after the cloud platform control is restarted; the update status corresponding to the secondary file is set to the updated status, and the local version corresponding to the secondary file included in the primary resource file is updated to the latest version. Since the update of the library file is performed when the cloud platform control is disconnected from the cloud platform, and the update of the library file will take effect after the cloud platform control is restarted, it can be guaranteed that it will not affect the user's use this time, and it can be ensured that it will take effect the next time the user uses it.

[0201] As an implementation method of the present application, Figure 7 As shown, in the case where the cloud platform control is disconnected from the cloud platform, the step of using the file to be updated to update the secondary file corresponding to the file identifier of the file to be updated included in the primary resource file, and restarting may include:

[0202] S701, if the cloud platform control is disconnected from the cloud platform, using the file to be updated to update the secondary file corresponding to the file identifier included in the primary resource file;

[0203] Since the update of the library file needs to be performed at the end of the process, when the cloud platform control is disconnected from the cloud platform, the cloud platform control can use the file to be updated to update the secondary file corresponding to the file identifier included in the primary resource file.

[0204] S702, restarting when the cloud platform control is disconnected from the cloud platform for a duration reaching a preset duration.

[0205] The update of the library file will take effect only after the cloud platform control is restarted, and it takes a certain amount of time for the cloud platform control to update the secondary file. Therefore, when the cloud platform control is disconnected from the cloud platform for a preset period of time, the cloud platform control can restart itself. The preset period of time can be determined based on the time required for the cloud platform control to update the library file. For example, the preset period of time can be 5 minutes, 10 minutes, 15 minutes, etc., which are all reasonable.

[0206] For another example, assuming that the preset duration is 5 minutes, and the cloud platform control is disconnected from the cloud platform at 8:00, then the cloud platform control can use the file to be updated to update the secondary file corresponding to the file identifier included in the primary resource file at 8:00. At 8:05, the cloud platform control can be restarted, and the cloud platform can display the cloud platform interface based on the updated secondary file after the cloud platform control is restarted.

[0207] It can be seen that in the embodiment of the present application, if the cloud platform control is disconnected from the cloud platform, the cloud platform control can use the file to be updated to update the secondary file corresponding to the file identifier included in the primary resource file; when the duration of the disconnection between the cloud platform control and the cloud platform reaches a preset duration, restart. Since the update of the library file will only take effect after the cloud platform control is restarted, and it takes a certain amount of time for the cloud platform control to update the secondary file, when the duration of the disconnection between the cloud platform control and the cloud platform reaches a preset duration, the cloud platform control can restart itself, so that the cloud platform will display the cloud platform interface based on the updated secondary file after the cloud platform control is restarted. In this way, when the user logs in to the cloud platform again, the cloud platform control is already in the latest state. If the library file needs to be upgraded or iterated, the library file can be upgraded without the user's perception, without affecting the user's use of the cloud platform control.

[0208] As an implementation of an embodiment of the present application, the above step of updating the primary resource file using the file to be updated without restarting the cloud platform control may include:

[0209] When there are multiple first-level resource files whose file categories need to be updated are static files, for each first-level resource file that needs to be updated, the step of updating the first-level resource file using the file to be updated without restarting the cloud platform control is synchronously executed.

[0210] Since multiple first-level resource files are independent of each other, the update processes of multiple first-level resource files will not affect each other. If there are multiple first-level resource files with the file category of static files that need to be updated, the cloud platform control can synchronously execute step S103 in the above embodiment for each first-level resource file that needs to be updated, that is, simultaneously update each first-level resource file with the file category of static files that needs to be updated.

[0211] Accordingly, the step of updating the primary resource file by using the file to be updated by restarting the cloud platform control may include:

[0212] When there are multiple first-level resource files whose file category is library files that need to be updated, for each first-level resource file that needs to be updated, the step of updating the first-level resource file using the file to be updated by restarting the cloud platform control is synchronously executed.

[0213] Since multiple first-level resource files are independent of each other, the update processes of multiple first-level resource files will not affect each other. If there are multiple first-level resource files whose file categories are library files that need to be updated, the cloud platform control can synchronously execute step S104 in the above embodiment for each first-level resource file that needs to be updated, that is, simultaneously update each first-level resource file whose file category is a library file that needs to be updated.

[0214] In one implementation, when there are multiple first-level resource files that need to be updated, the cloud platform control can synchronously update each first-level resource file that needs to be updated according to the update method corresponding to each first-level resource file.

[0215] For example, assuming that it is necessary to update the first-level resource files 1-first-level resource files 4, the files to be updated corresponding to the first-level resource files 1-first-level resource files 4 are files to be updated 1-file 4 respectively, among which the first-level resource files 1 and the first-level resource files 2 are static files, and the first-level resource files 3 and the first-level resource files 4 are library files. Then the cloud platform control can simultaneously adopt the update method corresponding to the static files, using the files to be updated 1 and the files to be updated 2 to update the first-level resource files 1 and the first-level resource files 2, and adopt the update method corresponding to the library files, using the files to be updated 3 and the files to be updated 4 to update the first-level resource files 3 and the first-level resource files 4.

[0216] It can be seen that in the embodiment of the present application, when there are multiple first-level resource files that need to be updated, for each first-level resource file that needs to be updated, the cloud platform control can synchronously adopt the update method corresponding to each second-level file to update each second-level file. Since multiple first-level resource files are independent of each other, the update process between multiple first-level resource files will not affect each other. When multiple first-level resource files need to be updated, the cloud platform control can synchronously update multiple first-level resource files without having to update multiple first-level resource files one by one, which can improve the update efficiency.

[0217] As an implementation method of the embodiment of the present application, a flowchart for updating the cloud platform control can be as follows: Figure 8 As shown, the following steps may be specifically included:

[0218] S801, install cloud platform controls;

[0219] After the process starts, if the user needs to use cloud platform related functions, the cloud platform control can be installed.

[0220] S802, the cloud platform control determines whether it is a static file or a library file through the category identifier;

[0221] Since the category identifier can be used to identify the file category of the primary resource file, the cloud platform control can determine whether the file category of the primary resource file is a static file or a library file through the category identifier.

[0222] S803, whether the category identifier is a static file; if not, execute step S804; if yes, execute step S805;

[0223] Since different file categories correspond to different update methods, in order to determine the update method corresponding to the primary resource file, the cloud platform control may determine whether the file category identified by the category identifier of the primary resource file is a static file.

[0224] S804, the cloud platform control adds a library file identification record;

[0225] If the file category identified by the category identifier of the primary resource file is a library file, the cloud platform control may record that the file category of the primary resource file is a library file.

[0226] S805, obtaining the latest version and local version of the file identifier of the corresponding secondary file;

[0227] If the file category identified by the category identifier of the primary resource file is a static file, or, after the cloud platform control adds a library file identification record, in order to determine whether the secondary file included in the primary resource file needs to be updated, the cloud platform control can obtain the latest version and local version of the file identifier of the secondary file.

[0228] S806, compare the versions to see if there is an update; if yes, execute step S807; if not, end;

[0229] After obtaining the latest version and the local version of the file identifier of the secondary file, the cloud platform control can determine whether the secondary file needs to be updated by comparing the latest version and the local version. Specifically, if the latest version and the local version are different, it can be determined that the secondary file needs to be updated. If the latest version and the local version are the same, it can be determined that the secondary file does not need to be updated and the process can be terminated.

[0230] S807, download the corresponding file to be updated to the installation directory according to the file identifier and version;

[0231] When the secondary file needs to be updated, the cloud platform control can download the latest version of the file to be updated corresponding to the file identifier to the installation directory according to the file identifier and the local version of the secondary file.

[0232] S808, whether the library file is updated; if yes, execute step S810; if not, execute step S809;

[0233] Since the update methods corresponding to library files and static files are different, in order to determine the update method corresponding to the secondary file, the cloud platform control can determine whether the library file is updated. Specifically, the cloud platform control can determine it by the recorded file category of the secondary file. If the recorded file category of the secondary file is a library file, then it can be determined that the library file needs to be updated. If the recorded file category of the secondary file is a static file, then it can be determined that the library file does not need to be updated.

[0234] S809, update the local corresponding file version;

[0235] If the file type of the secondary file is a static file, then the secondary file can be updated using the static file update method. Specifically, the cloud platform control can use the file to be updated to update the secondary file with the same file identifier as the file to be updated in the local cloud platform control, and update the version corresponding to the secondary file recorded locally to the latest version. Then, it can be determined that the update is effective, and the cloud platform can display the cloud platform interface based on the updated secondary file.

[0236] S810, marking the update status as a non-updated status;

[0237] If the file type of the secondary file is a library file, the secondary file can be updated by using the library file update method. Since the update of the library file needs to be performed when the cloud platform control is disconnected from the cloud platform, the library file cannot be updated at present, so the cloud platform control can mark the update status corresponding to the secondary file as not updated.

[0238] S811, whether the cloud platform control is disconnected from the cloud platform; if yes, execute step S812; if no, end;

[0239] Since the update of the library file needs to be performed when the cloud platform control is disconnected from the cloud platform, in order to update the library file, the cloud platform control can determine whether to disconnect from the cloud platform. If the cloud platform control is not disconnected from the cloud platform, the secondary file cannot be updated and the process can be terminated.

[0240] S812, update the local corresponding file version and restart the cloud platform control after disconnecting the link for five minutes;

[0241] When the cloud platform control is disconnected from the cloud platform, the cloud platform control can use the file to be updated to update the secondary file with the same file identifier as the file to be updated in the local cloud platform control. The cloud platform control can be restarted five minutes after being disconnected from the cloud platform.

[0242] S813, marking the update status as an updated status;

[0243] After restarting, the cloud platform control can change the update status corresponding to the secondary file to an updated status, and update the version corresponding to the secondary file recorded locally to the latest version.

[0244] S814, update takes effect.

[0245] After the secondary file update takes effect, the cloud platform can display the cloud platform interface based on the updated secondary file, and the process can be ended.

[0246] As an implementation method of the embodiment of the present application, a signaling interaction diagram for updating the cloud platform control can be as follows: Fig. 9 As shown, the following steps may be specifically included:

[0247] S901, install or start the cloud platform control;

[0248] When the user needs to use the cloud platform function, if the current mobile terminal does not have the cloud platform control installed, the user can install the cloud platform control. If the current mobile terminal has the cloud platform control installed, the user can start the cloud platform control.

[0249] S902, start the service;

[0250] After the user starts the cloud platform control, the cloud platform control can start the service.

[0251] S903, log in to the cloud platform;

[0252] After the cloud platform control starts the service, users can log in to the cloud platform and use the functions of the cloud platform.

[0253] S904, establishing a link;

[0254] Since users need to use cloud platform functions through cloud platform controls, after users log in to the cloud platform, a link can be established between the cloud platform and the cloud platform controls.

[0255] S905, returning the link result;

[0256] In order to determine whether the cloud platform has successfully established a link with the cloud platform control, the cloud platform control can return a link result to the cloud platform. The link result is used to indicate whether the cloud platform has failed to establish a link with the cloud platform control or whether the link has been successfully established.

[0257] S906, use cloud platform related functions;

[0258] Step S906-Step S919 is a solution for updating static files. Since the cloud platform has established a link with the cloud platform control, in step S906, the user can use the cloud platform related functions.

[0259] S907, sending relevant instructions;

[0260] When a user needs to use a cloud platform function, the cloud platform can send relevant instructions to the cloud platform control.

[0261] S908, obtaining corresponding file data through the file identifier;

[0262] In order to determine whether the secondary file included in the primary resource file needs to be updated, the cloud platform control can obtain the latest version corresponding to the file identifier of the secondary file from the cloud service, where the cloud service can be a process of the cloud platform.

[0263] S909, returning the corresponding file identification information and the latest version;

[0264] The cloud service may return the latest version corresponding to the file identifier of the secondary file to the cloud service control.

[0265] S910, obtain the local version;

[0266] In order to determine whether the secondary file needs to be updated, the cloud platform control may obtain a local version of the secondary file locally.

[0267] S911, version comparison;

[0268] The cloud platform control can compare whether the latest version corresponding to the secondary file and the local version are the same.

[0269] S912, prioritize downloading the latest version of the instruction-related secondary files;

[0270] When the latest version corresponding to the secondary file is different from the local version, the cloud platform control may download the latest version of the file to be updated corresponding to the file identifier of the secondary file from the cloud service.

[0271] S913, return the file stream;

[0272] The cloud service can return the file to be updated to the cloud platform control in the form of a file stream. Then, the cloud platform control can use the file to be updated to update the secondary file.

[0273] S914, download successful;

[0274] The cloud platform control may send a message indicating that the to-be-updated file has been downloaded successfully to the cloud platform.

[0275] S915, display use;

[0276] After receiving the message sent by the cloud platform control indicating that the file to be updated has been downloaded successfully, the cloud platform can display the cloud platform interface based on the updated secondary file for user use.

[0277] S916, updating the local version corresponding to the secondary file;

[0278] After the secondary file is updated, the cloud platform control can update the local version corresponding to the secondary file to the latest version.

[0279] S917, subsequent files continue to be downloaded;

[0280] Steps S917-S919 are update solutions for other secondary files that need to be updated. Specifically, when there are multiple secondary files that need to be updated, the cloud platform control can continue to download the latest versions of the files to be updated corresponding to the file identifiers of the remaining non-updated secondary files from the cloud service.

[0281] S918, return the file stream;

[0282] The cloud service can return the file to be updated to the cloud platform control in the form of a file stream. Then, the cloud platform control can use the file to be updated to update the secondary file.

[0283] S919, update the local version corresponding to the secondary file;

[0284] After the secondary file is updated, the cloud platform control can update the local version corresponding to the secondary file to the latest version.

[0285] S920, use cloud platform related functions;

[0286] Step S920-Step S938 is a solution for updating the library file. Since the cloud platform has established a link with the cloud platform control, in step S920, the user can use the cloud platform related functions.

[0287] S921, sending relevant instructions;

[0288] When a user needs to use a cloud platform function, the cloud platform can send relevant instructions to the cloud platform control.

[0289] S922, obtain the latest library file status;

[0290] In order to determine whether a primary resource file whose file category is a library file needs to be updated, the cloud platform control may obtain a local version corresponding to a secondary file included in the primary resource file from the local.

[0291] S923, obtaining corresponding file data through the file identifier;

[0292] The cloud platform control can obtain the latest version of the file identifier of the secondary file from the cloud service. If the latest version of the file identifier of the secondary file is different from the local version, the latest version of the file to be updated corresponding to the file identifier of the secondary file can be obtained from the cloud service.

[0293] S924, returning the corresponding file identification information and the latest version;

[0294] The cloud service may return the latest version of the file to be updated corresponding to the file identifier of the secondary file to the cloud service control.

[0295] S925, updating the update status corresponding to the secondary file;

[0296] After the cloud platform control has downloaded the file to be updated, the cloud platform control may set the update status corresponding to the file identifier of the secondary file to a non-updated status.

[0297] S926, the cloud platform control has been downloaded and needs to be restarted;

[0298] The cloud platform control may send a message to the cloud platform indicating that the file to be updated has been downloaded and the cloud platform control needs to be restarted.

[0299] S927, prompting the user whether to restart the cloud platform control;

[0300] After receiving the message sent by the cloud platform control indicating that the cloud platform control needs to be restarted, the cloud platform can prompt the user to select whether to restart the cloud platform control. If the user restarts manually, steps S928 to S933 will be executed; if the user ignores the restart operation, steps S934 to S938 will be executed.

[0301] S928, restart the cloud platform control;

[0302] Steps S928 to S933 are solutions for manual restart by the user. In step S928, the user can choose to manually restart the cloud platform control.

[0303] S929, sending a restart instruction;

[0304] After the user chooses to manually restart the cloud platform control, the cloud platform can send a restart instruction to the cloud platform control.

[0305] S930, restart the cloud platform control;

[0306] The cloud platform control can restart after receiving the restart instruction.

[0307] S931, restart successful;

[0308] After the cloud platform control is successfully restarted, a message indicating the successful restart may be sent to the cloud platform.

[0309] S932, updating the local version and update status corresponding to the secondary file;

[0310] The cloud platform control may update the local version corresponding to the file identifier of the secondary file to the latest version, and set the update status corresponding to the file identifier to an updated status.

[0311] S933, refresh the page;

[0312] The cloud platform can display the cloud platform interface based on the updated secondary file after refreshing the page.

[0313] S934, Ignore restart;

[0314] Step S934 to step S938 are solutions for ignoring the restart operation. In step S934, if the user currently needs to use the cloud platform, the user can choose to ignore the restart.

[0315] S935, log out;

[0316] When the user has finished using the cloud platform, the user can log out.

[0317] S936, link disconnected;

[0318] When the user logs out, the cloud platform can disconnect the link with the cloud platform control.

[0319] S937, restart after five minutes;

[0320] After the cloud platform and the cloud platform control are disconnected, the cloud platform can use the file to be updated to update the secondary file. After the disconnection reaches five minutes, the cloud platform control can be restarted.

[0321] S938, updating the local version and update status corresponding to the secondary file;

[0322] The cloud platform control may update the local version corresponding to the file identifier of the secondary file to the latest version, and set the update status corresponding to the file identifier to an updated status.

[0323] In the technical solution of this application, the operations involved in obtaining, storing, using, processing, transmitting, providing and disclosing user personal information are all carried out with the user's authorization.

[0324] Corresponding to the above-mentioned cloud platform control updating method, the embodiment of the present application further provides a cloud platform control updating device. The following is an introduction to a cloud platform control updating device provided by the embodiment of the present application.

[0325] like Fig.10 As shown, a cloud platform control updating device is applied to a cloud platform control, wherein the cloud platform control implements the functions of the cloud platform through a local primary resource file, wherein the primary resource file includes a static file and a library file, and both the static file and the library file can be updated separately, and the device includes:

[0326] The file download module 1001 is used to download the file to be updated from the cloud platform when the primary resource file needs to be updated;

[0327] A mode determination module 1002 is used to determine an update mode corresponding to the primary resource file according to the file category of the primary resource file, wherein the file category of the primary resource file is determined based on a category identifier, and the category identifier is used to identify the file category of the primary resource file;

[0328] The first updating module 1003 is used to update the primary resource file using the file to be updated without restarting the cloud platform control if the determined updating mode is the updating mode corresponding to the static file;

[0329] The second updating module 1004 is used to update the primary resource file with the file to be updated by restarting the cloud platform control if the determined updating method is the updating method corresponding to the library file.

[0330] It can be seen that in the embodiment of the present application, the cloud platform control can download the file to be updated from the cloud platform when the primary resource file needs to be updated; determine the update method corresponding to the primary resource file according to the file category of the primary resource file; if the determined update method is the update method corresponding to the static file, the primary resource file is updated using the file to be updated without restarting the cloud platform control; if the determined update method is the update method corresponding to the library file, the primary resource file is updated using the file to be updated by restarting the cloud platform control, wherein the file category of the primary resource file is determined based on the category identifier, and the category identifier is used to identify the file category of the primary resource file. Since the primary resource file has a category identifier, and the category identifier can be used to identify the file category of the primary resource file, the file category of the primary resource file can be determined as a static file or a library file by the category identifier. Since the update of the library file requires restarting the cloud platform control, but the static file does not, after determining the file category of the primary resource file, the update method corresponding to the primary resource file can be determined, and then the primary resource file is updated using the determined update method, which can avoid the need to restart the cloud platform control when updating the cloud platform control, and improve the user experience. Since the cloud platform control only needs to download and update the first-level resource files that need to be updated when updating, instead of downloading all the first-level resource files and then updating all the first-level resource files, the download time required for the cloud platform control update can be shortened and the risk of update failure can be reduced.

[0331] As an implementation of the embodiment of the present application, the above device may further include:

[0332] A first category determination module is used to determine whether the first-level resource file has a category identifier corresponding to a static file; if the first-level resource file has a category identifier corresponding to a static file, determine that the file category of the first-level resource file is a static file; if the first-level resource file does not have a category identifier corresponding to a static file, record the file category of the first-level resource file as a library file, and record the category identifier of the first-level resource file as the category identifier corresponding to the library file;

[0333] A second category determination module is used to determine whether the primary resource file has a category identifier corresponding to a library file; if the primary resource file has a category identifier corresponding to a library file, determine that the file category of the primary resource file is a library file; if the primary resource file does not have a category identifier corresponding to a library file, record the file category of the primary resource file as a static file, and record the category identifier of the primary resource file as a category identifier corresponding to a static file;

[0334] The third category determination module is used to obtain the category identifier of the first-level resource file; if the category identifier is the category identifier corresponding to the static file, determine that the file category of the first-level resource file is a static file; if the category identifier is the category identifier corresponding to the library file, determine that the file category of the first-level resource file is a library file.

[0335] As an implementation method of the embodiment of the present application, the above-mentioned primary resource file may include multiple secondary files, each of which has a file identifier. In this case, the above-mentioned device may also include:

[0336] A latest version acquisition module, used to obtain the file identifier and local version of the secondary file included in the primary resource file, and obtain the latest version corresponding to the file identifier from the cloud platform;

[0337] The version comparison module is used to determine that the secondary file corresponding to the file identifier needs to be updated if the latest version is different from the local version.

[0338] As an implementation of the embodiment of the present application, the first updating module 1003 may include:

[0339] The first file update submodule is used to synchronously execute the step of updating the primary resource file with the file to be updated without restarting the cloud platform control for each secondary file that needs to be updated when there are multiple secondary files whose file category is static files that need to be updated.

[0340] As an implementation of the embodiment of the present application, the second updating module 1004 may include:

[0341] The second file update submodule is used to synchronously execute the step of updating the primary resource file with the file to be updated by restarting the cloud platform control for each secondary file that needs to be updated when there are multiple secondary files whose file category is library files.

[0342] As an implementation of the embodiment of the present application, the above device may further include:

[0343] A category identification acquisition module, used to acquire the category identification of the primary resource file;

[0344] A file category recording module, used to determine that the file category of the primary resource file is a static file or a library file through the category identifier, and record the file category of the primary resource file;

[0345] The above-mentioned method determining module 1002 may include:

[0346] The update mode determination submodule is used to determine, based on the recorded file category of the primary resource file, whether the update mode corresponding to the primary resource file is the update mode corresponding to the static file or the update mode corresponding to the library file.

[0347] As an implementation of the embodiment of the present application, the above-mentioned method determination module 1002 may include:

[0348] A category identification acquisition submodule, used to acquire the category identification of the primary resource file;

[0349] A category determination submodule, used to determine, through the category identifier, whether the file category of the primary resource file is a static file or a library file;

[0350] A first mode determination submodule is used to determine, if the file category of the primary resource file is a static file, that the update mode corresponding to the primary resource file is the update mode corresponding to the static file;

[0351] The second mode determination submodule is used to determine that the update mode corresponding to the first-level resource file is the update mode corresponding to the library file if the file category of the first-level resource file is a library file.

[0352] As an implementation method of the embodiment of the present application, the cloud platform control and the cloud platform may communicate through a long connection. In this case, the first update module 1003 may include:

[0353] A first updating submodule, configured to update the primary resource file using the file to be updated without restarting the cloud platform control and without disconnecting the long connection with the cloud platform;

[0354] The second updating module 1004 may include:

[0355] A second updating submodule, used to disconnect the long connection with the cloud platform and update the primary resource file using the file to be updated;

[0356] The long connection establishment submodule is used to restart and re-establish a long connection with the cloud platform when the first-level resource file is updated.

[0357] As an implementation of the embodiment of the present application, the first updating module 1003 may include:

[0358] A third file update submodule, configured to update a secondary file corresponding to the file identifier of the file to be updated included in the primary resource file with the file to be updated, so that the cloud platform displays a cloud platform interface based on the updated secondary file when receiving an update completion message sent by the cloud platform control;

[0359] The version update submodule is used to update the local version corresponding to the secondary file to the latest version without restarting the cloud platform control.

[0360] As an implementation of the embodiment of the present application, the second updating module 1004 may include:

[0361] A first update status setting submodule, used to set the update status corresponding to the secondary file corresponding to the file identifier of the file to be updated to a non-updated status, wherein the non-updated status is used to indicate that the cloud platform control has downloaded the file to be updated and has not completed the update;

[0362] A fourth file update submodule, configured to update a secondary file corresponding to a file identifier of the file to be updated included in the primary resource file with the file to be updated when the cloud platform control is disconnected from the cloud platform, and restart the cloud platform so that the cloud platform displays a cloud platform interface based on the updated secondary file after the cloud platform control is restarted;

[0363] The second update status setting submodule is used to set the update status corresponding to the secondary file to the updated status, and update the local version corresponding to the secondary file included in the primary resource file to the latest version, wherein the updated status is used to indicate that the file to be updated has been updated.

[0364] As an implementation of an embodiment of the present application, the fourth file updating submodule may include:

[0365] A file updating unit, configured to update the secondary file corresponding to the file identifier included in the primary resource file with the file to be updated if the cloud platform control is disconnected from the cloud platform;

[0366] A restart unit is used to restart when the cloud platform control is disconnected from the cloud platform for a duration reaching a preset duration.

[0367] The present application also provides a cloud platform control, such as Fig.11 As shown, including:

[0368] Memory 1101, used for storing computer programs;

[0369] The processor 1102 is used to implement the cloud platform control updating method described in any of the above embodiments when executing the program stored in the memory 1101.

[0370] In addition, the cloud platform control may further include a communication bus and / or a communication interface, and the processor 1102, the communication interface, and the memory 1101 communicate with each other via the communication bus.

[0371] It can be seen that in the embodiment of the present application, the cloud platform control can download the file to be updated from the cloud platform when the primary resource file needs to be updated; determine the update method corresponding to the primary resource file according to the file category of the primary resource file; if the determined update method is the update method corresponding to the static file, the primary resource file is updated using the file to be updated without restarting the cloud platform control; if the determined update method is the update method corresponding to the library file, the primary resource file is updated using the file to be updated by restarting the cloud platform control, wherein the file category of the primary resource file is determined based on the category identifier, and the category identifier is used to identify the file category of the primary resource file. Since the primary resource file has a category identifier, and the category identifier can be used to identify the file category of the primary resource file, the file category of the primary resource file can be determined as a static file or a library file by the category identifier. Since the update of the library file requires restarting the cloud platform control, but the static file does not, after determining the file category of the primary resource file, the update method corresponding to the primary resource file can be determined, and then the primary resource file is updated using the determined update method, which can avoid the need to restart the cloud platform control when updating the cloud platform control, and improve the user experience. Since the cloud platform control only needs to download and update the first-level resource files that need to be updated when updating, instead of downloading all the first-level resource files and then updating all the first-level resource files, the download time required for the cloud platform control update can be shortened and the risk of update failure can be reduced.

[0372] The communication bus mentioned in the cloud platform control can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0373] The communication interface is used for communication between the above cloud platform controls and other devices.

[0374] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0375] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0376] In another embodiment provided in the present application, a computer-readable storage medium is also provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned cloud platform control update methods are implemented.

[0377] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any of the cloud platform control updating methods in the above-mentioned embodiments.

[0378] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a solid-state hard disk (SSD), etc.

[0379] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0380] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, cloud platform control, computer-readable storage medium, and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0381] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A cloud platform control update method, characterized in that: Applied to a cloud platform control, the cloud platform control implements the functions of the cloud platform through a local primary resource file, the primary resource file includes a static file and a library file, and the static file and the library file can be updated separately. The method includes: When the primary resource file needs to be updated, download the file to be updated from the cloud platform; Determine, according to the file category of the primary resource file, an update mode corresponding to the primary resource file, wherein the file category of the primary resource file is determined based on a category identifier, and the category identifier is used to identify the file category of the primary resource file; If the determined update mode is an update mode corresponding to a static file, the primary resource file is updated using the file to be updated without restarting the cloud platform control; If the determined update method is the update method corresponding to the library file, the primary resource file is updated using the file to be updated by restarting the cloud platform control; Wherein, the primary resource file includes a plurality of secondary files, each of which has a file identifier; Before the step of downloading the file to be updated from the cloud platform, the method further includes: Obtaining a file identifier and a local version of a secondary file included in the primary resource file, and obtaining a latest version corresponding to the file identifier from the cloud platform; If the latest version is different from the local version, it is determined that the secondary file corresponding to the file identifier needs to be updated, wherein the cloud platform control synchronously adopts the update method corresponding to each secondary file to update each secondary file; The step of updating the primary resource file using the file to be updated without restarting the cloud platform control comprises: In the case where there are multiple secondary files whose file categories are static files that need to be updated, for each secondary file that needs to be updated, the step of updating the primary resource file using the file to be updated without restarting the cloud platform control is synchronously executed; The step of updating the primary resource file by using the file to be updated by restarting the cloud platform control comprises: When there are multiple secondary files whose file category is library files that need to be updated, for each secondary file that needs to be updated, the step of updating the primary resource file using the file to be updated by restarting the cloud platform control is synchronously executed.

2. The method according to claim 1, characterized in that The method for determining the file category of the primary resource file includes at least one of the following: Determine whether the primary resource file has a category identifier corresponding to a static file; if the primary resource file has a category identifier corresponding to a static file, determine that the file category of the primary resource file is a static file; If the primary resource file does not have a category identifier corresponding to a static file, record the file category of the primary resource file as a library file, and record the category identifier of the primary resource file as a category identifier corresponding to a library file; or, Determine whether the primary resource file has a category identifier corresponding to a library file; if the primary resource file has a category identifier corresponding to a library file, determine that the file category of the primary resource file is a library file; If the primary resource file does not have a category identifier corresponding to a library file, record the file category of the primary resource file as a static file, and record the category identifier of the primary resource file as a category identifier corresponding to a static file; or, Obtaining a category identifier of the primary resource file; if the category identifier is a category identifier corresponding to a static file, determining that the file category of the primary resource file is a static file; If the category identifier is a category identifier corresponding to a library file, it is determined that the file category of the primary resource file is a library file.

3. The method according to claim 1, characterized in that Before the step of downloading the file to be updated from the cloud platform, the method further includes: Obtaining a category identifier of the primary resource file; Determining, through the category identifier, that the file category of the primary resource file is a static file or a library file, and recording the file category of the primary resource file; The step of determining the update mode corresponding to the primary resource file according to the file category of the primary resource file includes: Based on the recorded file category of the primary resource file, it is determined that the update mode corresponding to the primary resource file is the update mode corresponding to the static file or the update mode corresponding to the library file.

4. The method according to claim 1, characterized in that: The step of determining the update mode corresponding to the primary resource file according to the file category of the primary resource file includes: Obtaining a category identifier of the primary resource file; Determining, by means of the category identifier, that the file category of the primary resource file is a static file or a library file; If the file category of the primary resource file is a static file, determining that the update mode corresponding to the primary resource file is the update mode corresponding to the static file; If the file type of the primary resource file is a library file, it is determined that the update mode corresponding to the primary resource file is the update mode corresponding to the library file.

5. The method according to claim 1, characterized in that The cloud platform control communicates with the cloud platform via a long connection; The step of updating the primary resource file using the file to be updated without restarting the cloud platform control comprises: Without restarting the cloud platform control and without disconnecting the long connection with the cloud platform, updating the primary resource file using the file to be updated; The step of updating the primary resource file by using the file to be updated by restarting the cloud platform control comprises: Disconnecting the long connection with the cloud platform, and updating the primary resource file using the file to be updated; When the primary resource file is updated, restart and establish a long connection with the cloud platform again.

6. The method according to any one of claims 1 to 5, characterized in that: The step of updating the primary resource file using the file to be updated without restarting the cloud platform control comprises: Using the file to be updated to update the secondary file corresponding to the file identifier of the file to be updated included in the primary resource file, so that the cloud platform displays the cloud platform interface based on the updated secondary file when receiving the update completion message sent by the cloud platform control; The local version corresponding to the secondary file is updated to the latest version without restarting the cloud platform control.

7. The method according to any one of claims 1 to 5, characterized in that: The step of updating the primary resource file by using the file to be updated by restarting the cloud platform control comprises: Setting the update status of the secondary file corresponding to the file identifier of the file to be updated to a not-updated status, wherein the not-updated status is used to indicate that the cloud platform control has downloaded the file to be updated and has not completed the update; In the case where the cloud platform control is disconnected from the cloud platform, the secondary file corresponding to the file identifier of the file to be updated included in the primary resource file is updated using the file to be updated, and the cloud platform is restarted, so that the cloud platform displays the cloud platform interface based on the updated secondary file after the cloud platform control is restarted; The update status corresponding to the secondary file is set to an updated status, and the local version corresponding to the secondary file included in the primary resource file is updated to the latest version, wherein the updated status is used to indicate that the file to be updated has been updated.

8. The method according to claim 7, characterized in that The step of updating the secondary file corresponding to the file identifier of the file to be updated included in the primary resource file using the file to be updated when the cloud platform control is disconnected from the cloud platform, and restarting the process comprises: If the cloud platform control is disconnected from the cloud platform, the secondary file corresponding to the file identifier included in the primary resource file is updated using the file to be updated; When the duration of disconnection between the cloud platform control and the cloud platform reaches a preset duration, restart.

9. A cloud platform control updating device, characterized in that: Applied to a cloud platform control, the cloud platform control implements the functions of the cloud platform through a local primary resource file, the primary resource file includes a static file and a library file, the static file and the library file can be updated separately, the device includes: A file download module, used to download the file to be updated from the cloud platform when the primary resource file needs to be updated; A mode determination module, used to determine the update mode corresponding to the primary resource file according to the file category of the primary resource file, wherein the file category of the primary resource file is determined based on a category identifier, and the category identifier is used to identify the file category of the primary resource file; A first updating module, configured to update the primary resource file using the file to be updated without restarting the cloud platform control if the determined updating mode is an updating mode corresponding to a static file; A second updating module is used to update the primary resource file with the file to be updated by restarting the cloud platform control if the determined updating method is the updating method corresponding to the library file; Wherein, the primary resource file includes a plurality of secondary files, each of which has a file identifier; The device also includes: A latest version acquisition module, used to acquire the file identifier and local version of the secondary file included in the primary resource file, and acquire the latest version corresponding to the file identifier from the cloud platform; A version comparison module, used for determining that the secondary file corresponding to the file identifier needs to be updated if the latest version is different from the local version, wherein the cloud platform control synchronously adopts the update method corresponding to each secondary file to update each secondary file; The first update module comprises: A first file update submodule is used for synchronously executing the step of updating the primary resource file with the file to be updated without restarting the cloud platform control for each secondary file that needs to be updated when there are multiple secondary files whose file category is static files that need to be updated; The second update module includes: The second file update submodule is used to synchronously execute the step of updating the primary resource file with the file to be updated by restarting the cloud platform control for each secondary file that needs to be updated when there are multiple secondary files whose file category is library files.

10. The device according to claim 9, characterized in that The device also includes: A first category determination module is used to determine whether the first-level resource file has a category identifier corresponding to a static file; if the first-level resource file has a category identifier corresponding to a static file, determine that the file category of the first-level resource file is a static file; if the first-level resource file does not have a category identifier corresponding to a static file, record the file category of the first-level resource file as a library file, and record the category identifier of the first-level resource file as the category identifier corresponding to the library file; A second category determination module is used to determine whether the primary resource file has a category identifier corresponding to a library file; if the primary resource file has a category identifier corresponding to a library file, determine that the file category of the primary resource file is a library file; if the primary resource file does not have a category identifier corresponding to a library file, record the file category of the primary resource file as a static file, and record the category identifier of the primary resource file as a category identifier corresponding to a static file; A third category determination module is used to obtain a category identifier of the primary resource file; if the category identifier is a category identifier corresponding to a static file, determine that the file category of the primary resource file is a static file; if the category identifier is a category identifier corresponding to a library file, determine that the file category of the primary resource file is a library file; The device also includes: A category identification acquisition module, used to acquire the category identification of the primary resource file; A file category recording module, used to determine that the file category of the primary resource file is a static file or a library file through the category identifier, and record the file category of the primary resource file; The method determines the module, including: An update mode determination submodule, used to determine, based on the recorded file category of the primary resource file, whether the update mode corresponding to the primary resource file is an update mode corresponding to a static file or an update mode corresponding to a library file; The method determines the module, including: A category identification acquisition submodule, used to acquire the category identification of the primary resource file; A category determination submodule, used to determine, through the category identifier, whether the file category of the primary resource file is a static file or a library file; A first mode determination submodule is used to determine, if the file category of the primary resource file is a static file, that the update mode corresponding to the primary resource file is the update mode corresponding to the static file; A second mode determination submodule is used for determining, if the file category of the primary resource file is a library file, that the update mode corresponding to the primary resource file is the update mode corresponding to the library file; The cloud platform control communicates with the cloud platform via a long connection; The first update module includes: A first updating submodule, configured to update the primary resource file using the file to be updated without restarting the cloud platform control and without disconnecting the long connection with the cloud platform; The second update module includes: A second updating submodule, used to disconnect the long connection with the cloud platform and update the primary resource file using the file to be updated; A long connection establishment submodule, used for restarting and re-establishing a long connection with the cloud platform when the first-level resource file is updated; The first update module includes: A third file update submodule, configured to update a secondary file corresponding to the file identifier of the file to be updated included in the primary resource file with the file to be updated, so that the cloud platform displays a cloud platform interface based on the updated secondary file when receiving an update completion message sent by the cloud platform control; A version update submodule, used to update the local version corresponding to the secondary file to the latest version without restarting the cloud platform control; The second update module includes: A first update status setting submodule, used to set the update status corresponding to the secondary file corresponding to the file identifier of the file to be updated to a non-updated status, wherein the non-updated status is used to indicate that the cloud platform control has downloaded the file to be updated and has not completed the update; A fourth file update submodule, configured to update a secondary file corresponding to a file identifier of the file to be updated included in the primary resource file with the file to be updated when the cloud platform control is disconnected from the cloud platform, and restart the cloud platform so that the cloud platform displays a cloud platform interface based on the updated secondary file after the cloud platform control is restarted; A second update status setting submodule is used to set the update status corresponding to the secondary file to an updated status, and update the local version corresponding to the secondary file included in the primary resource file to the latest version, wherein the updated status is used to indicate that the file to be updated has been updated; The fourth file updating submodule includes: A file updating unit, configured to update the secondary file corresponding to the file identifier included in the primary resource file with the file to be updated if the cloud platform control is disconnected from the cloud platform; A restart unit is used to restart when the cloud platform control is disconnected from the cloud platform for a duration reaching a preset duration.

11. A cloud platform control, characterized in that: include: Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-8 when executing a program stored in a memory.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.