Server power supply safety processing method, system, equipment and medium

By using the main control unit, database and test analysis model in the server power supply protection device, the problem in the existing technology that it is difficult to analyze abnormalities when the power supply redundancy mode is lost is solved, real-time recording and rapid reproduction of power supply parameters are achieved, and the test time is reduced. Engineer workload and time.

CN118550776APending Publication Date: 2024-08-27INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410696530.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

The existing technology makes it difficult to determine the time and cause of failure when the server power redundancy mode is lost, and the data records are incomplete, making it difficult for test engineers to analyze power supply abnormalities and affecting business stability.

Method used

Provides a server power supply security processing method, including using a main control unit, database, test script and test analysis model in the power supply protection device, ensuring network connection by querying configuration parameters, improving test scripts, calling silent scripts, and detecting abnormality in security tests The test analysis model is called to process the target power data and logs to determine abnormal results.

Benefits of technology

It realizes real-time recording of power supply parameters, simplifies the analysis of test failure reasons, reduces the workload of test engineers, quickly reproduces problems, and improves test efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550776A
    Figure CN118550776A
Patent Text Reader

Abstract

The invention provides a server power supply safety processing method, system and device and a medium, and the method comprises the steps: responding to a test request initiated by a user, and querying a configuration parameter matched with the test request in a database; perfecting a test script according to the configuration parameters, and calling the perfected test script to perform a security test and obtain target power supply parameters recorded in the test process; and in response to a security test exception, calling a test analysis model to process the target power supply data and the recorded server power supply log to determine a target exception result so as to prompt a user to perform exception repair. Power supply parameters can be recorded in real time, secondary analysis of reasons of test failures is facilitated, meanwhile, data can be used for reproducing problems, and a test engineer can be helped to quickly reproduce a scene when the test fails.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of server technology, and in particular to a server power supply safety processing method, system, device and medium. Background Art

[0002] With the continuous development of the current Internet era, servers have higher and higher requirements for data security and system stability; therefore, in order to ensure the data security and system stability of the server, the server power supply needs to be very safe; once all the power supplies of the server fail, it will cause a complete collapse of the server's online functions, resulting in major failures such as loss of server data and server operation interruption, which will have an extremely adverse impact on business operations and user servers.

[0003] In order to avoid the risk of server downtime caused by power problems, it is necessary to conduct safety tests on the server power supply. In the current monitoring and testing of power supplies, the power supply redundancy mode is usually set before the test begins, and then a stress test or stability test is performed to simulate the customer's actual usage scenario. However, in the existing technical solutions, if the redundancy mode is lost, it is difficult for test engineers to determine the time and cause of the power redundancy failure, and the records of power supply data are not comprehensive, and some data is lost, which makes it difficult for test engineers to determine the cause of power supply abnormalities.

[0004] Therefore, there is an urgent need for a more comprehensive server power safety processing method, system, equipment and medium to solve the above technical problems. Summary of the invention

[0005] Based on this, it is necessary to provide a server power safety processing method, system, equipment and medium to solve the above technical problems.

[0006] In a first aspect, the present application provides a server power safety processing method, which is applied to a main control unit in a power supply protection device, wherein the power supply protection device further includes a database, a test script, and a test analysis model, wherein the method includes:

[0007] In response to a test request initiated by a user, querying the database for configuration parameters matching the test request;

[0008] Perfecting the test script according to the configuration parameters, and calling the perfected test script to perform safety testing and obtain target power supply parameters recorded during the test;

[0009] In response to a security test exception, a test analysis model is called to process the target power data and the recorded server power log to determine a target exception result to prompt a user to perform exception repair.

[0010] In some embodiments, in response to the security test exception, calling the test analysis model to process the target power data and the recorded server power log to determine the target exception result to prompt the user to perform exception repair includes:

[0011] According to a first association table containing associations between the test case numbers and abnormal results pre-stored in the database, querying one or more abnormal results corresponding to the test case numbers;

[0012] Calculate the correlation score between the abnormal log status and abnormal power supply parameters contained in the abnormal result and the currently recorded server power supply log and target power supply data according to a preset correlation scoring algorithm;

[0013] The abnormal result with the highest correlation score is determined as the target abnormal result, and a test result report is generated according to the target abnormal result and fed back to the execution server for user viewing.

[0014] In some embodiments, the abnormal log status includes multiple log scoring dimensions, the abnormal power supply parameters include multiple power supply scoring dimensions, and the calculation of the correlation score between the abnormal log status and the abnormal power supply parameters contained in the abnormal result and the currently recorded server power supply log and the target power supply data according to a preset correlation scoring algorithm includes:

[0015] For the sum of the number of log scoring dimensions and the number of power scoring dimensions of the abnormal log state contained in the abnormal result, setting the number of flag bits of the register, wherein the number of flag bits matches the sum;

[0016] Sorting the multiple log scoring dimensions and the multiple power scoring dimensions according to a preset priority to generate a dimension order, and allocating the log scoring dimension or the power scoring dimension corresponding to the flag bit according to the dimension order;

[0017] According to the order of the flag bits, compare one by one whether the abnormal log status in the abnormal result under the current scoring dimension matches the currently recorded server power log, or whether the abnormal power parameter in the abnormal result matches the currently recorded target power data;

[0018] If there is a match, the corresponding flag position is 1, otherwise the corresponding flag position is 0;

[0019] According to the values ​​corresponding to the flag bits, the correlation scores between the abnormal log status and abnormal power supply parameters included in the abnormal result and the currently recorded server power supply log and target power supply data are determined.

[0020] In some embodiments, before calling the improved test script to perform safety testing and obtaining target power supply parameters recorded during the test, the method further includes:

[0021] In response to a test request initiated by a user, calling a silent script to ensure that the power supply guarantee device maintains a network connection with an execution server and a server to be tested, wherein the silent script is a script file pre-stored in a personalized file in the power supply guarantee device;

[0022] After the silent script is run, the network connection between the power supply guarantee device and the execution server and the server to be tested is detected, and the test script is called to perform a security test;

[0023] After the silent script is run, if it is detected after a preset time period that the power supply guarantee device is not connected to the execution server and the server to be tested and the test request initiated by the user allows silent script control, the silent script is called to replace the test script of the power supply guarantee device, a test script log is generated and the security test is stopped;

[0024] If it is detected after a preset time period that the power supply protection device is not connected to the execution server and the server to be tested but the test request initiated by the user does not allow silent script control, a network abnormality alarm is generated and the security test is stopped.

