CN116010026B - Micro-service control method and control system based on virtual path - Google Patents

Micro-service control method and control system based on virtual path Download PDF

Info

Publication number
CN116010026B
CN116010026B CN202211642393.7A CN202211642393A CN116010026B CN 116010026 B CN116010026 B CN 116010026B CN 202211642393 A CN202211642393 A CN 202211642393A CN 116010026 B CN116010026 B CN 116010026B
Authority
CN
China
Prior art keywords
micro
service
target
thread
environment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211642393.7A
Other languages
Chinese (zh)
Other versions
CN116010026A (en
Inventor
许光銮
李硕轲
李霁豪
张强
吴有明
张文凯
周瑞雪
刘丽
田璟
张景华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Aerospace Information Research Institute of CAS
Original Assignee
Aerospace Information Research Institute of CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Aerospace Information Research Institute of CAS filed Critical Aerospace Information Research Institute of CAS
Priority to CN202211642393.7A priority Critical patent/CN116010026B/en
Publication of CN116010026A publication Critical patent/CN116010026A/en
Application granted granted Critical
Publication of CN116010026B publication Critical patent/CN116010026B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Stored Programmes (AREA)

Abstract

The application provides a micro-service control method and a control system based on a virtual path, wherein the method is applied to the micro-service control system and comprises the following steps: responding to a micro-service creation instruction which is input by a first user and aims at a target micro-service category identification, and displaying a micro-service creation interface; receiving a target mirror image ID determined by a first user through the operation of the micro-service creation interface; receiving an executable code set, environment configuration information and a micro-service identifier to be stored which are input by a first user through a micro-service creation interface; determining a micro service path according to the target micro service category identification; storing the target mirror image ID, the executable code set, the environment configuration information and the micro service identification to be stored as target micro service information into a database according to the micro service path; and establishing a target micro-service identifier corresponding to the micro-service identifier to be stored in the micro-service identifier display catalog according to the micro-service path, and establishing an association relation between the target micro-service identifier and target micro-service information.

Description

Micro-service control method and control system based on virtual path
Technical Field
The present disclosure relates to the field of micro service control, and in particular, to a virtual path-based micro service control method and control system.
Background
The micro-service control system can allow a user to install an operating environment in an established container through mirror images and operate a corresponding neural network model in the operating environment so as to train or infer the neural network model. However, in the existing micro-service control system, the user needs to upload the mirror image and the neural network model by himself/herself every time so as to establish a corresponding micro-service embodiment to complete the operation of the neural network model. Thus, the same mirror image can be repeatedly uploaded for a plurality of times to cause a large amount of redundant storage in the system, which is extremely unfavorable for the operation of the micro-service control system.
Disclosure of Invention
In view of the above, the present application provides a virtual path-based micro service control method and control system, which at least partially solve the problems in the prior art.
In one aspect of the application, a micro-service control method based on a virtual path is provided and applied to a micro-service control system, wherein the micro-service control system comprises a mirror image memory, a database and a micro-service identification display catalog; a plurality of mutually different candidate environment images are stored in the image memory, the candidate environment images are used for generating corresponding running environments in a container, and each candidate environment image has a unique corresponding candidate image ID; the database stores a plurality of pieces of micro-service information, and the micro-service information is used for establishing corresponding micro-service examples; the micro service identification display catalog comprises a plurality of micro service category identifications, and each micro service category identification is provided with a plurality of corresponding micro service identifications.
The method comprises the following steps:
responding to a micro-service creation instruction which is input by a first user and aims at a target micro-service category identification, and displaying a micro-service creation interface; the target micro-service class identifier is any one of a plurality of micro-service class identifiers.
Receiving a target mirror image ID determined by a first user through the operation of the micro-service creation interface; the target image ID is any one of a plurality of candidate image IDs.
And receiving an executable code set, environment configuration information and a micro-service identifier to be stored which are input by the first user through the micro-service creation interface.
Determining a micro service path according to the target micro service category identification; the micro service path is used for determining the display position of the micro service identifier to be stored in the micro service identifier display catalog, and the storage position of the target mirror image ID, the executable code set, the environment configuration information and the micro service identifier to be stored in the database.
And storing the target mirror image ID, the executable code set, the environment configuration information and the micro service identification to be stored into the database as target micro service information according to the micro service path.
And establishing a target micro-service identifier corresponding to the micro-service identifier to be stored in the micro-service identifier display catalog according to the micro-service path, and establishing an association relation between the target micro-service identifier and the target micro-service information.
In an exemplary embodiment of the present application, the method further comprises:
and responding to an instance establishment instruction input by a first user and aiming at a target micro-service identification, and acquiring the target micro-service information from the database.
And determining the candidate image corresponding to the target image ID as a target image.
And establishing a target container containing a target running environment according to the target image and the environment configuration information.
And establishing a first thread in the target running environment, and controlling the first thread to run the executable code set so as to complete the establishment of the target micro-service instance corresponding to the target micro-service identifier.
In an exemplary embodiment of the present application, the configuration information includes the number of CPUs and the number of GPUs.
The establishing a target container according to the environment configuration information comprises the following steps:
and establishing the target container according to the CPU quantity and the GPU quantity.
In an exemplary embodiment of the present application, the configuration information further includes a maximum sharing number.
After completing the establishment of the target micro service instance corresponding to the target micro service identifier, the method further includes:
and responding to an instance establishment instruction input by a second user aiming at the target micro-service identification, and determining the current number of users of the target micro-service instance.
And if the number of the currently used people is smaller than the maximum sharing number, a second thread is established in the target running environment, and the second thread is controlled to run the executable code set.
In an exemplary embodiment of the present application, after said controlling said second thread to run said set of runnable code, said method further comprises:
and closing the second thread in response to an environment modification instruction of the second user to the target running environment.
And establishing a substitute container according to the environment configuration information.
Generating a substitute execution environment in the substitute container according to the target image and the environment modification instruction.
A third thread is established within the alternate execution environment and the set of executable code is controlled by the third line Cheng Yunhang.
In an exemplary embodiment of the present application, after completing the establishment of the target micro service instance corresponding to the target micro service identifier, the method further includes:
and responding to an instance establishment instruction input by a second user aiming at the target micro-service identification, and determining the CPU utilization rate and the GPU utilization rate of the target micro-service instance.
And if the CPU utilization rate is smaller than a first threshold value and the GPU utilization rate is smaller than a second threshold value, establishing a second thread in the target running environment, and controlling the second thread to run the executable code set.
In one exemplary embodiment of the present application, the micro service control system further comprises a status monitoring module; the state monitoring module is used for monitoring the thread state of a first thread in the target micro-service instance; the executable code set includes a restart instruction.
After completing the establishment of the target micro service instance corresponding to the target micro service identifier, the method further includes:
and if the state monitoring module determines that the thread state of the first thread is a stop running state, controlling the first thread to execute the restarting instruction.
In one exemplary embodiment of the present application, the micro service control system further comprises a status monitoring module; the state monitoring module is used for monitoring the thread state of the first thread in the target micro-service instance.
After completing the establishment of the target micro service instance corresponding to the target micro service identifier, the method further includes:
and if an instance establishment instruction aiming at the target micro-service identifier and input by a first user is received, acquiring the thread state of the first thread through the state monitoring module.
And if the thread state is the running stop state, closing the target micro-service instance, and reestablishing the target micro-service instance according to the target micro-service information.
If the thread state is the running state, outputting prompt information; the prompt information is used for prompting the first user that the first thread is running.
In another aspect of the present application, a micro service control system based on a virtual path is provided, wherein the micro service control system includes a mirror memory, a database, and a micro service identifier display directory; a plurality of mutually different candidate environment images are stored in the image memory, the candidate environment images are used for generating corresponding running environments in a container, and each candidate environment image has a unique corresponding candidate image ID; the database stores a plurality of pieces of micro-service information, and the micro-service information is used for establishing corresponding micro-service examples; the micro-service identification display catalog comprises a plurality of micro-service category identifications, and each micro-service category identification is provided with a plurality of corresponding micro-service identifications;
the micro service control system is used for executing the following steps:
responding to a micro-service creation instruction which is input by a first user and aims at a target micro-service category identification, and displaying a micro-service creation interface; the target micro-service class identifier is any one of a plurality of micro-service class identifiers;
Receiving a target mirror image ID determined by a first user through the operation of the micro-service creation interface; the target image ID is any one of a plurality of candidate image IDs;
receiving an executable code set, environment configuration information and a micro-service identifier to be stored which are input by a first user through the micro-service creation interface;
determining a micro service path according to the target micro service category identification; the micro service path is used for determining the display position of the micro service identifier to be stored in the micro service identifier display catalog, and the storage position of the target mirror image ID, the executable code set, the environment configuration information and the micro service identifier to be stored in the database;
storing the target mirror image ID, the executable code set, the environment configuration information and the micro service identification to be stored as target micro service information into the database according to the micro service path;
and establishing a target micro-service identifier corresponding to the micro-service identifier to be stored in the micro-service identifier display catalog according to the micro-service path, and establishing an association relation between the target micro-service identifier and the target micro-service information.
According to the micro-service control method based on the virtual path, a plurality of mutually different candidate environment images are stored in an image memory of a micro-service control system. The user can select the corresponding target mirror image ID by himself through the micro-service creation interface, and establish an association relation between the target mirror image ID and the executable code set uploaded by himself and the environment configuration information (namely, the target mirror image ID is used as the target micro-service information at the same time), so as to finally establish the target micro-service identification in the micro-service identification display catalog. The user can establish a responsive target micro-service instance directly through the operation of the target micro-service identification.
Specifically, when the target micro service instance is established, the running environment of the response can be established directly through the target mirror ID by using the candidate environment mirror stored in the database, and the executable code can be run. Therefore, the user can generate the corresponding micro service instance by using the candidate environment images stored in the database without uploading the environment images. The problem that the micro service control system performs a large amount of redundant storage on the environment mirror image due to the fact that the user repeatedly uploads the environment mirror image for a plurality of times is avoided.
Meanwhile, the target micro-service identifier is established in the micro-service identifier display catalog, and the target micro-service identifier and the target micro-service information have an association relationship, so that a user can quickly reestablish a target micro-service instance directly according to the target micro-service identifier in the subsequent use process, and the operation cost of the user is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a micro service control method based on a virtual path according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described in detail below with reference to the accompanying drawings.
It should be noted that, without conflict, the following embodiments and features in the embodiments may be combined with each other; and, based on the embodiments in this disclosure, all other embodiments that may be made by one of ordinary skill in the art without inventive effort are within the scope of the present disclosure.
It is noted that various aspects of the embodiments are described below within the scope of the following claims. It should be apparent that the aspects described herein may be embodied in a wide variety of forms and that any specific structure and/or function described herein is merely illustrative. Based on the present disclosure, one skilled in the art will appreciate that one aspect described herein may be implemented independently of any other aspect, and that two or more of these aspects may be combined in various ways. For example, an apparatus may be implemented and/or a method practiced using any number of the aspects set forth herein. In addition, such apparatus may be implemented and/or such methods practiced using other structure and/or functionality in addition to one or more of the aspects set forth herein.
Referring to fig. 1, in one aspect of the present application, a micro service control method based on a virtual path is provided and applied to a micro service control system, where the micro service control system includes a mirror memory, a database, and a micro service identifier display directory.
The image memory stores a plurality of mutually different candidate environment images, the candidate environment images are used for generating corresponding running environments in the container, and each candidate environment image has a unique corresponding candidate image ID. Specifically, the operating environment may be a computer environment such as an operating system, which is capable of being used for running a neural network model, software, program, and the like. The candidate environment image is typically a file system of a Python machine learning library in which an open source such as PyTorch, tensorFlow and Caffe is adapted to the environment such as CentOS and Ubuntu. For example, the candidate environment image may be a corresponding image of a common operating environment such as couchbase/centos7-systemd, pytorch/mmdetection: ubuntu 18.0. Specifically, the candidate environment image may be an ". Tar" type file generated by the image generator.
The database stores a plurality of micro service information, and the micro service information is used for establishing corresponding micro service examples.
The micro-service identification display catalog comprises a plurality of micro-service category identifications, each micro-service category identification is provided with a plurality of corresponding micro-service identifications, and each piece of micro-service information in the database is provided with a corresponding micro-service identification in the micro-service identification display catalog. The micro-service category identification may be target identification, target detection, target classification, or the like. The microservice identification may be a random forest, linear regression, convolutional neural network, or the like. It can be appreciated that the user can establish a corresponding micro service instance through the micro service information corresponding to the micro service identifier.
The method comprises the following steps:
and S100, responding to a micro-service creation instruction aiming at the target micro-service category identification, which is input by a first user, and displaying a micro-service creation interface. The target micro-service class identifier is any one of a plurality of micro-service class identifiers. Specifically, each micro-service class identifier has a corresponding micro-service creation button, and the user can generate and input a micro-service creation instruction by clicking the micro-service creation button corresponding to the target micro-service class identifier.
S200, receiving a target image ID determined by a first user through the operation of creating an interface for the micro service. The target image ID is any one of a plurality of candidate image IDs. Specifically, at least part of candidate mirror image IDs can be displayed on the micro-service creation interface in a popup window or a pull-down window mode, and a target mirror image ID is determined through clicking operation of a user.
S300, receiving an executable code set, environment configuration information and a micro-service identifier to be stored, which are input by a first user through the micro-service creation interface. Specifically, the micro-service creation interface is provided with an information input module or a data uploading module, so that a user can input an executable code set, environment configuration information and a micro-service identifier to be stored through the information input module or the data uploading module. Wherein the micro-service identification to be stored can be determined by user definition.
S400, determining a micro service path according to the target micro service category identification. Specifically, the micro service path includes a directory path for determining a display position of the micro service identifier to be stored in the micro service identifier display directory, and a storage path for determining a target mirror image ID, an executable code set, environment configuration information, and a storage position of the micro service identifier to be stored in the database. And the directory path and the storage path have a correspondence. The directory path determining method is to determine the subordinate path (which can be parallel to other micro-service identifiers established under the target micro-service category identifier) as the micro-service path according to the path corresponding to the target micro-service category identifier. Each micro-service class identity has several corresponding sub-stored data tables, different sub-stored data tables users storing different data, e.g. for storing candidate mirror IDs or executable codes etc. The storage location of the target mirror image ID, the executable code set, the environment configuration information and the micro service identifier to be stored can be determined through the path of the target sub storage data table corresponding to the target service type identifier, and a corresponding storage path is generated.
S500, storing the target mirror image ID, the executable code set, the environment configuration information and the micro service identification to be stored into the database as target micro service information according to the micro service path.
S600, establishing a target micro-service identifier corresponding to the micro-service identifier to be stored in the micro-service identifier display catalog according to the micro-service path, and establishing an association relation between the target micro-service identifier and the target micro-service information. The association relationship may be that the mapping table records the corresponding relationship to achieve association.
According to the micro-service control method based on the virtual path, a plurality of mutually different candidate environment images are stored in an image memory of a micro-service control system. The user can select the corresponding target mirror image ID by himself through the micro-service creation interface, and establish an association relation between the target mirror image ID and the executable code set uploaded by himself and the environment configuration information (namely, the target mirror image ID is used as the target micro-service information at the same time), so as to finally establish the target micro-service identification in the micro-service identification display catalog. The user can establish a responsive target micro-service instance directly through the operation of the target micro-service identification.
Specifically, when the target micro service instance is established, the running environment of the response can be established directly through the target mirror ID by using the candidate environment mirror stored in the database, and the executable code can be run. Therefore, the user can generate the corresponding micro service instance by using the candidate environment images stored in the database without uploading the environment images. The problem that the micro service control system performs a large amount of redundant storage on the environment mirror image due to the fact that the user repeatedly uploads the environment mirror image for a plurality of times is avoided.
Meanwhile, the target micro-service identifier is established in the micro-service identifier display catalog, and the target micro-service identifier and the target micro-service information have an association relationship, so that a user can quickly reestablish a target micro-service instance directly according to the target micro-service identifier in the subsequent use process, and the operation cost of the user is reduced.
In an exemplary embodiment of the present application, the method further comprises:
and responding to an instance establishment instruction input by a first user and aiming at a target micro-service identification, and acquiring the target micro-service information from the database. The target micro-service identifier is provided with a corresponding instance establishment button, and a user can generate and input an instance establishment instruction by clicking the instance establishment button.
Determining the candidate mirror image corresponding to the target mirror image ID as a target mirror image;
establishing a target container containing a target running environment according to the target image and the environment configuration information; wherein the configuration information includes the number of CPUs and the number of GPUs. So that the number of CPUs and GPUs required to build the target container can be determined by the number of CPUs and the number of GPUs to build the target container. Such that the target container has corresponding processing and computing energy.
And establishing a first thread in the target running environment, and controlling the first thread to run the executable code set so as to complete the establishment of the target micro-service instance corresponding to the target micro-service identifier.
In this embodiment, the user may directly establish the running environment of the response and perform the running of the executable code by using the candidate environment image stored in the database through the target image ID by performing a corresponding operation on the target service identifier. Therefore, the user can generate the corresponding micro service instance by using the candidate environment images stored in the database without uploading the environment images. The problem that the micro service control system performs a large amount of redundant storage on the environment mirror image due to the fact that the user repeatedly uploads the environment mirror image for a plurality of times is avoided.
Meanwhile, the target micro-service identifier is established in the micro-service identifier display catalog, and the target micro-service identifier and the target micro-service information have an association relationship, so that a user can quickly reestablish a target micro-service instance directly according to the target micro-service identifier in the subsequent use process, and the operation cost of the user is reduced.
In an exemplary embodiment of the present application, the configuration information further includes a maximum sharing number. The maximum number of shares is used to specify that a target microservice instance generated from target microservice information can be used at most by several users simultaneously.
After completing the establishment of the target micro service instance corresponding to the target micro service identifier, the method further includes:
and responding to an instance establishment instruction input by a second user aiming at the target micro-service identification, and determining the current number of users of the target micro-service instance.
And if the number of the currently used people is smaller than the maximum sharing number, a second thread is established in the target running environment, and the second thread is controlled to run the executable code set.
If the number of the currently used people is greater than or equal to the maximum sharing number, a new target container containing a target running environment is established, a second thread is established in the new target container containing the running environment, and the second thread is controlled to run the executable code set.
Since in this embodiment, the configuration information used by the established target container includes the number of CPUs and the number of GPUs, and the target container is established using the corresponding number of CPUs and GPUs. However, some users hardly estimate the specific number of the CPU and GPU resources occupied by the executable code set in actual running, and the situation that the number of the CPU and the number of the GPU are set too large often occurs, so that certain CPU and GPU resources are in an idle state, and the effective utilization rate of the processing resources is reduced. In this embodiment, the maximum sharing number may be set, so that the target micro service instance may be used by multiple user users at the same time. When other users (e.g., second users) establish the same target microservice instance through the target microservice identification, it may be determined whether a new thread (e.g., second thread) may be established in the target microservice instance to run the executable code set for use by other users by determining the current number of people used for the established target microservice instance. Therefore, the same micro-service embodiment is used by a plurality of instances at the same time, the effective utilization rate of resources of the micro-service embodiment is improved, the number of the established micro-service embodiments is reduced, and the control complexity of the micro-service control system on the micro-service embodiment is reduced.
In an exemplary embodiment of the present application, after completing the establishment of the target micro service instance corresponding to the target micro service identifier, the method further includes:
and responding to an instance establishment instruction input by a second user aiming at the target micro-service identification, and determining the CPU utilization rate and the GPU utilization rate of the target micro-service instance.
And if the CPU utilization rate is smaller than a first threshold value and the GPU utilization rate is smaller than a second threshold value, establishing a second thread in the target running environment, and controlling the second thread to run the executable code set.
In this embodiment, the user may not set the maximum sharing number, but the micro service control system determines whether the idle CPU resource and GPU resource are available for the second thread to run according to the CPU usage rate and GPU usage rate of the target micro service instance. The method and the system realize that a plurality of micro-service examples are used simultaneously, improve the effective utilization rate of resources of the micro-service examples, reduce the number of the established micro-service examples, and reduce the control complexity of a micro-service control system on the micro-service examples.
Specifically, the first threshold and the second threshold may be determined by the number of current first threads in the target micro service identifier and the CPU usage and GPU usage of each first thread. For example, a maximum CPU usage A1 and a maximum CPU usage B1 of the target micro service instance are acquired. Obtaining the maximum value of the CPU utilization rate of each first thread to obtain a target CPU utilization rate A2, and obtaining the maximum value of the GPU utilization rate of each first thread to obtain a target GPU utilization rate B2. Thus, the first threshold is A1-A2 and the second threshold is B1-B2. Thus, if the CPU utilization is less than the first threshold and the GPU utilization is less than the second threshold, it can be indicated that the second thread can have enough CPU resources and GPU resources to perform normal operation.
It should be noted that, the first thread in this embodiment refers not only to the thread established by the first user, but to all threads currently running in the micro service control system.
In an exemplary embodiment of the present application, after said controlling said second thread to run said set of runnable code, said method further comprises:
and closing the second thread in response to an environment modification instruction of the second user to the target running environment. The environment modification instruction includes modified running environment parameters, such as an operating system basic service enabling state, etc.
And establishing a substitute container according to the environment configuration information.
Generating a substitute execution environment in the substitute container according to the target image and the environment modification instruction.
A third thread is established within the alternate execution environment and the set of executable code is controlled by the third line Cheng Yunhang.
In this embodiment, since the same target micro service instance can be used by multiple users at the same time, in the use of the target micro service instance, if the processing data used by the users are different, new running environment requirements may be caused, and the users can change the current running environment through the environment modification instruction at this time. Avoiding affecting other users.
In one exemplary embodiment of the present application, the micro service control system further comprises a status monitoring module; the state monitoring module is used for monitoring the thread state of a first thread in the target micro-service instance; the executable code set includes a restart instruction.
After completing the establishment of the target micro service instance corresponding to the target micro service identifier, the method further includes:
and if the state monitoring module determines that the thread state of the first thread is a stop running state, controlling the first thread to execute the restarting instruction.
The state monitoring module may monitor not only the first thread in the target micro service instance, but also each thread in each micro service instance in the system, where the first thread in the target micro service instance is limited only for easy understanding, and it should be understood by those skilled in the art that the state monitoring module may also be capable of raising the thread in other micro service instances and executing corresponding operations.
In this embodiment, the monitoring module monitors the thread state of the first thread in the target microservice instance, so that when the thread state of the first thread is in a stop operation state (usually, abnormal stop operation caused by running bug and the like occurs), a restart instruction is automatically used to restart the operation of the first thread, thereby avoiding the occurrence of the situation that the first thread cannot work normally caused by running bug and the like. If the repeated execution of the restart instruction cannot enable the first thread to operate normally, the target container can be closed or deleted through manual operation of a user.
In one exemplary embodiment of the present application, the micro service control system further comprises a status monitoring module; the state monitoring module is used for monitoring the thread state of the first thread in the target micro-service instance.
After completing the establishment of the target micro service instance corresponding to the target micro service identifier, the method further includes:
and if an instance establishment instruction aiming at the target micro-service identifier and input by a first user is received, acquiring the thread state of the first thread through the state monitoring module.
And if the thread state is the running stop state, closing the target micro-service instance, and reestablishing the target micro-service instance according to the target micro-service information.
If the thread state is the running state, outputting prompt information; the prompt information is used for prompting the first user that the first thread is running.
In the practical application process, since the target micro-service instance is often operated in the background and the operation time is long time of several days or tens of days, the user often forgets to establish the same target micro-service instance in the subsequent use process and reestablishes a new target micro-service instance, so that the historically established target micro-service instance can cause unnecessary occupation of system resources. And if the thread state is the stop running state, closing the target micro-service instance, and reestablishing the target micro-service instance according to the target micro-service information. If the thread state is the running state, outputting prompt information; the prompt information is used for prompting the first user that the first thread is running so as to prevent the user from repeatedly establishing the same unnecessary target micro-service instance, thereby reducing unnecessary occupation of system resources.
In another aspect of the present application, there is further provided a micro-service control system based on a virtual path, the micro-service control system including a mirror memory, a database, and a micro-service identification display directory; a plurality of mutually different candidate environment images are stored in the image memory, the candidate environment images are used for generating corresponding running environments in a container, and each candidate environment image has a unique corresponding candidate image ID; the database stores a plurality of pieces of micro-service information, and the micro-service information is used for establishing corresponding micro-service examples; the micro-service identification display catalog comprises a plurality of micro-service category identifications, and each micro-service category identification is provided with a plurality of corresponding micro-service identifications;
the micro service control system is used for executing the following steps:
responding to a micro-service creation instruction which is input by a first user and aims at a target micro-service category identification, and displaying a micro-service creation interface; the target micro-service class identifier is any one of a plurality of micro-service class identifiers;
receiving a target mirror image ID determined by a first user through the operation of the micro-service creation interface; the target image ID is any one of a plurality of candidate image IDs;
Receiving an executable code set, environment configuration information and a micro-service identifier to be stored which are input by a first user through the micro-service creation interface;
determining a micro service path according to the target micro service category identification; the micro service path is used for determining the display position of the micro service identifier to be stored in the micro service identifier display catalog, and the storage position of the target mirror image ID, the executable code set, the environment configuration information and the micro service identifier to be stored in the database;
storing the target mirror image ID, the executable code set, the environment configuration information and the micro service identification to be stored as target micro service information into the database according to the micro service path;
and establishing a target micro-service identifier corresponding to the micro-service identifier to be stored in the micro-service identifier display catalog according to the micro-service path, and establishing an association relation between the target micro-service identifier and the target micro-service information.
Furthermore, although the steps of the methods in the present disclosure are depicted in a particular order in the drawings, this does not require or imply that the steps must be performed in that particular order or that all illustrated steps be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform, etc.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a mobile terminal, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
Those skilled in the art will appreciate that the various aspects of the present application may be implemented as a system, method, or program product. Accordingly, aspects of the present application may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
An electronic device according to this embodiment of the present application. The electronic device is only one example and should not impose any limitation on the functionality and scope of use of the embodiments of the present application.
The electronic device is in the form of a general purpose computing device. Components of an electronic device may include, but are not limited to: the at least one processor, the at least one memory, and a bus connecting the various system components, including the memory and the processor.
Wherein the memory stores program code that is executable by the processor to cause the processor to perform steps according to various exemplary embodiments of the present application described in the above section of the "exemplary method" of the present specification.
The storage may include readable media in the form of volatile storage, such as Random Access Memory (RAM) and/or cache memory, and may further include Read Only Memory (ROM).
The storage may also include a program/utility having a set (at least one) of program modules including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
The bus may be one or more of several types of bus structures including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures.
The electronic device may also communicate with one or more external devices (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device, and/or with any device (e.g., router, modem, etc.) that enables the electronic device to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface. And, the electronic device may also communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through a network adapter. The network adapter communicates with other modules of the electronic device via a bus. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with an electronic device, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification is also provided. In some possible implementations, the various aspects of the present application may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the present application as described in the "exemplary methods" section of this specification, when the program product is run on the terminal device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Furthermore, the above-described figures are only illustrative of the processes involved in the method according to exemplary embodiments of the present application, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions easily conceivable by those skilled in the art within the technical scope of the present application should be covered in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (9)

1. The micro-service control method based on the virtual path is characterized by being applied to a micro-service control system, wherein the micro-service control system comprises a mirror image memory, a database and a micro-service identification display catalog; a plurality of mutually different candidate environment images are stored in the image memory, the candidate environment images are used for generating corresponding running environments in a container, and each candidate environment image has a unique corresponding candidate image ID; the database stores a plurality of pieces of micro-service information, and the micro-service information is used for establishing corresponding micro-service examples; the micro-service identification display catalog comprises a plurality of micro-service category identifications, and each micro-service category identification is provided with a plurality of corresponding micro-service identifications;
The method comprises the following steps:
responding to a micro-service creation instruction which is input by a first user and aims at a target micro-service category identification, and displaying a micro-service creation interface; the target micro-service class identifier is any one of a plurality of micro-service class identifiers;
receiving a target mirror image ID determined by a first user through the operation of the micro-service creation interface; the target image ID is any one of a plurality of candidate image IDs;
receiving an executable code set, environment configuration information and a micro-service identifier to be stored which are input by a first user through the micro-service creation interface;
determining a micro service path according to the target micro service category identification; the micro service path is used for determining the display position of the micro service identifier to be stored in the micro service identifier display catalog, and the storage position of the target mirror image ID, the executable code set, the environment configuration information and the micro service identifier to be stored in the database;
storing the target mirror image ID, the executable code set, the environment configuration information and the micro service identification to be stored as target micro service information into the database according to the micro service path;
and establishing a target micro-service identifier corresponding to the micro-service identifier to be stored in the micro-service identifier display catalog according to the micro-service path, and establishing an association relation between the target micro-service identifier and the target micro-service information.
2. The virtual path-based micro service control method of claim 1, wherein the method further comprises:
responding to an instance establishment instruction input by a first user aiming at a target micro-service identifier, and acquiring target micro-service information from the database;
determining the candidate mirror image corresponding to the target mirror image ID as a target mirror image;
establishing a target container containing a target running environment according to the target image and the environment configuration information;
and establishing a first thread in the target running environment, and controlling the first thread to run the executable code set so as to complete the establishment of the target micro-service instance corresponding to the target micro-service identifier.
3. The virtual path-based micro service control method according to claim 2, wherein the configuration information includes the number of CPUs and the number of GPUs;
the establishing a target container according to the environment configuration information comprises the following steps:
and establishing the target container according to the CPU quantity and the GPU quantity.
4. The virtual path-based micro service control method of claim 3, wherein the configuration information further comprises a maximum sharing number;
After completing the establishment of the target micro service instance corresponding to the target micro service identifier, the method further includes:
responding to an instance establishment instruction input by a second user aiming at a target micro-service identification, and determining the current number of users of the target micro-service instance;
and if the number of the currently used people is smaller than the maximum sharing number, a second thread is established in the target running environment, and the second thread is controlled to run the executable code set.
5. The virtual path based micro service control method of claim 4, wherein after said controlling said second thread to run said set of runnable code, said method further comprises:
closing the second thread in response to an environment modification instruction of the second user to the target running environment;
establishing a substitute container according to the environment configuration information;
generating a substitute operating environment in the substitute container according to the target image and the environment modification instruction;
a third thread is established within the alternate execution environment and the set of executable code is controlled by the third line Cheng Yunhang.
6. The virtual path-based micro service control method according to claim 3, wherein after completing the establishment of the target micro service instance corresponding to the target micro service identifier, the method further comprises:
Responding to an instance establishment instruction input by a second user aiming at a target micro-service identifier, and determining the CPU utilization rate and the GPU utilization rate of the target micro-service instance;
and if the CPU utilization rate is smaller than a first threshold value and the GPU utilization rate is smaller than a second threshold value, establishing a second thread in the target running environment, and controlling the second thread to run the executable code set.
7. The virtual path-based micro service control method of claim 2, wherein the micro service control system further comprises a status monitoring module; the state monitoring module is used for monitoring the thread state of a first thread in the target micro-service instance; the executable code set comprises a restarting instruction;
after completing the establishment of the target micro service instance corresponding to the target micro service identifier, the method further includes:
and if the state monitoring module determines that the thread state of the first thread is a stop running state, controlling the first thread to execute the restarting instruction.
8. The virtual path-based micro service control method of claim 2, wherein the micro service control system further comprises a status monitoring module; the state monitoring module is used for monitoring the thread state of a first thread in the target micro-service instance;
After completing the establishment of the target micro service instance corresponding to the target micro service identifier, the method further includes:
if an instance establishment instruction aiming at a target micro-service identifier and input by a first user is received, acquiring a thread state of the first thread through the state monitoring module;
if the thread state is the stop running state, closing the target micro-service instance, and reestablishing the target micro-service instance according to the target micro-service information;
if the thread state is the running state, outputting prompt information; the prompt information is used for prompting the first user that the first thread is running.
9. The micro-service control system based on the virtual path is characterized by comprising a mirror image memory, a database and a micro-service identification display catalog; a plurality of mutually different candidate environment images are stored in the image memory, the candidate environment images are used for generating corresponding running environments in a container, and each candidate environment image has a unique corresponding candidate image ID; the database stores a plurality of pieces of micro-service information, and the micro-service information is used for establishing corresponding micro-service examples; the micro-service identification display catalog comprises a plurality of micro-service category identifications, and each micro-service category identification is provided with a plurality of corresponding micro-service identifications;
The micro service control system is used for executing the following steps:
responding to a micro-service creation instruction which is input by a first user and aims at a target micro-service category identification, and displaying a micro-service creation interface; the target micro-service class identifier is any one of a plurality of micro-service class identifiers;
receiving a target mirror image ID determined by a first user through the operation of the micro-service creation interface; the target image ID is any one of a plurality of candidate image IDs;
receiving an executable code set, environment configuration information and a micro-service identifier to be stored which are input by a first user through the micro-service creation interface;
determining a micro service path according to the target micro service category identification; the micro service path is used for determining the display position of the micro service identifier to be stored in the micro service identifier display catalog, and the storage position of the target mirror image ID, the executable code set, the environment configuration information and the micro service identifier to be stored in the database;
storing the target mirror image ID, the executable code set, the environment configuration information and the micro service identification to be stored as target micro service information into the database according to the micro service path;
And establishing a target micro-service identifier corresponding to the micro-service identifier to be stored in the micro-service identifier display catalog according to the micro-service path, and establishing an association relation between the target micro-service identifier and the target micro-service information.
CN202211642393.7A 2022-12-20 2022-12-20 Micro-service control method and control system based on virtual path Active CN116010026B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211642393.7A CN116010026B (en) 2022-12-20 2022-12-20 Micro-service control method and control system based on virtual path

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211642393.7A CN116010026B (en) 2022-12-20 2022-12-20 Micro-service control method and control system based on virtual path

Publications (2)

Publication Number Publication Date
CN116010026A CN116010026A (en) 2023-04-25
CN116010026B true CN116010026B (en) 2023-07-07

Family

ID=86034729

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211642393.7A Active CN116010026B (en) 2022-12-20 2022-12-20 Micro-service control method and control system based on virtual path

Country Status (1)

Country Link
CN (1) CN116010026B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109445869A (en) * 2018-09-17 2019-03-08 山东中创软件商用中间件股份有限公司 A kind of micro services management method, device and storage medium across cloud adaptation
CN115309500A (en) * 2022-07-26 2022-11-08 浪潮云信息技术股份公司 Method and system for deploying application and managing operation and maintenance of micro service architecture on cloud

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10860339B2 (en) * 2018-08-03 2020-12-08 Dell Products L.P. Autonomous creation of new microservices and modification of existing microservices

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109445869A (en) * 2018-09-17 2019-03-08 山东中创软件商用中间件股份有限公司 A kind of micro services management method, device and storage medium across cloud adaptation
CN115309500A (en) * 2022-07-26 2022-11-08 浪潮云信息技术股份公司 Method and system for deploying application and managing operation and maintenance of micro service architecture on cloud

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于微服务架构的云容器管理系统设计与实现;王阳;中国优秀硕士学位论文全文数据库 信息科技辑;全文 *

Also Published As

Publication number Publication date
CN116010026A (en) 2023-04-25

Similar Documents

Publication Publication Date Title
CN107885762B (en) Intelligent big data system, method and equipment for providing intelligent big data service
US20200364085A1 (en) Task scheduling based on performance control conditions for multiple processing units
CN109034394B (en) Updating method and device of machine learning model
CN107506300B (en) User interface testing method, device, server and storage medium
US11126938B2 (en) Targeted data element detection for crowd sourced projects with machine learning
CN109726076B (en) Applet life cycle management method and system
CN109542744A (en) Detect method, apparatus, storage medium and the terminal of terminal booting abnormal problem
US11656928B2 (en) Detecting datacenter mass outage with near real-time/offline using ml models
CN113312072A (en) Configuration file updating method and device, electronic equipment and medium
CN107045475B (en) Test method and device
CN112911013A (en) Cloud application processing method and device, computer equipment and storage medium
CN111330280A (en) Data processing method and device in game, storage medium and electronic equipment
US7805734B2 (en) Platform management of high-availability computer systems
CN114358742A (en) Workflow execution method, device, equipment and storage medium
CN112769876A (en) Method, device, equipment and medium for acquiring equipment channel information
CN117033146B (en) Identification method, device, equipment and medium for appointed consensus contract execution process
CN116010026B (en) Micro-service control method and control system based on virtual path
CN113191889A (en) Wind control configuration method, configuration system, electronic device and readable storage medium
CN110347546B (en) Dynamic adjustment method, device, medium and electronic equipment for monitoring task
CN111258618A (en) File configuration method and device, computer equipment and storage medium
US20230259377A1 (en) User input predictive action system and method for user interfaces
CN111176944A (en) Block chain intelligent contract calling record analysis method, device, terminal and storage medium
CN110673898A (en) Equipment management method, first equipment and interaction system
CN113722007B (en) Configuration method, device and system of VPN branch equipment
CN112735601B (en) Test method, device and equipment for determining infectious disease close-contact population by using Bluetooth

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant