Method and apparatus for operating edge device, storage medium and electronic device
Patent Information
- Application Number
- CN202310677939.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-08
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2043-06-08
AI Technical Summary
[0005]本申请实施例提供了一种边缘设备的运行方法和装置、存储介质及电子设备以及计算机程序产品,以至少解决相关技术中的边缘设备的运行方法存在算法部署效率低且工作量大的问题
[0010]根据本申请的又一个实施例,还提供了一种计算机程序产品,包括计算机程序,其特征在于,所述计算机程序被处理器执行时实现上述任一项方法实施例中的步骤。
Smart Images

Figure CN117008992B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and more specifically, to a method and apparatus for operating an edge device, a storage medium, and an electronic device. Background Technology
[0002] Edge devices are flexible, high-performance devices that can be deployed outside of data centers, close to the network edge of end users or service providers. For example, edge servers can be deployed at the edge of data centers or the Internet to provide application services such as delivery, storage, and networking, and can process local or real-time data streams.
[0003] Due to the diversity of edge scenarios and the density of edge devices, different processing algorithms need to be configured for edge devices in different application scenarios. Moreover, the number of edge devices is large, so it is quite difficult to deploy and run algorithms on a large number of edge devices in a short period of time.
[0004] This shows that the operation methods of edge devices in related technologies suffer from low algorithm deployment efficiency and high workload. Summary of the Invention
[0005] This application provides an edge device operation method and apparatus, storage medium and electronic device, and computer program product to at least solve the problems of low algorithm deployment efficiency and large workload in the operation methods of edge devices in related technologies.
[0006] According to one embodiment of this application, a method for operating an edge device is provided, comprising: loading an algorithm running image, wherein the algorithm running image is used to provide a running environment for a preset processing algorithm, the preset processing algorithm being used to process data transmitted by the access device of the edge device; loading a management platform image, wherein the management platform image is an image of a management platform used to control the access device of the edge device and the preset processing algorithm; starting an algorithm running container and a management platform container based on the algorithm running image and the management platform image, wherein the algorithm running container is a running instance started by the algorithm running image, and the management platform container is a running instance started by the management platform image; during the process of starting the algorithm running container and the management platform container, the algorithm project file of the preset processing algorithm is mapped into the algorithm running container and the management platform container respectively, so as to synchronize information between the algorithm running container and the management platform container.
[0007] According to another embodiment of this application, an operating apparatus for an edge device is provided, comprising: a first loading unit for loading an algorithm running image, wherein the algorithm running image is used to provide a running environment for a preset processing algorithm, and the preset processing algorithm is used to process data transmitted by the access device of the edge device; a second loading unit for loading a management platform image, wherein the management platform image is an image of a management platform used to control the access device of the edge device and the preset processing algorithm; a startup unit for starting an algorithm running container and a management platform container based on the algorithm running image and the management platform image, wherein the algorithm running container is a running instance started by the algorithm running image, and the management platform container is a running instance started by the management platform image; and a mapping unit for mapping the algorithm project file of the preset processing algorithm into the algorithm running container and the management platform container respectively during the startup of the algorithm running container and the management platform container, so as to synchronize information between the algorithm running container and the management platform container.
[0008] According to yet another embodiment of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and the computer program is configured to perform the steps in any of the above method embodiments when it is run.
[0009] According to yet another embodiment of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0010] According to yet another embodiment of this application, a computer program product is also provided, comprising a computer program, characterized in that the computer program, when executed by a processor, implements the steps in any of the above method embodiments.
[0011] The embodiments provided in this application load an algorithm runtime image to provide a runtime environment for a preset processing algorithm. This preset processing algorithm processes data transmitted from the access device of the edge device. Therefore, by loading the algorithm runtime image, the algorithm environment can be reconfigured on the edge device, improving the efficiency of algorithm environment configuration. Similarly, a management platform image is loaded to control the access device and the preset processing algorithm on the edge device. This avoids reconfiguring the management platform on the edge device, improving the efficiency of management platform configuration. Furthermore, directly starting the algorithm runtime container and management platform container based on the algorithm runtime image and management platform image provides a universally applicable solution. This system can be deployed on various edge devices, and during subsequent configuration and updates, only the image needs to be replaced to update the container configuration of each edge device. Preset processing algorithms are mapped to the algorithm execution container and the management platform container respectively, enabling both containers to obtain the same preset algorithm information, thus achieving information synchronization between containers. Therefore, by loading the image, a large number of edge devices can be configured simultaneously, and the processing algorithms for edge devices can be quickly configured based on the synchronized algorithm information between containers. This achieves the technical effect of improving the efficiency of deploying processing algorithms on a large number of edge devices, thereby solving the problems of low algorithm deployment efficiency and high workload in related edge device operation methods. Attached Figure Description
[0012] Figure 1 This is a schematic diagram of the operating system architecture of an optional edge device provided in an embodiment of this application;
[0013] Figure 2 This is a schematic diagram of the structure of an optional electronic device provided in an embodiment of this application;
[0014] Figure 3 This is a flowchart illustrating an optional operation method of an edge device according to an embodiment of this application;
[0015] Figure 4 This is a schematic diagram illustrating information updating of an optional edge device according to an embodiment of this application;
[0016] Figure 5 This is a schematic diagram of the structure of an optional edge device according to an embodiment of this application;
[0017] Figure 6 This is a schematic diagram of the overall process of an optional edge device operation method according to an embodiment of this application;
[0018] Figure 7 This is a structural block diagram of an optional edge device operating apparatus according to an embodiment of this application;
[0019] Figure 8This is a structural block diagram of a computer system for an optional electronic device according to an embodiment of this application. Detailed Implementation
[0020] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0021] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0022] This application provides an edge device operation method and apparatus, storage medium and electronic device, and computer program product, enabling rapid deployment of edge device processing algorithms. The following describes exemplary applications of the electronic device provided in this application. The electronic device provided in this application can be implemented as an edge server, laptop computer, tablet computer, desktop computer, set-top box, mobile device (e.g., mobile phone, portable music player, personal digital assistant, dedicated messaging device, portable gaming device), or other types of terminal devices, or as a server or other types of processing device. The following will describe exemplary applications when the device is implemented as an edge device.
[0023] According to one aspect of the embodiments of this application, a method for operating an edge device is provided. Optionally, in this embodiment, the above-described method for operating an edge device can be applied to, for example... Figure 1 The operating system of the edge device shown. For example... Figure 1As shown, the operating system 100 of the edge device may include: an edge device 101, a network 102, and an access device 103. To support the operation of an application on the edge device, the edge device 101 includes images (algorithm running image and management platform image) and containers (algorithm running container and management platform container). The algorithm running container is a running instance launched from the algorithm running image, and the management platform container is a running instance launched from the management platform image. The edge device 101 can connect to the access device 103 via the network 102. The network 102 may include, but is not limited to, at least one of the following: a wired network and a wireless network. The wired network may include, but is not limited to, at least one of the following: a wide area network (WAN), a metropolitan area network (MAN), and a local area network (LAN). The wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity) and Bluetooth.
[0024] Edge device 101 can load the algorithm runtime image and management platform container, and start the algorithm runtime container and management platform container based on the algorithm runtime image and management platform image. At the same time, the algorithm project files of the preset processing algorithm are mapped into the algorithm runtime container and management platform container respectively. Edge device 101 obtains the device information of access device 103 through network 102. In response to the file update information obtained from the management platform container, it synchronizes the file update information to the algorithm project file of the algorithm runtime container. The algorithm runtime container runs the processing algorithm of the corresponding access device based on the updated algorithm project file and obtains the configuration instruction. Edge device 101 sends the configuration instruction to access device 103 through network 102. Access device 103 receives the configuration instruction and completes the corresponding operation based on the configuration instruction.
[0025] Edge device 101 can be an independent physical device (e.g., a physical server), a device cluster (e.g., a server cluster) or a distributed system composed of multiple physical devices, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
[0026] The access device 103 can be an independent physical device, such as an external device like a camera, microphone, speaker, or earphone, or it can be implemented as various types of terminal devices such as smartwatches, smartphones, vehicle terminals, and drones.
[0027] Optionally, in this embodiment, the operation method of the aforementioned edge device can be as follows: Figure 2 The electronic device shown performs this action. (As shown in the image) Figure 2As shown, the electronic device 200 can be the aforementioned edge device 101 or access device 103. The electronic device 200 includes at least one processor 201, at least one network interface 202, a bus system 203, and a memory 204. The various components in the electronic device 200 are coupled together via the bus system 203. It is understood that the bus system 203 is used to implement communication between these components. In addition to a data bus, the bus system 203 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in… Figure 2 The general designated all buses as Bus System 203.
[0028] Processor 201 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0029] The memory 204 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 204 may optionally include one or more storage devices physically located away from the processor 201.
[0030] The memory 204 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 204 described in this application embodiment is intended to include any suitable type of memory.
[0031] In some embodiments, memory 204 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.
[0032] Operating system 2041 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, and driver layer, for implementing various basic business functions and handling hardware-based tasks.
[0033] The network communication module 2402 is used to reach other computing devices via one or more (wired or wireless) network interfaces 202, such as Bluetooth, WiFi, and Universal Serial Bus (USB).
[0034] In some embodiments, the apparatus provided in this application can be implemented in software. Figure 2 An operating device 2043 for an edge device stored in memory 204 is shown. This device can be software in the form of programs and plug-ins, and includes the following software units: a first loading unit, a second loading unit, a startup unit, and a mapping unit. These units are logically linked and can therefore be arbitrarily combined or further divided according to the functions implemented. The functions of each unit will be described below.
[0035] In some embodiments, the terminal or server can implement the edge device operation method provided in this application embodiment by running a computer program. For example, the computer program can be a native program or software module in an operating system; it can be a native application (APP), that is, a program that needs to be installed in the operating system to run; it can also be a small program, that is, a program that only needs to be downloaded into a browser environment to run; or it can be a small program that can be embedded into any APP. In short, the above-mentioned computer program can be any form of application, module or plugin.
[0036] Due to the diversity of edge scenarios and the density of edge devices such as cameras, the number of edge servers required is enormous. Therefore, the requirements for the configuration of the algorithm running environment and the deployment of algorithms are high, especially how to deploy hundreds or thousands of edge devices in a short period of time. In addition to deploying algorithms, edge devices also need to be managed through a deployment management platform to enable access devices such as cameras, microphones, and speakers, as well as to process and bind algorithms to access devices to achieve the operation management and status monitoring of algorithms in access devices.
[0037] In related technologies, an algorithm runtime environment is typically configured for each edge device, and access device information is obtained to run the corresponding algorithm on the access device. However, when there are a large number of edge devices, a variety of access devices, and a wide variety of required algorithms, the edge device runtime methods of these technologies are inefficient in configuring the algorithm runtime environment, and it is difficult to update, monitor, and manage the configured algorithms of a large number of edge devices simultaneously.
[0038] The embodiments provided in this application enable the loading of algorithm runtime images and management platform images into edge devices, and the direct configuration of algorithm runtime containers and management platform containers onto edge devices. This significantly improves the deployment efficiency of the algorithm runtime environment and management platform for edge devices. By mapping the algorithm project files of preset processing algorithms into the algorithm runtime container and management platform container respectively, algorithm information between containers can be synchronized. Thus, the management platform container can configure corresponding processing algorithms for different access devices and update the algorithm project files of preset processing algorithms. The algorithm runtime container runs the processing algorithms of the access devices according to the updated algorithm project files. Therefore, a large number of edge devices can be deployed quickly, and the processing algorithms of the access devices of the edge devices can be managed in real time.
[0039] Optionally, the above-described edge device operation method can be executed solely by edge device 101, jointly by access device 103 and edge device 101, or by other processing devices besides access device 103 and edge device 101. As an optional implementation, taking the edge device 101 executing the edge device operation method of this embodiment as an example, such as... Figure 3 As shown, the operation method of the above-mentioned edge device may include the following steps:
[0040] In step S301, the algorithm running image is loaded.
[0041] To deploy the runtime environment of a preset processing algorithm on an edge device, the edge device can load an algorithm runtime image corresponding to the preset processing algorithm. This algorithm runtime image provides the runtime environment for the preset processing algorithm, which is used to process the data to be processed transmitted by the edge device's access devices. Here, the runtime environment for the preset processing algorithm is an application program that executes the aforementioned preset processing algorithm. The access devices of the edge device can be, for example, microphones or cameras. The preset processing algorithms used to process the data to be processed transmitted by different access devices can be different, and the number of preset processing algorithms used to process the data to be processed transmitted by each access device can be one or more. This embodiment does not limit the preset processing algorithms, the access devices of the edge device, or the correspondence between the preset processing algorithms and the access devices.
[0042] In some embodiments, the image can be a Docker image (an application container engine). An image is a special file system that, in addition to providing the programs, libraries, resources, and configuration files required for container runtime, also includes configuration parameters (such as anonymous volumes, environment variables, and user information). Docker images allow for the rapid creation of multiple isolated running instances (i.e., Docker containers). Docker, as an application container engine, is widely used in application deployment due to its fast startup speed, near-native performance, and support for a large number of containers.
[0043] Here, the data files of the algorithm runtime environment can be mirrored to obtain the algorithm runtime image. The data files of the algorithm runtime environment can be pre-stored data files or downloaded from the network. The algorithm runtime environment can run at least one preset processing algorithm. The corresponding algorithm runtime environment can be configured according to the access device of the edge device. For example, the algorithm runtime environment can be Eclipse, Anocanda, NumPy, etc.
[0044] The preset processing algorithm can be an artificial intelligence (AI) algorithm, such as logistic regression, decision tree, neural network, etc.; an algorithm is an accurate and complete description of a solution, a series of clear instructions for solving a problem, and an algorithm represents a systematic approach to describing the strategy mechanism for solving a problem.
[0045] For example, in a camera scenario, the access device of the edge device can be an image acquisition device (e.g., a camera); the preset processing algorithm can be an image recognition algorithm to perform image recognition on the image and video data to be processed transmitted by the image acquisition device, and to label the objects in the image (video) based on the image recognition results.
[0046] The embodiments provided in this application enable the loading of algorithm runtime images for a large number of edge devices, so as to generate algorithm runtime containers corresponding to the images, thereby avoiding the need to reconfigure the algorithm runtime environment for each edge device and improving the deployment efficiency of the algorithm runtime environment.
[0047] In step S302, the management platform image is loaded.
[0048] To deploy a management platform on an edge device that controls the access devices and preset processing algorithms of the edge device, the edge device can load a management platform image corresponding to the management platform. This management platform image is an image of the management platform used to control the access devices and preset processing algorithms of the edge device. Here, the control performed by the management platform on the access devices of the edge device can include: adding, modifying, and deleting device information for the access devices. Controlling the preset processing algorithms can include: adding, modifying, and deleting processing algorithms bound to the access devices. This embodiment does not limit the control performed by the management platform on the access devices and preset processing algorithms of the edge device.
[0049] Here, the data files of the management platform can be mirrored to obtain a management platform image. The management platform can be a pre-stored application, software, plugin, etc., or it can be downloaded through the network. The management platform can be used to add access device information of edge devices, process algorithm information, and update relevant configuration information to the algorithm project file. When the algorithm runs, it reads the algorithm project file to realize the update and synchronization of configuration information.
[0050] The embodiments provided in this application enable the loading of management platform images onto a large number of edge devices, thereby generating management platform containers corresponding to the images. This avoids re-downloading or reconfiguring the management platform for each edge device, thus improving the deployment efficiency of the management platform.
[0051] In step S303, the algorithm running container and the management platform container are started based on the algorithm running image and the management platform image.
[0052] For the algorithm runtime image and management platform image loaded locally on the edge device, the algorithm runtime container and management platform container can be started separately based on the two. That is, the algorithm runtime container is started based on the algorithm runtime image, and the management platform container is started based on the management platform image. The algorithm runtime container is a running instance started from the algorithm runtime image, and the management platform container is a running instance started from the management platform image. The startup process of the algorithm runtime container and the management platform container can be executed simultaneously or sequentially.
[0053] Here, a single image can launch multiple containers. An image is similar to a read-only template on a host machine, belonging to an independent file system. Containers are instantiated from images; a container is a running instance (process), and an image is a file. For example, sample code in a file can be transformed into an online demo that users can actually view. This is called a running instance, allowing users to see the actual output of the code, making the data file more dynamic and instructive.
[0054] In some embodiments, a container can be started using the "docker run / " instruction; stopped using the "docker stop / " instruction; stopped using the "docker rm / " instruction; and a new image can be created using the "docker create / " instruction. The "-p" parameter is used to establish a one-to-one mapping between the host port and the container port, and the "-name" parameter is used to name the created container.
[0055] Through the embodiments provided in this application, Docker enables the rapid deployment and application of algorithm runtime environment and management platform in edge devices, achieving large-scale rapid configuration of edge devices and saving time and manpower costs. At the same time, by placing the algorithm runtime environment and management platform in different images, it is convenient to manage the application during container runtime, and image updates will not affect other images. Furthermore, by placing the algorithm project files on the host machine, updates to the algorithm model or program will not affect the image, facilitating updates and maintenance after the edge device is configured, and saving manpower and time costs for updates and maintenance.
[0056] In step S304, during the process of starting the algorithm running container and the management platform container, the algorithm project files of the preset processing algorithm are mapped into the algorithm running container and the management platform container respectively, so as to synchronize information between the algorithm running container and the management platform container.
[0057] The preset processing algorithm can be configured with a corresponding algorithm project file, which is a data file used to store the preset processing algorithm model and parameters. To ensure information synchronization, the algorithm project files of the preset processing algorithm can be mapped into the algorithm running container and the management platform container respectively during the startup of the algorithm running container and the management platform container. In this way, the algorithm running container and the management platform container can read and process the same algorithm project file, thus enabling information synchronization between the algorithm running container and the management platform container.
[0058] In some embodiments, the algorithm engineering files of the preset processing algorithm are pre-stored in the host machine or can be obtained in real time via the network. The algorithm engineering files include files or data such as algorithm running programs, algorithm parameters, and models. By mounting the directories of the algorithm engineering files in the host machine to the algorithm running container and the management platform container respectively, the algorithm engineering files of the preset processing algorithm can be mapped to the algorithm running container and the management platform container.
[0059] In some embodiments, the algorithm project files of the preset processing algorithm can also be mapped into the algorithm running container and the management platform container respectively through path mapping.
[0060] For example, by using the "docker run -v" instruction to map the " / root / code" path on the host machine to the " / data / code" path inside the container, the program code would be "docker run-it-v / root / code: / data / code xxx / bin / bush". Here, as mentioned earlier, " / root / code" is the path on the host machine, " / data / code" is the container path, and "xxx" is the complete path of the image corresponding to the container.
[0061] Docker deployment for multiple applications follows the single principle, meaning one container runs one main process. Therefore, the algorithm runtime environment and management platform are placed in different images. However, since both the algorithm and the platform need to access the edge device's access device, meaning the containers running the two applications need to share the host network, there is a technical problem in the related technologies of how to synchronize the access device and bound algorithm information added in the management platform to the algorithm runtime environment.
[0062] In the embodiments provided in this application, both the management platform container and the algorithm running container are mapped to the same preset processing algorithm's algorithm project file. After the management platform container changes the algorithm data or configures the access device of the edge device, it updates and saves the corresponding parameters to the algorithm project file on the host side. Thus, when the algorithm running container reads the updated algorithm project file, it can obtain the corresponding updated data or configuration parameters in real time to achieve information synchronization between the management platform container and the algorithm running container.
[0063] Through the steps described in this application embodiment, an algorithm runtime image is loaded, which provides a runtime environment for a preset processing algorithm. This preset processing algorithm processes the data to be processed transmitted by the access device of the edge device. A management platform image is also loaded, which is an image of a management platform used to control the access device of the edge device and the preset processing algorithm. An algorithm runtime container and a management platform container are then started based on the algorithm runtime image and the management platform image, respectively. During the startup of the algorithm runtime container and the management platform container, the algorithm project files of the preset processing algorithm are mapped into both containers to synchronize information. This solves the problems of low algorithm deployment efficiency and high workload in related technologies for edge device operation methods, improving algorithm deployment efficiency and reducing the workload of algorithm deployment.
[0064] In an exemplary embodiment, after mapping the algorithm project files of the preset processing algorithm into the algorithm runtime container and the management platform container respectively, the above method further includes:
[0065] S11, in response to file update information obtained from the management platform container, synchronize the file update information to the algorithm project file of the algorithm running container.
[0066] After the user configures the processing algorithm of the edge device's access device through the management platform, the management platform container can obtain the file update information corresponding to the user's operation and synchronize the file update information to the algorithm project file corresponding to the processing algorithm in the edge device, so that the algorithm running container can synchronously read the updated algorithm project file. Specifically, the file update information indicates the device information of the first access device added to the edge device through the management platform, and the algorithm binding information indicates the first processing algorithm bound to the first access device.
[0067] In some embodiments, after the algorithm project files of the preset processing algorithm are mapped into the algorithm running container and the management platform container respectively, the algorithm running container and the management platform container can share the host network to query the access devices of the edge devices through the host network to obtain device update information, and bind the processing algorithm to the access devices of the edge devices based on the algorithm project files of the preset processing algorithm to obtain algorithm binding information.
[0068] Here, "host" refers to the device that stores containers or images, and the host network can be a wired network or a wireless network.
[0069] It should be noted that the management platform allows for batch operations and the binding of processing algorithms to multiple access devices at the edge. Here, the processing algorithms can be the same or different, and the processing algorithm bound to the access device is determined according to the type of access device.
[0070] For example, when the access device of the edge device is an image acquisition device such as a camera, the bound processing algorithm can be an image recognition algorithm, which is used to perform image recognition on the image data to be processed transmitted by the image acquisition device; when the access device of the edge device is a voice acquisition device such as a microphone, the bound processing algorithm can be a voice recognition algorithm, which is used to perform voice recognition on the voice data to be processed transmitted by the voice acquisition device.
[0071] The embodiments provided in this application enable the acquisition of file update information obtained after the user operates the management platform, and the file update information is synchronized to the corresponding algorithm project file, so that the subsequent algorithm running container can run the processing algorithm based on the updated algorithm project file.
[0072] In one exemplary embodiment, in response to file update information obtained from the management platform container, synchronizing the file update information to the algorithm project file of the algorithm running container includes:
[0073] S21, in response to the file update information obtained from the management platform container, save the file update information to the algorithm project file of the edge device to obtain the updated algorithm project file of the edge device;
[0074] S22, synchronize the updated algorithm project file of the edge device to the algorithm project file of the algorithm runtime container, so as to synchronize the file update information to the algorithm project file of the algorithm runtime container.
[0075] refer to Figure 4 , Figure 4 This is a schematic diagram of information update for an optional edge device according to an embodiment of this application; it includes an edge device and an access device, wherein the edge device includes a management platform container, an algorithm execution container, and a database.
[0076] like Figure 4 As shown, the edge device can obtain device information of the access device through the network, respond to the management platform container to configure the processing algorithm of the access device, and obtain the access device algorithm configuration information; based on the access device algorithm configuration information, update the algorithm project file and store it in the edge device's database; so that when the algorithm running container performs mapping based on the algorithm project file, it can read the latest algorithm project file in real time to synchronize the access device algorithm configuration information.
[0077] In some embodiments, the file update information includes the access device of the edge device obtained through the host network, the processing algorithm information obtained by mapping the algorithm engineering file based on the preset algorithm, the processing algorithm information for binding (or unbinding, or changing) the access device of the edge device in response to user operation instructions, and may also be operation information such as running or stopping the bound processing algorithm of the access device in response to user operation instructions.
[0078] In some embodiments, the management platform container obtains file update information obtained after the user operates the management platform. The file update information includes device information indicating access devices added to the edge device through the management platform and algorithm binding information indicating processing algorithms bound to the access device. The management platform container synchronizes the file update information to the corresponding algorithm project file so that the algorithm running container can obtain the updated device information and algorithm binding information based on the file update information in the algorithm project file.
[0079] The embodiments provided in this application enable the storage of file update information in the algorithm engineering file of the edge device in response to file update information obtained by the management platform container, so that the algorithm running container can synchronously obtain file update information after reading the algorithm engineering file.
[0080] In an exemplary embodiment, after mapping the algorithm project files of the preset processing algorithm into the algorithm runtime container and the management platform container respectively, the above method further includes:
[0081] S31, in response to the algorithm update information obtained from the management platform container, synchronize the algorithm update information to the algorithm project file of the algorithm running container.
[0082] When the management platform container receives algorithm update information, it synchronizes this information to the algorithm project file corresponding to the updated algorithm in the edge device. This allows the algorithm execution container to synchronously read the updated algorithm project file and obtain the algorithm update information. Specifically, the algorithm update information instructs the management platform to update the processing algorithm bound to the second access device of the edge device to the second processing algorithm.
[0083] In some embodiments, in the management platform, the second access device is bound to the first processing algorithm. In response to the user's algorithm update operation on the second access device (for example, the algorithm update operation may be to change the first processing algorithm bound to the second access device to the second processing algorithm), the management platform container obtains the algorithm update information and synchronizes the algorithm update information to the algorithm project file on the host machine. This enables the algorithm running container to synchronize the first processing algorithm bound to the second access device to the second processing algorithm after mapping the algorithm update information in the algorithm project file.
[0084] It should be noted that the management platform can perform batch updates of the processing algorithms of multiple access devices on the edge device, store the update information in the host machine's database, and simultaneously update the corresponding algorithm project files of the corresponding access devices.
[0085] The embodiments provided in this application enable the management platform to update the access devices of edge devices and synchronize the algorithm update information to the algorithm project file through the management platform container, so that the algorithm running container can synchronously execute the corresponding access device's algorithm update information.
[0086] In one exemplary embodiment, the management platform container maps an application container engine directory on the edge device corresponding to the management platform container; after starting the algorithm-running container and management platform container based on the algorithm-running image and management platform image, the above method further includes:
[0087] S41, within the management platform container, the first container command is used to enter the target command line interface inside the algorithm execution container;
[0088] S42, in response to the program start command obtained through the command line interface, enters the algorithm project directory of the management platform container through the management platform and starts the algorithm running program of the preset processing algorithm.
[0089] It should be noted that the preset processing algorithm can be any (processing) algorithm mapped to the management platform container or the algorithm running container through the algorithm project file. The preset processing algorithm can also be any (processing) algorithm pre-stored in the management platform image and the algorithm running image. The preset processing algorithm can also be any (processing) algorithm downloaded or called in real time through the network. Here, starting a preset processing algorithm can be starting one preset processing algorithm or starting multiple preset processing algorithms at the same time. The specific decision can be determined according to the actual application scenario, and this application does not impose any restrictions here.
[0090] refer to Figure 5 , Figure 5 This is a schematic diagram of an optional edge device according to an embodiment of this application; the edge device includes an algorithm running image, a management platform image, an algorithm running container, a management platform container, an algorithm running container; and access device information obtained by the edge device through the network.
[0091] like Figure 5 As shown, the management platform image and the algorithm runtime image are loaded to obtain the management platform container and the algorithm runtime container, respectively. The algorithm project file directory and the application container engine directory are mapped to the management platform container, and the algorithm project file directory is mapped to the algorithm runtime container. The algorithm project file directory and the application container engine directory are both pre-stored in the host machine's database and are the same in the management platform container and the algorithm runtime container, respectively. The management platform container and the algorithm runtime container can obtain access device information through the network of the edge device (host machine).
[0092] Here, the management platform container configures the processing algorithm for the target access device based on the algorithm project file directory, and configures the algorithm running container for the target access device based on the application container engine directory, so as to obtain the processing algorithm configuration information of the target access device and update it to the corresponding algorithm project file; the algorithm running container reads the updated algorithm project file based on the algorithm project file directory, and runs the processing algorithm in the algorithm running container of the target access device to process the data to be processed transmitted by the target access device.
[0093] In some embodiments, the first container command is used to enter the command-line interface inside the specified container; for example, in a Docker container, the "Docker exec -it" instruction can be used to enter the command-line interface inside the specified container.
[0094] Here, the application container engine directory corresponding to the management platform container includes the algorithm running container directory stored in the host machine, and other application container directories related to the edge device access device (e.g., image recognition application container, voice acquisition application container, etc.). The management platform container can obtain all file information of the containers recorded in the directory through the application container engine directory.
[0095] In some embodiments, the management platform container maps an algorithm running container directory. Based on the algorithm running container directory, within the management platform container, a target command line interface inside the specified algorithm running container is accessed by specifying the container entry command. In response to the program start command obtained through the command line interface, the algorithm project directory of the management platform container is accessed through the management platform, and the algorithm running program of the corresponding processing algorithm is started, so that the algorithm running container corresponding to the processing algorithm runs the corresponding processing algorithm.
[0096] For example, in an outdoor camera scenario, the management platform container of the edge device maps the image recognition algorithm runtime container directory and the image recognition algorithm project directory stored in the edge device. The user can enter the specified container by entering the first container command in the management platform container. The first container command is the "Docker exec-it" instruction, which can enter the specified container, which is the image recognition algorithm runtime container. In response to the program start command obtained through the algorithm command line interface, the user enters the image recognition algorithm project directory of the management platform container through the management platform and starts the algorithm runtime program of the image recognition algorithm. This allows the image recognition algorithm runtime container corresponding to the image recognition algorithm to perform image recognition on the image data to be processed transmitted by the access device (e.g., camera) of the edge device.
[0097] Through the embodiments provided in this application, based on the application container engine directory and algorithm project file directory mapped by the management platform container, the corresponding processing algorithm or program instruction can be executed in the specified container.
[0098] In one exemplary embodiment, after entering the algorithm execution container via a first application container engine command within the management platform container, the above method further includes:
[0099] S51, when the running status of the preset processing algorithm to be queried is to be determined, the process running in the algorithm running container is determined by the second container command, wherein the second container command is used to query the process running in the specified container.
[0100] S52, if the processes running in the algorithm running container include the process corresponding to the preset processing algorithm, it is determined that the preset processing algorithm is in a running state;
[0101] S53, if the processes running in the algorithm running container do not include the process corresponding to the preset processing algorithm, it is determined that the preset processing algorithm is in a non-running state.
[0102] The management platform container maps the algorithm running container directory and the algorithm project file directory. When querying the running status of a target processing algorithm, users can use process viewing commands within the management platform container to determine the running processes in the target algorithm running container. The process viewing command can be the "docker top" command, used to query all running processes in the target container and the tasks being executed by each process. When the running processes in the target algorithm running container include the process corresponding to the target algorithm, the target algorithm is determined to be running. When the running processes in the target algorithm running container do not include the process corresponding to the target algorithm, the target algorithm is determined to be not running.
[0103] In some embodiments, after determining the processes running in the algorithm's running container, the running processes can be filtered using process filtering instructions to quickly query the required processes. For example, the process filtering instruction could be "docker top portainer|grep xxx", where "xxx" is the filtering keyword.
[0104] In some embodiments, the management platform container maps an algorithm running container directory. The management platform container can query all running containers in the algorithm running container directory through a container query command. Here, the container query command can be "docker ps", or the "docker ps -a" container command can be used to query all containers (including running containers and non-running containers).
[0105] The embodiments provided in this application enable the management platform container to query the algorithm running status in each algorithm running container.
[0106] In one exemplary embodiment, after entering the algorithm execution container via a first application container engine command within the management platform container, the above method further includes:
[0107] S61, In the case of the preset processing algorithm to be stopped, the process running in the algorithm running container is determined by the third container command, wherein the third container command is used to query the process running in the specified container;
[0108] S62, if the processes running in the algorithm running container include the process corresponding to the preset processing algorithm, the process corresponding to the preset processing algorithm is stopped by the fourth container command, wherein the fourth container command is used to stop the specified process in the specified container.
[0109] The management platform container maps the algorithm running container directory and the algorithm project file directory. When a target processing algorithm needs to be stopped, the user can use process viewing commands within the management platform container to determine the running processes in the target algorithm running container. The process viewing command can be the "docker top" command, used to query all running processes in the target container and the tasks each process is executing. When the running processes in the algorithm running container include the process corresponding to the target processing algorithm, the process stop command can be used to stop the corresponding process in the target algorithm. Here, the process stop command can be "kill pid" to stop the target process running in the container, or it can be the "docker stop" command to stop the container from running.
[0110] In some embodiments, after stopping the running process of the algorithm in the algorithm running container through the management platform container, access to the algorithm running container is exited. Here, access to the algorithm running container can be exited and the algorithm running container can be closed, or access to the algorithm running container can be exited but the algorithm running container can be closed.
[0111] Through the embodiments of this application, it is possible to query the process corresponding to the algorithm running in the algorithm running container through the management platform container, and close the process corresponding to the specified algorithm.
[0112] refer to Figure 6 , Figure 6 This is a schematic diagram of the overall process of an optional edge device operation method according to an embodiment of this application; it may include the following steps:
[0113] In step S601, the algorithm running image and the management platform image are loaded.
[0114] In some embodiments, the algorithm running environment data file is mirrored to obtain an algorithm running image. The data file of the algorithm running environment can be a pre-stored data file or a data file downloaded from the network. The algorithm running environment is capable of running at least one preset processing algorithm.
[0115] In some embodiments, a mirror mapping is performed based on the data file of the management platform to obtain a management platform image. The management platform can be a pre-stored application, software, plugin, etc., or it can be downloaded via the network. The management platform can be used to add access device information of edge devices, process algorithm information, and update relevant configuration information to the algorithm project file. When the algorithm runs, the algorithm project file is read to realize the update and synchronization of configuration information.
[0116] In step S602, an algorithm running container is generated, and the algorithm project file directory is mapped to the algorithm running container.
[0117] In some embodiments, an algorithm running container is obtained based on the algorithm running image, wherein the algorithm running container is a running instance started by the algorithm running image; the algorithm project file directory is pre-stored in the host machine, and the algorithm project files include files such as algorithm application, algorithm parameters, and algorithm model, and the algorithm project file directory includes all file information of the algorithm project files.
[0118] Here, the algorithm runtime container can obtain access device information of the edge device through the host network (edge device).
[0119] In some embodiments, by mounting the algorithm project file directory to the algorithm running container, the algorithm project file directory is mapped to the algorithm running container. Thus, by mounting the algorithm project file directory to the algorithm running container, the algorithm running container can obtain the storage path of the target file from the algorithm project file directory to read the target file and run the target processing algorithm.
[0120] In step S603, a management platform container is generated, and the algorithm project file directory and the algorithm running container directory are mapped to the management platform container.
[0121] Here, the management platform container can obtain access device information of the edge device through the host network (edge device).
[0122] In some embodiments, a management platform container is obtained based on the management platform image, wherein the management platform container is a running example started by the management platform image; the algorithm engineering file directory is pre-stored in the host machine, and the algorithm engineering file directory mapped by the management platform container and the algorithm running container is the same, so as to synchronize information between the algorithm running container and the management platform container.
[0123] It should be noted that the algorithm project file directory includes all file information for multiple algorithm project files.
[0124] In step S604, in response to the device configuration instruction, the target algorithm is configured for the target access device in the management platform container.
[0125] In some embodiments, the management platform container maps an algorithm running container directory and an algorithm project file directory, and obtains access device information of the edge device through the host network.
[0126] In some embodiments, after the algorithm project files of the preset processing algorithm are mapped into the algorithm running container and the management platform container respectively, the algorithm running container and the management platform container can share the host network. Here, the management platform container configures the processing algorithm for the target access device based on the algorithm project file directory, and configures the algorithm running container for the target access device based on the algorithm running container directory, so as to obtain the processing algorithm configuration information of the target access device and update it to the corresponding algorithm project file; the algorithm running container reads the updated algorithm project file based on the algorithm project file directory, runs the processing algorithm in the algorithm running container of the target access device, and processes the data to be processed transmitted by the target access device.
[0127] In step S605, in response to the algorithm configuration instruction, a configuration operation is performed on the processing algorithm of the target access device in the management platform container.
[0128] In some embodiments, algorithm configuration instructions include querying algorithm running status, starting algorithm running, stopping algorithm running, and updating algorithm configuration.
[0129] In some embodiments, the algorithm execution container is entered by executing the "docker exec" command within the management platform container; based on the algorithm project file directory in the management platform container, the execution process of the target algorithm in the current algorithm execution container is started; the running status of the target algorithm is determined by checking whether the corresponding algorithm execution process exists in the algorithm execution container, i.e., when the corresponding algorithm execution process exists, the target algorithm is in a running state, and when the corresponding algorithm execution process does not exist, the target algorithm is in a non-running state; after determining the corresponding algorithm execution process, the running process can be stopped by using the "kill pid" command to stop the target algorithm from running; after completing the operation, the algorithm execution container is exited by executing the "docker exit" command within the management platform container.
[0130] Through the steps described in this application embodiment, the algorithm engineering files are stored on the edge device (host machine), and the algorithm runtime environment and management platform generate image files respectively, achieving independent updates. Furthermore, the algorithm engineering files in the host machine are mapped to containers generated from the two images, achieving information synchronization. At the same time, the directory of the algorithm runtime container stored in the host machine is mapped to the management platform container, enabling the management platform to access the algorithm runtime container, thereby achieving monitoring and control of the algorithm program's operation. Moreover, for subsequent updates to the algorithm and management platform, only the corresponding files or images need to be replaced and the container restarted, achieving independent maintenance and updates.
[0131] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0132] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0133] According to another aspect of the embodiments of this application, an operating apparatus for an edge device is also provided. This apparatus is used to implement the operating method of the edge device provided in the above embodiments, and details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0134] Figure 7 This is a structural block diagram of an optional edge device operating apparatus according to an embodiment of this application, such as... Figure 7 As shown, the device includes:
[0135] The first loading unit 701 is used to load the algorithm running image, wherein the algorithm running image is used to provide the running environment of the preset processing algorithm, and the preset processing algorithm is used to process the data to be processed transmitted by the access device of the edge device.
[0136] The second loading unit 702 is used to load the management platform image, wherein the management platform image is an image of a management platform used to control the access devices and preset processing algorithms of edge devices;
[0137] The startup unit 703 is used to start the algorithm running container and the management platform container based on the algorithm running image and the management platform image, wherein the algorithm running container is a running instance started by the algorithm running image and the management platform container is a running instance started by the management platform image.
[0138] The mapping unit 704 is used to map the algorithm project files of the preset processing algorithm into the algorithm running container and the management platform container respectively during the startup of the algorithm running container and the management platform container, so as to synchronize information between the algorithm running container and the management platform container.
[0139] It should be noted that the first loading unit 701 in this embodiment can be used to execute the above step S301, the second loading unit 702 in this embodiment can be used to execute the above step S302, the startup unit 703 in this embodiment can be used to execute the above step S303, and the mapping unit 704 in this embodiment can be used to execute the above step S304.
[0140] The embodiments provided in this application load an algorithm runtime image to provide a runtime environment for a preset processing algorithm. This preset processing algorithm processes data transmitted from the access device of the edge device. Therefore, by loading the algorithm runtime image, the algorithm environment can be reconfigured on the edge device, improving the efficiency of algorithm environment configuration. Similarly, a management platform image is loaded to control the access device and the preset processing algorithm on the edge device. This avoids reconfiguring the management platform on the edge device, improving the efficiency of management platform configuration. Furthermore, directly starting the algorithm runtime container and management platform container based on the algorithm runtime image and management platform image provides a universally applicable solution. Deployed on various edge devices, and in subsequent configuration and update processes, only the image needs to be replaced to update the container configuration of each edge device; preset processing algorithms are mapped to the algorithm running container and the management platform container respectively, so that the algorithm running container and the management platform container can obtain the same preset algorithm information, thereby achieving the effect of information synchronization between containers; thus, by loading the image, a large number of edge devices can be configured simultaneously, and the processing algorithms of edge devices can be quickly configured based on the algorithm information synchronized between containers, achieving the technical effect of high-efficiency deployment of processing algorithms of a large number of edge devices, thereby solving the problems of low deployment efficiency and large workload in the operation methods of edge devices in related technologies.
[0141] In one exemplary embodiment, the first loading unit includes:
[0142] The first update module is used to synchronize the file update information to the algorithm project file of the algorithm running container in response to the file update information obtained from the management platform container. The file update information includes: device information indicating the first access device added to the edge device through the management platform and algorithm binding information indicating the first processing algorithm bound to the first access device.
[0143] In one exemplary embodiment, the first update module includes:
[0144] The update submodule is used to respond to file update information obtained from the management platform container, save the file update information to the algorithm project file of the edge device, and obtain the updated algorithm project file of the edge device;
[0145] The synchronization submodule is used to synchronize the updated algorithm project files of the edge devices into the algorithm project files of the algorithm runtime container, so as to synchronize the file update information to the algorithm project files of the algorithm runtime container.
[0146] In one exemplary embodiment, the above-described apparatus further includes:
[0147] The second update module is used to synchronize the algorithm update information to the algorithm project file of the algorithm running container in response to the algorithm update information obtained from the management platform container after mapping the algorithm project file of the preset processing algorithm into the algorithm running container and the management platform container respectively. The algorithm update information is used to instruct the management platform to update the processing algorithm bound to the second access device of the edge device to the second processing algorithm.
[0148] In one exemplary embodiment, the above-described apparatus further includes:
[0149] The entry module is used to enter the target command line interface inside the algorithm running container through the first container command within the management platform container after the algorithm running container and management platform container are started based on the algorithm running image and management platform image. The first container command is used to enter the command line interface inside the specified container.
[0150] The startup module is used to respond to program startup commands obtained through the command-line interface, enter the algorithm project directory of the management platform container through the management platform, and start the algorithm execution program of the preset processing algorithm.
[0151] In one exemplary embodiment, the above-described apparatus further includes:
[0152] The query module is used to determine the running process in the algorithm running container by means of a second container command after entering the algorithm running container through the first application container engine command within the management platform container, given the running status of the preset processing algorithm to be queried. The second container command is used to query the running process in the specified container.
[0153] The first determining module determines that the preset processing algorithm is in a running state if the processes running in the algorithm running container include the processes corresponding to the preset processing algorithm.
[0154] The second determining module determines that the preset processing algorithm is in a non-running state if the processes running in the algorithm running container do not include the processes corresponding to the preset processing algorithm.
[0155] In one exemplary embodiment, the above-described apparatus includes:
[0156] The third determination module is used to determine the running process in the algorithm running container after entering the algorithm running container through the first application container engine command in the management platform container, in the case of stopping the preset processing algorithm, through the third container command. The third container command is used to query the running process in the specified container.
[0157] The stop module is used to stop the preset processing algorithm by executing a stop operation on the process corresponding to the preset processing algorithm through the fourth container command when the process running in the algorithm running container includes the process corresponding to the preset processing algorithm. The fourth container command is used to stop the specified process in the specified container.
[0158] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0159] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to perform the steps in any of the above method embodiments when it is run.
[0160] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0161] According to one aspect of this application, a computer program product is provided, comprising a computer program / instructions containing program code for performing the methods shown in the flowchart. In such an embodiment, reference is made to... Figure 8 The computer program can be downloaded and installed from a network via the communication section 809, and / or installed from the removable medium 811. When the computer program is executed by the central processing unit 801, it performs various functions provided in the embodiments of this application. The sequence numbers of the embodiments of this application above are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0162] Figure 8 A schematic block diagram of a computer system architecture for implementing embodiments of the present application is shown. Figure 8As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 802 or programs loaded from storage section 808 into random access memory (RAM). The random access memory 803 also stores various programs and data required for system operation. The CPU 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output interface 805 (I / O interface) is also connected to the bus 804.
[0163] The following components are connected to the input / output interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a local area network card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input / output interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 810 as needed so that computer programs read from it can be installed into the storage section 808 as needed.
[0164] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 809, and / or installed from removable medium 811. When the computer program is executed by central processing unit 801, it performs various functions defined in the system of this application.
[0165] It should be noted that, Figure 8 The computer system 800 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0166] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0167] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the input / output resource pool, and the input / output device is connected to the input / output resource pool.
[0168] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0169] Obviously, those skilled in the art should understand that the modules or steps of the embodiments of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the embodiments of this application are not limited to any particular combination of hardware and software.
[0170] The above description is merely a preferred embodiment of this application and is not intended to limit the embodiments of this application. For those skilled in the art, various modifications and variations can be made to the embodiments of this application. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the embodiments of this application should be included within the protection scope of the embodiments of this application.
Claims
1. A method for operating an edge device, characterized in that, include: Load the algorithm running image, wherein the algorithm running image is used to provide a running environment for a preset processing algorithm, and the preset processing algorithm is used to process the data to be processed transmitted by the access device of the edge device; Load the management platform image, wherein the management platform image is an image of a management platform used to control the access device of the edge device and the preset processing algorithm; The algorithm running container and the management platform container are launched based on the algorithm running image and the management platform image, wherein the algorithm running container is a running instance launched by the algorithm running image, and the management platform container is a running instance launched by the management platform image. During the startup of the algorithm running container and the management platform container, the algorithm project file of the preset processing algorithm is mapped into the algorithm running container and the management platform container respectively, so as to synchronize information between the algorithm running container and the management platform container.
2. The method according to claim 1, characterized in that, After mapping the algorithm project file of the preset processing algorithm into the algorithm runtime container and the management platform container respectively, the method further includes: In response to file update information obtained from the management platform container, the file update information is synchronized to the algorithm project file of the algorithm running container, wherein the file update information includes: device information indicating a first access device added to the edge device through the management platform and algorithm binding information indicating a first processing algorithm bound to the first access device.
3. The method according to claim 2, characterized in that, The step of synchronizing the file update information obtained from the management platform container to the algorithm project file in the algorithm running container in response to the file update information includes: In response to the file update information obtained from the management platform container, the file update information is saved to the algorithm project file of the edge device to obtain the updated algorithm project file of the edge device; The updated algorithm project file of the edge device is synchronized to the algorithm project file of the algorithm runtime container, so as to synchronize the file update information to the algorithm project file of the algorithm runtime container.
4. The method according to claim 1, characterized in that, After mapping the algorithm project file of the preset processing algorithm into the algorithm runtime container and the management platform container respectively, the method further includes: In response to the algorithm update information obtained from the management platform container, the algorithm update information is synchronized to the algorithm project file of the algorithm running container, wherein the algorithm update information is used to instruct the management platform to update the processing algorithm bound to the second access device of the edge device to the second processing algorithm.
5. The method according to any one of claims 1 to 4, characterized in that, The management platform container maps to the application container engine directory on the edge device that corresponds to the management platform container. After the algorithm-based runtime image and the management platform image are used to start the algorithm-based runtime container and the management platform container, the method further includes: Within the management platform container, a first container command is used to enter the target command-line interface inside the algorithm execution container, wherein the first container command is used to enter the command-line interface inside the specified container. In response to the program startup command obtained through the command line interface, the algorithm project directory of the management platform container is accessed through the management platform, and the algorithm execution program of the preset processing algorithm is started.
6. The method according to claim 5, characterized in that, After entering the algorithm execution container via the first application container engine command within the management platform container, the method further includes: When the running status of the preset processing algorithm to be queried is to be determined, the process running in the algorithm running container is determined by the second container command, wherein the second container command is used to query the process running in the specified container; If the processes running in the algorithm running container include the process corresponding to the preset processing algorithm, then the preset processing algorithm is determined to be in a running state. If the processes running in the algorithm runtime container do not include the process corresponding to the preset processing algorithm, then the preset processing algorithm is determined to be in a non-running state.
7. The method according to claim 5, characterized in that, After entering the algorithm execution container via the first application container engine command within the management platform container, the method further includes: In the case where the preset processing algorithm is to be stopped, the process running in the algorithm running container is determined by a third container command, wherein the third container command is used to query the process running in the specified container; If the processes running in the algorithm running container include the process corresponding to the preset processing algorithm, a stop operation is performed on the process corresponding to the preset processing algorithm through a fourth container command to stop the preset processing algorithm. The fourth container command is used to stop a specified process within a specified container.
8. An operating device for an edge device, characterized in that, include: The first loading unit is used to load the algorithm running image, wherein the algorithm running image is used to provide a running environment for a preset processing algorithm, and the preset processing algorithm is used to process the data to be processed transmitted by the access device of the edge device. The second loading unit is used to load the management platform image, wherein the management platform image is an image of a management platform used to control the access device of the edge device and the preset processing algorithm; The startup unit is used to start the algorithm runtime container and the management platform container based on the algorithm runtime image and the management platform image. The algorithm runtime container is a running instance started by the algorithm runtime image, and the management platform container is a running instance started by the management platform image. The mapping unit is used to map the algorithm project file of the preset processing algorithm into the algorithm running container and the management platform container respectively during the startup of the algorithm running container and the management platform container, so as to synchronize information between the algorithm running container and the management platform container.
9. A computer-readable storage medium storing a computer program, wherein, When the computer program is executed by a processor, it implements the steps of the method described in any one of claims 1 to 7.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Container-based edge equipment operation method, device and system
CN112269565A
Method for synchronously operating business data of container
CN114629924A