[0025] In some embodiments, querying the database for configuration parameters matching the test case includes:

[0026] Obtaining the test case number contained in the test request;

[0027] According to the test case number and a second association table containing associations between the test case number and configuration parameters that is preset and stored in a database, querying the configuration parameters that match the test case number;

[0028] The configuration parameters include target power supply parameters and power supply expected change parameters that need to be recorded in the test case.

[0029] In some embodiments, the step of improving the test script according to the configuration parameters, and calling the improved test script to perform a safety test and obtain target power supply parameters recorded during the test, includes:

[0030] Writing the target power supply parameters included in the configuration parameters into the test script;

[0031] Calling the test script to execute a power real-time data instruction matching the target power parameter to query initial power real-time data corresponding to the target power parameter;

[0032] The initial power real-time data is converted into human-readable target power real-time data, and the target power real-time data is recorded.

[0033] In some embodiments, the method includes detecting whether the safety test is performed normally:

[0034] Call the test script, record the current time node and the test start node, and calculate the current test duration according to the difference between the current time node and the test time node;

[0035] Compare the target power real-time data corresponding to the current time node with the power expected change parameter to determine whether the safety test is performed normally, wherein the power expected change parameter includes a test duration and a plurality of expected power parameters corresponding to the test duration;

[0036] If the target power real-time data corresponding to the current time node does not match the power expected change parameter and the multiple expected power parameters that match the current test duration, it is determined that the safety test is not performed normally;

[0037] If the target power real-time data corresponding to the current time node is the same as one of the expected power parameters among the multiple expected power parameters that match the expected power change parameter and the current test duration, it is determined that the safety test is proceeding normally.

[0038] In a second aspect, the present application provides a server power safety processing system, the system comprising:

[0039] A configuration module, configured to query the database for configuration parameters matching the test request in response to a test request initiated by a user;

[0040] A test module, used to improve the test script according to the configuration parameters, and call the improved test script to perform safety testing and obtain target power supply parameters recorded during the test;

[0041] The analysis module is used to respond to the safety test exception and call the test analysis model to process the target power data and the recorded server power log to determine the target exception result to prompt the user to repair the exception.

[0042] In a third aspect, the present application provides a computer program product, including a computer program, which implements the steps of the following method when executed by a processor:

[0043] In response to a test request initiated by a user, querying the database for configuration parameters matching the test request;

[0044] Perfecting the test script according to the configuration parameters, and calling the perfected test script to perform safety testing and obtain target power supply parameters recorded during the test;

[0045] In response to a security test exception, a test analysis model is called to process the target power data and the recorded server power log to determine a target exception result to prompt a user to perform exception repair.

[0046] In a fourth aspect, the present application provides an electronic device, the electronic device comprising:

[0047] one or more processors;

[0048] and a memory associated with one or more processors, the memory being used to store program instructions, which, when read and executed by the one or more processors, perform the following operations:

[0049] In response to a test request initiated by a user, querying the database for configuration parameters matching the test request;

[0050] Perfecting the test script according to the configuration parameters, and calling the perfected test script to perform safety testing and obtain target power supply parameters recorded during the test;

[0051] In response to a security test exception, a test analysis model is called to process the target power data and the recorded server power log to determine a target exception result to prompt a user to perform exception repair.

[0052] In a fifth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program enables a computer to perform the following operations:

[0053] In response to a test request initiated by a user, querying the database for configuration parameters matching the test request;

[0054] Perfecting the test script according to the configuration parameters, and calling the perfected test script to perform safety testing and obtain target power supply parameters recorded during the test;

[0055] In response to a security test exception, a test analysis model is called to process the target power data and the recorded server power log to determine a target exception result to prompt a user to perform exception repair.

[0056] The beneficial effects achieved by this application are:

[0057] The present application provides a server power safety processing method, including responding to a test request initiated by a user, querying the configuration parameters matching the test request in the database; improving the test script according to the configuration parameters, and calling the improved test script to perform a safety test and obtain the target power parameters recorded during the test; in response to a safety test exception, calling the test analysis model to process the target power data and the recorded server power log to determine the target abnormal result to prompt the user to repair the abnormality. The power parameters can be recorded in real time, which is easy to analyze the cause of the test failure. At the same time, this part of the data can also be used to reproduce the problem, helping the test engineer to quickly reproduce the scene when the test failed; in addition, the power parameters are selectable and easy to maintain. Even if you don’t understand the code, you can write it into the database through the web page function, helping the test engineer to select different parameters for different customers to complete the test; further, when the test fails, the root cause of the test failure can be analyzed through the returned power data and log; in addition, when the test needs to reproduce the scene, because each data record is detailed, there is no need for hardware engineers to reproduce it at the hardware level, and the downtime scene can be directly restored and reproduced through the data recorded by the system, helping to quickly reproduce and locate the problem. Reduce the requirements and workload for test engineers. The original test required engineers to understand all aspects of the details. The existing system can assist engineers in making a lot of judgments and help test engineers decide whether to report project bugs or re-execute tests. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work, among which:

[0059] Figure 1 It is a schematic diagram of a power supply protection device provided in an embodiment of the present application;

[0060] Figure 2 This is a timing diagram of a server power safety processing method provided by an embodiment of the present application;

[0061] Figure 3 It is a schematic diagram of a server power supply safety processing method provided in an embodiment of the present application;

[0062] Figure 4 This is a server power safety processing flow chart provided in an embodiment of the present application;

[0063] Figure 5 This is a server power safety processing system architecture diagram provided by an embodiment of the present application;

[0064] Figure 6 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0065] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0066] It should be understood that in the description of the present application, unless the context clearly requires otherwise, words such as "include", "comprises", and the like in the entire specification and claims should be interpreted as inclusive rather than exclusive or exhaustive; that is, the meaning of "including but not limited to".

[0067] It should also be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, "plurality" means two or more.

[0068] It should be noted that the terms "S1", "S2", etc. are only used for the purpose of describing the steps, and do not specifically refer to the order or sequence, nor are they used to limit the present application. They are only for the convenience of describing the method of the present application, and cannot be understood as indicating the order of the steps. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present application.

[0069] As mentioned in the background technology, most servers currently implement power redundancy functions, with functions such as current balancing and fault switching, which can effectively avoid the impact of power failure on the system, thereby achieving uninterrupted operation of the server. Redundant power supplies are usually combined with hot-swap technology, that is, hot-swap redundant power supplies, which can unplug the faulty power supply and replace it with a good power supply when the system is running, thereby greatly improving the stability and reliability of the server system. Redundant power supplies are usually combined with hot-swap technology, which can unplug the faulty power supply and replace it with a good power supply when the system is running, thereby greatly improving the stability and reliability of the server system.

