A conversion method for OCI images and embedded images in an embedded environment

By generating mirror adjustment policies and task allocation policies, we guide the image conversion and task allocation between the container engine and embedded devices, and solve the conversion and adaptability of OCI images and embedded images in embedded device groups, improving the flexibility and efficiency of task execution.

CN119917223BActive Publication Date: 2025-06-03GHOSTCLOUD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510397820.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-01
Publication Date
2025-06-03
Estimated Expiration
2045-04-01

AI Technical Summary

Technical Problem

When performing multiple tasks in an embedded device group, it is difficult for the prior art to effectively convert OCI images in the container engine into embedded images and ensure the adaptability of the images to tasks, especially in the case of resource constraints and network uncertainty.

Method used

By obtaining the task execution type and period of each embedded device running task, generating mirror requirement information, and based on the task execution idle period and current mirror storage information of the embedded device, considering factors such as network status and the number of mirror adjustments, a mirror adjustment strategy and task allocation strategy are generated to guide the image conversion and task allocation between the container engine and the embedded device.

Benefits of technology

It improves the control rationality of switching OCI mirrors to embedded images and storing them into embedded devices, ensures that the task execution of embedded devices is consistent with the mirror, and improves the flexibility and efficiency of embedded device groups in multi-task execution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119917223B_ABST
    Figure CN119917223B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of embedded image conversion, and discloses a method for converting OCI images and embedded images in an embedded environment. By obtaining the task execution type and task execution period of each task running on the embedded device, mirror requirement information is generated. Then, according to the task execution idle period of the embedded device and the current mirror storage information, considering factors such as the sequence of the task execution time of the embedded device and the embedded image adjustment time, the network condition between the embedded device and the container engine, and the number of embedded image adjustments, etc., several embedded device running tasks within the target period are allocated and a mirror adjustment strategy is generated to guide the mirror conversion and task execution between the container engine and each embedded device at different times within the target period, improving the rationality of switching the OCI image in the container engine to an embedded image and storing it in the embedded device, and ensuring the task execution adaptability of the embedded device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of embedded image conversion, and particularly to a method for converting OCI images and embedded images in an embedded environment. Background Art

[0002] Currently, in the applications of embedded device groups, different embedded devices perform different types of tasks at different times, and the required embedded images are also different. This makes the flexibility of embedded devices when performing tasks using only the embedded images stored in their own embedded image modules not very high.

[0003] Although OCI images play an important role in the cloud-native environment, by accessing the container engine, it can help embedded devices convert the OCI images in the OCI image module of the cloud container engine into embedded images for use in embedded devices. However, directly applying it to the embedded system still poses some challenges. Embedded systems usually have characteristics such as resource constraints (limited storage of embedded images at the embedded device end), network uncertainty with the cloud container engine (limited time for converting OCI images in the container engine into embedded images within the embedded system), and high real-time requirements (poor response speed for the embedded system to directly pull OCI images from the container engine to perform tasks). These are somewhat different from the original design intention of OCI images. When considering that the embedded device group performs multiple tasks at different times, it is necessary to ensure that the embedded images stored in the embedded device meet the current task requirements and have sufficient flexibility to meet the execution changes of multiple tasks, which is difficult to achieve in the existing technology.

[0004] Therefore, how to improve the control rationality of switching OCI images in the container engine to embedded images and storing them in the embedded device when the embedded device group performs multiple tasks, and ensure the adaptation of the task execution of the embedded device to the image, is a technical problem that urgently needs to be solved. Summary of the Invention

[0005] The present invention provides a method for converting OCI images and embedded images in an embedded environment, aiming to solve at least one of the above technical problems.

[0006] To achieve the above object, the present invention provides a method for converting OCI images and embedded images in an embedded environment, the method comprising the following steps:

[0007] S1: Obtain a plurality of embedded device running tasks in a target time period; wherein, each of the embedded device running tasks includes a task execution type and a task execution time period;

[0008] S2: Generate the mirror requirement information for each embedded device to run tasks based on the task execution type and task execution period.

[0009] S3: Obtain the set of embedded devices that are idle during the target period. Based on each embedded device identifier in the set of embedded devices, call the corresponding task execution and mirror retention list to extract the task execution idle period and the current mirror storage information of each embedded device.

[0010] S4: According to the mirror requirement information for each embedded device to run tasks and the task execution idle period of each embedded device, considering the current mirror storage information of each embedded device and the predicted network status information of the container engine during the target period, allocate the tasks of several embedded devices during the target period, and generate a mirror adjustment strategy and a task allocation strategy.

[0011] S5: Use the mirror adjustment strategy and the task allocation strategy to execute the mirror conversion action and the task allocation action between the container engine and the embedded devices.

[0012] Optionally, step S1 specifically includes:

[0013] S11: When the server receives the embedded device requirements sent by the user side, generate an embedded device requirement list according to the requirement periods in each embedded device requirement, arranged in chronological order.

[0014] S12: Call the embedded device requirement list stored in the server, determine the task execution type of the embedded device requirement according to the usage scenario description in each embedded device requirement, and then select several embedded device running tasks during the target period based on the requirement period of the embedded device requirement.

[0015] Optionally, in step S12, to determine the task execution type of the embedded device requirement according to the usage scenario description in each embedded device requirement, it specifically includes:

[0016] S121: Extract several scenario function keywords in the usage scenario description of each embedded device requirement and several task execution keywords corresponding to each task execution type of the embedded device.

[0017] S122: Based on several scenario function keywords and several task execution keywords, calculate the correlation degree between each embedded device requirement and each task execution type, and determine the task execution type of each embedded device requirement with the highest correlation degree.

[0018] Optionally, step S2 specifically includes:

[0019] S21: Based on the task execution type, in the mapping relationship between different task execution types recorded in the mirror database and mirror categories, match the required mirror category for each embedded device to run the task;

[0020] S22: Use the required mirror category and the task execution time period to generate mirror requirement information for each embedded device to run the task.

[0021] Optionally, step S3 specifically includes:

[0022] S31: Query the embedded devices that are in the idle state during the target time period, and construct the identifiers of the idle-state embedded devices into an embedded device set;

[0023] S32: Based on each embedded device identifier in the embedded device set, call the corresponding task execution and mirror retention list, and determine the task execution idle time period and the current mirror storage information of each embedded device according to the task execution time period and the current mirror storage information of each embedded device recorded in the task execution and mirror retention list.

[0024] Optionally, step S4 specifically includes:

[0025] S41: Obtain the network condition prediction information of the container engine during the target time period; wherein, the network condition prediction information is configured as the network bandwidth condition allocated to the container engine during the target time period;

[0026] S42: According to the mirror requirement information of each embedded device to run the task and the task execution idle time period of each embedded device, considering the current mirror storage information of each embedded device and the network communication bandwidth allocated to the container engine during the target time period, taking the fact that the embedded mirror stored at each moment of each embedded device during the target time period contains the required mirror category of the embedded device at that moment as the first constraint condition, taking the fact that the network bandwidth condition during two adjacent mirror adjustment action executions of each embedded device meets the network conditions required for importing the embedded mirror from the container engine to the embedded device as the second constraint condition, taking the fact that the space occupied by the embedded mirror in the embedded mirror module of each embedded device at each moment during the target time period is less than the storage space allocated to the embedded device as the third constraint condition, and taking the minimum number of times for all embedded devices to import the embedded mirror from the OCI mirror module of the container engine to the embedded mirror module of the embedded device during the target time period as the goal, solve the mirror storage information of the embedded mirror module of each embedded device at each moment during the target time period;

[0027] S43: According to the mirror storage information of the embedded mirror module of each embedded device at each moment during the target time period, solve the mirror adjustment strategy and task allocation strategy of each embedded device.

[0028] Optionally, step S43 specifically includes:

[0029] S431: Generate an image adjustment strategy for each embedded device according to the image storage information of each embedded device's embedded image module at each moment in the target period, based on the differences in the image storage information between adjacent moments;

[0030] S432: Generate a task allocation strategy for each embedded device by allocating the tasks run by the embedded devices to the corresponding embedded devices according to the image storage information of each embedded device's embedded image module at each moment in the target period and the image requirement information of the tasks run by each embedded device.

[0031] Optionally, step S5 specifically includes:

[0032] S51: Use the image adjustment strategy to control the OCI image module in the container engine and the embedded image module of the corresponding embedded device to perform an image conversion action at the corresponding moment within the target period;

[0033] S52: Use the task allocation strategy to perform the task allocation action of running the tasks of each embedded device to the corresponding embedded device.

[0034] Optionally, in step S51, when the OCI image module in the container engine and the embedded image module of the corresponding embedded device perform the image conversion action, it specifically includes: Using the OverlayFS tool to assemble and map the OCI image module that performs the image conversion in the OCI image module of the container engine to the OCI image temporary directory, and realizing the image conversion action by copying the OCI image temporary directory to the embedded image temporary directory and then importing it into the embedded image directory.

