CN115080364A - Application state determination method and device, electronic equipment and storage medium - Google Patents

Application state determination method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115080364A
CN115080364A CN202210554856.8A CN202210554856A CN115080364A CN 115080364 A CN115080364 A CN 115080364A CN 202210554856 A CN202210554856 A CN 202210554856A CN 115080364 A CN115080364 A CN 115080364A
Authority
CN
China
Prior art keywords
application
state
determining
management platform
resource content
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.)
Pending
Application number
CN202210554856.8A
Other languages
Chinese (zh)
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202210554856.8A priority Critical patent/CN115080364A/en
Publication of CN115080364A publication Critical patent/CN115080364A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/323Visualisation of programs or trace data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • 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

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure provides an application state determination method and device, electronic equipment and a storage medium, and relates to the technical fields of cloud computing, big data and the like. The specific implementation scheme is as follows: acquiring basic information of an application from an application management platform; acquiring the state of the corresponding resource content from the application management platform based on the basic information of the application; and determining the state of the application based on the state of the resource content corresponding to the application. The disclosed technology can accurately determine the state of an application.

Description

Application state determination method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to the field of cloud computing and big data technologies, and in particular, to a method and an apparatus for determining an application state, an electronic device, and a storage medium.
Background
With the development of internet technology, micro-service orchestration architectures such as kubernets (K8 s for short) based on containerization application management platforms are increasingly widely used. An application-based deployment device such as the helm may deploy the required services at the application management platform.
Under the current architecture, it can be supported to query whether the application deployed in the application management platform based on the application deployment device is correctly installed. For example, installation of an application on an application management platform may be initiated by an application deployment device. If the installation fails, the application deployment device can acquire the message of the application installation failure. If the installation is successful, the application deployment device can acquire a message that the application installation is successful.
Disclosure of Invention
The disclosure provides an application state determination method, an application state determination device, electronic equipment and a storage medium.
According to an aspect of the present disclosure, there is provided an application state determination method, including:
acquiring basic information of an application from an application management platform;
acquiring the state of resource content corresponding to the application from the application management platform based on the basic information of the application;
and determining the state of the application based on the state of the resource content corresponding to the application.
According to another aspect of the present disclosure, there is provided an application state determination apparatus including:
the information acquisition module is used for acquiring basic information of the application from the application management platform;
a state obtaining module, configured to obtain, from the application management platform, a state of resource content corresponding to the application based on the basic information of the application;
and the determining module is used for determining the state of the application based on the state of the resource content corresponding to the application.
According to still another aspect of the present disclosure, there is provided an electronic device including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the method of the aspects and any possible implementation described above.
According to yet another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of the above-described aspect and any possible implementation.
According to yet another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method of the aspects and any possible implementation as described above.
According to the technique of the present disclosure, the state of an application can be accurately determined. .
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram according to a first embodiment of the present disclosure;
FIG. 2 is a schematic diagram according to a second embodiment of the present disclosure;
FIG. 3 is a state flow diagram provided by an embodiment of the present disclosure;
FIG. 4 is a schematic diagram according to a third embodiment of the present disclosure;
FIG. 5 is a schematic diagram according to a fourth embodiment of the present disclosure;
FIG. 6 is a schematic diagram according to a fifth embodiment of the present disclosure;
FIG. 7 is a block diagram of an electronic device used to implement methods of embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It is to be understood that the described embodiments are only a few, and not all, of the disclosed embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without inventive step, are intended to be within the scope of the present disclosure.
It should be noted that the terminal device involved in the embodiments of the present disclosure may include, but is not limited to, a mobile phone, a Personal Digital Assistant (PDA), a wireless handheld device, a Tablet Computer (Tablet Computer), and other intelligent devices; the display device may include, but is not limited to, a personal computer, a television, and the like having a display function.
In addition, the term "and/or" herein is only one kind of association relationship describing an associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
The current application deployment device can only inquire whether the application is correctly installed, and if a user wants to know the detailed state of the application, such as whether the application is running after installation, the current architecture cannot realize the application deployment device. Therefore, it is desirable to provide a solution capable of querying the application state.
FIG. 1 is a schematic diagram according to a first embodiment of the present disclosure; as shown in fig. 1, this embodiment provides an application state determining method, which may be applied in an application state determining apparatus, and specifically includes the following steps:
s101, acquiring basic information of an application from an application management platform;
s102, acquiring the state of resource content corresponding to the application from the application management platform based on the basic information of the application;
s103, determining the state of the application based on the state of the resource content corresponding to the application.
The application state determining apparatus of this embodiment may be logically independent of the application deployment apparatus and the application management platform, and may query the state of the application deployed in the application management platform by the application deployment apparatus.
The application management platform of this embodiment may also be referred to as a containerized application management platform, and may be an open-source application for managing containerized applications on multiple hosts in the cloud platform.
In practical applications, operation and maintenance personnel often need to know the real state of each application deployed based on the application deployment device so as to be able to monitor each application in time. In this embodiment, the query of the application state can be realized based on the requirements of the operation and maintenance personnel. For example, the operation and maintenance personnel, as a user, initiate a state query request carrying the application identifier to the application state determination device through the human-machine interface module.
On the side of the application state determining device, after receiving a state query request initiated by a user, basic information of an application is acquired from an application management platform. Specifically, the application state determining apparatus may first send an information obtaining request carrying the application identifier to the application management platform; after receiving the information acquisition request, the application management platform acquires the basic information of the application based on the application identifier and returns the basic information to the application state determination device. Next, the application state determination device further acquires the state of the resource content corresponding to the application from the application management platform based on the acquired basic information of the application. The resource content corresponding to the application may refer to resource content deployed by the application, such as an application instance pod. Then, the application state determination device may determine the state of the application based on the acquired state of the resource content corresponding to the application. Finally, the application state determining device can display the state of the application for the user to view. Or the determined state of the application can be sent to the terminal of the user for the user to view.
The application state determining method of this embodiment may accurately determine the state of the application by obtaining the state of the resource content corresponding to the application from the application management platform. Different from the prior art that only whether the application is correctly installed is obtained, the accuracy of the obtained state of the application can be effectively ensured due to the reference of the state of the resource content corresponding to the application.
Under the existing architecture, it can only be supported whether the application is installed correctly. But whether an application is installed correctly is a relatively static piece of information. The information is not updated along with the upgrading of the application and the change of the running state of the application. That is, the information and the running state of the application are completely separated, and the real situation of the resource content of each application deployed in the application management platform cannot be reflected by the information and the running state of the application. By adopting the technical scheme of the embodiment, the real situation of the application in the application management platform can be known based on the state of the resource content corresponding to the application, and the state of the application can be accurately determined.
FIG. 2 is a schematic diagram according to a second embodiment of the present disclosure; as shown in fig. 2, the application state determining method of the present embodiment further describes the technical solution of the present disclosure in more detail on the basis of the technical solution of the embodiment shown in fig. 1. As shown in fig. 2, the method for determining an application state in this embodiment may specifically include the following steps:
s201, sending an information acquisition request carrying the application identifier to an application management platform based on a state query request carrying the application identifier initiated by a user;
and if the application management platform detects that the application is installed based on the application identifier, the application management platform acquires the basic information of the application according to the information acquisition request and returns the basic information to the application state determination device. If the application management platform detects that the application is not installed in the application management platform, at this time, the application management platform returns information without the application to the application state determination device, for example, the information may be null information to indicate that the application management platform does not have basic information of the application.
S202, receiving information returned by the application management platform;
s203, detecting whether the information returned by the application management platform is application-free information or application basic information; if yes, executing step S204; if the information is null, go to step S210;
optionally, in this embodiment, the information returned by the application management platform may be basic information of the application, for example, the basic information may specifically include at least one of installation time of the application, latest change time, and a resource content identifier corresponding to the application. That is, at this time, the application state determination means may acquire at least one of the installation time of the application, the latest change time, and the resource content identifier corresponding to the application from the application management platform.
Where installation time refers to the time the application was installed. The latest change time refers to the time before the current time when the application was last changed. The application change in the actual application may refer to upgrading of the application or modification of parameters, and the like. The resource content identification corresponding to the application may refer to a name of an application instance, pod, where the application is deployed. In a specific operation, the basic information of the application, which is acquired from the application management platform by the application state determining apparatus, may further include other information of the application, such as a number of upgrades, a number of parameter changes, and the like, which are performed in a total number, and is not limited herein. After the basic information of the application is acquired from the application management platform, the subsequent processing can be further performed based on the basic information of the application so as to accurately determine the state of the application.
S204, acquiring the state of the resource content from the application management platform based on the resource content identifier corresponding to the application in the application basic information;
specifically, the process of acquiring the state of the resource content may include sending a state query request carrying a resource content identifier to the application management platform, and after receiving the state query request, the application management platform queries the state of the resource content identifier and returns the state. Correspondingly, the application state determining device receives the state of the resource content returned by the application management platform.
It should be noted that, if one application corresponds to multiple resource contents, the state corresponding to each resource content needs to be queried.
For example, the state of the resource content acquired by the present embodiment may be a normal operation state or an abnormal operation state. Moreover, in practical applications, the resource content, such as pod, deployed by one application on the resource management platform may be one, two, or more. Here, the state of each resource content of the application needs to be acquired. Since the state of the resource content can directly reflect the running state of the application, the state of the application can be determined more accurately when the state of the application is determined subsequently by acquiring the state of the resource content.
S205, detecting whether the states of the resource content corresponding to the application are all in a normal running state; if yes, go to step S206; if not, go to step S207;
it should be noted here that, when one application corresponds to a plurality of resource contents, the state of each resource content corresponding to the application needs to be detected.
And S206, determining the state of the application as the running state, and ending.
S207, determining whether the application is installed within a first preset time length before the current time or not based on the installation time of the application, or determining whether the application is updated within a second preset time length before the current time or not based on the latest change time; if yes, go to step S208; otherwise, executing step S209;
s208, determining the state of the application as an un-ready state, and ending;
s209, determining the state of the application as an operation fault state, and ending;
that is, it is determined that the application has not been installed within a first preset time period before the current time based on the installation time of the application, and it is determined that the application has not been updated within a second preset time period before the current time based on the latest change time, and it is determined that the state of the application is the operation failure state.
The first preset time length and the second preset time length of the present embodiment may be set according to actual requirements, and may be, for example, 10min, 20min, or other time lengths. The first preset time length and the second preset time length may be the same or different.
S210, determining that the state of the application is an uninstalled state; step S211 is executed;
that is, if the basic information of the application is not acquired from the application management platform, at this time, the state of the application may be determined to be the uninstalled state.
Specifically, although all resource contents corresponding to the application are not normally operated, if the application is installed within a first preset time period before the current time, or if the application is updated within a second preset time period before the current time, it is indicated that the resource contents are not normally operated because the application is just installed or just updated, and at this time, it can be presumed that the application is in an un-ready state. However, if all the resource contents corresponding to the application are not normally operated, the application is not installed within a first preset time period before the current time, and the application is not updated within a second preset time period before the current time, it is indicated that the application is currently in an operation failure state, so that all the resource contents are not normally operated.
Steps S205-S206 are a specific implementation manner for determining the state of the application based on the state of the resource content corresponding to the application.
Steps S205, S207-S210 are several specific implementations of determining the state of the application based on the state of the resource content corresponding to the application and the basic information of the reference application.
In either of these ways, the detailed state of the application in operation can be accurately determined.
S211, sending an installation request carrying the application identifier to an application management platform; step S212 is executed;
the step is an optional step, and in practical application, when the application state is determined to be the uninstalled state, the application can be installed on the application management platform based on the existing mode. According to the architecture of this embodiment, an installation request may also be sent to the application management platform by the application state determination device. It should be noted that the installation request initiated by the application state determining apparatus may be triggered when the uninstalled state of the application is detected. Or the user can trigger the installation request initiated by the application state determination device through the man-machine interface module.
S212, receiving a feedback message returned by the application management platform; step S213 is executed;
specifically, whether application installation is successful or not can be detected on the application management platform side, if alarm occurs in the installation process, the installation is failed, and if the alarm is not given, the installation is completed.
S213, detecting whether the feedback message is a feedback message indicating successful installation or a feedback message indicating failed installation; if the feedback message indicates that the installation is successful, go to step S214; otherwise, if the feedback message indicates that the installation is failed, go to step S215;
and S214, updating the state of the application to be an un-ready state, and ending.
And S215, updating the state of the application to be the installation failure state, and ending.
Optionally, after determining that the application installation fails, the step S211 may be further returned to trigger the installation request again.
In addition, optionally, the application status viewing apparatus may perform updating of the application, such as upgrading or configuring parameters, in addition to installation of the application. Specifically, an upgrade request or a parameter configuration request of the application is sent to the application management platform, so that the resource management platform executes corresponding operations.
Based on the above steps in this embodiment, it can be known that the application deployment apparatus may control the installation of the application deployed in the application management platform by the application state determination apparatus. In the application state determination device, based on each state of the application, a flow relationship of each state of the application may be obtained according to the logic of the state flow.
In addition, further optionally, in an embodiment of the present disclosure, in the application installed state, whether the application is in an un-ready state, an operating state, or an operating failure state, the application deployed by the application deployment device in the application management platform may be controlled to be destroyed by the application state determination device. For example, the method specifically comprises the following steps:
(a) initiating a destruction request carrying an application identifier to an application management platform;
(b) detecting whether the resource content corresponding to the application in the application management platform is released, and if the resource content corresponding to the application in the application management platform is not released, determining that the application state is a destruction state; and if the fact that the resource content corresponding to the application in the application management platform is released is detected to be completed, determining that the state of the application is a destroyed state.
Further optionally, after the destroy request is sent, a prompt message of the destroy failure fed back by the application management platform is received, at this time, the state of the application may be determined to be the destroy failure state, at this time, the destroy request may be initiated again to destroy the application again until the state of the application reaches the destroyed state. For example, fig. 3 is a schematic diagram of a state transition provided by an embodiment of the present disclosure. As shown in fig. 3, the application state determination device can obtain the state flow relationship as shown in the figure based on the manner of this embodiment.
In this embodiment, the application state viewing apparatus may not only view the state of the application, but also perform installation and destruction on the application, so as to effectively manage the application in the application management platform, and improve the management efficiency of the application.
By adopting the technical scheme of the embodiment, the application state determining method of the embodiment can inquire states of the application, such as an uninstalled state, an installation failure state, an un-ready state, an operating failure state, a destroying state, a destroyed state and the like, and can accurately inquire the application state so as to accurately monitor the application. In addition, in the embodiment, the installation and destruction of the application in the application management platform can be controlled by the application state determining device, so that the management efficiency of the application in the application management platform can be effectively improved.
FIG. 4 is a schematic diagram according to a third embodiment of the present disclosure; as shown in fig. 4, the present embodiment provides an application scenario diagram of an application state determination method. As shown in fig. 4, in this embodiment, taking an application deployment device as a helm, an application management platform as a kubernets cluster, and an application state determining device as an example of a helm-based application state determining device, a technical solution of the present disclosure is described in detail.
As shown in fig. 4, the user in this embodiment may refer to an operation and maintenance worker who requests to view the application state. In this embodiment, a palm sdk module and a kubernets sdk module are provided in the palm-based application state determination device, for example.
The palm sdk module is in communication with the application lifecycle module in the kubernets cluster, and is used for sending various operation requests, such as installation, destruction, application updating requests, information acquisition requests, and other basic information query requests, such as configuration query requests, update time query requests, to the application lifecycle module in the kubernets cluster.
And the kubernets sdk module is communicated with the application instance module in the kubernets cluster and used for inquiring the running state, the detailed information and the like of the application instance pod in the cluster.
In this embodiment, the kubernets cluster is used as an actual running environment of the application instance pod of the application deployment, and the application life cycle information module and the application instance module are managed. In the architecture shown in fig. 4, the role of the information carrier of the application instance pod is played. Meanwhile, the method can provide query service for query requests sent by the helm-based application state determination device through the helm sdk module and the kubernets sdk module, and query corresponding information in the kubernets cluster.
For example, with reference to fig. 1, a query flow of an application state in an application scenario of this embodiment is described, which may specifically include the following steps:
1. a user puts forward an inquiry requirement of an application state and sends the inquiry requirement to an application state determining device based on helm through a human-computer interface module; the query request may carry an application identifier, such as an application name or ID or other unique identifier capable of identifying the application;
2. receiving a query request of an application state initiated by a user by an application state determining device based on the palm;
3. the method comprises the steps that a helm-based application state determination device uses a helm sdk module to send an information query request carrying an application identifier to an application life cycle module in a kubernets cluster;
conventionally, after each application is installed in the kubernets cluster, all the basic information of the lifecycle is stored in the application lifecycle module of the k8s cluster. The basic information of the application life cycle may include installation time, change time, resource content identification deployed by the application, and the like of the application. For example, in this embodiment, the resource content deployed by the application is taken as an application instance pod as an example, and correspondingly, the resource content identifier is a name of the application instance pod.
4. The helm-based application state determination device acquires the returned basic information of the application;
optionally, if the kubernets cluster does not install the application, the returned information obtained in step 4 is not the basic information of the application, but is a null information, or there is no prompt information of the application information. At this time, the helm-based application state determination means may determine that the kubernets cluster does not install the application. At this time, the helm-based application status determination device may return the status of the application to the user as an uninstalled status.
Optionally, further, when the user sends an installation request, the helm-based application state determination device may initiate the installation request of the application to the application discovery period module in the kubernets cluster, and if there is no error report in the installation process, the feedback message is that the installation is successful. At this time, the helm-based application state determination means may determine that the state of the application is the not-ready state. If there is an error in the installation process, at this time, the helm-based application state determination device may determine that the state of the application is an installation failure state. Further, a user installation failure may be fed back. And the installation can be continuously tried according to the installation flow.
5. The helm-based application state determining device sends a state query request to an application instance module in kubernets through the kubernets sdk module according to the name of the application instance pod in the basic information;
the application instance module in kubernets is used for managing the current actual state of the deployment resource included in the application, namely each application instance pod, and the current actual state may include a normal operation state or an abnormal operation state. The application instance module can acquire the state of the corresponding application instance pod based on the state query request and return the state to the palm-based application state determination device.
6. Receiving the state of an application instance pod returned by an application instance module in kubernets by an application state determining device based on helm;
7. the palm-based application state determining device is used for determining the state of the application based on the state of the application instance pod and the installation time and the latest change time of the application in the basic information;
if the states of all the application instances pod are normal, the helm-based application state determining device can determine that the application state is a running state;
if the abnormal normal state exists in the states of all the application instances pod, the state of the application needs to be determined by means of the installation time and the latest change time in the basic information. For example, taking the first preset time length and the second preset time length both being 10min as an example, if it is determined that the application has not been installed within the last 10min based on the installation time of the application, and it is determined that the application has not been changed within the last 10min based on the latest change time, it is determined that the state of the application is the operation failure state. And if the application is installed within the last 10min or changed within the last 10min, determining that the state of the application is an un-ready state.
Referring to fig. 3 described above, a flow relation diagram of the application shown in fig. 3 may be maintained in the helm-based application state determination device. For example:
in the application not-ready state or the running failure state, when all the application instances pod are in the normal running state, it may be determined that the application state is changed to the running state.
And under the condition that the application is not ready or in the running state, the state of the application is kept/changed into the non-ready state under the condition that one or some application instances pod have abnormity within 10min of the installation/last change time.
And under the condition that the application is not ready or in the running state, the application state is determined to be changed into the running fault state as long as the application instance pod has an abnormal condition more than 10min away from the last installation/change time.
Further, in the case where the application is installed (not ready, running failure, or running state), a change operation is performed on the application, and the state of the application becomes not ready, which is consistent with the result of the above-described detection and inference.
Furthermore, in the case that an application is installed (not ready, running failure, or running state), when a user wants to destroy a certain application, specifically, the helm-based application state determination device may send an indication to destroy all application instances pod corresponding to the application instance modules in the kubernets cluster through kubernets sdk, and the corresponding application instance module releases the corresponding application instance pod in the indication, at this time, the application instance pod state becomes in destruction, and correspondingly, the helm-based application state determination device determines that the application state is in destruction. In the destroy-in-state, when it is detected that all application instances pod have been released in the kubernets cluster, the helm-based application state determination means determines that the application state becomes destroyed. And at this time, the birth period module in the kubernets cluster also updates the basic information of the application, and specifically, all the basic information of the application can be deleted according to the setting requirement in the cluster. If the user needs to reuse, the installation can be initiated again.
8. The helm-based application state determination device feeds back the determined state of the application to the user.
Specifically, the state of the application can be directly displayed for the user to view. Or the application state can be sent to the terminal corresponding to the user for the user to check.
In this embodiment, each state can be reasonably and accurately determined in the helm-based application state determination device, and the flow logic between the states is also very reasonable, so that the device conforms to the actual application scenario, and a user can more easily understand the application state.
The application state determination method of the embodiment overcomes the defects of the existing kubernets and helm application arrangement schemes in application state determination, combines the application life cycle information deployed based on helm with the actual state of the application instance pod in the kubernets cluster, comprehensively considers the application life cycle state and the running state of the application instance pod in the kubernets cluster, further determines the application state, and can objectively, truly and accurately determine the application state.
The application state determination method can be applied in the kubernets micro-service application management direction, so that a user can master the real running state of each application at any time, problems can be conveniently and quickly located and checked, and the micro-service management capability of the whole project can be effectively improved.
FIG. 5 is a schematic diagram according to a fourth embodiment of the present disclosure; as shown in fig. 5, the present embodiment provides an application state determining apparatus 500, including:
an information obtaining module 501, configured to obtain basic information of an application from an application management platform;
a state obtaining module 502, configured to obtain, based on the basic information of the application, a state of resource content corresponding to the application from the application management platform;
a determining module 503, configured to determine a state of the application based on the state of the resource content corresponding to the application.
The application state determining apparatus 500 of this embodiment, which is the same as the related method described above, may refer to the description of the related method in detail, and is not described herein again.
FIG. 6 is a schematic diagram according to a fifth embodiment of the present disclosure; as shown in fig. 6, the present embodiment provides an application status determining apparatus 600, which includes the modules with the same name and the same function shown in fig. 5, an information obtaining module 601, a status obtaining module 602, and a determining module 603.
Further optionally, in this embodiment, the information obtaining module 601 is configured to obtain, from the application management platform, at least one of an installation time of the application, a latest change time of the application, and a resource content identifier corresponding to the application.
Further optionally, in this embodiment, the state obtaining module 602 is configured to:
and acquiring the state of the resource content from the application management platform based on the resource content identifier corresponding to the application.
Further optionally, in this embodiment, the determining module 603 is configured to:
and if the state of the resource content corresponding to the application is the normal running state, determining that the state of the application is the running state.
Further optionally, in this embodiment, the determining module 603 is configured to:
and determining the state of the application based on the state of the resource content corresponding to the application and the basic information of the application.
Further optionally, in this embodiment, the determining module 603 is configured to:
if the state of the resource content corresponding to the application is abnormal operation, and the application is determined to be installed within a first preset time length before the current time based on the installation time of the application, or the application is determined to be updated within a second preset time length before the current time based on the latest change time, the state of the application is actually not in a ready state; or
If the state of the resource content corresponding to the application is abnormal operation, the application is determined not to be installed within a first preset time length before the current time based on the installation time of the application, and the application is determined not to be updated within a second preset time length before the current time based on the latest change time, the state of the application is actually an operation fault state.
Further optionally, in this embodiment, the determining module 603 is further configured to:
and if the basic information of the application is not acquired from the application management platform, determining that the state of the application is an uninstalled state.
Further optionally, as shown in fig. 6, in this embodiment, the method further includes:
a sending module 604, configured to initiate an installation request carrying an identifier of an application to an application management platform;
a determining module 603, further configured to:
if a feedback message indicating successful installation is received, updating the state of the application to be a non-ready state;
and if a feedback message indicating the installation failure is received, updating the state of the application to be the installation failure state.
Further optionally, in this embodiment, the sending module 604 is further configured to initiate a destroy request carrying the identifier of the application to the application management platform;
the determining module 603 is further configured to determine that the application state is a destruction state if it is detected that the resource content corresponding to the application in the application management platform is not released completely.
Further optionally, in this embodiment, the determining module 603 is further configured to:
and if the fact that the resource content corresponding to the application in the application management platform is released is detected to be completed, determining that the state of the application is a destroyed state.
It should be noted that the application state determining apparatus 600 of this embodiment further includes a receiving module, configured to receive a state query request carrying an application identifier, where the state query request is initiated by a user through the human-machine interface module. And based on the state query request of the user, the query and determination of the application state are realized through the modules.
The application state determining apparatus 600 of this embodiment, which is the same as the related method described above, may refer to the description of the related method in detail, and is not described herein again.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the personal information of the related user all accord with the regulations of related laws and regulations, and do not violate the good customs of the public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 7 illustrates a schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 7, the device 700 comprises a computing unit 701, which may perform various suitable actions and processes according to a computer program stored in a Read Only Memory (ROM)702 or a computer program loaded from a storage unit 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Various components in the device 700 are connected to the I/O interface 705, including: an input unit 706 such as a keyboard, a mouse, or the like; an output unit 707 such as various types of displays, speakers, and the like; a storage unit 708 such as a magnetic disk, optical disk, or the like; and a communication unit 709 such as a network card, modem, wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
Computing unit 701 may be a variety of general purpose and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The computing unit 701 performs the various methods and processes described above, such as the methods described above of the present disclosure. For example, in some embodiments, the above-described methods of the present disclosure may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of a computer program may be loaded onto and/or installed onto device 700 via ROM 702 and/or communications unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the above-described method of the present disclosure described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured by any other suitable means (e.g., by means of firmware) to perform the above-described methods of the present disclosure.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user may provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (19)