[0070] Currently, in the actual monitoring and testing of power supplies, in addition to directly plugging in and out the power supply, the power supply information can only be recorded through the power supply related commands under the OS and BMC. Therefore, during the test process, the redundant mode of the power supply is generally set before the test begins, and then a stress test or stability test is performed to simulate the actual usage scenario of the customer. During the test process, if the redundant mode setting is involved, the power supply redundant mode is flipped during the test process to achieve the purpose of completing all power supply test tasks in a short time. Therefore, under the existing technology, power supply testing has high requirements for test engineers; different test parameters need to be recorded for different test cases, and the recording of power supply data is also insufficient, and some data will be lost. Once it is necessary to reproduce a similar downtime or server restart, the power supply power failure scenario, the missing data may greatly prolong the time required to reproduce the test scenario; for the results after the test, the test engineer needs to gradually analyze and restore the test scenario according to the time and content based on the log content, which is inefficient.

[0071] Embodiment 1

[0072] The present application embodiment provides a server power supply safety processing method, which is applied to Figure 1 In the main control unit of the power supply protection device shown, the test case number transmitted by the execution server is received, and the corresponding parameters are queried in the built-in database with this number. After obtaining the parameters, the test script is read and the corresponding parameters are filled in to generate a new script (both the regular script and the silent script are generated in this step). Subsequently, the main control unit transmits the silent script to the machine under test to let the machine under test run the silent script, and then calls the regular script to wait for the test to be completed. If the test ends normally (as long as the test is not terminated due to an abnormality, it is considered to have ended normally, regardless of whether the test passes or fails), it ends. If the test fails, the test log and target power parameters are then read and passed into the test analysis model to check the possible reasons for the test failure. The log is then backed up and passed back to the execution server to end. Specifically, if Figure 2 As shown in the timing diagram, the server power processing method disclosed in this application includes the following contents:

[0073] S1. In response to a test request initiated by a user, query a database for configuration parameters that match the test request.

[0074] After initiating a test request, the user queries the built-in database of the power supply protection device for test parameters corresponding to the test case included in the test request.

[0075] In some specific implementation scenarios, the above-mentioned query database for configuration parameters matching the test case includes: obtaining the test case number contained in the test request; querying the configuration parameters matching the test case number according to the test case number and the second association table containing the association relationship between the test case number and the configuration parameters that is pre-set and stored in the database, such as Table 1, wherein the test steps corresponding to the test case are also stored in Table 1; wherein the configuration parameters include the target power supply parameters and the expected power supply change parameters that need to be recorded in the test case. The expected power supply change parameters are what may happen to the power supply of the server to be tested after the safety test is executed, that is, the expected result change law. For example, in the stress test, the redundant mode flips after half of the execution time. If there are four power supplies, the first two power supplies will work normally in the first half of the time, and the last two power supplies will be dormant. The expected results will be reversed in the second half of the time. The built-in database in the power protection device provided by the present application stores configuration parameters corresponding to existing test cases, so that when performing a safety test on the server power supply, there is no need to initiate a new test case. Instead, it is only necessary to query the corresponding configuration parameters based on the existing test case and write them into the test script, so as to realize the query and recording of the power supply data that needs to be recorded, reduce the pressure of data storage, and greatly improve the utilization rate of the original test cases.

[0076] Middle number Test case number Test step number Test step number Configuration parameters 0001 test_0001 step_00001 1 Power

[0077] Table 1

[0078] S2. Improve the test script according to the configuration parameters, and call the improved test script to perform safety testing and obtain the target power supply parameters recorded during the test.

[0079] After setting the test script according to the configuration parameters, normal security tests are performed on the server under test, such as adjusting the power status of the server under test, and recording the target power parameters that match the configuration parameters; the server under test records the logs generated during the test and returns them to the power protection device.

[0080] In a specific implementation scenario, before calling the improved test script to perform a safety test and obtaining the target power supply parameters recorded during the test, the method further includes:

[0081] In response to a test request initiated by a user, a silent script is called to ensure that the power supply protection device maintains a network connection with the execution server and the server to be tested, wherein the silent script is a script file pre-stored in a personalized file in the power supply protection device, specifically written into a personalized file such as bashrc, and the silent script can ensure that the power supply device starts the network by itself after it is turned on, avoiding the impact of the power-on and restart of the power supply protection device caused by stability tests, etc.; after the silent script is run, the network connection between the power supply protection device and the execution server and the server to be tested is detected, and the test script is called to perform a security test; after the silent script is run, if it is detected that the power supply protection device is not connected to the execution server and the server to be tested after a preset time period and the test request initiated by the user allows silent script control, the silent script is called to replace the test script of the power supply protection device, a test script log is generated and the security test is stopped; if it is detected that the power supply protection device is not connected to the execution server and the server to be tested after a preset time period but the test request initiated by the user does not allow silent script control, a network abnormality alarm is generated and the security test is stopped; if it is detected that the power supply protection device has been connected to the execution server and the server to be tested within the preset time period, the test script is improved based on the target power parameters and the test script is run to run the security test. The above preset time period is preferably set to 15 minutes, and can also be set by those skilled in the art according to actual conditions, and this application does not impose any restrictions on this. By running the silent script before running the test script, the network of the power supply protection device is tested to avoid interference with the subsequent security detection caused by network interruptions caused by problems of the power supply protection device itself, and further ensure the accuracy of the subsequent analysis of abnormal results.

[0082] In some specific implementation scenarios, the test script is improved according to the configuration parameters, and the improved test script is called to perform safety testing and obtain the target power parameters recorded during the test, including: writing the target power parameters contained in the configuration parameters into the test script; calling the test script to execute the power real-time data instruction matching the target power parameters to query the initial power real-time data corresponding to the target power parameters; converting the initial power real-time data into human-readable target power real-time data, and recording the target power real-time data. Specifically, the test script replaces the existing shell script according to the target power parameters contained in the configuration parameters obtained from the database query to realize the query and recording of the target power parameters, specifically through the IPMI instruction, and converts the initial power real-time data obtained from the query into the target power real-time data readable by engineers in this field and saves it.

[0083] In addition, in some specific implementation scenarios, the embodiments of the present application also propose a method for detecting whether the above-mentioned safety test is carried out normally, specifically including: calling the test script, recording the current time node and the test start node, and calculating the current test duration based on the difference between the current time node and the test time node; comparing the target power real-time data corresponding to the current time node with the expected power change parameters to determine whether the safety test is carried out normally, wherein the expected power change parameters include the test duration and multiple expected power parameters corresponding to the test duration; if the target power real-time data corresponding to the current time node and the expected power change parameters do not match the multiple expected power parameters that match the current test duration, then it is determined that the safety test is not carried out normally; if the target power real-time data corresponding to the current time node and the expected power change parameters are the same as one of the multiple expected power parameters that match the current test duration, then it is determined that the safety test is carried out normally.

[0084] The embodiment of the present application also discloses that after the silent script is run, after the power supply protection device successfully accesses the network and realizes the network connection with the server to be tested and the execution server, the network status is detected again to solve the problem that the test cannot run normally due to the power supply protection device not being connected to the server to be tested when the test script is executed, and further avoid the influence of external factors on the server power supply test. The method specifically includes: in response to detecting that the network connection between the power supply protection device and the execution server and the server to be tested is interrupted; running the test script and initiating a network connection request to the server to be tested; after an interval of a preset second time period (preferably set to 5 minutes, which is not restricted by the present application), detecting again whether the current power supply protection device has network connectivity with the server to be tested; if it is detected that the network status between the power supply protection device and the server to be tested is normal at this time, If the network status between the power supply guarantee device and the server to be tested is normal, continue to run the test script to execute subsequent test steps; if it is detected at this time that the network status between the power supply guarantee device and the server to be tested is abnormal, that is, there is no network connection between the power supply guarantee device and the server to be tested, then a network connection request is initiated to the server to be tested again until the number of network connection request initiations reaches a preset threshold; the above-mentioned preset threshold can preferably be set to 3, which is not restricted by the present application; if after the number of network connection request initiations reaches the preset threshold and after the above-mentioned second preset time period, the network status between the current power supply guarantee device and the server to be tested is detected again, and it is detected that the network status between the current power supply guarantee device and the server to be tested is abnormal, that is, the power supply guarantee device is still not connected to the server to be tested, then stop running the test script and generate an alarm to prompt the user that the power supply guarantee device access is abnormal.

[0085] S3. In response to the security test exception, the test analysis model is called to process the target power data and the recorded server power log to determine the target exception result to prompt the user to repair the exception.

[0086] After the power supply protection device is tested, if the test is terminated abnormally, that is, the safety test does not run normally, the target abnormal result determined by the test analysis model is returned to the execution server so that the user can view the specific cause of the power supply abnormality and repair the abnormality in time. The above test analysis model mainly analyzes the test results of the abnormal end through log sequence and specific logs. First, by reading the test data in the execution server, all the power supply information of the server to be tested is checked, including checking whether the server has abnormal restart or downtime (if there is an abnormal state). If so, the test fail is reported, and the server has downtime or restarted in the corresponding time period, prompting the test engineer to handle it first. Check whether there is a situation that the power supply status cannot be read in the time period when it should be readable, except that the entire server is completely powered off. If so, report the power supply instruction abnormality. Secondly, check whether the power redundancy is the expected power redundancy mode and whether it is the corresponding correct power supply, such as two power supplies are in active state and two power supplies are in stand by state (2+2). Check whether the input and output power of the power supply are normal, such as whether there is leakage and whether the current sharing function is normal. (Note here that some servers are grouped for power supply. The power status needs to be set in groups. Calculations also need to be grouped to check whether the power status is normal within the group.) Finally, the model generates a test result report and provides it to the test engineer for reviewing the test results and analyzing the problems.

[0087] In some specific implementation scenarios, after the test is completed, if the test is terminated abnormally, in response to the safety test exception, the test analysis model is called to process the target power data and the recorded server power log to determine the target abnormal result to prompt the user to perform abnormal repair, specifically including: according to the first association table containing the association relationship between the test case number and the abnormal result stored in the database in advance, such as Table 2, it can be understood that Table 1 and Table 2 are associated through the intermediate number, and one or more abnormal results corresponding to the test case number are queried; according to the preset correlation scoring algorithm, the abnormal log state and abnormal power parameters contained in the abnormal result are calculated with the correlation score of the currently recorded server power log and the target power data; determine that the abnormal result with the highest correlation score is the target abnormal result and generate a test result report based on the target abnormal result and feedback to the execution server for user viewing. It is convenient for test engineers to analyze the abnormal results, and to a certain extent, it can assist test engineers in reproducing the failure and downtime scenarios of the power redundancy mode.

[0088] Middle number Test case number Abnormal result number 0001 test-0001 exception00001

[0089] Table 1

[0090] Among them, the abnormal log state includes multiple log scoring dimensions, and the abnormal power supply parameters include multiple power supply scoring dimensions. According to a preset correlation scoring algorithm, the correlation score between the abnormal log state and the abnormal power supply parameters contained in the abnormal result and the currently recorded server power supply log and the target power supply data is calculated, including: setting a flag bit for the sum of the number of log scoring dimensions and the number of power supply scoring dimensions of the abnormal log state contained in the abnormal result, wherein the number of flag bits matches the sum; dimensionally sorting the multiple log scoring dimensions and the multiple power supply scoring dimensions according to a preset priority to generate a dimension order, and allocating the log scoring dimension or the power supply scoring dimension corresponding to the flag bit according to the dimension order; according to the order of the flag bits, comparing one by one whether the abnormal log state in the abnormal result under the current scoring dimension matches the currently recorded server power supply log, or whether the abnormal power supply parameters in the abnormal result matches the currently recorded target power supply data; if they match, the corresponding flag bit is 1, otherwise the corresponding flag bit is 0; according to the values ​​corresponding to each flag bit, determining the correlation score between the abnormal log state and the abnormal power supply parameters contained in the abnormal result and the currently recorded server power supply log and the target power supply data. The analysis of abnormal results is achieved through the preset correlation algorithm. By traversing different abnormal scoring dimensions to score each possible abnormal result, the corresponding correlation score is determined, and the target abnormal result is further determined based on the correlation score. This is efficient and convenient, and greatly improves the speed of locating abnormal results.