[0035] Optionally, the method further includes step S6: The user selects the corresponding embedded device to execute the current embedded device running task according to the task allocation action of running the embedded device tasks to the corresponding embedded device.

[0036] The beneficial effects of the present invention are as follows: A conversion method for OCI images and embedded images in an embedded environment is proposed. By obtaining the task execution type and task execution period of each task running on the embedded device, mirror requirement information is generated. Then, according to the task execution idle period of the embedded device and the current mirror storage information, considering factors such as the sequence of the task execution time of the embedded device and the embedded mirror adjustment time, the network conditions between the embedded device and the container engine, and the number of embedded mirror adjustments, a distribution and mirror adjustment strategy for several tasks running on the embedded device during the target period is generated, guiding the mirror conversion action and task distribution action between the container engine and the embedded device at different times during the target period. When multiple tasks are executed in the embedded device group, it can improve the control rationality of switching the OCI image in the container engine to the embedded image and storing it in the embedded device, ensuring that the task execution of the embedded device is adapted to the mirror. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 It is a schematic flowchart of an embodiment of the method for converting OCI images and embedded images in the embedded environment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0038] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0039] An embodiment of the present invention provides a method for converting OCI images and embedded images in an embedded environment. Refer to Figure 1 , Figure 1 It is a schematic flowchart of an embodiment of the method for converting OCI images and embedded images in the embedded environment of the present invention.

[0040] In this embodiment, a method for converting OCI images and embedded images in an embedded environment, the method includes the following steps:

[0041] S1: Obtain several tasks running on the embedded device during the target period; wherein, each task running on the embedded device includes a task execution type and a task execution period;

[0042] S2: Generate mirror requirement information for each task running on the embedded device based on the task execution type and the task execution period;

[0043] S3: Obtain a set of idle embedded devices during the target period, and based on each embedded device identifier in the set of embedded devices, call the corresponding task execution and mirror retention list to extract the task execution idle period and the current mirror storage information of each embedded device;

[0044] S4: According to the mirror requirement information for each embedded device to run tasks and the task execution idle periods of each embedded device, considering the current mirror storage information of each embedded device and the predicted network condition information of the container engine during the target period, allocate the tasks of several embedded devices to run during the target period, and generate a mirror adjustment strategy and a task allocation strategy.

[0045] S5: Utilize the mirror adjustment strategy and the task allocation strategy to execute the mirror conversion action and the task allocation action between the container engine and the embedded device.

[0046] It should be noted that OCI images play an important role in the cloud native environment. By accessing the container engine, it can help the embedded device convert the OCI images in the OCI image module of the cloud container engine into embedded images for use in the embedded device. However, there are still some challenges in directly applying it to the embedded system. The embedded system usually has characteristics such as resource constraints (the storage of embedded images at the embedded device side is limited), network uncertainty between the embedded device and the cloud container engine (the time for converting the OCI images in the container engine into embedded images within the embedded system is limited), and high real-time requirements (the response speed of the embedded system for directly pulling OCI images from the container engine to execute tasks is not good). These are somewhat different from the original design intention of OCI images. When considering that the embedded device group executes multiple tasks at different times, it is necessary to ensure that the embedded images stored in the embedded device meet the current task requirements and have sufficient flexibility to meet the execution changes of multiple tasks, which is difficult to achieve in the existing technology.

[0047] To solve the above problems, in this embodiment, by obtaining the task execution type and the task execution period of each embedded device to run tasks, generate the mirror requirement information, and then according to the task execution idle period and the current mirror storage information of the embedded device, considering factors such as the sequence of the task execution time of the embedded device to run tasks and the embedded mirror adjustment time, the network condition between the embedded device and the container engine, and the number of embedded mirror adjustments, allocate the tasks of several embedded devices to run during the target period and generate a mirror adjustment strategy, to guide the mirror conversion and task execution between the container engine and each embedded device at different times during the target period, improve the rationality of switching the OCI images in the container engine to embedded images and storing them in the embedded device, and ensure the task execution adaptability of the embedded device.

[0048] In a preferred embodiment, step S1 specifically includes:

[0049] S11: When the server receives the embedded device requirements sent by the client, generate an embedded device requirements list according to the required time periods in each embedded device requirement, arranging them in chronological order.

[0050] S12: Invoke the embedded device requirements list stored in the server, determine the task execution type of the embedded device requirements according to the usage scenario description in each embedded device requirement, and then select several embedded device operation tasks for the target time period based on the required time period of the embedded device requirements.

