Method, device, system, storage medium and electronic equipment for upgrading cloud digital base

By receiving update packages in the cloud and configuring them into the target controller's program container, and using the program state container to save the running state, the problem of long upgrade times in traditional cloud controllers is solved, and an efficient upgrade process is achieved.

CN119718374BActive Publication Date: 2026-01-20GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411840255.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2026-01-20
Estimated Expiration
2044-12-13

AI Technical Summary

Technical Problem

Traditional cloud controller upgrades are time-consuming and complex, impacting user experience and resulting in low upgrade efficiency.

Method used

The system receives the update package in the cloud and configures it into the program container of the target controller according to the distribution rules. It saves the running state variables and data structures through the program state container, controls the target controller to perform the upgrade action, and restores the running state after the upgrade.

Benefits of technology

This enables upgrades without interrupting the target controller, improving the upgrade efficiency of the cloud-based digital base station.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718374B_ABST
    Figure CN119718374B_ABST
Patent Text Reader

Abstract

The application relates to an upgrading method, device and system of a cloud digital base, a storage medium and electronic equipment, wherein the method comprises the following steps: receiving an update program package and an update program package issuing rule in the cloud; configuring the update program package into a program container of a target controller in the cloud according to the issuing rule, wherein the digital base in the cloud stores a plurality of controllers including the target controller; copying running state variables and data structures of each program of the target controller into a program state container in the memory before the target controller uses the update program package for upgrading; controlling the target controller to use the update program package to perform an upgrading action; and configuring the running state variables and the data structures stored in the program state container in the memory into the upgraded target controller after the target controller uses the update program package for upgrading. The application solves the technical problem of low upgrading efficiency of the cloud digital base.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of intelligent buildings, and in particular to an upgrading method, device, system, storage medium and electronic equipment of a cloud digital base. BACKGROUND

[0002] With the continuous development of information technology, digitization and intelligence are the trend of future industry. Traditional industrial control systems rely on field controllers to directly connect devices to achieve information collection and logic control. The controllers are of various types and are deployed in a scattered manner, making it difficult to achieve unified management and logic update. Therefore, some intelligent building fields in the industry have proposed the concept of cloud control of controller devices, that is, virtualization and digitization of originally deployed scattered controllers. Specifically, the control logic of the controller is compiled into a digital program, and then the program package is deployed to a digital base based on a cloud platform. Through cloud control, the controller is unified managed, and cloud control of the controller is achieved. The deployment method of the control logic is upgraded from the traditional on-site controller deployment to deployment of the control logic in the cloud, thereby realizing cloud control of the devices.

[0003] Under the demand for automation and intelligence, more and more factories require 24-hour non-stop work of industrial devices. If the controller program deployed to the cloud is to be upgraded, the traditional updating method of the controller logic has the following work flow: 1, stop the controller program; 2, upload the control logic program to the controller; 3, start the new logic program of the controller; and 4, debug the new program. This process not only takes a long time, but also has complex program replacement operation steps. The average time for single program replacement and deployment is 20-30 minutes. During this period, the program cannot provide services for users, and users need to wait for the program update to be completed before they can use the system services, which greatly affects the user experience. SUMMARY

[0004] The present application provides an upgrading method of a cloud digital base to solve the technical problem of low upgrading efficiency of the cloud digital base.

[0005] In a first aspect, the application provides an upgrading method of a cloud digital base, comprising: receiving an update package and a distribution rule of the update package in the cloud; configuring the update package into a program container of a target controller of the cloud according to the distribution rule, wherein the digital base of the cloud stores a plurality of controllers including the target controller; copying running state variables and data structures of each program of the target controller into a program state container in a memory before the target controller is upgraded using the update package; controlling the target controller to perform an upgrading action using the update package; and configuring the running state variables and data structures stored in the program state container in the memory into the target controller after the target controller is upgraded using the update package.

[0006] In a second aspect, the application provides an upgrading device of a cloud digital base, comprising: a receiving module configured to receive an update package and a distribution rule of the update package in the cloud; a configuring module configured to configure the update package into a program container of a target controller of the cloud according to the distribution rule, wherein the digital base of the cloud stores a plurality of controllers including the target controller; a processing module configured to copy running state variables and data structures of each program of the target controller into a program state container in a memory before the target controller is upgraded using the update package; a control module configured to control the target controller to perform an upgrading action using the update package; and an updating module configured to configure the running state variables and data structures stored in the program state container in the memory into the target controller after the target controller is upgraded using the update package.

[0007] In a third aspect, the application provides an upgrading system of a cloud digital base, comprising: a cloud configured to receive an update package and a distribution rule of the update package in the cloud; configure the update package into a program container of a target controller of the cloud according to the distribution rule, wherein the digital base of the cloud stores a plurality of controllers including the target controller; copy running state variables and data structures of each program of the target controller into a program state container in a memory before the target controller is upgraded using the update package; control the target controller to perform an upgrading action using the update package; and configure the running state variables and data structures stored in the program state container in the memory into the target controller after the target controller is upgraded using the update package; a client configured to provide the update package and the distribution rule; and the target controller configured to control an intelligent device to operate.

