Automatic inspection method and device, electronic equipment and computer readable medium

By receiving server information to generate grouping strategies and calling script generation interfaces, the problems of low efficiency and poor quality in inspection script development have been solved, and efficient inspection has been achieved in various server environments.

CN117152861BActive Publication Date: 2026-06-09CCB FINTECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CCB FINTECH CO LTD
Filing Date
2023-09-12
Publication Date
2026-06-09

Smart Images

  • Figure CN117152861B_ABST
    Figure CN117152861B_ABST
Patent Text Reader

Abstract

This invention discloses an automatic inspection method, apparatus, electronic device, and computer-readable medium, relating to the field of automatic programming technology. One specific embodiment of the method includes: receiving address information of various servers submitted by a client; distributing a server information collection program to each server so that the program runs on each server, thereby receiving server information returned by each server; determining various grouping strategies and their corresponding grouping results based on the server information; distributing the grouping strategies and their corresponding grouping results to the client; receiving the target grouping result and keywords submitted by the client; using the target grouping result and keywords as input parameters to call a script generation interface, thereby receiving the inspection script returned by the script generation interface. This embodiment can solve the technical problems of low development efficiency and insufficient quality of inspection scripts.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automatic programming technology, and in particular to an automatic inspection method, apparatus, electronic device, and computer-readable medium. Background Technology

[0002] Currently, the inspection solution involves manual inspection through the development of inspection scripts. These scripts need to be adapted to different manufacturers, system architectures, and operating systems. For situations with a wide variety of manufacturers, system architectures, and operating systems, different inspection scripts need to be developed for each server, resulting in low development efficiency. Moreover, manual development of inspection scripts is prone to errors, leading to insufficient quality of the inspection scripts. Summary of the Invention

[0003] In view of this, embodiments of the present invention provide an automatic inspection method, apparatus, electronic device, and computer-readable medium to solve the technical problems of low efficiency and insufficient quality in inspection script development.

[0004] To achieve the above objectives, according to one aspect of the present invention, an automatic inspection method is provided, comprising:

[0005] The system receives the address information of each server submitted by the client, and distributes the server information collection program to each server so that the server information collection program runs on each server and receives the server information returned by each server.

[0006] Based on the server information returned by each server, determine each grouping strategy and the corresponding grouping result of each grouping strategy, and send each grouping strategy and the corresponding grouping result of each grouping strategy to the client;

[0007] The system receives the target grouping result and keywords submitted by the client, uses the target grouping result and keywords as input parameters, calls the script generation interface, and then receives the inspection script returned by the script generation interface.

[0008] The inspection script is sent to each target server in the target group result so that the inspection script runs on each target server and receives the inspection results returned by each target server.

[0009] Optionally, each grouping strategy and the corresponding grouping result are determined based on the server information returned by each server, including:

[0010] Based on the server information returned by each server, determine each grouping element;

[0011] The various grouping elements are combined to obtain various grouping strategies;

[0012] The servers are grouped according to the respective grouping strategies to obtain the grouping results corresponding to each grouping strategy.

[0013] Optionally, the server information includes at least one of the following:

[0014] Manufacturer name, system architecture name, operating system name and version number, server name.

[0015] Optionally, the inspection script is distributed to each target server in the target grouping results, including:

[0016] The inspection script was tested.

[0017] If the test passes, the inspection script will be sent to each target server in the target group result.

[0018] If the test results are different, a prompt to modify the keywords is sent to the client.

[0019] Optionally, the inspection script is tested, including:

[0020] The inspection script is sent to the client.

[0021] Receive the script test request and test server address information submitted by the client; wherein, the test server is any one of the target servers in the target group results;

[0022] The inspection script is sent to the test server so that the inspection script runs on the test server and receives the inspection results returned by the target server.

[0023] Determine whether the inspection results are normal.

[0024] Optionally, the inspection script is distributed to each target server in the target grouping results, so that the inspection script runs on each target server, thereby receiving the inspection results returned by each target server, including:

[0025] Configure the execution strategy of the inspection script, the execution strategy including execution time;

[0026] Save the inspection script and the execution strategy to the database;

[0027] In response to the arrival of the execution time of the inspection script, the inspection script is retrieved from the database and distributed to each target server in the target grouping result, so that the inspection script runs on each target server and the inspection results returned by each target server are received.

[0028] In addition, according to another aspect of the present invention, an automatic inspection device is provided, comprising:

[0029] The acquisition module is used to receive the address information of each server submitted by the client, and to send the server information acquisition program to each server so that the server information acquisition program runs on each server and receives the server information returned by each server.

[0030] The grouping module is used to determine each grouping strategy and the grouping result corresponding to each grouping strategy based on the server information returned by each server, and to send each grouping strategy and the grouping result corresponding to each grouping strategy to the client.

[0031] The calling module is used to receive the target grouping result and keywords submitted by the client, and use the target grouping result and keywords as input parameters to call the script generation interface, thereby receiving the inspection script returned by the script generation interface;

[0032] The inspection module is used to distribute the inspection script to each target server in the target grouping result, so that the inspection script runs on each target server and receives the inspection results returned by each target server.

[0033] Optionally, the grouping module is further configured to:

[0034] Based on the server information returned by each server, determine each grouping element;

[0035] The various grouping elements are combined to obtain various grouping strategies;

[0036] The servers are grouped according to the respective grouping strategies to obtain the grouping results corresponding to each grouping strategy.

[0037] Optionally, the server information includes at least one of the following:

[0038] Manufacturer name, system architecture name, operating system name and version number, server name.

[0039] Optionally, the inspection module is further used for:

[0040] The inspection script was tested.

[0041] If the test passes, the inspection script will be sent to each target server in the target group result.

[0042] If the test results are different, a prompt to modify the keywords is sent to the client.

[0043] Optionally, the inspection module is further used for:

[0044] The inspection script is sent to the client.

[0045] Receive the script test request and test server address information submitted by the client; wherein, the test server is any one of the target servers in the target group results;

[0046] The inspection script is sent to the test server so that the inspection script runs on the test server and receives the inspection results returned by the target server.

[0047] Determine whether the inspection results are normal.

[0048] Optionally, the inspection module is further used for:

[0049] Configure the execution strategy of the inspection script, the execution strategy including execution time;

[0050] Save the inspection script and the execution strategy to the database;

[0051] In response to the arrival of the execution time of the inspection script, the inspection script is retrieved from the database and distributed to each target server in the target grouping result, so that the inspection script runs on each target server and the inspection results returned by each target server are received.

[0052] According to another aspect of the present invention, an electronic device is also provided, comprising:

[0053] One or more processors;

[0054] Storage device for storing one or more programs.

[0055] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any of the above embodiments.

[0056] According to another aspect of the present invention, a computer-readable medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the methods described in any of the above embodiments.

[0057] According to another aspect of the present invention, a computer program product is also provided, including a computer program that, when executed by a processor, implements the methods described in any of the above embodiments.

[0058] One embodiment of the above invention has the following advantages or beneficial effects: By employing a technical method that determines each grouping strategy and its corresponding grouping result based on server information returned by each server, sends each grouping strategy and its corresponding grouping result to the client, receives the target grouping result and keywords submitted by the client, uses the target grouping result and keywords as input parameters to call the script generation interface, and thus receives the inspection script returned by the script generation interface, the technical problems of low development efficiency and insufficient quality of inspection scripts in the prior art are overcome. This embodiment of the invention groups servers based on server information and automatically generates inspection scripts suitable for server operation based on the grouping results and keywords, which not only improves the development efficiency of inspection scripts but also improves the quality of inspection scripts.

[0059] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description

[0060] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:

[0061] Figure 1 This is a flowchart of an automatic inspection method according to an embodiment of the present invention;

[0062] Figure 2 This is a flowchart of an automatic inspection method according to a possible embodiment of the present invention;

[0063] Figure 3 This is a flowchart of an automatic inspection method according to another applicable embodiment of the present invention;

[0064] Figure 4 This is a flowchart of an automatic inspection method according to another possible embodiment of the present invention;

[0065] Figure 5 This is a schematic diagram of an automatic inspection device according to an embodiment of the present invention;

[0066] Figure 6 This is an exemplary system architecture diagram in which embodiments of the present invention can be applied;

[0067] Figure 7 This is a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers of the present invention. Detailed Implementation

[0068] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0069] It should be noted that the collection, analysis, use, transmission, and storage of user personal information involved in the technical solution of this invention all comply with relevant laws and regulations, are used for legitimate and reasonable purposes, and are not shared, disclosed, or sold outside of these legitimate uses, and are subject to supervision and management by regulatory authorities. Necessary measures should be taken to prevent unauthorized access to such personal information data, ensure that personnel authorized to access personal information data comply with relevant laws and regulations, and ensure the security of user personal information. Once this user personal information data is no longer needed, the risk should be minimized by restricting or even prohibiting data collection and / or deleting the data.

[0070] When applicable, including in certain relevant applications, data deidentification is used to protect user privacy, such as by removing specific identifiers (e.g., name, age, account number, date of birth, etc.), controlling the amount or specificity of stored data, controlling how data is stored, and / or other methods of deidentification.

[0071] Figure 1 This is a flowchart of an automatic inspection method according to an embodiment of the present invention. As one embodiment of the present invention, such as... Figure 1 As shown, the automatic inspection method may include:

[0072] Step 101: Receive the address information of each server submitted by the client, and send the server information collection program to each server so that the server information collection program runs on each server and receives the server information returned by each server.

[0073] Users can input the address information of each server on the client page, i.e., the address information of each server that needs to be inspected. The client sends the address information of each server entered by the user to the server. After receiving the address information of each server, the server sends the server information collection program to these servers via the OpenSSH protocol. After receiving the server information collection program sent by the server, these servers automatically run the server information collection program, collect the server information of each server, and finally return the collected server information to the server in a JSON file.

[0074] Optionally, the server information includes at least one of the following: manufacturer name, system architecture name (arm architecture server or x86 architecture server), operating system name and version number (e.g., Windows 7, CentOS 7, Kylin V10, SUSESP12, etc.), and server name (the server name can determine what function the server is, such as web server or storage server).

[0075] Step 102: Determine each grouping strategy and the corresponding grouping result based on the server information returned by each server, and send each grouping strategy and the corresponding grouping result to the client.

[0076] The server uses Java Jackson to parse the JSON files returned by each server to obtain the server information of each server. Then, based on the server information of each server, it determines each grouping strategy and the corresponding grouping result of each grouping strategy. Finally, it sends each grouping strategy and the corresponding grouping result to the client.

[0077] Optionally, determining each grouping strategy and the corresponding grouping result based on the server information returned by each server includes: determining each grouping element based on the server information returned by each server; combining the grouping elements to obtain each grouping strategy; and grouping the servers according to the grouping strategies to obtain the grouping result corresponding to each grouping strategy.

[0078] For example, if the server information returned by each server includes the vendor name and system architecture name, then the grouping elements are vendor name and system architecture name. These two grouping elements are then combined to obtain various grouping strategies (vendor name, vendor name_system architecture name, system architecture name). Next, the servers are grouped according to these grouping strategies to obtain the grouping results corresponding to each strategy. For example, grouping result 1: Vendor A; grouping result 2: Vendor B; grouping result 3: Vendor A_x86 architecture server; grouping result 4: Vendor A_arm architecture server; grouping result 5: Vendor B_x86 architecture server; grouping result 6: Vendor B_arm architecture server; grouping result 7: x86 architecture server; grouping result 8: arm architecture server.

[0079] For example, if the server information returned by each server includes the system architecture name, operating system name, and version number, then the grouping elements are the system architecture name, operating system name, and version number. These two grouping elements are then combined to obtain various grouping strategies (system architecture name, system architecture name_operating system name and version number, operating system name and version number). Next, the servers are grouped according to these grouping strategies to obtain the grouping results corresponding to each strategy. For example, grouping result 1: x86 architecture server; grouping result 2: ARM architecture server; grouping result 3: x86 architecture server_centos7; grouping result 4: x86_windows7; grouping result 5: ARM architecture server_centos7; grouping result 6: ARM architecture server_window7; grouping result 7: centos7; grouping result 8: windows7.

[0080] For example, if the server information returned by each server includes the system architecture name, operating system name and version number, and server name, then the grouping elements are the system architecture name, operating system name and version number, and server name. These three grouping elements are then combined to obtain various grouping strategies (system architecture name, system architecture name_operating system name and version number, operating system name and version number, system architecture name_operating system name and version number_server name, system architecture name_server name, operating system name and version number_server name). Then, the servers are grouped according to these grouping strategies to obtain the grouping results corresponding to each grouping strategy. For example, group result 1: x86 architecture server; group result 2: ARM architecture server; group result 3: x86 architecture server_CentOS7; group result 4: x86_Windows7; group result 5: ARM architecture server_CentOS7; group result 6: ARM architecture server_Windows7; group result 7: CentOS7; group result 8: Windows7; group result 9: ARM architecture server_Windows7_Storage server; group result 10: ARM architecture server_CentOS7_Storage server; group result 11: ARM architecture server_Storage server; group result 12: x86 architecture server_Storage server; group result 13: Windows7_Storage server; group result 14: CentOS7_Storage server, etc., and will not be elaborated further.

[0081] It should be noted that the above grouping methods allow for flexible grouping of servers, and the grouping methods can be freely combined.

[0082] Step 103: Receive the target grouping result and keywords submitted by the client, use the target grouping result and keywords as input parameters, call the script generation interface, and then receive the inspection script returned by the script generation interface.

[0083] After the server sends the various grouping strategies and their corresponding grouping results to the client, the user can view these strategies and results on the client page. Users can select a target group or enter keywords on the client page.

[0084] The server receives the target group results and keywords sent by the client, and then uses the target group results and keywords as input parameters to call the script generation interface (such as the script generation interface provided by Chatgpt), thereby receiving the inspection scripts returned by the script generation interface that are suitable for running on each server in the group.

[0085] For example, if a user selects the x86 architecture server_centos7 group and the keyword is "CPU utilization script", then by calling the script generation interface, they can receive the CPU utilization monitoring script for the Centos7 operating system of the x86 architecture server returned by the interface; or, for example, if a user selects the vendor A_x86 architecture server_centos7 group and the keyword is "CPU utilization script", then by calling the script generation interface, they can receive the CPU utilization monitoring script for the Centos7 operating system of the x86 architecture server of vendor A returned by the interface.

[0086] You can also specify the script's language in the keywords, such as Python or shell scripting. It's worth noting that the more accurate the keyword information, the more complete the script returned by the API.

[0087] Step 104: The inspection script is sent to each target server in the target group result so that the inspection script runs on each target server and the inspection results returned by each target server are received.

[0088] After obtaining the inspection scripts suitable for each server in the group, the server sends the inspection scripts to each target server in the target group result. After receiving the inspection scripts sent by the server, the target server automatically runs the inspection scripts and returns the collected inspection results to the server.

[0089] Optionally, sending the inspection script to the target server matching the grouping result includes: testing the inspection script; if the test passes, sending the inspection script to each target server in the target grouping result; if the test results are different, sending a prompt to the client to modify the keywords. To improve the quality of the inspection script, before sending the inspection script to each target server in the target grouping result, the inspection script is tested first. If the test passes, the inspection script is sent to each target server in the target grouping result. If the test results are different, a prompt to modify the keywords is sent to the client. The user can modify the keywords, and the server executes step 103 again. That is, after receiving the new keywords submitted by the client, the server uses the target grouping result and the new keywords as input parameters to call the script generation interface, thereby receiving the inspection script returned by the script generation interface. It should be noted that testing the newly generated inspection script until the test passes before sending the inspection script to each target server in the target grouping result ensures the quality of the inspection script.

[0090] Based on the various embodiments described above, it can be seen that the embodiments of the present invention determine each grouping strategy and the corresponding grouping result based on the server information returned by each server, send each grouping strategy and the corresponding grouping result to the client, receive the target grouping result and keyword submitted by the client, use the target grouping result and keyword as input parameters to call the script generation interface, and thus receive the inspection script returned by the script generation interface. This technical means solves the technical problems of low development efficiency and insufficient quality of inspection scripts in the prior art. The embodiments of the present invention group servers according to server information and automatically generate inspection scripts suitable for server operation based on the grouping results and keywords, which not only improves the development efficiency of inspection scripts but also improves the quality of inspection scripts.

