Running arrangement method and device of application program
Patent Information
- Application Number
- CN202380092673.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-28
- Publication Date
- 2025-09-12
AI Technical Summary
The fixed distribution of service-oriented architecture on edge devices causes network and service management to be done manually, causing edge devices to operate inefficiently.
This paper proposes a running orchestration method for applications. By initializing multiple applications to be run and dividing them into real-time and non-real-time applications, real-time applications are run first, the remaining load and network resources of the edge device are calculated, and the operations are run according to the resources. non-real-time applications, and sort and optimize based on the application's dependency and priority on live data.
It improves the real-time performance and overall operating efficiency of edge devices, takes into account the real-time capabilities and operating efficiency of edge devices, and reduces computing complexity and network resource occupation.
Smart Images

Figure CN120641875A_ABST
Abstract
Description
Application program operation arrangement method and device Technical Field
[0001] The present invention mainly relates to the field of industrial digitalization, and in particular to a method and device for orchestrating the operation of an application program. Background Art
[0002] Service-oriented architecture is the future trend for edge devices. Services are the smallest functional units of edge devices and can be used to build complex applications. Applications are dispatched through a central data layer and use data connectivity services to retrieve data from field devices. However, service-oriented architectures are fixedly distributed to edge devices, requiring manual management of some networks and services, resulting in low edge device operational efficiency.
[0003] Summary of the Invention
[0004] In order to solve the above technical problems, the present invention provides a method and device for orchestrating the operation of an application program to improve the operating efficiency of edge devices.
[0005] To achieve the above-mentioned purpose, the present invention proposes a method for orchestrating the operation of applications for edge devices, the method comprising: initializing multiple applications to be run; dividing the multiple applications to be run into real-time applications and non-real-time applications, the real-time applications obtaining real-time field data from field devices, and the non-real-time applications obtaining non-real-time field data from field devices; giving priority to running the real-time applications, calculating the remaining load resources and network resources of the edge device, and running the non-real-time applications based on the remaining load resources and network resources. To this end, by giving priority to running real-time applications, the real-time performance of the edge device can be improved, while taking into account the current load resources and network resources to run non-real-time applications, the overall operating efficiency of the edge device can be improved, taking into account both the real-time capability and operating efficiency of the edge device.
[0006] Optionally, calculating the remaining load resources and network resources of the edge device and running the non-real-time application based on the remaining load resources and network resources includes: classifying the non-real-time application into field data-related applications and field data-independent applications, determining the priorities of the field data-related applications and field data-independent applications, and running the field data-related applications and field data-independent applications in order of priority based on the remaining load resources and network resources. To this end, by classifying the non-real-time application into field data-related applications and field data-independent applications, field data-independent applications do not need to occupy network resources, which can reduce computational complexity and further improve the operating efficiency of the edge device.
[0007] Optionally, the method further includes: if multiple non-real-time applications have the same priority, giving priority to the non-real-time application that occupies a larger load resource. To this end, by giving a higher priority to the non-real-time application with a larger load, the operating efficiency of the edge device can be further improved.
[0008] Optionally, the method includes allocating a data connector to the application, synchronizing the application with the data connector, and releasing the load resources occupied by the application and the network resources occupied by the data connector after the application completes execution. To this end, by allocating a data connector to the application, the application is enabled to obtain field data from the field device.
[0009] Optionally, the method includes: if remaining network resources are insufficient to allocate a non-real-time data connector to a field data-related application, lowering the priority of the field data-related application. Therefore, by lowering the priority of bandwidth-consuming field data-related applications when network resources are insufficient, the operating efficiency of the edge device can be further improved.
[0010] The present invention also proposes an application operation orchestration device for edge devices, the device comprising: an initialization module, initializing multiple applications to be run; a classification module, dividing the multiple applications to be run into real-time applications and non-real-time applications, the real-time applications obtaining real-time field data from field devices, and the non-real-time applications obtaining non-real-time field data from field devices; an operation module, giving priority to running the real-time applications, calculating the remaining load resources and network resources of the edge device, and running the non-real-time applications based on the remaining load resources and network resources.
[0011] Optionally, the running module calculates the remaining load resources and network resources of the edge device, and runs the non-real-time application according to the remaining load resources and network resources, including: dividing the non-real-time application into field data-related applications and field data-independent applications, determining the priorities of the field data-related applications and field data-independent applications, and running the field data-related applications and field data-independent applications in order of priority according to the remaining load resources and network resources.
[0012] Optionally, the device includes: if multiple non-real-time applications have the same priority, preferentially running the non-real-time application that occupies a larger load resource.
[0013] Optionally, the device includes: allocating a data connector to the application, synchronizing the application and the data connector, and releasing the load resources occupied by the application and the network resources occupied by the data connector after the application is executed.
[0014] Optionally, the apparatus includes: if the remaining network resources are insufficient to allocate a non-real-time data connector to the field data related application, lowering the priority of the field data related application.
[0015] The present invention also provides an edge device, characterized in that the edge device is configured to execute the method described above.
[0016] The present invention further provides an electronic device, comprising a processor, a memory, and instructions stored in the memory, wherein the instructions implement the method described above when executed by the processor.
[0017] The present invention also provides a computer-readable storage medium having computer instructions stored thereon. When the computer instructions are executed, the method described above is executed.
[0018] The present invention also provides a computer program product, characterized in that it includes a computer program, and when the computer program is executed by a processor, the method described above is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The following drawings are only intended to illustrate and explain the present invention, and do not limit the scope of the present invention.
[0020] FIG1 is a flowchart of an operation scheduling method according to an embodiment of the present invention;
[0021] FIG2 is a schematic diagram of a state of an operation scheduling method according to an embodiment of the present invention;
[0022] FIG3 is a schematic diagram of another state of a running scheduling method according to an embodiment of the present invention;
[0023] FIG4 is a schematic diagram of an operation scheduling device according to an embodiment of the present invention;
[0024] FIG5 is a schematic diagram of an electronic device according to an embodiment of the present invention.
[0025] DESCRIPTION OF REFERENCE NUMERALS 100 Execution orchestration method 110 - 130 Steps 21 Field device 211 Robotic arm 212 AGV 213 CNC machine tool 214 First camera 215 Second camera 216 Third camera 22 Real-time data connector 221 First real-time data connector 222 Second real-time data connector 223 Third real-time data connector 23 Non-real-time data connector 231 First non-real-time data connector 232 Second non-real-time data connector 233 Third non-real-time data connector 24 Data bus 251 First application 252 Second application 252A First subprogram 252B Second subprogram 252C Third subprogram 253 Third application 254 Fourth application 400 Execution orchestration apparatus 410 Initialization module 420 Classification module 430 Operation module 500 Electronic device 510 Processor 520 Memory DETAILED DESCRIPTION
[0026] In order to have a clearer understanding of the technical features, purposes and effects of the present invention, specific embodiments of the present invention are now described with reference to the accompanying drawings.
[0027] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0028] As used in this application and the claims, unless the context clearly indicates otherwise, the words "a," "an," "an," and / or "the" are not intended to refer to the singular but may include the plural. Generally speaking, the terms "comprises" and "include" only indicate the inclusion of the steps and elements specifically identified, and these steps and elements do not constitute an exclusive list. A method or apparatus may also include other steps or elements.
[0029] The present invention proposes a method for orchestrating the operation of an application program for an edge device. FIG1 is a flowchart of an operation orchestration method 100 according to an embodiment of the present invention. As shown in FIG1 , the method 100 includes:
[0030] Step 110: Initialize multiple application programs to be run.
[0031] Multiple applications are deployed on edge devices to perform specific tasks. These applications can be obtained from cloud-based app stores. These applications can include video applications, computing applications, and display applications. Initializing these applications involves configuring their initial operating parameters and priority.
[0032] Step 120 , the multiple applications to be run are divided into real-time applications and non-real-time applications. The real-time applications obtain real-time field data from the field devices, and the non-real-time applications obtain non-real-time field data from the field devices.
[0033] Applications are categorized as real-time apps and non-real-time apps based on whether they use real-time data. Real-time apps acquire real-time data from field devices, while non-real-time apps acquire non-real-time data from field devices. For example, a real-time app might be a motion control app, which acquires real-time data such as the position, posture, torque, and contact force of a robotic arm. A non-real-time app might be a video surveillance app, which acquires non-real-time image data captured by a camera.
[0034] Figure 2 is a schematic diagram of a state of an operation orchestration method according to an embodiment of the present invention. As shown in Figure 2, application 251 is a real-time application. Application 251 obtains real-time field data such as position, posture, obstacle distance, and load from AGV 212 through data bus 24 and the second real-time data connector 222. Application 251 processes and analyzes the data received in real time, generates control instructions, and sends the control instructions to AGV 212 through data bus 24 and the second real-time data connector 222. Application 253 is a non-real-time application. Non-real-time application 253 obtains non-real-time image data from the third camera 216 through data bus 24 and the third non-real-time data connector 233. Non-real-time application 253 analyzes and processes the image data, for example, marking suspected fault points in the image.
[0035] Step 130 : Prioritize running real-time applications, calculate the remaining load resources and network resources of the edge device, and run non-real-time applications based on the remaining load resources and network resources.
[0036] Real-time applications require real-time data from field devices and have high requirements for the real-time nature of the data. Giving priority to running real-time applications can improve the real-time performance of edge devices. Specifically, a real-time data connector is allocated to the real-time application, that is, network resources are allocated to the real-time application, and the real-time application and the real-time data connector are synchronized, that is, the application and the real-time data connector are synchronized to the same transceiver frequency. For example, the transceiver cycle of the real-time application is 2ms, and the transceiver cycle of the real-time data connector is 4ms. The transceiver cycle of the real-time data connector is reduced to 2ms. Load resources, that is, CPU computing resources, are then allocated to the real-time application. For multiple real-time applications, they can be run in the order of priority of each real-time application, and the priority of each real-time application can be determined during initialization.
[0037] The remaining load resources and network resources of the edge device can be calculated according to the following formula:
[0038] Among them, W R Represents the remaining load resources of the edge device, W T Represents the total load resources of edge devices, W rtApp represents the load resources consumed by the real-time application, N R Indicates the remaining network resources of the edge device, N T Represents the total network resources of the edge device, N rtApp represents the network resources consumed by real-time applications, and r represents the total number of real-time applications.
[0039] After calculating the remaining load resources and network resources, non-real-time applications are run according to the remaining load resources and network resources. By giving priority to running real-time applications, the real-time performance of edge devices can be improved. At the same time, considering the current load resources and network resources to run non-real-time applications, the overall operating efficiency of edge devices can be improved, taking into account both the real-time performance and operating efficiency of edge devices.
[0040] In some embodiments, calculating the remaining load resources and network resources and running non-real-time applications based on the remaining load resources and network resources includes: classifying the non-real-time applications into field data-related applications and field data-independent applications, determining the priorities of the field data-related applications and field data-independent applications, and running the field data-related applications and field data-independent applications in order of priority based on the remaining load resources and network resources. Specifically, based on whether or not they use field data, non-real-time applications can be classified into field data-related applications (apps with data association) and field data-independent applications (apps without data association). Field data-related applications require the use of field data, such as video surveillance applications that require the use of image data captured by a camera, while field data-independent applications do not require the use of field data, such as alarm applications that issue alarms when a calculation error occurs on an edge device or the edge device temperature is too high. The priorities of field data-related applications and field data-independent applications can be determined during initialization, and the field data-related applications and field data-independent applications can be run in descending order of priority based on the remaining load resources and network resources. To this end, non-real-time applications are divided into field data-related applications and field data-independent applications. Field data-independent applications do not need to occupy network resources, which can reduce the complexity of calculations and further improve the operating efficiency of edge devices.
[0041] As shown in Figure 2 , application 253 is a field data-dependent application. Application 253 acquires image data from third camera 216 via data bus 24 and third non-real-time data connector 233. Application 254 is a field data-independent application that acquires field data from field devices without consuming network resources. Application 252 has three sub-applications: sub-application 252A (real-time application), sub-application 252B (field data-independent application), and sub-application 252C (field data-dependent application).
[0042] In some embodiments, the method includes: if multiple non-real-time applications have the same priority, giving priority to running the non-real-time application that occupies a larger load resource. Figure 3 is a schematic diagram of another state of an operation orchestration method according to an embodiment of the present invention. As shown in Figure 3, application 253 requires more load resources than sub-application 252C. If sub-application 252C has the same priority as application 253, application 253 is run first, that is, the load resources of application 253 are increased (from a dotted line to a solid line). To this end, by giving non-real-time applications with larger loads a higher priority, the operating efficiency of the edge device can be further improved.
[0043] In some embodiments, the method includes: allocating a data connector to an application, synchronizing the application and the data connector, and releasing the load resources occupied by the application and the network resources occupied by the data connector after the application completes execution. Specifically, as shown in Figure 2, a real-time data connector 222 is allocated to a real-time application 251, synchronizing the real-time application 251 and the real-time data connector 222, and releasing the load resources occupied by the synchronized real-time application 251 and the network resources occupied by the data connector 222 after the real-time application 251 completes execution. Furthermore, a non-real-time data connector 233 is allocated to a field data-related application 253, synchronizing the field data-related application 253 and the non-real-time data connector 233, and releasing the load resources occupied by the field data-related application 253 and the network resources occupied by the non-real-time data connector 233 after the field data-related application 253 completes execution. Therefore, by allocating data connectors to applications, the applications are able to obtain field data from field devices.
[0044] In some embodiments, the method includes lowering the priority of field data-related applications if remaining network resources are insufficient to allocate a non-real-time data connector to the application. As shown in Figure 2 , if field data-related application 252C requires 256 bps of network resources but only 128 bps is available, the priority of field data-related application 252C is lowered until sufficient network resources are available. Therefore, by lowering the priority of bandwidth-consuming field data-related applications when network resources are insufficient, the operational efficiency of edge devices can be further improved.
[0045] As a non-limiting example, when initializing applications in edge devices, real-time applications are run first, which can ensure the real-time performance of the edge devices. For non-real-time applications, field data-related applications and field data-independent applications are distinguished, and field data-independent applications do not need to occupy network resources. Field data-related applications and field data-independent applications are run in order of priority based on the remaining load resources and network resources. If the priorities are the same, non-real-time applications that occupy larger load resources are run first. If the remaining network resources are not sufficient to support non-real-time applications, the priority of the non-real-time applications is lowered until there are sufficient network resources. The edge device dynamically executes the dynamic orchestration method of applications, that is, periodically executes the dynamic orchestration method of applications.
[0046] An embodiment of the present invention provides a method for orchestrating the operation of applications for edge devices. By giving priority to running real-time applications, the real-time performance of edge devices can be improved. At the same time, taking into account the current load resources and network resources to run non-real-time applications, the overall operating efficiency of edge devices can be improved, taking into account both the real-time capabilities and operating efficiency of edge devices.
[0047] The present invention further provides an operation orchestration device for an application on an edge device. FIG4 is a schematic diagram of an operation orchestration device 400 according to an embodiment of the present invention. As shown in FIG4 , the device 400 includes:
[0048] Initialization module 410, initializing multiple applications to be run;
[0049] A classification module 420 classifies the plurality of applications to be run into real-time applications and non-real-time applications, wherein the real-time applications obtain real-time field data from the field devices and the non-real-time applications obtain non-real-time field data from the field devices;
[0050] The running module 430 gives priority to running real-time applications, calculates the remaining load resources and network resources of the edge device, and runs non-real-time applications based on the remaining load resources and network resources.
[0051] In some embodiments, the running module calculates the remaining load resources and network resources of the edge device, and running non-real-time applications based on the remaining load resources and network resources includes: dividing the non-real-time applications into field data-related applications and field data-independent applications, determining the priorities of field data-related applications and field data-independent applications, and running field data-related applications and field data-independent applications in order of priority from high to low based on the remaining load resources and network resources.
[0052] In some embodiments, the device includes: if multiple non-real-time applications have the same priority, giving priority to running the non-real-time application that occupies more load resources.
[0053] In some embodiments, the device includes: allocating a data connector to an application, synchronizing the application and the data connector, and releasing the load resources occupied by the application and the network resources occupied by the data connector after the application is executed.
[0054] In some embodiments, the apparatus includes lowering the priority of the field data related application if the remaining network resources are insufficient to allocate the non-real-time data connector to the field data related application.
[0055] The present invention also provides an edge device, which is configured to execute the method 100 described above.
[0056] The present invention also provides an electronic device 500. FIG5 is a schematic diagram of an electronic device 500 according to an embodiment of the present invention. As shown in FIG5 , the electronic device 500 includes a processor 510 and a memory 520. The memory 520 stores instructions, wherein the instructions, when executed by the processor 510, implement the method 100 described above.
[0057] The present invention further provides a computer-readable storage medium having computer instructions stored thereon. When the computer instructions are executed, the method 100 described above is executed.
[0058] The present invention further provides a computer program product, comprising a computer program, which implements the method 100 described above when the computer program is executed by a processor.
[0059] The present invention further provides a computer program product, comprising a computer program, which implements the method 100 described above when the computer program is executed by a processor.
[0060] Some aspects of the methods and apparatus of the present invention may be performed entirely by hardware, entirely by software (including firmware, resident software, microcode, etc.), or by a combination of hardware and software. The above hardware or software may be referred to as "data blocks," "modules," "engines," "units," "components," or "systems." The processor may be one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DAPDs), programmable logic devices (PLCs), field programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, or combinations thereof. In addition, various aspects of the present invention may be embodied as computer products in one or more computer-readable media, the product including computer-readable program code. For example, computer-readable media may include, but are not limited to, magnetic storage devices (e.g., hard disks, floppy disks, tapes, etc.), optical disks (e.g., compact disks (CDs), digital versatile disks (DVDs), etc.), smart cards, and flash memory devices (e.g., cards, sticks, key drives, etc.).
[0061] Flowcharts are used herein to illustrate the operations performed by the methods according to the embodiments of the present application. It should be understood that the preceding operations are not necessarily performed in exact order. Instead, the various steps may be performed in reverse order or simultaneously. Furthermore, other operations may be added to these processes, or one or more operations may be removed from these processes.
[0062] It should be understood that although this specification is described according to various embodiments, not every embodiment contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.
[0063] The above description is only an illustrative embodiment of the present invention and is not intended to limit the scope of the present invention. Any equivalent changes, modifications and combinations made by those skilled in the art without departing from the concept and principle of the present invention shall fall within the scope of protection of the present invention.
Claims
1. A method (100) for arranging the operation of an application program for an edge device, characterized in that: The method (100) comprises: Initialize multiple applications to be run (110); Dividing the plurality of applications to be run into real-time applications and non-real-time applications, wherein the real-time applications acquire real-time field data from field devices, and the non-real-time applications acquire non-real-time field data from field devices (120); The real-time application is run preferentially, the remaining load resources and network resources of the edge device are calculated, and the non-real-time application is run according to the remaining load resources and network resources (130).
2. The method (100) for arranging the operation of an application according to claim 1, characterized in that: Calculating the remaining load resources and network resources of the edge device, and running the non-real-time application according to the remaining load resources and network resources includes: dividing the non-real-time application into field data-related applications and field data-independent applications, determining the priorities of the field data-related applications and the field data-independent applications, and running the field data-related applications and the field data-independent applications in order of priority according to the remaining load resources and network resources.
3. The method (100) for arranging the operation of an application according to claim 2, characterized in that: The method (100) further comprises: if a plurality of non-real-time applications have the same priority, the non-real-time application that occupies a larger load resource is run preferentially.
4. The method (100) for arranging the operation of an application according to claim 1, characterized in that: The method (100) comprises: allocating a data connector to an application, synchronizing the application and the data connector, and releasing the load resources occupied by the application and the network resources occupied by the data connector after the application is executed.
5. The method (100) for arranging the operation of an application program according to claim 2, characterized in that: The method (100) comprises: if the remaining network resources are insufficient to allocate a non-real-time data connector for the field data related application, lowering the priority of the field data related application.
6. A running arrangement device (400) for an application program of an edge device, characterized in that: The device (400) comprises: An initialization module (410) is used to initialize multiple application programs to be run; A classification module (420) is configured to classify the plurality of applications to be run into real-time applications and non-real-time applications, wherein the real-time applications obtain real-time field data from field devices, and the non-real-time applications obtain non-real-time field data from field devices; The running module (430) preferentially runs the real-time application, calculates the remaining load resources and network resources of the edge device, and runs the non-real-time application according to the remaining load resources and network resources.
7. The application program operation arrangement device (400) according to claim 6, characterized in that: The operation module (430) calculates the remaining load resources and network resources of the edge device, and operates the non-real-time application according to the remaining load resources and network resources, including: dividing the non-real-time application into field data-related applications and field data-independent applications, determining the priorities of the field data-related applications and the field data-independent applications, and operating the field data-related applications and the field data-independent applications in order of priority according to the remaining load resources and network resources.
8. The application program operation arrangement device (400) according to claim 7, characterized in that: The device (400) comprises: if multiple non-real-time applications have the same priority, the non-real-time application that occupies more load resources is run first.
9. The application program operation arrangement device (400) according to claim 6, characterized in that: The device (400) comprises: allocating a data connector to an application, synchronizing the application and the data connector, and releasing the load resources occupied by the application and the network resources occupied by the data connector after the application is executed.
10. The application program operation arrangement device (400) according to claim 7, characterized in that: The device (400) comprises: if the remaining network resources are insufficient to allocate a non-real-time data connector to the field data related application, then lowering the priority of the field data related application.
11. An edge device, characterized in that: The edge device is configured to perform the method (100) according to any one of claims 1-5.
12. An electronic device (500), comprising a processor (510), a memory (520), and instructions stored in the memory (520), wherein the instructions, when executed by the processor (510), implement the method according to any one of claims 1 to 5.
13. A computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions, when executed, perform the method (100) according to any one of claims 1 to 5.
14. A computer program product, characterized in that The method comprises a computer program, which, when executed by a processor, implements the method (100) according to any one of claims 1 to 5.