[0008] In a fourth aspect, the application provides an upgrading device for a cloud digital base, comprising: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; and at least one memory connected to the at least one bus, wherein the processor is configured to execute an upgrading method for the cloud digital base by executing executable instructions in the memory.

[0009] In a fifth aspect, the application also provides a computer storage medium storing computer executable instructions for executing the upgrading method for the cloud digital base according to any one of the above aspects.

[0010] The above technical solution provided by the embodiments of the application has the following advantages compared with the prior art: the method provided by the embodiments of the application receives an update program package and a distribution rule of the update program package in the cloud; the update program package is configured into a program container of a target controller of the cloud according to the distribution rule, wherein the digital base of the cloud stores a plurality of controllers including the target controller; before the target controller is upgraded using the update program package, running state variables and data structures of each program of the target controller are copied into a program state container in the memory; the target controller is controlled to perform an upgrading action using the update program package; and after the target controller is upgraded using the update program package, the running state variables and data structures stored in the program state container in the memory are configured into the upgraded target controller, so that when the target controller in the digital base of the cloud is upgraded, the update program package can be configured into the program container of the target controller, and the running state variables and data structures can be stored in the program state container, so that the target controller can be upgraded without interruption. The upgrading efficiency of the digital base is improved. BRIEF DESCRIPTION OF DRAWINGS

[0011] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application.

[0012] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows: obviously, for those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative labor.

[0013] One or more embodiments are illustrated by way of example in the drawings hereof, which are not intended to limit the embodiments to the precise wordings and arrangements of parts illustrated. An element disclosed by an example is therefore to be understood to encompass all examples of the same unless otherwise specified. The drawings are not necessarily to scale, the emphasis instead being placed upon illustrating the principles of the embodiments.

[0014] Figure 1 A flow chart of an upgrading method of a cloud digital base provided by an embodiment of the present application;

[0015] Figure 2 A flow chart of another upgrading method of a cloud digital base provided by an embodiment of the present application;

[0016] Figure 3 A flow chart of still another upgrading method of a cloud digital base provided by an embodiment of the present application;

[0017] Figure 4 A flow chart of still another upgrading method of a cloud digital base provided by an embodiment of the present application;

[0018] Figure 5 A schematic diagram of an updating of a digital base provided by an embodiment of the present application;

[0019] Figure 6 A schematic diagram of an updating of a controller provided by an embodiment of the present application;

[0020] Figure 7 A schematic diagram of a package cutting provided by an embodiment of the present application;

[0021] Figure 8 A schematic diagram of an upgrading device of a cloud digital base provided by an embodiment of the present application;

[0022] Figure 9 A schematic diagram of an upgrading system of a cloud digital base provided by an embodiment of the present application;

[0023] Figure 10 A schematic diagram of an upgrading equipment of a cloud digital base provided by an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the scope of protection of the present application.

[0025] The following disclosure provides many different embodiments, or examples, for implementing different structures of the application. For the purpose of simplifying the present disclosure, certain examples of components and arrangements are described. These are, of course, merely examples and are in no way limiting of the present application. Furthermore, the present application can be practiced with different and / or additional examples than those described. The illustrations presented herein are not meant to be actual views of any particular apparatus but are merely idealized representations that are employed to describe the principles of the application. Additionally, the same numbers are used in different drawings to designate the same or similar elements.

[0026] To solve the technical problem of low efficiency of upgrading the cloud digital base in the prior art, the application provides an upgrading method of a cloud digital base, which can improve the upgrading efficiency of the digital base.

[0027] Figure 1 A flowchart of the upgrading method of the cloud digital base provided by the embodiment of the application is shown in Figure 1 , and includes:

[0028] S102, receiving an update program package and a delivery rule of the update program package in the cloud;

[0029] S104, configuring the update program package into a program container of a target controller in the cloud according to the delivery rule, wherein the digital base in the cloud stores a plurality of controllers including the target controller;

[0030] S106, copying running state variables and data structures of each program of the target controller into a program state container in the memory before the target controller uses the update program package to upgrade;

[0031] S108, controlling the target controller to use the update program package to perform an upgrading action;

[0032] S110, configuring the running state variables and the data structures stored in the program state container in the memory into the upgraded target controller after the target controller uses the update program package to upgrade.

[0033] The above-mentioned digital base in the embodiment refers to an informatization general infrastructure. The digital base can be a combination of a plurality of controllers, but is not limited thereto. For example, for a building or a group of buildings, a digital base can be used for control, and each controller in the digital base is used to control various intelligent devices in the building or the group of buildings, so that complete monitoring / management of the intelligent devices in the building is realized through the digital base.

[0034] The digital base in the embodiment can be deployed in the cloud. That is, the smart device is controlled by the virtual controller in the cloud, and a chip controller is no longer needed for the smart device. The chip controller is not easy to adjust, the upgrading process is complex, and the cost is high. The virtual controller in the cloud of the embodiment is flexible in deployment, the upgrading does not affect the control process, and the cost is low.

