Power Internet of Things application integration method and electronic equipment

By creating multiple virtual machines on the power IoT operating system and deploying power IoT applications in containers, the problem of integration of multiple applications on the unified platform is solved, scalability and security are improved, and the deployment process is simplified.

CN119248426APending Publication Date: 2025-01-03CHINA SOUTHERN POWER GRID COMPANY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411494925.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively integrate multiple power IoT applications on a unified platform, resulting in high resource waste and deployment complexity, lack of scalability and security.

Method used

By creating multiple virtual machines on the power IoT operating system and deploying each power IoT application on different virtual machines, deploying it in container form, using virtualization and containerization technologies to achieve efficient integration.

Benefits of technology

It improves the scalability and security of power IoT applications, reduces resource overhead, simplifies the deployment and migration process, and realizes effective integration of multiple applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248426A_ABST
    Figure CN119248426A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a power internet of things application integration method and electronic equipment. The method comprises the following steps: for an electric power Internet of Things operating system of a plurality of electric power Internet of Things applications to be integrated, creating a plurality of virtual machines on the electric power Internet of Things operating system; for each power Internet of Things application in the plurality of power Internet of Things applications, determining a target virtual machine for deploying the power Internet of Things applications from a plurality of virtual machines, different power Internet of Things applications being deployed on different virtual machines; and deploying the electric power Internet of Things applications on the target virtual machine in a container form to realize integration of the plurality of electric power Internet of Things applications on the electric power Internet of Things operating system. According to the technical scheme of the embodiment of the invention, through effective combination of virtualization and containerization technologies, efficient integration of application of the power Internet of Things to a unified platform of a power Internet of Things operating system is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of electric power technology, and in particular to a method for integrating electric power Internet of Things applications and electronic equipment. Background Art

[0002] With the global emphasis on renewable energy and smart grids, the power system is undergoing profound changes. The rise of smart grids has made real-time monitoring, data analysis, and automated dispatching an inevitable trend. In order to meet this inevitable trend, the power Internet of Things came into being.

[0003] The power Internet of Things includes multiple power Internet of Things applications, such as smart meter applications, substation monitoring applications, and load forecasting applications. Therefore, it is crucial to integrate these power Internet of Things applications on a unified platform to achieve the integration of power Internet of Things related functions. Summary of the invention

[0004] The embodiment of the present invention provides a power Internet of Things application integration method and electronic device to realize the integration of multiple power Internet of Things applications on a unified platform (i.e., a power Internet of Things operating system).

[0005] According to one aspect of the present invention, a method for integrating power Internet of Things applications is provided, which may include:

[0006] For a power Internet of Things operating system to be integrated with multiple power Internet of Things applications, multiple virtual machines are created on the power Internet of Things operating system;

[0007] For each power Internet of Things application among the multiple power Internet of Things applications, determine a target virtual machine for deploying the power Internet of Things application from the multiple virtual machines, wherein different power Internet of Things applications are respectively deployed on different virtual machines;

[0008] The power Internet of Things application is deployed in the form of a container on the target virtual machine to achieve the integration of multiple power Internet of Things applications on the power Internet of Things operating system.

[0009] According to another aspect of the present invention, there is provided an electronic device, which may include:

[0010] at least one processor; and

[0011] a memory communicatively connected to at least one processor; wherein,

[0012] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the power Internet of Things application integration method provided by any embodiment of the present invention is implemented when the at least one processor executes it.

[0013] The technical solution of the embodiment of the present invention is to create multiple virtual machines on the power Internet of Things operating system for the power Internet of Things operating system to be integrated with multiple power Internet of Things applications, and each virtual machine is independent of each other. Then, for each power Internet of Things application in the multiple power Internet of Things applications, a target virtual machine for deploying the power Internet of Things application can be determined from the multiple virtual machines, and different power Internet of Things applications are deployed on different virtual machines, respectively, so as to improve the scalability of the power Internet of Things application; then, the power Internet of Things application is deployed on the target virtual machine in the form of a container, so that after each power Internet of Things application is deployed, the effective integration of multiple power Internet of Things applications on the power Internet of Things operating system is realized. The above technical solution realizes the efficient integration of power Internet of Things applications on the unified platform of the power Internet of Things operating system through the effective combination of virtualization and containerization technologies.

[0014] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0016] Figure 1 is a flow chart of a method for integrating power Internet of Things applications provided according to an embodiment of the present invention;

[0017] Figure 2 is a schematic diagram of an optional example of a method for integrating power Internet of Things applications provided according to an embodiment of the present invention;

[0018] Figure 3 is a flowchart of another power Internet of Things application integration method provided according to an embodiment of the present invention;

[0019] Figure 4 is a flowchart of another power Internet of Things application integration method provided according to an embodiment of the present invention;

[0020] Figure 5 is a flowchart of another power Internet of Things application integration method provided according to an embodiment of the present invention;

[0021] Figure 6 This is a structural block diagram of a power Internet of Things application integration device provided according to an embodiment of the present invention;

[0022] Figure 7 It is a structural schematic diagram of an electronic device that implements the power Internet of Things application integration method in an embodiment of the present invention. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. The situations of "target", "original", etc. are similar and will not be repeated here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0025] Figure 1 This is a flow chart of a method for integrating power Internet of Things applications provided in an embodiment of the present invention. This embodiment is applicable to the case where multiple power Internet of Things applications are integrated on a unified platform. The method can be executed by a power Internet of Things application integration device provided in an embodiment of the present invention, which can be implemented by software and / or hardware, and can be integrated on an electronic device, which can be various user terminals or servers.

[0026] See also Figure 1 The method of the embodiment of the present invention specifically includes the following steps:

[0027] S110. For the power Internet of Things operating system to be integrated with multiple power Internet of Things applications, create multiple virtual machines on the power Internet of Things operating system.

[0028] Among them, the power Internet of Things application can be understood as an application in the power Internet of Things, and the number of such applications can be multiple. On this basis, combined with the application scenarios that may be involved in the embodiments of the present invention, the multiple applications can be, for example, smart meter applications, substation monitoring applications, and load forecasting applications, which are related to the actual situation and are not specifically limited here.

[0029] The power Internet of Things operating system can be understood as a platform, a platform for integrating the above-mentioned multiple power Internet of Things applications. On this basis, combined with the application scenarios that may be involved in the embodiments of the present invention, the platform can be optionally implemented based on the Euler operating system (openEuler); of course, it can also be implemented based on other operating systems, which is not specifically limited here.

[0030] Create multiple virtual machines on the power Internet of Things operating system. On this basis, combined with the application scenarios that may be involved in the embodiments of the present invention, optionally, taking the power Internet of Things operating system implemented by openEuler as an example, virtual machines can be created in the following way:

[0031] Environment preparation: Ensure that the necessary tools for creating a virtual machine are installed on the host machine and verify virtualization support. Update openEuler to the latest version to ensure the stability and security of the operating system.

[0032] Network configuration: Use a bridged network (such as br0) so that the virtual machine can access the external network.

[0033] Virtual machine creation: Use the virt-install command to create a virtual machine, for example, create a virtual machine named power_vm.

[0034] Resource configuration: According to the performance requirements of the power Internet of Things application, the resources of the virtual machine are reasonably configured to ensure the execution of real-time tasks. In this example, the resources can be, for example, the central processing unit (CPU) and memory size.

[0035] Storage configuration: Create a dedicated virtual disk file for the virtual machine, supporting dynamic expansion and snapshot functions.

[0036] Both resource configuration and storage configuration can optimize the allocation of CPU, memory and storage resources according to the needs of different power IoT applications, ensuring that each power IoT application is fully supported in resource usage.

[0037] After creating the virtual machine, you can install it on openEuler through the ISO image file.

[0038] S120. For each power Internet of Things application among the multiple power Internet of Things applications, determine a target virtual machine for deploying the power Internet of Things application from the multiple virtual machines, wherein different power Internet of Things applications are deployed on different virtual machines respectively.

[0039] Among them, different power Internet of Things applications are deployed on different virtual machines, and each virtual machine is independent of each other. This can not only enhance the isolation and security of the power Internet of Things operating system, but also improve the scalability of power Internet of Things applications. Specifically,

[0040] For each electric power Internet of Things application among the multiple electric power Internet of Things applications, a target virtual machine for deploying the electric power Internet of Things application is determined from the multiple virtual machines.

[0041] S130. Deploy the power Internet of Things application in the form of a container on the target virtual machine to achieve integration of multiple power Internet of Things applications on the power Internet of Things operating system.

[0042] Among them, the power Internet of Things application is deployed in the form of a container on the target virtual machine. This deployment method can reduce resource overhead and make deployment and migration more flexible. On this basis, combined with the application scenarios that may be involved in the embodiments of the present invention, optionally, taking the implementation of the power Internet of Things operating system through openEuler as an example, the power Internet of Things application can be packaged as a container in the following way:

[0043] Docker environment configuration: Install Docker on openEuler. Use package management tools to ensure that the Docker version is up to date so that you can take advantage of the latest features and security fixes. Start the Docker service and set it to start automatically at boot to ensure that Docker can run normally after the system restarts.

[0044] Container image creation: Write a Dockerfile to define the dependency environment of the power IoT application, including runtime libraries, configuration files, and startup commands. This process can package the power IoT application into a lightweight container image for subsequent deployment and management. In the Dockerfile, specify the base image (such as Ubuntu) and install the required runtime libraries. At the same time, copy the application code into the container and set the working directory. Finally, define the startup command to ensure that the application can run correctly when the container starts.

[0045] Container image optimization: In order to reduce the size of the container image and increase the download and startup speed, a multi-stage build can be used. In the first stage, a lightweight base image (such as Golang) is used for compilation to build the executable file of the power IoT application. In the second stage, a new base image (such as Ubuntu) is used to copy only the executable file generated in the first stage. This method can effectively remove unnecessary files and dependencies, and ultimately generate a more streamlined container image.

[0046] On this basis, combined with the application scenarios that may be involved in the embodiments of the present invention, optionally, the containers may be orchestrated and managed based on the Kubernetes orchestration tool, and the specific steps are as follows:

[0047] Kubernetes environment configuration: Install the Kubernetes cluster on openEuler and ensure the normal operation of each cluster component, including etcd, API server, scheduler, and controller manager. Set up the Kubernetes cluster through initialization commands and configure the network plug-in to support communication between containers.

[0048] Application deployment: Use Kubernetes' YAML files to define the application's deployment specifications, including resources such as Pod, Service, and Deployment. Create corresponding Kubernetes objects for each power IoT application, specify container images, resource limits, environment variables, and mount storage, etc.

[0049] Scheduling algorithm application: Use the Completely Fair Scheduler (CFS) of the openEuler kernel to schedule processes and ensure fair distribution of CPU resources.

[0050] The Kubernetes orchestration tool further simplifies the management and scheduling of containers, ensuring that containers can be automatically adjusted according to real-time needs.

[0051] After deploying each power Internet of Things application using S120 and S130, the effective integration of multiple power Internet of Things applications on the power Internet of Things operating system is achieved. To put it another way, the functional integration of the power Internet of Things operating system is achieved.

[0052] The technical solution of the embodiment of the present invention is to create multiple virtual machines on the power Internet of Things operating system for the power Internet of Things operating system to be integrated with multiple power Internet of Things applications, and each virtual machine is independent of each other. Then, for each power Internet of Things application in the multiple power Internet of Things applications, a target virtual machine for deploying the power Internet of Things application can be determined from the multiple virtual machines, and different power Internet of Things applications are deployed on different virtual machines, respectively, so as to improve the scalability of the power Internet of Things application; then, the power Internet of Things application is deployed on the target virtual machine in the form of a container, so that after each power Internet of Things application is deployed, the effective integration of multiple power Internet of Things applications on the power Internet of Things operating system is realized. The above technical solution realizes the efficient integration of power Internet of Things applications on the unified platform of the power Internet of Things operating system through the effective combination of virtualization and containerization technologies.

[0053] In order to better understand the above technical solution as a whole, an example of the functional integration of the power Internet of Things operating system based on openEuler is given here for illustration.

[0054] For example, see Figure 2 , specifically including the following steps:

[0055] Step 1: Implement virtual machine scheduling and management based on the resource management and scheduling algorithms provided by the openEuler kernel. The openEuler kernel provides flexible resource management and scheduling algorithms, which enable efficient scheduling and management of virtual machines. This dynamic resource management capability can optimize the allocation of CPU, memory, and storage resources according to the needs of different power IoT applications, thereby ensuring that each power IoT application is fully supported in terms of resource usage.

[0056] Step 2: Use the kernel-based virtual machine (KVM) virtualization technology to run different power IoT applications on different virtual machines, and allocate independent CPU, memory, and storage resources to each virtual machine based on the openEuler kernel. This step can not only enhance the isolation and security of the power IoT operating system, but also improve the scalability of power IoT applications.

[0057] Step 3: Based on Docker container technology, the power IoT application is packaged into lightweight containers, which reduces resource overhead and makes deployment and migration more flexible. Then, the containers are orchestrated and managed based on the Kubernetes orchestration tool, which further simplifies the management and scheduling of containers and ensures that the containers can be automatically adjusted according to real-time needs.

[0058] The above example, through the effective combination of virtualization and containerization, flexible allocation of resources, realizes the efficient integration of the power Internet of Things applied to the power Internet of Things operating system, and meets the increasingly complex operation needs of the smart grid.

[0059] Figure 3 It is a flow chart of another method for integrating electric Internet of Things applications provided in an embodiment of the present invention. This embodiment is optimized based on the above-mentioned technical solutions. In this embodiment, optionally, after the electric Internet of Things application is deployed in the form of a container on the target virtual machine, the above-mentioned method for integrating electric Internet of Things applications may also include: creating a process environment for the electric Internet of Things application on the target virtual machine, wherein the process environments corresponding to different electric Internet of Things applications are different from each other; allocating resources to the process environment according to the resource requirements of the electric Internet of Things application during operation, so as to use the resources to run the electric Internet of Things application on the process represented by the process environment. Among them, the explanations of the terms that are the same as or corresponding to the above-mentioned embodiments are not repeated here.

[0060] See also Figure 3 The method of this embodiment may specifically include the following steps:

[0061] S210. For the power Internet of Things operating system to be integrated with multiple power Internet of Things applications, create multiple virtual machines on the power Internet of Things operating system.

[0062] S220. For each power Internet of Things application among the multiple power Internet of Things applications, determine a target virtual machine for deploying the power Internet of Things application from the multiple virtual machines, wherein different power Internet of Things applications are deployed on different virtual machines respectively.

[0063] S230. Deploy the power Internet of Things application in the form of a container on the target virtual machine.

[0064] S240. On the target virtual machine, create a process environment for the power Internet of Things application, wherein the process environments corresponding to different power Internet of Things applications are different.

[0065] Among them, different power Internet of Things applications are deployed on different virtual machines respectively. On this basis, corresponding process environments are created on different virtual machines respectively, so that different power Internet of Things applications have their own process environments, that is, the process environments corresponding to different power Internet of Things applications are different from each other.

[0066] For example, namespace can be used to create an independent process environment to ensure that each power IoT application is isolated from each other. After creating different namespaces, configure the network and mount points so that each power IoT application runs in an independent namespace without affecting each other. The isolation between power IoT applications ensures security and resource exclusivity.

[0067] S250. Allocate resources to the process environment according to the resource requirements of the power Internet of Things application during operation, so as to utilize the resources to run the power Internet of Things application on the process represented by the process environment, thereby realizing the integration of multiple power Internet of Things applications on the power Internet of Things operating system.

[0068] Here, resources are allocated to each power Internet of Things application. Taking any power Internet of Things application as an example, resources are allocated to the process environment corresponding to the power Internet of Things application according to the resource requirements of the power Internet of Things application, so that the power Internet of Things application can be run on the process represented by the process environment using the resources, and the integration of the power Internet of Things application on the power Internet of Things operating system is realized.

[0069] For example, a resource control group can be created using the cgroup command, and after the creation is completed, resources are allocated and resource limits are set. The power Internet of Things operating system can monitor and limit resource usage through the cgroup interface, and processes that exceed resource limits are restricted by the openEuler kernel.

[0070] The technical solution of the embodiment of the present invention is to create a process environment for each power Internet of Things application on a corresponding virtual machine and allocate resources to the process environment, so that the power Internet of Things application can be run on the process represented by the process environment by utilizing the resources, thereby realizing effective integration of the power Internet of Things application on the power Internet of Things operating system.

[0071] Figure 4 It is a flowchart of another method for integrating electric power Internet of Things applications provided in an embodiment of the present invention. This embodiment is optimized based on the above-mentioned technical solutions. In this embodiment, optionally, different electric power Internet of Things applications correspond to different processes respectively. The above-mentioned method for integrating electric power Internet of Things applications also includes: for a current process that is currently in a running state among multiple processes, when the current process is completed, determining the next process to be run from multiple processes; taking the next process as the current process, and running the corresponding electric power Internet of Things application on the current process using the resources allocated to the process environment corresponding to the current process. Among them, the explanations of the terms that are the same or corresponding to the above-mentioned embodiments are not repeated here.

[0072] See also Figure 4The method of this embodiment may specifically include the following steps:

[0073] S310. For the power Internet of Things operating system to be integrated with multiple power Internet of Things applications, create multiple virtual machines on the power Internet of Things operating system.

[0074] S320. For each power Internet of Things application among the multiple power Internet of Things applications, determine a target virtual machine for deploying the power Internet of Things application from the multiple virtual machines, wherein different power Internet of Things applications are deployed on different virtual machines respectively.

