Operation method and device of business system, electronic equipment and storage medium
By running the container cluster on a new operating system, the target business system is run in containers in the container cluster, and the compatibility problem when the business system is moved to the new architecture and operating system is solved, and the business system is migrated and run on an unfit operating system is realized, improving adaptability and flexibility.
Patent Information
- Application Number
- CN202311810315.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-26
- Publication Date
- 2025-06-27
Smart Images

Figure CN120215947A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of operating systems, and particularly to a method, device, electronic device, and storage medium for operating a business system. Background Art
[0002] In an industrial scenario, in order to obtain higher performance and involve more special peripheral devices in industrial manufacturing, business systems are mostly developed using C and C++ languages. Therefore, the deployment of services needs to be compiled on specific architecture devices and operating systems.
[0003] Currently, with the progress of computer hardware and software technologies, the architecture and operating system versions are upgraded and changed relatively fast. In order to ensure the reliability of business systems and reduce development costs, it is generally chosen to smoothly migrate business systems to new architectures and operating systems.
[0004] However, since the deployment of business systems needs to be compiled on specific architecture devices and operating systems, it is difficult to migrate business systems to new architectures and operating systems. And even if the migration is successful, the business systems may not be able to run on the new architectures and operating systems due to version or system architecture conflicts. Summary of the Invention
[0005] The present application provides a method, device, electronic device, and storage medium for operating a business system, so as to solve the technical problem in the prior art that since the deployment of business systems needs to be compiled on specific architecture devices and operating systems, it is difficult to migrate business systems to new architectures and operating systems. And even if the migration is successful, the business systems may not be able to run on the new architectures and operating systems due to version or system architecture conflicts.
[0006] In a first aspect, the present application provides a method for operating a business system, the method including:
[0007] Determine a container cluster corresponding to a target business system, the container cluster including a plurality of containers, each container running at least one service of the target business system, the target business system running on a first operating system, and the container cluster running on a second operating system;
[0008] Receive a hardware driver request sent by at least one container;
[0009] According to the hardware driver request, call the hardware resources of the second operating system, so that the target business system runs based on the hardware resources.
[0010] As a possible implementation, each container in the container cluster corresponds to a priority identifier, and the priority represented by the priority identifier corresponds to the business priority of the corresponding business for which the container runs.
[0011] As a possible implementation, invoking the hardware resources of the second operating system according to the hardware driver request includes:
[0012] Determine whether the received hardware driver request comes from a single container;
[0013] If it is determined that the received hardware driver request comes from a single container, directly invoke the hardware resources of the second operating system corresponding to the hardware driver request;
[0014] If it is determined that the received hardware driver request comes from multiple containers, invoke the hardware resources of the second operating system corresponding to each hardware driver request respectively according to the priority identifiers of the containers corresponding to each hardware driver request.
[0015] As a possible implementation, invoking the hardware resources of the second operating system corresponding to each hardware driver request respectively according to the priority identifiers of the containers corresponding to each hardware driver request includes:
[0016] Determine the identification values of the priority identifiers of the containers corresponding to each hardware driver request;
[0017] Sort the hardware driver requests in descending order of the priority represented by the identification values to obtain a hardware driver request sequence;
[0018] Invoke the hardware resources of the second operating system corresponding to one hardware driver request at intervals of a preset time period in the order of the hardware driver request sequence.
[0019] As a possible implementation, invoking the hardware resources of the second operating system according to the hardware driver request includes:
[0020] Determine the number of received hardware driver requests;
[0021] If the number is one, directly invoke the hardware resources of the second operating system corresponding to the hardware driver request;
[0022] If the number is multiple, determine the reception time of each hardware driver request;
[0023] Invoke the hardware resources of the second operating system corresponding to one hardware driver request at intervals of a preset time period in the order of the reception time of each hardware driver request.
[0024] As a possible implementation, invoking the hardware resources of the second operating system according to the hardware driver request includes:
[0025] Determine the number of received hardware driver requests;
[0026] If the number is one, directly invoke the hardware resources of the second operating system corresponding to the hardware driver request;
[0027] If the number is multiple, determine the target hardware resources of the second operating system corresponding to each hardware driver request;
[0028] According to the target hardware resources corresponding to each hardware driver request, determine a processing strategy for the received hardware driver requests;
[0029] According to the processing strategy, respectively invoke the target hardware resources of the second operating system corresponding to each hardware driver request.
[0030] As a possible implementation, determining a processing strategy for the received hardware driver requests according to the target hardware resources corresponding to each hardware driver request includes:
[0031] Determine whether there are first hardware driver requests with the same target hardware resources among the received hardware driver requests;
[0032] If there are the first hardware driver requests, determine that the processing strategy for the first hardware driver requests is to invoke the target hardware resources of the second operating system corresponding to one of the first hardware driver requests at intervals of a preset time period;
[0033] The processing strategy for second hardware driver requests with different target hardware resources is to concurrently invoke the target hardware resources of the second operating system corresponding to each second hardware driver request;
[0034] If there are no the first hardware driver requests, determine that the processing strategy for the hardware driver requests is to concurrently invoke the hardware resources of the second operating system corresponding to at least two of the hardware driver requests at intervals of a preset time period.
[0035] In a second aspect, an embodiment of the present application provides an operating device for a service system, and the device includes:
[0036] A determination module, configured to determine a container cluster corresponding to a target service system, where the container cluster includes multiple containers, each container runs at least one service of the target service system, the target service system runs on a first operating system, and the container cluster runs on a second operating system;
[0037] A receiving module, configured to receive a hardware driver request sent by at least one container;
[0038] A calling module, configured to call the hardware resources of the second operating system according to the hardware driver request, so that the target business system runs based on the hardware resources.
[0039] As a possible implementation, each container in the container cluster corresponds to a priority identifier, and the priority represented by the priority identifier corresponds to the business priority of the corresponding business running in the container.
[0040] As a possible implementation, the calling module includes:
[0041] A first determination sub-module, configured to determine whether the received hardware driver request comes from a single container;
[0042] A first calling sub-module, configured to directly call the hardware resources of the second operating system corresponding to the hardware driver request if it is determined that the received hardware driver request comes from a single container;
[0043] A second calling sub-module, configured to, if it is determined that the received hardware driver request comes from multiple containers, respectively call the hardware resources of the second operating system corresponding to each hardware driver request according to the priority identifier of the container corresponding to each hardware driver request.
[0044] As a possible implementation, the second calling sub-module is specifically configured to:
[0045] Determine the identification value of the priority identifier of the container corresponding to each hardware driver request;
[0046] Sort the hardware driver requests in descending order of the priority represented by the identification value to obtain a hardware driver request sequence;
[0047] Call the hardware resources of the second operating system corresponding to one hardware driver request at intervals of a preset time period in the order of the hardware driver request sequence.
[0048] As a possible implementation, the calling module is specifically configured to:
[0049] Determine the number of received hardware driver requests;
[0050] If the number is one, directly call the hardware resources of the second operating system corresponding to the hardware driver request;
[0051] If the quantity is multiple, determine the reception time for receiving each of the hardware driver requests;
[0052] In the order of the reception time corresponding to each of the hardware driver requests, call the hardware resources of the second operating system corresponding to one of the hardware driver requests at intervals of a preset time period in sequence.
[0053] As a possible implementation, the calling module includes:
[0054] A second determination sub-module, configured to determine the quantity of the received hardware driver requests;
[0055] A third calling sub-module, configured to directly call the hardware resources of the second operating system corresponding to the hardware driver request if the quantity is one;
[0056] A third determination sub-module, configured to determine the target hardware resources of the second operating system corresponding to each of the hardware driver requests if the quantity is multiple;
[0057] A fourth determination sub-module, configured to determine a processing strategy for the received hardware driver requests according to the target hardware resources corresponding to each of the hardware driver requests;
[0058] A fourth calling sub-module, configured to call the target hardware resources of the second operating system corresponding to each hardware driver request according to the processing strategy.
[0059] As a possible implementation, the fourth determination sub-module is specifically configured to:
[0060] Determine whether there are first hardware driver requests with the same target hardware resources among the received hardware driver requests;
[0061] If there are the first hardware driver requests, determine that the processing strategy for the first hardware driver requests is to call the target hardware resources of the second operating system corresponding to one of the first hardware driver requests at intervals of a preset time period;
[0062] The processing strategy for second hardware driver requests with different target hardware resources is to call the target hardware resources of the second operating system corresponding to each of the second hardware driver requests in parallel;
[0063] If there are no the first hardware driver requests, determine that the processing strategy for the hardware driver requests is to call the hardware resources of the second operating system corresponding to at least two of the hardware driver requests in parallel at intervals of a preset time period.
[0064] In a third aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory, where the processor is configured to execute an operating program of a service system stored in the memory to implement the method for operating the service system according to any one of the first aspects.
[0065] In a fourth aspect, an embodiment of the present application provides a storage medium storing one or more programs, where the one or more programs can be executed by one or more processors to implement the method for operating the service system according to any one of the first aspects.
[0066] The technical solution provided by the embodiment of the present application determines a container cluster corresponding to a target service system. The container cluster includes multiple containers, and each container runs at least one service of the target service system. The target service system runs on a first operating system, and the container cluster runs on a second operating system. The method receives a hardware driver request sent by at least one container, and according to the hardware driver request, calls the hardware resources of the second operating system to enable the target service system to run based on the hardware resources. This technical solution runs the container cluster on a new operating system, so that the target service system runs in the containers in the container cluster. Since containers can shield the upper-layer service system from different architecture servers and underlying hardware, even if the operating system required by the target service system does not match the new operating system, the hardware resources of the new operating system can be called to enable the target service system to run on the new operating system, thereby realizing the migration and operation of the service system on an inadaptable operating system and improving the adaptability and flexibility of heterogeneous system applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] The accompanying drawings here are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present invention and used together with the specification to explain the principles of the present invention.
[0068] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0069] One or more embodiments are exemplarily illustrated by the pictures in the corresponding accompanying drawings. These exemplary illustrations do not limit the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements, unless otherwise stated, and the drawings in the figures do not constitute a proportional limitation.
[0070] Figure 1 It is a flowchart of an embodiment of a method for operating a service system provided by an embodiment of the present application;
[0071] Figure 2 Schematic diagram of the system architecture of an operating system for a service system provided by an embodiment of the present application;
[0072] Figure 3 Block diagram of an embodiment of an operating device for a service system provided by an embodiment of the present application;
[0073] Figure 4 Schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0074] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are some but not all of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0075] The following disclosure provides many different embodiments or examples for implementing different structures of the present invention. To simplify the disclosure of the present invention, components and settings of specific examples are described below. Of course, they are merely examples and are not intended to limit the present invention. In addition, the present invention may repeat reference numerals and / or letters in different examples. Such repetition is for the purpose of simplification and clarity and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0076] To solve the technical problem in the prior art that since the deployment of a service system needs to be compiled on specific architecture devices and operating systems, it is difficult to migrate the service system to a new architecture and operating system, and even if the migration is successful, the service system cannot run on the new architecture and operating system due to version or system architecture conflicts, the present application provides a method, device, electronic device and storage medium for operating a service system, which can realize running a container cluster on a new operating system so that a target service system runs in a container in the container cluster. Since the container can shield the upper-layer service system from different architecture servers and underlying hardware, even if the operating system required by the target service system does not match the new operating system, the hardware resources of the new operating system can be called to realize the operation of the target service system on the new operating system, thereby realizing the migration and operation of the service system on an inadaptable operating system and improving the adaptability and flexibility of heterogeneous system applications.
[0077] The following further explains the method for operating a service system provided by the present application with specific embodiments in conjunction with the accompanying drawings. The embodiments do not constitute a limitation to the embodiments of the present invention.
[0078] See Figure 1 , which is a flowchart of an embodiment of a method for operating a service system provided by an embodiment of the present application. As Figure 1 shown, the process may include the following steps:
[0079] Step 101: Determine the container cluster corresponding to the target service system. The container cluster includes multiple containers, and each container runs at least one service of the target service system. The target service system runs on a first operating system, and the container cluster runs on a second operating system.
[0080] The target service system is a service system to be run after being migrated to a new operating system. For example, in an industrial scenario, in order to obtain higher performance and involve more special peripheral devices in industrial manufacturing, a service system developed in C and C++ languages is generally used.
[0081] In practical applications, with the progress of computer software and hardware technologies, the architecture and operating system version upgrade and change relatively quickly. In order to ensure the reliability of the service system and at the same time reduce the development cost, it is generally necessary to smoothly migrate the service system to a new architecture and operating system.
[0082] However, since the deployment of the service system needs to be compiled on specific architecture devices and operating systems, this makes it difficult to migrate the service system to a new architecture and operating system. Moreover, even if the migration is successful, the service system may not be able to run on the new architecture and operating system due to version or system architecture conflicts.
[0083] Based on this, the target service system in the embodiment of the present application can be a service system migrated to a new system architecture and operating system.
[0084] The container cluster refers to a cluster including multiple containers, and the containers in the container cluster are entities that can run system images. They completely use the sandbox mechanism and there will be no interfaces between them. For example, Docker is an open-source application container engine that allows developers to package their applications and dependent packages into a portable container and then publish it to any machine with a Linux or Windows operating system, and virtualization can also be achieved.
[0085] The first operating system refers to the specific architecture devices and operating systems required for the target service system to run. It can be a 32-bit operating system or a 64-bit operating system. Further, this operating system can be a Windows system or a Linux system, and the embodiment of the present application does not limit this.
[0086] The above-mentioned second operating system refers to the system currently running on the target business system, that is, the new architecture device and operating system to which it migrates. It can be a 32-bit operating system or a 64-bit operating system. Further, the operating system can be a Windows system or a Linux system, and the embodiments of the present application do not limit this.
[0087] Further, the above-mentioned first operating system and second operating system can be the same operating system or different operating systems, and the embodiments of the present application do not limit this.
[0088] In the embodiments of the present application, since the system required for the successful operation of the target business system is the first operating system, and the latest system to which the target business system migrates is the second operating system, and the two may be different operating systems. Therefore, in order to enable the target business system to successfully run in the second operating system, the embodiments of the present application introduce a container cluster in the second operating system, and run at least one service of the target business system in each of the multiple containers included in the container cluster. The container can shield the upper-layer business system from different architecture servers and the underlying hardware, so that the target business system can successfully run in the second operating system.
[0089] As an exemplary implementation manner, when each container runs the service of the target business system, the corresponding service can be pre-compiled and run under the first operating system to generate the corresponding target business system image, and the business personnel pull the target business system image into the container for running.
[0090] For example, the business personnel specify the first operating system (such as a 32-bit operating system) and the target business system image to be introduced, and the container engine (such as Docker Engine) can provide a service for pulling the specified operating system image.
[0091] Among them, at least one service of the target business system needs to be compiled and run in the container. To run the target business system under the second operating system (such as a 64-bit operating system), first, the container image corresponding to the first operating system needs to be pulled, and the components and services related to compilation are installed under this image. Then, the container can be republished as a new business system image and submitted to the image repository.
[0092] Then, in the actual production environment, the operator can pull the target business system image corresponding to the first operating system from the image repository according to production needs, so that the target business system runs in the container cluster.
[0093] Based on this, after determining the target business system to be run, the execution entity of the embodiment of the present application can determine the container cluster for running the target business system, thereby determining the correspondence between the target business system and the container cluster to run the target business system.
[0094] Step 102: Receive hardware driver requests sent by at least one container.
[0095] Step 103: According to the above-mentioned hardware driver requests, call the hardware resources of the second operating system so that the target business system runs based on the above-mentioned hardware resources.
[0096] The following is a unified description of Step 102 and Step 103:
[0097] The above-mentioned hardware driver request refers to a hardware driver request sent when the services included in the target business system need to call the hardware resources of the second operating system during the operation of the business process in the container.
[0098] Based on this, the execution entity of the embodiment of the present application can call the corresponding hardware resources of the second operating system according to the received hardware driver requests, so that the target business system can continue to run based on the hardware resources.
[0099] In one embodiment, in order to give priority to processing important services in the target business system, the execution entity of the embodiment of the present application can set a corresponding priority identifier for each container in the container cluster, and correspond the priority represented by the priority identifier to the service priority of the corresponding service running in the container. For example, install services with higher security requirements in containers with higher container priorities.
[0100] For example, in the business system of a car, services related to video and music can be services with lower security, which can be installed and run in containers with lower priorities in the container cluster; services related to vehicle speed, vehicle distance, and fault display are services with higher security, which can be installed and run in containers with higher priorities in the container cluster.
[0101] Based on this, when the execution entity of the embodiment of the present application receives hardware driver requests sent by at least one container, it can determine whether the received hardware driver requests come from a single container.
[0102] Optionally, if it is determined that the received hardware driver request comes from a single container, the corresponding hardware resources of the second operating system of the hardware driver request can be directly called.
[0103] On the contrary, if it is determined that the received hardware driver requests come from multiple containers, the corresponding hardware resources of the second operating system for each hardware driver request can be called respectively according to the priority identifiers of the containers corresponding to each hardware driver request.
[0104] As an exemplary implementation, the identification value of the priority identification corresponding to each hardware driver request for the container can be determined, and the hardware driver requests can be sorted in descending order of the priority represented by the identification value to obtain a hardware driver request sequence.
[0105] After that, the hardware resources of the second operating system corresponding to a hardware driver request can be called at intervals of a preset time period in the order of the hardware driver request sequence. That is, the hardware driver requests of the containers with higher response levels are preferentially responded to according to the priority of the containers, and the hardware driver requests of the containers with lower priority levels are responded to after a fixed time delay.
[0106] In another embodiment, in order to avoid the situation that the hardware driver request sent by the container is not responded to for a long time after it is sent, that is, in order to respond to the received hardware driver request in a timely manner, the execution entity of the embodiment of the present application can process the hardware driver request according to the reception time of the received hardware driver request.
[0107] Based on this, when the execution entity of the embodiment of the present application receives at least one hardware driver request sent by a container, the number of received hardware driver requests can be determined, and the hardware resources of the second operating system can be called according to the above number.
[0108] Optionally, if the above number is one, the hardware resources of the second operating system corresponding to the hardware driver request can be directly called.
[0109] On the contrary, if the above number is multiple, the reception time of each received hardware driver request can be determined.
[0110] After that, the hardware resources of the second operating system corresponding to a hardware driver request can be called at intervals of a preset time period in the order of the reception time corresponding to each hardware driver request. That is, the hardware driver request received earliest is preferentially processed.
[0111] In yet another embodiment, in order to speed up the processing of the received hardware driver requests, the execution entity of the embodiment of the present application can process multiple hardware driver requests in parallel.
[0112] Based on this, after the execution entity of the embodiment of the present application receives at least one hardware driver request sent by a container, the number of received hardware driver requests can be determined, and the hardware driver requests can be processed according to this number.
[0113] Optionally, if the above number is one, the hardware resources of the second operating system corresponding to the hardware driver request can be directly called.
[0114] On the contrary, if there are multiple such quantities, the target hardware resources of the second operating system corresponding to each hardware driver request can be determined. Subsequently, based on the target hardware resources corresponding to each hardware driver request, a processing strategy for the received hardware driver requests can be determined, and according to this processing strategy, the target hardware resources of the second operating system corresponding to each hardware driver request can be called respectively.
[0115] As an alternative implementation, when determining the processing strategy for the received hardware driver requests based on the target hardware resources corresponding to each hardware driver request, it can be determined whether there are first hardware driver requests with the same target hardware resources among the received hardware driver requests.
[0116] Optionally, if there are the above-mentioned first hardware driver requests, the processing strategy for the first hardware driver requests can be to call the target hardware resources of the second operating system corresponding to one first hardware driver request at intervals of a preset time period. That is, for the first hardware driver requests with the same target hardware resources, they are processed separately at intervals of a preset time period.
[0117] Furthermore, the processing strategy for the second hardware driver requests with different target hardware resources is to call the target hardware resources of the second operating system corresponding to each second hardware driver request in parallel.
[0118] As an exemplary implementation, in order to save system resources, the execution entity of the embodiments of the present application can call the target hardware resources corresponding to two second hardware driver requests with different target hardware resources in parallel each time.
[0119] As an exemplary implementation, in order to accelerate the processing rate of hardware driver requests, the execution entity of the embodiments of the present application can call the target hardware resources corresponding to three or more second hardware driver requests with different target hardware resources in parallel each time.
[0120] On the contrary, if it is determined that there are no such first hardware driver requests, it is determined that the processing strategy for all hardware driver requests is to call the hardware resources of the second operating system corresponding to at least two hardware driver requests in parallel at intervals of a preset time period. That is, at least two hardware driver requests are called each time, and at least two hardware driver requests are called again after a preset time period until all the received hardware driver requests are called.
[0121] The technical solution provided by the embodiments of this application determines a container cluster corresponding to a target business system. The container cluster includes multiple containers, and each container runs at least one service of the target business system. The target business system runs on a first operating system, and the container cluster runs on a second operating system. The method receives hardware driver requests sent by at least one container, and based on the hardware driver requests, invokes the hardware resources of the second operating system so that the target business system runs based on the hardware resources. In this technical solution, by running the container cluster on a new operating system, the target business system runs in the containers in the container cluster. Since containers can shield the upper-layer business system from different architecture servers and the underlying hardware, even if the operating system required by the target business system does not match the new operating system, the hardware resources of the new operating system can be invoked to enable the target business system to run on the new operating system, thereby realizing the migration and operation of the business system on an inadaptable operating system and improving the adaptability and flexibility of heterogeneous system applications.
[0122] To facilitate understanding of the operation method of the business system provided by this application, the following provides an exemplary description of the system architecture involved in this application.
[0123] See Figure 2 , which is a schematic diagram of the system architecture of an operating system for a business system provided by an embodiment of this application. Figure 2 In the system architecture shown, Figure 1 Based on the operation method of the business system shown, taking the first operating system as a 32-bit operating system and the second operating system as a 64-bit Linux kernel operating system as an example, as Figure 2 shown, the system architecture may include: 32-bit operating system Docker image business platform 1, 32-bit operating system Docker image business platform 2, 32-bit operating system Docker image business platform 3, 64-bit Linux kernel operating system, Docker Engine' (image repository), management and scheduling module, driver proxy, and multiple hardware drivers.
[0124] Among them, each of the above 32-bit operating system Docker image business platforms may correspond to a device call method, which can be used to send corresponding hardware driver requests according to its own business. It can be the same method or different methods, and the embodiments of this application do not limit this.
[0125] The above three 32-bit operating system Docker image business platforms are respectively at least one service of the target business system. The target business system may correspond to three 32-bit operating system Docker image business platforms, or may correspond to more than three 32-bit operating system Docker image business platforms. The embodiments of this application do not limit this. Figure 2Take three as an example only.
[0126] Each of the above 32-bit operating system Docker image business platforms can run within a container included in the container cluster.
[0127] The above-mentioned driver agent can act as the execution entity of the embodiment of the present application to execute the operation method of the business system provided by the embodiment of the present application, that is, receive the hardware driver requests sent by each container and process the received hardware driver requests.
[0128] In one embodiment, the present application provides a heterogeneous system application adaptation method for industrial scenarios based on Docker. The implementation process is as follows: create a Docker container cluster in the 64-bit host operating system kernel. The containers in this cluster are used to encapsulate 32-bit operating system Docker images, and the Docker Engine service is added.
[0129] Based on this, after the host operating system kernel is started, a driver agent program that can be called by the Docker container is encapsulated to call special hardware resources.
[0130] In the embodiment of the present application, the containers in the container cluster can be hierarchically divided into ordinary containers and special containers, and priority attribute identifiers are respectively configured. Containers with a higher priority (special containers) are used to process services with relatively high requirements for security and real-time performance, and containers with a lower priority (ordinary containers) are used to process ordinary services.
[0131] Among them, business personnel specify the 32-bit operating system and related business system images to be introduced, and DockerEngine provides a service for pulling the specified operating system image.
[0132] Furthermore, different business platforms can run in the Docker container. These business platforms need to be compiled and run under a 32-bit architecture operating system. In order to run these 32-bit machine business systems under a 64-bit operating system, first, the Docker image corresponding to the 32-bit operating system needs to be pulled, and components related to compilation and the business platform are installed under this image. After that, the container can be republished as a new business system image and submitted to the image repository.
[0133] Then, in the actual production environment, operators pull the corresponding 32-bit operating system business system image from the image repository according to production needs and assign a priority identifier. Finally, the driver agent program is compiled and deployed in the host, and the calls to the driver program in the Docker container are all completed through the driver agent.
[0134] In the embodiments of the present application, in actual work, different business platforms first call the driver proxy program through the management and scheduling interface program of the cluster. After the management and scheduling program receives the requests for calling the driver proxy of each container, it first determines whether there is a hardware driver request for a single container at present. If so, it responds and performs hardware driving through the driver proxy; if not, it preferentially responds to the requests of containers with a higher response level according to the priorities of the containers, and delays for a fixed time before responding to the business requests of ordinary containers.
[0135] The system architecture provided by the embodiments of the present application shields different architecture servers and underlying hardware through the upper-layer business system, enabling the migration of business platforms on 32-bit architectures to 64-bit architecture systems in industrial scenarios. At the same time, it manages the priorities of containers, improving the flexibility of business adaptation and ensuring the security and real-time performance of the system.
[0136] Participate Figure 3 , which is a block diagram of an embodiment of an operating device of a business system provided by an embodiment of the present application. As Figure 3 shown, the device may include:
[0137] A determination module 31, configured to determine a container cluster corresponding to a target business system, where the container cluster includes multiple containers, and each of the containers runs at least one service of the target business system. The target business system runs on a first operating system, and the container cluster runs on a second operating system;
[0138] A receiving module 32, configured to receive hardware driver requests sent by at least one container;
[0139] A calling module 33, configured to call the hardware resources of the second operating system according to the hardware driver requests, so that the target business system runs based on the hardware resources.
[0140] As a possible implementation, each of the containers in the container cluster corresponds to a priority identifier, and the priority represented by the priority identifier corresponds to the service priority of the corresponding service run by the container.
[0141] As a possible implementation, the calling module 33 includes:
[0142] A first determination sub-module, configured to determine whether the received hardware driver request comes from a single container;
[0143] A first calling sub-module, configured to directly call the hardware resources of the second operating system corresponding to the hardware driver request if it is determined that the received hardware driver request comes from a single container;
[0144] The second calling sub-module is used to, if it is determined that the received hardware driver requests come from multiple containers, respectively call the hardware resources of the second operating system corresponding to each of the hardware driver requests according to the priority identifier of the container corresponding to each hardware driver request.
[0145] As a possible implementation manner, the second calling sub-module is specifically used for:
[0146] Determine the identifier value of the priority identifier of the container corresponding to each hardware driver request;
[0147] Sort the hardware driver requests in descending order of the priority represented by the identifier value to obtain a hardware driver request sequence;
[0148] Call the hardware resources of the second operating system corresponding to one of the hardware driver requests at intervals of a preset time period in the order of the hardware driver request sequence.
[0149] As a possible implementation manner, the calling module 33 is specifically used for:
[0150] Determine the number of received hardware driver requests;
[0151] If the number is one, directly call the hardware resources of the second operating system corresponding to the hardware driver request;
[0152] If the number is multiple, determine the reception time of each hardware driver request;
[0153] Call the hardware resources of the second operating system corresponding to one of the hardware driver requests at intervals of a preset time period in the order of the reception time of each hardware driver request.
[0154] As a possible implementation manner, the calling module 33 includes:
[0155] The second determination sub-module is used to determine the number of received hardware driver requests;
[0156] The third calling sub-module is used to, if the number is one, directly call the hardware resources of the second operating system corresponding to the hardware driver request;
[0157] The third determination sub-module is used to, if the number is multiple, determine the target hardware resources of the second operating system corresponding to each hardware driver request;
[0158] The fourth determination sub-module is used to determine a processing strategy for the received hardware driver requests according to the target hardware resources corresponding to each hardware driver request;
[0159] A fourth calling sub-module, configured to call the target hardware resources of the second operating system corresponding to each hardware driver request according to the processing policy.
[0160] As a possible implementation manner, the fourth determining sub-module is specifically configured to:
[0161] Determine whether there is a first hardware driver request with the same target hardware resource in the received hardware driver request;
[0162] If there is the first hardware driver request, determine that the processing policy for the first hardware driver request is to call the target hardware resources of the second operating system corresponding to one of the first hardware driver requests at intervals of a preset time period;
[0163] The processing policy for the second hardware driver requests with different target hardware resources is to call the target hardware resources of the second operating system corresponding to each of the second hardware driver requests in parallel;
[0164] If there is no first hardware driver request, determine that the processing policy for the hardware driver request is to call the hardware resources of the second operating system corresponding to at least two of the hardware driver requests in parallel at intervals of a preset time period.
[0165] As Figure 4 shown, a schematic structural diagram of an electronic device provided by an embodiment of the present application includes a processor 41, a communication interface 42, a memory 43, and a communication bus 44. Among them, the processor 41, the communication interface 42, and the memory 43 complete communication with each other through the communication bus 44.
[0166] The memory 43 is used to store a computer program;
[0167] In an embodiment of the present application, when the processor 41 is configured to execute the program stored on the memory 43, it implements the operation method of the service system provided by any one of the foregoing method embodiments, including:
[0168] Determine a container cluster corresponding to the target service system, where the container cluster includes a plurality of containers, and each container runs at least one service of the target service system. The target service system runs on the first operating system, and the container cluster runs on the second operating system;
[0169] Receive at least one hardware driver request sent by a container;
[0170] According to the hardware driver request, call the hardware resources of the second operating system, so that the target service system runs based on the hardware resources.
[0171] The embodiments of the present application also provide a storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the operation method of the service system provided in any of the foregoing method embodiments are implemented.
[0172] 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.
[0173] 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 essence of the above technical solution, 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.
[0174] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" as used herein may also include the plural forms. The terms "comprising", "including", "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 herein are not to be construed as necessarily requiring them to be executed in the particular order described or illustrated, unless the execution order is explicitly stated. It should also be understood that additional or alternative steps can be used.
[0175] The above description is only the 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 the embodiments shown herein, but will be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for operating a service system, characterized in that, The method includes: Determine a container cluster corresponding to a target business system, where the container cluster includes multiple containers, each container runs at least one service of the target business system, the target business system runs on a first operating system, and the container cluster runs on a second operating system; Receive hardware driver requests sent by at least one container; According to the hardware driver requests, call the hardware resources of the second operating system so that the target business system runs based on the hardware resources.
2. The method according to claim 1, characterized in that, Each container in the container cluster corresponds to a priority identifier, and the priority represented by the priority identifier corresponds to the service priority of the corresponding service run by the container.
3. The method according to claim 2, wherein The calling the hardware resources of the second operating system according to the hardware driver requests includes: Determine whether the received hardware driver request comes from a single container; If it is determined that the received hardware driver request comes from a single container, directly call the hardware resources of the second operating system corresponding to the hardware driver request; If it is determined that the received hardware driver request comes from multiple containers, according to the priority identifiers of the containers corresponding to each hardware driver request, call the hardware resources of the second operating system corresponding to each hardware driver request respectively.
4. The method according to claim 3, characterized in that, The calling the hardware resources of the second operating system corresponding to each hardware driver request according to the priority identifier of the container corresponding to each hardware driver request includes: Determine the identifier values of the priority identifiers of the containers corresponding to each hardware driver request; Sort the hardware driver requests in descending order of the priority represented by the identifier values to obtain a hardware driver request sequence; According to the sequence order of the hardware driver request sequence, call the hardware resources of the second operating system corresponding to one hardware driver request at intervals of a preset time period in turn.
5. The method according to claim 1, wherein The calling the hardware resources of the second operating system according to the hardware driver requests includes: Determine the number of received hardware driver requests; If the number is one, directly call the hardware resources of the second operating system corresponding to the hardware driver request; If the number is multiple, determine the reception time of each hardware driver request; According to the sequence order of the reception times corresponding to each hardware driver request, call the hardware resources of the second operating system corresponding to one hardware driver request at intervals of a preset time period in turn.
6. The method according to claim 1, characterized in that The calling the hardware resources of the second operating system according to the hardware driver requests includes: Determine the number of received hardware driver requests; If the number is one, directly call the hardware resources of the second operating system corresponding to the hardware driver request; If the number is multiple, determine the target hardware resources of the second operating system corresponding to each hardware driver request; According to the target hardware resources corresponding to each hardware driver request, determine a processing strategy for the received hardware driver requests; According to the processing strategy, call the target hardware resources of the second operating system corresponding to each hardware driver request respectively.
7. The method according to claim 6, wherein Determining a processing strategy for the received hardware driver request according to the target hardware resource corresponding to each hardware driver request includes: Determining whether there is a first hardware driver request with the same target hardware resource in the received hardware driver request; If there is the first hardware driver request, determining that the processing strategy for the first hardware driver request is to call the target hardware resource of the second operating system corresponding to one of the first hardware driver requests at intervals of a preset time period; The processing strategy for a second hardware driver request with different target hardware resources is to call the target hardware resources of the second operating system corresponding to each of the second hardware driver requests in parallel; If there is no first hardware driver request, determining that the processing strategy for the hardware driver request is to call the hardware resources of the second operating system corresponding to at least two of the hardware driver requests in parallel at intervals of a preset time period.
8. An operating device for a service system, characterized in that, The device includes: A determination module, configured to determine a container cluster corresponding to a target business system, where the container cluster includes multiple containers, each container runs at least one service of the target business system, the target business system runs on a first operating system, and the container cluster runs on a second operating system; A receiving module, configured to receive hardware driver requests sent by at least one container; A calling module, configured to call the hardware resources of the second operating system according to the hardware driver request, so that the target business system runs based on the hardware resources.
9. An electronic device, characterized in that, Including: A processor and a memory, where the processor is configured to execute a running program of the business system stored in the memory to implement the running method of the business system according to any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the running method of the business system according to any one of claims 1 to 7.