[0091] Taking a specific example to illustrate, in some specific implementations, the abnormal results are concentrated as shown in Table 1, where the log scoring dimensions include log records and log time, and the power scoring dimensions include network connectivity, redundancy status, and current output; at this time, the number of flag bits of the register is set to 5, corresponding to the five scoring dimensions. It can be understood that the priority is manually set by those skilled in the art according to the current actual scenario, and this application does not impose any constraints on this. In this example, the priority setting can be that network connectivity is higher than log records, log records are higher than log time, log time is higher than redundancy status, and redundancy status is higher than current data. At this time, the register is 00000, and the flag bits from left to right represent network connectivity, log records, log time, redundancy status, and current output, respectively. If the abnormal log status in the abnormal result under the current scoring dimension matches the currently recorded server power log, or the abnormal power parameter in the abnormal result matches the currently recorded target power data; if it matches, the corresponding flag position is 1, otherwise the corresponding flag position is 0, and finally a correlation score is output and stored in the potential abnormal possibility, for example, 11100, which means that the network connectivity status is in compliance, the log record status is in compliance, the log time status is in compliance, the redundancy status is not in compliance, and the current output is not in compliance. The abnormal result corresponding to the maximum value of the final correlation score is the target abnormal result inferred by the above model; in addition, the above model can also output the abnormal results with higher correlation scores as potential abnormal possibilities, so that users can conduct further analysis.

[0092]

[0093] Table 1

[0094] In addition, the power supply protection device to which the method disclosed in this embodiment is applied is an intermediate test device, such as Figure 3 As shown, after the tester initiates a test to the execution server, usually the execution server instructs the server to be tested to execute the test steps and fill in the data information. On this basis, the embodiment disclosed in the present application adds a power supply guarantee device, which serves as an intermediate test device and is respectively connected to the execution server and the server to be tested, receives the command to execute the test transmitted by the execution server, notifies the server to be tested to execute the test steps and returns the recorded test results and logs to the power supply guarantee device. After analyzing it, the power supply guarantee device returns the test result report to the execution server for the tester to view and analyze.

[0095] This application helps the developers of automated test scripts to establish a solution and system for real-time recording of power data and analysis of test results under the current test case conditions under the conditions of complex automated testing, so as to achieve real-time recording of power parameters, facilitate secondary analysis of the reasons for test failure, and use this part of data to reproduce the problem, so as to help test engineers quickly reproduce the scene when the test failed; in addition, the power parameters are selectable and easy to maintain, and can be written into the database through the web page function even if you do not understand the code, so as to help test engineers select different parameters for different customers to complete the test; further, when the test fails, the root cause of the test failure can be analyzed through the returned power data and logs; in addition, when the test needs to reproduce the scene, because each data record is detailed, there is no need for hardware engineers to reproduce it at the hardware level, and the downtime scene can be directly restored and reproduced through the data recorded by the system, which helps to quickly reproduce and locate the problem. Reduce the requirements and workload for test engineers. The original test requires engineers to understand the details of various aspects, and the existing system can assist engineers in making a lot of judgments, helping test engineers decide whether to report project bugs or re-execute the test.

[0096] Embodiment 2

[0097] Corresponding to the above-mentioned embodiment 1, the present application also provides a server power supply safety processing method according to an embodiment, such as Figure 4 The flowchart shown specifically includes:

[0098] 4100. In response to a test request initiated by a user, query the database for configuration parameters matching the test request;

[0099] Preferably, the querying the database for configuration parameters matching the test case includes:

[0100] 4110. Obtain the test case number included in the test request;

[0101] 4120. Query the configuration parameter matching the test case number according to the test case number and a second association table containing associations between the test case number and the configuration parameters that is preset and stored in a database;

[0102] The configuration parameters include target power supply parameters and power supply expected change parameters that need to be recorded in the test case.

[0103] Preferably, before calling the improved test script to perform safety testing and obtaining target power supply parameters recorded during the testing process, the method further includes:

[0104] 4130. In response to a test request initiated by a user, calling a silent script to ensure that the power supply guarantee device maintains a network connection with an execution server and a server to be tested, wherein the silent script is a script file pre-stored in a personalized file in the power supply guarantee device;

[0105] 4140. After the silent script is run, a network connection between the power supply guarantee device and the execution server and the server to be tested is detected, and a test script is called to perform a security test;

[0106] 4150. After the silent script runs, if it is detected after a preset period of time that the power supply guarantee device is not connected to the execution server and the server to be tested and the test request initiated by the user allows silent script control, then the silent script is called to replace the test script of the power supply guarantee device, a test script log is generated, and the security test is stopped;

[0107] 4160. If it is detected after a preset time period that the power supply protection device is not connected to the execution server and the server to be tested but the test request initiated by the user does not allow silent script control, a network anomaly alarm is generated and the security test is stopped.

[0108] 4200. Improve the test script according to the configuration parameters, and call the improved test script to perform a safety test and obtain target power supply parameters recorded during the test;

[0109] Preferably, the step of improving the test script according to the configuration parameters, and calling the improved test script to perform a safety test and obtain target power supply parameters recorded during the test, includes:

[0110] 4210. Write the target power supply parameter included in the configuration parameter into the test script;

[0111] 4220. Call the test script to execute a power real-time data instruction matching the target power parameter to query initial power real-time data corresponding to the target power parameter;

[0112] 4230. Convert the initial power real-time data into human-readable target power real-time data, and record the target power real-time data.

[0113] Preferably, the method comprises:

[0114] 4240. Check whether the safety test is performed normally:

[0115] 4241. Call the test script, record the current time node and the test start node, and calculate the current test duration according to the difference between the current time node and the test time node;

[0116] 4242. Compare the target power real-time data corresponding to the current time node with the power expected change parameter to determine whether the safety test is performed normally, wherein the power expected change parameter includes a test duration and a plurality of expected power parameters corresponding to the test duration;

[0117] 4243. If the target power real-time data corresponding to the current time node does not match the power expected change parameter and the multiple expected power parameters that match the current test duration, it is determined that the safety test is not performed normally;

[0118] 4244. If the target power real-time data corresponding to the current time node is the same as one of the expected power parameters among the multiple expected power parameters that match the current test duration, it is determined that the safety test is proceeding normally.

[0119] 4300. In response to a security test exception, call a test analysis model to process the target power data and the recorded server power log to determine a target exception result to prompt a user to repair the exception.

[0120] Preferably, in response to the safety test exception, calling the test analysis model to process the target power data and the recorded server power log to determine the target exception result to prompt the user to perform exception repair, including:

[0121] 4310. Query one or more abnormal results corresponding to the test case number according to a first association table containing associations between the test case number and the abnormal results pre-stored in the database;