[0075] S330. Deploy the power Internet of Things application in the form of a container on the target virtual machine.

[0076] S340. On the target virtual machine, create a process environment for the electric power Internet of Things application, wherein the process environments corresponding to different electric power Internet of Things applications are different.

[0077] S350. Allocate resources to the process environment according to the resource requirements of the power Internet of Things application during operation, so as to utilize the resources to run the power Internet of Things application on the process represented by the process environment, thereby realizing the integration of multiple power Internet of Things applications on the power Internet of Things operating system.

[0078] It can be understood that corresponding process environments are created for different power Internet of Things applications, so that the processes corresponding to different power Internet of Things applications are different from each other, thereby obtaining multiple processes, and the number of the multiple processes is the same as the number of multiple power Internet of Things applications.

[0079] S360. For a current process that is currently in a running state among multiple processes, when the current process is completed, determine the next process to be run from the multiple processes.

[0080] The current process may be understood as a process that is currently in operation among multiple processes. When the process is completed, the next process to be executed may be determined from the multiple processes to implement process switching.

[0081] S370. Take the next process as the current process, and run the corresponding power Internet of Things application on the current process using the resources allocated to the process environment corresponding to the current process.

[0082] Among them, there is a one-to-one correspondence between multiple power Internet of Things applications, multiple process environments and multiple processes.

[0083] On this basis, the next process is taken as the current process, that is, the next process is switched to the current process, and then on the current process, the resources allocated to the process environment corresponding to the current process are used to run the power Internet of Things application corresponding to the process environment.

[0084] According to the technical solution of the embodiment of the present invention, there is a corresponding relationship between multiple processes and multiple power Internet of Things applications, and the sequential operation of each power Internet of Things application is achieved through process switching.

[0085] An optional technical solution for determining a next process to be run from among multiple processes includes:

[0086] For each of the plurality of processes, determining a current virtual run time of the process if the process is to be run next;

[0087] A next process is determined from the plurality of processes according to the obtained total current virtual running time.

[0088] For each of the multiple processes, it is assumed that the process is the next process, and the current virtual running time of the process is determined. Then, the queueing order of each process is adjusted according to the obtained current virtual running time, and the next process is determined from the multiple processes according to the adjusted queueing order.

[0089] The above technical solution realizes accurate determination of the next process by applying the current virtual running time.

[0090] On this basis, optionally, determining the current virtual running time of the process when the process is taken as the next process to be run next includes:

[0091] Get the last virtual running time of the process when it was last scheduled, the actual running time of the process since the last time the process was scheduled, and the weight of the process, where the weight is related to the priority of the process;

[0092] The current virtual running time of the process is determined according to the previous virtual running time, the actual running time, and the weight, when the process is taken as the next process to be run next.

[0093] For each process, obtain the last virtual runtime vruntime of the process when the process was last scheduled. old ; Get the actual running time delta of the process since the last time the process was scheduled; Get the weight weight of the process, which is related to the priority of the process, for example, it may be inversely proportional.

[0094] Further, according to vruntime old , delta, and weight can determine the current virtual runtime vruntime of the process new For example, you can use vruntime oldThe sum of the result and the target formula is used as vruntime new , the target formula can be the ratio of delta to weight, that is:

[0095]

[0096] The above technical solution realizes the accurate determination of the current virtual running time.

[0097] On this basis, optionally, the above-mentioned power Internet of Things application integration method further includes:

[0098] After obtaining the current virtual running time corresponding to each process, the priorities of all processes are updated respectively according to all the obtained current virtual running times.

[0099] Among them, the priorities of all processes are updated respectively according to all current virtual running times, so that when the next process is determined next time, the current virtual running time corresponding to each process can be accurately determined, that is, the current virtual running time corresponding to each process can be accurately updated.

[0100] Figure 5 It is a flowchart of another method for integrating electric power Internet of Things applications provided in an embodiment of the present invention. This embodiment is optimized based on the above-mentioned technical solutions. In this embodiment, optionally, using resources to run the electric power Internet of Things application includes: obtaining multiple real-time tasks generated for the electric power Internet of Things application, and scheduling multiple real-time tasks; using resources, according to the scheduling results of multiple real-time tasks, running multiple real-time tasks. Among them, the explanations of the terms that are the same as or corresponding to the above-mentioned embodiments are not repeated here.

[0101] See also Figure 5 The method of this embodiment may specifically include the following steps:

