Upgrading method, device and system of cloud digital base, storage medium and electronic equipment

By receiving and configuring update packages in the cloud, and using program status containers to save and restore operating status, the problem of inefficient upgrade efficiency of cloud digital docks is solved, and an uninterrupted and efficient upgrade process is achieved.

CN119718374AActive Publication Date: 2025-03-28GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411840255.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-03-28
Estimated Expiration
2044-12-13

AI Technical Summary

Technical Problem

The upgrade efficiency of cloud digital bases is low, the traditional update process takes a long time, and the operation steps are complex, which affects the user experience.

Method used

Receive update packages and issue rules in the cloud, configure update packages to the program container of the target controller, and copy the running status variables and data structures to the program state container in memory before upgrading, and restore these states after completing the upgrade.

Benefits of technology

It realizes the uninterrupted upgrade of the cloud digital dock, improves the upgrade efficiency, simplifies operational steps, and reduces user waiting time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718374A_ABST
    Figure CN119718374A_ABST
Patent Text Reader

Abstract

The invention relates to a cloud digital base upgrading method, device and system, a storage medium and electronic equipment. The method comprises the steps of receiving an updating program package and an issuing rule of the updating program package at a cloud; according to the issuing rule, the update program package is configured to a program container of a target controller of the cloud, and a digital base of the cloud stores a plurality of controllers including the target controller; before the target controller is upgraded by using the update program package, copying a running state variable and a data structure of each program of the target controller into a program state container in a memory; controlling the target controller to execute an upgrading action by using the updating program package; and after the target controller is upgraded by using the update program package, configuring the running state variable and the data structure stored in the program state container in the memory into the upgraded target controller. The technical problem of low upgrading efficiency of the cloud digital base is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of smart buildings, and in particular to a method, device, system, storage medium and electronic device for upgrading a cloud digital base. Background Art

[0002] With the continuous development of information technology, digitalization and intelligence are the general trend of future industry. Traditional industrial control systems rely on field controllers to directly connect to devices to achieve information collection and logic control. There are many types of controllers and they are deployed in a scattered manner, making it difficult to achieve unified management and logic updates. Therefore, some smart building fields in the industry have proposed the concept of cloud control of controller devices, that is, to virtualize and digitize the originally deployed scattered controllers. Specifically, the control logic of the controller is compiled into a digital program, and then the program package is deployed on a digital base based on a cloud platform. The controller is managed uniformly through the cloud, realizing cloud control of the controller. The deployment method of control logic has been upgraded from traditional field controller deployment to deploying control logic in the cloud, thereby realizing cloud control of equipment.

[0003] With the demand for automation and intelligence, more and more factories are requiring industrial equipment to work 24 hours a day without stopping. If the controller program deployed to the cloud needs to be upgraded, the traditional workflow for updating the controller logic is as follows: 1. Stop the controller program 2. Upload the control logic program to the controller 3. Start the new logic program of the controller 4. Debug the new program. This process is not only time-consuming, but also has complicated steps for program replacement. It takes an average of 20 to 30 minutes to redeploy a single program change. During this period, the program cannot provide services to users. Users need to wait until the program update is completed before they can use system services, which greatly affects the user experience. Summary of the invention

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

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

[0006] In the second aspect, the present application provides a cloud-based digital base upgrading device, comprising: a receiving module, used to receive an update program package and the distribution rules of the above-mentioned update program package in the cloud; a configuration module, used to configure the above-mentioned update program package to the program container of the above-mentioned target controller in the cloud according to the above-mentioned distribution rules, wherein the above-mentioned cloud-based digital base stores multiple controllers including the above-mentioned target controller; a processing module, used to copy the running status variables and data structures of each program of the above-mentioned target controller to the program status container in the memory before the above-mentioned target controller is upgraded using the above-mentioned update program package; a control module, used to control the above-mentioned target controller to perform the upgrade action using the above-mentioned update program package; an update module, used to configure the running status variables and data structures stored in the program status container in the above-mentioned memory to the upgraded above-mentioned target controller after the above-mentioned target controller is upgraded using the above-mentioned update program package.