[0035] In the embodiment, the digital base is deployed in the cloud, and the update program package and the update program package delivery rule are obtained from the user side through the cloud. The user side can configure the update program package and the update program package delivery rule through the client. For example, the client can modify the lighting time period of the lamp in the building system, or the lighting bright-dark, lighting mode, etc. The configured program is packaged as an update program package, and a delivery rule is configured, for example, a control of the lamp is delivered, which is used to update the controller of the lamp in the digital base. Therefore, after the configuration update, the controller of the lamp can use the new control logic to control the lamp in the building.

[0036] In the embodiment, a program container can be configured for each controller in the cloud. The program container is used to run the program of the controller. One program container can be configured for one controller, or one program container can be configured for each program of one controller, so that the programs of one controller can be run separately. The update program package is configured into the program container, so that the program container can run the content of the new update program package directly when running, so that the new control means is directly started to control the target controller.

[0037] In the embodiment, the digital base can be a system set for a building. The building can be a building, a building group, or even a wider range such as a building group of a city, or a smaller range such as a floor, a room, etc. The system includes all the allowed controlled smart devices in the control range. For example, the digital base is a system set for a building, and the allowed controlled smart devices in the building can be controlled by the digital base. The digital base includes the controllers of the allowed controlled smart devices in the building (since the digital base is deployed in the cloud, the controller is a virtual controller in the cloud. The virtual controller in the cloud realizes the control function of the controller by running the program in the program container).

[0038] In the embodiment, each smart device can correspond to one controller, or one controller can correspond to multiple smart devices. For the same smart devices in the building, for example, all are lamps and have the same model, one controller can be used for batch control.

[0039] In this embodiment, before the target controller is upgraded by configuring the update program package into the program container of the target controller, the running state variables and data structures of each program of the target controller can be copied into the program state container in the memory. The program state container is used to save the state of the running state variables and data structures of each program of the target controller. For example, the current data is saved in the program state container, and after the target controller is upgraded, the values of various parameters are initialized, and then the values recorded in the program state container can be used to restore the initialized parameters.

[0040] The method provided by the embodiment of the application comprises the following steps: receiving an update program package and a delivery rule of the update program package in the cloud; configuring the update program package into a program container of a target controller in the cloud according to the delivery rule, wherein a digital base in the cloud stores a plurality of controllers including the target controller; copying running state variables and data structures of each program of the target controller into a program state container in the memory before the target controller is upgraded by using the update program package; controlling the target controller to perform an upgrade action by using the update program package; and configuring the running state variables and data structures saved in the program state container in the memory into the upgraded target controller after the target controller is upgraded by using the update program package. Therefore, when the target controller in the digital base in the cloud is upgraded, the update program package can be configured into the program container of the target controller, and the running state variables and data structures can be saved by using the program state container, so that the target controller can be upgraded without interruption. The upgrading efficiency of the digital base is improved.

[0041] In this embodiment, as shown in Figure 2 An optional way of configuring the update program package into the program container of the target controller in the cloud according to the delivery rule is as follows:

[0042] S202, the program transit warehouse in the cloud parses the logical structure and the dependency relationship in the update program package;

[0043] S204, the update program package is cut into bytecode files and static resource files with hierarchical relationships according to the logical structure and the dependency relationship;

[0044] S206, the bytecode files and the static resource files are compared with original files of the target controller to identify files that are changed in the update program package compared with the original files;

[0045] S208, the changed files are configured into the program container of the target controller in the cloud.

[0046] In the embodiment, the cloud is configured with a program transit warehouse, which can store the update program package uploaded by the user. If the user uploads different update program packages for different controllers, the update program packages can be stored in the transit warehouse for sequential analysis. The program transit warehouse can analyze each update program package to analyze the logical structure and dependency relationship therein. The purpose of analyzing the logical structure and dependency relationship is to obtain the relationship between the codes in the update program package. According to the relationship, the bytecode file and the static resource file with hierarchical relationship can be obtained. Thus, the update program package is parsed into the bytecode file that can be executed. The resource required by the bytecode file when executed is called the static resource file.

[0047] The purpose of analyzing the update program package in the embodiment is to parse the update program package in other formats into the bytecode file that can be executed. Since the update program package is configured into the program container of the target controller, the bytecode file can be run in the program container to achieve the control over the target controller.

[0048] In addition, the program transit warehouse can also record the historical bytecode file to complete the comparison of the bytecode file, so as to determine the bytecode file that has changed. For the bytecode file that has not changed, it can not be configured into the program container of the target controller.

[0049] In the embodiment, as shown in FIG. 6, before the target controller is upgraded using the update program package, the running state variable and the data structure of each program of the target controller are copied into a program state container in the memory. One implementation manner is as follows: Figure 3

[0050] S302, creating a program state container for the target controller in the memory, wherein the program state container is created before the target controller is upgraded and is deleted after the target controller is upgraded. Each controller creates the program state container corresponding to the controller in the memory when the controller is upgraded;

