Edge operating system software construction method and device, electronic equipment and storage medium

By using preset independent virtualized cluster information in the edge operating system software construction, the problems of high cost and low flexibility in server resources in the existing technology are solved, and software construction with lower cost and higher flexibility is achieved.

CN120066462APending Publication Date: 2025-05-30SEAWAY TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411939706.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

In the prior art, the edge operating system software construction method has the problem of high server resource costs and low flexibility.

Method used

By receiving software construction task requests, the construction identifier of the corresponding architecture is extracted, and the preset independent virtualization cluster information matching the construction identifier is determined as the target independent virtualization cluster information, and the construction task results are constructed based on the target independent virtualization cluster information and combined with the software construction task requests to generate the software construction task results.

Benefits of technology

Effectively reduce server resource costs and improve software construction flexibility, solving the problems of high server resource costs and low flexibility in software construction methods in the existing technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120066462A_ABST
    Figure CN120066462A_ABST
Patent Text Reader

Abstract

The invention relates to an edge operating system software construction method and device, electronic equipment and a storage medium, and the edge operating system software construction method comprises the steps: receiving a software construction task request, and extracting a construction identifier of a corresponding architecture from the software construction task request; establishing an identifier, determining preset independent virtualization cluster information matched with the establishment identifier as target independent virtualization cluster information, then performing establishment based on the target independent virtualization cluster information in combination with the software establishment task request, and generating a software establishment task result corresponding to the software establishment task request; therefore, the software can be constructed by using the preset independent virtualization cluster information, the resource cost of the server is effectively reduced, the flexibility is improved, and the problems that the resource cost of the server is relatively high and the flexibility is low in a software construction mode in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for constructing an edge operating system software. Background Art

[0002] With the wide application and technological implementation of edge computing, the functions supported by various edge-side servers and high-performance embedded terminals are becoming more and more complex, and the demand groups and demand densities are also more massive. Considering costs, balancing computing power and energy consumption, more and more lightweight applications are migrated from the original cloud server side to the edge side, which has led to a sharp increase in the complexity of edge system software.

[0003] For the construction of edge operating system software, in the existing related technologies, the functions of software construction and distribution services provided by SUSE OBS are usually used for construction; however, the deployment of SUSE OBS usually requires an OBS-sever to provide a management node and multiple OBS-worker servers to implement the construction and distribution of software packages, that is, the cooperation of multiple servers is required, and SUSE OBS does not support cross-architecture compilation, resulting in the problems of high server resource costs and low flexibility in the existing software construction methods. Summary of the Invention

[0004] The present application provides a method, device, electronic device and storage medium for constructing an edge operating system software to solve the problems of high server resource costs and low flexibility in the existing software construction methods.

[0005] In a first aspect, the present application provides a method for constructing an edge operating system software, including:

[0006] Receiving a software construction task request;

[0007] Extracting a construction identifier corresponding to the architecture from the software construction task request;

[0008] Determining the preset independent virtualization cluster information matching the construction identifier as the target independent virtualization cluster information; wherein, the preset independent virtualization cluster information includes construction environments of different architectures;

[0009] Based on the target independent virtualization cluster information, combining with the software construction task request for construction to generate a software construction task result corresponding to the software construction task request.

[0010] Optionally, after extracting the construction identifier corresponding to the architecture from the software construction task request, it further includes:

[0011] Obtaining at least one registered entity machine information corresponding to the local machine;

[0012] Based on the registered physical machine information, determine whether there is a callable physical machine corresponding to the build identifier;

[0013] In the case where there is no callable physical machine corresponding to the build identifier, obtain at least one piece of the preset independent virtualization cluster information corresponding to this machine, and determine whether the build identifier matches each piece of the preset independent virtualization cluster information.

[0014] Optionally, the determining whether there is a callable physical machine corresponding to the build identifier based on the registered physical machine information includes:

[0015] Extract identifiers for each piece of the registered physical machine information to obtain physical machine identifiers;

[0016] Determine whether the physical machine identifier matches the build identifier;

[0017] In the case where the physical machine identifier does not match each of the build identifiers, determine that there is no callable physical machine corresponding to the build identifier;

[0018] In the case where the physical machine identifier matches the build identifier, determine whether the target registered physical machine corresponding to the physical machine identifier is callable;

[0019] In the case where the target registered physical machine is not callable, determine that there is no callable physical machine corresponding to the build identifier.

[0020] Optionally, the determining the preset independent virtualization cluster information that matches the build identifier as the target independent virtualization cluster information includes:

[0021] Obtain at least one piece of preset independent virtualization cluster information;

[0022] Determine the virtual environment identifier corresponding to the preset independent virtualization cluster information;

[0023] Judge whether the virtual environment identifier matches the build identifier;

[0024] In the case where the virtual environment identifier matches the build identifier, determine the preset independent virtualization cluster information corresponding to the virtual environment identifier as the target independent virtualization cluster information.

[0025] Optionally, the generating the software build task result corresponding to the software build task request based on the target independent virtualization cluster information and in combination with the software build task request includes:

[0026] According to the software build task request, obtain the software package to be built;

[0027] Produce the target root file system information based on the software package to be built.

[0028] Determine the target isolation environment path corresponding to the target independent virtualization cluster information.

[0029] Perform architecture registration and configuration based on the target isolation environment path to obtain a configuration result.

[0030] Use the target root file system information and combine it with the configuration result to perform software construction and generate the software construction task result.

[0031] Optionally, the step of using the target root file system information and combining it with the configuration result to perform software construction and generate the software construction task result includes:

[0032] Use the target root file system information and combine it with the configuration result to perform software construction to obtain a constructed software package.

[0033] Destroy the target root file system information to obtain a destruction result.

[0034] Generate the software construction task result based on the constructed software package and the destruction result.

[0035] Optionally, the step of using the target root file system information and combining it with the configuration result to perform software construction and generate the software construction task result includes:

[0036] Determine the target isolation environment corresponding to the target independent virtualization cluster information.

[0037] Add a preset execution process to the target isolation environment.

[0038] Through the preset execution process, combine the target root file system information and the configuration result to perform software construction and generate the software construction task result.

[0039] In a second aspect, the present application provides an edge operating system software construction device, including:

[0040] A receiving module, configured to receive a software construction task request.

[0041] An extraction module, configured to extract a construction identifier corresponding to the architecture from the software construction task request.

[0042] A determination module, configured to determine the preset independent virtualization cluster information that matches the construction identifier as the target independent virtualization cluster information; wherein, the preset independent virtualization cluster information includes construction environments for different architectures.

[0043] A building module for building based on the target independent virtualization cluster information and in combination with the software building task request to generate a software building task result corresponding to the software building task request.

[0044] In a third aspect, an electronic device is provided, including a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete communication with each other through the communication bus;

[0045] The memory is used to store a computer program;

[0046] When the processor is used to execute the program stored on the memory, it implements the edge operating system software building method described in any item of the first aspect.

[0047] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it implements the edge operating system software building method described in any item of the first aspect.

[0048] In the embodiments of the present application, by receiving a software building task request, the building identifier corresponding to the architecture is extracted from the software building task request, and the preset independent virtualization cluster information matching the building identifier is determined as the target independent virtualization cluster information. Among them, the preset independent virtualization cluster information contains building environments of different architectures. Subsequently, based on the target independent virtualization cluster information and in combination with the software building task request, a build is performed to generate a software building task result corresponding to the software building task request; thus, the preset independent virtualization cluster information can be used for software building, thereby effectively reducing the server resource cost and improving flexibility, and solving the problems of high server resource cost and low flexibility existing in the software building methods in the related art. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 It is a schematic flowchart of an edge operating system software building method provided by an embodiment of the present application;

[0050] Figure 2 It is a schematic diagram of an application scenario of an edge operating system software building method provided by an embodiment of the present application;

[0051] Figure 3 It is another schematic diagram of an application scenario of an edge operating system software building method provided by an embodiment of the present application;

[0052] Figure 4 It is a schematic structural diagram of an edge operating system software building device provided by an embodiment of the present application;

[0053] Figure 5A schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0054] The following will describe the implementation manners of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through different specific implementation manners. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for explaining the present invention and not for limiting the protection scope of the present invention.

[0055] The operating system is the core software of a computer system. It is responsible for managing hardware resources, providing a basic environment for application programs to run, and coordinating multiple tasks in the system. In the rapid development of information technology, the operating system has evolved from single-tasking to multi-tasking, from single-user to multi-user, and from simple architectures to complex architectures. Nowadays, with the wide application of emerging technologies such as the Internet, Internet of Things, artificial intelligence, and cloud computing, the requirements for the functions, security, performance, and customization of operating systems are also increasing day by day. How to build a new type of operating system that can meet modern computing needs has become a common concern in the academic and industrial fields.

[0056] Traditional operating systems usually aim at generality and support multiple hardware architectures and application scenarios. Although this design provides broad compatibility and function support, it also brings problems such as complex architectures, high resource consumption, and insufficient performance optimization. Especially in modern computing environments, the requirements for operating systems in embedded systems, Internet of Things devices, cloud computing platforms, and artificial intelligence applications have become more specialized and refined. This demand has prompted developers to pursue higher customization and lightweight in operating system design in order to better meet the requirements of specific fields and applications.

[0057] Customized construction of operating systems for specific hardware platforms can achieve significant improvements in performance optimization, resource management, and security. For example, the requirements for operating systems in embedded systems and Internet of Things devices focus on the efficient utilization of resources and low-power management. However, the hardware resources of these small devices are limited, and traditional general-purpose operating systems often result in resource waste due to their excessive redundant functions. In addition, with the rise of edge computing, edge devices require lightweight operating systems to handle a large number of distributed tasks, further demanding that the operating system has good real-time performance and reliability. On the other hand, the widespread application of cloud computing platforms has also promoted the further evolution of operating system architectures. In a cloud environment, the operating system needs to be able to support large-scale virtualization and containerization technologies while ensuring efficient resource scheduling and isolation. To achieve the efficiency and flexibility of large-scale distributed computing, the construction method of the operating system needs to have characteristics such as dynamically adapting to hardware changes, intelligent resource management, and security support for multi-tenant environments.

[0058] With the diversification and complexity of modern computing scenarios, the number of various architectures and their corresponding software has been increasing, making it necessary to build software under the architectures that need to be adapted. There are mainly two existing software construction methods:

[0059] One is to build through SUSE OBS. SUSE OBS is an integrated construction and release platform designed specifically for the Linux and open-source software ecosystems. It provides functions such as automated software package construction, dependency resolution, and release management, enabling developers to manage the software construction and release processes more efficiently.

[0060] The main functions are as follows: Automated construction: SUSE OBS can automatically detect changes in the code repository and trigger construction tasks to generate new software packages. Dependency resolution: It automatically processes the dependency relationships between software packages to ensure the accuracy and integrity of the construction. Multi-platform support: It supports construction on multiple Linux distributions and architectures, including SUSE, Ubuntu, Fedora, etc. Release management: It can conveniently release the constructed software packages to multiple repositories for users to download and install.

[0061] SUSE OBS is generally used to build large Linux distribution systems, facilitating enterprises to automate the construction and release of their software, improving the release efficiency and quality. At the same time, open-source projects can use SUSE OBS to collaborate on the development and management of software packages, facilitating community members to participate in contributions.

[0062] In the construction of large Linux distribution systems, its advantages are obvious. First, it provides an intuitive Web interface and rich documentation resources, enabling developers to get started easily. Second, it supports custom build scripts and plugins to meet diverse build requirements. Finally, it adopts strict permission management and security audit functions to ensure the security during the build process.

[0063] Another way is to build through Buildroot and Yocto. Buildroot and Yocto are frameworks for building embedded Linux systems. They both consist of a set of tools, frameworks, and Makefile scripts to automate the build process. However, in actual use, these two sets of tools are still different.

[0064] Yocto is a powerful tool framework for large-scale embedded system development. It is designed specifically for building highly customizable and flexible systems, providing extremely high scalability. It allows developers to perform detailed configuration and optimization for different hardware platforms, operating systems, and application requirements. At the same time, it has powerful metadata and a hierarchical structure, supporting fine-grained customization of complex systems. Developers can define and control the configuration and dependencies of all software packages according to specific needs. It provides rich package management and version control mechanisms, supports complex dependency management, and ensures the reproducibility of the system.

[0065] Buildroot is a lightweight tool aimed at quickly building a simplified embedded Linux system. It provides many pre-configured packages and tools, but its customization ability is limited.

[0066] Although the above methods can be used for software construction, for SUSE OBS, although it can provide high-quality software components and distribution services, SUSE OBS does not support cross-architecture compilation. That is to say, cross-architecture compilation must have corresponding hosting entities, such as specific physical machine servers. Although Buildroot and Yocto support cross-architecture compilation and one machine can meet the compilation work of multiple architectures, their customization level is limited, the number of software packages is small, and software package maintenance depends mainly on open-source contributors, resulting in problems of poor security and flexibility. That is, the existing software construction methods have problems of high server resource costs and low flexibility.

[0067] To solve the problems of high server resource costs and low flexibility in the existing related software construction methods, the present application provides a method, apparatus, electronic device, and storage medium for constructing an edge operating system software. By receiving a software construction task request, extracting a construction identifier corresponding to the architecture from the software construction task request, and determining the preset independent virtualization cluster information that matches the construction identifier as the target independent virtualization cluster information, and then based on the target independent virtualization cluster information, combining with the software construction task request for construction to generate a software construction task result corresponding to the software construction task request; thus, the preset independent virtualization cluster information can be used for software construction, thereby effectively reducing the server resource cost and improving flexibility, and solving the problems of high server resource costs and low flexibility in the existing related software construction methods.

[0068] Figure 1 This is a schematic flowchart of a method for constructing an edge operating system software provided by an embodiment of the present application. This method can be applied to one or more electronic devices such as servers and terminal devices. In addition, the execution subject of this method can be hardware or software. When the above execution subject is hardware, the execution subject can be one or more of the above electronic devices. For example, a single electronic device can execute this method, or multiple electronic devices can cooperate with each other to execute this method. When the above execution subject is software, this method can be implemented as multiple software or software modules, or can be implemented as a single software or software module. No specific limitation is made here.

[0069] As Figure 1 shown, a method for constructing an edge operating system software provided by an embodiment of the present application can specifically include the following steps:

[0070] Step S110: Receive a software construction task request.

[0071] Among them, the software construction task request can represent a request for requesting software construction. The software construction task request can be sent by the user according to needs, or can be adaptively generated according to specific application requirements. No specific limitation is made in this embodiment.

[0072] Step S120: Extract a construction identifier corresponding to the architecture from the software construction task request.

[0073] Specifically, after receiving the software construction task request, the construction identifier corresponding to the architecture can be extracted from the software construction task request. The construction identifier can represent the identifier corresponding to the construction environment architecture required for the current construction task. Of course, the software construction task request can include one or more construction identifiers.

[0074] In one example, for instance, currently it is necessary to build Software A and the building needs to be carried out under two architectures, namely the N environment architecture and the M environment architecture respectively; at this time, the building identifiers that can be extracted from the software building task request corresponding to building Software A can be two building identifiers, namely building identifier N and building identifier M; of course, the above is only for illustrative purposes and this embodiment does not make specific limitations thereon.

[0075] Step S130: Determine the preset independent virtualization cluster information that matches the building identifier as the target independent virtualization cluster information; wherein, different building environments of different architectures are included in the preset independent virtualization cluster information.

[0076] Specifically, after determining the building identifier, one or more pieces of preset independent virtualization cluster information configured in advance can be obtained. The preset independent virtualization cluster information can represent a pre-built isolation environment, that is, different building environments of different architectures can be included in different preset independent virtualization cluster information, and the building environment is a pre-built isolation environment; thus, the building identifier can be matched with each piece of preset independent virtualization cluster information, and the preset independent virtualization cluster information that matches the building identifier is determined as the target independent virtualization cluster information.

[0077] Specifically, the preset independent virtualization cluster information in this embodiment can be created by using the binfmt_misc technology and the chroot file isolation technology. Among them, Binfmt_misc is a function provided by the Linux kernel that is similar to file association on Windows. What is more powerful than file association is that it can not only judge according to the file suffix name, but also use different programs to open according to the file content (Magic Bytes).

[0078] In one example, qemu can be used to run binary files on other architecture platforms. In this process, by configuring binfmt_misc, binary programs of different architectures can implement software simulation or binary instruction translation through the qemu emulator to support cross-architecture chroot. In addition, Chroot is a mechanism built into the Linux system that allows users to change the root directory of a certain process, so that this program cannot access other directories outside the directory. By restricting the files and directories that the program can access, chroot can prevent the program from accessing system critical files, thereby enhancing the security of the system. The functions of chroot are as follows:

[0079] 1. Create an isolation environment: chroot can create an independent and isolated environment for running specific programs or services. In this environment, the program can only access and view the files imported into the chroot directory and cannot interfere with the operation of the basic system.