[0007] In the third aspect, the present application provides an upgrade system for a cloud-based digital base, comprising: a cloud, used to receive an update program package and the distribution rules of the above-mentioned update program package in the cloud; according to the above-mentioned distribution rules, the above-mentioned update program package is configured in the program container of the target controller in the above-mentioned cloud, wherein the above-mentioned cloud-based digital base stores multiple controllers including the above-mentioned target controller; before the above-mentioned target controller is upgraded using the above-mentioned update program package, the running status variables and data structures of each program of the above-mentioned target controller are copied to the program status container in the memory; the above-mentioned target controller is controlled to perform the upgrade action using the above-mentioned update program package; after the above-mentioned target controller is upgraded using the above-mentioned update program package, the running status variables and data structures stored in the program status container in the above-mentioned memory are configured to the upgraded target controller; a client, used to provide the above-mentioned update program package and the above-mentioned distribution rules; the target controller, used to control the operation of the smart device.

[0008] In a fourth aspect, the present application provides an upgrade device for a cloud-based 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 upgrade method for the cloud-based digital base by executing executable instructions in the memory.

[0009] In a fifth aspect, the present application also provides a computer storage medium storing computer executable instructions, wherein the computer executable instructions are used to execute the upgrade method of the cloud-based digital base described in any one of the above items of the present application.

[0010] The above technical solution provided by the embodiment of the present application has the following advantages over the prior art: the method provided by the embodiment of the present application receives the update package and the issuing rule of the update package in the cloud; configures the update package to the program container of the target controller in the cloud according to the issuing rule, wherein the digital base in the cloud stores multiple controllers including the target controller; before the target controller is upgraded using the update package, the running state variables and data structures of each program of the target controller are copied to the program state container in the memory; the target controller is controlled to perform the upgrade action using the update package; after the target controller is upgraded using the update package, the running state variables and data structures stored in the program state container in the memory are configured to the upgraded target controller, so that when upgrading the target controller in the digital base in the cloud, the update package can be configured to the program container of the target controller, and the running state variables and data structures can be stored through the program state container, so that the target controller can be upgraded without interrupting the target controller. The upgrade efficiency of the digital base is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0012] In order to more clearly illustrate the embodiments of the present invention 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0013] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0014] Figure 1 A flowchart of a method for upgrading a cloud digital base provided in an embodiment of the present application;

[0015] Figure 2 A flowchart of another method for upgrading a cloud digital base provided in an embodiment of the present application;

[0016] Figure 3 A flowchart of another method for upgrading a cloud digital base provided in an embodiment of the present application;

[0017] Figure 4 A flowchart of another method for upgrading a cloud digital base provided in an embodiment of the present application;

[0018] Figure 5 An updated schematic diagram of a digital base provided in an embodiment of the present application;

[0019] Figure 6 A schematic diagram of controller update provided in an embodiment of the present application;

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

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

[0022] Fig. 9 A schematic diagram of an upgrade system for a cloud digital base provided in an embodiment of the present application;

[0023] Fig.10 A schematic diagram of an upgrade device for a cloud digital base provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are 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 without making creative work are within the scope of protection of this application.

[0025] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.

[0026] In order to solve the technical problem of low upgrade efficiency of cloud-based digital bases in the prior art, the present application provides an upgrade method for a cloud-based digital base, which can achieve the effect of improving the upgrade efficiency of the digital base.

[0027] Figure 1 A flowchart of a method for upgrading a cloud digital base provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, including:

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

[0029] S104, configuring the update program package to 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;

[0030] S106, before the target controller is upgraded using the update program package, copying the running state variables and data structures of each program of the target controller to the program state container in the memory;

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

[0032] S110, 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.

[0033] The digital base in this embodiment refers to an information-based general infrastructure. The digital base may be a combination of multiple controllers, but is not limited thereto. For example, a building or a complex of buildings may be controlled by a digital base, and each controller in the digital base is used to control various intelligent devices in the building or complex of buildings, thereby achieving complete monitoring / management of the building's intelligent devices through the digital base.

[0034] The digital base in this embodiment can be deployed in the cloud. That is, the smart device is controlled by the virtual controller in the cloud, and there is no need to deploy a chip controller for the smart device. The chip controller is not easy to adjust, the upgrade process is complicated, and the cost is high. The virtual controller in the cloud of this embodiment is flexible to deploy, and the upgrade does not affect the control process, and the cost is low.

[0035] In this embodiment, the digital base is deployed in the cloud, and the update package and the rules for issuing the update package are obtained from the user side through the cloud. The user side can configure the update package and the rules for issuing the update package through the client. For example, the client can modify the lighting time period of the lights in the building system, or the lighting brightness, lighting mode, etc., package the configured program into an update package, and configure the issuing rules, such as the control rules issued to the lights, to update the controller of the lights in the digital base, so that the controller of the lights can use the new control logic to control the lights in the building after the configuration is updated.

[0036] In this embodiment, a program container can be configured for each controller in the cloud, and the program container is used to run the program of the controller. A program container can be configured for a controller, or a program container can be configured for each program of a controller, so that the various programs of a controller can be run separately. When the update program package is configured in the program container, the program container can be directly run to run the content of the new update program package, thereby directly starting a new control method to control the target controller.

[0037] In this embodiment, the digital base can be a system set up for a building. The building can be a building, a group of buildings, or even a wider range, such as a group of buildings in a city, or a smaller range, such as a floor, a room, etc. The system includes all the smart devices that are allowed to be controlled within the range to be controlled. If the digital base is a system set up for a building, all the smart devices that are allowed to be controlled in the building can be controlled by the digital base. The digital base includes the controllers of the smart devices that are allowed to be controlled in the building (because the digital base is deployed in the cloud, the controller is a virtual controller in the cloud. The virtual controller in the cloud implements the control function of the controller by running the program in the program container).

[0038] In this embodiment, each smart device may correspond to one controller, or one controller may correspond to multiple smart devices. For the same smart devices in a building, for example, all lights with the same model, the same controller may be used for batch control.

[0039] In this embodiment, before configuring the update program package into the program container of the target controller and upgrading 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 running state variables and data structure states of each program of the target controller. For example, the current data is saved in the program state container. After the upgrade of the target controller is completed, the values ​​of various parameters are initialized, and the initialized parameters can be restored using the values ​​recorded in the program state container.

[0040] The method provided by the embodiment of the present application receives an update package and a distribution rule of the update package in the cloud; configures the update package to the program container of the target controller in the cloud according to the distribution rule, wherein the digital base in the cloud stores multiple controllers including the target controller; before the target controller is upgraded using the update package, the running state variables and data structures of each program of the target controller are copied to the program state container in the memory; the target controller is controlled to perform the upgrade action using the update package; after the target controller is upgraded using the update package, the running state variables and data structures stored in the program state container in the memory are configured to the upgraded target controller, so that when upgrading the target controller in the digital base in the cloud, the update package can be configured to the program container of the target controller, and the running state variables and data structures can be stored through the program state container, so that the target controller can be upgraded without interrupting the target controller. The upgrade efficiency of the digital base is improved.

[0041] In this embodiment, if Figure 2 As shown, according to the delivery rules, an optional method for configuring the update package to the program container of the target controller in the cloud is:

[0042] S202, the cloud-based program transfer warehouse parses and updates the logical structure and dependency relationship in the program package;

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

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

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

[0046] In this embodiment, the cloud is configured with a program transit warehouse, which can store the update packages uploaded by users. If the user uploads different update packages for different controllers, the update packages can be stored in the transit warehouse for sequential parsing. The program transit warehouse can parse each update package, parsing the logical structure and dependencies therein. The purpose of parsing the logical structure and dependencies is to obtain the relationship between the codes in the update package. Based on the relationship, a bytecode file and a static resource file with a hierarchical relationship can be obtained. The update package is thus parsed into an executable bytecode file. The resources required by the bytecode file when it is executed call the static resource file.

[0047] The purpose of parsing the update package in this embodiment is to parse the update package in other formats into an executable bytecode file. Since the update package is configured in the program container of the target controller, the bytecode file can be run in the program container to control the target controller.