[0051] S304, copying the running state variable and the data structure of each program of the target controller into the program state container of the target controller in the memory.

[0052] ​In this embodiment, since the update program package is to be configured into the program container of the target controller in the cloud, and the program container of the target controller in the cloud stores the old version of the control program package, in order to ensure that the control program can continue to control after the new update program package is configured into the program container instead of re-recording the parameters, the running state variables and data structures of each program of the old version of the control program package are copied into the program state container in the memory. For example, the control logic of the old version of the controller is to control the elevator, and the elevator is to be moved back to the first floor after no one uses the elevator for more than 1 minute. If the elevator is waiting for 30 seconds without being used by anyone, at this time, the update program package is configured into the program container, the new control logic is that the elevator is to be moved back to the first floor after no one uses the elevator for more than 2 minutes, at this time, the counting is restarted, and the elevator is moved back to the first floor only after 2 minutes. In fact, the elevator has been waiting for 30 seconds without being used by anyone. Therefore, if the above 30 seconds are stored into the program state container, when the upgraded target controller is running, the time length can be recorded from 30 seconds, instead of starting from the beginning.

[0053] It should be noted that the above examples are only for the purpose of illustrating that the program state container can be used to record the running state variables and data structures of the program, so that the programs before and after the upgrade of the controller can be perfectly connected, and the above elevator and data are for explanation and do not constitute a limitation.

[0054] In this embodiment, for each received update program package of a controller, a program state container for the controller can be created in the memory to store the running state variables and data structures of the program of the controller, and after the upgrade of the controller is completed, the corresponding program state container in the memory can be deleted.

[0055] In this embodiment, one implementation of copying the running state variables and data structures of each program of the target controller into the program state container of the target controller in the memory is that: the running state variables and data structures of the program are copied into the program state container of the target controller when each program of the target controller is traversed; the running state variables and data structures of each program are stored in the program state container according to the structure of the data stack; and the running state variables and data structures of each program are marked and classified according to the state of the running state variables and data structures of each program.

[0056] In this embodiment, the structure of the data stored in the program state container can use a data stack. The data stack is a linear list that allows insertion or deletion operations at one end, which is called the top of the stack, and the other end is called the bottom of the stack. The running state variables and data structures are recorded through the data stack, so that the order of the running state variables and data structures can be recorded.

[0057] In addition, in addition to storing the running state variables and data structures into the data stack structure of the program state container, the running state variables and data structures can be classified, and the purpose of classification is to facilitate subsequent searching, and the running state variables and data structures can be quickly searched according to the type. In addition, the running state variables and data structures can be marked, and the purpose of marking the running state variables and data structures is to mark the state abnormal data therein, so as to be processed.

[0058] In the embodiment, one implementation of the control target controller using the update program package to perform the upgrade action is that the program container of the target controller reloads the updated bytecode file in the program container.

[0059] In the embodiment, the program container of the target controller stores the bytecode file of the controller, and the bytecode file can be executed to control the target controller. After the new bytecode file is parsed from the update program package and configured to the program container, the previous version of the bytecode file can be deleted or can be added with a special identifier, and the previous bytecode file added with the special identifier can not be run. The new bytecode file can be reloaded and directly executed to control the target controller. For the reloaded bytecode file, the running state variables and data structures of the program saved in the program state container need to be updated, so as to complete the alternation of the previous version of the bytecode file and the new version of the bytecode file.

[0060] In the embodiment, as shown in Figure 4 One implementation of configuring the update program package to the program container of the target controller in the cloud according to the delivery rule is as follows:

[0061] S402, the delivery time and the delivery object in the delivery rule are parsed through the program transfer warehouse in the cloud;

[0062] S404, the target controller is determined according to the delivery object;

[0063] S406, the update program package is configured to the target controller according to the delivery time.

[0064] In the embodiment, after the program transfer warehouse in the cloud obtains the update program package and the delivery rule, the delivery rule can be parsed to determine the delivery time and the delivery object in the delivery rule, and the delivery object is the controller to which the update program package is delivered. The delivery time can be the time point of delivering the update program package. After the delivery time and the delivery object are determined, the update program package can be delivered to the delivery object, and the delivery object is the target controller. The bytecode file is obtained by parsing the update program package, and the bytecode file is configured to the program container of the target controller.

[0065] In the embodiment, the selected rule is further included in the issuing rule, and one implementation of determining the target controller according to the issuing object is as follows: determining each kind of controller included in the scene to be controlled by the digital base and the position and state of each controller in each kind of controller; and determining the controller in the corresponding type of controller indicated by the issuing object and meeting the selected rule as the target controller.

[0066] In the embodiment, the selected rule described above can be used to determine the range of the issuing object. For example, for the controllers in a building including lamps and elevators, the environment of the lamps is different, such as corridor lamps, elevator hall lamps, and basement lamps. Therefore, when upgrading the controllers, the range of the controllers to be upgraded can be selected according to the differences among the corridor lamps, the elevator hall lamps, and the basement lamps. For example, if the controllers of the corridor lamps are to be upgraded, the range can be selected, and the controllers of the corridor lamps are upgraded.