[0080] 2. In a chroot environment, users can safely test the static compilation of software and independent development unrelated to the system without changing the files of the actual system.

[0081] Therefore, this embodiment can create one or more isolation associations by combining the use of "chroot" for process isolation and "binfmt_misc" to achieve cross-platform binary support, so as to meet the requirements of task processing for different architectures. For example Figure 2 As shown, based on SUSE OBS in a machine device, Virt-worker1 corresponding to x86, Virt-worker2 corresponding to Aarch64, and Virt-worker3 corresponding to Loongarch64 are created. Virt-worker1, Virt-worker2, and Virt-worker3 belong to isolation environments corresponding to three different architectures, and different preset independent virtualization cluster information can be used to represent the virtualization cluster information related to the three different isolation environments of Virt-worker1, Virt-worker2, and Virt-worker3; more specifically, the preset independent virtualization cluster information may include, but is not limited to, information such as the identifier and address corresponding to the isolation environment. Of course, the creation of the above isolation environment is only for illustrative purposes, and this embodiment does not make specific limitations on this.

[0082] Step S140: Based on the target independent virtualization cluster information, combine with the software construction task request for construction to generate a software construction task result corresponding to the software construction task request.

[0083] Specifically, after determining the target independent virtualization cluster information, it is possible to combine with the software construction task request for construction based on the target independent virtualization cluster information to generate a software construction task result corresponding to the software construction task request. Among them, the software construction task result can represent the result after the software construction is completed, that is, the software construction task result can be a software construction success result or a software construction failure result. The software construction success result can be used to represent the result of successful software construction, and the software construction failure result can be used to represent the result of failed software construction.

[0084] Specifically, during the software construction process, it is possible to determine the target isolation environment corresponding to the target independent virtualization cluster information, and perform software construction in this target isolation environment. For example, in the case where the construction identifiers extracted from the software construction task request include construction identifier N and construction identifier M, the target independent virtualization cluster information N corresponding to construction identifier N and the target independent virtualization cluster information B corresponding to construction identifier N can be determined as the target independent virtualization cluster information. Thus, the isolation environment x86 corresponding to the target independent virtualization cluster information A can be determined as the target isolation environment x86, and the isolation environment Aarch64 corresponding to the target independent virtualization cluster information A can be determined as the target isolation environment Aarch64. Furthermore, construction can be carried out in the target isolation environment x86 in combination with the software construction task request, and construction can be carried out in the target isolation environment Aarch64 in combination with the software construction task request, achieving the construction of software with different architectures in multiple different isolation environments.

[0085] It can be seen that in this embodiment, by receiving a software construction task request, the construction identifier corresponding to the architecture is extracted from the software construction task request, and the preset independent virtualization cluster information matching the construction identifier is determined as the target independent virtualization cluster information. Subsequently, based on the target independent virtualization cluster information, construction is carried out in combination with the software construction task request to generate a software construction task result corresponding to the software construction task request. That is to say, during the software construction process in this embodiment, the preset independent virtualization cluster information can be used for software construction without relying on a physical machine server, thereby effectively reducing the server resource cost and improving flexibility, and solving the problems of high server resource cost and low flexibility existing in the software construction method in the existing related technologies.

[0086] In an alternative embodiment of the present application, after step S120 extracts the construction identifier corresponding to the architecture from the software construction task request, it further includes: obtaining at least one registered physical machine information corresponding to the local machine; judging whether there is a callable physical machine corresponding to the construction identifier based on the registered physical machine information; in the case where there is no callable physical machine corresponding to the construction identifier, obtaining at least one preset independent virtualization cluster information corresponding to the local machine, and determining whether the construction identifier matches each preset independent virtualization cluster information.

[0087] In this embodiment, after extracting the build identifier corresponding to the architecture from the software build task request, at least one registered physical machine information corresponding to the local machine can be obtained; where the local machine can represent an execution main device such as a server or a terminal device for executing the edge operating system software build method, and the registered physical machine information can represent the physical machine information pre-established with the local machine; thus, it can be determined whether there is a callable physical machine corresponding to the build identifier according to the registered physical machine information, and the callable physical machine can represent a physical machine server that matches the build identifier and can be called; in the case where there is a callable physical machine corresponding to the build identifier, the callable physical machine can be directly called to respond to the software build task request, start the build, and generate a software build task result corresponding to the software build task request. In the case where there is no callable physical machine corresponding to the build identifier, it means that among the physical machine servers pre-registered with the local machine, there is no physical machine server that matches the build identifier and / or can be called. At this time, at least one preset independent virtualization cluster information corresponding to the local machine can be obtained, and it can be determined whether the build identifier matches each preset independent virtualization cluster information.

[0088] It can be seen that in this embodiment, after determining the build identifier, it can be judged whether there is a callable physical machine currently through the registered physical machine information; and in the case where there is no callable physical machine corresponding to the build identifier, at least one preset independent virtualization cluster information corresponding to the local machine is obtained, and the software build process is completed by using the preset independent virtualization cluster information through subsequent steps; that is, in this embodiment, while being compatible with the existing related technologies that use physical machines for software build, it can also complete the software build through the preset independent virtualization cluster information in the case where there is no callable physical machine, so that fewer or no physical machines can be pre-configured, thereby effectively reducing the server resource cost and improving the flexibility.

[0089] In one example, as Figure 2 shown, Virt-worke1, Virt-worker2, Virt-worker3 represent the isolation environments corresponding to the preset independent virtualization cluster information in the local machine; the OBS scheduler, OBS-sever, and web-UI service represent the OBS services in the local machine, where the OBS scheduler can be the execution main body of the edge operating system software build method in this embodiment; Obs-worker1, Obs-worker2, Obs-worker3 represent the physical machine server environments represented by the registered physical machine information.