[0122] 4320. Calculate the correlation score between the abnormal log status and abnormal power supply parameters included in the abnormal result and the currently recorded server power supply log and target power supply data according to a preset correlation scoring algorithm;

[0123] Preferably, the abnormal log status includes multiple log scoring dimensions, the abnormal power supply parameters include multiple power supply scoring dimensions, and the calculation of the correlation score between the abnormal log status and the abnormal power supply parameters contained in the abnormal result and the currently recorded server power supply log and the target power supply data according to a preset correlation scoring algorithm includes:

[0124] 4321. For the sum of the number of log scoring dimensions and the number of power scoring dimensions of the abnormal log status included in the abnormal result, set the number of flag bits of the register, wherein the number of flag bits matches the sum;

[0125] 4322. Sort the multiple log scoring dimensions and the multiple power scoring dimensions according to a preset priority to generate a dimension order, and assign a log scoring dimension or a power scoring dimension corresponding to a flag bit according to the dimension order;

[0126] 4323. According to the order of the flag bits, compare one by one whether the abnormal log status in the abnormal result under the current scoring dimension matches the currently recorded server power log, or whether the abnormal power parameter in the abnormal result matches the currently recorded target power data;

[0127] 4324. If it matches, the corresponding flag position is 1, otherwise the corresponding flag position is 0;

[0128] 4325. Determine, based on the numerical values ​​corresponding to the flag bits, a correlation score between the abnormal log status and abnormal power supply parameters included in the abnormal result and the currently recorded server power supply log and target power supply data.

[0129] 4330. Determine the abnormal result with the highest correlation score as the target abnormal result, generate a test result report based on the target abnormal result, and feed it back to the execution server for the user to view.

[0130] Embodiment 3

[0131] Corresponding to the above-mentioned embodiment 1 and embodiment 2, the embodiment of the present application further provides a server power supply safety processing system, including:

[0132] Configuration module 510, for responding to a test request initiated by a user, querying the database for configuration parameters matching the test request;

[0133] A test module 520, configured to improve a test script according to the configuration parameters, and call the improved test script to perform a safety test and obtain target power supply parameters recorded during the test;

[0134] The analysis module 530 is used to respond to the safety test exception and call the test analysis model to process the target power data and the recorded server power log to determine the target abnormal result to prompt the user to perform abnormal repair.

[0135] In some embodiments, the analysis module 530 is also used to query one or more abnormal results corresponding to the test case number according to a first association table containing the association relationship between the test case number and the abnormal result pre-stored in the database; calculate the correlation score between the abnormal log status and abnormal power parameters contained in the abnormal result and the currently recorded server power log and target power data according to a preset correlation scoring algorithm; determine the abnormal result with the highest correlation score as the target abnormal result and generate a test result report based on the target abnormal result and feed it back to the execution server for user viewing.

[0136] In some embodiments, the analysis module 530 is also used to set the number of flag bits of the register for the sum of the number of log scoring dimensions and the number of power scoring dimensions of the abnormal log status contained in the abnormal result, wherein the number of flag bits matches the sum; dimensionally sorting the multiple log scoring dimensions and the multiple power scoring dimensions according to a preset priority to generate a dimension order, and allocating the log scoring dimensions or the power scoring dimensions corresponding to the flag bits according to the dimension order; according to the order of the flag bits, comparing one by one whether the abnormal log status in the abnormal result under the current scoring dimension matches the currently recorded server power log, or whether the abnormal power parameters in the abnormal result match the currently recorded target power data; if they match, the corresponding flag position is 1, otherwise the corresponding flag position is 0; according to the numerical values ​​corresponding to the flag bits, determining the correlation score between the abnormal log status and the abnormal power parameters contained in the abnormal result and the currently recorded server power log and the target power data.

[0137] In some embodiments, the system further includes a preprocessing module 540 (not shown in the figure), and the preprocessing module 540 is used to call a silent script in response to a test request initiated by a user to ensure that the power supply protection device maintains a network connection with the execution server and the server to be tested, wherein the silent script is a script file pre-stored in a personalized file in the power supply protection device; after the silent script is run, the network connection between the power supply protection device and the execution server and the server to be tested is detected, and the test script is called to perform a security test; after the silent script is run, if it is detected that the power supply protection device is not connected to the execution server and the server to be tested after a preset time period and the test request initiated by the user allows silent script control, the silent script is called to replace the test script of the power supply protection device, a test script log is generated and the security test is stopped; if it is detected that the power supply protection device is not connected to the execution server and the server to be tested after a preset time period but the test request initiated by the user does not allow silent script control, a network abnormality alarm is generated and the security test is stopped.

[0138] In some embodiments, the configuration module 510 is also used to obtain the test case number contained in the test request; according to the test case number and a second association table containing the association relationship between the test case number and the configuration parameters that is pre-set and stored in a database, query the configuration parameters that match the test case number; wherein the configuration parameters include the target power supply parameters and the expected power supply change parameters that need to be recorded in the test case.

[0139] In some embodiments, the test module 520 is also used to write the target power parameters contained in the configuration parameters into the test script; call the test script to execute the power real-time data instructions matching the target power parameters to query the initial power real-time data corresponding to the target power parameters; convert the initial power real-time data into manually readable target power real-time data, and record the target power real-time data.

[0140] In some embodiments, the test module 520 is also used to call a test script, record the current time node and the test start node, and calculate the current test duration based on the difference between the current time node and the test time node; compare the target power real-time data corresponding to the current time node with the expected power change parameters to determine whether the safety test is proceeding normally, wherein the expected power change parameters include the test duration and multiple expected power parameters corresponding to the test duration; if the target power real-time data corresponding to the current time node and the expected power change parameters do not match the multiple expected power parameters that match the current test duration, then it is determined that the safety test is not proceeding normally; if the target power real-time data corresponding to the current time node and the expected power change parameters are the same as one of the multiple expected power parameters that match the current test duration, then it is determined that the safety test is proceeding normally.

[0141] Embodiment 4

[0142] Corresponding to all the above embodiments, the embodiments of the present application further provide a computer program product, which, when executed by a processor, implements the steps of the method described below:

[0143] In response to a test request initiated by a user, querying the database for configuration parameters matching the test request;

[0144] Perfecting the test script according to the configuration parameters, and calling the perfected test script to perform safety testing and obtain target power supply parameters recorded during the test;

[0145] In response to a security test exception, a test analysis model is called to process the target power data and the recorded server power log to determine a target exception result to prompt a user to perform exception repair.