1. An application state determination method, comprising:
acquiring basic information of an application from an application management platform;
acquiring the state of resource content corresponding to the application from the application management platform based on the basic information of the application;
and determining the state of the application based on the state of the resource content corresponding to the application.
2. The method of claim 1, wherein obtaining basic information of the application from the application management platform comprises: and acquiring at least one of installation time, latest change time and resource content identification corresponding to the application from the application management platform.
3. The method of claim 1 or 2, wherein determining the state of the application based on the state of the resource content to which the application corresponds comprises:
and if the state of the resource content corresponding to the application is a normal operation state, determining that the state of the application is an operation state.
4. The method of claim 1 or 2, wherein determining the state of the application based on the state of the resource content to which the application corresponds comprises:
and determining the state of the application based on the state of the resource content corresponding to the application and the basic information of the application.
5. The method of claim 4, wherein determining the state of the application based on the state of the resource content corresponding to the application and the basic information of the application comprises:
if the state of the resource content corresponding to the application is an abnormal operation state, and the application is determined to be installed within a first preset time length before the current time based on the installation time of the application, or the application is determined to be updated within a second preset time length before the current time based on the latest change time, the state of the application is really an un-ready state; or
And if the state of the resource content corresponding to the application is an abnormal operation state, determining that the application is not installed within a first preset time length before the current time based on the installation time of the application, and determining that the application is not updated within a second preset time length before the current time based on the latest change time, the state of the application is an operation fault state.
6. The method according to any one of claims 1, 2 and 5, wherein the method further comprises:
and if the basic information of the application is not acquired from the application management platform, determining that the state of the application is an uninstalled state.
7. The method of claim 6, wherein after determining that the state of the application is an uninstalled state, the method further comprises:
initiating an installation request carrying the application identifier to the application management platform;
if a feedback message indicating successful installation is received, updating the state of the application to be an un-ready state;
and if a feedback message indicating the installation failure is received, updating the state of the application to be the installation failure state.
8. The method of any one of claims 1, 2 and 5, wherein the method further comprises:
initiating a destruction request carrying the application identifier to the application management platform;
if the resource content corresponding to the application in the application management platform is not released completely, determining that the state of the application is a destruction state;
and if the fact that the resource content corresponding to the application in the application management platform is released is detected to be completed, determining that the state of the application is a destroyed state.
9. An application state determination apparatus comprising:
the information acquisition module is used for acquiring basic information of the application from the application management platform;
a state obtaining module, configured to obtain, from the application management platform, a state of resource content corresponding to the application based on the basic information of the application;
and the determining module is used for determining the state of the application based on the state of the resource content corresponding to the application.
10. The apparatus of claim 9, wherein the information obtaining module is configured to obtain at least one of an installation time, a latest change time, and a resource content identifier corresponding to the application from the application management platform.
11. The apparatus of claim 9 or 10, wherein the determining means is configured to:
and if the state of the resource content corresponding to the application is a normal operation state, determining that the state of the application is an operation state.
12. The apparatus of claim 9 or 10, wherein the determining means is configured to:
and determining the state of the application based on the state of the resource content corresponding to the application and the basic information of the application.
13. The apparatus of claim 12, wherein the means for determining is configured to:
if the state of the resource content corresponding to the application is an abnormal operation state, and the application is determined to be installed within a first preset time length before the current time based on the installation time of the application, or the application is determined to be updated within a second preset time length before the current time based on the latest change time, the state of the application is really an un-ready state; or
And if the state of the resource content corresponding to the application is an abnormal operation state, determining that the application is not installed within a first preset time length before the current time based on the installation time of the application, and determining that the application is not updated within a second preset time length before the current time based on the latest change time, determining that the state of the application is an operation failure state.
14. The apparatus of any of claims 9, 10, and 13, wherein the means for determining is further configured to:
and if the basic information of the application is not acquired from the application management platform, determining that the state of the application is an uninstalled state.
15. The apparatus of claim 14, wherein the apparatus further comprises:
a sending module, configured to initiate an installation request carrying the identifier of the application to the application management platform;
the determining module is further configured to:
if a feedback message indicating successful installation is received, updating the state of the application to be an un-ready state;
and if a feedback message indicating that the installation is failed is received, updating the state of the application to be an installation failure state.
16. The apparatus of claims 9, 10, and 15, wherein:
the sending module is further configured to initiate a destruction request carrying the identifier of the application to the application management platform;
the determining module is further configured to determine that the state of the application is a destruction state if it is detected that the resource content corresponding to the application in the application management platform is not released; and if the fact that the resource content corresponding to the application in the application management platform is released is detected to be completed, determining that the state of the application is a destroyed state.
17. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
18. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-8.
19. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-8.
CN202210554856.8A 2022-05-20 2022-05-20 Application state determination method and device, electronic equipment and storage medium Pending CN115080364A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210554856.8A CN115080364A (en) 2022-05-20 2022-05-20 Application state determination method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210554856.8A CN115080364A (en) 2022-05-20 2022-05-20 Application state determination method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115080364A true CN115080364A (en) 2022-09-20