[0090] In an optional embodiment of the present application, determining whether there is a callable physical machine corresponding to a build identifier based on the registered physical machine information includes: extracting an identifier for each registered physical machine information to obtain a physical machine identifier; determining whether the physical machine identifier matches the build identifier; in the case where the physical machine identifier does not match any of the build identifiers, determining that there is no callable physical machine corresponding to the build identifier; in the case where the physical machine identifier matches the build identifier, determining whether the target registered physical machine corresponding to the physical machine identifier is callable; in the case where the target registered physical machine is not callable, determining that there is no callable physical machine corresponding to the build identifier.

[0091] In the process of determining whether there is a callable physical machine corresponding to a build identifier based on the registered physical machine information in this embodiment, an identifier can be extracted for each registered physical machine information to obtain a physical machine identifier, and the physical machine identifier can represent the identifier of the architecture to which the physical machine belongs, such as an x86 architecture identifier, an Aarch64 architecture identifier, or a Loongarch64 architecture identifier, etc.; thus, it can be determined whether the physical machine identifier matches the build identifier. The specific matching method can be to determine whether the physical machine identifier is the same as the build identifier. For example, if the physical machine identifier is an x86 architecture identifier and the build identifier is an x86 architecture identifier, then the two are the same and it can be determined that the physical machine identifier matches the build identifier; that is, in the case where the physical machine identifier matches the build identifier, it can then be determined whether the target registered physical machine corresponding to the physical machine identifier is callable. The target registered physical machine can represent the specific physical machine server corresponding to the physical machine identifier, and the method for determining whether the target registered physical machine is callable can include but is not limited to determining whether the target registered physical machine is running normally, determining whether the target registered physical machine can still receive software build task requests, determining whether communication can be established between the local machine and the target registered physical machine, etc. This embodiment does not make specific limitations in this regard. In the case where the target registered physical machine is callable, it can be determined that there is a callable physical machine corresponding to the build identifier; while in the case where the target registered physical machine is not callable, it can be determined that there is no callable physical machine corresponding to the build identifier.

[0092] In an optional embodiment of the present application, step S130 determines the preset independent virtualization cluster information that matches the build identifier as the target independent virtualization cluster information, including: obtaining at least one preset independent virtualization cluster information; determining the virtual environment identifier corresponding to the preset independent virtualization cluster information; determining whether the virtual environment identifier matches the build identifier; in the case where the virtual environment identifier matches the build identifier, determining the preset independent virtualization cluster information corresponding to the virtual environment identifier as the target independent virtualization cluster information.

[0093] After obtaining the construction identifier in this embodiment, at least one preset independent virtualization cluster information can be obtained, and the virtual environment identifier corresponding to each preset independent virtualization cluster information can be determined. The virtual environment identifier can be an identifier indicating the structure to which the isolation environment corresponding to the preset independent virtualization cluster information belongs, such as an x86 architecture identifier, an Aarch64 architecture identifier, or a Loongarch64 architecture identifier, etc.; thus, it can be determined whether the virtual environment identifier matches the construction identifier. The specific method can be to determine whether the virtual environment identifier is the same as the construction identifier. For example, if the virtual environment identifier is an x86 architecture identifier and the construction identifier is an x86 architecture identifier, in this case, if the two are the same, it can be determined that the virtual environment identifier matches the construction identifier; that is, when the virtual environment identifier matches the construction identifier, the preset independent virtualization cluster information corresponding to the virtual environment identifier can be determined as the target independent virtualization cluster information.

[0094] In an alternative embodiment of the present application, based on the target independent virtualization cluster information, a software build task result corresponding to the software build task request is generated by combining with the software build task request, including: obtaining the software package to be built according to the software build task request; making the root file system based on the software package to be built to obtain the target root file system information; determining the target isolation environment path corresponding to the target independent virtualization cluster information; performing architecture registration configuration according to the target isolation environment path to obtain a configuration result; and using the target root file system information and combining with the configuration result to perform software construction to generate a software build task result.

[0095] In the process of building based on the target independent virtualization cluster information combined with the software construction task request in this embodiment, the software package to be built can be obtained according to the software construction task request. The software package to be built can represent the source package waiting to be built, and the source package can include but is not limited to source code, configuration files, documents, etc. Thus, dependency analysis can be performed based on the software package to be built. After the dependency analysis, the root file system can be made to obtain the target root file system information, which can represent the information related to the basic files and directory structure required to provide the startup and running of the software package to be built. Then, the target isolation environment path corresponding to the target independent virtualization cluster information can be determined, and the target isolation environment path can represent the path of the isolation environment represented by the target independent virtualization cluster information. Furthermore, architecture registration configuration can be performed according to the target isolation environment path to obtain the configuration result. Among them, the architecture registration configuration can be binfmt_misc configuration, and the binfmt_misc configuration is the configuration for supporting the running of cross-architecture application programs, and the configuration result can represent the result of whether the architecture registration configuration is successful. That is, after obtaining the configuration result, it can be determined whether the configuration result is a successful configuration result. In the case where the configuration result is a successful configuration result, the target root file system information can be used for software construction to generate the software construction task result.

[0096] Specifically, the dependency analysis in this embodiment can represent parsing the dependency relationship of the software package to be built to ensure the integrity and repeatability of the construction process, and can include but is not limited to steps such as compiling code, running tests, and generating software packages. After parsing the specific dependency relationship of the software package to be built, it can be queried from the repository whether the relevant dependency packages are available and downloaded and installed before the construction. And the root file system making can be making the root file system according to the dependency packages obtained after the dependency analysis.

[0097] In an example, when the architecture registration configuration is binfmt_misc configuration, the specific configuration process can be as follows:

[0098] 1. Register binfmt_misc

[0099] In order to enable the Linux kernel to use tools such as qemu-arm, qemu-aarch64, qemu-loongarch64 to run executable files of other architectures, they need to be registered through / proc / sys / fs / binfmt_misc. Ensure the permission to write to binfmt_misc:

[0100] echo':qemuarm:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02:\n

[0101] / usr / bin / qemu-arm%O%o':|sudo tee

[0102] / proc / sys / fs / binfmt_misc / register

[0103] Here, / usr / bin / qemu-arm is the actual path of the QEMU ARM emulator in the system.

[0104] If there are multiple architectures to support in the system, the above steps need to be repeated for each architecture.

[0105] For example (aarch64 architecture):

[0106] echo':qemuarm64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00:\n

[0107] / usr / bin / qemu-aarch64%O%o':|sudo tee

[0108] / proc / sys / fs / binfmt_misc / register

[0109] (loongarch64 architecture):

[0110] echo':qemuloongarch64:M::\x7fELF\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00:\n

[0111] / usr / bin / qemu-loongarch64%O%o':|sudo tee

[0112] / proc / sys / fs / binfmt_misc / register

[0113] 2. Verify the configuration

[0114] Check the registration result to confirm whether binfmt_misc has been successfully set:

[0115] cat / proc / sys / fs / binfmt_misc / qemuarm

[0116] This will display output similar to the following, indicating that the format has been correctly registered and is ready to run ARM ELF executables:

[0117] enabled: interpreter: / usr / bin / qemu-arm: magic: 0x7fELF: mask: 0x7fE00000: offset: 2

[0118] Similarly, for the LoongArch architecture, it is as follows:

[0119] enabled: interpreter: / usr / bin / qemu-loongarch64: magic: 0x7fELF: mask: 0x7fE00000: offset: 2

[0120] 3. Run cross-architecture programs

[0121] Copy qemu-static-aarch64 to the isolated environment:

[0122] cp -raf / usr / bin / qemu-static-aarch64 / home / openeuler-22.03 / usr / bin /

[0123] Use chroot or systemd-container to enable the isolated environment:

[0124] sudo chroot / home / openeuler-22.03 /

[0125] systemd-nspawn -D / home / openeuler-22.03 /

[0126] Of course, the above is only for illustrative purposes, and this embodiment does not make specific limitations on this.

[0127] In an optional embodiment of the present application, the target root file system information is used, combined with the configuration result for software construction, to generate the software construction task result, including: using the target root file system information, combined with the configuration result for software construction, to obtain the constructed software package; destroying the target root file system information to obtain the destruction result; and generating the software construction task result based on the constructed software package and the destruction result.

[0128] In the process of using the target root file system information and combining it with the configuration result to perform software construction and generate the software construction task result in this embodiment, it can be to use the target root file system information and combine it with the configuration result to perform software construction to obtain a constructed software package, which can represent the software package generated after construction. The constructed software package can include, but is not limited to, information such as compiled binary files, library files, executable files, etc. The constructed software package can be directly used for installation, deployment, or distribution to users, etc. After obtaining the constructed software package, the target root file system information can be destroyed to obtain a destruction result, and the destruction result can represent the result of whether the target root file system information is successfully destroyed. Thus, the software construction task result can be generated based on the constructed software package and the destruction result.

[0129] As Figure 2 and 3 shown, in this embodiment, during the software construction process, the entry of virt-worker is IPC communication. When receiving a construction task request, different from ordinary workers, virt-worker will first analyze the dependencies of the software package to be constructed that needs to be constructed, create the root file system of this architecture according to the dependencies, then configure binfmt_misc and chroot to execute the construction task in the isolation environment corresponding to the target independent virtualization cluster information, and finally collect the constructed software package obtained from the construction and destroy the root file system, waiting for the start of the next construction task.

[0130] In an optional embodiment of the present application, using the target root file system information and combining it with the configuration result to perform software construction and generate the software construction task result includes: determining the target isolation environment corresponding to the target independent virtualization cluster information; adding a preset execution process to the target isolation environment; and through the preset execution process, combining the target root file system information and the configuration result to perform software construction and generate the software construction task result.

[0131] In the process of using the target root file system information and combining it with the configuration result to perform software construction and generate the software construction task result in this embodiment, the target isolation environment corresponding to the target independent virtualization cluster information can be determined. The target isolation environment can represent the isolation environment constructed corresponding to the target independent virtualization cluster information. Add the preset execution process to the target isolation environment. The preset execution process can represent a process pre-configured for performing software package construction for different architectures. Thus, adding the preset execution process to the target isolation environment can run through this preset execution process in the target isolation environment, playing the role of combining the target root file system information and the configuration result to perform software construction and generate the software construction task result, that is, enabling the preset execution process to use the target root file system information and the configuration result to perform software construction in the target isolation environment and generate the software construction task result.

[0132] Specifically, as Figure 2-3 shown, after OBS-sever starts, it will notify other Obs-workers and virt-workers to start through IPC. Then, after receiving a build task request, OBS-seve will create the root file system, register binfmt, and determine the target isolation environment corresponding to the target independent virtualization cluster information through the OBS scheduler. Then, it will add the virt-worker to the corresponding target isolation environment to start the isolation environment for building software packages. During the build process, the required code or software can be obtained from the code repository through the root file system.

[0133] It can be seen that in this embodiment, an independent file system environment, that is, the target isolation environment corresponding to the target independent virtualization cluster information, is created through "chroot", providing an isolated running environment for each Worker process, avoiding resource conflicts and dependency confusion between different processes, and thus improving the security and stability of the system. At the same time, by registering binary formats of different architectures with "binfmt_misc", cross-platform application programs can be run on a single server, meeting the task processing requirements in heterogeneous environments.