[0067] In the embodiment, if the controller of some smart device fails and cannot be upgraded in time, the controller of the same type or the same version can be used for horizontal control. For example, for the lamps in the corridor, if the controller fails, the controller of the lamps in the basement can be used for horizontal control. Although the control logics of the two may be different, the controller of the lamps in the basement can be used to temporarily control the lamps in the corridor because the controller of the lamps in the corridor fails and cannot complete the control.

[0068] Figure 5 FIG. 1 is a schematic diagram of updating the digital base in the embodiment. When the control program in the digital base needs to be updated, the program in the cloud controller only needs to be updated. The embodiment can be applied to the logical program updating of the cloud controller based on the digital base. For example, in an actual scene, the controller of the equipment in the A area factory of a factory needs to be updated in control logic, and according to the functional classification, the control logics of some controllers are the same, so the control program uploaded during the updating is also the same. The same control program package needs to be uploaded only once by the operation and maintenance personnel, and the distribution of the program package is solved by the program transfer warehouse. Figure 6 FIG. 2 is a schematic diagram of updating the controller in the embodiment. After the operation and maintenance personnel uploads the latest program package to the program transfer warehouse, the system will cut the program package and identify the bytecode file, dynamically update the control logic to the corresponding cloud controller according to the program issuing rule. During the updating, the system will open a program state container for the cloud controller, which is used to save the temporary state data of the program. The normal operation of the cloud controller is not affected during the updating, and after the updating is completed, the system will synchronize the state data in the program state container to the cloud controller, so that the in-memory data of the cloud controller is synchronized to the latest state data. Figure 7 FIG. 3 is a schematic diagram of cutting the program package in the embodiment. The program package is cut and identified as a bytecode file, and then sent to the controller.

[0069] The process of upgrading the controller can include:

[0070] 1. Upload the update package. The program transfer warehouse has the functions of storing programs, program package cutting, dynamic code recognition and code distribution. When the operation and maintenance personnel update the cloud controller program, the latest program package is uploaded to the program transfer warehouse, the program distribution rules are configured, and the program transfer warehouse is distributed to the cloud controller program container. The distribution rules specify which cloud controller the program package will be distributed to, and the program transfer warehouse will distribute the code update recognition results to each program container according to the distribution rules, achieving the effect of "one deployment, multiple updates".

[0071] 2. Program package cutting, dynamic code file and static resource file recognition. After the operation and maintenance personnel upload the program package, the program transfer warehouse analyzes the logical structure and dependency relationship of the program package, and cuts the program package into multiple hierarchical bytecode files and static resource files, that is, the code structure relationship of the program running time. The program transfer warehouse can identify the added, updated and deleted bytecode files in the program package, and will summarize the file recognition results after the identification process is completed.

[0072] 3. Freeze the program container running state and data. After the update recognition process of the program transfer warehouse is completed, the program transfer warehouse distributes the update recognition results to each controller container according to the distribution rules, and the controller program container is set to the update state. The system will open a memory space for the controller program container to generate a program state container for saving temporary state data of the program. Specifically, the system will traverse each running state variable and data structure of the current program and copy it one by one to the specially designed program state container. The program state saving container uses a special structure data stack to record the order of program state parameters, so as to have a correct recovery order in subsequent data recovery. At the same time, the program state saving container marks and classifies the saved state, which facilitates subsequent quick retrieval and identification of different save points.

[0073] 4. Dynamically update the bytecode file. After temporarily saving the program state, the system will send a signal to the bytecode file listener. After receiving the signal, the bytecode file listener triggers the overload mechanism according to the bytecode binary stream of the file comparison result, so that the program container reloads the bytecode file that exists in the update operation.

[0074] 5. Restoring the running state and data into the program container. After the bytecode file is reloaded, the program on the cloud system is updated to the latest code, at this time, the state in the program is initialized data, and the state of the recovery program needs to be restored to the state before being blocked. The cloud system takes out the program state data from the program state container, and the data stack in the container stores the state data and sequence before the program is updated. The system restores the program state according to the sequence of the data stack.

[0075] The embodiment also provides an upgrading device of a cloud digital base, as shown in the figure, comprising: Figure 8

[0076] The receiving module 802 is configured to receive an update program package and a delivery rule of the update program package on the cloud;

[0077] The configuration module 804 is configured to configure the update program package into a program container of a target controller on the cloud according to the delivery rule, wherein the digital base on the cloud stores a plurality of controllers including the target controller;

[0078] The processing module 806 is configured to copy running state variables and data structures of each program of the target controller into a program state container in the memory before the target controller uses the update program package to upgrade;

[0079] The control module 808 is configured to control the target controller to perform an upgrading action using the update program package;

[0080] The update module 810 is configured to configure the running state variables and data structures stored in the program state container in the memory into the upgraded target controller after the target controller uses the update program package to upgrade.