[0146] In some embodiments, when the computer program is executed by the processor, the steps of the method described below are implemented: according to the first association table containing the association relationship between the test case number and the abnormal result pre-stored in the database, one or more abnormal results corresponding to the test case number are queried; according to a preset correlation scoring algorithm, the correlation score between the abnormal log status and abnormal power supply parameters contained in the abnormal result and the currently recorded server power supply log and target power supply data is calculated; the abnormal result with the highest correlation score is determined as the target abnormal result, and a test result report is generated based on the target abnormal result and fed back to the execution server for user viewing.

[0147] In some embodiments, when the computer program is executed by a processor, the steps of the method described below are implemented: for the sum of the number of log scoring dimensions and the number of power scoring dimensions of the abnormal log status contained in the abnormal result, the number of flag bits of the register is set, wherein the number of flag bits matches the sum; the multiple log scoring dimensions and the multiple power scoring dimensions are dimensionally sorted according to a preset priority to generate a dimension order, and the log scoring dimensions or power scoring dimensions corresponding to the flag bits are allocated according to the dimension order; according to the order of the flag bits, one by one, whether the abnormal log status in the abnormal result under the current scoring dimension matches the currently recorded server power log, or whether the abnormal power parameters in the abnormal result match the currently recorded target power data; if they match, the corresponding flag position is 1, otherwise the corresponding flag position is 0; according to the numerical values ​​corresponding to the flag bits, the correlation score between the abnormal log status and the abnormal power parameters contained in the abnormal result and the currently recorded server power log and the target power data is determined.

[0148] In some embodiments, when the computer program is executed by a processor, the steps of the method described below are implemented: in response to a test request initiated by a user, a silent script is called to ensure that the power supply protection device maintains a network connection with the execution server and the server to be tested, wherein the silent script is a script file pre-stored in a personalized file in the power supply protection device; after the silent script is run, the network connection between the power supply protection device and the execution server and the server to be tested is detected, and a test script is called to perform a security test; after the silent script is run, if it is detected that the power supply protection device is not connected to the execution server and the server to be tested after a preset time period and the test request initiated by the user allows silent script control, the silent script is called to replace the test script of the power supply protection device, a test script log is generated and the security test is stopped; if it is detected that the power supply protection device is not connected to the execution server and the server to be tested after a preset time period but the test request initiated by the user does not allow silent script control, a network abnormality alarm is generated and the security test is stopped.

[0149] In some embodiments, when the computer program is executed by the processor, the steps of the method described below are implemented: obtaining the test case number contained in the test request; querying the configuration parameters matching the test case number based on the test case number and a second association table pre-set and stored in a database containing the association relationship between the test case number and the configuration parameters; wherein the configuration parameters include the target power supply parameters and the expected power supply change parameters that need to be recorded in the test case.

[0150] In some embodiments, when the computer program is executed by a processor, the steps of the method described below are implemented: writing the target power parameters contained in the configuration parameters into the test script; calling the test script to execute the power real-time data instructions matching the target power parameters to query the initial power real-time data corresponding to the target power parameters; converting the initial power real-time data into human-readable target power real-time data, and recording the target power real-time data.

[0151] In some embodiments, the computer program implements the steps of the method described below when executed by a processor: calling a test script, recording a current time node and a test start node, and calculating a current test duration based on a difference between the current time node and the test time node; comparing the target power real-time data corresponding to the current time node with the expected power change parameters to determine whether the safety test is proceeding normally, wherein the expected power change parameters include a test duration and a plurality of expected power parameters corresponding to the test duration; if the target power real-time data corresponding to the current time node and the expected power change parameters do not match the plurality of expected power parameters that match the current test duration, then it is determined that the safety test is not proceeding normally; if the target power real-time data corresponding to the current time node and the expected power change parameters are the same as one of the plurality of expected power parameters that match the current test duration, then it is determined that the safety test is proceeding normally.

[0152] Embodiment 5

[0153] Corresponding to all the above embodiments, an embodiment of the present application provides an electronic device, including: one or more processors; and a memory associated with the one or more processors, the memory is used to store program instructions, and when the program instructions are read and executed by the one or more processors, the following operations are performed:

[0154] In response to a test request initiated by a user, querying the database for configuration parameters matching the test request;

[0155] Perfecting the test script according to the configuration parameters, and calling the perfected test script to perform safety testing and obtain target power supply parameters recorded during the test;

[0156] In response to a security test exception, a test analysis model is called to process the target power data and the recorded server power log to determine a target exception result to prompt a user to perform exception repair.

[0157] in, Figure 6 The architecture of the electronic device is shown exemplarily, and may include a processor 610, a video display adapter 611, a disk drive 612, an input / output interface 613, a network interface 614, and a memory 620. The processor 610, the video display adapter 611, the disk drive 612, the input / output interface 613, the network interface 614, and the memory 620 may be communicatively connected via a bus 630.

[0158] Among them, the processor 610 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solution provided in this application.

[0159] The memory 620 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 620 can store an operating system 621 for controlling the execution of the electronic device 600, and a basic input and output system (BIOS) 622 for controlling the low-level operations of the electronic device 600. In addition, a web browser 623, a data storage management system 624, and an icon font processing system 625, etc. can also be stored. The above-mentioned icon font processing system 625 can be an application program that specifically implements the operations of the aforementioned steps in the embodiment of the present application. In short, when the technical solution provided in the present application is implemented by software or firmware, the relevant program code is stored in the memory 620 and is called and executed by the processor 610.

[0160] The input / output interface 613 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0161] The network interface 614 is used to connect to a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0162] The bus 630 comprises a pathway for transmitting information between the various components of the device (eg, the processor 610, the video display adapter 611, the disk drive 612, the input / output interface 613, the network interface 614, and the memory 620).

[0163] In addition, the electronic device 600 can also obtain information on specific collection conditions from the virtual resource object collection condition information database for use in condition judgment, etc.

[0164] It should be noted that, although the above device only shows a processor 610, a video display adapter 611, a disk drive 612, an input / output interface 613, a network interface 614, a memory 620, a bus 630, etc., in the specific implementation process, the device may also include other components necessary for normal execution. In addition, it can be understood by those skilled in the art that the above device may also only include components necessary for implementing the solution of the present application, and does not necessarily include all the components shown in the figure.

[0165] It can be seen from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution of the present application can essentially or in other words, the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., including several instructions for a computer device (which can be a personal computer, a cloud service end, or a network device, etc.) to execute the methods of various embodiments of the present application or certain parts of the embodiments.

[0166] Embodiment 6

[0167] Corresponding to all the above embodiments, the embodiments of the present application further provide a computer-readable storage medium, characterized in that it stores a computer program, and the computer program enables a computer to perform the following operations:

[0168] In response to a test request initiated by a user, querying the database for configuration parameters matching the test request;

[0169] Perfecting the test script according to the configuration parameters, and calling the perfected test script to perform safety testing and obtain target power supply parameters recorded during the test;

[0170] In response to a security test exception, a test analysis model is called to process the target power data and the recorded server power log to determine a target exception result to prompt a user to perform exception repair.

[0171] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, in which the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0172] The above are only preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A server power safety processing method, applied to a main control unit in a power supply protection device, wherein the power supply protection device also includes a database, a test script and a test analysis model, It is characterized in that The method comprises: In response to a test request initiated by a user, querying the database for configuration parameters matching the test request; Perfecting the test script according to the configuration parameters, and calling the perfected test script to perform safety testing and obtain target power supply parameters recorded during the test; In response to a security test exception, a test analysis model is called to process the target power data and the recorded server power log to determine a target exception result to prompt a user to perform exception repair.

2. The method according to claim 1, It is characterized in that In response to the security test exception, calling the test analysis model to process the target power data and the recorded server power log to determine the target exception result to prompt the user to perform exception repair, including: According to a first association table containing associations between the test case numbers and abnormal results pre-stored in the database, querying one or more abnormal results corresponding to the test case numbers; Calculate the correlation score between the abnormal log status and abnormal power supply parameters contained in the abnormal result and the currently recorded server power supply log and target power supply data according to a preset correlation scoring algorithm; The abnormal result with the highest correlation score is determined as the target abnormal result, and a test result report is generated according to the target abnormal result and fed back to the execution server for user viewing.

3. The method according to claim 2, It is characterized in that The abnormal log status includes multiple log scoring dimensions, the abnormal power supply parameters include multiple power supply scoring dimensions, and the calculation of the correlation score between the abnormal log status and the abnormal power supply parameters included in the abnormal result and the currently recorded server power supply log and the target power supply data according to a preset correlation scoring algorithm includes: For the sum of the number of log scoring dimensions and the number of power scoring dimensions of the abnormal log state contained in the abnormal result, setting the number of flag bits of the register, wherein the number of flag bits matches the sum; Sorting the multiple log scoring dimensions and the multiple power scoring dimensions according to a preset priority to generate a dimension order, and allocating the log scoring dimension or the power scoring dimension corresponding to the flag bit according to the dimension order; According to the order of the flag bits, compare one by one whether the abnormal log status in the abnormal result under the current scoring dimension matches the currently recorded server power log, or whether the abnormal power parameter in the abnormal result matches the currently recorded target power data; If there is a match, the corresponding flag position is 1, otherwise the corresponding flag position is 0; According to the values ​​corresponding to the flag bits, the correlation scores between the abnormal log status and abnormal power supply parameters included in the abnormal result and the currently recorded server power supply log and target power supply data are determined.

4. The method according to claim 1, It is characterized in that Before calling the improved test script to perform safety testing and obtaining target power supply parameters recorded during the testing process, the method further includes: In response to a test request initiated by a user, calling a silent script to ensure that the power supply guarantee device maintains a network connection with an execution server and a server to be tested, wherein the silent script is a script file pre-stored in a personalized file in the power supply guarantee device; After the silent script is run, the network connection between the power supply guarantee device and the execution server and the server to be tested is detected, and the test script is called to perform a security test; After the silent script is run, if it is detected after a preset time period that the power supply guarantee device is not connected to the execution server and the server to be tested and the test request initiated by the user allows silent script control, the silent script is called to replace the test script of the power supply guarantee device, a test script log is generated and the security test is stopped; If it is detected after a preset time period that the power supply protection device is not connected to the execution server and the server to be tested but the test request initiated by the user does not allow silent script control, a network abnormality alarm is generated and the security test is stopped.

5. The method according to claim 4, It is characterized in that The querying the database for configuration parameters matching the test case includes: Obtaining the test case number contained in the test request; According to the test case number and a second association table containing associations between the test case number and configuration parameters that is preset and stored in a database, querying the configuration parameters that match the test case number; The configuration parameters include target power supply parameters and power supply expected change parameters that need to be recorded in the test case.

6. The method according to claim 5, It is characterized in that The step of improving the test script according to the configuration parameters, and calling the improved test script to perform a safety test and obtain target power supply parameters recorded during the test process includes: Writing the target power supply parameters included in the configuration parameters into the test script; Calling the test script to execute a power real-time data instruction matching the target power parameter to query initial power real-time data corresponding to the target power parameter; The initial power real-time data is converted into human-readable target power real-time data, and the target power real-time data is recorded.

7. The method according to claim 6, It is characterized in that The method includes detecting whether the safety test is performed normally: Call the test script, record the current time node and the test start node, and calculate the current test duration according to the difference between the current time node and the test time node; Compare the target power real-time data corresponding to the current time node with the power expected change parameter to determine whether the safety test is performed normally, wherein the power expected change parameter includes a test duration and a plurality of expected power parameters corresponding to the test duration; If the target power real-time data corresponding to the current time node does not match the power expected change parameter and the multiple expected power parameters that match the current test duration, it is determined that the safety test is not performed normally; If the target power real-time data corresponding to the current time node is the same as one of the expected power parameters among the multiple expected power parameters that match the expected power change parameter and the current test duration, it is determined that the safety test is proceeding normally.

8. A server power safety processing system, It is characterized in that The system comprises: A configuration module, configured to query the database for configuration parameters matching the test request in response to a test request initiated by a user; A test module, used to improve the test script according to the configuration parameters, and call the improved test script to perform safety testing and obtain target power supply parameters recorded during the test; The analysis module is used to respond to the safety test exception and call the test analysis model to process the target power data and the recorded server power log to determine the target exception result to prompt the user to repair the exception.

9. An electronic device, It is characterized in that The electronic device comprises: one or more processors; And a memory associated with the one or more processors, the memory is used to store program instructions, and when the program instructions are read and executed by the one or more processors, the method according to any one of claims 1-7 is executed.

10. A computer-readable storage medium, It is characterized in that The computer program stores a computer program, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Product failure reproduction method and device, computer equipment, medium and program product

    CN120469830A