Operation control method and device based on state information, equipment and storage medium
By obtaining real-time status information of the cloud platform environment and establishing a mapping relationship between status information and execution actions, the problems of operational complexity and low security in the cloud platform are solved, the accuracy and safety of operations are achieved, and errors caused by misoperation are prevented. Environmental damage.
Patent Information
- Application Number
- CN202410829848.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-06-25
AI Technical Summary
In the cloud platform, existing deployment tools lack an effective status acquisition mechanism, resulting in complex operations, low security, and error-prone. They cannot accurately distinguish the actions of different operations, affecting the operation and maintenance efficiency and security of the cloud platform.
By obtaining real-time status information of the cloud platform environment, including databases, deployment logs, and cloud platform environments, we establish a mapping relationship between status information and execution actions, generate a mapping relationship table, and determine the usable operation buttons to ensure the accuracy and safety of operations. sex.
It improves the security and accuracy of cloud platform operations, prevents illegal operations from causing damage to the environment, and ensures the stability and security of the cloud platform.
Smart Images

Figure CN118714029A
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud platform technology, and in particular to an operation control method, device, equipment and storage medium based on status information. Background Art
[0002] At present, the command line deployment method performed by operation and maintenance does not have the problem of state conversion. Only after the deployment is made into a unified tool, various states will be used to control the deployment process. Among the current deployment tools, the simpler ones do not have the problem of designing a state mechanism. You only need to wait for the end after deployment. However, in the cloud platform, since there are many operations involved, a complete cloud platform ecological environment includes not only deployment but also operation and maintenance, such as environment upgrades and updates. For the combination of deployment and operation and maintenance, since each operation corresponds to a different deployment method, the actions used are also different. How to enable the deployment tool to better distinguish actions and make the operation simple, easy to use and not prone to errors is an urgent problem to be solved. Summary of the invention
[0003] Based on this, it is necessary to provide an operation control method, device, equipment and storage medium based on state information that can improve operation safety and accuracy in response to the above technical problems.
[0004] In one aspect, a method for controlling an operation based on state information is provided, the method comprising:
[0005] Based on the cloud platform environment deployment process, real-time status information is obtained, where the status information is obtained through at least: a database, a deployment log, and a cloud platform environment, and the real-time status information is used to describe the current operating status of the cloud platform environment;
[0006] Based on the real-time status information and the mapping relationship between the status information and the execution action, determining an available operation button corresponding to the real-time status information;
[0007] Based on the execution action generated when the usable operation button is operated, the user's operation instruction is responded to.
[0008] Optionally, based on the cloud platform environment deployment process, obtain real-time status information including:
[0009] In response to detecting that an operation button is used, writing state information corresponding to an action generated based on the operation button into the database, and acquiring and defining the state information as the real-time state information;
[0010] In response to detecting that the cloud platform environment executes a deployment task, using a log scanner to read a deployment log file;
[0011] In response to detecting that the log scanner has not read the deployment log file or has read an end mark, reading status information from the cloud platform environment, and defining the read status information as the real-time status information;
[0012] In response to detecting that the log scanner reads the deployment log file, sending the deployment log file to a log analyzer, and determining the real-time status information based on an analysis result of the log analyzer;
[0013] In response to detecting that the cloud platform environment has completed the deployment task, a log scanner is used to read all log files in the deployment process at one time, all the log files are sent to a log analyzer, and the real-time status information is determined based on the analysis result of the log analyzer.
[0014] Optionally, the method further includes:
[0015] In response to detecting that the cloud platform visualization deployment tool is restarted and the inactivity time is greater than a preset threshold, sending a status information calibration instruction;
[0016] or in response to detecting that the state information corresponding to the execution action when the operation button is used does not match the standard state information, sending a state information calibration instruction;
[0017] In response to receiving the status information calibration instruction, status information is read from the cloud platform environment, and the read status information is defined as the real-time status information.
[0018] Optionally, the method for generating the mapping relationship includes:
[0019] Get the execution action generated by the target operation button when it is operated;
[0020] Determining state information corresponding to the execution action based on a cloud environment state generated by executing the execution action;
[0021] Based on the execution action and its corresponding state information, a one-to-one mapping relationship is formed;
[0022] Based on the multiple mapping relationships, a mapping relationship table is generated.
[0023] Optionally, based on the real-time status information and a mapping relationship between the status information and the execution action, determining an available operation button corresponding to the real-time status information includes:
[0024] Acquire the real-time status information and the mapping relationship table;
[0025] Determine the execution action corresponding to the real-time status information based on the matching in the mapping relationship table;
[0026] The operation button corresponding to the execution action is defined as an available operation button corresponding to the real-time status information.
[0027] Optionally, after the execution action generated when the usable operation button is operated, the method further includes:
[0028] Detecting whether the execution action is consistent with the current state information;
[0029] In response to detecting that the execution action does not match the current state information, stopping execution of the execution action;
[0030] In response to detecting that the execution action is consistent with the current state information, the execution action is executed.
[0031] Optionally, the method further includes:
[0032] The real-time status information and the available operation buttons corresponding to the real-time status information are sent to the user-side display page to control the available operation buttons to respond to the user's operation instructions.
[0033] On the other hand, there is provided an operation control device based on state information, the device comprising:
[0034] An information acquisition module, used to acquire real-time status information based on the cloud platform environment deployment process, wherein the acquisition path of the status information includes at least: a database, a deployment log, and a cloud platform environment, and the real-time status information is used to describe the current operating status of the cloud platform environment;
[0035] An available operation button determination module is used to determine an available operation button corresponding to the real-time state information based on the real-time state information and a mapping relationship between the state information and the execution action;
[0036] The response module is used to respond to the user's operation instruction based on the execution action generated when the usable operation button is operated.
[0037] In another aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:
[0038] Based on the cloud platform environment deployment process, real-time status information is obtained, where the status information is obtained through at least: a database, a deployment log, and a cloud platform environment, and the real-time status information is used to describe the current operating status of the cloud platform environment;
[0039] Based on the real-time status information and the mapping relationship between the status information and the execution action, determining an available operation button corresponding to the real-time status information;
[0040] Based on the execution action generated when the usable operation button is operated, the user's operation instruction is responded to.
[0041] In another aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0042] Based on the cloud platform environment deployment process, real-time status information is obtained, where the status information is obtained through at least: a database, a deployment log, and a cloud platform environment, and the real-time status information is used to describe the current operating status of the cloud platform environment;
[0043] Based on the real-time status information and the mapping relationship between the status information and the execution action, determining an available operation button corresponding to the real-time status information;
[0044] Based on the execution action generated when the usable operation button is operated, the user's operation instruction is responded to.
[0045] The above-mentioned operation control method, device, equipment and storage medium based on status information, the method includes: based on the cloud platform environment deployment process, obtaining real-time status information, the way to obtain the status information at least includes: database, deployment log and cloud platform environment, the real-time status information is used to describe the current operating status of the cloud platform environment; based on the real-time status information, and the mapping relationship between the status information and the execution action, determining the usable operation button corresponding to the real-time status information; based on the execution action generated when operating the usable operation button, responding to the user's operation instruction, the present application can obtain the accurate status of the deployment environment through different status acquisition methods, and at the same time, by controlling the operation through the status, the security of the operation of the cloud platform visualization deployment tool can be greatly improved, ensuring the safety and effectiveness of any operation, and preventing internal or external illegal operations from causing damage to the cloud platform environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 is an application environment diagram of an operation control method based on state information in one embodiment;
[0047] Figure 2 is a flow chart of an operation control method based on state information in one embodiment;
[0048] Figure 3 It is a schematic diagram of actions corresponding to the deployment operation of the operation control method based on state information in one embodiment;
[0049] Figure 4 A schematic diagram of state transition of an operation control method based on state information in one embodiment;
[0050] Figure 5 A schematic diagram of a log analysis process of an operation control method based on state information in one embodiment;
[0051] Figure 6 is a structural block diagram of an operation control device based on state information in one embodiment;
[0052] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0054] It should be understood that in the description of the present application, unless the context clearly requires otherwise, words such as "include", "comprises", and the like throughout the specification should be interpreted as inclusive rather than exclusive or exhaustive; that is, the meaning of "including but not limited to".
[0055] It should also be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, "plurality" means two or more.
[0056] It should be noted that the terms "S1", "S2", etc. are only used for the purpose of describing the steps, and do not specifically refer to the order or sequence, nor are they used to limit the present application. They are only for the convenience of describing the method of the present application, and cannot be understood as indicating the order of the steps. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present application.
[0057] The cloud platform deployment function is the basic function of the cloud platform. No matter which cloud wants to run, its deployment capability is the most basic function. The deployment capability directly reflects the application capability of the cloud. A good deployment capability can greatly improve the operation and maintenance efficiency. Among the various existing cloud services, most deployments rely on operation and maintenance, and the deployment method is the traditional command line deployment method. The traditional deployment method is to provide a bunch of deployment packages, and then use the command line method to execute each deployment package in sequence according to the deployment document. Finally, the operation and maintenance will unify and integrate them into a cloud platform. In the current public cloud and private cloud, deployment is almost always carried out in this way.
[0058] According to the background technology, the command line deployment method performed by operation and maintenance does not have the problem of state conversion. Only after the deployment is made into a unified tool, various states will be used to control the deployment process. Among the current deployment tools, the simpler ones do not have the problem of designing a state mechanism. You only need to wait for the end after deployment. In the cloud platform, there are many operations involved. A complete cloud platform ecological environment not only includes deployment, but also operation and maintenance, such as environment upgrades and updates. Combining deployment and operation and maintenance, designing a state acquisition mechanism that can meet all environmental operation processes can better operate the cloud platform environment.
[0059] The existing status acquisition mechanism generally sets a status flag in the database, and then sets the availability of the operation button according to different status return values. This method is more suitable for ordinary application creation scenarios. However, for extremely complex scenarios such as cloud platform deployment, it is obviously impossible to control the button only by relying on a status field in the database. Cloud platform deployment is a process and extremely time-consuming operation, and cloud platform deployment has very high security requirements. Since each operation has a different corresponding deployment method, the actions used are also different. How can the visual deployment tool better distinguish actions and make the operation simple, easy to use and not prone to errors? Among the various public cloud and private cloud deployment tools currently available, there is no solution that can solve the problem of operation control based on environmental status in deployment tools.
[0060] To solve the above technical problems, in the cloud platform deployment, this application designs a visual deployment tool. The deployment tool can not only provide deployment functions, but also provide operation and maintenance functions, such as scaling up and down, upgrading, etc. Based on this, a good state acquisition mechanism is designed to describe the various states in the cloud platform deployment. The actions are controlled by the acquired states, so that the user can only operate the actions of the current state and cannot operate other actions. This can ensure the accuracy of the operation and avoid the impact of misoperation during deployment. For example, the most intuitive impact of deployment operations in the wrong state is the destruction of all environmental data, including user data, etc., and it is easy to cause abnormal cloud platform environment, resulting in cloud platform unavailability and other problems.
[0061] The operation control method based on state information provided in this application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the data processing platform set on the server 104 through the network, wherein the terminal 102 can be but not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
[0062] In one embodiment, Figure 2 As shown, a method for operating control based on state information is provided, and the method is applied to Figure 1 The terminal in is used as an example to illustrate, including the following steps:
[0063] S1: Based on the cloud platform environment deployment process, real-time status information is obtained, where the status information is obtained in at least a database, a deployment log, and a cloud platform environment. The real-time status information is used to describe the current operating status of the cloud platform environment.
[0064] It should be noted that the cloud platform environment deployment process can include pre-deployment, deployment and post-deployment. Post-deployment includes two situations: after successful deployment and after failed deployment. The cloud platform environment deployment process is controlled through CloudWare (cloud platform visual deployment tool). In the visual deployment tool, there are many operation behaviors for a cloud platform environment, such as Figure 3 As shown in the figure, we can see that all actions of a deployment process operation, such as starting to create and modify the environment before deployment, have their status information directly from the stored database. During deployment and the judgment of success or failure, their status comes from the deployment log. The status after deployment, including whether the cloud platform environment is available, has its status information from the underlying resources of the environment. Real-time status information is as follows: Figure 4 As shown, it can include undeployed, deploying, deployment failed, destroying, and sub-states corresponding to the deploying state (such as module deployment, expansion and reduction), and can also include executing deployment tasks and deployment tasks have been completed, etc.
[0065] In some specific implementations, based on the cloud platform environment deployment process, obtaining real-time status information includes:
[0066] In response to detecting that an operation button is used, writing state information corresponding to an action generated based on the operation button into the database, and acquiring and defining the state information as the real-time state information;
[0067] In response to detecting that the cloud platform environment executes a deployment task, using a log scanner to read a deployment log file;
[0068] In response to detecting that the log scanner has not read the deployment log file or has read an end mark, reading status information from the cloud platform environment, and defining the read status information as the real-time status information;
[0069] In response to detecting that the log scanner reads the deployment log file, sending the deployment log file to a log analyzer, and determining the real-time status information based on an analysis result of the log analyzer;
[0070] In response to detecting that the cloud platform environment has completed the deployment task, a log scanner is used to read all log files in the deployment process at one time, all the log files are sent to a log analyzer, and the real-time status information is determined based on the analysis result of the log analyzer.
[0071] In some embodiments, the method further comprises:
[0072] In response to detecting that the cloud platform visual deployment tool is restarted and the inactivity time is greater than a preset threshold, sending a status information calibration instruction, wherein the preset threshold can be set according to actual needs, such as 2 minutes;
[0073] or in response to detecting that the state information corresponding to the execution action when the operation button is used does not match the standard state information, sending a state information calibration instruction, wherein the standard state information refers to the state information of the operation button corresponding to the execution action;
[0074] In response to receiving the status information calibration instruction, status information is read from the cloud platform environment, and the read status information is defined as the real-time status information.
[0075] Specifically, from the perspective of CloudWare (cloud platform visual deployment tool), the operation of the cloud platform environment is directly issued from the interface, triggering the state change. However, the state is obtained during the deployment process. The deployment process is very long, which requires continuous acquisition of the current state from the deployment process. The deployment process provides logs, which requires state analysis based on the logs. Among them, deployment is multi-threaded, and CloudWare allows multiple deployment tasks to be started at the same time, which will generate multiple deployment threads. It is necessary to distinguish the corresponding states from these threads, otherwise there will be confusion. In addition, state calibration is very important in many occasions. Generally, after the deployment is completed, CloudWare will be stopped to prevent erroneous operations caused by opening the page by mistake (it is okay not to stop, as long as the operation is normal). When the deployment function needs to be used, CloudWare will be restarted. At this time, it is necessary to calibrate the real state of the cloud platform environment managed by CloudWare. Generally speaking, the state read directly from the storage database is inaccurate, because the cloud platform environment will undergo various changes during use, and CloudWare needs to be able to check the real state of the environment.
[0076] Furthermore, the purpose of status acquisition is to protect the security of CloudWare operations, which enables different CloudWare operations to correspond to different states. The status can be obtained through three channels. The first is the CloudWare database. The status of the database is used to intuitively display the status of the cloud platform environment. Generally speaking, its data should be synchronized with the real environment. The status of the database is only used for recording and is responsible for interacting with the client. The second is to obtain the current status from the deployment log. Deployment is a long process. During its deployment process, the deployment process log will be printed and recorded in the file. The status and deployment progress can be confirmed based on the log analysis. Generally speaking, it is more accurate to use logs to judge various intermediate states (such as the status of executing deployment tasks) and deployment failure states. The third is to confirm the current status from the cloud platform environment. After the deployment is completed, the cloud platform environment enters the running state. At this time, based on the deployment log, it can only be judged that the cloud platform environment is successfully deployed, but the real cloud platform environment status is difficult to grasp. If the cloud platform environment operates normally, it is generally judged that the cloud platform environment is successfully deployed and is in a running state. At this time, it is necessary to judge whether the cloud platform environment is available based on the running status of the resources.
[0077] Furthermore, the real-time acquisition method of status information is divided into two parts: operation acquisition and operation acquisition, wherein operation acquisition refers to updating the current status according to the operation, that is, when the above-mentioned user terminal operates or uses the relevant operation button, the corresponding status information will be generated, and the generated status information will be used as the real-time status information. The status acquired by the operation is directly written into the stored database, and the real-time status of the client is updated through the database. For example, Figure 4 As shown, the status obtained by operation includes: 1. Post-creation status. After the cloud platform environment is created, the real-time status information changes to undeployed; 2. Post-deployment status. After clicking the Start Deployment operation button, the real-time status information immediately changes to Deploying; 3. Post-termination status. Only the environment being deployed can be operated. After clicking the operation button, the real-time status information immediately changes to Deployment Failure; 4. Module deployment, expansion, and reduction operations change the real-time status information to Deploying and sub-statuses. The sub-statuses will only appear when these three operation buttons are clicked; 5. Destruction operation. The real-time status information changes to Destroying; 6. All modification and deletion operations do not change the current status. The above operations directly change the real-time status information of the cloud platform environment in CloudWare. It relies on the stored database to obtain a real-time updated status information; Operation acquisition refers to the status obtained during the deployment or update of the cloud platform environment. The acquisition method includes two parts: one is to obtain from the deployment log, and the other is to obtain from the cloud platform environment. Among them, obtaining from the deployment log requires the use of log scanners and log analyzers, such as Figure 5As shown, the log scanner first reads the deployment log file. If the deployment log file does not exist, it is necessary to obtain real-time status information from the cloud platform environment. If it is a cloud platform environment that is not being deployed (i.e., a cloud platform that has been deployed), the log scanner reads all deployment log files at once, and then scans the information points in the log (such as scanning time, progress, start and end marks), and sends them to the log analyzer. The log analyzer determines whether the current cloud platform environment deployment is successful or failed based on the content, and gives the real-time status information and root causes of the analyzed cloud platform environment. Among them, the analysis process of the log analyzer is a common means and will not be repeated here. If it is an environment that is being deployed (i.e., the cloud platform environment performs deployment tasks), the log scanner continues to track the deployment log, scans the time, progress, error messages, end marks, etc. in the deployment log information flow, and the log scanner distributes the scanned content to the log analyzer, which determines whether the deployment of the current environment is completed, the completed status information and the error cause of the deployment failure, and outputs the deployment progress to the client in real time. Among them, the log scanner continues to run and triggers the log analyzer to work when the deployment log changes. When the deployment log stops outputting or The scanning is stopped only when the client is terminated. Based on this, the real-time acquisition of status information can be guaranteed, and status data can be provided continuously. When the log scanner cannot obtain the deployment log, or when the deployment log reads the end mark, or when CloudWare is restarted, or when the status information corresponding to the execution action when the operation button is used does not match the standard status information, it is necessary to query the real status from the cloud platform environment. After CloudWare has been stationary for a period of time, as the cloud platform environment runs, the cloud platform environment status may change, such as the cloud platform environment is destroyed by external forces, or the cloud platform environment is abnormal, etc. At this time, since the CloudWare client is still displayed based on the database status, it may not be consistent with the real status. At this time, it is necessary to query the real status on the cloud platform environment once, and obtain the real status of the cloud platform environment through k8sClient, that is, query the actual resource status of the cloud platform, and combine and analyze. If the resource status is normal, the cloud platform environment is considered normal. If the resource status is abnormal and the cloud platform environment is unavailable, the cloud platform environment deployment is abnormal. If the cloud platform environment does not exist, the cloud platform environment is returned. The environment has been destroyed.
[0078] In addition, the real-time status of the cloud platform environment is updated on demand: CloudWare cannot always detect the real status of the underlying environment to prevent meaningless traffic from affecting the real cloud platform environment. It can only update the real-time status of the cloud platform environment according to demand. When the status information required for the operation does not match the actual status, a full cloud platform environment status information update is triggered. When CloudWare is restarted, a full status information update is triggered. When refreshing an environment status information separately, only the status information of the current environment is updated to match the operation.
[0079] In the above implementation, based on the actual scenario in which CloudWare is located, whether it is in operation or restarted, the real state of the cloud platform environment can be accurately and effectively obtained, thereby reversely controlling the operation to ensure the accuracy and security of the operation.
[0080] S2: Based on the real-time status information and the mapping relationship between the status information and the execution action, determine the available operation button corresponding to the real-time status information.
[0081] It should be noted that the execution action refers to the action generated when the corresponding operation button is clicked.
[0082] In some specific implementations, the method for generating the mapping relationship includes:
[0083] Get the execution action generated by the target operation button when it is operated;
[0084] Determining state information corresponding to the execution action based on a cloud environment state generated by executing the execution action;
[0085] Based on the execution action and its corresponding state information, a one-to-one mapping relationship is formed;
[0086] Based on the multiple mapping relationships, a mapping relationship table is generated.
[0087] In some specific implementations, based on the real-time status information and the mapping relationship between the status information and the execution action, determining the available operation button corresponding to the real-time status information includes:
[0088] Acquire the real-time status information and the mapping relationship table;
[0089] Determine the execution action corresponding to the real-time status information based on the matching in the mapping relationship table;
[0090] The operation button corresponding to the execution action is defined as an available operation button corresponding to the real-time status information.
[0091] Specifically, for cloud platform environment deployment, each operation can be regarded as a high-risk operation. For example, deployment and module deployment will cause pod-level restarts, scaling will cause data-level changes, and deletion and destruction will directly destroy all user data. User operations are mainly initiated from the client. Therefore, the state information and the operation of generating execution actions must be deeply bound at the business layer. Which buttons can be operated in a state must be strictly controlled to prevent unauthorized access. It cannot simply control the state on the button, so that the user can change the button's permissions by some means so that the operation can be issued. Instead, it is necessary to establish an execution action and state information association table (i.e., the mapping relationship table mentioned above) through CloudWare, and establish a separate module in its database to store the association table, that is, one operation can correspond to multiple state information, and one state information can also have multiple operations. This many-to-many relationship is stored in the database in a one-to-one form to cope with the addition of state information or operation buttons, and to facilitate the expansion of the mapping relationship table. By maintaining the association relationship table, it is convenient to control the user's operation buttons, and it is also used by the interface layer to ensure that the operation interface will not be issued with the wrong state information.
[0092] In the above implementation, by establishing the relationship between the operation and status information changes of the cloud platform deployment environment, and concretizing the relationship into data expression, it is provided to the client and interface layer for use to prevent user misoperation and ensure the accuracy of user operation.
[0093] S3: Responding to the user's operation instruction based on the execution action generated when the usable operation button is operated.
[0094] It should be noted that the user's operation instruction may refer to the user manually clicking an operation button, or may refer to the user clicking an operation button through some interactive means such as voice interaction.
[0095] In some specific implementations, after the execution action generated when the usable operation button is operated, the method further includes:
[0096] Detecting whether the execution action is consistent with the current state information;
[0097] In response to detecting that the execution action does not match the current state information, stopping execution of the execution action;
[0098] In response to detecting that the execution action is consistent with the current state information, the execution action is executed.
[0099] Specifically, after the operation is issued, the feasibility of the operation must be judged based on the real-time status information, that is, whether the execution action generated by the issued operation belongs to the operation that the current status information should have. If not, the operation is judged to be infeasible, and the execution of the execution action is stopped, otherwise the execution of the execution action is started.
[0100] In some specific implementations, in response to detecting that the user operation instruction is issued non-manually, such as issuing the operation instruction through voice interaction to control the click of the operation button;
[0101] Processing the user's voice to obtain key information, wherein the key information may include an operation button or a keyword for a desired action;
[0102] Compare the key information with all the operation buttons under the current state information and the text information of the corresponding execution actions, wherein in this comparison, the key information and the text information may be in a shuffled state, such as the key information may be deployment, start, etc., and the text information may be destruction, abort, etc.;
[0103] In response to detecting that the similarity between the key information and the text information is greater than a first preset threshold, it indicates that the operation issued by the user may be executed in the current state, and then the full amount of key information is compared with the full amount of text information, and both the full amount of key information and the full amount of text information can be to terminate deployment, start deployment, etc., wherein the first preset threshold can be set according to actual needs, such as 50%, 60%, etc.;
[0104] In response to detecting that the similarity between the full amount of key information and the full amount of text information is greater than a second preset threshold, a corresponding operation button is controlled to be clicked, wherein the second preset value can be set according to actual needs, such as 75%, 100%, etc. For example, when it is 75%, it can be that any three words in the initial deployment are successfully compared, and when it is 100%, it can be that all four words in the initial deployment are successfully compared;
[0105] In response to detecting that the similarity between the full amount of key information and the full amount of text information is less than or equal to the second preset threshold, it indicates that the user needs to further determine whether the operation instruction issued by the user can be executed according to the status information displayed on the display page;
[0106] In response to detecting that the similarity between the key information and the text information is less than or equal to the first preset threshold, it means that the operation instruction issued by the user cannot be executed in the current state, and no click operation is performed.
[0107] In the above implementation, the user can control the use of the operation scenario through voice commands, compare the relevant information before issuing the operation, and issue the operation task after the comparison is successful, so as to improve the efficiency of operation judgment and improve the accuracy of operation, and avoid environmental damage caused by misoperation.
[0108] In some embodiments, the method further comprises:
[0109] The real-time status information and the available operation buttons corresponding to the real-time status information are sent to the user-side display page to control the available operation buttons to respond to the user's operation instructions.
[0110] Specifically, the status information of the user-side display page is updated, which mainly refers to the status update after the real-time status information is obtained, such as Figure 4 As shown, the status information update depends on the real-time acquisition of status information. The status information update is mainly used for client display, so that users can view the latest status information in time. Editing and deleting operations will not generate status information updates. For creation, deployment, abort deployment, and destruction operations, their status information updates are implemented on the client side. For the updates of status information such as being deployed and being destroyed, they are implemented by the backend. All status information is cached in the database and finally presented by the client for user use.
[0111] In the above implementation, by displaying real-time status information and controlling the operation buttons corresponding to the real-time status information, the corresponding operation buttons can be accurately controlled based on the changes in the cloud platform environment deployment status information, thereby effectively improving the accuracy of the operation and avoiding damage to the cloud platform environment caused by misoperation.
[0112] In the above-mentioned operation control method based on status information, the method includes: based on the cloud platform environment deployment process, obtaining real-time status information, the acquisition path of the status information at least includes: database, deployment log and cloud platform environment, the real-time status information is used to describe the current operation status of the cloud platform environment; based on the real-time status information and the mapping relationship between the status information and the execution action, determining the usable operation button corresponding to the real-time status information; based on the execution action generated when the usable operation button is operated, responding to the user's operation instruction, the application greatly improves the security of CloudWare operation, ensures the safety and effectiveness of any operation, and prevents damage to the environment caused by internal or external illegal operations. Whether it is operated on the client or through the interface, the application ensures the real-time and effectiveness of the status information, can accurately control the display of the status information, and control the operation through the status information to ensure the safety of the operation, and through different status information acquisition methods, the accurate status of the cloud platform deployment environment can be obtained, whether it is various deployment operations of the cloud platform environment in CloudWare, or using CloudWare to take over the environment again, it can respond accurately and ensure that no destructive operations are caused to the environment.
[0113] It should be understood that although Figure 2-Figure 5 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-Figure 5 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0114] In one embodiment, Figure 6 As shown, an operation control device based on state information is provided, comprising: an information acquisition module, an operation button determination module and a response module, wherein:
[0115] An information acquisition module, used to acquire real-time status information based on the cloud platform environment deployment process, wherein the acquisition path of the status information includes at least: a database, a deployment log, and a cloud platform environment, and the real-time status information is used to describe the current operating status of the cloud platform environment;
[0116] An available operation button determination module is used to determine an available operation button corresponding to the real-time state information based on the real-time state information and a mapping relationship between the state information and the execution action;
[0117] The response module is used to respond to the user's operation instruction based on the execution action generated when the usable operation button is operated.
[0118] As a preferred implementation, in the embodiment of the present invention, the information acquisition module is specifically used for:
[0119] In response to detecting that an operation button is used, writing state information corresponding to an action generated based on the operation button into the database, and acquiring and defining the state information as the real-time state information;
[0120] In response to detecting that the cloud platform environment executes a deployment task, using a log scanner to read a deployment log file;
[0121] In response to detecting that the log scanner has not read the deployment log file or has read an end mark, reading status information from the cloud platform environment, and defining the read status information as the real-time status information;
[0122] In response to detecting that the log scanner reads the deployment log file, sending the deployment log file to a log analyzer, and determining the real-time status information based on an analysis result of the log analyzer;
[0123] In response to detecting that the cloud platform environment has completed the deployment task, a log scanner is used to read all log files in the deployment process at one time, all the log files are sent to a log analyzer, and the real-time status information is determined based on the analysis result of the log analyzer.
[0124] As a preferred implementation, in the embodiment of the present invention, the information acquisition module is further used to:
[0125] In response to detecting that the cloud platform visualization deployment tool is restarted and the inactivity time is greater than a preset threshold, sending a status information calibration instruction;
[0126] or in response to detecting that the state information corresponding to the execution action when the operation button is used does not match the standard state information, sending a state information calibration instruction;
[0127] In response to receiving the status information calibration instruction, status information is read from the cloud platform environment, and the read status information is defined as the real-time status information.
[0128] As a preferred implementation, in the embodiment of the present invention, the usable operation button determination module is specifically used for:
[0129] Get the execution action generated by the target operation button when it is operated;
[0130] Determining state information corresponding to the execution action based on a cloud environment state generated by executing the execution action;
[0131] Based on the execution action and its corresponding state information, a one-to-one mapping relationship is formed;
[0132] Based on the multiple mapping relationships, a mapping relationship table is generated.
[0133] As a preferred implementation, in the embodiment of the present invention, the usable operation button determination module is further used to:
[0134] Acquire the real-time status information and the mapping relationship table;
[0135] Determine the execution action corresponding to the real-time status information based on the matching in the mapping relationship table;
[0136] The operation button corresponding to the execution action is defined as an available operation button corresponding to the real-time status information.
[0137] As a preferred implementation, in the embodiment of the present invention, the response module is specifically used for:
[0138] Detecting whether the execution action is consistent with the current state information;
[0139] In response to detecting that the execution action does not match the current state information, stopping execution of the execution action;
[0140] In response to detecting that the execution action is consistent with the current state information, the execution action is executed.
[0141] As a preferred implementation, in the embodiment of the present invention, the device further includes a display module, and the display module is specifically used for:
[0142] The real-time status information and the available operation buttons corresponding to the real-time status information are sent to the user-side display page to control the available operation buttons to respond to the user's operation instructions.
[0143] For the specific definition of the operation control device based on state information, please refer to the definition of the operation control method based on state information above, which will not be repeated here. Each module in the above-mentioned operation control device based on state information can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0144] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an operation control method based on state information is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0145] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0146] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0147] S1: Based on the cloud platform environment deployment process, real-time status information is obtained, where the status information is obtained through at least: a database, a deployment log, and a cloud platform environment, and the real-time status information is used to describe the current operating status of the cloud platform environment;
[0148] S2: Based on the real-time status information and the mapping relationship between the status information and the execution action, determining an available operation button corresponding to the real-time status information;
[0149] S3: Responding to the user's operation instruction based on the execution action generated when the usable operation button is operated.
[0150] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0151] In response to detecting that an operation button is used, writing state information corresponding to an action generated based on the operation button into the database, and acquiring and defining the state information as the real-time state information;
[0152] In response to detecting that the cloud platform environment executes a deployment task, using a log scanner to read a deployment log file;
[0153] In response to detecting that the log scanner has not read the deployment log file or has read an end mark, reading status information from the cloud platform environment, and defining the read status information as the real-time status information;
[0154] In response to detecting that the log scanner reads the deployment log file, sending the deployment log file to a log analyzer, and determining the real-time status information based on an analysis result of the log analyzer;
[0155] In response to detecting that the cloud platform environment has completed the deployment task, a log scanner is used to read all log files in the deployment process at one time, all the log files are sent to a log analyzer, and the real-time status information is determined based on the analysis result of the log analyzer.
[0156] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0157] In response to detecting that the cloud platform visualization deployment tool is restarted and the inactivity time is greater than a preset threshold, sending a status information calibration instruction;
[0158] or in response to detecting that the state information corresponding to the execution action when the operation button is used does not match the standard state information, sending a state information calibration instruction;
[0159] In response to receiving the status information calibration instruction, status information is read from the cloud platform environment, and the read status information is defined as the real-time status information.
[0160] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0161] Get the execution action generated by the target operation button when it is operated;
[0162] Determining state information corresponding to the execution action based on a cloud environment state generated by executing the execution action;
[0163] Based on the execution action and its corresponding state information, a one-to-one mapping relationship is formed;
[0164] Based on the multiple mapping relationships, a mapping relationship table is generated.
[0165] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0166] Acquire the real-time status information and the mapping relationship table;
[0167] Determine the execution action corresponding to the real-time status information based on the matching in the mapping relationship table;
[0168] The operation button corresponding to the execution action is defined as an available operation button corresponding to the real-time status information.
[0169] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0170] Detecting whether the execution action is consistent with the current state information;
[0171] In response to detecting that the execution action does not match the current state information, stopping execution of the execution action;
[0172] In response to detecting that the execution action is consistent with the current state information, the execution action is executed.
[0173] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0174] The real-time status information and the available operation buttons corresponding to the real-time status information are sent to the user-side display page to control the available operation buttons to respond to the user's operation instructions.
[0175] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0176] S1: Based on the cloud platform environment deployment process, real-time status information is obtained, where the status information is obtained through at least: a database, a deployment log, and a cloud platform environment, and the real-time status information is used to describe the current operating status of the cloud platform environment;
[0177] S2: Based on the real-time status information and the mapping relationship between the status information and the execution action, determining an available operation button corresponding to the real-time status information;
[0178] S3: Responding to the user's operation instruction based on the execution action generated when the usable operation button is operated.
[0179] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0180] In response to detecting that an operation button is used, writing state information corresponding to an action generated based on the operation button into the database, and acquiring and defining the state information as the real-time state information;
[0181] In response to detecting that the cloud platform environment executes a deployment task, using a log scanner to read a deployment log file;
[0182] In response to detecting that the log scanner has not read the deployment log file or has read an end mark, reading status information from the cloud platform environment, and defining the read status information as the real-time status information;
[0183] In response to detecting that the log scanner reads the deployment log file, sending the deployment log file to a log analyzer, and determining the real-time status information based on an analysis result of the log analyzer;
[0184] In response to detecting that the cloud platform environment has completed the deployment task, a log scanner is used to read all log files in the deployment process at one time, all the log files are sent to a log analyzer, and the real-time status information is determined based on the analysis result of the log analyzer.
[0185] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0186] In response to detecting that the cloud platform visualization deployment tool is restarted and the inactivity time is greater than a preset threshold, sending a status information calibration instruction;
[0187] or in response to detecting that the state information corresponding to the execution action when the operation button is used does not match the standard state information, sending a state information calibration instruction;
[0188] In response to receiving the status information calibration instruction, status information is read from the cloud platform environment, and the read status information is defined as the real-time status information.
[0189] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0190] Get the execution action generated by the target operation button when it is operated;
[0191] Determining state information corresponding to the execution action based on a cloud environment state generated by executing the execution action;
[0192] Based on the execution action and its corresponding state information, a one-to-one mapping relationship is formed;
[0193] Based on the multiple mapping relationships, a mapping relationship table is generated.
[0194] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0195] Acquire the real-time status information and the mapping relationship table;
[0196] Determine the execution action corresponding to the real-time status information based on the matching in the mapping relationship table;
[0197] The operation button corresponding to the execution action is defined as an available operation button corresponding to the real-time status information.
[0198] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0199] Detecting whether the execution action is consistent with the current state information;
[0200] In response to detecting that the execution action does not match the current state information, stopping execution of the execution action;
[0201] In response to detecting that the execution action is consistent with the current state information, the execution action is executed.
[0202] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0203] The real-time status information and the available operation buttons corresponding to the real-time status information are sent to the user-side display page to control the available operation buttons to respond to the user's operation instructions.
[0204] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0205] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0206] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. An operation control method based on state information, characterized in that: The method comprises: Based on the cloud platform environment deployment process, real-time status information is obtained, where the status information is obtained through at least: a database, a deployment log, and a cloud platform environment, and the real-time status information is used to describe the current operating status of the cloud platform environment; Based on the real-time status information and the mapping relationship between the status information and the execution action, determining an available operation button corresponding to the real-time status information; Based on the execution action generated when the usable operation button is operated, the user's operation instruction is responded to.
2. The operation control method based on state information according to claim 1, characterized in that: Based on the deployment process of the cloud platform environment, obtain real-time status information including: In response to detecting that an operation button is used, writing state information corresponding to an action generated based on the operation button into the database, and acquiring and defining the state information as the real-time state information; In response to detecting that the cloud platform environment executes a deployment task, using a log scanner to read a deployment log file; In response to detecting that the log scanner has not read the deployment log file or has read an end mark, reading status information from the cloud platform environment, and defining the read status information as the real-time status information; In response to detecting that the log scanner reads the deployment log file, sending the deployment log file to a log analyzer, and determining the real-time status information based on an analysis result of the log analyzer; In response to detecting that the cloud platform environment has completed the deployment task, a log scanner is used to read all log files in the deployment process at one time, all the log files are sent to a log analyzer, and the real-time status information is determined based on the analysis result of the log analyzer.
3. The operation control method based on state information according to claim 2, characterized in that: The method further comprises: In response to detecting that the cloud platform visualization deployment tool is restarted and the inactivity time is greater than a preset threshold, sending a status information calibration instruction; or in response to detecting that the state information corresponding to the execution action when the operation button is used does not match the standard state information, sending a state information calibration instruction; In response to receiving the status information calibration instruction, status information is read from the cloud platform environment, and the read status information is defined as the real-time status information.
4. The operation control method based on state information according to claim 1, characterized in that: The method for generating the mapping relationship includes: Get the execution action generated by the target operation button when it is operated; Determining state information corresponding to the execution action based on a cloud environment state generated by executing the execution action; Based on the execution action and its corresponding state information, a one-to-one mapping relationship is formed; Based on the multiple mapping relationships, a mapping relationship table is generated.
5. The operation control method based on state information according to claim 4, characterized in that: Based on the real-time status information and the mapping relationship between the status information and the execution action, determining the available operation button corresponding to the real-time status information includes: Acquire the real-time status information and the mapping relationship table; Determine the execution action corresponding to the real-time status information based on the matching in the mapping relationship table; The operation button corresponding to the execution action is defined as an available operation button corresponding to the real-time status information.
6. The operation control method based on state information according to claim 1, characterized in that: After the execution action generated when the usable operation button is operated, the method further includes: Detecting whether the execution action is consistent with the current state information; In response to detecting that the execution action does not match the current state information, stopping execution of the execution action; In response to detecting that the execution action is consistent with the current state information, the execution action is executed.
7. The operation control method based on state information according to claim 1, characterized in that: The method further comprises: The real-time status information and the available operation buttons corresponding to the real-time status information are sent to the user-side display page to control the available operation buttons to respond to the user's operation instructions.
8. An operation control device based on state information, characterized in that: The device comprises: An information acquisition module, used to acquire real-time status information based on the cloud platform environment deployment process, wherein the acquisition path of the status information includes at least: a database, a deployment log, and a cloud platform environment, and the real-time status information is used to describe the current operating status of the cloud platform environment; An available operation button determination module is used to determine an available operation button corresponding to the real-time state information based on the real-time state information and a mapping relationship between the state information and the execution action; The response module is used to respond to the user's operation instruction based on the execution action generated when the usable operation button is operated.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Cloud security protection system and flow cleaning method
CN106790091A
Cloud-based home appliance voice control method and system
CN109215641A
Voice instruction recognition method and system, and computer readable storage medium
CN111292744A
Quick deployment method and device of cloud native system, electronic equipment and storage medium
CN113127150A
Resource operation method and device and storage medium
CN114138598A