[0081] The digital base in the embodiment refers to an informatization general infrastructure. The digital base can be a combination of a plurality of controllers, but is not limited thereto. For example, for a building or a building group, a digital base can be used for control, and each controller in the digital base is used for controlling various smart devices in the building or the building group, so that complete monitoring / management of the smart devices in the building is realized through the digital base.

[0082] The digital base in the embodiment can be deployed on the cloud. That is, the virtual controller on the cloud is used to control the smart devices, and a chip controller does not need to be deployed for the smart devices. The chip controller is not easy to adjust, the upgrading process is complex, and the cost is high. The virtual controller on the cloud in the embodiment is flexible in deployment, does not affect the control process during upgrading, and has low cost.

[0083] ​In the embodiment, the digital base is deployed in the cloud, and the cloud is used to obtain the update program package and the update program package issuing rule from the user side. The user side can configure the update program package and the update program package issuing rule through the client. For example, the client can modify the lighting time period of the lamp in the building system, or the lighting bright-darkness, the lighting mode, etc., pack the configured program into an update program package, and configure the issuing rule, for example, the control of the lamp, to update the controller of the lamp in the digital base, so that the controller of the lamp can use the new control logic to control the lamp in the building after the configuration update.

[0084] In the embodiment, the cloud can configure a program container for each controller, and the program container is used to run the program of the controller. One program container can be configured for one controller, or one program container can be configured for each program of one controller, so that the programs of one controller can be run separately. The update program package is configured into the program container, the program container can be directly run, and the content of the new update program package is run, so that the new control means is directly started to control the target controller.

[0085] In the embodiment, the digital base can be a system set for a building, and the building can be a building, a building group, or even a wider range, such as a building group in a city, or a smaller range, such as a floor, a room, etc. The system includes all the allowed controlled intelligent devices in the control range. For example, the digital base is a system set for a building, and the allowed controlled intelligent devices in the building can be controlled by the digital base. The digital base includes the controllers of the allowed controlled intelligent devices in the building (since the digital base is deployed in the cloud, the controller is a virtual controller in the cloud, and the virtual controller in the cloud realizes the control function of the controller by running the program in the program container).

[0086] In the embodiment, each intelligent device can correspond to one controller, or one controller can correspond to multiple intelligent devices. For the same intelligent devices in the building, for example, all are lamps and have the same model, the same controller can be used for batch control.

[0087] In the embodiment, before the target controller is upgraded by configuring the update program package into the program container of the target controller, the running state variables and data structures of each program of the target controller can be copied to the program state container in the memory. The program state container is used to save the state of the running state variables and data structures of each program of the target controller. For example, the current data is saved in the program state container, and after the target controller is upgraded, the values of the parameters are initialized, and the values recorded in the program state container can be used to restore the initialized parameters.

[0088] The method provided by the embodiment of the application comprises the following steps: receiving an update program package and a distribution rule of the update program package in the cloud; configuring the update program package into a program container of a target controller in the cloud according to the distribution rule, wherein the digital base in the cloud stores a plurality of controllers including the target controller; copying running state variables and data structures of each program of the target controller into a program state container in the memory before the target controller is upgraded using the update program package; controlling the target controller to perform an upgrade action using the update program package; and configuring the running state variables and the data structures stored in the program state container in the memory into the target controller after the target controller is upgraded using the update program package, so that the update program package can be configured into the program container of the target controller when the target controller in the digital base in the cloud is upgraded, and the running state variables and the data structures can be stored in the program state container, so that the target controller can be upgraded without interruption. The upgrade efficiency of the digital base is improved.

[0089] The embodiment further provides an upgrade system of a digital base in the cloud, as shown in Figure 9 The upgrade system comprises the following components:

[0090] The cloud is configured to receive an update program package and a distribution rule of the update program package in the cloud; configure the update program package into a program container of a target controller in the cloud according to the distribution rule, wherein the digital base in the cloud stores a plurality of controllers including the target controller; copy running state variables and data structures of each program of the target controller into a program state container in the memory before the target controller is upgraded using the update program package; control the target controller to perform an upgrade action using the update program package; and configure the running state variables and the data structures stored in the program state container in the memory into the target controller after the target controller is upgraded using the update program package.

[0091] The client is configured to provide the update program package and the distribution rule.

[0092] The target controller is configured to control the smart device.

[0093] The digital base in the embodiment refers to an informatization general infrastructure. The digital base can be a combination of a plurality of controllers, but is not limited thereto. For example, for a building or a group of buildings, the building or the group of buildings can be controlled by using one digital base, and each controller in the digital base is configured to control various smart devices in the building or the group of buildings, so that complete monitoring and management of the smart devices in the building are realized by using the digital base.

[0094] The digital base in the embodiment can be deployed in the cloud. That is, the smart device is controlled by the virtual controller in the cloud, and a chip controller is no longer needed to be deployed for the smart device. The chip controller is not easy to adjust, the upgrading process is complex, and the cost is high. The virtual controller in the cloud of the embodiment is flexible in deployment, the upgrading does not affect the control process, and the cost is low.

