WO2021051567A1 - 获取服务器维护脚本的方法、装置、电子设备及计算机非易失性可读存储介质 - Google Patents

获取服务器维护脚本的方法、装置、电子设备及计算机非易失性可读存储介质 Download PDF

Info

Publication number
WO2021051567A1
WO2021051567A1 PCT/CN2019/117689 CN2019117689W WO2021051567A1 WO 2021051567 A1 WO2021051567 A1 WO 2021051567A1 CN 2019117689 W CN2019117689 W CN 2019117689W WO 2021051567 A1 WO2021051567 A1 WO 2021051567A1
Authority
WO
WIPO (PCT)
Prior art keywords
server
log
type
maintenance
test data
Prior art date
Application number
PCT/CN2019/117689
Other languages
English (en)
French (fr)
Inventor
张旭明
宫林涛
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021051567A1 publication Critical patent/WO2021051567A1/zh

Links

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

Definitions

  • This application relates to the field of computer and communication technologies, and in particular to a method, device, electronic device, and computer non-volatile readable storage medium for obtaining server maintenance scripts.
  • Internet companies can usually provide Internet-based software services to a large number of users.
  • To provide software services to a large number of users Internet companies need a large number of servers to support. Therefore, current Internet services are usually based on the normal operation of multiple servers. .
  • Various problems may occur during the operation of the server, leading to problems with software services.
  • the maintenance personnel In order to ensure the normal operation of the server, the maintenance personnel will monitor the running status of the server and solve the problem in time when the server has a problem. , So as to ensure the normal operation of the server and software services.
  • the inventor of the present application realizes that current management tools usually require a client of the management tool to be installed on the electronic device used by the user, which results in complicated operations of the management server and low efficiency in maintaining the server.
  • one object of the present application is to provide a method, device, electronic device, and computer non-volatile readable storage medium for obtaining server maintenance scripts.
  • a method for obtaining a server maintenance script includes: receiving a server maintenance request, the server maintenance request including a server identification and problem information; and obtaining, according to the server identification, the process log in the server corresponding to the server identification Determine the degree of matching between the process log and the problem information according to the process log and the problem information; determine the problem process in the server according to the degree of matching between the process log and the problem information; obtain the type of the problem process , Sending the test data corresponding to the type of the problem process to the problem process to obtain the feedback data corresponding to the test data output by the problem process; input the type of the problem process and the feedback data into the diagnosis model To obtain the maintenance script output by the diagnostic model.
  • an apparatus for acquiring a server maintenance script includes: a receiving module, an acquiring module, a determining module, a testing module, and a diagnostic module, the receiving module is configured to receive a server maintenance request, and the server maintenance request includes a server identifier And problem information; the acquiring module is configured to acquire the process log in the server corresponding to the server identification according to the server identification; the determining module is configured to determine the process log and the problem information according to the process log and the problem information The degree of matching; the determining module is further configured to determine the problem process in the server according to the degree of matching between the process log and the problem information; the testing module is configured to obtain the type of the problem process, and report to the The problem process sends test data corresponding to the type of the problem process to obtain feedback data corresponding to the test data output by the problem process; the diagnosis module inputs the type of the problem process and the feedback data into the diagnosis model To obtain the maintenance script output by the diagnostic model.
  • an electronic device includes: a processor; and
  • the memory is configured to store a program for obtaining a server maintenance script of the processor; wherein the processor is configured to execute the method for obtaining a server maintenance script as described above by executing the program for obtaining a server maintenance script.
  • a computer non-volatile readable storage medium stores a program for obtaining server maintenance scripts, and when the program for obtaining server maintenance scripts is executed by a processor, the server maintenance script is obtained as described above. method.
  • a computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute as described in the first aspect of the embodiments of the present application Methods.
  • the efficiency of server maintenance can be improved at least to a certain extent.
  • Fig. 1 shows a schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of the present application can be applied.
  • Fig. 2 schematically shows a flowchart of a method for obtaining a server maintenance script according to an embodiment of the present application.
  • Fig. 3 schematically shows a flow chart of determining the degree of matching between the process log and the question information according to an embodiment of the present application.
  • Fig. 4 schematically shows a flow chart of determining the degree of matching between the process log and the question information according to an embodiment of the present application.
  • Fig. 5 schematically shows a flow chart of determining the problem process in the server according to the degree of matching between the process log and the problem information according to an embodiment of the present application.
  • Fig. 6 schematically shows a flowchart of a training process of a diagnostic model according to an embodiment of the present application.
  • Fig. 7 schematically shows a block diagram of an apparatus for obtaining a server maintenance script.
  • Fig. 8 shows a block diagram of an electronic device for implementing the above-mentioned method for acquiring a server maintenance script according to an exemplary embodiment.
  • Fig. 9 shows a schematic diagram of a computer non-volatile readable storage medium for implementing the above method for obtaining a server maintenance script according to an exemplary embodiment.
  • Fig. 1 shows a schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of the present application can be applied.
  • the system architecture may include a network 104, a server 105, and a maintenance server 106.
  • the network 104 is used as a medium for providing a communication link between the server 105 and the maintenance server 106.
  • the network 104 may include various connection types, such as wired communication links, wireless communication links, and so on.
  • the numbers of the network 104, the server 105, and the maintenance server 106 in FIG. 1 are merely illustrative. There can be any number of networks, servers 105, and maintenance servers 106 according to implementation needs.
  • the server 105 may be a server cluster composed of multiple servers 105.
  • the maintenance server 106 may receive the server maintenance request sent by the server 105 that needs maintenance, and the maintenance server 106 may also receive the 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 that needs to be maintained corresponding to the server identifier or obtains the process log of the specified process in the server 105 that needs to be maintained; determines the match between the process log and the problem information according to the process log and the problem information Degree; according to the matching degree of the process log and the problem information, determine the problematic process in the server 105 that needs to be maintained, so as to find the problematic process in the server 105 that needs to be maintained.
  • the maintenance server 106 then sends the test data corresponding to the problem process type to the problem process according to the type of the problem process, and obtains the feedback data output by the problem process for the test data; outputs the type of the problem process and the problem process
  • the feedback data is input into the diagnosis model, and the maintenance script output by the diagnosis model is obtained.
  • the diagnostic model automatically outputs the maintenance script, so that the central server 106 automatically generates the server that needs maintenance.
  • the server maintenance script of 105 avoids installing the client of the management tool on the electronic device used by the user, and also avoids the need for maintenance personnel to write different scripts according to different formats of different servers, thereby improving the maintenance efficiency of the server 105.
  • the method for obtaining server maintenance scripts provided by the embodiments of the present application is generally executed by the maintenance server 106. Accordingly, the device for obtaining server maintenance scripts is generally set in the maintenance server 106. However, in other embodiments of the present application, the maintenance server 106 may also receive maintenance requests sent by other terminal devices. The terminal device may also have a similar function to the maintenance server 106, so as to execute the method of obtaining a server maintenance script provided in the embodiment of the present application.
  • the maintenance server 106 acquiring the server maintenance script includes at least step S210 to step S270.
  • the server mentioned below is the server 105 in FIG. 1, and the details are as follows:
  • step S210 a server maintenance request is received, and the server maintenance request includes server identification and problem information.
  • each server identifier can correspond to the server one-to-one.
  • the server identifier can be the server's IP address (Internet Protocol Address) or other identifiers set manually.
  • the server identifier can also be Including the protocol port number provided by the server, through the protocol port number provided by the server, you can know which application software has the problem in the server.
  • each server identifier may correspond to a server group composed of multiple servers, and the probability that multiple servers in each server group will have the same problem in the future reaches a set value.
  • the probability of a certain server having a certain problem in the future is related to the probability of the server having the problem in the past. It can be determined that the greater the probability of the server having the problem in the past, the greater the probability of the server having the problem in the future.
  • each server identifier can correspond to a server group composed of multiple servers, and the multiple servers in each server group have the same format, and the same problem occurs due to servers using the same format, and the same maintenance is adopted.
  • Script maintenance can group servers that use the same format into a group to facilitate server maintenance.
  • step S220 the process log in the server corresponding to the server identifier is obtained according to the server identifier.
  • the server generates a corresponding process log when executing each task.
  • the process log describes the execution of the task.
  • searching for problematic processes in the server you can obtain information about all processes in the server.
  • Process log find problem processes in all processes, and maintain all processes in the server.
  • the process log of a specified process in the server can be obtained, and the problematic process can be found in the specified process.
  • the specified process may be a process with a high probability of occurrence of problems.
  • the specified process can be one or more. Targeted search and maintenance of the specified process in the server, reducing the amount of computing on the server.
  • step S230 the matching degree between the process log and the problem information is determined according to the process log and the problem information.
  • the process log and the problem information can be used to obtain the hash value of the two according to a set algorithm such as a hash algorithm, and the binary number corresponding to each character in the hash value can be searched, and each The binary numbers corresponding to the characters are combined according to the order of the characters in the hash value, and the binary array of the process log and the binary array of the problem information are obtained; the binary array of the process logs of the same length and the binary array of the problem information are intercepted from front to back , Calculate the Hamming distance between the binary array of the intercepted process log and the binary array of the problem information. The value of the Hamming distance is determined as the degree of matching between the process log and the problem information.
  • the hash value is generated from the full text of the process log and the problem information
  • comparing the similarity of the hash values of the two can compare the full text similarity of the process log and the problem information, so that the search result is accurate.
  • 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:
  • step S310 search for keywords in the question information.
  • the keyword can be one or multiple. Set the characters that can accurately describe the process problem as keywords. Each keyword can contain one or more characters.
  • a keyword reference table can be preset, and the same character as the preset keyword in the keyword reference table can be searched for as a keyword in the question information.
  • the function words in the question information can be removed, and the character that appears most frequently in the question information after the function words are removed is used as a keyword.
  • the information in the problem information can be accurately extracted, so that the selection of keywords is more in line with the reality of the problem.
  • step S320 the number of occurrences of keywords in the process log is obtained.
  • step S330 according to the number of times the keyword appears in the process log, the degree of matching between the process log and the problem information is determined.
  • Keyword weights and scores can be set artificially according to the importance of keywords. Since the calculated matching degree takes into account the importance of keywords, the calculated matching degree can reflect the severity of the problem, which is beneficial to maintenance process. At the same time, comparing keywords saves calculation and time than directly comparing the original text.
  • the process of determining the matching degree between the process log and the problem information in step S330 according to the number of times the keyword appears in the process log may include the following steps:
  • step S410 obtain the number of times the keyword appears in the process log of the process within a set time period
  • step S420 the number of times is divided by the total number of characters in the process log of the process within the set time period to obtain the degree of matching between the process log of the process and the problem information.
  • the set time period can be set as a period of time from the current time forward. Since each process has a limited time to execute a task each time, when a process runs the same task multiple times, the log generated in the process log of the process is circular, which can be set according to the time spent by each process in executing a task. Set a time period to reduce the amount of calculations.
  • step S240 the problem process in the server is determined according to the degree of matching between the process log and the problem information.
  • 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:
  • step S510 the number of process logs is determined
  • step S520 if there are multiple process logs, the degree of matching between each process log and the problem information is acquired;
  • step S530 the process corresponding to the process log with the highest matching degree is determined to be the problem process in the server.
  • the process log corresponding to the highest matching value is the most consistent with the problem information, so directly selecting the process corresponding to the process log with the highest matching degree can accurately find the problem process.
  • the process log whose matching degree reaches the set value can be found, the processes corresponding to the process log whose matching degree reaches the set value are determined as problem processes, and these problematic processes are maintained, because the matching degree reaches the set value.
  • the processes corresponding to the process log of the value have the same problem, and the unified maintenance of the processes with the same problem is more efficient.
  • the set value can be set to one or more, and multiple set values can be determined according to the dichotomy, that is, when the first set value is too high to achieve the matching degree of multiple processes, the second The set value is one-half of the first set value.
  • step S250 the type of the problem process is acquired, the test data corresponding to the type of the problem process is sent to the problem process, and the feedback data corresponding to the test data output by the problem process is obtained.
  • test data corresponding to the type of problem process is preset. You can preset the problem process type and test data comparison table, look up the preset problem process type and test data comparison table, and obtain the test data corresponding to each problem process in the server.
  • the problematic process type can be determined according to the process itself, and each process in the server corresponds to a preset type.
  • the problem process type can be determined according to the problem process itself and the problem information. For a problem process, when it matches different problem information, the corresponding test data is different.
  • the method for obtaining a server maintenance script further includes: when the server is working normally, obtaining the type of the process in the server, and sending the test data corresponding to the type of the process in the server to the process in the server , Get the normal feedback data corresponding to the test data output by the process in the server.
  • the method for obtaining the server maintenance script may further include: comparing 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 Value; if the difference does not reach the threshold, the process of maintaining the problem is abandoned.
  • 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, indicating that the problem of the problem process is within an acceptable range.
  • the threshold can be set based on historical data.
  • the problem process in the server can be determined again according to the matching degree between the process log and the problem information, and the problem processes that need to be maintained can be gradually filtered according to the matching degree from high to low.
  • the problem process is continued to be maintained.
  • step S260 the type of the problem process and the feedback data are input into the diagnosis model, and the maintenance script output by the diagnosis model is obtained.
  • the problem of the problem process can be reflected in the process log, and can also be reflected in the running result of the problem process.
  • the test data is used to reconfirm whether the process is a problem. Process, can more accurately obtain the specific problem situation in the problem process, and obtain the maintenance script according to the feedback data to make the maintenance script more targeted.
  • step S260 the process type and feedback data are input to the diagnosis model, and before the maintenance script output by the diagnosis model is obtained, the diagnosis model is pre-trained through the following process:
  • step S610 a process sample set is obtained, and each process sample in the process sample set is labeled with a corresponding maintenance script;
  • step S620 for each process sample in the process sample set, determine the type of the process sample, send the test data corresponding to the type of the process sample to the process sample, and compare the type of the process sample and the difference between the process sample and the test data.
  • the feedback data is input to the diagnosis model, and the diagnosis model outputs the maintenance script;
  • step S630 if the maintenance script is inconsistent with the maintenance script corresponding to the process sample label, adjust the diagnosis model to make the maintenance script consistent with the maintenance script corresponding to the process sample label.
  • the process sample may be a historical process.
  • obtain multiple historical processes and historical process maintenance scripts corresponding to multiple historical processes use the set of multiple historical processes as the process sample set, and use the historical process maintenance scripts corresponding to multiple historical processes as the process The maintenance script corresponding to the sample.
  • the server with the problem can be found by receiving the server maintenance request including the server ID and problem information; then the process log in the server corresponding to the server ID can be obtained to determine the process log and the problem According to the matching degree of the information, the matching degree between the process log and the problem information is determined according to the process log and the problem information; the problem process in the server is determined according to the matching degree between the process log and the problem information, thereby knowing which process in the server has a problem. Then, by acquiring the type of the problem process, and sending the test data corresponding to the type of the problem process to the problem process, the feedback data of the corresponding test data output by the problem process is obtained, and what kind of problem has occurred in the process. Finally, by inputting the type of the problem process and feedback data into the diagnosis model, the maintenance script output by the diagnosis model is obtained, which avoids operations such as installing the client and improves the maintenance efficiency of the server.
  • Fig. 7 schematically shows a block diagram of an apparatus for obtaining a server maintenance script according to an embodiment of the present application.
  • an apparatus 700 for obtaining a server maintenance script includes: a receiving module 701, an obtaining module 702, a determining module 703, a testing module 704, and a diagnosis module 705.
  • the receiving module 701 is configured to receive server maintenance requests, the server maintenance request includes server identification and problem information;
  • the obtaining module 702 is configured to obtain the process log in the server corresponding to the server identification according to the server identification;
  • the determining module 703 is configured to according to the process log The matching degree between the process log and the problem information is determined with the problem information;
  • the determining module 703 is also configured to determine the problem process in the server according to the matching degree between the process log and the problem information;
  • the testing module 704 is configured to obtain the type of the problem process and send it to the problem process
  • the test data corresponding to the type of the problem process obtains feedback data corresponding to the test data output by the problem process;
  • the diagnosis module 705 inputs the type and feedback data of the problem process into the diagnosis model to obtain the maintenance script output by the diagnosis model.
  • the determining module 703 is configured to: search for keywords in the problem information; obtain the number of times the keywords appear in the process log; determine according to the number of times the keywords appear in the process log The degree of match between the process log and the problem information.
  • the determining module 703 is configured to: obtain the number of occurrences of the keyword in the process log within a set time period; divide the number of times by the process log within the set time period The total number of characters in, get the matching degree of the process log and the problem information.
  • the determining module 703 is further configured to: when there are multiple process logs, obtain the matching degree between the multiple process logs and the problem information, and compare the matching between the multiple process logs and the problem information Degree, the process corresponding to the process log with the highest matching degree is determined as the problematic process in the server.
  • the diagnostic module 705 is configured to: obtain a process sample set, each process sample in the process sample set is labeled with a corresponding maintenance script; for each process in the process sample set Sample, judge the type of the process sample, send the test data corresponding to the process sample to the process sample, input the type of the process sample and the feedback data of the process sample to the test data into the diagnosis model, and the diagnosis model outputs the maintenance script; if it is maintained The script is inconsistent with the maintenance script corresponding to the process sample label, and the diagnosis model is adjusted to make the maintenance script consistent with the maintenance script corresponding to the process sample label.
  • the electronic device 80 according to this embodiment of the present application will be 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 function and scope of use of the embodiments of the present application.
  • the electronic device 80 is represented in the form of a general-purpose computing device.
  • the components of the electronic device 80 may include, but are not limited to: the above-mentioned at least one processing unit 81, the above-mentioned at least one storage unit 82, a bus 83 connecting different system components (including the storage unit 82 and the processing unit 81), and may also include one or more Display unit 84.
  • the storage unit stores program code, and the program code can be executed by the processing unit 81, so that the processing unit 81 executes the various exemplary methods described in the "Methods of Embodiments" section of this specification. Steps of implementation.
  • the storage unit 82 may include a readable medium in the form of a volatile storage unit, 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.
  • RAM random access storage unit
  • ROM read-only storage unit
  • the storage unit 82 may also include a program/utility tool 824 having a set of (at least one) program module 825.
  • program module 825 includes but is not limited to: an operating system, one or more application programs, other program modules, and program data, Each of these examples or some combination may include the implementation of a network environment.
  • the bus 83 may represent one or more of several types of bus structures, including a storage unit bus or a storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local area using any bus structure among multiple bus structures. bus.
  • the electronic device 80 may also communicate with one or more external devices (such as keyboards, pointing devices, Bluetooth devices, etc.), and may also communicate with one or more devices that enable the user to interact with the electronic device 80, and/or communicate with
  • the electronic device 80 can communicate with any device (such as a router, a modem, etc.) that communicates with one or more other computing devices.
  • the display unit 84 may be a display screen of a computing device. This communication can be performed through an input/output (I/O) interface 85.
  • the electronic device 80 may also communicate with one or more networks (for example, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 86.
  • networks for example, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet
  • the network adapter 86 communicates with other modules of the electronic device 80 through the bus 83. It should be understood that although not shown in the figure, other hardware and/or software modules can 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 system, etc.
  • the example embodiments described here can be implemented by software, or can be implemented by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network , Including several instructions to make a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) execute the method according to the embodiment of the present application.
  • a computing device which can be a personal computer, a server, a terminal device, or a network device, etc.
  • a computer-readable storage medium on which is stored a program product capable of implementing the above-mentioned method in this specification.
  • various aspects of the present application can also be implemented in the form of a program product, which includes program code.
  • the program product runs on a terminal device, the program code is used to make the The terminal device executes the steps according to various exemplary embodiments of the present application described in the above-mentioned "Exemplary Method" section of this specification.
  • a program product 90 for implementing the above method according to an embodiment of the present application is described. It can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be installed in a terminal device, For example, running on a personal computer.
  • the program product of this application is not limited to this.
  • the readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, device, or device.
  • the program product can use any combination of one or more readable media.
  • the readable medium may be a readable signal medium or a readable storage medium.
  • the readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above. More specific examples (non-exhaustive list) of readable storage media include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Type programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • the computer-readable signal medium may include a data signal propagated in baseband or as a part of a carrier wave, and readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the readable signal medium may also be any readable medium other than a readable storage medium, and the readable medium may send, propagate, or transmit a program for use by or in combination with the instruction execution system, apparatus, or device.
  • the program code contained on the readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
  • the program code used to perform the operations of the present application can be written in any combination of one or more programming languages.
  • the programming languages include object-oriented programming languages—such as Java, C++, etc., as well as conventional procedural programming languages. Programming language-such as "C" language or similar programming language.
  • the program code can be executed entirely on the user's computing device, partly on the user's device, executed as an independent software package, partly on the user's computing device and partly executed on the remote computing device, or entirely on the remote computing device or server Executed on.
  • the remote computing device can be connected to a user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (for example, using Internet service providers). Business to connect via the Internet).
  • LAN local area network
  • WAN wide area network
  • Internet service providers for example, using Internet service providers.
  • a computer program product includes a non-transitory computer-readable storage medium storing a computer program.
  • the computer program is operable to cause a computer to execute the The method to obtain the server maintenance script.

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

