Online environment self-checking method, device and equipment and storage medium
Through the automated online environment self-test method, the expected value of the self-test task and the server IP information are obtained, and the self-test task is generated and executed. The expression engine processing results are used to solve the problem of high interruption rate of online environment inspection in the existing technology, and an efficient and automated inspection process is achieved.
Patent Information
- Application Number
- CN202411901941.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-18
AI Technical Summary
The current technology has a high interruption rate when checking the software online environment. Developers cannot directly view the online environment configuration and rely on the pre-process/pre-system. Operation and maintenance personnel need to operate manually, resulting in incomplete inspections and low efficiency.
By obtaining the expected value of the self-test task and the server IP information, generating task configuration, processing the server IP information and task configuration based on the preset self-test task protocol format, sending the self-test task to the server for execution, and using the expression engine to process the execution results, realizing automated inspection of the online environment.
The interrupt rate of software online environment inspection is reduced. Developers do not need to view online environment configuration, the self-inspection process does not need to rely on pre-process/pre-system, and operation and maintenance personnel do not need to consider opening firewall strategies, which realizes automated inspections and improves efficiency.
Smart Images

Figure CN119847944A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of financial technology, and in particular to an online environment self-inspection method, device, equipment and storage medium. Background Art
[0002] In order to provide better services to users, banks generally develop their own banking software, such as mobile banking APP. After the development or version optimization of the banking software is completed, the banking software needs to be deployed to the corresponding operating environment for providing external services, which is also the software online environment. In order to ensure the success rate of banking software deployment, before deploying the banking software to the software online environment, the software online environment needs to be checked to determine whether the software online environment has currently completed the preparations for the deployment of the banking software.
[0003] At present, the software online environment is generally checked manually. Specifically, the operation and maintenance personnel maintain the environment variables according to the deployment manual. If there are steps to manually operate the server, log in to the server to execute the operation and maintenance commands and initialize the environment; the developer refers to the test environment and uploads the shell script for product environment verification to the Devops system; the operation and maintenance personnel operate in the Devops system and send the self-check script to the online environment server; the operation and maintenance personnel operate in the Devops system and execute the self-check script before installation to verify the environmental verification of the online environment.
[0004] However, on the one hand, developers cannot directly view the configuration of the online environment, such as file directory structure, disk space, directory permissions, etc., which causes the verification script to miss the verification of the online environment; on the other hand, some software products need to rely on pre-processes / pre-systems before installation and deployment, but when the operation and maintenance personnel operate and deploy in the Devops system, they automatically execute the installation steps and cannot detect whether the pre-dependencies are ready, resulting in installation failure; on the third hand, some software products deployed on the intranet and some interrelated software products require firewall policies to be enabled so that business requests can be smoothly processed by various products and transactions can be completed. However, many times, developers / operation and maintenance personnel are not aware of the need to enable firewall policies, which leads to blockage in the troubleshooting progress; from the above, it can be seen that the interruption rate of software online environment checks using existing technologies is relatively high. Summary of the invention
[0005] In order to reduce the interruption rate of software online environment inspection, the present application provides an online environment self-inspection method, device, equipment and storage medium.
[0006] In a first aspect, the present application provides an online environment self-checking method, comprising:
[0007] Obtaining the expected value of the self-check task and the server IP information, and generating a task configuration based on the expected value of the self-check task;
[0008] Processing the server IP information and the task configuration based on a preset self-check task protocol format to obtain a self-check task;
[0009] Sending the self-check task to the server corresponding to the server IP information to execute and obtain the execution result;
[0010] The execution result is processed based on a preset expression engine to obtain a task self-check result.
[0011] Through the above implementation, during the process of self-inspection of the online environment, developers do not need to check the configuration of the online environment, the self-inspection process does not need to rely on the front-end process / front-end system, and development / operation and maintenance personnel do not need to consider opening firewall policies. Self-inspection personnel only need to send the expected value of the self-inspection task and the server IP information to realize the automatic inspection of the online environment, which makes it easy to reduce the interruption rate of the software online environment inspection.
[0012] Preferably, generating a task configuration based on the expected value of the self-check task includes:
[0013] A task configuration is generated based on the expected value of the self-check task and the operation and maintenance command corresponding to the expected value of the self-check task and the comparison symbol.
[0014] Through the above implementation, the task configuration is generated by the expected value of the self-check task and the operation and maintenance command corresponding to the expected value of the self-check task and the comparison symbol, which can facilitate the automatic generation of the task configuration, thereby improving the efficiency of the online environment inspection.
[0015] Preferably, the processing of the server IP information and the task configuration based on a preset self-check task protocol format to obtain the self-check task includes:
[0016] Converting the task configuration into a primitive expression;
[0017] The server IP information and the operation and maintenance command, the comparison operator and the expected value of the self-check task in the original expression are assembled based on a preset self-check task protocol format to obtain a self-check task.
[0018] Through the above implementation, the self-check task is assembled in the self-check task protocol format, which is convenient for improving the versatility and scalability of the self-check task.
[0019] Preferably, the self-check task also includes: a timing time and a task name.
[0020] Through the above implementation, the additional content of the self-check task is made public, making it easier to understand the execution name and execution time of the self-check task.
[0021] Preferably, after the self-check task is obtained by processing the server IP information and the task configuration based on a preset self-check task protocol format, the method further includes:
[0022] In response to the server IP information corresponding to multiple servers, the self-check task is distributed to each of the servers based on a preset task batch execution framework for execution respectively to obtain execution results corresponding to each of the servers one by one;
[0023] Based on the preset expression engine, each of the execution results is processed separately to obtain a task self-check result corresponding to each of the execution results.
[0024] Through the above implementation, the self-check result is calculated by the expression engine, so that it is easy to clearly know whether the self-check task corresponding to the execution result is executed successfully.
[0025] Preferably, the self-checking task is distributed to each of the servers based on a preset task batch execution framework to execute them respectively and obtain execution results corresponding to each of the servers, including:
[0026] The control node in the preset task batch execution framework receives the self-check task, and distributes the self-check task to each of the servers for execution respectively, so as to obtain the execution results corresponding to each of the servers one by one.
[0027] Through the above implementation, the distribution of self-check tasks is achieved through the control node, which facilitates the asynchronous and batch execution of subsequent self-check tasks and helps to improve the self-check efficiency.
[0028] In a second aspect, the present application provides an online environment self-checking device, comprising:
[0029] A configuration generation module is used to obtain the expected value of the self-check task and the server IP information, and generate a task configuration based on the expected value of the self-check task;
[0030] A task generation module, used for processing the server IP information and the task configuration based on a preset self-check task protocol format to obtain a self-check task;
[0031] A task execution module, used for sending the self-check task to the server corresponding to the server IP information to execute and obtain an execution result;
[0032] The result feedback module is used to process the execution result based on a preset expression engine to obtain a task self-check result.
[0033] Through the above implementation, during the process of self-inspection of the online environment, developers do not need to check the configuration of the online environment, the self-inspection process does not need to rely on the front-end process / front-end system, and development / operation and maintenance personnel do not need to consider opening firewall policies. Self-inspection personnel only need to send the expected value of the self-inspection task and the server IP information to realize the automatic inspection of the online environment, which makes it easy to reduce the interruption rate of the software online environment inspection.
[0034] In a third aspect, the present application provides a computer device, the computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps in the above method when executing the computer program.
[0035] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps in the above method when executed by a processor.
[0036] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0037] The above-mentioned online environment self-check method, device, equipment and storage medium obtain the expected value of the self-check task and the server IP information, generate a task configuration based on the expected value of the self-check task; process the server IP information and the task configuration based on the preset self-check task protocol format to obtain a self-check task; send the self-check task to the server corresponding to the server IP information to execute and obtain an execution result; process the execution result based on a preset expression engine to obtain a task self-check result. Through the above implementation, in the process of online environment self-check, developers do not need to check the configuration of the online environment, the self-check process does not need to rely on the front-end process / front-end system, etc., and development / operation and maintenance personnel do not need to consider opening firewall policies. Self-check personnel only need to send the expected value of the self-check task and the server IP information to realize the automatic inspection of the online environment, which is convenient for reducing the interruption rate of the software online environment inspection.
[0038] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0040] Figure 1 A flow chart of an online environment self-checking method provided in an embodiment of the present application;
[0041] Figure 2 A schematic diagram of the structure of an online environment self-checking device provided in an embodiment of the present application;
[0042] Figure 3 A schematic diagram of the structure of a computer device provided in an embodiment of the present application;
[0043] Figure 4 This is a diagram of the internal structure of a computer-readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solution and advantages of the present disclosure more clear, the present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure and are not used to limit the present disclosure.
[0045] It should be noted that the terms "first", "second", etc. in the specification and claims of this article and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of this article described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0046] In this article, the term "and / or" is only a description of the association relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the related objects before and after are in an "or" relationship.
[0047] Embodiment 1
[0048] Figure 1A flowchart of an online environment self-checking method provided in Example 1 of the present application is provided. Figure 1 The method may be performed by a device for performing the method, and the device may be implemented by software and / or hardware. The method includes:
[0049] S110, obtaining an expected value of a self-check task and server IP information, and generating a task configuration based on the expected value of the self-check task.
[0050] Among them, the online environment in this embodiment is the environment in which the bank APP that has completed development or completed version optimization is run after it goes online. The online environment is generally set in the server; before deploying the bank APP to the corresponding online environment, in order to ensure that the online environment is in a state of preparation, it is necessary to perform a self-inspection on the online environment; when inspecting the online environment, it is necessary to perform a self-inspection on the online environment according to multiple self-inspection tasks, so as to realize self-inspection of different objects to be inspected in the online environment; the user sets corresponding expected values for different self-inspection tasks, and records the expected value as the expected value of the self-inspection task. The IP information of the server to be deployed in the online environment is also the server IP information. The task configuration is automatically generated based on the expected value of the self-inspection task, and the task configuration corresponds to the expected value of the self-inspection task used to generate the task configuration. The task configuration is used to characterize the specific inspection content of the subsequent inspection of the corresponding object to be inspected in the online environment.
[0051] Specifically, the expected value of the self-check task and the server IP information filled in by the user are obtained, and then the corresponding task configuration is automatically generated according to the expected value of the self-check task.
[0052] S120 , processing the server IP information and the task configuration based on a preset self-check task protocol format to obtain a self-check task.
[0053] Among them, the self-check task protocol format is used to unify the format of the self-check tasks to improve the versatility and scalability of the self-check tasks; the self-check tasks are composed of server IP information and task configuration according to the self-check task protocol format, and the self-check tasks are used to be sent to the corresponding server for execution in the future to realize the self-check of the online environment in the server.
[0054] Specifically, the server IP information and the task configuration are combined according to the self-check task protocol format to obtain the self-check task.
[0055] S130: Send the self-check task to the server corresponding to the server IP information to execute and obtain an execution result.
[0056] The self-check task is used to be sent to a server corresponding to the server IP information for execution, and the result obtained after the server executes the self-check task is recorded as the execution result.
[0057] S140: Process the execution result based on a preset expression engine to obtain a task self-check result.
[0058] Among them, the execution result is in the form of an expression. For example, an execution result is "user1=appuser1"; the execution result cannot directly indicate whether the self-check task corresponding to the execution result is executed successfully, and the execution result needs to be processed by a preset expression engine. The result obtained by the expression engine processing the execution result is also the task self-check result; the task self-check result includes two cases: true and false, among which true is used to indicate that the corresponding self-check task is executed successfully, that is, it indicates that the object to be checked by the self-check task is normal; false is used to indicate that the corresponding self-check task is not executed successfully, that is, it indicates that the object to be checked by the self-check task is abnormal.
[0059] Specifically, the execution result is input into a preset expression engine for processing to obtain a task self-check result corresponding to the execution result.
[0060] It should be noted that this embodiment obtains the expected value of the self-check task and the server IP information, generates a task configuration based on the expected value of the self-check task; processes the server IP information and the task configuration based on a preset self-check task protocol format to obtain a self-check task; sends the self-check task to the server corresponding to the server IP information to execute and obtain an execution result; and processes the execution result based on a preset expression engine to obtain a task self-check result. Through the above implementation, in the process of self-checking the online environment, developers do not need to check the configuration of the online environment, the self-check process does not need to rely on the front-end process / front-end system, etc., and development / operation and maintenance personnel do not need to consider opening firewall policies. Self-check personnel only need to send the expected value of the self-check task and the server IP information to realize the automatic inspection of the online environment, which is convenient for reducing the interruption rate of the software online environment inspection.
[0061] Embodiment 2
[0062] A method for self-checking an online environment is provided in Embodiment 2 of the present application. The method optimizes the "generating a task configuration based on the expected value of the self-checking task" in Embodiment 1. It should be noted that for the parts not described in detail in this embodiment, reference may be made to the descriptions of other embodiments. The method includes:
[0063] S211. Obtain the expected value of the self-check task and the server IP information.
[0064] S212: Generate a task configuration based on the expected value of the self-check task and the operation and maintenance command corresponding to the expected value of the self-check task and a comparison symbol.
[0065] Among them, illustratively, as shown in the following table, each expected value of the self-check task has a corresponding operation and maintenance command and comparison symbol;
[0066]
[0067]
[0068] Specifically, taking the expected value of the self-check task "appuser1" as an example, after obtaining the appuser1, further determine the operation and maintenance command "cat / username" and the comparison symbol "=" corresponding to the expected value of the self-check task "appuser1", and then determine the task configuration in the corresponding json format according to the expected value of the self-check task and the operation and maintenance command corresponding to the expected value of the self-check task and the comparison symbol. For example, the task configuration is as follows:
[0069] {
[0070] jobId:1,
[0071] jobName: "Check whether the user name of the production environment machine exists"
[0072] shellCommand:”cat / username”,
[0073] operator:”=”
[0074] expectValue:”appuser1”
[0075] }.
[0076] S220 , processing the server IP information and the task configuration based on a preset self-check task protocol format to obtain a self-check task.
[0077] S230: Send the self-check task to the server corresponding to the server IP information to execute and obtain an execution result.
[0078] S240: Process the execution result based on a preset expression engine to obtain a task self-check result.
[0079] Embodiment 3
[0080] A method for self-checking an online environment is provided in Embodiment 3 of the present application. The method optimizes the "processing the server IP information and the task configuration based on a preset self-checking task protocol format to obtain a self-checking task" in Embodiment 2; it should be noted that for the parts not described in detail in this embodiment, reference may be made to the descriptions of other embodiments. The method includes:
[0081] S311. Obtain the expected value of the self-check task and the server IP information.
[0082] S312: Generate a task configuration based on the expected value of the self-check task and the operation and maintenance command corresponding to the expected value of the self-check task and a comparison symbol.
[0083] S321, converting the task configuration into an original expression.
[0084] The original expression is a simplified form of the task configuration. For example, the task configuration is:
[0085] {
[0086] jobId:1,
[0087] jobName: "Check whether the user name of the production environment machine exists"
[0088] shellCommand:”cat / username”,
[0089] operator:”=”
[0090] expectValue:”appuser1”
[0091] };
[0092] The original expression obtained by converting the task configuration is:
[0093] shellExecute("cat / username")="appuser1";
[0094] Among them, shellExecute represents the executor of the self-check task.
[0095] S322. Assemble the server IP information, the operation and maintenance command in the original expression, the comparison operator, and the expected value of the self-check task based on a preset self-check task protocol format to obtain a self-check task.
[0096] in,
[0097] Among them, the original expression also includes: operation and maintenance commands, comparison operators and expected values of self-test tasks. As shown in the above original expression, the operation and maintenance command is "cat / username", the comparison operator is "=", and the expected value of the self-test task is "appuser1"; the self-test task is assembled according to the preset self-test task protocol format, and the self-test task includes: server IP information, operation and maintenance commands, comparison operators and expected values of self-test tasks.
[0098] Specifically, the server IP information, operation and maintenance commands, comparison symbols, and expected values of the self-checking tasks are assembled according to the preset self-checking task protocol format, so as to obtain the corresponding self-checking tasks.
[0099] S330: Send the self-check task to the server corresponding to the server IP information to execute and obtain an execution result.
[0100] S340: Process the execution result based on a preset expression engine to obtain a task self-check result.
[0101] Embodiment 4
[0102] A method for self-checking an online environment is provided in Embodiment 4 of the present application. The method optimizes the “self-checking task” in Embodiment 3. It should be noted that for the parts not described in detail in this embodiment, reference may be made to the descriptions of other embodiments. The method includes:
[0103] S411. Obtain the expected value of the self-check task and the server IP information.
[0104] S412: Generate a task configuration based on the expected value of the self-check task and the operation and maintenance command corresponding to the expected value of the self-check task and a comparison symbol.
[0105] S420, assembling the server IP information, the operation and maintenance command in the task configuration, the comparison operator, and the expected value of the self-check task based on a preset self-check task protocol format to obtain a self-check task.
[0106] Wherein, the self-check task also includes: a scheduled time and a task name.
[0107] It should be noted that in order to facilitate the setting of the execution time of the self-check task, a timing time is also assembled in the self-check task according to the preset self-check task protocol format; in order to clearly indicate the self-check task, a task name is also assembled in the self-check task according to the preset self-check task protocol format.
[0108] For example, a self-check task provided in this embodiment is: preCheck: / / server IP information / command (operation and maintenance command) operator (comparison operator) expectValue (self-check task expected value)? schedule = scheduled time & name = task name.
[0109] S430: Send the self-check task to the server corresponding to the server IP information to execute and obtain an execution result.
[0110] S440: Process the execution result based on a preset expression engine to obtain a task self-check result.
[0111] Embodiment 5
[0112] A method for self-checking an online environment provided in Embodiment 5 of the present application optimizes the steps after "processing the server IP information and the task configuration based on a preset self-checking task protocol format to obtain a self-checking task" in Embodiment 1; it should be noted that for the parts not described in detail in this embodiment, reference may be made to the descriptions of other embodiments, and the method includes:
[0113] S510: Obtain an expected value of a self-check task and server IP information, and generate a task configuration based on the expected value of the self-check task.
[0114] S520: Process the server IP information and the task configuration based on a preset self-check task protocol format to obtain a self-check task.
[0115] S530: Send the self-check task to the server corresponding to the server IP information to execute and obtain an execution result.
[0116] S540: Process the execution result based on a preset expression engine to obtain a task self-check result.
[0117] S550 , in response to the server IP information corresponding to multiple servers, the self-check task is distributed to each of the servers based on a preset task batch execution framework for execution respectively to obtain execution results corresponding to each of the servers.
[0118] It should be noted that in some cases, there may be multiple servers with an online environment. In order to ensure the efficiency of the online environment self-inspection, each server needs to execute the corresponding self-inspection task at the same time; the preset task batch execution framework is used to synchronously distribute the self-inspection tasks generated by step S520 to each server corresponding to the server IP information.
[0119] Specifically, determine whether the server IP information corresponds to multiple servers. If so, the self-check tasks corresponding to each server will be distributed to the corresponding servers at the same time through the task batch execution framework, so that each server can realize asynchronous execution of the self-check tasks, thereby improving the efficiency of the online environment self-check.
[0120] S560: Process the execution results respectively based on a preset expression engine to obtain task self-check results corresponding to the execution results.
[0121] Specifically, the expression engine processes the execution results returned by each server respectively, and processes each execution result into a corresponding task self-check result.
[0122] Embodiment 6
[0123] A method for self-checking an online environment is provided in Embodiment 6 of the present application. The method optimizes the method of “distributing the self-checking task to each server based on a preset task batch execution framework and executing the task separately to obtain execution results corresponding to each server” in Embodiment 5. It should be noted that, for the part not described in detail in this embodiment, reference can be made to the description of other embodiments. The method includes:
[0124] S610: Obtain an expected value of a self-check task and server IP information, and generate a task configuration based on the expected value of the self-check task.
[0125] S620: Process the server IP information and the task configuration based on a preset self-check task protocol format to obtain a self-check task.
[0126] S630: Send the self-check task to the server corresponding to the server IP information to execute and obtain an execution result.
[0127] S640: Process the execution result based on a preset expression engine to obtain a task self-check result.
[0128] S651, in response to the server IP information corresponding to multiple servers.
[0129] S652: The control node in the preset task batch execution framework receives the self-check task, and distributes the self-check task to each of the servers for execution respectively, to obtain execution results corresponding to each of the servers.
[0130] It should be noted that a control node is provided in the task batch execution framework, and the control node is used to receive the self-checking tasks corresponding to each server and send the self-checking tasks to the corresponding server, thereby realizing the distribution of the self-checking tasks.
[0131] Specifically, the control node in the task batch execution framework receives the self-check tasks corresponding to each server, and sends the self-check tasks to the corresponding servers, so that each server executes the corresponding self-check tasks respectively, and outputs the execution results corresponding to each self-check task.
[0132] S660: Process the execution results respectively based on a preset expression engine to obtain task self-check results corresponding to the execution results.
[0133] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0134] Embodiment 7
[0135] Based on the same inventive concept, this embodiment also provides an online environment self-checking device for implementing the online environment self-checking method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more online environment self-checking device embodiments provided below can refer to the limitations of the online environment self-checking method above, and will not be repeated here.
[0136] In this embodiment, Figure 2 As shown, an online environment self-checking device is provided, comprising:
[0137] A configuration generation module is used to obtain the expected value of the self-check task and the server IP information, and generate a task configuration based on the expected value of the self-check task;
[0138] A task generation module, used for processing the server IP information and the task configuration based on a preset self-check task protocol format to obtain a self-check task;
[0139] A task execution module, used for sending the self-check task to the server corresponding to the server IP information to execute and obtain an execution result;
[0140] The result feedback module is used to process the execution result based on a preset expression engine to obtain a task self-check result.
[0141] Each module in the above-mentioned online environment self-checking device can be implemented in whole or in part by software, hardware and a combination thereof. Each of 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 in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0142] It should be noted that this embodiment obtains the expected value of the self-check task and the server IP information, generates a task configuration based on the expected value of the self-check task; processes the server IP information and the task configuration based on a preset self-check task protocol format to obtain a self-check task; sends the self-check task to the server corresponding to the server IP information to execute and obtain an execution result; and processes the execution result based on a preset expression engine to obtain a task self-check result. Through the above implementation, in the process of self-checking the online environment, developers do not need to check the configuration of the online environment, the self-check process does not need to rely on the front-end process / front-end system, etc., and development / operation and maintenance personnel do not need to consider opening firewall policies. Self-check personnel only need to send the expected value of the self-check task and the server IP information to realize the automatic inspection of the online environment, which is convenient for reducing the interruption rate of the software online environment inspection.
[0143] In one embodiment, in terms of generating a task configuration based on the expected value of the self-check task, the configuration generation module is specifically used to:
[0144] A task configuration is generated based on the expected value of the self-check task and the operation and maintenance command corresponding to the expected value of the self-check task and the comparison symbol.
[0145] In one embodiment, in terms of obtaining the self-check task by processing the server IP information and the task configuration based on a preset self-check task protocol format, the task generation module is specifically used to:
[0146] Converting the task configuration into a primitive expression;
[0147] The server IP information and the operation and maintenance command, the comparison operator and the expected value of the self-check task in the original expression are assembled based on a preset self-check task protocol format to obtain a self-check task.
[0148] In one embodiment, the above-mentioned online environment self-checking device further includes:
[0149] A multi-server execution module, for responding to the server IP information corresponding to multiple servers, distributing the self-check task to each of the servers based on a preset task batch execution framework for execution to obtain execution results corresponding to each of the servers;
[0150] The result processing module is used to process each of the execution results based on a preset expression engine to obtain a task self-check result corresponding to each of the execution results.
[0151] In one embodiment, in terms of distributing the self-checking tasks to the servers for execution based on a preset task batch execution framework to obtain execution results corresponding to each server, the multi-server execution module is specifically used to:
[0152] The control node in the preset task batch execution framework receives the self-check task, and distributes the self-check task to each of the servers for execution respectively, so as to obtain the execution results corresponding to each of the servers one by one.
[0153] Embodiment 8
[0154] In this embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 3 As shown. The computer device includes a processor, a memory and a network interface 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, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. 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 online environment self-check method is implemented.
[0155] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present disclosure, and does not constitute a limitation on the computer device to which the scheme of the present disclosure 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.
[0156] Embodiment 9
[0157] In this embodiment, a computer readable storage medium is provided. Figure 4 As shown, a computer program is stored thereon, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0158] Embodiment 10
[0159] In this embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0160] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0161] 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 the memory, database or other medium used in the embodiments provided by the present disclosure can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided by the present disclosure may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processor involved in each embodiment provided by the present disclosure may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited thereto.
[0162] The technical features of the above embodiments may be arbitrarily combined. 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.
[0163] The above-described embodiments only express several implementation methods of the present disclosure, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present disclosure, and these all belong to the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the attached claims.
Claims
1. A method for self-checking an online environment, characterized in that: include: Obtaining the expected value of the self-check task and the server IP information, and generating a task configuration based on the expected value of the self-check task; Processing the server IP information and the task configuration based on a preset self-check task protocol format to obtain a self-check task; Sending the self-check task to the server corresponding to the server IP information to execute and obtain the execution result; The execution result is processed based on a preset expression engine to obtain a task self-check result.
2. The method according to claim 1, characterized in that The generating of the task configuration based on the expected value of the self-check task includes: A task configuration is generated based on the expected value of the self-check task and the operation and maintenance command corresponding to the expected value of the self-check task and the comparison symbol.
3. The method according to claim 2, characterized in that The step of processing the server IP information and the task configuration based on a preset self-check task protocol format to obtain a self-check task includes: Converting the task configuration into a primitive expression; The server IP information and the operation and maintenance command, the comparison operator and the expected value of the self-check task in the original expression are assembled based on a preset self-check task protocol format to obtain a self-check task.
4. The method according to claim 3, characterized in that The self-check task also includes: a scheduled time and a task name.
5. The method according to claim 1, characterized in that After the self-check task is obtained by processing the server IP information and the task configuration based on the preset self-check task protocol format, the method further includes: In response to the server IP information corresponding to multiple servers, the self-check task is distributed to each of the servers based on a preset task batch execution framework for execution respectively to obtain execution results corresponding to each of the servers one by one; Based on the preset expression engine, each of the execution results is processed separately to obtain a task self-check result corresponding to each of the execution results.
6. The method according to claim 5, characterized in that The self-checking task is distributed to each of the servers based on the preset task batch execution framework for execution to obtain corresponding execution results of each of the servers, including: The control node in the preset task batch execution framework receives the self-check task, and distributes the self-check task to each of the servers for execution respectively, so as to obtain the execution results corresponding to each of the servers one by one.
7. An online environment self-checking device, characterized in that: The device comprises: A configuration generation module is used to obtain the expected value of the self-check task and the server IP information, and generate a task configuration based on the expected value of the self-check task; A task generation module, used for processing the server IP information and the task configuration based on a preset self-check task protocol format to obtain a self-check task; A task execution module, used for sending the self-check task to the server corresponding to the server IP information to execute and obtain an execution result; The result feedback module is used to process the execution result based on a preset expression engine to obtain a task self-check result.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.