Family

ID=83249929

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210554856.8A Pending CN115080364A (en) 2022-05-20 2022-05-20 Application state determination method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115080364A (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101000558A (en) * 2006-01-13 2007-07-18 英业达股份有限公司 Method of dynamic updating resource configuration state
CN108632321A (en) * 2017-03-23 2018-10-09 中国联合网络通信集团有限公司 Treating method and apparatus based on scheduling of resource under big data platform
US10614208B1 (en) * 2019-02-21 2020-04-07 Capital One Services, Llc Management of login information affected by a data breach
US20200177591A1 (en) * 2018-11-29 2020-06-04 Microsoft Technology Licensing, Llc Streamlined secure deployment of cloud services
CN111258609A (en) * 2020-01-19 2020-06-09 北京百度网讯科技有限公司 Upgrading method and device of Kubernetes cluster, electronic equipment and medium
CN112099957A (en) * 2020-11-02 2020-12-18 腾讯科技(深圳)有限公司 Resource allocation method, system, device and electronic equipment
CN112130889A (en) * 2020-09-15 2020-12-25 北京金山云网络技术有限公司 Resource management method and device, storage medium and electronic device
US20210109734A1 (en) * 2019-10-14 2021-04-15 Citrix Systems, Inc. Canary Deployment Using an Application Delivery Controller
US20210218690A1 (en) * 2020-07-20 2021-07-15 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and apparatus for allocating server resource, electronic device and storage medium
CN113360172A (en) * 2021-06-30 2021-09-07 平安普惠企业管理有限公司 Application deployment method and device, computer equipment and storage medium
CN113689693A (en) * 2021-07-21 2021-11-23 阿波罗智联(北京)科技有限公司 Method and device for processing abnormity of road side equipment and intelligent high-speed monitoring platform
CN113760306A (en) * 2020-10-26 2021-12-07 北京京东乾石科技有限公司 Method and device for installing software, electronic equipment and storage medium
CN114064208A (en) * 2021-11-10 2022-02-18 北京百度网讯科技有限公司 Method and device for detecting application service state, electronic equipment and storage medium
CN114461304A (en) * 2022-02-10 2022-05-10 浙江大华技术股份有限公司 Configuration file determining method and device, storage medium and electronic equipment
CN117608825A (en) * 2023-11-14 2024-02-27 华润数字科技有限公司 Resource management method based on multi-cloud management platform and related equipment

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101000558A (en) * 2006-01-13 2007-07-18 英业达股份有限公司 Method of dynamic updating resource configuration state
CN108632321A (en) * 2017-03-23 2018-10-09 中国联合网络通信集团有限公司 Treating method and apparatus based on scheduling of resource under big data platform
US20200177591A1 (en) * 2018-11-29 2020-06-04 Microsoft Technology Licensing, Llc Streamlined secure deployment of cloud services
US10614208B1 (en) * 2019-02-21 2020-04-07 Capital One Services, Llc Management of login information affected by a data breach
US20210109734A1 (en) * 2019-10-14 2021-04-15 Citrix Systems, Inc. Canary Deployment Using an Application Delivery Controller
CN111258609A (en) * 2020-01-19 2020-06-09 北京百度网讯科技有限公司 Upgrading method and device of Kubernetes cluster, electronic equipment and medium
US20210218690A1 (en) * 2020-07-20 2021-07-15 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and apparatus for allocating server resource, electronic device and storage medium
CN112130889A (en) * 2020-09-15 2020-12-25 北京金山云网络技术有限公司 Resource management method and device, storage medium and electronic device
CN113760306A (en) * 2020-10-26 2021-12-07 北京京东乾石科技有限公司 Method and device for installing software, electronic equipment and storage medium
CN112099957A (en) * 2020-11-02 2020-12-18 腾讯科技(深圳)有限公司 Resource allocation method, system, device and electronic equipment
CN113360172A (en) * 2021-06-30 2021-09-07 平安普惠企业管理有限公司 Application deployment method and device, computer equipment and storage medium
CN113689693A (en) * 2021-07-21 2021-11-23 阿波罗智联(北京)科技有限公司 Method and device for processing abnormity of road side equipment and intelligent high-speed monitoring platform
CN114064208A (en) * 2021-11-10 2022-02-18 北京百度网讯科技有限公司 Method and device for detecting application service state, electronic equipment and storage medium
CN114461304A (en) * 2022-02-10 2022-05-10 浙江大华技术股份有限公司 Configuration file determining method and device, storage medium and electronic equipment
CN117608825A (en) * 2023-11-14 2024-02-27 华润数字科技有限公司 Resource management method based on multi-cloud management platform and related equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
吴金龙;: "云计算异构资源整合的分析与应用", 电力与能源, no. 06, 20 December 2012 (2012-12-20) *

Similar Documents

Publication Publication Date Title
WO2023109138A1 (en) Method and apparatus for starting android application in linux system, and electronic device
CN111694857B (en) Method, device, electronic equipment and computer readable medium for storing resource data
CN115640110B (en) Distributed cloud computing system scheduling method and device
CN113220420A (en) Service monitoring method, device, equipment, storage medium and computer program product
CN112860343B (en) Configuration changing method, system, device, electronic equipment and storage medium
CN113961311A (en) Service data processing method, device, electronic equipment and medium
CN111782341B (en) Method and device for managing clusters
CN114077367A (en) Method and device for realizing shortcut of android application in Linux system
CN110659104B (en) Service monitoring method and related equipment
CN109828830B (en) Method and apparatus for managing containers
CN114185734A (en) Cluster monitoring method and device and electronic equipment
CN114035863A (en) Method, device and equipment for operating android application in Linux system
US9317354B2 (en) Dynamically determining an external systems management application to report system errors
CN111666203B (en) Positioning processing method and device of risk software, electronic equipment and storage medium
CN112965799A (en) Task state prompting method and device, electronic equipment and medium
CN112817992A (en) Method, device, electronic equipment and readable storage medium for executing change task
CN116450176A (en) Version updating method and device, electronic equipment and storage medium
CN115080364A (en) Application state determination method and device, electronic equipment and storage medium
EP3832985B1 (en) Method and apparatus for processing local hot spot, electronic device and storage medium
CN115102948A (en) Automatic downloading method, device and equipment of map tiles and storage medium
CN114416276A (en) Scheduling method and device of equipment management service, electronic equipment and storage medium
CN113656239A (en) Monitoring method and device for middleware and computer program product
CN113419921A (en) Task monitoring method, device, equipment and storage medium
CN112579247A (en) Method and device for determining task state
US11953995B1 (en) Centralized data backup platform supporting multiple data environments

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