[0048] In addition, the program transit warehouse can also record historical bytecode files, complete the comparison of bytecode files, and thus determine the bytecode files that have changed. For bytecode files that have not changed, they may not be configured into the program container of the target controller.

[0049] In this embodiment, if Figure 3 As shown, before the target controller is upgraded using the update package, one implementation method of copying the running state variables and data structures of each program of the target controller to the program state container in the memory is:

[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 deleted after the target controller is upgraded. When each controller is upgraded, a program state container corresponding to the controller is created in the memory;

[0051] S304, copying the running state variables and data structures of each program of the target controller to the program state container of the target controller in the memory.

[0052] In this embodiment, since the update program package is to be configured in 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 instead of re-recording parameters after the new update program package is configured in the program container, the running state variables and data structures of each program of the old version of the control program package are copied to 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 will be moved back to the first floor after no one uses it for more than 1 minute. If the elevator waits for 30 seconds without anyone using it, the update program package is configured in the program container at this time, and the new control logic is that the elevator will be moved back to the first floor after no one uses it for more than 2 minutes, then the count will be restarted at this time, and the elevator will not be moved back until 2 minutes. In fact, the elevator has been waiting for 30 seconds without anyone using it. Therefore, if the above 30 seconds are stored in the program state container, when running the upgraded target controller, the duration can be continued from 30 seconds instead of recording the duration from the beginning.

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

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

[0055] In this embodiment, an implementation method of copying the running status variables and data structures of each program of the target controller to the program status container of the target controller in the memory is: each time a program of the target controller is traversed, the running status variables and data structures of the program are copied to the program status container of the target controller; the running status variables and data structures of each program are stored in the program status container in the structural order of the data stack; the running status variables and data structures of each program are marked and classified according to the status of the running status variables and data structures of each program.

[0056] In this embodiment, the structure for storing data in the program state container can use a data stack. A data stack is a linear table 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 data stack is used to record the running state variables and data structures, so that the order of the running state variables and data structures can be recorded.

[0057] In addition to storing the running state variables and data structures in the data stack structure of the program state container, the running state variables and data structures can also be classified. The purpose of classification is to facilitate the subsequent search by type. In addition, the running state variables and data structures can also be marked. The purpose of marking the running state variables and data structures is to mark the data with abnormal status so as to process them.

[0058] In this embodiment, one implementation method of controlling the target controller to use the update program package to perform the upgrade action is: the program container of the target controller reloads the updated bytecode file in the program container.

[0059] In this 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 parsing the update package to obtain a new bytecode file and configuring the new bytecode file into the program container, the bytecode file of the previous version can be deleted, or a special mark can be added, and the previous bytecode file with the special mark can not be run. The new bytecode file can be overloaded, and after overloading, it can be directly executed to control the target controller. For the overloaded bytecode file, it is necessary to use the running state variables and data structures of the program stored in the program state container to update, so as to complete the old and new alternation of the bytecode file of the previous version and the bytecode file of the new version.

[0060] In this embodiment, if Figure 4 As shown, according to the delivery rule, an implementation method of configuring the update program package to the program container of the target controller in the cloud is:

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

[0062] S404, determining the target controller according to the issued object;

[0063] S406: Configure the update program package to the target controller according to the delivery time.

[0064] In this embodiment, after obtaining the update package and the issuing rules, the program transit warehouse in the cloud can parse the issuing rules. Parsing the issuing rules can determine the issuing time and issuing object in the issuing rules. The issuing object is the controller or controllers to which the update package is issued. The issuing time can be the time point when the update package is issued. After determining the issuing time and issuing object, the update package can be issued to the issuing object, which is the target controller. After parsing the update package, a bytecode file is obtained, and the bytecode file is configured in the program container of the target controller.

[0065] In this embodiment, the sending rules also include selection rules. One implementation method for determining the target controller according to the sending object is: determining each type of controller included in the scenario to be controlled by the digital base, and the position and status of each controller in each type of controller; and determining the controller of the corresponding type indicated by the sending object, whose status and position meet the selection rules as the target controller.

[0066] In this embodiment, the selection rule can be used to determine the scope of the objects to be sent. For example, if the controllers in a building include lights and elevators, the environments of the lights are different, such as corridor lights, elevator lights, and basement lights. Therefore, when upgrading the controller, the scope of the controller to be upgraded can be selected according to the differences among corridor lights, elevator lights, and basement lights. For example, if you want to upgrade the controller of the corridor lights, you can select a range and upgrade the controller of the corridor lights.

[0067] In this embodiment, if the controller of some smart devices fails and there is no time to upgrade, the same type or version of controller can be used for horizontal control. For example, if the controller of the lights in the corridor fails, the controller of the lights in the basement can be used for horizontal control. Although the control logic of the two may be different, the controller of the lights in the corridor fails and cannot complete the control. Therefore, the controller of the lights in the basement can be used to temporarily control the lights in the corridor.

[0068] Figure 5 This is a schematic diagram of updating the digital base of this embodiment. When the control program in the digital base needs to be updated, it is only necessary to update the program of the cloud controller. This embodiment can be applied to the logical program update of the cloud controller based on the digital base. For example, in an actual scenario, a factory area needs to update the control logic program of the controller of the plant equipment in area A. According to the functional classification, the control logic of some controllers is the same, so the control program uploaded during the update is also the same. For the same control program package, the operation and maintenance personnel only need to upload it once, and the distribution of the program package will be solved by the program transit warehouse. Figure 6 This is a schematic diagram of controller update in this embodiment. After the operation and maintenance personnel upload the latest program package to the program transfer warehouse, the system will cut the program package and identify the bytecode file, and dynamically update it to the control logic of the corresponding cloud controller according to the program distribution rules. During the update, the system will open a program state container for the cloud controller to store temporary program state data. The update will not affect the normal operation of the cloud controller. After the update is completed, the system will synchronize the state data in the program state container to the cloud controller, so that the cloud controller memory data is synchronized to the latest state data. Figure 7 This is a schematic diagram of program package cutting in this embodiment. The program package is cut and the bytecode file is identified, and then sent to the controller.

[0069] The specific process of upgrading the controller may include:

[0070] 1. Upload and update the program package. The program transfer warehouse has the functions of storing programs, cutting program packages, dynamically identifying code updates, and issuing codes. When the operation and maintenance personnel update the cloud controller program, they first upload the latest program package to the program transfer warehouse, configure the program issuance rules, and the program transfer warehouse distributes it to the cloud controller program container. The issuance rules specify which cloud controllers the program package will be issued to. The subsequent program transfer warehouse distributes the code update identification results to each program container according to the issuance rules, achieving the effect of "one deployment, multi-terminal update".

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

[0072] 3. Freeze the running status and data of the program container. After the update identification process of the program transit warehouse is completed, according to the issuance rules, the program transit warehouse sends the update identification results to each controller container, and the controller program container is set to the update state. The system will open up a memory space for the controller program container to generate a program state container for saving the temporary state data of the program. Specifically, the system will traverse each running state variable and data structure of the current program, and copy them one by one to a specially designed program state container. The program state preservation container uses a data stack with a specific structure to record the order of program state parameters so that there is a correct recovery order when the data is subsequently restored. At the same time, the program state preservation container marks and classifies the saved state to facilitate subsequent rapid retrieval and identification of different save points.

[0073] 4. Dynamically update the bytecode file. After temporarily saving the program status, the system will send a signal to the bytecode file listener. After receiving the signal, the bytecode file listener triggers the reload mechanism according to the bytecode binary stream of the file comparison result, allowing the program container to reload the bytecode file with the update operation.

[0074] 5. Restore the running status and data to the program container. After the bytecode file is reloaded, the program on the cloud system has been updated to the latest code. At this time, the state in the program is in the initialization data, and the state of the program needs to be restored to the state before being blocked. The cloud system will take out the program state data from the program state container. The data stack in the container stores the state data and order before the program is updated. The system restores the program state according to the order of the data stack.

[0075] This embodiment also provides an upgrade device for a cloud digital base, such as Figure 8 As shown, including:

[0076] A receiving module 802, configured to receive an update package and a distribution rule of the update package in the cloud;

[0077] A configuration module 804, configured to configure the update program package to 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;

[0078] The processing module 806 is used to copy the running state variables and data structures of each program of the target controller to the program state container in the memory before the target controller is upgraded using the update program package;

[0079] A control module 808, used to control the target controller to perform an upgrade action using the update program package;

[0080] The updating module 810 is used 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 is upgraded using the update program package.

[0081] The digital base in this embodiment refers to an information-based general infrastructure. The digital base may be a combination of multiple controllers, but is not limited thereto. For example, a building or a complex of buildings may be controlled by a digital base, and each controller in the digital base is used to control various intelligent devices in the building or complex of buildings, thereby achieving complete monitoring / management of the building's intelligent devices through the digital base.

[0082] The digital base in this embodiment can be deployed in the cloud. That is, the smart device is controlled by the virtual controller in the cloud, and there is no need to deploy a chip controller for the smart device. The chip controller is not easy to adjust, the upgrade process is complicated, and the cost is high. The virtual controller in the cloud of this embodiment is flexible to deploy, and the upgrade does not affect the control process, and the cost is low.

[0083] In this embodiment, the digital base is deployed in the cloud, and the update package and the rules for issuing the update package are obtained from the user side through the cloud. The user side can configure the update package and the rules for issuing the update package through the client. For example, the client can modify the lighting time period of the lights in the building system, or the lighting brightness, lighting mode, etc., package the configured program into an update package, and configure the issuing rules, such as the control rules issued to the lights, to update the controller of the lights in the digital base, so that the controller of the lights can use the new control logic to control the lights in the building after the configuration is updated.

[0084] In this embodiment, a program container can be configured for each controller in the cloud, and the program container is used to run the program of the controller. A program container can be configured for a controller, or a program container can be configured for each program of a controller, so that the various programs of a controller can be run separately. When the update program package is configured in the program container, the program container can be directly run to run the content of the new update program package, thereby directly starting a new control method to control the target controller.

[0085] In this embodiment, the digital base can be a system set up for a building. The building can be a building, a group of buildings, or even a wider range, such as a group of buildings in a city, or a smaller range, such as a floor, a room, etc. The system includes all the smart devices that are allowed to be controlled within the range to be controlled. If the digital base is a system set up for a building, all the smart devices that are allowed to be controlled in the building can be controlled by the digital base. The digital base includes the controllers of the smart devices that are allowed to be controlled in the building (because the digital base is deployed in the cloud, the controller is a virtual controller in the cloud. The virtual controller in the cloud implements the control function of the controller by running the program in the program container).

[0086] In this embodiment, each smart device may correspond to one controller, or one controller may correspond to multiple smart devices. For the same smart devices in a building, for example, all lights with the same model, the same controller may be used for batch control.

[0087] In this embodiment, before configuring the update program package into the program container of the target controller and upgrading 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 running state variables and data structure states of each program of the target controller. For example, the current data is saved in the program state container. After the upgrade of the target controller is completed, the values ​​of various parameters are initialized, and the initialized parameters can be restored using the values ​​recorded in the program state container.

[0088] The method provided by the embodiment of the present application receives an update package and a distribution rule of the update package in the cloud; configures the update package to the program container of the target controller in the cloud according to the distribution rule, wherein the digital base in the cloud stores multiple controllers including the target controller; before the target controller is upgraded using the update package, the running state variables and data structures of each program of the target controller are copied to the program state container in the memory; the target controller is controlled to perform the upgrade action using the update package; after the target controller is upgraded using the update package, the running state variables and data structures stored in the program state container in the memory are configured to the upgraded target controller, so that when upgrading the target controller in the digital base in the cloud, the update package can be configured to the program container of the target controller, and the running state variables and data structures can be stored through the program state container, so that the target controller can be upgraded without interrupting the target controller. The upgrade efficiency of the digital base is improved.

[0089] This embodiment also provides an upgrade system for a cloud digital base, such as Fig. 9 As shown, including:

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

[0091] Client, used to provide update packages and distribution rules;

[0092] Target controller, used to control the operation of smart devices.

[0093] The digital base in this embodiment refers to an information-based general infrastructure. The digital base may be a combination of multiple controllers, but is not limited thereto. For example, a building or a complex of buildings may be controlled by a digital base, and each controller in the digital base is used to control various intelligent devices in the building or complex of buildings, thereby achieving complete monitoring / management of the building's intelligent devices through the digital base.

[0094] The digital base in this embodiment can be deployed in the cloud. That is, the smart device is controlled by the virtual controller in the cloud, and there is no need to deploy a chip controller for the smart device. The chip controller is not easy to adjust, the upgrade process is complicated, and the cost is high. The virtual controller in the cloud of this embodiment is flexible to deploy, and the upgrade does not affect the control process, and the cost is low.

[0095] In this embodiment, the digital base is deployed in the cloud, and the update package and the rules for issuing the update package are obtained from the user side through the cloud. The user side can configure the update package and the rules for issuing the update package through the client. For example, the client can modify the lighting time period of the lights in the building system, or the lighting brightness, lighting mode, etc., package the configured program into an update package, and configure the issuing rules, such as the control rules issued to the lights, to update the controller of the lights in the digital base, so that the controller of the lights can use the new control logic to control the lights in the building after the configuration is updated.

[0096] In this embodiment, a program container can be configured for each controller in the cloud, and the program container is used to run the program of the controller. A program container can be configured for a controller, or a program container can be configured for each program of a controller, so that the various programs of a controller can be run separately. When the update program package is configured in the program container, the program container can be directly run to run the content of the new update program package, thereby directly starting a new control method to control the target controller.

[0097] In this embodiment, the digital base can be a system set up for a building. The building can be a building, a group of buildings, or even a wider range, such as a group of buildings in a city, or a smaller range, such as a floor, a room, etc. The system includes all the smart devices that are allowed to be controlled within the range to be controlled. If the digital base is a system set up for a building, all the smart devices that are allowed to be controlled in the building can be controlled by the digital base. The digital base includes the controllers of the smart devices that are allowed to be controlled in the building (because the digital base is deployed in the cloud, the controller is a virtual controller in the cloud. The virtual controller in the cloud implements the control function of the controller by running the program in the program container).

[0098] In this embodiment, each smart device may correspond to one controller, or one controller may correspond to multiple smart devices. For the same smart devices in a building, for example, all lights with the same model, the same controller may be used for batch control.

[0099] In this embodiment, before configuring the update program package into the program container of the target controller and upgrading 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 running state variables and data structure states of each program of the target controller. For example, the current data is saved in the program state container. After the upgrade of the target controller is completed, the values ​​of various parameters are initialized, and the initialized parameters can be restored using the values ​​recorded in the program state container.

[0100] The method provided by the embodiment of the present application receives an update package and a distribution rule of the update package in the cloud; configures the update package to the program container of the target controller in the cloud according to the distribution rule, wherein the digital base in the cloud stores multiple controllers including the target controller; before the target controller is upgraded using the update package, the running state variables and data structures of each program of the target controller are copied to the program state container in the memory; the target controller is controlled to perform the upgrade action using the update package; after the target controller is upgraded using the update package, the running state variables and data structures stored in the program state container in the memory are configured to the upgraded target controller, so that when upgrading the target controller in the digital base in the cloud, the update package can be configured to the program container of the target controller, and the running state variables and data structures can be stored through the program state container, so that the target controller can be upgraded without interrupting the target controller. The upgrade efficiency of the digital base is improved.

[0101] like Fig.10 As shown, the embodiment of the present application provides an upgrade device for a cloud digital base, including 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 communicate with each other through the communication bus 114.

[0102] Memory 113, used for storing computer programs;

[0103] In one embodiment of the present application, the processor 111 is used to implement the method for upgrading the cloud digital base provided by any of the aforementioned method embodiments when executing the computer program stored in the memory 113.

[0104] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method for upgrading the cloud digital base provided in any of the aforementioned method embodiments are implemented.

[0105] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0106] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology 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 ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0107] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.