[0134] In addition, the solution of the present invention improves resource utilization. By running multiple isolated Worker processes on a single physical or virtual server and supporting application programs of different architectures, the resource utilization of the server is maximized, reducing hardware requirements and operating costs. The system also has dynamic scaling capabilities, can flexibly schedule resources according to the actual load situation, and avoid resource waste by dynamically adjusting the number and type of Worker processes, improving the elasticity and scalability of the system.

[0135] In terms of maintenance, the present invention simplifies the maintenance cost. Through process isolation, different Worker processes can independently maintain their respective dependency environments, reducing software conflicts and maintenance complexity, and lowering software maintenance costs. In addition, the present invention also reduces the creation overhead of the "chroot" environment by sharing the base file system and combining technologies such as overlayfs, and optimizes the "binfmt_misc" configuration, reducing the execution overhead of tasks of different architectures, thereby improving the overall performance of the system.

[0136] This application optimizes the traditional Server-Worker architecture in multiple dimensions, is suitable for high-concurrency and high-demand application scenarios, and can significantly improve the flexibility of the system. And it can flexibly support multiple architectures and different types of task processing, adapt to changing application scenarios, and significantly improve the adaptability of the system.

[0137] Such as Figure 4As shown, the present application also discloses an embodiment, providing an edge operating system software construction device, which may specifically include:

[0138] A receiving module 410, configured to receive a software construction task request;

[0139] An extraction module 420, configured to extract a construction identifier corresponding to the architecture from the software construction task request;

[0140] A determination module 430, configured to determine the preset independent virtualization cluster information that matches the construction identifier as the target independent virtualization cluster information; wherein, different architecture construction environments are included in the preset independent virtualization cluster information;

[0141] A construction module 440, configured to perform construction based on the target independent virtualization cluster information and in combination with the software construction task request, and generate a software construction task result corresponding to the software construction task request.

[0142] In an optional embodiment of the present application, the edge operating system software construction device may further include:

[0143] A first acquisition module, configured to acquire at least one registered physical machine information corresponding to the local machine;

[0144] A judgment module, configured to judge whether there is a callable physical machine corresponding to the construction identifier according to the registered physical machine information;

[0145] A second acquisition module, configured to acquire at least one of the preset independent virtualization cluster information corresponding to the local machine and determine whether the construction identifier matches each of the preset independent virtualization cluster information when there is no callable physical machine corresponding to the construction identifier.

[0146] In an optional embodiment of the present application, the judgment module may include:

[0147] An extraction unit, configured to perform identifier extraction for each of the registered physical machine information to obtain a physical machine identifier;

[0148] A first unit, configured to determine whether the physical machine identifier matches the construction identifier;

[0149] A second determination unit, configured to determine that there is no callable physical machine corresponding to the construction identifier when the physical machine identifier does not match each of the construction identifiers;

[0150] A third determination unit, configured to determine whether the target registered physical machine corresponding to the physical machine identifier is callable when the physical machine identifier matches the construction identifier;

[0151] A fourth determination unit, configured to determine that there is no callable entity machine corresponding to the build identifier when the target registered entity machine is not callable.

[0152] In an optional embodiment of the present application, the determination module may include:

[0153] A first acquisition unit, configured to acquire at least one piece of preset independent virtualization cluster information;

[0154] A fifth determination unit, configured to determine a virtual environment identifier corresponding to the preset independent virtualization cluster information;

[0155] A judgment unit, configured to judge whether the virtual environment identifier matches the build identifier;

[0156] A sixth determination unit, configured to, when the virtual environment identifier matches the build identifier, determine the preset independent virtualization cluster information corresponding to the virtual environment identifier as the target independent virtualization cluster information.

[0157] In an optional embodiment of the present application, the build module may include:

[0158] A second acquisition unit, configured to acquire a software package to be built according to the software build task request;

[0159] A root file system production unit, configured to produce a root file system based on the software package to be built, to obtain target root file system information;

[0160] A seventh determination unit, configured to determine a target isolation environment path corresponding to the target independent virtualization cluster information;

[0161] A configuration unit, configured to perform architecture registration configuration according to the target isolation environment path, to obtain a configuration result;

[0162] A build unit, configured to perform software build by using the target root file system information in combination with the configuration result, to generate the software build task result.

[0163] In an optional embodiment of the present application, the build unit may include:

[0164] A first build subunit, configured to perform software build by using the target root file system information in combination with the configuration result, to obtain a built software package;

[0165] A destruction subunit, configured to destroy the target root file system information, to obtain a destruction result;

[0166] A generation subunit, configured to generate the software build task result according to the built software package and the destruction result.

[0167] In an alternative embodiment of the present application, the construction unit may include:

[0168] A determination subunit, configured to determine a target isolation environment corresponding to the target independent virtualization cluster information;

[0169] An addition subunit, configured to add a preset execution process to the target isolation environment;

[0170] A second construction subunit, configured to perform software construction by means of the preset execution process, in combination with the target root file system information and the configuration result, to generate a software construction task result.

[0171] For the implementation processes of the functions and roles of each module in the above device, refer to the implementation processes of the corresponding steps in the above method for details, which will not be elaborated here.

[0172] As Figure 5 shown, an embodiment of the present application provides an electronic device, including a processor 510, a communication interface 520, a memory 530, and a communication bus 540. Among them, the processor 510, the communication interface 520, and the memory 530 complete communication with each other through the communication bus 540;

[0173] The memory 530 is used to store a computer program;