[0091] Figure 2 This is a flowchart of an automatic inspection method according to a possible embodiment of the present invention. As another embodiment of the present invention, such as... Figure 2 As shown, the automatic inspection method may include:

[0092] Step 201: Receive the address information of each server submitted by the client, and send the server information collection program to each server so that the server information collection program runs on each server and receives the server information returned by each server.

[0093] Step 202: Determine each grouping strategy and the corresponding grouping result based on the server information returned by each server, and send each grouping strategy and the corresponding grouping result to the client.

[0094] Step 203: Receive the target grouping result and keywords submitted by the client, use the target grouping result and keywords as input parameters, call the script generation interface, and then receive the inspection script returned by the script generation interface.

[0095] Step 204: Configure the execution strategy of the inspection script, the execution strategy including execution time.

[0096] Step 205: Save the inspection script and the execution strategy to the database.

[0097] Step 206: In response to the arrival of the execution time of the inspection script, retrieve the inspection script from the database and distribute the inspection script to each target server in the target grouping result, so that the inspection script runs on each target server and receives the inspection results returned by each target server.

[0098] The execution strategy for the inspection script can be configured as needed. This strategy includes the execution method and execution time. If the execution method is automatic, the execution time needs to be configured. Specifically, it can be executed via a scheduled task, with the execution time selected through the scheduled task settings. If it is executed manually, the execution time can be left blank. The inspection script and execution strategy are saved to the database to prevent unauthorized modification.

[0099] If the execution time of the inspection script is reached, the inspection script is retrieved from the database and distributed to each target server in the target group results. This allows the inspection script to run on each target server, thereby receiving the inspection results returned by each target server. This step can be performed by the Ansible program. Ansible is an automated operation and maintenance tool developed based on Python. It only requires installation on the server side, eliminating the need to install client programs on each client. It remotely manages client servers via OpenSSH and uses modules to achieve batch data configuration, batch device deployment, and batch command execution.

[0100] During execution, the inspection script checks for any anomalies in the inspection items. If an anomaly is found, it determines whether manual intervention or automatic processing is required. If the program completes its processing, it will re-check the inspection item until no anomalies are found. The generated inspection report is stored in the database for easy historical review. The generated inspection report can be shared or downloaded to other personnel.

[0101] Furthermore, the specific implementation details of the automatic inspection method in one of the reference embodiments of the present invention have been described in detail in the automatic inspection method described above, so the details will not be repeated here.

[0102] Figure 3 This is a flowchart of an automatic inspection method according to another possible embodiment of the present invention. As another embodiment of the present invention, such as... Figure 3 As shown, the automatic inspection method may include:

[0103] Step 301: Receive the address information of each server submitted by the client, and send the server information collection program to each server so that the server information collection program runs on each server and receives the server information returned by each server.

[0104] Step 302: Determine each grouping element based on the server information returned by each server.

[0105] Step 303: Combine the various grouping elements to obtain various grouping strategies.

[0106] Step 304: Group the servers according to the respective grouping strategies to obtain the grouping results corresponding to each grouping strategy.

[0107] Step 305: Send each grouping strategy and the corresponding grouping results of each grouping strategy to the client.

[0108] Step 306: Receive the target grouping result and keywords submitted by the client, use the target grouping result and keywords as input parameters, call the script generation interface, and then receive the inspection script returned by the script generation interface.

[0109] Step 307: The inspection script is sent to each target server in the target grouping result so that the inspection script runs on each target server and the inspection results returned by each target server are received.

[0110] In addition, the specific implementation details of the automatic inspection method in another reference embodiment of the present invention have been described in detail in the automatic inspection method described above, so the details will not be repeated here.

[0111] Figure 4 This is a flowchart of an automatic inspection method according to another possible embodiment of the present invention. As another embodiment of the present invention, such as... Figure 4 As shown, the automatic inspection method may include:

[0112] Step 401: Receive the address information of each server submitted by the client, and send the server information collection program to each server so that the server information collection program runs on each server and receives the server information returned by each server.