本申请提供了一种获取服务器维护脚本的方法、装置、电子设备及计算机非易失性可读存储介质,本申请实施例的获取服务器维护脚本的方法包括:接收服务器维护请求,服务器维护请求中包括服务器标识和问题信息;根据服务器标识获取对应的服务器中的进程日志;确定进程日志与问题信息的匹配度;根据进程日志与问题信息的匹配度确定服务器中的问题进程;获取问题进程的类型,向问题进程发送与其类型对应的测试数据,得到问题进程输出的反馈数据;将问题进程的类型和反馈数据输入诊断模型,得到诊断模型输出的维护脚本。该方案接受服务器维护申请后自动生成维护脚本,提高了服务器的维护效率。

Description

获取服务器维护脚本的方法、装置、电子设备及计算机非易失性可读存储介质 技术领域
本申请要求2019年09月17日递交、发明名称为“获取服务器维护脚本的方法、装置、电子设备及介质”的中国专利申请201910878003.8的优先权,在此通过引用将其全部内容合并于此。
本申请涉及计算机及通信技术领域,尤其涉及一种获取服务器维护脚本的方法、装置、电子设备及计算机非易失性可读存储介质。
背景技术
目前,互联网企业通常可以向海量的用户提供基于互联网的软件服务,互联网企业要实现向海量用户提供软件服务则需要大量的服务器进行支持,因此,当前的互联网服务通常是基于多个服务器正常运行的。服务器在运行过程中可能会出现各种各样的问题,从而导致软件服务出现问题,为了保证服务器的正常运行,维护人员会对服务器的运行状态进行监控,并在服务器出现问题时及时的解决问题,从而保证服务器以及软件服务的正常运行。
技术问题
本申请的发明人意识到,当前的管理工具通常需要在用户使用的电子设备上安装管理工具的客户端,导致管理服务器的操作较为复杂,维护服务器的效率较低。
技术解决方案
为了解决上述技术问题,本申请的一个目的在于提供一种获取服务器维护脚本的方法、装置、电子设备及计算机非易失性可读存储介质。
其中,本申请所采用的技术方案为:
第一方面,一种获取服务器维护脚本的方法,包括:接收服务器维护请求,所述服务器维护请求中包括服务器标识和问题信息;根据所述服务器标识获取所述服务器标识对应的服务器中的进程日志;根据所述进程日志与所述问题信息确定进程日志与问题信息的匹配度;根据所述进程日志与所述问题信息的匹配度确定所述服务器中的问题进程;获取所述问题进程的类型,向所述问题进程发送与所述问题进程的类型对应的测试数据,得到所述问题进程输出的对应所述测试数据的反馈数据;将所述问题进程的类型和所述反馈数据输入诊断模型,得到所述诊断模型输出的维护脚本。
第二方面,一种获取服务器维护脚本的装置,包括:接收模块、获取模块、确定模块、测试模块和诊断模块,所述接收模块配置为接收服务器维护请求,所述服务器维护请求中包括服务器标识和问题信息;所述获取模块配置为根据所述服务器标识获取所述服务器标识对应的服务器中的进程日志;所述确定模块配置为根据所述进程日志与所述问题信息确定进程日志与问题信息的匹配度;所述确定模块还配置为根据所述进程日志与所述问题信息的匹配度确定所述服务器中的问题进程;所述测试模块配置为获取所述问题进程的类型,向所述问题进程发送与所述问题进程的类型对应的测试数据,得到所述问题进程输出的对应所述测试数据的反馈数据;所述诊断模块将所述问题进程的类型和所述反馈数据输入诊断模型,得到所述诊断模型输出的维护脚本。
第三方面,一种电子设备,包括:处理器;以及
存储器,配置为存储所述处理器的获取服务器维护脚本的程序;其中,所述处理器配置为经由执行所述获取服务器维护脚本的程序来执行如上所述的获取服务器维护脚本的方法。
第四方面,一种计算机非易失性可读存储介质,其上存储有获取服务器维护脚本的程序,所述获取服务器维护脚本的程序被处理器执行时实现如上所述的获取服务器维护脚本的方法。
第五方面,一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行如本申请实施例第一方面所述的方法。
有益效果
在上述技术方案中,通过自动生成服务器维护脚本,进而至少在一定程度上可以提高维护服务器的效率。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本申请。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并于说明书一起用于解释本申请的原理。
图1示出了可以应用本申请实施例的技术方案的示例性系统架构的示意图。
图2示意性示出了根据本申请的一个实施例的获取服务器维护脚本的方法的流程图。
图3示意性示出了根据本申请的一个实施例的确定进程日志与问题信息的匹配度的流程图。
图4示意性示出了根据本申请的一个实施例的确定进程日志与问题信息的匹配度的流程图。
图5示意性示出了根据本申请的一个实施例中根据进程日志与问题信息的匹配度确定服务器中的问题进程的流程图。
图6示意性示出了根据本申请的一个实施例中诊断模型的训练过程的流程图。
图7示意性示出一种获取服务器维护脚本的装置的方框图。
图8示出根据示例性实施例的用于实现上述获取服务器维护脚本的方法的电子设备的框图。
图9示出根据示例性实施例的用于实现上述获取服务器维护脚本的方法的计算机非易失性可读存储介质的示意图。
通过上述附图,已示出本申请明确的实施例,后文中将有更详细的描述,这些附图和文字描述并不是为了通过任何方式限制本申请构思的范围,而是通过参考特定实施例为本领域技术人员说明本申请的概念。
本发明的实施方式
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本申请将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。
此外,所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施例中。在下面的描述中,提供许多具体细节从而给出对本申请的实施例的充分理解。然而,本领域技术人员将意识到,可以实践本申请的技术方案而没有特定细节中的一个或更多,或者可以采用其它的方法、组元、装置、步骤等。在其它情况下,不详细示出或描述公知方法、装置、实现或者操作以避免模糊本申请的各方面。
附图中所示的方框图仅仅是功能实体,不一定必须与物理上独立的实体相对应。即,可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。
附图中所示的流程图仅是示例性说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解,而有的操作/步骤可以合并或部分合并,因此实际执行的顺序有可能根据实际情况改变。
图1示出了可以应用本申请实施例的技术方案的示例性系统架构的示意图。
如图1所示,系统架构可以包括网络104、服务器105、维护服务器106。网络104用以在服务器105和维护服务器106之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线通信链路、无线通信链路等等。
应该理解,图1中的网络104、服务器105和维护服务器106的数目仅仅是示意性的。根据实现需要,可以具有任意数目的网络、服务器105和维护服务器106。比如服务器105可以是多个服务器105组成的服务器集群等。
在本申请的一个实施例中,维护服务器106可以接收需要维护的服务器105发送的服务器维护请求,维护服务器106也可以接收自身产生的服务器维护请求。服务器维护请求中包括需要维护的服务器105的服务器标识和需要维护的服务器105中存在的问题信息。维护服务器106再获取与服务器标识对应的需要维护的服务器105中每个进程的进程日志或者获取需要维护的服务器105中指定进程的进程日志;根据进程日志与问题信息确定进程日志与问题信息的匹配度;根据进程日志与问题信息的匹配度确定需要维护的服务器105中的问题进程,从而找到需要维护的服务器105中出现问题的问题进程。维护服务器106再针对该问题进程的类型,向该问题进程发送与该问题进程的类型对应的测试数据,得到该问题进程针对测试数据输出的反馈数据;将该问题进程的类型和该问题进程输出的反馈数据输入诊断模型,得到诊断模型输出的维护脚本。
可见,由于本申请实施例的技术方案通过向诊断模型输入需要维修的服务器105中问题进程对测试数据的反馈数据,使诊断模型自动输出维护脚本,从而使中央服务器106自动生成针对需要维护的服务器105的服务器维护脚本,避免了在用户使用的电子设备上安装管理工具的客户端,也避免了维护人员需要根据不同服务器的不同格式编写不同的脚本,提高了服务器105的维护效率。
需要说明的是,本申请实施例所提供的获取服务器维护脚本方法一般由维护服务器106执行,相应地,获取服务器维护脚本装置一般设置于维护服务器106中。但是,在本申请的其它实施例中,维护服务器106也可以接收其他终端设备发送的维护请求。终端设备也可以与维护服务器106具有相似的功能,从而执行本申请实施例所提供的获取服务器维护脚本方法。
以下对本申请实施例的技术方案的实现细节进行详细阐述:
参照图2所示,维护服务器106获取服务器维护脚本至少包括步骤S210至步骤S270,下文中提到的服务器即为图1中的服务器105,详细介绍如下:
在步骤S210中,接收服务器维护请求,服务器维护请求中包括服务器标识和问题信息。
在本申请的一个实施例中,每个服务器标识可以与服务器一一对应,服务器标识可以是服务器的IP地址(Internet Protocol Address,因特网协议地址)或者是人为设定的其他标识,服务器标识还可以包括服务器提供的协议端口号,通过服务器提供的协议端口号可以知道知道服务器中出现问题的应用软件是哪一个。
在本申请的一个实施例中,每个服务器标识可以对应一个由多个服务器组成的服务器组,每个服务器组中的多个服务器在将来出现同一问题的概率均达到设定值。某一服务器将来出现某个问题的概率与该服务器以往出现该问题的概率有关,可以确定该服务器以往出现该问题的概率越大,则该服务器将来出现该问题的概率越大。
将出现同一问题的概率达到设定值的服务器分成一组,同一组服务器都有很大概率出现同一问题,将出现同一问题的服务器对应同一个服务器标识,由于同一个问题的服务器维护脚本相同,这样只需获得该问题的服务器维护脚本就能解决一组服务器出现的问题。
在本申请的一个实施例中,每个服务器标识可以对应一个由多个服务器组成的服务器组,每个服务器组中的多个服务器格式相同,由于使用同一格式的服务器出现的同一问题采用同一维护脚本维护,将使用同一格式的服务器分在一组方便维护服务器。
在步骤S220中,根据服务器标识获取服务器标识对应的服务器中的进程日志。
在本申请的一个实施例中,服务器在执行每个任务时都会生成相应的进程日志,进程日志中描述了任务执行情况,在查找服务器中出现问题的问题进程时,可以获取服务器中所有进程的进程日志,在所有进程中查找问题进程可以对服务器中所有的进程进行维护。
在本申请的一个实施例中,在查找服务器中出现问题的问题进程时,可以获取服务器中指定进程的进程日志,在指定进程中查找问题进程,指定进程可以是出现问题可能性较大的进程,指定进程可以是一个或多个。有针对性的对服务器中的指定进程进行查找维护,减少了服务器的运算量。
在步骤S230中,根据进程日志与问题信息确定进程日志与问题信息的匹配度。
在本申请的一个实施例中,可以将进程日志与问题信息分别按设定的算法如哈希算法得到二者的哈希值,查找哈希值中每个字符对应的二进制数,并将每个字符对应的二进制数按照该字符在哈希值中的排序进行组合,得到进程日志的二进制数组和问题信息的二进制数组;从前向后截取相同长度的进程日志的二进制数组和问题信息的二进制数组,计算截取的进程日志的二进制数组和问题信息的二进制数组的汉明距离。将汉明距离的值确定为进程日志与问题信息的匹配度。
由于哈希值是由进程日志和问题信息的全文生成的,比较二者哈希值的相似度就能比较进程日志和问题信息的全文相似度,使查找结果准确。
在本申请的一个实施例中,如图3所示,步骤S230中根据进程日志与问题信息确定进程日志与问题信息的匹配度的过程,可以包括如下步骤:
在步骤S310中,查找问题信息中的关键字。
关键字可以为一个也可以为多个,将能够准确描述进程问题的字符设定成关键字,每个关键字中可以包含一个或多个字符。
在本申请的一个实施例中,可以预设关键字参考表,可以在问题信息中查找与关键字参考表中的预设关键字相同的字符作为关键字。
在本申请的一个实施例中,可以去除问题信息中的虚词,将去除虚词之后的问题信息中出现次数最多的字符作为关键字。能够准确提取出问题信息中的信息,使关键字的选取更加贴合问题实际。
在步骤S320中,获取进程日志中关键字出现的次数。
当关键字有多个时,分别获取每个关键字的次数。
在步骤S330中,根据关键字在该进程日志中出现的次数,确定该进程日志与问题信息的匹配度。
查找进程日志中与问题信息中的关键字相同的字符,当关键字有多个时,可以将不同关键字设定为不同权重和不同分数,求每个关键字的分数、权重和次数的积,将每个关键字的分数、权重和次数的积相加得到该进程的进程日志与问题信息的匹配度。关键字权重和分数的设定可以根据关键字的重要程度人为设定,由于计算出的匹配度考虑了关键字的重要程度,使计算出来的匹配度能够体现出问题的严重程度,有利于维护进程。同时,比较关键字比直接比较原文节约计算量,节约时间。
在本申请的一个实施例中,如图4所示,步骤S330中根据关键字在该进程日志中出现的次数,确定该进程日志与问题信息的匹配度的过程,可以包括如下步骤:
在步骤S410中,获取关键字在该进程的进程日志中在设定时间段内出现的次数;
在步骤S420中,用次数除以该进程的进程日志在设定时间段内的总字符数,得到该进程的进程日志与问题信息的匹配度。
设定时间段可以设定为从当时间往前的一段时间。由于每个进程每次执行任务的时间有限,当一个进程多次运行同一任务时在该进程的进程日志中产生的日志是循环的,可以根据每个进程在执行一次任务时花费的时间来设定时间段,减少运算量。
继续参照图2,在步骤S240中,根据进程日志与问题信息的匹配度确定服务器中的问题进程。
在本申请的一个实施例中,如图5所示,在步骤S240中根据进程日志与问题信息的匹配度确定服务器中的问题进程的过程,可以包括如下步骤:
在步骤S510中,确定进程日志的数量;
在步骤S520中,若进程日志为多个,则获取每个进程日志与问题信息的匹配度;
在步骤S530中,获取匹配度最高的进程日志对应的进程确定为服务器中的问题进程。
由于匹配度是通过将问题信息与进程日志做比较得出的,匹配度最高的值对应的进程日志是最符合问题信息的,所以直接选取匹配度最高的进程日志对应的进程能够准确的找到问题进程。
在本申请的一个实施例中,可以找到匹配度达到设值的进程日志,将匹配度达到设值的进程日志对应的进程都确定为问题进程,对这些问题进程进行维护,由于匹配度达到设值的进程日志对应的进程都出现了同一问题,将出现同一问题的进程统一维护效率更高。
其中,设定值可以设定为一个或多个,多个设定值可以根据二分法确定,即当第一个设定值太高使多个进程的匹配度都不能达到时,第二个设定值取第一个设定值的二分之一。
继续参照图2,在步骤S250中,获取问题进程的类型,向问题进程发送与问题进程的类型对应的测试数据,得到问题进程输出的对应测试数据的反馈数据。
在本申请的一个实施例中,问题进程的类型有一种或多种,对于每一种类型的问题进程,预设有与该种类型的问题进程对应的测试数据。可以预设问题进程类型与测试数据对照表,查找预设的问题进程类型与测试数据对照表,获得服务器中的每个问题进程对应的测试数据。问题进程类型可以根据进程本身来确定,服务器中的每个进程都对应一个预设的类型。
在本申请的一个实施例中,问题进程类型可以根据问题进程本身和问题信息来确定,对于一个问题进程,当其与不同问题信息匹配时,对应的测试数据不同。
在本申请的一个实施例中,该获取服务器维护脚本的方法还包括:在服务器正常工作时,获取服务器中的进程的类型,向服务器中的进程发送与服务器中的进程的类型对应的测试数据,得到服务器中的进程输出的对应测试数据的正常反馈数据。在步骤S250中,得到问题进程输出的对应测试数据的反馈数据之后,该获取服务器维护脚本的方法还可以包括:比较问题进程输出的对应测试数据的反馈数据与问题进程输出的正常反馈数据的差值;若差值未达到阈值,则放弃维护该问题进程。
在上述实施例中,由于问题进程输出的对应测试数据的反馈数据与问题进程输出的正常反馈数据的差值未达到阈值,说明该问题进程的问题在可以接受的范围内,为了节约资源,可以不维护该问题进程。阈值可以根据历史数据设定。
在上述实施例中,放弃维护该问题进程后,可以重新根据进程日志与问题信息的匹配度确定服务器中的问题进程,可以根据匹配度由高到低来逐渐筛选需要维护的问题进程。
在上述实施例中,若问题进程输出的对应测试数据的反馈数据与问题进程输出的正常反馈数据的差值达到阈值,则继续维护该问题进程。
在步骤S260中,将问题进程的类型和反馈数据输入诊断模型,得到诊断模型输出的维护脚本。
在上述实施例中,问题进程出现的问题通过进程日志能够体现出来,也能够通过问题进程的运行结果体现出来,在通过进程日志查找到问题进程后,再通过测试数据再次确认该进程是否是问题进程,能够更准确的获得问题进程中具体的问题情况,针对该反馈数据来得到维护脚本使维护脚本更加有针对性。
在本申请的一个实施例中,如图6所示,在步骤S260中将进程的类型和反馈数据输入诊断模型,得到诊断模型输出的维护脚本之前,诊断模型通过以下过程预先训练:
在步骤S610中,获取进程样本集合,进程样本集合中的每个进程样本贴有对应维护脚本的标签;
在步骤S620中,针对进程样本集合中的每个进程样本,判断该进程样本的类型,向该进程样本发送与进程样本的类型对应的测试数据,将进程样本的类型和进程样本对测试数据的反馈数据输入诊断模型,诊断模型输出维护脚本;
在步骤S630中,如果维护脚本与该进程样本标签对应的维护脚本不一致,调整诊断模型,使维护脚本与该进程样本标签对应的维护脚本一致。
在本申请的一个实施例中,进程样本可以为历史进程。在获取进程样本集合之前,获取多个历史进程和多个历史进程对应的历史进程维护脚本,将多个历史进程组成的集合作为进程样本集合,将多个历史进程对应的历史进程维护脚本作为进程样本对应的维护脚本。
在本申请的一些实施例所提供的技术方案中,通过接收包括服务器标识和问题信息的服务器维护请求可以找到出现问题的服务器;再获取服务器标识对应的服务器中的进程日志,确定进程日志与问题信息的匹配度,根据进程日志与问题信息确定进程日志与问题信息的匹配度;根据进程日志与问题信息的匹配度确定服务器中的问题进程,从而得知服务器中那个进程出现问题。再通过获取问题进程的类型,向问题进程发送与问题进程的类型对应的测试数据,得到问题进程输出的对应测试数据的反馈数据,得知进程出现了什么样的问题。最后通过将问题进程的类型和反馈数据输入诊断模型,得到诊断模型输出的维护脚本,避免了安装客户端等操作,提高了服务器的维护效率。
以下介绍本申请的装置实施例,可以用于执行本申请上述实施例中的获取服务器维护脚本的方法。对于本申请装置实施例中未披露的细节,请参照本申请上述的获取服务器维护脚本的方法的实施例。
图7示意性示出了根据本申请的一个实施例的获取服务器维护脚本的装置的框图。
参照图7所示,根据本申请的一个实施例的获取服务器维护脚本的装置700,包括:接收模块701、获取模块702、确定模块703、测试模块704和诊断模块705。
其中,接收模块701配置为接收服务器维护请求,服务器维护请求中包括服务器标识和问题信息;获取模块702配置为根据服务器标识获取服务器标识对应的服务器中的进程日志;确定模块703配置为根据进程日志与问题信息确定进程日志与问题信息的匹配度;确定模块703还配置为根据进程日志与问题信息的匹配度确定服务器中的问题进程;测试模块704配置为获取问题进程的类型,向问题进程发送与问题进程的类型对应的测试数据,得到问题进程输出的对应测试数据的反馈数据;诊断模块705将问题进程的类型和反馈数据输入诊断模型,得到诊断模型输出的维护脚本。
在本申请的一些实施例中,基于前述方案,确定模块703配置为:查找问题信息中的关键字;获取进程日志中关键字出现的次数;根据关键字在该进程日志中出现的次数,确定该进程日志与问题信息的匹配度。
在本申请的一些实施例中,基于前述方案,确定模块703配置为:获取关键字在该进程日志中在设定时间段内出现的次数;用次数除以该进程日志在设定时间段内的总字符数,得到该进程日志与问题信息的匹配度。
在本申请的一些实施例中,基于前述方案,确定模块703还配置为:当进程日志为多个时,获取多个进程日志与问题信息的匹配度,比较多个进程日志与问题信息的匹配度,将匹配度最高的进程日志对应的进程确定为服务器中的问题进程。
在本申请的一些实施例中,基于前述方案,诊断模块705配置为:获取进程样本集合,进程样本集合中的每个进程样本贴有对应维护脚本的标签;针对进程样本集合中的每个进程样本,判断该进程样本的类型,向该进程样本发送与进程样本的类型对应的测试数据,将进程样本的类型和进程样本对测试数据的反馈数据输入诊断模型,诊断模型输出维护脚本;如果维护脚本与该进程样本标签对应的维护脚本不一致,调整诊断模型,使维护脚本与该进程样本标签对应的维护脚本一致。
所属技术领域的技术人员能够理解,本申请的各个方面可以实现为系统、方法或程序产品。因此,本申请的各个方面可以具体实现为以下形式,即:完全的硬件实施方式、完全的软件实施方式(包括固件、微代码等),或硬件和软件方面结合的实施方式,这里可以统称为“电路”、“模块”或“系统”。
下面参照图8来描述根据本申请的这种实施方式的电子设备80。图8显示的电子设备80仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。
如图8所示,电子设备80以通用计算设备的形式表现。电子设备80的组件可以包括但不限于:上述至少一个处理单元81、上述至少一个存储单元82、连接不同系统组件(包括存储单元82和处理单元81)的总线83,还可以包括一个或多个显示单元84。
其中,所述存储单元存储有程序代码,所述程序代码可以被所述处理单元81执行,使得所述处理单元81执行本说明书上述“实施例方法”部分中描述的根据本申请各种示例性实施方式的步骤。
存储单元82可以包括易失性存储单元形式的可读介质,例如随机存取存储单元(RAM)821和/或高速缓存存储单元822,还可以进一步包括只读存储单元(ROM)823。
存储单元82还可以包括具有一组(至少一个)程序模块825的程序/实用工具824,这样的程序模块825包括但不限于:操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。
总线83可以为表示几类总线结构中的一种或多种,包括存储单元总线或者存储单元控制器、外围总线、图形加速端口、处理单元或者使用多种总线结构中的任意总线结构的局域总线。
电子设备80也可以与一个或多个外部设备(例如键盘、指向设备、蓝牙设备等)通信,还可与一个或者多个使得用户能与该电子设备80交互的设备通信,和/或与使得该电子设备80能与一个或多个其它计算设备进行通信的任何设备(例如路由器、调制解调器等等)通信。显示单元84可以为计算设备的显示屏幕。这种通信可以通过输入/输出(I/O)接口85进行。并且,电子设备80还可以通过网络适配器86与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器86通过总线83与电子设备80的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备80使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本申请实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、终端装置、或者网络设备等)执行根据本申请实施方式的方法。
根据本申请一个实施例,还提供了一种计算机可读存储介质,其上存储有能够实现本说明书上述方法的程序产品。在一些可能的实施方式中,本申请的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当所述程序产品在终端设备上运行时,所述程序代码用于使所述终端设备执行本说明书上述“示例性方法”部分中描述的根据本申请各种示例性实施方式的步骤。
参考图9所示,描述了根据本申请的实施方式的用于实现上述方法的程序产品90,其可以采用便携式紧凑盘只读存储器(CD-ROM)并包括程序代码,并可以在终端设备,例如个人电脑上运行。然而,本申请的程序产品不限于此,在本文件中,可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。
所述程序产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以为但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。
计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读信号介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。
可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。
可以以一种或多种程序设计语言的任意组合来编写用于执行本申请操作的程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。
根据本申请一个实施例,还提供了一种计算机程序产品,计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,计算机程序可操作来使计算机执行如本申请上述实施例中的获取服务器维护脚本的方法。
本领域技术人员在考虑说明书及实践这里申请的发明后,将容易想到本申请的其它实施方案。本申请旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本申请的一般性原理并包括本申请未申请的本技术领域中的公知常识或惯用技术手段。
应当理解的是,本申请并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本申请的范围仅由所附的权利要求来限制。

Claims (22)

  1. 一种获取服务器维护脚本的方法,包括:
    接收服务器维护请求,所述服务器维护请求中包括服务器标识和问题信息;
    根据所述服务器标识获取所述服务器标识对应的服务器中的进程日志;
    根据所述进程日志与所述问题信息确定进程日志与问题信息的匹配度;
    根据所述进程日志与所述问题信息的匹配度确定所述服务器中的问题进程;
    获取所述问题进程的类型,向所述问题进程发送与所述问题进程的类型对应的测试数据,得到所述问题进程输出的对应所述测试数据的反馈数据;
    将所述问题进程的类型和所述反馈数据输入诊断模型,得到所述诊断模型输出的维护脚本。
  2. 根据权利要求1所述的获取服务器维护脚本的方法,其中,所述确定进程日志与所述问题信息的匹配度,包括:
    查找所述问题信息中的关键字;
    获取所述进程日志中所述关键字出现的次数;
    根据所述关键字在该进程日志中出现的次数,确定该进程日志与所述问题信息的匹配度。
  3. 根据权利要求2所述的获取服务器维护脚本的方法,其中,所述根据所述关键字在该进程日志中出现的次数,确定该进程日志与所述问题信息的匹配度包括:
    获取所述关键字在该进程日志中在设定时间段内出现的次数;
    用所述次数除以该进程日志在所述设定时间段内的总字符数,得到该进程日志与所述问题信息的匹配度。
  4. 根据权利要求1所述的获取服务器维护脚本的方法,其中,所述根据进程日志与所述问题信息的匹配度确定所述服务器中的问题进程,包括:
    确定所述进程日志的数量;
    若所述进程日志为多个,则获取每个进程日志与所述问题信息的匹配度;
    获取所述匹配度最高的进程日志对应的进程确定为所述服务器中的问题进程。
  5. 根据权利要求1所述的获取服务器维护脚本的方法,其中,所述方法包括:
    在所述服务器正常工作时,获取所述服务器中的进程的类型,向所述服务器中的进程发送与所述服务器中的进程的类型对应的测试数据,得到所述服务器中的进程输出的对应所述测试数据的正常反馈数据;
    在所述得到所述问题进程输出的对应所述测试数据的反馈数据之后,所述方法包括:
    比较所述问题进程输出的对应所述测试数据的反馈数据与所述问题进程输出的正常反馈数据的差值;
    若所述差值未达到阈值,则放弃维护该问题进程。
  6. 根据权利要求1所述的获取服务器维护脚本的方法,其中,
    所述获取所述问题进程的类型,向所述问题进程发送与所述问题进程的类型对应的测试数据,包括:
    所述问题进程的类型有一种或多种,对于每一种类型的问题进程,预设有与该种类型的问题进程对应的测试数据。
  7. 根据权利要求1所述的获取服务器维护脚本的方法,其中,所述诊断模型通过以下过程预先训练:
    获取进程样本集合,所述进程样本集合中的每个进程样本贴有对应所述维护脚本的标签;
    针对所述进程样本集合中的每个进程样本,判断该进程样本的类型,向该进程样本发送与所述进程样本的类型对应的测试数据,将所述进程样本的类型和所述进程样本对测试数据的反馈数据输入所述诊断模型,所述诊断模型输出所述维护脚本;
    如果所述维护脚本与该进程样本标签对应的所述维护脚本不一致,调整所述诊断模型,使所述维护脚本与该进程样本标签对应的所述维护脚本一致。
  8. 一种用户特征群中用户特征寻优装置,其中,包括:
    接收模块,配置为接收服务器维护请求,所述服务器维护请求中包括服务器标识和问题信息;
    获取模块,配置为根据所述服务器标识获取所述服务器标识对应的服务器中的进程日志;
    确定模块,配置为根据所述进程日志与所述问题信息确定进程日志与问题信息的匹配度;
    所述确定模块还配置为根据所述进程日志与所述问题信息的匹配度确定所述服务器中的问题进程;
    测试模块,配置为获取所述问题进程的类型,向所述问题进程发送与所述问题进程的类型对应的测试数据,得到所述问题进程输出的对应所述测试数据的反馈数据;
    诊断模块,将所述问题进程的类型和所述反馈数据输入诊断模型,得到所述诊断模型输出的维护脚本。
  9. 根据权利要求8所述的装置,所述确定模块被配置为:
    查找所述问题信息中的关键字;获取所述进程日志中所述关键字出现的次数;根据所述关键字在该进程日志中出现的次数,确定该进程日志与所述问题信息的匹配度。
  10. 根据权利要求8所述的装置,所述确定模块被配置为:
    获取所述关键字在该进程日志中在设定时间段内出现的次数;用所述次数除以该进程日志在所述设定时间段内的总字符数,得到该进程日志与所述问题信息的匹配度。
  11. 根据权利要求8所述的装置,所述确定模块被配置为:
    确定所述进程日志的数量;若所述进程日志为多个,则获取每个进程日志与所述问题信息的匹配度;获取所述匹配度最高的进程日志对应的进程确定为所述服务器中的问题进程。
  12. 根据权利要求8所述的装置,所述获取模块被配置为:
    在所述服务器正常工作时,获取所述服务器中的进程的类型,向所述服务器中的进程发送与所述服务器中的进程的类型对应的测试数据,得到所述服务器中的进程输出的对应所述测试数据的正常反馈数据;所述确定模块还配置为:比较所述问题进程输出的对应所述测试数据的反馈数据与所述问题进程输出的正常反馈数据的差值;若所述差值未达到阈值,则放弃维护该问题进程。
  13. 根据权利要求8所述的装置,所述测试模块被配置为:
    所述问题进程的类型有一种或多种,对于每一种类型的问题进程,预设有与该种类型的问题进程对应的测试数据。
  14. 根据权利要求8所述的装置,所述诊断被配置为:
    获取进程样本集合,所述进程样本集合中的每个进程样本贴有对应所述维护脚本的标签;针对所述进程样本集合中的每个进程样本,判断该进程样本的类型,向该进程样本发送与所述进程样本的类型对应的测试数据,将所述进程样本的类型和所述进程样本对测试数据的反馈数据输入所述诊断模型,所述诊断模型输出所述维护脚本;如果所述维护脚本与该进程样本标签对应的所述维护脚本不一致,调整所述诊断模型,使所述维护脚本与该进程样本标签对应的所述维护脚本一致。
  15. 一种电子设备,其中,包括:处理器;以及存储器,用于存储所述处理器的获取服务器维护脚本的程序;其中,所述处理器配置为经由执行所述获取服务器维护脚本的程序来执行以下处理:
    接收服务器维护请求,所述服务器维护请求中包括服务器标识和问题信息;
    根据所述服务器标识获取所述服务器标识对应的服务器中的进程日志;
    根据所述进程日志与所述问题信息确定进程日志与问题信息的匹配度;
    根据所述进程日志与所述问题信息的匹配度确定所述服务器中的问题进程;
    获取所述问题进程的类型,向所述问题进程发送与所述问题进程的类型对应的测试数据,得到所述问题进程输出的对应所述测试数据的反馈数据;
    将所述问题进程的类型和所述反馈数据输入诊断模型,得到所述诊断模型输出的维护脚本。
  16. 根据权利要求15所述的电子设备,其中,所述确定进程日志与所述问题信息的匹配度,包括:
    查找所述问题信息中的关键字;
    获取所述进程日志中所述关键字出现的次数;
    根据所述关键字在该进程日志中出现的次数,确定该进程日志与所述问题信息的匹配度。
  17. 根据权利要求15所述的电子设备,其中,所述根据所述关键字在该进程日志中出现的次数,确定该进程日志与所述问题信息的匹配度,包括:
    获取所述关键字在该进程日志中在设定时间段内出现的次数;
    用所述次数除以该进程日志在所述设定时间段内的总字符数,得到该进程日志与所述问题信息的匹配度。
  18. 根据权利要求15所述的电子设备,其中,所述根据进程日志与所述问题信息的匹配度确定所述服务器中的问题进程,包括:
    确定所述进程日志的数量;
    若所述进程日志为多个,则获取每个进程日志与所述问题信息的匹配度;
    获取所述匹配度最高的进程日志对应的进程确定为所述服务器中的问题进程。
  19. 根据权利要求15所述的电子设备,其中,还包括:
    在所述服务器正常工作时,获取所述服务器中的进程的类型,向所述服务器中的进程发送与所述服务器中的进程的类型对应的测试数据,得到所述服务器中的进程输出的对应所述测试数据的正常反馈数据;
    在所述得到所述问题进程输出的对应所述测试数据的反馈数据之后,所述方法包括:
    比较所述问题进程输出的对应所述测试数据的反馈数据与所述问题进程输出的正常反馈数据的差值;
    若所述差值未达到阈值,则放弃维护该问题进程。
  20. 根据权利要求15所述的电子设备,其中,所述获取所述问题进程的类型,向所述问题进程发送与所述问题进程的类型对应的测试数据,包括:
    所述问题进程的类型有一种或多种,对于每一种类型的问题进程,预设有与该种类型的问题进程对应的测试数据。
  21. 根据权利要求15所述的电子设备,其中,还包括:
    获取进程样本集合,所述进程样本集合中的每个进程样本贴有对应所述维护脚本的标签;
    针对所述进程样本集合中的每个进程样本,判断该进程样本的类型,向该进程样本发送与所述进程样本的类型对应的测试数据,将所述进程样本的类型和所述进程样本对测试数据的反馈数据输入所述诊断模型,所述诊断模型输出所述维护脚本;
    如果所述维护脚本与该进程样本标签对应的所述维护脚本不一致,调整所述诊断模型,使所述维护脚本与该进程样本标签对应的所述维护脚本一致。
  22. 一种计算机非易失性可读存储介质,其上存储有获取服务器维护脚本的程序,其中,所述获取服务器维护脚本的程序被处理器执行时实现权利要求1至7任一项所述的方法。