[0102] S410. For the power Internet of Things operating system to be integrated with multiple power Internet of Things applications, create multiple virtual machines on the power Internet of Things operating system.

[0103] S420. For each power Internet of Things application among the multiple power Internet of Things applications, determine a target virtual machine for deploying the power Internet of Things application from the multiple virtual machines, wherein different power Internet of Things applications are deployed on different virtual machines respectively.

[0104] S430. Deploy the power Internet of Things application in the form of a container on the target virtual machine.

[0105] S440. On the target virtual machine, create a process environment for the electric power Internet of Things application, wherein the process environments corresponding to different electric power Internet of Things applications are different.

[0106] S450. Allocate resources to the process environment according to the resource requirements of the power Internet of Things application during operation, and execute the following two steps on the process represented by the process environment, thereby realizing the integration of multiple power Internet of Things applications on the power Internet of Things operating system.

[0107] S460. Obtain multiple real-time tasks generated for the power Internet of Things application and schedule the multiple real-time tasks.

[0108] Among them, since the real-time task has a relatively high requirement for real-time performance, the real-time task is scheduled here. Specifically, multiple real-time tasks generated for the power Internet of Things application are obtained, that is, multiple real-time tasks generated to realize the corresponding functions of the power Internet of Things application are obtained, and the multiple real-time tasks are scheduled to realize the operation of the multiple real-time tasks, thereby realizing the corresponding functions.

[0109] S470. Utilize resources and run the multiple real-time tasks according to the scheduling results of the multiple real-time tasks.

[0110] Among them, the resources pre-allocated to the process environment corresponding to the power Internet of Things application are used to run the multiple real-time tasks according to the scheduling results of the multiple real-time tasks, so as to realize the corresponding function.

[0111] In conjunction with the application scenarios that may be involved in the embodiments of the present invention, optionally, the real-time task has an error handling mechanism. During the operation of the real-time task, the running time of the real-time task can be monitored, and the task can be restarted or adjusted when necessary to prevent the real-time task from occupying the CPU for a long time, thereby causing the system to become unresponsive.

[0112] The technical solution of the embodiment of the present invention schedules multiple real-time tasks generated to realize the corresponding functions of the power Internet of Things application, and then uses the resources allocated to the process environment corresponding to the power Internet of Things application to run the multiple real-time tasks according to the scheduling results, thereby realizing the corresponding functions.

[0113] An optional technical solution for scheduling multiple real-time tasks includes:

[0114] Obtain the priority of each real-time task among multiple real-time tasks respectively;

[0115] Schedule multiple real-time tasks sequentially based on all the priorities obtained.

[0116] The priority of each real-time task is obtained respectively, and then multiple real-time tasks can be scheduled in sequence according to all the priorities obtained. For example, the real-time task with a high priority is scheduled first to run first, and the real-time task with a low priority is suspended during the running process of the real-time task with a high priority.

[0117] On this basis, combined with the application scenarios that may be involved in the embodiments of the present invention, optionally, during the operation of a real-time task X, if a real-time task Y with a higher priority comes into the task queue, the real-time task X can be stopped and the real-time task Y can be started, thereby ensuring that the real-time task with a higher priority can be run first. Optionally, the priority of each real-time task can be dynamically adjusted according to the scheduling requirements of each real-time task, thereby improving the flexibility of scheduling each real-time task.

[0118] The above technical solution can schedule each real-time task according to the priority order of each real-time task, thereby ensuring that the real-time task with a higher priority is run first.

[0119] On this basis, optionally, the above-mentioned scheduling of multiple real-time tasks also includes:

[0120] When there are at least two tasks of the same level with the same priority among the multiple real-time tasks, respectively set a scheduling duration for each of the at least two tasks of the same level;

[0121] According to all priorities obtained, multiple real-time tasks are scheduled sequentially, including:

[0122] Multiple real-time tasks are scheduled sequentially according to all priorities obtained and all scheduling durations set.

[0123] The at least two tasks of the same level can be understood as real-time tasks with the same priority among the multiple real-time tasks. In order to ensure the sequential scheduling of the at least two tasks of the same level, the scheduling duration can be set for the at least two tasks of the same level respectively, so that the at least two tasks of the same level can be scheduled in turn according to the scheduling duration.

[0124] Specifically, for all real-time tasks, the real-time tasks can be scheduled according to their priorities first. Then, when at least two tasks of the same level with the same priority are scheduled, the tasks of the same level can be polled and scheduled according to the scheduling duration set for each task of the same level so that they can take turns to obtain CPU time, thereby ensuring that each real-time task with the same priority obtains CPU time fairly.

[0125] Figure 6This is a structural block diagram of a power Internet of Things application integration device provided in an embodiment of the present invention, and the device is used to execute the power Internet of Things application integration method provided in any of the above embodiments. The device and the power Internet of Things application integration method of the above embodiments belong to the same inventive concept. For details not fully described in the embodiment of the power Internet of Things application integration device, please refer to the embodiment of the above power Internet of Things application integration method. Figure 6 The device may specifically include: a virtual machine creation module 510, a target virtual machine determination module 520, and a power Internet of Things application deployment module 530.

[0126] A virtual machine creation module 510 may be used to create multiple virtual machines on a power Internet of Things operating system to be integrated with multiple power Internet of Things applications;

[0127] The target virtual machine determination module 520 may be used to determine, for each of the plurality of power Internet of Things applications, a target virtual machine for deploying the power Internet of Things application from the plurality of virtual machines, wherein different power Internet of Things applications are respectively deployed on different virtual machines;

[0128] The power Internet of Things application deployment module 530 can be used to deploy the power Internet of Things application in the form of a container on a target virtual machine to achieve integration of multiple power Internet of Things applications on the power Internet of Things operating system.

[0129] Optionally, the above-mentioned power Internet of Things application integration device further includes:

[0130] A process environment creation module may be used to create a process environment for the power Internet of Things application on the target virtual machine after the power Internet of Things application is deployed on the target virtual machine in the form of a container, wherein the process environments corresponding to different power Internet of Things applications are different from each other;

[0131] The resource allocation module is used to allocate resources to the process environment according to the resource requirements during the operation of the power Internet of Things application, so as to use the resources to run the power Internet of Things application on the process represented by the process environment.

[0132] On this basis, optionally, the above-mentioned power Internet of Things application integration device further includes:

[0133] The next process determination module can be used for different power Internet of Things applications to correspond to different processes. For the current process currently in operation among multiple processes, when the current process is completed, the next process to be run is determined from the multiple processes;

[0134] The power Internet of Things application running module can be used to take the next process as the current process, and run the corresponding power Internet of Things application on the current process using the resources allocated to the process environment corresponding to the current process.

[0135] On this basis, optionally, the next process determination module may include:

[0136] The current virtual running time determination submodule may be used to determine, for each of the plurality of processes, the current virtual running time of the process when the process is taken as the next process to be run next;

[0137] The next process determination submodule can be used to determine the next process from multiple processes according to the obtained total current virtual running time.

[0138] On this basis, optionally, the current virtual runtime determination submodule may include:

[0139] A weight acquisition unit, used to acquire the last virtual running time of the process when the process was last scheduled, the actual running time of the process since the last scheduling of the process, and the weight of the process, wherein the weight is related to the priority of the process;

[0140] The current virtual running time determining unit is used to determine the current virtual running time of the process when the process is taken as the next process to be run next according to the previous virtual running time, the actual running time and the weight.

[0141] On this basis, optionally, the above-mentioned power Internet of Things application integration device also includes:

[0142] The priority updating module is used to update the priorities of all processes respectively according to all the current virtual running times obtained after obtaining the current virtual running time corresponding to each process.

[0143] Alternatively, the resource allocation module may include:

[0144] A real-time task scheduling submodule is used to obtain multiple real-time tasks generated for power Internet of Things applications and schedule multiple real-time tasks;

[0145] The real-time task running submodule is used to utilize resources and run multiple real-time tasks according to the scheduling results of multiple real-time tasks.

[0146] On this basis, optional real-time task scheduling submodules may include:

[0147] A priority acquisition unit, used to respectively acquire the priority of each real-time task in the plurality of real-time tasks;

[0148] The real-time task scheduling unit can be used to sequentially schedule multiple real-time tasks according to all the priorities obtained.

[0149] On this basis, the optional real-time task scheduling submodule may also include:

[0150] A scheduling duration setting unit, used for setting a scheduling duration for each of the at least two tasks of the same level in the case where there are at least two tasks of the same level with the same priority among the multiple real-time tasks;

[0151] Real-time task scheduling unit, specifically used for:

[0152] Multiple real-time tasks are scheduled sequentially according to all priorities obtained and all scheduling durations set.