[0113] Step 402: Determine each grouping strategy and the corresponding grouping result based on the server information returned by each server, and send each grouping strategy and the corresponding grouping result to the client.

[0114] Step 403: Receive the target grouping result and keywords submitted by the client, use the target grouping result and keywords as input parameters, call the script generation interface, and then receive the inspection script returned by the script generation interface.

[0115] Step 404: Send the inspection script to the client.

[0116] Step 405: Receive the script test request and test server address information submitted by the client; wherein the test server is any one of the target servers in the target group results.

[0117] Step 406: The inspection script is sent to the test server so that the inspection script runs on the test server and receives the inspection results returned by the target server.

[0118] Step 407: Determine whether the inspection result is normal; if yes, proceed to step 408; if no, proceed to step 409.

[0119] Step 408: The inspection script is sent to each target server in the target grouping result so that the inspection script runs on each target server and the inspection results returned by each target server are received.

[0120] Step 409: Send a prompt to the client to modify the keyword.

[0121] After generating the inspection script, it needs to be tested for accuracy. Users can select the server to be tested on the client page; this server can be any target server from the target group results. The server then sends the inspection script to the test server. Upon receiving the script, the test server automatically runs it and returns the collected inspection results to the server. The server then determines whether the inspection results are normal. If normal, the test passes; if abnormal, the test fails.

[0122] For example, if the user selects the CentOS7 group and enters the keyword "CPU utilization script", the API will return the inspection script as follows:

[0123]

[0124] After the test server runs the inspection script, if the returned information is "Current CPU utilization: xx%", it means the inspection script generated by the interface is valid, the test has passed, and batch inspection operations can be performed. If the returned information is "empty" or an error, the inspection script is abnormal and needs to be readjusted and regenerated. For example, it can be adjusted to "remove the 'wihle' statement from the CPU usage script," and the regenerated inspection script will look like this:

[0125]

[0126] Then, the test was performed, and the result returned was "Current CPU usage: 5.6%". Based on the returned result, it was determined to be normal, so the generated inspection script was normal and the test passed.

[0127] After the script test passes, the inspection script can be saved. You can add tags to the CPU inspection script obtained this time, such as: script to get CPU utilization of x86 architecture CentOS7. This way, when you use the CPU script again next time, you can directly retrieve it from the database.

[0128] Furthermore, the specific implementation details of the automatic inspection method in another reference embodiment of the present invention have been described in detail in the automatic inspection method described above, so the details will not be repeated here.

[0129] Figure 5 This is a schematic diagram of an automatic inspection device according to an embodiment of the present invention. Figure 5 As shown, the automatic inspection device 500 includes a data acquisition module 501, a grouping module 502, a calling module 503, and an inspection module 504. The data acquisition module 501 receives address information of various servers submitted by the client, distributes a server information acquisition program to each server, and runs the program on each server to receive server information returned by each server. The grouping module 502 determines various grouping strategies and corresponding grouping results based on the server information returned by each server, and distributes these strategies and results to the client. The calling module 503 receives the target grouping result and keywords submitted by the client, uses these as input parameters, calls a script generation interface, and receives the inspection script returned by the script generation interface. The inspection module 504 distributes the inspection script to each target server in the target grouping result, allowing the script to run on each target server and receive the inspection results returned by each target server.

[0130] Optionally, the grouping module 502 is further configured to:

[0131] Based on the server information returned by each server, determine each grouping element;

[0132] The various grouping elements are combined to obtain various grouping strategies;

[0133] The servers are grouped according to the respective grouping strategies to obtain the grouping results corresponding to each grouping strategy.

[0134] Optionally, the server information includes at least one of the following:

[0135] Manufacturer name, system architecture name, operating system name and version number, server name.

[0136] Optionally, the inspection module 504 is further configured to:

[0137] The inspection script was tested.

[0138] If the test passes, the inspection script will be sent to each target server in the target group result.

[0139] If the test results are different, a prompt to modify the keywords is sent to the client.

[0140] Optionally, the inspection module 504 is further configured to:

[0141] The inspection script is sent to the client.

[0142] Receive the script test request and test server address information submitted by the client; wherein, the test server is any one of the target servers in the target group results;

[0143] The inspection script is sent to the test server so that the inspection script runs on the test server and receives the inspection results returned by the target server.

[0144] Determine whether the inspection results are normal.

[0145] Optionally, the inspection module 504 is further configured to:

[0146] Configure the execution strategy of the inspection script, the execution strategy including execution time;

[0147] Save the inspection script and the execution strategy to the database;

[0148] In response to the arrival of the execution time of the inspection script, the inspection script is retrieved from the database and distributed to each target server in the target grouping result, so that the inspection script runs on each target server and the inspection results returned by each target server are received.

[0149] It should be noted that the specific implementation details of the automatic inspection device described in this invention have been described in detail in the automatic inspection method described above, so the details will not be repeated here.

[0150] Figure 6 An exemplary system architecture 600 is shown that can be applied to the automatic inspection method or automatic inspection device of the present invention.

[0151] like Figure 6As shown, system architecture 600 may include terminal devices 601, 602, and 603, a network 604, and a server 605. Network 604 serves as the medium for providing communication links between terminal devices 601, 602, and 603 and server 605. Network 604 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.

[0152] Users can use terminal devices 601, 602, and 603 to interact with server 605 via network 604 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 601, 602, and 603, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).

[0153] Terminal devices 601, 602, and 603 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0154] Server 605 can be a server that provides various services, such as a backend management server that supports shopping websites browsed by users using terminal devices 601, 602, and 603 (this is just an example). The backend management server can analyze and process data such as received item information query requests, and then feed the processing results back to the terminal devices.

[0155] It should be noted that the automatic inspection method provided in this embodiment of the invention is generally executed by server 605, and correspondingly, the automatic inspection device is generally installed in server 605.

[0156] It should be understood that Figure 6 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0157] The following is for reference. Figure 7 It shows a schematic diagram of the structure of a computer system 700 suitable for implementing a terminal device of the present invention. Figure 7 The terminal device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0158] like Figure 7As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 702 or programs loaded from storage section 708 into random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the system 700. The CPU 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0159] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.

[0160] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 711. When the computer program is executed by central processing unit (CPU) 701, it performs the functions defined above in the system of this invention.

[0161] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0162] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer programs according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0163] The modules described in the embodiments of the present invention can be implemented in software or hardware. The described modules can also be housed in a processor; for example, a processor can be described as including a data acquisition module, a grouping module, a calling module, and a patrol module. The names of these modules do not necessarily limit the functionality of the module itself.

[0164] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs, and when the one or more programs are executed by the device, the device implements the following method: receiving address information of various servers submitted by a client; distributing a server information collection program to the respective servers so that the server information collection program runs on the respective servers, thereby receiving server information returned by the respective servers; determining various grouping strategies and corresponding grouping results based on the server information returned by the respective servers; distributing the various grouping strategies and corresponding grouping results to the client; receiving the target grouping result and keywords submitted by the client; using the target grouping result and keywords as input parameters, calling a script generation interface, thereby receiving an inspection script returned by the script generation interface; distributing the inspection script to each target server in the target grouping result so that the inspection script runs on the respective target servers, thereby receiving the inspection results returned by the respective target servers.

[0165] In another aspect, embodiments of the present invention also provide a computer program product, including a computer program that, when executed by a processor, implements the methods described in any of the above embodiments.

[0166] According to the technical solution of the present invention, by employing the method of determining each grouping strategy and the corresponding grouping result based on the server information returned by each server, sending each grouping strategy and the corresponding grouping result to the client, receiving the target grouping result and keyword submitted by the client, and using the target grouping result and keyword as input parameters to call the script generation interface, thereby receiving the inspection script returned by the script generation interface, the technical problem of low development efficiency and insufficient quality of inspection scripts in the prior art is overcome. The present invention groupes servers according to server information and automatically generates inspection scripts suitable for server operation based on the grouping results and keywords, which not only improves the development efficiency of inspection scripts but also improves the quality of inspection scripts.

[0167] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. An automatic inspection method, characterized in that, include: The system receives the address information of each server to be inspected submitted by the client, and distributes the server information collection program to each server so that the server information collection program runs on each server, thereby receiving the server information returned by each server; the server information includes at least one of the following: manufacturer name, system architecture name, operating system name and version number, and server name; Based on the server information returned by each server, each grouping strategy and the corresponding grouping result are determined, and each grouping strategy and the corresponding grouping result are sent to the client so that the client's page displays each grouping strategy and the corresponding grouping result. The system receives the target grouping result and keywords submitted by the client, uses the target grouping result and keywords as input parameters, calls the script generation interface, and then receives the inspection script returned by the script generation interface. The inspection script is sent to each target server in the target group result so that the inspection script runs on each target server and receives the inspection results returned by each target server.

2. The method according to claim 1, characterized in that, Based on the server information returned by each server, determine each grouping strategy and the corresponding grouping result for each grouping strategy, including: Based on the server information returned by each server, determine each grouping element; The various grouping elements are combined to obtain various grouping strategies; The servers are grouped according to the respective grouping strategies to obtain the grouping results corresponding to each grouping strategy.

3. The method according to claim 1, characterized in that, The inspection script is distributed to each target server in the target grouping results, including: The inspection script was tested. If the test passes, the inspection script will be sent to each target server in the target group result. If the test results are different, a prompt to modify the keywords is sent to the client.

4. The method according to claim 3, characterized in that, The inspection script is tested, including: The inspection script is sent to the client. Receive the script test request and test server address information submitted by the client; wherein, the test server is any one of the target servers in the target group results; The inspection script is sent to the test server so that the inspection script runs on the test server and receives the inspection results returned by the target server. Determine whether the inspection results are normal.

5. The method according to claim 1, characterized in that, The inspection script is distributed to each target server in the target grouping results, so that the inspection script runs on each target server, thereby receiving the inspection results returned by each target server, including: Configure the execution strategy of the inspection script, the execution strategy including execution time; Save the inspection script and the execution strategy to the database; In response to the arrival of the execution time of the inspection script, the inspection script is retrieved from the database and distributed to each target server in the target grouping result, so that the inspection script runs on each target server and the inspection results returned by each target server are received.

6. An automatic inspection device, characterized in that, include: The data acquisition module is used to receive the address information of each server that needs to be inspected submitted by the client, and to distribute the server information acquisition program to each server so that the server information acquisition program runs on each server and receives the server information returned by each server; the server information includes at least one of the following: manufacturer name, system architecture name, operating system name and version number, and server name; The grouping module is used to determine each grouping strategy and the corresponding grouping result based on the server information returned by each server, and to send the grouping strategy and the corresponding grouping result to the client so that the client's page displays the grouping strategy and the corresponding grouping result. The calling module is used to receive the target grouping result and keywords submitted by the client, and use the target grouping result and keywords as input parameters to call the script generation interface, thereby receiving the inspection script returned by the script generation interface; The inspection module is used to distribute the inspection script to each target server in the target grouping result, so that the inspection script runs on each target server and receives the inspection results returned by each target server.

7. The apparatus according to claim 6, characterized in that, The grouping module is also used for: Based on the server information returned by each server, determine each grouping element; The various grouping elements are combined to obtain various grouping strategies; The servers are grouped according to the respective grouping strategies to obtain the grouping results corresponding to each grouping strategy.

8. The apparatus according to claim 6, characterized in that, The inspection module is also used for: The inspection script was tested. If the test passes, the inspection script will be sent to each target server in the target group result. If the test results are different, a prompt to modify the keywords is sent to the client.

9. The apparatus according to claim 8, characterized in that, The inspection module is also used for: The inspection script is sent to the client. Receive the script test request and test server address information submitted by the client; wherein, the test server is any one of the target servers in the target group results; The inspection script is sent to the test server so that the inspection script runs on the test server and receives the inspection results returned by the target server. Determine whether the inspection results are normal.

10. The apparatus according to claim 6, characterized in that, The inspection module is also used for: Configure the execution strategy of the inspection script, the execution strategy including execution time; Save the inspection script and the execution strategy to the database; In response to the arrival of the execution time of the inspection script, the inspection script is retrieved from the database and distributed to each target server in the target grouping result, so that the inspection script runs on each target server and the inspection results returned by each target server are received.

11. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-5.

12. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-5.

13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-5.