PCT/CN2019/117689 2019-09-17 2019-11-12 获取服务器维护脚本的方法、装置、电子设备及计算机非易失性可读存储介质 WO2021051567A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910878003.8A CN110704390B (zh) 2019-09-17 2019-09-17 获取服务器维护脚本的方法、装置、电子设备及介质
CN201910878003.8 2019-09-17

Publications (1)

Publication Number Publication Date
WO2021051567A1 true WO2021051567A1 (zh) 2021-03-25

Family

ID=69195286

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/117689 WO2021051567A1 (zh) 2019-09-17 2019-11-12 获取服务器维护脚本的方法、装置、电子设备及计算机非易失性可读存储介质

Country Status (2)

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

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112182193B (zh) * 2020-10-19 2023-01-13 山东旗帜信息有限公司 一种交通行业中日志获取方法、设备及介质
CN112835853B (zh) * 2020-12-31 2024-03-22 北京聚云科技有限公司 一种数据处理类型确定方法及装置
CN117251196A (zh) * 2023-11-20 2023-12-19 太平金融科技服务(上海)有限公司深圳分公司 一种数据维护方法、装置、设备及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180314731A1 (en) * 2017-04-28 2018-11-01 Splunk Inc. Single point of dispatch for hybrid cloud deployment for indexer clusters
CN109144789A (zh) * 2018-09-10 2019-01-04 网宿科技股份有限公司 一种重启osd的方法、装置及系统
CN109491860A (zh) * 2018-10-17 2019-03-19 深圳壹账通智能科技有限公司 应用程序的异常检测方法、终端设备及介质

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104243216A (zh) * 2014-09-28 2014-12-24 北京国双科技有限公司 集群服务器的维护方法及装置
CN106844137B (zh) * 2016-12-08 2020-05-19 腾讯科技(深圳)有限公司 服务器的监控方法和装置
CN107145779B (zh) * 2017-03-16 2020-01-17 北京网康科技有限公司 一种离线恶意软件日志的识别方法和装置
CN109218041B (zh) * 2017-06-29 2022-03-11 北京京东尚科信息技术有限公司 用于服务器系统的请求处理方法和装置
CN108897665B (zh) * 2018-06-29 2021-06-15 平安科技(深圳)有限公司 日志管理方法、装置、计算机设备及存储介质
CN109446309B (zh) * 2018-10-30 2021-08-27 天津字节跳动科技有限公司 问题反馈方法及装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180314731A1 (en) * 2017-04-28 2018-11-01 Splunk Inc. Single point of dispatch for hybrid cloud deployment for indexer clusters
CN109144789A (zh) * 2018-09-10 2019-01-04 网宿科技股份有限公司 一种重启osd的方法、装置及系统
CN109491860A (zh) * 2018-10-17 2019-03-19 深圳壹账通智能科技有限公司 应用程序的异常检测方法、终端设备及介质