[0051] Furthermore, in step S12, determining the task execution type of the embedded device requirements according to the usage scenario description in each embedded device requirement specifically includes:

[0052] S121: Extract several scenario function keywords in the usage scenario description of each embedded device requirement and several task execution keywords corresponding to each task execution type of the embedded device.

[0053] S122: Based on the several scenario function keywords and several task execution keywords, calculate the correlation degree between each embedded device requirement and each task execution type, and determine the task execution type of each embedded device requirement with the highest correlation degree.

[0054] In this embodiment, after the client sends the embedded device requirements, the server calculates the correlation degree with different task execution types through keywords, determines the task execution type corresponding to the embedded device requirements, then selects the embedded device requirements for the target time period, and finally generates several embedded device operation tasks including the task execution type and the task execution time period.

[0055] In a preferred embodiment, step S2 specifically includes:

[0056] S21: Based on the task execution type, match the required mirror image category of each embedded device operation task in the mapping relationship between different task execution types and mirror image categories recorded in the mirror database.

[0057] S22: Generate the mirror image requirement information of each embedded device operation task by using the required mirror image category and the task execution time period.

[0058] In this embodiment, the task execution type in the embedded device operation task is used to match the required mirror image category in this scenario in the mirror database, thereby generating the mirror image requirement information, which can provide data support for subsequent generation of mirror image adjustment strategies and task allocation strategies.

[0059] In a preferred embodiment, step S3 specifically includes:

[0060] S31: Query the embedded devices in the idle state during the target period, and construct the identifiers of the idle embedded devices into an embedded device set;

[0061] S32: Based on each embedded device identifier in the embedded device set, call the corresponding task execution and image retention list, and determine the task execution idle period and the current image storage information of each embedded device according to the task execution period and the current image storage information of each embedded device recorded in the task execution and image retention list.

[0062] In this embodiment, it is necessary to obtain the identifier of the embedded device in the idle state, and then use this identifier of the embedded device to query the task execution period of the embedded device and the embedded image stored in the current embedded image module in the task execution and image retention list of each embedded device, and determine the task execution idle period of each embedded device during the target period.

[0063] In a preferred embodiment, step S4 specifically includes:

[0064] S41: Obtain the network condition prediction information of the container engine during the target period; wherein, the network condition prediction information is configured as the network bandwidth condition allocated to the container engine during the target period;

[0065] S42: According to the image demand information of each embedded device running tasks and the task execution idle period of each embedded device, considering the current image storage information of each embedded device and the network communication bandwidth allocated to the container engine during the target period, taking that the embedded image stored at each moment during the target period in each embedded device contains the required image category of the embedded device at that moment as the first constraint condition, taking that the network bandwidth condition during two adjacent image adjustment actions of each embedded device meets the network conditions required for importing the embedded image from the container engine to the embedded device as the second constraint condition, taking that the space occupied by the embedded image in the embedded image module of each embedded device at each moment during the target period is less than the storage space allocated to the embedded device as the third constraint condition, and taking the minimum number of times of importing the embedded image from the OCI image module of the container engine to the embedded image module of the embedded device by all embedded devices during the target period as the goal, solve the image storage information of the embedded image module of each embedded device at each moment during the target period;

[0066] S43: According to the image storage information of the embedded image module of each embedded device at each moment during the target period, solve the image adjustment strategy and task allocation strategy of each embedded device.

[0067] Furthermore, step S43 specifically includes:

[0068] S431: Generate an image adjustment strategy for each embedded device according to the image storage information of the embedded image module of each embedded device at each moment in the target period, based on the differences in the image storage information between adjacent moments.

[0069] S432: Generate a task allocation strategy for each embedded device by allocating the running tasks of the embedded devices to the corresponding embedded devices according to the image storage information of the embedded image module of each embedded device at each moment in the target period and the image requirement information of the running tasks of each embedded device.

[0070] In this embodiment, according to the task execution idle period of the embedded device and the current image storage information, considering factors such as the sequence of the execution time of the running tasks of the embedded device and the embedded image adjustment time, the network condition between the embedded device and the container engine, and the number of embedded image adjustments, etc., allocate and generate the image adjustment strategies for several running tasks of the embedded devices within the target period.

[0071] It should be noted that the finally obtained image adjustment strategy is: the types of embedded images stored in the embedded image module of each embedded device at each moment within the target period; the finally obtained task allocation strategy is: the embedded device to which each running task of the embedded device is allocated. Thus, through the generation of the image adjustment strategy and the task allocation strategy, it is possible to guide the image conversion actions and task allocation actions between the container engine and the embedded devices at different moments within the target period, and improve the control rationality of switching the OCI image in the container engine to the embedded image and storing it in the embedded device when the embedded device group executes multiple tasks, ensuring the adaptation of the task execution of the embedded device to the image.

[0072] In a preferred embodiment, step S5 specifically includes:

[0073] S51: Use the image adjustment strategy to control the image conversion action between the OCI image module in the container engine and the embedded image module of the corresponding embedded device at the corresponding moment within the target period.

[0074] S52: Use the task allocation strategy to perform the task allocation action of each running task of the embedded device to the corresponding embedded device.

[0075] Further, in step S51, the OCI image module in the container engine and the embedded image module of the corresponding embedded device perform an image conversion action, which specifically includes: using the OverlayFS tool to assemble the OCI image module for performing image conversion in the OCI image module of the container engine and map it to the OCI image temporary directory, and realizing the image conversion action by copying the OCI image temporary directory to the embedded image temporary directory and then importing it into the embedded image directory.

[0076] In this embodiment, after obtaining the image adjustment policy and the task allocation policy, in order to achieve the best execution process of multiple tasks by the embedded device group within the target period, first, at the corresponding moment within the target period, control the OCI image module in the container engine and the embedded image module of the corresponding embedded device to perform an image conversion action (i.e., complete the conversion and import of the OCI image to the embedded image at the corresponding moment), and then perform the task allocation of each embedded device running task to the corresponding embedded device.

[0077] In a preferred embodiment, the method further includes step S6: The user selects the corresponding embedded device to execute the current embedded device running task according to the task allocation action of the embedded device running task to the corresponding embedded device.

[0078] In this embodiment, after the task allocation is executed, each embedded device executes the assigned embedded device running task at the corresponding moment, and each embedded device adjusts the embedded image stored in the embedded image module according to the image adjustment policy.

[0079] In addition, the present invention also proposes a conversion device for OCI images and embedded images in an embedded environment. The conversion device for OCI images and embedded images in the embedded environment includes: a memory, a processor, and a conversion program for OCI images and embedded images in the embedded environment stored on the memory and executable on the processor. When the conversion program for OCI images and embedded images in the embedded environment is executed by the processor, the steps of the conversion method for OCI images and embedded images in the embedded environment as described above are implemented.

[0080] The specific implementation manners of the conversion device for OCI images and embedded images in the embedded environment of the present application are basically the same as those of the embodiments of the conversion method for OCI images and embedded images in the embedded environment described above, and will not be elaborated here.

[0081] It should be understood that in the description of this specification, the descriptions referring to terms such as "one embodiment", "another embodiment", "other embodiments", or "the first embodiment to the Nth embodiment" mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0082] It should be noted that in this text, the term "comprising", "including", or any other variant thereof is intended to cover a non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article, or system. Without further limitation, an element defined by the statement "comprising an..." does not exclude the existence of additional identical elements in the process, method, article, or system comprising such element.

[0083] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.

Claims

1. A method for converting an OCI image and an embedded image in an embedded environment, characterized in that: The method comprises the following steps: S1: Acquire a number of embedded device running tasks in a target period; wherein each of the embedded device running tasks includes a task execution type and a task execution period; S2: Based on the task execution type and task execution period, generate image requirement information for each embedded device to run the task; S3: Obtain an idle embedded device set within a target period, call a corresponding task execution and image retention list based on each embedded device identifier in the embedded device set, and extract the task execution idle period and current image storage information of each embedded device; S4: according to the image demand information of each embedded device running task and the idle period of task execution of each embedded device, considering the current image storage information of each embedded device and the network status prediction information of the container engine in the target period, several embedded device running tasks in the target period are allocated, and the image adjustment strategy and task allocation strategy are generated; S5: Utilizing the image adjustment strategy and the task allocation strategy, executing the image conversion action and the task allocation action between the container engine and the embedded device.

2. The method for converting an OCI image and an embedded image in an embedded environment as claimed in claim 1, characterized in that: Step S1 specifically includes: S11: when the server receives the embedded device requirements sent by the user, it generates an embedded device requirement list according to the requirement period in each embedded device requirement and arranges them in chronological order; S12: calling the embedded device requirement list stored in the server, determining the task execution type of the embedded device requirement according to the usage scenario description in each embedded device requirement, and then selecting several embedded device running tasks in the target period based on the requirement period of the embedded device requirement.