[0108] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for upgrading a cloud digital base, characterized in that: include: Receiving an update package and a distribution rule of the update package in the cloud; According to the issuing rule, configuring the update program package into a program container of the target controller in the cloud, wherein the digital base in the cloud stores a plurality of controllers including the target controller; Before the target controller is upgraded using the update program package, copying the running state variables and data structures of each program of the target controller to a program state container in the memory; Controlling the target controller to use the update program package to perform an upgrade action; 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.

2. The method according to claim 1, characterized in that: The configuring the update program package to the program container of the target controller in the cloud according to the issuing rule comprises: The program transfer warehouse in the cloud parses the logical structure and dependency relationship in the update program package; Cutting the update program package into bytecode files and static resource files with a hierarchical relationship according to the logical structure and the dependency relationship; Comparing the bytecode file and the static resource file with the original file of the target controller to identify the files in the update package that have changed compared to the original file; The changed files are configured into the program container of the target controller in the cloud.

3. The method according to claim 1, characterized in that Before the target controller is upgraded using the update program package, copying the running state variables and data structures of each program of the target controller to the program state container in the memory includes: 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 deleted after the target controller is upgraded, and when each controller is upgraded, a program state container corresponding to the controller is created in the memory; The running state variables and data structures of each program of the target controller are copied to the program state container of the target controller in the memory.