[0153] The power Internet of Things application integration device provided in the embodiment of the present invention, through the virtual machine creation module, for the power Internet of Things operating system to be integrated with multiple power Internet of Things applications, creates multiple virtual machines on the power Internet of Things operating system, and each virtual machine is independent of each other; then, through the target virtual machine determination module, for each power Internet of Things application in multiple power Internet of Things applications, a target virtual machine for deploying the power Internet of Things application can be determined from multiple virtual machines, and different power Internet of Things applications are deployed on different virtual machines, thereby improving the scalability of the power Internet of Things application; then, through the power Internet of Things application deployment module, the power Internet of Things application is deployed on the target virtual machine in the form of a container, so that after each power Internet of Things application is deployed, multiple power Internet of Things applications are effectively integrated on the power Internet of Things operating system. The above device, through the effective combination of virtualization and containerization, realizes the efficient integration of power Internet of Things applications on the unified platform of the power Internet of Things operating system.

[0154] The power Internet of Things application integration device provided in the embodiment of the present invention can execute the power Internet of Things application integration method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0155] It is worth noting that in the embodiment of the above-mentioned power Internet of Things application integration device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0156] Figure 7A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0157] like Figure 7 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0158] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0159] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the power Internet of Things application integration method.

[0160] In some embodiments, the power Internet of Things application integration method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the power Internet of Things application integration method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the power Internet of Things application integration method in any other appropriate manner (e.g., by means of firmware).

[0161] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0162] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0163] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0164] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0165] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0166] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0167] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0168] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for integrating power Internet of Things applications, characterized in that: include: For a power Internet of Things operating system to be integrated with multiple power Internet of Things applications, create multiple virtual machines on the power Internet of Things operating system; For each of the plurality of power Internet of Things applications, determining a target virtual machine for deploying the power Internet of Things application from the plurality of virtual machines, wherein different power Internet of Things applications are respectively deployed on different virtual machines; The power Internet of Things application is deployed on the target virtual machine in the form of a container to achieve integration of multiple power Internet of Things applications on the power Internet of Things operating system.

2. The method according to claim 1, characterized in that After deploying the power Internet of Things application in the form of a container on the target virtual machine, the method further includes: On the target virtual machine, creating a process environment for the electric power Internet of Things application, wherein the process environments corresponding to different electric power Internet of Things applications are different from each other; According to the resource requirements of the power Internet of Things application during operation, resources are allocated to the process environment so as to use the resources to run the power Internet of Things application on the process represented by the process environment.

3. The method according to claim 2, characterized in that Different power Internet of Things applications correspond to different processes respectively, and the method further includes: For a current process currently in a running state among the multiple processes, when the current process is completed, determining a next process to be run next from the multiple processes; The next process is used as the current process, and the corresponding power Internet of Things application is run on the current process using the resources allocated to the process environment corresponding to the current process.

4. The method according to claim 3, characterized in that Determining the next process to be run next from the plurality of processes comprises: For each of the plurality of processes, determining a current virtual running time of the process when the process is taken as a next process to be run next; The next process is determined from the plurality of processes according to the obtained total current virtual running time.

5. The method according to claim 4, characterized in that The determining of the current virtual running time of the process when the process is used as the next process to be run next comprises: Obtaining the last virtual running time of the process when the process was last scheduled, the actual running time of the process since the process was last scheduled, and the weight of the process, wherein the weight is related to the priority of the process; The current virtual running time of the process is determined according to the previous virtual running time, the actual running time and the weight, when the process is taken as the next process to be run next.

6. The method according to claim 5, characterized in that Also includes: After the current virtual running time corresponding to each of the processes is obtained, the priorities of all the processes are updated respectively according to all the obtained current virtual running times.

7. The method according to claim 2, characterized in that The utilizing the resources to run the electric power Internet of Things application includes: Acquire multiple real-time tasks generated for the power Internet of Things application, and schedule the multiple real-time tasks; The resources are utilized to run the multiple real-time tasks according to the scheduling results of the multiple real-time tasks.

8. The method according to claim 7, characterized in that The scheduling of the plurality of real-time tasks comprises: Respectively obtaining the priority of each of the plurality of real-time tasks; The plurality of real-time tasks are scheduled sequentially according to all the acquired priorities.

9. The method according to claim 8, characterized in that The scheduling of the plurality of real-time tasks further includes: When there are at least two tasks of the same level with the same priority among the plurality of real-time tasks, respectively setting a scheduling duration for each of the at least two tasks of the same level; The sequentially scheduling the plurality of real-time tasks according to all the priorities obtained includes: The plurality of real-time tasks are scheduled sequentially according to all the priorities obtained and all the scheduling durations set.

10. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes the power Internet of Things application integration method as described in any one of claims 1-9.