[0095] In the embodiment, the digital base is deployed in the cloud, and the update program package and the update program package delivery rule are obtained from the user side through the cloud. The user side can configure the update program package and the update program package delivery rule through the client. For example, the client can modify the lighting time period of the lamp in the building system, or the lighting bright-dark, lighting mode, etc. The configured program is packaged as an update program package, and a delivery rule is configured, for example, a control of the lamp is delivered, which is used to update the controller of the lamp in the digital base. Therefore, after the configuration update, the controller of the lamp can use the new control logic to control the lamp in the building.

[0096] In the embodiment, a program container can be configured for each controller in the cloud. The program container is used to run the program of the controller. One program container can be configured for one controller, or one program container can be configured for each program of one controller, so that the programs of one controller can be run separately. The update program package is configured into the program container, so that the program container can run the content of the new update program package directly when running, so that the new control means is directly started to control the target controller.

[0097] In the embodiment, the digital base can be a system set for a building. The building can be a building, a building group, or even a wider range such as a building group of a city, or a smaller range such as a floor, a room, etc. The system includes all the allowed controlled smart devices in the control range. For example, the digital base is a system set for a building, and the allowed controlled smart devices in the building can be controlled by the digital base. The digital base includes the controllers of the allowed controlled smart devices in the building (since the digital base is deployed in the cloud, the controller is a virtual controller in the cloud. The virtual controller in the cloud realizes the control function of the controller by running the program in the program container).

[0098] In the embodiment, each smart device can correspond to one controller, or one controller can correspond to multiple smart devices. For the same smart devices in the building, for example, all are lamps and have the same model, the same controller can be used for batch control.

[0099] In this embodiment, before the target controller is upgraded by configuring the update program package into the program container of the target controller, the running state variables and data structures of each program of the target controller can be copied into the program state container in the memory. The program state container is used to save the states of the running state variables and data structures of each program of the target controller. For example, the current data is saved in the program state container, and after the target controller is upgraded, the values of the parameters are initialized, and then the values recorded in the program state container can be used to restore the initialized parameters.

[0100] The method provided by the embodiment of the application comprises the following steps: receiving an update program package and a delivery rule of the update program package in the cloud; configuring the update program package into a program container of a target controller in the cloud according to the delivery rule, wherein a digital base in the cloud stores a plurality of controllers including the target controller; copying running state variables and data structures of each program of the target controller into a program state container in the memory before the target controller is upgraded by using the update program package; controlling the target controller to perform an upgrade action by using the update program package; and configuring the running state variables and data structures saved in the program state container in the memory into the upgraded target controller after the target controller is upgraded by using the update program package. Therefore, when the target controller in the digital base in the cloud is upgraded, the update program package can be configured into the program container of the target controller, and the running state variables and data structures can be saved by using the program state container, so that the target controller can be upgraded without interruption. The upgrading efficiency of the digital base is improved.

[0101] As shown in Figure 10 The embodiment of the application provides an upgrading device of a cloud digital base, which comprises a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112 and the memory 113 can communicate with each other through the communication bus 114,

[0102] The memory 113 is used for storing a computer program.

[0103] In an embodiment of the application, the processor 111 is used for executing the computer program stored in the memory 113, so as to realize the method for upgrading the cloud digital base provided by any one of the preceding method embodiments.

[0104] The embodiment of the application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the steps of the method for upgrading the cloud digital base provided by any one of the preceding method embodiments.

[0105] The apparatus embodiments described above are only illustrative, and the units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment.

[0106] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be realized by means of software plus a general hardware platform, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, and the computer software product can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.

[0107] It should be understood that the terms used herein are for the purpose of describing particular example embodiments only and are not intended to be limiting. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The terms "comprises", "comprising", "includes", "including" and "has" are inclusive and therefore specify the presence of stated features, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or groups thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring their performance in the particular order in which they are described, unless specifically indicated as such. It is also to be understood that additional or alternative steps can be employed.

[0108] The above description is merely illustrative of the application and is not intended to limit the scope of the application. Various modifications can be made to the embodiments described herein, and the general principles defined herein can be applied to other embodiments without departing from the spirit or scope of the application. Accordingly, the application is not to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for upgrading a cloud-based digital platform, characterized in that, The method comprises the following steps: receiving an update package and a delivery rule of the update package in the cloud; configuring the update package into a program container of a target controller in the cloud according to the delivery rule, wherein a digital base in the cloud stores a plurality of controllers including the target controller; copying running state variables and data structures of each program of the target controller into a program state container in the memory before the target controller upgrades using the update package; controlling the target controller to perform an upgrade action using the update package; after the target controller upgrades using the update package, configuring the running state variables and data structures stored in the program state container in the memory into the upgraded target controller, and when the program state container in the memory includes a timing duration, controlling the target controller to continue timing from the timing duration. The step of configuring the update package into the program container of the target controller in the cloud according to the delivery rule comprises the following steps: analyzing a delivery time and a delivery object in the delivery rule by a program transfer warehouse in the cloud; determining the target controller according to the delivery object; and configuring the update package into the target controller according to the delivery time; the delivery rule further includes a selected rule, the selected rule includes a range of the delivery object, and the step of determining the target controller according to the delivery object comprises the following steps: determining each type of controller included in a scene to be controlled by the digital base, and a position and a state of each controller in each type of controller; and determining a controller in a corresponding type of controller indicated by the delivery object as the target controller, wherein the controller meets the selected rule in terms of the range, the state and the position.