4. The method according to claim 1, characterized in that The step of copying the running state variables and data structures of each program of the target controller to the program state container of the target controller in the memory includes: Whenever a program of the target controller is traversed, the running state variables and data structures of the program are copied to the program state container of the target controller; The running state variables and data structures of each program are stored in the program state container according to the structural order of the data stack; The running state variables and data structures of each program are marked and classified according to the states of the running state variables and data structures of each program.

5. The method according to claim 1, characterized in that The controlling the target controller to use the update program package to perform an upgrade action comprises: The updated bytecode file in the program container is reloaded by the program container of the target controller.

6. The method according to claim 1, characterized in that The configuring the update program package to the program container of the target controller in the cloud according to the issuing rule comprises: Parsing the issuing time and issuing object in the issuing rule through the program transit warehouse in the cloud; Determine the target controller according to the issued object; The update program package is configured in the target controller according to the delivery time.

7. The method according to claim 6, characterized in that The sending rule also includes a selection rule, and the determining the target controller according to the sending object includes: Determine each type of controller included in the scene to be controlled by the digital base, and the position and status of each controller in each type of controller; Among the controllers of the corresponding type indicated by the sent object, the controller whose state and position meet the selection rule is determined as the target controller.

8. An upgrade device for a cloud digital base, characterized in that: include: A receiving module, used for receiving an update package and a distribution rule of the update package in the cloud; A configuration module, configured to configure 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; a processing module, used for copying the running state variables and data structures of each program of the target controller to a program state container in a memory before the target controller is upgraded using the update program package; A control module, used for controlling the target controller to use the update program package to perform an upgrade action; The update module is used 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 is upgraded using the update program package.

9. A cloud digital base upgrade system, characterized in that: include: A cloud, for receiving an update package and a distribution rule of the update package in the cloud; configuring the update package to 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; before the target controller is upgraded using the update package, copying the running state variables and data structures of each program of the target controller to a program state container in a memory; controlling the target controller to perform an upgrade action using the update package; after the target controller is upgraded using the update package, configuring the running state variables and data structures stored in the program state container in the memory to the upgraded target controller; A client, used for providing the update package and the issuing rules; Target controller, used to control the operation of smart devices.

10. An electronic device, characterized in that: include: A processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; The memory is used to store a computer program; and the processor is used to implement the method according to any one of claims 1 to 7 when executing the computer program.

11. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

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

    CN107515776A

  • Cabin software upgrading method, electronic equipment and readable storage medium

    CN113190250A

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

    CN113504916A

  • Container cloud platform upgrading method and device, electronic equipment and storage medium

    CN114443090A