Also Published As

Publication number Publication date
CN110704390A (zh) 2020-01-17
CN110704390B (zh) 2024-05-24

Similar Documents

Publication Publication Date Title
WO2021051567A1 (zh) 获取服务器维护脚本的方法、装置、电子设备及计算机非易失性可读存储介质
US11057502B2 (en) Cloud assisted behavioral automated testing
CN111026653B (zh) 异常程序行为检测方法、装置、电子设备和存储介质
WO2021051563A1 (zh) 目标数据归档方法、装置、电子设备及计算机非易失性可读存储介质
WO2021218144A1 (zh) 数据处理方法、装置、计算机设备及存储介质
USRE47593E1 (en) Reliability estimator for ad hoc applications
CN110489440B (zh) 数据查询方法和装置
CN110858172A (zh) 一种自动化测试代码生成方法和装置
JP2022048088A (ja) コードをテストするための方法及び装置、電子機器、記憶媒体並びにコンピュータプログラム
WO2021155683A1 (zh) 日志打印方法、装置、电子设备和存储介质
CN104298675A (zh) 用于缓存管理的方法和装置
WO2020207014A1 (zh) 大数据自动回归测试方法、装置、测试中心服务器和存储介质
WO2023129233A1 (en) Performing root cause analysis on data center incidents
US20220398239A1 (en) Intelligent support bundle collection
CN113238815B (zh) 一种接口访问控制方法、装置、设备及存储介质
CN112199470B (zh) 一种基于会话的客诉服务方法、智能终端及存储介质
WO2020238131A1 (zh) 网络爬虫系统的测试方法及装置、存储介质、电子设备
WO2020252925A1 (zh) 用户特征群中用户特征寻优方法、装置、电子设备及计算机非易失性可读存储介质
CN113986135B (zh) 处理请求的方法、装置、设备以及存储介质
US8209357B2 (en) Selecting applications for migration from a pod environment to a pool environment
US20200389382A1 (en) Data rate monitoring to determine channel failure
US10949542B2 (en) Self-evolved adjustment framework for cloud-based large system based on machine learning
CN111061744B (zh) 图数据的更新方法、装置、计算机设备及存储介质
CN117472787B (zh) 车机模糊测试的测试用例生成方法、装置、介质和设备
US20230214750A1 (en) Generating a mitigation workflow for mitigating a technical issue of a computing service using historical mitigation workflows

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19945604

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19945604

Country of ref document: EP

Kind code of ref document: A1