2. The method of claim 1, wherein, The step of configuring the update package into the program container of the target controller in the cloud according to the delivery rule comprises the following steps: analyzing a logical structure and a dependency relationship in the update package by the program transfer warehouse in the cloud; cutting the update package into bytecode files and static resource files having a hierarchical relationship according to the logical structure and the dependency relationship; comparing the bytecode files and the static resource files with original files of the target controller to identify files changed in the update package compared with the original files; and configuring the changed files into the program container of the target controller in the cloud.

3. The method of claim 1, wherein, The step of copying the running state variables and the data structures of each program of the target controller into the program state container in the memory before the target controller upgrades using the update package comprises the following steps: creating a program state container for the target controller in the memory, wherein the program state container is created before the target controller upgrades and is deleted after the target controller upgrades, and a program state container corresponding to each controller is created in the memory when each controller upgrades; copying the running state variables and the data structures of each program of the target controller into the program state container of the target controller in the memory.

4. The method of claim 1, wherein, The copying of the running state variables and data structures of each program of the target controller into the program state container of the target controller in the memory comprises: copying the running state variables and data structures of each program of the target controller into the program state container of the target controller in the memory; copying the running state variables and data structures of each program of the target controller into the program state container of the target controller in the memory; storing the running state variables and data structures of each program in the program state container in the order of the data stack structure; 5. The method of claim 1, wherein, marking and classifying the running state variables and data structures of each program according to the state of the running state variables and data structures of each program. The control of the target controller to perform the upgrade action using the update program package comprises:

6. An apparatus for upgrading a cloud digital foundation, comprising: reloading the updated bytecode file in the program container by the program container of the target controller. The method comprises: receiving an update program package and a delivery rule of the update program package in the cloud; configuring the update program package into the program container of the target controller in the cloud according to the delivery rule, wherein the digital base in the cloud stores a plurality of controllers including the target controller; copying the running state variables and data structures of each program of the target controller into the program state container in the memory before the target controller uses the update program package to upgrade; controlling the target controller to perform the upgrade action using the update program package; updating the running state variables and data structures stored in the program state container in the memory into the upgraded target controller after the target controller uses the update program package to upgrade, and controlling the target controller to continue timing from the timing duration when the program state container in the memory includes the timing duration; 7. An upgrade system for a cloud digital foundation, the system comprising: wherein the configuration of the update program package into the program container of the target controller in the cloud according to the delivery rule comprises: analyzing the delivery time and delivery object in the delivery rule through the program transfer warehouse in the cloud; determining the target controller according to the delivery object; configuring the update program package into the target controller according to the delivery time; the delivery rule further includes a selected rule, the selected rule includes the range of the delivery object, and the determination of the target controller according to the delivery object comprises: determining each type of controller included in the scene to be controlled by the digital base, and the position and state of each controller in each type of controller; determining the controller in the corresponding type of controller indicated by the delivery object as the target controller, which meets the selected rule in range, state and position. The method comprises: The cloud is configured to receive an update package and a delivery rule of the update package, configure the update package into a program container of a target controller of the cloud according to the delivery rule, wherein a digital base of the cloud stores a plurality of controllers including the target controller, copy running state variables and data structures of each program of the target controller into a program state container in the memory before the target controller uses the update package to upgrade, control the target controller to perform an upgrade action using the update package, and configure the running state variables and data structures stored in the program state container in the memory into the target controller after the target controller uses the update package to upgrade, wherein the program state container in the memory includes a timing duration, and the target controller is controlled to continue timing from the timing duration. The cloud is configured to receive an update package and a delivery rule of the update package, configure the update package into a program container of a target controller of the cloud according to the delivery rule, wherein a digital base of the cloud stores a plurality of controllers including the target controller, copy running state variables and data structures of each program of the target controller into a program state container in the memory before the target controller uses the update package to upgrade, control the target controller to perform an upgrade action using the update package, and configure the running state variables and data structures stored in the program state container in the memory into the target controller after the target controller uses the update package to upgrade, wherein the program state container in the memory includes a timing duration, and the target controller is controlled to continue timing from the timing duration. The client is configured to provide the update package and the delivery rule. The target controller is configured to control the smart device.

8. An electronic device, comprising: The computer program is executed by the processor to implement the method of any one of claims 1-5. The computer program is executed by the processor to implement the method of any one of claims 1-5. ​ 9. A storage medium having stored thereon a computer program, characterized in that ​

Citation Information

Patent Citations

  • Service-uninterrupted upgrading method, to-be-upgraded node and readable storage medium

    CN107515776A

  • Code updating method and device thereof, computer equipment and medium

    CN113504916A