[0174] In an embodiment of the present application, when the processor 510 is configured to execute the program stored on the memory 530, it implements the edge operating system software construction method provided in any one of the foregoing method embodiments. By receiving a software construction task request, it extracts a construction identifier corresponding to the architecture from the software construction task request, and determines the preset independent virtualization cluster information that matches the construction identifier as the target independent virtualization cluster information. Subsequently, based on the target independent virtualization cluster information, a construction is performed in combination with the software construction task request to generate a software construction task result corresponding to the software construction task request; thus, software construction can be performed using the preset independent virtualization cluster information, thereby effectively reducing the server resource cost and improving flexibility, and solving the problems of high server resource cost and low flexibility existing in the software construction methods in the related art.

[0175] The embodiments of the present application also provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the edge operating system software construction method provided in any of the foregoing method embodiments are implemented. By receiving a software construction task request, a construction identifier corresponding to the architecture is extracted from the software construction task request, and the preset independent virtualization cluster information matching the construction identifier is determined as the target independent virtualization cluster information. Subsequently, based on the target independent virtualization cluster information, combined with the software construction task request, construction is performed to generate a software construction task result corresponding to the software construction task request. Thus, the software can be constructed by using the preset independent virtualization cluster information, thereby effectively reducing the server resource cost and improving flexibility, and solving the problems of high server resource cost and low flexibility existing in the software construction methods in the existing related technologies.

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

[0177] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solution, in essence, or the part that contributes to the related technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0178] It should be understood that the terms used in this document are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless otherwise clearly specified in the context, the singular forms "a", "an", and "the" as used in this document may also include the plural forms. The terms "including", "comprising", "containing", and "having" are inclusive and thus specify the presence of the stated features, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described in this document are not to be construed as necessarily requiring them to be executed in the specific order described or illustrated, unless the execution order is clearly specified. It should also be understood that additional or alternative steps can be used.

[0179] The above are only specific embodiments of the present invention, enabling those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but rather to the broadest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for constructing edge operating system software, characterized in that: include: Receive software build task requests; Extracting a build identifier of a corresponding architecture from the software build task request; Determine the preset independent virtualization cluster information matching the construction identifier as the target independent virtualization cluster information; wherein the preset independent virtualization cluster information includes construction environments of different architectures; Based on the target independent virtualization cluster information and in combination with the software building task request, a software building task result corresponding to the software building task request is generated.

2. The edge operating system software construction method according to claim 1, characterized in that: After extracting the building identifier of the corresponding architecture from the software building task request, the method further includes: Obtain information of at least one registered entity machine corresponding to the local machine; According to the registered entity machine information, determining whether there is a callable entity machine corresponding to the build identifier; In the case that there is no callable physical machine corresponding to the build identifier, at least one of the preset independent virtualization cluster information corresponding to the local machine is obtained, and it is determined whether the build identifier matches each of the preset independent virtualization cluster information.

3. The edge operating system software construction method according to claim 2, characterized in that: The determining, based on the registered entity machine information, whether there is a callable entity machine corresponding to the build identifier includes: Extracting the identifier of each registered entity machine information to obtain the entity machine identifier; Determining whether the entity machine identifier matches the build identifier; In the case that the entity machine identifier does not match any of the build identifiers, determining that there is no callable entity machine corresponding to the build identifier; In the case where the entity machine identifier matches the build identifier, determining whether the target registered entity machine corresponding to the entity machine identifier is callable; When the target registered entity machine is not callable, it is determined that there is no callable entity machine corresponding to the build identifier.

4. The edge operating system software construction method according to claim 1, characterized in that: The step of determining the preset independent virtualization cluster information matching the construction identifier as the target independent virtualization cluster information includes: Obtain information of at least one preset independent virtualization cluster; Determine a virtual environment identifier corresponding to the preset independent virtualization cluster information; Determining whether the virtual environment identifier matches the build identifier; In a case where the virtual environment identifier matches the construction identifier, the preset independent virtualization cluster information corresponding to the virtual environment identifier is determined as the target independent virtualization cluster information.

5. The edge operating system software construction method according to claim 1, characterized in that: The step of building based on the target independent virtualization cluster information and in combination with the software building task request to generate a software building task result corresponding to the software building task request includes: Obtaining the software package to be built according to the software building task request; Create a root file system based on the software package to be built, and obtain target root file system information; Determine a target isolation environment path corresponding to the target independent virtualization cluster information; According to the target isolation environment path, perform architecture registration configuration to obtain a configuration result; The target root file system information is used in combination with the configuration result to perform software construction and generate the software construction task result.

6. The edge operating system software construction method according to claim 5, characterized in that: The step of using the target root file system information and combining the configuration result to perform software construction and generate the software construction task result includes: Using the target root file system information and combining the configuration result to perform software construction, to obtain a construction software package; Destroying the target root file system information to obtain a destruction result; The software building task result is generated according to the building software package and the destruction result.

7. The edge operating system software construction method according to claim 5, characterized in that: The step of using the target root file system information and combining the configuration result to perform software construction and generate the software construction task result includes: Determine a target isolation environment corresponding to the target independent virtualization cluster information; Adding a preset execution process to the target isolation environment; The software is constructed by combining the target root file system information and the configuration result through the preset execution process to generate the software construction task result.

8. An edge operating system software construction device, characterized in that: include: A receiving module, used for receiving a software building task request; An extraction module, used to extract a build identifier of a corresponding architecture from the software build task request; A determination module, configured to determine the preset independent virtualization cluster information matching the construction identifier as the target independent virtualization cluster information; wherein the preset independent virtualization cluster information includes construction environments of different architectures; A construction module is used to construct based on the target independent virtualization cluster information and in combination with the software construction task request, and generate a software construction task result corresponding to the software construction task request.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; The processor is used to implement the edge operating system software construction method described in any one of claims 1-7 when executing the program stored in the memory.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the edge operating system software construction method as described in any one of claims 1 to 7 is implemented.