3. The method for converting an OCI image and an embedded image in an embedded environment as claimed in claim 2, characterized in that: In step S12, the task execution type required by the embedded device is determined according to the usage scenario description in each embedded device requirement, specifically including: S121: extracting a plurality of scenario function keywords described in the usage scenario in each embedded device requirement and a plurality of task execution keywords corresponding to each task execution type of the embedded device; S122: Based on a number of scenario function keywords and a number of task execution keywords, calculate the correlation between each embedded device requirement and each task execution type, and determine the task execution type of each embedded device requirement with the highest correlation.

4. The method for converting an OCI image and an embedded image in an embedded environment as claimed in claim 1, characterized in that: Step S2 specifically includes: S21: Based on the task execution type, matching the required image category of each embedded device running task in the mapping relationship between different task execution types and image categories recorded in the image database; S22: Generate image requirement information for each embedded device running task by using the required image category and the task execution period.

5. The method for converting an OCI image and an embedded image in an embedded environment as claimed in claim 1, characterized in that: Step S3 specifically includes: S31: querying embedded devices that are in an idle state within a target period, and constructing the identifiers of the embedded devices in the idle state into an embedded device set; S32: Based on each embedded device identifier in the embedded device set, call the corresponding task execution and image retention list, and determine the task execution idle period and current image storage information of each embedded device according to the task execution period and current image storage information of each embedded device recorded in the task execution and image retention list.

6. The method for converting an OCI image and an embedded image in an embedded environment as claimed in claim 1, characterized in that: Step S4 specifically includes: S41: Obtain network status prediction information of the container engine within the target time period; wherein the network status prediction information is configured as the network bandwidth status allocated to the container engine within the target time period; S42: Based on the image requirement information of each embedded device running tasks and the idle period of task execution of each embedded device, the current image storage information of each embedded device and the network communication bandwidth allocated to the container engine in the target period are considered, and the embedded image stored by each embedded device at each moment in the target period contains the image category required by the embedded device at that moment as the first constraint condition, and the network bandwidth status of each embedded device during two consecutive executions of image adjustment actions satisfies the network conditions required for the embedded image to be imported from the container engine to the embedded device as the second constraint condition, and the space occupied by the embedded image in the embedded image module of each embedded device at each moment in the target period is less than the storage space allocated to the embedded device as the third constraint condition, and the number of times that all embedded devices import the embedded image from the OCI image module of the container engine to the embedded image module of the embedded device within the target period is minimized as the goal, and the image storage information of the embedded image module of each embedded device at each moment in the target period is solved; S43: solving the image adjustment strategy and task allocation strategy of each embedded device according to the image storage information of the embedded image module of each embedded device at each moment in the target period.

7. The method for converting an OCI image and an embedded image in an embedded environment as claimed in claim 6, characterized in that: Step S43 specifically includes: S431: generating an image adjustment strategy for each embedded device according to the image storage information of the embedded image module of each embedded device at each moment in the target period and according to the difference between the image storage information at adjacent moments; S432: According to the image storage information of the embedded image module of each embedded device at each moment in the target period, according to the image requirement information of each embedded device running task, the embedded device running task is allocated to the corresponding embedded device, and a task allocation strategy for each embedded device is generated.

8. The method for converting an OCI image and an embedded image in an embedded environment as claimed in claim 1, characterized in that: Step S5 specifically includes: S51: using the image adjustment strategy, controlling the OCI image module in the container engine and the embedded image module of the corresponding embedded device to perform an image conversion action at a corresponding time within a target period; S52: Utilizing the task allocation strategy, executing a task allocation action of each embedded device running the task to the corresponding embedded device.

9. The method for converting an OCI image and an embedded image in an embedded environment as claimed in claim 8, characterized in that: In step S51, the OCI image module in the container engine and the embedded image module of the corresponding embedded device perform an image conversion action, specifically including: using the OverlayFS tool to assemble the OCI image module that performs image conversion in the OCI image module of the container engine and map it to the OCI image temporary directory, and by copying the OCI image temporary directory to the embedded image temporary directory and then importing it into the embedded image directory, the image conversion action is realized.

10. The method for converting an OCI image and an embedded image in an embedded environment according to claim 1, characterized in that: The method further comprises step S6: the user selects the corresponding embedded device to execute the current embedded device running task according to the task allocation action of the embedded device running task to the corresponding embedded device.

Citation Information

Patent Citations

  • Application deployment method and device

    CN111611054A

  • Task scheduling method and system

    CN113672368A