Operation control method and device based on state information, equipment and storage medium
By acquiring real-time status information from the cloud platform and establishing a mapping relationship, the complexity and security issues of cloud platform operation are resolved, achieving both operational accuracy and security.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JINAN INSPUR DATA TECH CO LTD
- Filing Date
- 2024-06-25
- Publication Date
- 2026-06-19
AI Technical Summary
In cloud platforms, existing deployment tools lack effective state mechanisms, resulting in complex and error-prone operations that make it difficult to guarantee security and accuracy in various operational scenarios.
By acquiring real-time status information of the cloud platform environment, and utilizing databases, deployment logs, and the cloud platform environment, a mapping relationship between status information and execution actions is established to determine the usable operation buttons and respond to user commands, ensuring the security and accuracy of operations.
It improves the security and accuracy of cloud platform operations, prevents environmental damage caused by misoperation, and ensures the effectiveness and security of operations.
Smart Images

Figure CN118714029B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud platform technology, and in particular to an operation control method, apparatus, device and storage medium based on status information. Background Technology
[0002] Currently, command-line deployment by operations and maintenance (O&M) does not have state transition issues. Only when deployment is made into a unified tool will various states be used to control the deployment process. The simpler current deployment tools do not have the problem of designing a state mechanism; they only need to wait for the deployment to complete. However, in cloud platforms, due to the many operations involved, a complete cloud platform ecosystem includes not only deployment but also O&M, such as environment upgrades and updates. When combining deployment and O&M, since each operation corresponds to a different deployment method, the actions used are also different. How to enable deployment tools to better distinguish actions, making the operation simple, easy to use, and less prone to errors, is an urgent problem to be solved. Summary of the Invention
[0003] Therefore, it is necessary to provide an operation control method, apparatus, device, and storage medium based on status information that can improve operational safety and accuracy in response to the above-mentioned technical problems.
[0004] On the one hand, an operation control method based on state information is provided, the method comprising:
[0005] Based on the deployment process of the cloud platform environment, real-time status information is obtained. The acquisition methods for the status information include at least: database, deployment logs and cloud platform environment. The real-time status information is used to describe the current running status of the cloud platform environment.
[0006] Based on the real-time status information and the mapping relationship between the status information and the action to be performed, the available operation button corresponding to the real-time status information is determined.
[0007] Based on the execution action generated when the user operates the available operation button, respond to the user's operation command.
[0008] Optionally, based on the deployment process in the cloud platform environment, obtaining real-time status information includes:
[0009] In response to detecting that an operation button is used, the status information corresponding to the action generated based on the operation button is written into the database, and the status information is obtained and defined as the real-time status information;
[0010] When a deployment task is detected to be being executed in the cloud platform environment, the deployment log file is read using a log scanner.
[0011] In response to detecting that the log scanner has not read the deployment log file or has read the end marker, status information is read from the cloud platform environment, and the read status information is defined as the real-time status information;
[0012] In response to detecting that the log scanner has read the deployment log file, the deployment log file is sent to the log analyzer, and the real-time status information is determined based on the analysis results of the log analyzer;
[0013] When it is detected that the deployment task has been completed in the cloud platform environment, the log scanner reads all log files in the deployment process at once, sends all log files to the log analyzer, and determines the real-time status information based on the analysis results of the log analyzer.
[0014] Optionally, the method further includes:
[0015] When a status information calibration command is sent in response to the detection that the cloud platform visualization deployment tool has been restarted and the downtime exceeds a preset threshold;
[0016] Or, in response to a discrepancy between the status information corresponding to the action performed when the operation button is used and the standard status information, a status information calibration command is sent.
[0017] In response to receiving the status information calibration instruction, the system reads status information from the cloud platform environment and defines the read status information as the real-time status information.
[0018] Optionally, the method for generating the mapping relationship includes:
[0019] Get the action generated when the target button is pressed;
[0020] Based on the cloud environment state generated by executing the execution action, determine the state information corresponding to the execution action;
[0021] Based on the execution action and its corresponding state information, a one-to-one mapping relationship is formed;
[0022] A mapping table is generated based on the multiple mapping relationships described above.
[0023] Optionally, based on the real-time status information and the mapping relationship between the status information and the action to be performed, the available operation buttons corresponding to the real-time status information include:
[0024] Obtain the real-time status information and the mapping table;
[0025] The execution action corresponding to the real-time status information is determined based on the matching in the mapping table.
[0026] The operation button corresponding to the execution action is defined as the usable operation button corresponding to the real-time status information.
[0027] Optionally, after the action generated when the operable button is operated, the method further includes:
[0028] Detect whether the executed action matches the current state information;
[0029] When it is detected that the action being performed does not match the current state information, the execution of the action is stopped;
[0030] When the execution action is detected to match the current state information, the execution action is executed.
[0031] Optionally, the method further includes:
[0032] The real-time status information and the corresponding usable operation buttons are sent to the user's terminal display page to control the usable operation buttons to respond to the user's operation commands.
[0033] On the other hand, an operation control device based on state information is provided, the device comprising:
[0034] The information acquisition module is used to acquire real-time status information based on the deployment process in the cloud platform environment. The acquisition methods for the status information include at least: database, deployment logs and cloud platform environment. The real-time status information is used to describe the current running status of the cloud platform environment.
[0035] An operation button determination module can be used to determine the available operation button corresponding to the real-time status information based on the real-time status information and the mapping relationship between the status information and the execution action;
[0036] The response module is used to respond to the user's operation instructions based on the execution action generated when the operable operation button is operated.
[0037] In another aspect, 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 executes the computer program to perform the following steps:
[0038] Based on the deployment process of the cloud platform environment, real-time status information is obtained. The acquisition methods for the status information include at least: database, deployment logs and cloud platform environment. The real-time status information is used to describe the current running status of the cloud platform environment.
[0039] Based on the real-time status information and the mapping relationship between the status information and the action to be performed, the available operation button corresponding to the real-time status information is determined.
[0040] Based on the execution action generated when the user operates the available operation button, respond to the user's operation command.
[0041] In another aspect, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0042] Based on the deployment process of the cloud platform environment, real-time status information is obtained. The acquisition methods for the status information include at least: database, deployment logs and cloud platform environment. The real-time status information is used to describe the current running status of the cloud platform environment.
[0043] Based on the real-time status information and the mapping relationship between the status information and the action to be performed, the available operation button corresponding to the real-time status information is determined.
[0044] Based on the execution action generated when the user operates the available operation button, respond to the user's operation command.
[0045] The aforementioned operation control method, apparatus, device, and storage medium based on status information include: acquiring real-time status information based on the deployment process of a cloud platform environment; the acquisition methods for the status information include at least a database, deployment logs, and the cloud platform environment; the real-time status information describes the current operating status of the cloud platform environment; determining the usable operation button corresponding to the real-time status information based on the real-time status information and the mapping relationship between the status information and the execution action; and responding to the user's operation command based on the execution action generated when the usable operation button is operated. This application, through different status acquisition methods, can obtain the accurate status of the deployment environment. Furthermore, controlling operations through status greatly improves the security of cloud platform visualization deployment tool operations, ensuring the safe and effective operation of any operation and preventing damage to the cloud platform environment caused by illegal internal or external operations. Attached Figure Description
[0046] Figure 1 This is an application environment diagram of an operation control method based on state information in one embodiment;
[0047] Figure 2 This is a flowchart illustrating an operation control method based on state information in one embodiment;
[0048] Figure 3 This is a schematic diagram of the actions corresponding to the deployment operation of the operation control method based on state information in one embodiment;
[0049] Figure 4 This is a schematic diagram of state transitions in an operation control method based on state information in one embodiment;
[0050] Figure 5 This is a schematic diagram of the log analysis process of an operation control method based on state information in one embodiment;
[0051] Figure 6 This is a structural block diagram of an operation control device based on state information in one embodiment;
[0052] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0053] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0054] It should be understood that, in the description of this application, unless the context explicitly requires it, words such as "including" or "comprising" throughout the specification should be interpreted as including rather than exclusive or exhaustive; that is, meaning "including but not limited to".
[0055] It should also be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0056] It should be noted that the terms "S1," "S2," etc., are used only for descriptive purposes and do not specifically refer to the order or sequence, nor are they intended to limit this application. They are merely for the convenience of describing the method of this application and should not be construed as indicating the sequential order of the steps. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.
[0057] Deployment functionality is a fundamental feature of any cloud platform. For any cloud to function, deployment capability is the most basic requirement. Deployment capability directly reflects the cloud's application capabilities, and good deployment capabilities can greatly improve operational efficiency. In most existing cloud services, deployment relies on operations and maintenance (O&M), and the deployment method is the traditional command-line deployment method. This traditional method involves providing a set of deployment packages, then executing each package sequentially using command lines according to the deployment documentation, and finally having O&M integrate them into a unified cloud platform. In current public and private clouds, deployment is almost always performed in this way.
[0058] As the background technology indicates, command-line deployment via operations and maintenance (O&M) does not involve state transitions. Only when deployment is made into a unified tool will various states be used to control the deployment process. Currently, simpler deployment tools do not require a state mechanism; they simply wait for deployment to complete. However, cloud platforms involve numerous operations. A complete cloud platform ecosystem includes not only deployment but also O&M, such as environment upgrades and updates. Therefore, designing a state acquisition mechanism that combines deployment and O&M to satisfy all environmental operation processes is crucial for better operation of the cloud platform environment.
[0059] Existing status acquisition mechanisms typically involve setting a status flag in the database and then determining the availability of operation buttons based on different status return values. This method is suitable for ordinary application creation scenarios. However, for highly complex scenarios like cloud platform deployment, relying solely on a database status field to control buttons is clearly insufficient. Cloud platform deployment is a procedural and extremely time-consuming operation with very high security requirements. Since each operation has a different deployment method, the actions used also differ. How can visual deployment tools better distinguish actions, making operations simple, easy to use, and less prone to errors? Currently, none of the various public and private cloud deployment tools offer a solution to the problem of operation control based on environment status within deployment tools.
[0060] To address the aforementioned technical challenges, this application designs a visual deployment tool for cloud platform deployment. This tool not only provides deployment functionality but also operational and maintenance functions, such as scaling up / down and upgrades. Based on this, a robust status acquisition mechanism is designed to describe various states during cloud platform deployment. By controlling actions based on the acquired status, users can only perform actions within the current state and are prohibited from performing other actions. This ensures operational accuracy and avoids the impact of misoperations during deployment. For example, deployment operations in an incorrect state can directly destroy all environmental data, including user data, and may also cause cloud platform environment anomalies, leading to cloud platform unavailability.
[0061] The operation control method based on state information provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with a data processing platform set on server 104 via a network. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. Server 104 can be implemented as a standalone server or a server cluster consisting of multiple servers.
[0062] In one embodiment, such as Figure 2 As shown, an operation control method based on state information is provided, which can be applied to... Figure 1 Taking the terminal in the example, the explanation includes the following steps:
[0063] S1: Based on the cloud platform environment deployment process, obtain real-time status information. The acquisition methods for the status information include at least: database, deployment logs and cloud platform environment. The real-time status information is used to describe the current running 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 both successful and failed deployment scenarios. The deployment process is controlled through CloudWare (a visual deployment tool for cloud platforms). Within this tool, there are numerous operational options for a single cloud platform environment, such as... Figure 3 As shown, this illustrates all the actions performed during a deployment process. For example, pre-deployment operations such as creating and modifying the environment have their status information directly derived from the stored database. Deployment status during and after deployment, including success / failure determinations, comes from deployment logs. Post-deployment status, including cloud platform environment availability, is derived from underlying environment resources. Real-time status information is shown below. Figure 4 As shown, it can include not deployed, being deployed, deployment failed, being destroyed, and sub-states corresponding to the deployment state (such as module deployment, scaling up and scaling down), and can also include executing deployment tasks and deployment tasks completed.
[0065] In some specific implementations, the process of deploying based on the cloud platform environment and obtaining real-time status information includes:
[0066] In response to detecting that an operation button is used, the status information corresponding to the action generated based on the operation button is written into the database, and the status information is obtained and defined as the real-time status information;
[0067] When a deployment task is detected to be being executed in the cloud platform environment, the deployment log file is read using a log scanner.
[0068] In response to detecting that the log scanner has not read the deployment log file or has read the end marker, status information is read from the cloud platform environment, and the read status information is defined as the real-time status information;
[0069] In response to detecting that the log scanner has read the deployment log file, the deployment log file is sent to the log analyzer, and the real-time status information is determined based on the analysis results of the log analyzer;
[0070] When it is detected that the deployment task has been completed in the cloud platform environment, the log scanner reads all log files in the deployment process at once, sends all log files to the log analyzer, and determines the real-time status information based on the analysis results of the log analyzer.
[0071] In some specific embodiments, the method further includes:
[0072] When a cloud platform visualization deployment tool is detected to have restarted and been out of service for a period of time exceeding a preset threshold, a status information calibration command is sent. The preset threshold can be set according to actual needs, such as 2 minutes.
[0073] Or, in response to a situation where the status information corresponding to the action performed when the operation button is used does not match the standard status information, a status information calibration command is sent, where the standard status information refers to the status information of the operation button to which the action is performed;
[0074] In response to receiving the status information calibration instruction, the system reads status information from the cloud platform environment and defines the read status information as the real-time status information.
[0075] Specifically, from CloudWare's perspective (a cloud platform visual deployment tool), cloud platform environment operations are triggered by direct state changes after being deployed from the interface. However, the state is obtained during the deployment process, which is lengthy. This necessitates continuously retrieving the current state during deployment. The deployment process provides logs, requiring state analysis based on these logs. Deployment is multi-threaded; CloudWare allows multiple deployment tasks to be started simultaneously, resulting in multiple deployment threads. It's crucial to distinguish the corresponding states among these threads to avoid confusion. Furthermore, state calibration is critical in many situations. Generally, CloudWare is stopped after deployment to prevent accidental page openings and erroneous operations (it can also remain running as long as normal operation is ensured). When deployment is needed, CloudWare is restarted. This requires calibrating the actual state of the cloud platform environment managed by CloudWare. Generally, reading the state directly from the stored database is inaccurate because the cloud platform environment undergoes various changes during use. CloudWare needs to be able to detect the true state of the environment.
[0076] Furthermore, the purpose of state acquisition is to protect the security of CloudWare operations, enabling different CloudWare operations to correspond to different states. State can be obtained through three methods: First, the CloudWare database. The database state is used to visually display the cloud platform environment status. Generally, its data needs to be synchronized with the real environment. The database state is only used for recording and is responsible for interacting with the client. Second, the current state can be obtained from deployment logs. Deployment is a long process, during which deployment process logs are printed and recorded in files. Status and deployment progress can be confirmed based on log analysis. Generally, using logs to determine various intermediate states (such as the status of executing deployment tasks) and deployment failure states is relatively accurate. Third, the current state can be confirmed from the cloud platform environment. After deployment is complete, the cloud platform environment enters the running state. At this point, the deployment logs can only determine that the cloud platform environment was successfully deployed, but the actual state of the cloud platform environment is difficult to grasp. If the cloud platform environment is operating normally, it is generally judged that the cloud platform environment has been successfully deployed and is in a running state. At this time, it is necessary to determine whether the cloud platform environment is available based on the running status of resources.
[0077] Furthermore, the real-time status information acquisition method is divided into two parts: operation acquisition and runtime acquisition. Operation acquisition refers to updating the current status based on operations. That is, when a user performs an operation or uses a related button, corresponding status information is generated and used as the real-time status information. The status acquired through operation is directly written to the stored database, and the client's real-time status is updated through the database. For example, as shown... Figure 4 As shown, the states obtained through operations include: 1. Post-creation state: After creating the cloud platform environment, the real-time status information changes to "Not Deployed"; 2. Post-deployment state: After clicking the "Start Deployment" button, the real-time status information immediately changes to "Deploying"; 3. Post-deployment abort state: Only the environment being deployed can be operated on. After clicking the operation button, the real-time status information immediately changes to "Deployment Failed"; 4. Module deployment, scaling up, and scaling down operations: The real-time status information changes to "Deploying" and its sub-state. The sub-state only appears after clicking these three operation buttons; 5. Destruction operation: The real-time status information changes to "Destroying"; 6. All modification and deletion operations do not change the current state. The above operations directly change the real-time status information of the cloud platform environment in CloudWare, which relies on the stored database to obtain a real-time updated status information; Runtime acquisition refers to the status obtained during deployment or update in the cloud platform environment. The acquisition methods include two parts: one is from deployment logs, and the other is from the cloud platform environment. Acquiring from deployment logs requires the use of a log scanner and a log analyzer, such as... Figure 5As shown, the log scanner first reads the deployment log file. If the deployment log file does not exist, it needs to obtain real-time status information from the cloud platform environment. If it is not a cloud platform environment currently being deployed (i.e., a cloud platform that has already been deployed), the log scanner reads all deployment log files at once, then scans the information points in the logs (such as scan time, progress, start and end markers), and sends them to the log analyzer. The log analyzer determines whether the current cloud platform environment deployment was successful or failed based on the content, and provides the analyzed real-time status information and root cause of the cloud platform environment. The analysis process of the log analyzer is a common method and will not be elaborated here. If it is an environment currently being deployed (i.e., the cloud platform environment is executing a deployment task), the log scanner continuously tracks the deployment log, scanning the time, progress, error messages, end markers, etc. in the deployment log information stream. The log scanner distributes the scanned content to the log analyzer, which determines whether the current environment deployment is complete, the status information of completion, and the error reason for deployment failure, and outputs the deployment progress to the client in real time. The log scanner continues to run and triggers the log analyzer when the deployment log changes. When the deployment log stops outputting or Scanning only stops when the client terminates, ensuring real-time acquisition of status information and continuous provision of status data. When the log scanner cannot obtain deployment logs, or when the deployment log reaches an end marker, or when CloudWare restarts, or when the status information corresponding to the action executed when an operation button is used does not match the standard status information, it is necessary to query the actual status from the cloud platform environment. After CloudWare has been idle for a period of time, the cloud platform environment status may change as the cloud platform environment runs, such as being destroyed by external forces or experiencing anomalies. In this case, since the CloudWare client still displays the status based on the database, it may not be consistent with the actual status. Therefore, it is necessary to query the actual status from the cloud platform environment. This is done by obtaining the actual status of the cloud platform environment through k8sClient, i.e., querying the actual resource status of the cloud platform and combining the results for analysis. 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, a deployment error is returned; if the cloud platform environment does not exist, it is returned that the cloud platform environment has been destroyed.
[0078] In addition, the cloud platform environment status is updated on demand: CloudWare cannot continuously probe the actual status of the underlying environment to prevent meaningless traffic from affecting the real cloud platform environment. It can only update the cloud platform environment status in real time according to demand. When the status information required for the operation does not match the actual status, a full update of the cloud platform environment status information is triggered. When CloudWare restarts, a full update of the status information is triggered. When refreshing the status information of a single environment, 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 used, whether it is in operation or restarting, it can accurately and effectively obtain the real state of the cloud platform environment, thereby controlling the operation in reverse 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 usable operation button corresponding to the real-time status information.
[0081] It should be noted that the action to be performed refers to the action generated when the corresponding operation button is clicked.
[0082] In some specific embodiments, the method for generating the mapping relationship includes:
[0083] Get the action generated when the target button is pressed;
[0084] Based on the cloud environment state generated by executing the execution action, determine the state information corresponding to the execution action;
[0085] Based on the execution action and its corresponding state information, a one-to-one mapping relationship is formed;
[0086] A mapping table is generated based on the multiple mapping relationships described above.
[0087] In some specific implementations, based on the real-time status information and the mapping relationship between the status information and the action to be performed, the available operation buttons corresponding to the real-time status information include:
[0088] Obtain the real-time status information and the mapping table;
[0089] The execution action corresponding to the real-time status information is determined based on the matching in the mapping table.
[0090] The operation button corresponding to the execution action is defined as the usable operation button corresponding to the real-time status information.
[0091] Specifically, for cloud platform deployments, every operation can be considered a high-risk operation. For example, deployment and module deployment can cause pod-level restarts, scaling up and down can cause data-level changes, and deletion and destruction operations can directly destroy all user data. User operations are mainly initiated from the client. Therefore, it is necessary to deeply bind status information and the operations that generate execution actions at the business layer. Which buttons can be operated under a certain status must be strictly controlled to prevent unauthorized access. It is not possible to simply control the status on the buttons, as users can change the button permissions through certain means to allow the operation to be issued. Instead, it is necessary to establish an association table between execution actions and status information through CloudWare (i.e., the mapping relationship table mentioned above). A separate module should be created in its database to store this association table. That is, one operation can correspond to multiple status information, and one status 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 new status information or operation buttons, and to facilitate the expansion of the mapping relationship table. Maintaining the association table can facilitate the control of user operation buttons and also provide access to the interface layer to ensure that the operation interface is not issued with incorrect status 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 can be used by the client and interface layer to prevent user misoperation and ensure the accuracy of user operation.
[0093] S3: Based on the execution action generated when the available operation button is operated, respond to the user's operation command.
[0094] It should be noted that user operation commands can refer to the user manually clicking the operation button, or to the user clicking the operation button through interactive means such as voice interaction.
[0095] In some specific embodiments, after the execution action generated when the operable operation button is operated, the method further includes:
[0096] Detect whether the executed action matches the current state information;
[0097] When it is detected that the action being performed does not match the current state information, the execution of the action is stopped;
[0098] When the execution action is detected to match the current state information, the execution action is executed.
[0099] Specifically, after the operation is issued, the feasibility of the operation must be determined based on the real-time status information. That is, it is necessary to check whether the execution action generated by the issued operation belongs to the operation that should be performed under the current status information. If not, the operation is deemed infeasible, and the execution of the action is stopped; otherwise, the execution of the action begins.
[0100] In some specific implementations, the user operation command is issued in response to the detection that it is not manually issued, such as through voice interaction to control the clicking of the operation button;
[0101] The user's voice is processed to obtain key information, which may include keywords of operation buttons or actions to be performed.
[0102] The key information is compared with the text information of all operation buttons and their corresponding execution actions under the current state information. In this comparison, the key information and text information can be in a scrambled state. For example, the key information is "deploy" or "start", and the text information can be "destroy" or "stop".
[0103] When the similarity between the key information and the text information is detected to be greater than a first preset threshold, it indicates that the user-issued operation may be executed in the current state. Then, all key information and all text information are compared. Both key information and text information can be "stop deployment" or "start deployment". The first preset threshold can be set according to actual needs, such as 50% or 60%.
[0104] When the similarity between the full set of key information and the full set of text information is detected to be greater than the second preset threshold, the corresponding operation button is clicked. The second preset value can be set according to actual needs, such as 75% or 100%. For example, when it is 75%, any three characters in the initial deployment can be successfully compared. When it is 100%, all four characters in the initial deployment can be successfully compared.
[0105] When the similarity between all key information and all text information is less than or equal to the second preset threshold, it means that the user needs to further determine whether the operation command issued by the user can be executed based on the status information displayed on the display page.
[0106] When the similarity between the key information and the text information is less than or equal to a first preset threshold, it means that the operation command issued by the user cannot be executed in the current state, and no click operation is performed.
[0107] In the above embodiments, it can be used by users to control the operation scene through voice commands. Before issuing the operation, relevant information is compared. After the comparison is successful, the operation task is issued to improve the efficiency of operation judgment and the accuracy of operation, and avoid environmental damage caused by misoperation.
[0108] In some specific embodiments, the method further includes:
[0109] The real-time status information and the corresponding usable operation buttons are sent to the user's terminal display page to control the usable operation buttons to respond to the user's operation commands.
[0110] Specifically, updating the status information displayed on the user-side page mainly refers to updating the status after obtaining real-time status information, such as... Figure 4 As shown, status information updates rely on real-time acquisition of status information. Status information updates are mainly used for client display, allowing users to view the latest status information in a timely manner. Editing and deleting operations do not generate status information updates. For creation, deployment, aborting deployment, and destruction operations, their status information updates are implemented on the client side. For updates of status information such as "deploying" and "destroying," they are implemented on the backend, caching all status information 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 corresponding operation buttons, the corresponding operation buttons can be precisely controlled based on changes in the deployment status information of the cloud platform environment, thereby effectively improving the accuracy of operation and avoiding damage to the cloud platform environment caused by misoperation.
[0112] The above-mentioned operation control method based on status information includes: obtaining real-time status information based on the cloud platform environment deployment process. The acquisition methods for the status information include at least: database, deployment logs, and cloud platform environment. The real-time status information is used to describe the current running 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, the available operation button corresponding to the real-time status information is determined. Based on the execution action generated when operating the available operation button, the user's operation command is responded to. This application greatly improves the security of CloudWare operations, ensures the security and effectiveness of any operation, and prevents damage to the environment caused by illegal internal or external operations. Whether operating on the client or through the interface, this application ensures the real-time nature and effectiveness of the status information, accurately controls the display of the status information, and controls the operation through the status information to ensure the security of the operation. Furthermore, by using different status information acquisition methods, the accurate status of the cloud platform deployment environment can be obtained. Whether performing various deployment operations on the cloud platform environment in CloudWare or using CloudWare to take over the environment again, the response can be accurate, and it is guaranteed that no destructive operation will be caused to the environment.
[0113] It should be understood that, although Figures 2-5 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figures 2-5 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed 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 some of the sub-steps or stages of other steps.
[0114] In one embodiment, such as Figure 6 As shown, an operation control device based on status information is provided, including: an information acquisition module, a module for determining operation using buttons, and a response module, wherein:
[0115] The information acquisition module is used to acquire real-time status information based on the deployment process in the cloud platform environment. The acquisition methods for the status information include at least: database, deployment logs and cloud platform environment. The real-time status information is used to describe the current running status of the cloud platform environment.
[0116] An operation button determination module can be used to determine the available operation button corresponding to the real-time status information based on the real-time status information and the mapping relationship between the status information and the execution action;
[0117] The response module is used to respond to the user's operation instructions based on the execution action generated when the operable operation button is operated.
[0118] In a preferred embodiment of the present invention, the information acquisition module is specifically used for:
[0119] In response to detecting that an operation button is used, the status information corresponding to the action generated based on the operation button is written into the database, and the status information is obtained and defined as the real-time status information;
[0120] When a deployment task is detected to be being executed in the cloud platform environment, the deployment log file is read using a log scanner.
[0121] In response to detecting that the log scanner has not read the deployment log file or has read the end marker, status information is read from the cloud platform environment, and the read status information is defined as the real-time status information;
[0122] In response to detecting that the log scanner has read the deployment log file, the deployment log file is sent to the log analyzer, and the real-time status information is determined based on the analysis results of the log analyzer;
[0123] When it is detected that the deployment task has been completed in the cloud platform environment, the log scanner reads all log files in the deployment process at once, sends all log files to the log analyzer, and determines the real-time status information based on the analysis results of the log analyzer.
[0124] In a preferred embodiment of the present invention, the information acquisition module is further configured to:
[0125] When a status information calibration command is sent in response to the detection that the cloud platform visualization deployment tool has been restarted and the downtime exceeds a preset threshold;
[0126] Or, in response to a discrepancy between the status information corresponding to the action performed when the operation button is used and the standard status information, a status information calibration command is sent.
[0127] In response to receiving the status information calibration instruction, the system reads status information from the cloud platform environment and defines the read status information as the real-time status information.
[0128] In a preferred embodiment of the present invention, the module for determining the usable operation button is specifically used for:
[0129] Get the action generated when the target button is pressed;
[0130] Based on the cloud environment state generated by executing the execution action, determine the state information corresponding to the execution action;
[0131] Based on the execution action and its corresponding state information, a one-to-one mapping relationship is formed;
[0132] A mapping table is generated based on the multiple mapping relationships described above.
[0133] In a preferred embodiment of the present invention, the module for determining whether an operation button can be used is further configured to:
[0134] Obtain the real-time status information and the mapping table;
[0135] The execution action corresponding to the real-time status information is determined based on the matching in the mapping table.
[0136] The operation button corresponding to the execution action is defined as the usable operation button corresponding to the real-time status information.
[0137] In a preferred embodiment of the present invention, the response module is specifically used for:
[0138] Detect whether the executed action matches the current state information;
[0139] When it is detected that the action being performed does not match the current state information, the execution of the action is stopped;
[0140] When the execution action is detected to match the current state information, the execution action is executed.
[0141] In a preferred embodiment of the present invention, the device further includes a display module, which is specifically used for:
[0142] The real-time status information and the corresponding usable operation buttons are sent to the user's terminal display page to control the usable operation buttons to respond to the user's operation commands.
[0143] For specific limitations regarding the state-information-based operation control device, please refer to the limitations of the state-information-based operation control method above, which will not be repeated here. Each module in the aforementioned state-information-based operation control device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0144] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements an operation control method based on state information. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.
[0145] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[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 executes the computer program to perform the following steps:
[0147] S1: Based on the deployment process of the cloud platform environment, obtain real-time status information. The acquisition methods of the status information include at least: database, deployment log and cloud platform environment. The real-time status information is used to describe the current running 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, determine the usable operation button corresponding to the real-time status information;
[0149] S3: Based on the execution action generated when the available operation button is operated, respond to the user's operation command.
[0150] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0151] In response to detecting that an operation button is used, the status information corresponding to the action generated based on the operation button is written into the database, and the status information is obtained and defined as the real-time status information;
[0152] When a deployment task is detected to be being executed in the cloud platform environment, the deployment log file is read using a log scanner.
[0153] In response to detecting that the log scanner has not read the deployment log file or has read the end marker, status information is read from the cloud platform environment, and the read status information is defined as the real-time status information;
[0154] In response to detecting that the log scanner has read the deployment log file, the deployment log file is sent to the log analyzer, and the real-time status information is determined based on the analysis results of the log analyzer;
[0155] When it is detected that the deployment task has been completed in the cloud platform environment, the log scanner reads all log files in the deployment process at once, sends all log files to the log analyzer, and determines the real-time status information based on the analysis results of the log analyzer.
[0156] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0157] When a status information calibration command is sent in response to the detection that the cloud platform visualization deployment tool has been restarted and the downtime exceeds a preset threshold;
[0158] Or, in response to a discrepancy between the status information corresponding to the action performed when the operation button is used and the standard status information, a status information calibration command is sent.
[0159] In response to receiving the status information calibration instruction, the system reads status information from the cloud platform environment and defines the read status information as the real-time status information.
[0160] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0161] Get the action generated when the target button is pressed;
[0162] Based on the cloud environment state generated by executing the execution action, determine the state information corresponding to the execution action;
[0163] Based on the execution action and its corresponding state information, a one-to-one mapping relationship is formed;
[0164] A mapping table is generated based on the multiple mapping relationships described above.
[0165] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0166] Obtain the real-time status information and the mapping table;
[0167] The execution action corresponding to the real-time status information is determined based on the matching in the mapping table.
[0168] The operation button corresponding to the execution action is defined as the usable operation button corresponding to the real-time status information.
[0169] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0170] Detect whether the executed action matches the current state information;
[0171] When it is detected that the action being performed does not match the current state information, the execution of the action is stopped;
[0172] When the execution action is detected to match the current state information, the execution action is executed.
[0173] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0174] The real-time status information and the corresponding usable operation buttons are sent to the user's terminal display page to control the usable operation buttons to respond to the user's operation commands.
[0175] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0176] S1: Based on the deployment process of the cloud platform environment, obtain real-time status information. The acquisition methods of the status information include at least: database, deployment log and cloud platform environment. The real-time status information is used to describe the current running 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, determine the usable operation button corresponding to the real-time status information;
[0178] S3: Based on the execution action generated when the available operation button is operated, respond to the user's operation command.
[0179] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0180] In response to detecting that an operation button is used, the status information corresponding to the action generated based on the operation button is written into the database, and the status information is obtained and defined as the real-time status information;
[0181] When a deployment task is detected to be being executed in the cloud platform environment, the deployment log file is read using a log scanner.
[0182] In response to detecting that the log scanner has not read the deployment log file or has read the end marker, status information is read from the cloud platform environment, and the read status information is defined as the real-time status information;
[0183] In response to detecting that the log scanner has read the deployment log file, the deployment log file is sent to the log analyzer, and the real-time status information is determined based on the analysis results of the log analyzer;
[0184] When it is detected that the deployment task has been completed in the cloud platform environment, the log scanner reads all log files in the deployment process at once, sends all log files to the log analyzer, and determines the real-time status information based on the analysis results of the log analyzer.
[0185] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0186] When a status information calibration command is sent in response to the detection that the cloud platform visualization deployment tool has been restarted and the downtime exceeds a preset threshold;
[0187] Or, in response to a discrepancy between the status information corresponding to the action performed when the operation button is used and the standard status information, a status information calibration command is sent.
[0188] In response to receiving the status information calibration instruction, the system reads status information from the cloud platform environment and defines the read status information as the real-time status information.
[0189] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0190] Get the action generated when the target button is pressed;
[0191] Based on the cloud environment state generated by executing the execution action, determine the state information corresponding to the execution action;
[0192] Based on the execution action and its corresponding state information, a one-to-one mapping relationship is formed;
[0193] A mapping table is generated based on the multiple mapping relationships described above.
[0194] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0195] Obtain the real-time status information and the mapping table;
[0196] The execution action corresponding to the real-time status information is determined based on the matching in the mapping table.
[0197] The operation button corresponding to the execution action is defined as the usable operation button corresponding to the real-time status information.
[0198] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0199] Detect whether the executed action matches the current state information;
[0200] When it is detected that the action being performed does not match the current state information, the execution of the action is stopped;
[0201] When the execution action is detected to match the current state information, the execution action is executed.
[0202] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0203] The real-time status information and the corresponding usable operation buttons are sent to the user's terminal display page to control the usable operation buttons to respond to the user's operation commands.
[0204] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, 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. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0205] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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 embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. An operation control method based on state information, characterized in that, The method includes: Based on the deployment process of the cloud platform environment, real-time status information is obtained. The acquisition methods for the status information include at least: database, deployment logs, and cloud platform environment. The real-time status information is used to describe the current running status of the cloud platform environment. The acquisition methods for the real-time status information include operation acquisition and running acquisition. Operation acquisition updates the current status according to the operation, that is, when the user performs an operation or uses relevant operation buttons, the corresponding status information is generated and the generated status information is used as real-time status information. Running acquisition is the status obtained during deployment or update in the cloud platform environment. The acquisition methods for running acquisition include acquisition from deployment logs and acquisition from the cloud platform environment. Based on the real-time status information and the mapping relationship between the status information and the action to be performed, the available operation button corresponding to the real-time status information is determined. Based on the actions generated when the usable operation buttons are operated, respond to the user's operation commands; The method for generating the mapping relationship includes: Get the action generated when the target button is pressed; Based on the cloud environment state generated by executing the execution action, determine the state information corresponding to 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; Based on the real-time status information and the mapping relationship between the status information and the action to be performed, the available operation buttons corresponding to the real-time status information include: Obtain the real-time status information and the mapping table; The execution action corresponding to the real-time status information is determined based on the matching in the mapping table. Define the operation button corresponding to the execution action as the usable operation button corresponding to the real-time status information; Based on the deployment process in the cloud platform environment, the real-time status information obtained includes: When a status information calibration command is sent in response to the detection that the cloud platform visualization deployment tool has been restarted and the downtime exceeds a preset threshold; Or, in response to a discrepancy between the status information corresponding to the action performed when the operation button is used and the standard status information, a status information calibration command is sent. 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; In response to the detection that the user's operation command is issued by voice interaction, the user's voice is processed to obtain key information, including keywords of operation buttons or the required action; The key information is compared with the text information of all operation buttons and their corresponding execution actions under the current state information. In this comparison, the key information and text information are in a scrambled state. When the similarity between the key information and the text information is detected to be greater than a first preset threshold, the entire set of key information is compared with the entire set of text information. When the similarity between all key information and all text information is detected to be greater than a second preset threshold, the corresponding operation button is clicked. When the similarity between all key information and all text information is less than or equal to the second preset threshold, it indicates that the user needs to further determine whether to execute the operation command issued by the user based on the status information displayed on the display page. When the similarity between the key information and the text information is less than or equal to a first preset threshold, it means that the operation command issued by the user cannot be executed in the current state, and no click operation is performed.
2. The operation control method based on state information according to claim 1, characterized in that, Based on the deployment process in the cloud platform environment, the real-time status information obtained includes: In response to detecting that an operation button is used, the status information corresponding to the action generated based on the operation button is written into the database, and the status information is obtained and defined as the real-time status information; When a deployment task is detected to be being executed in the cloud platform environment, the deployment log file is read using a log scanner. In response to detecting that the log scanner has not read the deployment log file or has read the end marker, status information is read from the cloud platform environment, and the read status information is defined as the real-time status information; In response to detecting that the log scanner has read the deployment log file, the deployment log file is sent to the log analyzer, and the real-time status information is determined based on the analysis results of the log analyzer; When it is detected that the deployment task has been completed in the cloud platform environment, the log scanner reads all log files in the deployment process at once, sends all log files to the log analyzer, and determines the real-time status information based on the analysis results of the log analyzer.
3. The operation control method based on state information according to claim 1, characterized in that, After the action generated when the operable button is operated, the method further includes: Detect whether the executed action matches the current state information; When it is detected that the action being performed does not match the current state information, the execution of the action is stopped; When the execution action is detected to match the current state information, the execution action is executed.
4. The operation control method based on state information according to claim 1, characterized in that, The method further includes: The real-time status information and the corresponding usable operation buttons are sent to the user's terminal display page to control the usable operation buttons to respond to the user's operation commands.
5. A state-information-based operation control device for implementing the state-information-based operation control method as described in claim 1, characterized in that, The device includes: The information acquisition module is used to acquire real-time status information based on the deployment process in the cloud platform environment. The acquisition methods for the status information include at least: database, deployment logs and cloud platform environment. The real-time status information is used to describe the current running status of the cloud platform environment. An operation button determination module can be used to determine the available operation button corresponding to the real-time status information based on the real-time status information and the mapping relationship between the status information and the execution action; The response module is used to respond to the user's operation instructions based on the execution action generated when the operable operation button is operated.
6. 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, it implements the method of any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 4.