CN110704390A - Method, device, electronic equipment and medium for obtaining server maintenance script - Google Patents

Method, device, electronic equipment and medium for obtaining server maintenance script Download PDF

Info

Publication number
CN110704390A
CN110704390A CN201910878003.8A CN201910878003A CN110704390A CN 110704390 A CN110704390 A CN 110704390A CN 201910878003 A CN201910878003 A CN 201910878003A CN 110704390 A CN110704390 A CN 110704390A
Authority
CN
China
Prior art keywords
server
log
maintenance
type
matching degree
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910878003.8A
Other languages
Chinese (zh)
Other versions
CN110704390B (en
Inventor
张旭明
宫林涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910878003.8A priority Critical patent/CN110704390B/en
Priority to PCT/CN2019/117689 priority patent/WO2021051567A1/en
Publication of CN110704390A publication Critical patent/CN110704390A/en
Application granted granted Critical
Publication of CN110704390B publication Critical patent/CN110704390B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application provides a method, a device, an electronic device and a medium for acquiring a server maintenance script, and the method for acquiring the server maintenance script comprises the following steps: receiving a server maintenance request, wherein the server maintenance request comprises a server identifier and problem information; acquiring a process log in a corresponding server according to the server identifier; determining the matching degree of the process log and the problem information; determining a problem process in the server according to the matching degree of the process log and the problem information; acquiring the type of a problem process, and sending test data corresponding to the type of the problem process to obtain feedback data output by the problem process; and inputting the type of the problem process and the feedback data into the diagnosis model to obtain a maintenance script output by the diagnosis model. The scheme automatically generates the maintenance script after receiving the server maintenance application, thereby improving the maintenance efficiency of the server.

Description

Method, device, electronic equipment and medium for obtaining server maintenance script
Technical Field
The present application relates to the field of computer and communication technologies, and in particular, to a method, an apparatus, an electronic device, and a medium for acquiring a server maintenance script.
Background
At present, an internet enterprise can generally provide software services based on the internet for a large number of users, and the internet enterprise needs a large number of servers to support the software services for the large number of users, so the current internet service generally operates normally based on a plurality of servers. Various problems may occur in the operation process of the server, so that the software service is in a problem, in order to ensure the normal operation of the server, maintenance personnel can monitor the operation state of the server and timely solve the problem when the server has the problem, so that the normal operation of the server and the software service is ensured.
The current management tool usually needs to install a client of the management tool on the electronic device used by the user, which results in complex operation of the management server and low efficiency of maintaining the server.
Disclosure of Invention
Embodiments of the present application provide a configuration method, an apparatus, an electronic device, and a medium for obtaining a server maintenance script, so that the efficiency of maintaining a server can be improved at least to a certain extent.
According to an aspect of an embodiment of the present application, there is provided a method for obtaining a server maintenance script, where the method for obtaining the server maintenance script includes: receiving a server maintenance request, wherein the server maintenance request comprises a server identifier and problem information; acquiring a process log in a server corresponding to the server identifier according to the server identifier; determining the matching degree of the process log and the problem information according to the process log and the problem information; determining a problem process in the server according to the matching degree of the process log and the problem information; acquiring the type of the problem process, and sending test data corresponding to the type of the problem process to obtain feedback data which is output by the problem process and corresponds to the test data; and inputting the type of the problem process and the feedback data into a diagnosis model to obtain a maintenance script output by the diagnosis model.
According to an aspect of an embodiment of the present application, an apparatus for obtaining a server maintenance script is provided, where the apparatus for obtaining a server maintenance script includes a receiving module, an obtaining module, a determining module, a testing module, and a diagnosing module, where the receiving module is configured to receive a server maintenance request, and the server maintenance request includes a server identifier and problem information; the acquisition module is used for acquiring the process log in the server corresponding to the server identifier according to the server identifier; the determining module is used for determining the matching degree of the process log and the problem information according to the process log and the problem information; the determining module is further used for determining a problem process in the server according to the matching degree of the process log and the problem information; the test module is used for acquiring the type of the problem process, sending test data corresponding to the type of the problem process to the problem process and obtaining feedback data which is output by the problem process and corresponds to the test data; and the diagnosis module inputs the type of the problem process and the feedback data into a diagnosis model to obtain a maintenance script output by the diagnosis model.
In some embodiments of the present application, based on the foregoing, the determining module is configured to: searching keywords in the question information; acquiring the occurrence times of the keywords in the process log; and determining the matching degree of the process log and the problem information according to the times of the keywords appearing in the process log.
In some embodiments of the present application, based on the foregoing, the determining module is configured to: acquiring the times of the occurrence of the keywords in the process log within a set time period; and dividing the times by the total number of characters of the process log in the set time period to obtain the matching degree of the process log and the problem information.
In some embodiments of the present application, based on the foregoing, the determining module is further configured to: determining the number of the process logs; if the process logs are multiple, obtaining the matching degree of each process log and the problem information; and obtaining the process corresponding to the process log with the highest matching degree and determining the process corresponding to the process log with the highest matching degree as the problem process in the server.
In some embodiments of the present application, based on the foregoing solution, the obtaining module is configured to: when the server works normally, acquiring the type of the process in the server, and sending test data corresponding to the type of the process in the server to obtain normal feedback data which is output by the process in the server and corresponds to the test data; the determination module is further configured to: comparing the difference value of the feedback data corresponding to the test data output by the problem process and the normal feedback data output by the problem process; and if the difference value does not reach the threshold value, abandoning the process of maintaining the problem.
In some embodiments of the present application, based on the foregoing solution, the test module is configured to: the problem processes are of one type or a plurality of types, and for each type of problem process, test data corresponding to the type of problem process is preset.
In some embodiments of the present application, based on the foregoing, the diagnostic module is configured to: acquiring a process sample set, wherein each process sample in the process sample set is attached with a label corresponding to the maintenance script; for each process sample in the process sample set, judging the type of the process sample, sending test data corresponding to the type of the process sample to the process sample, inputting the type of the process sample and feedback data of the process sample to the test data into the diagnostic model, and outputting the maintenance script by the diagnostic model; and if the maintenance script is not consistent with the maintenance script corresponding to the process sample label, adjusting the diagnosis model to ensure that the maintenance script is consistent with the maintenance script corresponding to the process sample label.
According to an aspect of an embodiment of the present application, there is provided an electronic device including: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method of obtaining server maintenance scripts as described in the embodiments above.
According to an aspect of embodiments of the present application, there is provided a computer-readable medium on which a computer program is stored, the computer program, when executed by a processor, implementing the method for acquiring a server maintenance script as described in the above embodiments.
In the technical solutions provided by some embodiments of the present application, a server with a problem can be found by receiving a server maintenance request including a server identifier and problem information; acquiring a process log in a server corresponding to the server identifier, determining the matching degree of the process log and the problem information, and determining the matching degree of the process log and the problem information according to the process log and the problem information; and determining the problem process in the server according to the matching degree of the process log and the problem information, thereby knowing that the process in the server has a problem. And then, by acquiring the type of the problem process, sending test data corresponding to the type of the problem process to obtain feedback data of the corresponding test data output by the problem process, and knowing what kind of problem occurs in the process. And finally, the type of the problem process and the feedback data are input into the diagnosis model to obtain a maintenance script output by the diagnosis model, so that the operations of installing a client and the like are avoided, and the maintenance efficiency of the server is improved.
Other features and advantages of the present application will be apparent from the following detailed description, or may be learned by practice of the application.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 shows a schematic diagram of an exemplary system architecture to which aspects of embodiments of the present application may be applied;
FIG. 2 schematically illustrates a flow diagram of a method of obtaining a server maintenance script according to one embodiment of the present application;
FIG. 3 schematically illustrates a flow chart for determining a degree of matching of a process log to issue information according to one embodiment of the present application;
FIG. 4 schematically illustrates a flow chart for determining a degree of matching of a process log to issue information, according to an embodiment of the present application;
FIG. 5 is a flow diagram that schematically illustrates a problem process in a server based on a degree of matching of a process log to problem information, in accordance with an embodiment of the present application;
FIG. 6 schematically shows a flow chart of a training process of a diagnostic model according to an embodiment of the present application;
FIG. 7 schematically illustrates a block diagram of an apparatus for obtaining a server maintenance script, according to one embodiment of the present application;
FIG. 8 schematically illustrates a hardware diagram of an electronic device according to an embodiment of the present application;
fig. 9 schematically illustrates a computer-readable storage medium for implementing the above-described method for obtaining a server maintenance script according to one embodiment of the present application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the application.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
Fig. 1 shows a schematic diagram of an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied.
As shown in fig. 1, the system architecture may include a network 104, a server 105, and a maintenance server 106. Network 104 is the medium used to provide a communication link between server 105 and maintenance server 106. Network 104 may include various connection types, such as wired communication links, wireless communication links, and so forth.
It should be understood that the number of networks 104, servers 105, and maintenance servers 106 in fig. 1 is merely illustrative. There may be any number of networks, servers 105, and maintenance servers 106, as desired for the implementation. For example, the server 105 may be a server cluster formed by a plurality of servers 105, and the like.
In an embodiment of the present application, the maintenance server 106 may receive a server maintenance request sent by the server 105 that needs to be maintained, and the maintenance server 106 may also receive a server maintenance request generated by itself. The server maintenance request includes the server identification of the server 105 that needs to be maintained and the problem information existing in the server 105 that needs to be maintained. The maintenance server 106 then obtains the process log of each process in the server 105 needing maintenance corresponding to the server identifier or obtains the process log of a specified process in the server 105 needing maintenance; determining the matching degree of the process log and the problem information according to the process log and the problem information; and determining the problem process in the server 105 needing maintenance according to the matching degree of the process log and the problem information, thereby finding the problem process with the problem in the server 105 needing maintenance. The maintenance server 106 sends test data corresponding to the type of the problem process to the problem process according to the type of the problem process, and feedback data output by the problem process according to the test data is obtained; inputting the type of the problem process and the feedback data output by the problem process into a diagnosis model to obtain a maintenance script output by the diagnosis model.
It can be seen that, according to the technical solution of the embodiment of the present application, the diagnostic model automatically outputs the maintenance script by inputting the feedback data of the problem process in the server 105 that needs to be maintained on the diagnostic model to the test data, so that the central server 106 automatically generates the server maintenance script for the server 105 that needs to be maintained, a client that installs a management tool on the electronic device used by the user is avoided, a maintainer needs to write different scripts according to different formats of different servers is also avoided, and the maintenance efficiency of the server 105 is improved.
It should be noted that the method for obtaining the server maintenance script provided in the embodiment of the present application is generally executed by the maintenance server 106, and accordingly, the obtaining server maintenance script apparatus is generally disposed in the maintenance server 106. However, in other embodiments of the present application, the maintenance server 106 may also receive a maintenance request sent by another terminal device. The terminal device may also have a similar function as the maintenance server 106, so as to execute the method for obtaining the server maintenance script provided in the embodiment of the present application.
The implementation details of the technical solution of the embodiment of the present application are set forth in detail below:
referring to fig. 2, the step of obtaining the server maintenance script by the maintenance server 106 at least includes steps S210 to S270, where the server mentioned below is the server 105 in fig. 1, and the following description is provided in detail:
in step S210, a server maintenance request is received, where the server maintenance request includes a server identifier and problem information.
In an embodiment of the present application, each server identifier may correspond to a server one to one, where the server identifier may be an IP Address (Internet Protocol Address) of the server or other identifier set manually, and the server identifier may further include a Protocol port number provided by the server, and it can be known which application software in the server has a problem through the Protocol port number provided by the server.
In an embodiment of the present application, each server identifier may correspond to a server group consisting of a plurality of servers, and probabilities of the plurality of servers in each server group that have the same problem in the future all reach a set value. The probability of a problem occurring in the future of a certain server is related to the probability of the problem occurring in the past of the server, and it can be determined that the higher the probability of the problem occurring in the past of the server is, the higher the probability of the problem occurring in the future of the server is.
The servers with the probability of the same problem reaching the set value are divided into a group, the servers in the same group have the same problem at a high probability, the servers with the same problem correspond to the same server identifier, and the server maintenance scripts with the same problem are the same, so that the problem of the group of servers can be solved only by obtaining the server maintenance scripts with the problem.
In an embodiment of the present application, each server identifier may correspond to a server group composed of a plurality of servers, the formats of the plurality of servers in each server group are the same, and since the same problem occurring in the servers using the same format is maintained by using the same maintenance script, the servers using the same format are grouped into a group of servers convenient for maintenance.
In step S220, a process log in the server corresponding to the server identifier is obtained according to the server identifier.
In an embodiment of the present application, a server generates a corresponding process log when executing each task, where the process log describes a task execution condition, and when finding a problem process that has a problem in the server, the process log of all processes in the server may be obtained, and when finding a problem process in all processes, all processes in the server may be maintained.
In an embodiment of the present application, when a problem process that has a problem in a server is searched, a process log of a designated process in the server may be obtained, and the problem process is searched in the designated process, where the designated process may be a process that has a high possibility of having a problem, and the designated process may be one or more processes. The designated process in the server is searched and maintained in a targeted manner, so that the calculation amount of the server is reduced.
In step S230, a matching degree of the process log and the problem information is determined according to the process log and the problem information.
In an embodiment of the application, the process log and the problem information may be respectively subjected to hash values obtained by a set algorithm, such as a hash algorithm, binary numbers corresponding to each character in the hash values are searched, and the binary numbers corresponding to each character are combined according to the sequence of the character in the hash values, so as to obtain a binary number group of the process log and a binary number group of the problem information; and intercepting the binary array of the process log and the binary array of the problem information with the same length from front to back, and calculating the Hamming distance of the intercepted binary array of the process log and the intercepted binary array of the problem information. And determining the value of the Hamming distance as the matching degree of the process log and the problem information.
Because the hash value is generated by the full text of the process log and the problem information, the full text similarity of the process log and the problem information can be compared by comparing the similarity of the hash value of the process log and the problem information, so that the search result is accurate.
In an embodiment of the present application, as shown in fig. 3, the process of determining the matching degree between the process log and the problem information according to the process log and the problem information in step S230 may include the following steps:
in step S310, keywords in the question information are searched.
The keyword may be one or more, and characters capable of accurately describing the process problem are set as keywords, and each keyword may include one or more characters.
In an embodiment of the present application, a keyword reference table may be preset, and a character that is the same as a preset keyword in the keyword reference table may be searched for in the question information as the keyword.
In an embodiment of the present application, the dummy word in the question information may be removed, and the character with the largest occurrence number in the question information after the dummy word is removed is used as the keyword. The information in the problem information can be accurately extracted, so that the selection of the keywords is more practical.
In step S320, the number of times the keyword appears in the progress log is acquired.
When there are a plurality of keywords, the number of times of each keyword is acquired respectively.
In step S330, the matching degree between the progress log and the question information is determined according to the number of times the keyword appears in the progress log.
And searching for the characters in the process log, which are the same as the keywords in the problem information, when a plurality of keywords exist, setting different keywords as different weights and different scores, solving the product of the score, the weight and the times of each keyword, and adding the product of the score, the weight and the times of each keyword to obtain the matching degree of the process log of the process and the problem information. The setting of the weight and the score of the keyword can be manually set according to the importance degree of the keyword, and the calculated matching degree takes the importance degree of the keyword into consideration, so that the calculated matching degree can reflect the severity of the problem and is beneficial to the maintenance process. Meanwhile, compared with the method of directly comparing the original text, the keyword comparison saves the calculation amount and time.
In an embodiment of the present application, as shown in fig. 4, the step S330 of determining the matching degree between the process log and the question information according to the number of times that the keyword appears in the process log may include the following steps:
in step S410, the number of times that the keyword appears in the process log of the process within a set time period is acquired;
in step S420, the total number of characters in the process log of the process within the set time period is divided by the number of times, so as to obtain the matching degree between the process log of the process and the question information.
The set time period may be set to a period of time from the time onward. Because each process has limited time for executing the task each time, when one process runs the same task for multiple times, logs generated in the process logs of the process are cyclic, a time period can be set according to the time spent by each process for executing the task once, and the operation amount is reduced.
With continued reference to fig. 2, in step S240, a problem process in the server is determined according to the matching degree of the process log and the problem information.
In an embodiment of the present application, as shown in fig. 5, the process of determining the problem process in the server according to the matching degree between the process log and the problem information in step S240 may include the following steps:
in step S510, the number of process logs is determined;
in step S520, if there are multiple process logs, obtaining a matching degree between each process log and the problem information;
in step S530, the process corresponding to the process log with the highest matching degree is obtained and determined as the problem process in the server.
The matching degree is obtained by comparing the problem information with the process logs, and the process log corresponding to the value with the highest matching degree is the process log which best meets the problem information, so that the process corresponding to the process log with the highest matching degree can be directly selected to accurately find the problem process.
In an embodiment of the application, the process logs with the matching degree reaching the set value can be found, all the processes corresponding to the process logs with the matching degree reaching the set value are determined as problem processes, and the problem processes are maintained.
The setting value can be set to be one or more, and a plurality of setting values can be determined according to a dichotomy, namely when the first setting value is too high to achieve the matching degree of a plurality of processes, the second setting value is half of the first setting value.
Continuing to refer to fig. 2, in step S250, the type of the problem process is obtained, and the test data corresponding to the type of the problem process is sent to the problem process, so as to obtain the feedback data corresponding to the test data output by the problem process.
In one embodiment of the application, the problem processes have one or more types, and for each type of problem process, test data corresponding to the type of problem process is preset. The problem process type and the test data comparison table can be preset, the preset problem process type and the test data comparison table are searched, and test data corresponding to each problem process in the server are obtained. The problem process type can be determined according to the process, and each process in the server corresponds to a preset type.
In one embodiment of the present application, the problem process type may be determined based on the problem process itself and the problem information, and for one problem process, when it matches with different problem information, the corresponding test data is different.
In an embodiment of the present application, the method for obtaining a server maintenance script further includes: when the server normally works, the type of the process in the server is obtained, test data corresponding to the type of the process in the server is sent to the process in the server, and normal feedback data corresponding to the test data output by the process in the server is obtained. In step S250, after obtaining the feedback data corresponding to the test data output by the problem process, the method for obtaining the server maintenance script may further include: comparing the difference value of the feedback data of the corresponding test data output by the problem process and the normal feedback data output by the problem process; and if the difference value does not reach the threshold value, abandoning the process of maintaining the problem.
In the above embodiment, since the difference between the feedback data corresponding to the test data output by the problem process and the normal feedback data output by the problem process does not reach the threshold, it indicates that the problem of the problem process is within an acceptable range, and in order to save resources, the problem process may not be maintained. The threshold may be set based on historical data.
In the above embodiment, after the problem process is abandoned, the problem process in the server may be determined again according to the matching degree between the process log and the problem information, and the problem process that needs to be maintained may be gradually screened according to the matching degree from high to low.
In the above embodiment, if the difference between the feedback data corresponding to the test data output by the problem process and the normal feedback data output by the problem process reaches the threshold, the problem process is continuously maintained.
In step S260, the type of the problem process and the feedback data are input into the diagnostic model, and a maintenance script output by the diagnostic model is obtained.
In the above embodiment, the problem occurring in the problem process can be reflected by the process log, and also can be reflected by the operation result of the problem process, after the problem process is found by the process log, whether the process is the problem process is determined again by the test data, so that the specific problem condition in the problem process can be obtained more accurately, and the maintenance script is obtained according to the feedback data, so that the maintenance script is more targeted.
In one embodiment of the present application, as shown in fig. 6, before inputting the type of the process and the feedback data into the diagnostic model in step S260 and obtaining the maintenance script output by the diagnostic model, the diagnostic model is pre-trained through the following processes:
in step S610, a process sample set is obtained, and each process sample in the process sample set is labeled with a tag corresponding to a maintenance script;
in step S620, for each process sample in the process sample set, determining the type of the process sample, sending test data corresponding to the type of the process sample to the process sample, inputting the type of the process sample and feedback data of the process sample to the test data into the diagnostic model, and outputting a maintenance script by the diagnostic model;
in step S630, if the maintenance script is not consistent with the maintenance script corresponding to the process sample tag, the diagnostic model is adjusted to make the maintenance script consistent with the maintenance script corresponding to the process sample tag.
In one embodiment of the present application, the process samples may be historical processes. Before the process sample set is obtained, a plurality of historical processes and historical process maintenance scripts corresponding to the historical processes are obtained, a set formed by the historical processes is used as the process sample set, and the historical process maintenance scripts corresponding to the historical processes are used as maintenance scripts corresponding to the process samples.
In the technical solutions provided by some embodiments of the present application, a server with a problem can be found by receiving a server maintenance request including a server identifier and problem information; acquiring a process log in a server corresponding to the server identifier, determining the matching degree of the process log and the problem information, and determining the matching degree of the process log and the problem information according to the process log and the problem information; and determining the problem process in the server according to the matching degree of the process log and the problem information, thereby knowing that the process in the server has a problem. And then, by acquiring the type of the problem process, sending test data corresponding to the type of the problem process to obtain feedback data of the corresponding test data output by the problem process, and knowing what kind of problem occurs in the process. And finally, the type of the problem process and the feedback data are input into the diagnosis model to obtain a maintenance script output by the diagnosis model, so that the operations of installing a client and the like are avoided, and the maintenance efficiency of the server is improved.
Embodiments of the apparatus of the present application are described below, which may be used to perform the method for obtaining the server maintenance script in the above embodiments of the present application. For details that are not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the method for obtaining a server maintenance script described above in the present application.
FIG. 7 schematically illustrates a block diagram of an apparatus for obtaining a server maintenance script according to one embodiment of the present application.
Referring to fig. 7, an apparatus 700 for acquiring a server maintenance script according to an embodiment of the present application includes: a receiving module 701, an obtaining module 702, a determining module 703, a testing module 704 and a diagnostic module 705.
The receiving module 701 is configured to receive a server maintenance request, where the server maintenance request includes a server identifier and problem information; the obtaining module 702 is configured to obtain, according to the server identifier, a process log in the server corresponding to the server identifier; the determining module 703 is configured to determine a matching degree between the process log and the problem information according to the process log and the problem information; the determining module 703 is further configured to determine a problem process in the server according to the matching degree between the process log and the problem information; the test module 704 is configured to obtain a type of a problem process, send test data corresponding to the type of the problem process to the problem process, and obtain feedback data of the test data output by the problem process; the diagnostic module 705 inputs the type of the problem process and the feedback data into the diagnostic model to obtain a maintenance script output by the diagnostic model.
In some embodiments of the present application, based on the foregoing scheme, the determining module 703 is configured to: searching keywords in the problem information; acquiring the occurrence times of keywords in a process log; and determining the matching degree of the process log and the problem information according to the times of the keywords appearing in the process log.
In some embodiments of the present application, based on the foregoing scheme, the determining module 703 is configured to: acquiring the times of occurrence of the keywords in the process log within a set time period; and dividing the number of times by the total number of characters of the process log in a set time period to obtain the matching degree of the process log and the problem information.
In some embodiments of the present application, based on the foregoing scheme, the determining module 703 is further configured to: and when the process logs are multiple, acquiring the matching degrees of the multiple process logs and the problem information, comparing the matching degrees of the multiple process logs and the problem information, and determining the process corresponding to the process log with the highest matching degree as the problem process in the server.
In some embodiments of the present application, based on the foregoing, the diagnostic module 705 is configured to: acquiring a process sample set, wherein each process sample in the process sample set is attached with a label corresponding to a maintenance script; judging the type of the process sample aiming at each process sample in the process sample set, sending test data corresponding to the type of the process sample to the process sample, inputting the type of the process sample and feedback data of the process sample to the test data into a diagnosis model, and outputting a maintenance script by the diagnosis model; and if the maintenance script is not consistent with the maintenance script corresponding to the process sample label, adjusting the diagnosis model to ensure that the maintenance script is consistent with the maintenance script corresponding to the process sample label.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 80 according to this embodiment of the invention is described below with reference to fig. 8. The electronic device 80 shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 8, the electronic device 80 is in the form of a general purpose computing device. The components of the electronic device 80 may include, but are not limited to: the at least one processing unit 81, the at least one memory unit 82, the bus 83 connecting the various system components (including the memory unit 82 and the processing unit 81), and may also include one or more display units 84.
Wherein the storage unit stores program code that is executable by the processing unit 81 such that the processing unit 81 performs the steps according to various exemplary embodiments of the present invention as described in the section "example methods" above in this specification.
The storage unit 82 may include readable media in the form of volatile storage units, such as a random access storage unit (RAM)821 and/or a cache storage unit 822, and may further include a read only storage unit (ROM) 823.
The storage unit 82 may also include a program/utility 824 having a set (at least one) of program modules 825, such program modules 825 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 83 may be any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 80 may also communicate with one or more external devices (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 80, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 80 to communicate with one or more other computing devices. Display unit 84 may be a display screen of a computing device. Such communication may be through input/output (I/O) interfaces 85. Also, the electronic device 80 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 86. As shown, the network adapter 86 communicates with the other modules of the electronic device 80 via the bus 83. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 80, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
There is also provided, in accordance with an embodiment of the present disclosure, a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above section "exemplary methods" of the present description, when said program product is run on the terminal device.
Referring to fig. 9, a program product 90 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. A method for obtaining a server maintenance script, comprising:
receiving a server maintenance request, wherein the server maintenance request comprises a server identifier and problem information;
acquiring a process log in a server corresponding to the server identifier according to the server identifier;
determining the matching degree of the process log and the problem information according to the process log and the problem information;
determining a problem process in the server according to the matching degree of the process log and the problem information;
acquiring the type of the problem process, and sending test data corresponding to the type of the problem process to obtain feedback data which is output by the problem process and corresponds to the test data;
and inputting the type of the problem process and the feedback data into a diagnosis model to obtain a maintenance script output by the diagnosis model.
2. The method of claim 1, wherein determining a match between the process log and the problem information comprises:
searching keywords in the question information;
acquiring the occurrence times of the keywords in the process log;
and determining the matching degree of the process log and the problem information according to the times of the keywords appearing in the process log.
3. The method of claim 2, wherein determining the matching degree between the process log and the question information according to the number of times the keyword appears in the process log comprises:
acquiring the times of the occurrence of the keywords in the process log within a set time period;
and dividing the times by the total number of characters of the process log in the set time period to obtain the matching degree of the process log and the problem information.
4. The method for obtaining the server maintenance script according to claim 1, wherein the determining the problem process in the server according to the matching degree of the process log and the problem information comprises:
determining the number of the process logs;
if the process logs are multiple, obtaining the matching degree of each process log and the problem information;
and obtaining the process corresponding to the process log with the highest matching degree and determining the process corresponding to the process log with the highest matching degree as the problem process in the server.
5. The method of retrieving server maintenance scripts according to claim 1, characterized in that it comprises:
when the server works normally, acquiring the type of the process in the server, and sending test data corresponding to the type of the process in the server to obtain normal feedback data which is output by the process in the server and corresponds to the test data;
after the feedback data corresponding to the test data and output by the problem process is obtained, the method comprises the following steps:
comparing the difference value of the feedback data corresponding to the test data output by the problem process and the normal feedback data output by the problem process;
and if the difference value does not reach the threshold value, abandoning the process of maintaining the problem.
6. The method of retrieving server maintenance scripts of claim 1,
the obtaining the type of the problem process and sending the test data corresponding to the type of the problem process to the problem process includes:
the problem processes are of one type or a plurality of types, and for each type of problem process, test data corresponding to the type of problem process is preset.
7. The method of retrieving server maintenance scripts of claim 1, wherein said diagnostic model is pre-trained by the following process:
acquiring a process sample set, wherein each process sample in the process sample set is attached with a label corresponding to the maintenance script;
for each process sample in the process sample set, judging the type of the process sample, sending test data corresponding to the type of the process sample to the process sample, inputting the type of the process sample and feedback data of the process sample to the test data into the diagnostic model, and outputting the maintenance script by the diagnostic model;
and if the maintenance script is not consistent with the maintenance script corresponding to the process sample label, adjusting the diagnosis model to ensure that the maintenance script is consistent with the maintenance script corresponding to the process sample label.
8. An apparatus for obtaining a server maintenance script, comprising:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a server maintenance request which comprises a server identifier and problem information;
the acquisition module is used for acquiring the process log in the server corresponding to the server identifier according to the server identifier;
the determining module is used for determining the matching degree of the process log and the problem information according to the process log and the problem information;
the determining module is further used for determining a problem process in the server according to the matching degree of the process log and the problem information;
the test module is used for acquiring the type of the problem process, sending test data corresponding to the type of the problem process to the problem process and obtaining feedback data which is output by the problem process and corresponds to the test data;
and the diagnosis module is used for inputting the type of the problem process and the feedback data into a diagnosis model to obtain a maintenance script output by the diagnosis model.
9. An electronic device, comprising:
a memory storing computer readable instructions;
a processor reading computer readable instructions stored by the memory to perform the method of retrieving server maintenance scripts of any of claims 1-7.
10. A computer program medium having stored thereon computer readable instructions which, when executed by a processor of a computer, cause the computer to perform the method of retrieving a server maintenance script of any one of claims 1-7.
CN201910878003.8A 2019-09-17 2019-09-17 Method, device, electronic equipment and medium for acquiring server maintenance script Active CN110704390B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910878003.8A CN110704390B (en) 2019-09-17 2019-09-17 Method, device, electronic equipment and medium for acquiring server maintenance script
PCT/CN2019/117689 WO2021051567A1 (en) 2019-09-17 2019-11-12 Method and apparatus for acquiring server maintenance script, and electronic device and non-volatile computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910878003.8A CN110704390B (en) 2019-09-17 2019-09-17 Method, device, electronic equipment and medium for acquiring server maintenance script

Publications (2)

Publication Number Publication Date
CN110704390A true CN110704390A (en) 2020-01-17
CN110704390B CN110704390B (en) 2024-05-24

Family

ID=69195286

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910878003.8A Active CN110704390B (en) 2019-09-17 2019-09-17 Method, device, electronic equipment and medium for acquiring server maintenance script

Country Status (2)

Country Link
CN (1) CN110704390B (en)
WO (1) WO2021051567A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112182193A (en) * 2020-10-19 2021-01-05 山东旗帜信息有限公司 Log obtaining method, device and medium in traffic industry
CN112835853A (en) * 2020-12-31 2021-05-25 北京聚云科技有限公司 Data processing type determination method and device
CN117251196A (en) * 2023-11-20 2023-12-19 太平金融科技服务(上海)有限公司深圳分公司 Data maintenance method, device, equipment and storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114067985A (en) * 2021-09-15 2022-02-18 武汉联影医疗科技有限公司 Medical equipment test bill extracting method, computer equipment and storage medium
CN114217843A (en) * 2021-12-15 2022-03-22 中国农业银行股份有限公司 Operation and maintenance method and device of system and server

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104243216A (en) * 2014-09-28 2014-12-24 北京国双科技有限公司 Maintenance method and device of cluster server
CN106844137A (en) * 2016-12-08 2017-06-13 腾讯科技(深圳)有限公司 The monitoring method and device of server
CN107145779A (en) * 2017-03-16 2017-09-08 北京网康科技有限公司 A kind of recognition methods of offline Malware daily record and device
US20180314731A1 (en) * 2017-04-28 2018-11-01 Splunk Inc. Single point of dispatch for hybrid cloud deployment for indexer clusters
CN108897665A (en) * 2018-06-29 2018-11-27 平安科技(深圳)有限公司 Blog management method, device, computer equipment and storage medium
CN109144789A (en) * 2018-09-10 2019-01-04 网宿科技股份有限公司 A kind of method, apparatus and system for restarting OSD
CN109218041A (en) * 2017-06-29 2019-01-15 北京京东尚科信息技术有限公司 Request processing method and device for server system
CN109446309A (en) * 2018-10-30 2019-03-08 天津字节跳动科技有限公司 Problem feedback method and device
CN109491860A (en) * 2018-10-17 2019-03-19 深圳壹账通智能科技有限公司 Method for detecting abnormality, terminal device and the medium of application program

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104243216A (en) * 2014-09-28 2014-12-24 北京国双科技有限公司 Maintenance method and device of cluster server
CN106844137A (en) * 2016-12-08 2017-06-13 腾讯科技(深圳)有限公司 The monitoring method and device of server
CN107145779A (en) * 2017-03-16 2017-09-08 北京网康科技有限公司 A kind of recognition methods of offline Malware daily record and device
US20180314731A1 (en) * 2017-04-28 2018-11-01 Splunk Inc. Single point of dispatch for hybrid cloud deployment for indexer clusters
CN109218041A (en) * 2017-06-29 2019-01-15 北京京东尚科信息技术有限公司 Request processing method and device for server system
CN108897665A (en) * 2018-06-29 2018-11-27 平安科技(深圳)有限公司 Blog management method, device, computer equipment and storage medium
CN109144789A (en) * 2018-09-10 2019-01-04 网宿科技股份有限公司 A kind of method, apparatus and system for restarting OSD
CN109491860A (en) * 2018-10-17 2019-03-19 深圳壹账通智能科技有限公司 Method for detecting abnormality, terminal device and the medium of application program
CN109446309A (en) * 2018-10-30 2019-03-08 天津字节跳动科技有限公司 Problem feedback method and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112182193A (en) * 2020-10-19 2021-01-05 山东旗帜信息有限公司 Log obtaining method, device and medium in traffic industry
CN112182193B (en) * 2020-10-19 2023-01-13 山东旗帜信息有限公司 Log obtaining method, device and medium in traffic industry
CN112835853A (en) * 2020-12-31 2021-05-25 北京聚云科技有限公司 Data processing type determination method and device
CN112835853B (en) * 2020-12-31 2024-03-22 北京聚云科技有限公司 Data processing type determining method and device
CN117251196A (en) * 2023-11-20 2023-12-19 太平金融科技服务(上海)有限公司深圳分公司 Data maintenance method, device, equipment and storage medium

Also Published As

Publication number Publication date
WO2021051567A1 (en) 2021-03-25
CN110704390B (en) 2024-05-24

Similar Documents

Publication Publication Date Title
CN110704390B (en) Method, device, electronic equipment and medium for acquiring server maintenance script
CN110716868B (en) Abnormal program behavior detection method and device
US20150347923A1 (en) Error classification in a computing system
CN108776696B (en) Node configuration method and device, storage medium and electronic equipment
CN110858172A (en) Automatic test code generation method and device
CN110348471B (en) Abnormal object identification method, device, medium and electronic equipment
US11301355B2 (en) Method, electronic device, and computer program product for analyzing log file
CN114792089A (en) Method, apparatus and program product for managing computer system
CN113609008A (en) Test result analysis method and device and electronic equipment
CN111309585A (en) Log data testing method, device and system, electronic equipment and storage medium
CN109684198B (en) Method, device, medium and electronic equipment for acquiring data to be tested
CN111581344B (en) Interface information auditing method and device, computer equipment and storage medium
US20180375926A1 (en) Distributed processing systems
CN116225848A (en) Log monitoring method, device, equipment and medium
US11922129B2 (en) Causal knowledge identification and extraction
CN113590484B (en) Algorithm model service testing method, system, equipment and storage medium
CN115292187A (en) Method and device for automatically testing code-free page, electronic equipment and medium
CN113052509B (en) Model evaluation method, model evaluation device, electronic apparatus, and storage medium
CN111753548B (en) Information acquisition method and device, computer storage medium and electronic equipment
US20220343073A1 (en) Quantitative comment summarization
CN114490400A (en) Method and device for processing test cases
CN114860575A (en) Test data generation method and device, storage medium and electronic equipment
CN114282940A (en) Method and apparatus for intention recognition, storage medium, and electronic device
CN110674839A (en) Abnormal user identification method and device, storage medium and electronic equipment
CN118170688B (en) Configuration file detection method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant