CN117097599B - Network service detection method, device, computer equipment and storage medium - Google Patents

Network service detection method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN117097599B
CN117097599B CN202311364818.7A CN202311364818A CN117097599B CN 117097599 B CN117097599 B CN 117097599B CN 202311364818 A CN202311364818 A CN 202311364818A CN 117097599 B CN117097599 B CN 117097599B
Authority
CN
China
Prior art keywords
service
result file
network service
current
information
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.)
Active
Application number
CN202311364818.7A
Other languages
Chinese (zh)
Other versions
CN117097599A (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.)
Shenzhen Gaodeng Computer Technology Co ltd
Original Assignee
Shenzhen Gaodeng Computer Technology 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 Shenzhen Gaodeng Computer Technology Co ltd filed Critical Shenzhen Gaodeng Computer Technology Co ltd
Priority to CN202311364818.7A priority Critical patent/CN117097599B/en
Publication of CN117097599A publication Critical patent/CN117097599A/en
Application granted granted Critical
Publication of CN117097599B publication Critical patent/CN117097599B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application relates to a network service detection method, a network service detection device, computer equipment and a storage medium. The method comprises the following steps: acquiring a history result file and service association information corresponding to each network service at the current time, wherein the history result file at least comprises service identification information and service survival state information, and the history result file comprises history service association information of each network service; combining and converting service association information of each network service into a current result file with standard structure; when the comparison result of the current result file and the historical result file is that the content meeting the content difference condition exists, generating fault reminding information and sending the fault reminding information to the target terminal; the content for which the signed content difference condition exists includes: the current result file and the history result file have different network services corresponding to the service identification information; and/or the service survival status information of the same network service in the current result file is different from that in the historical result file. The method can improve the efficiency of real-time detection of the network service.

Description

Network service detection method, device, computer equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a network service detection method, a device, a computer device, and a storage medium.
Background
With the development of computer technology, a technology for detecting an abnormality of a network service running on a server in a computer system has been widely used. However, existing network service anomaly detection methods typically monitor and detect by manual or timed tasks, resulting in low efficiency of real-time detection of large-scale network services operated by servers in the system.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a network service detection method, apparatus, computer device, and storage medium that can continuously and efficiently detect a network service running in a system, so as to improve the efficiency of detecting the network service in real time.
In a first aspect, the present application provides a network service detection method. The method comprises the following steps:
acquiring a history result file and service association information corresponding to each network service at the current time, wherein the service association information at least comprises service identification information and service survival state information, and the history result file comprises history service association information of each network service in a history time period;
Combining and converting service association information corresponding to each network service into a standard structured file, and taking the standard structured file as a current result file;
comparing the content in the current result file with the content in the historical result file, generating fault reminding information when the comparison result is that the content meeting the content difference condition exists, and sending the fault reminding information to the target terminal;
wherein the content for which the symbol content difference condition exists includes:
the current result file and the history result file have different network services corresponding to the service identification information;
and/or the number of the groups of groups,
the service survival status information of the same network service in the current result file is different from that in the history result file.
In one embodiment, obtaining service association information corresponding to each network service at the current time includes:
acquiring service identification information corresponding to each network service at the current time, wherein the service identification information comprises a service port identification and a service network address;
detecting the survival state of each network service based on a preset service survival detection mode, a service port identifier corresponding to each network service and a service network address, and obtaining a service survival detection result corresponding to each network service;
If the service survival detection result is in a non-survival state, taking the first fixed value as the current fault count of the network service corresponding to each non-survival state, and taking the current time as the current fault discovery time of the network service corresponding to each non-survival state;
if the service survival detection result is the survival state, the second fixed value is used as the current fault discovery time and the current fault count of the network service corresponding to each survival state;
and taking the state corresponding to the service survival detection result of each network service as the current service survival state of each network service, combining the current service survival state, the current fault discovery time and the current fault meter of each network service into service survival state information corresponding to each network service, and generating service association information corresponding to each network service based on the service identification information and the service survival state information of each network service.
In one embodiment, generating service association information corresponding to each network service based on service identification information and service survival status information of each network service includes:
generating initial service association information corresponding to each network service based on the service identification information and the service survival state information of each network service;
And processing the information of each field based on the preprocessing rule corresponding to each field type in the initial service association information to obtain the service association information corresponding to each network service.
In one embodiment, when the comparison result shows that the content meeting the content difference condition exists, the method further comprises:
if the network service corresponding to the service identification information which does not exist in the history result file exists in the current result file, the service association information of the network service is added into the history result file to obtain an updated history result file;
if the network service corresponding to the service identification information which does not exist in the current result file exists in the history result file, deleting the service related information of the network service from the history result file to obtain an updated history result file;
and if the service survival state information of the network service in the current result file is different from that of the network service in the history result file, modifying the history service survival state information of the network service in the history result file based on the service survival state information of the network service in the current result file to obtain an updated history result file.
In one embodiment, modifying the historical service survival status information of the network service in the historical result file based on the service survival status information of the network service in the current result file, the obtaining the updated historical result file includes:
If the current service survival state in the service survival state information of the network service in the current result file is the survival state, taking the survival state as the historical service survival state in the historical service survival state information of the network service in the historical result file, and taking the second fixed value as the historical fault discovery time and the historical fault count in the historical service survival state information of the network service in the historical result file;
if the current service survival state in the service survival state information of the network service in the current result file is a non-survival state, the non-survival state is taken as the history service survival state in the history service survival state information of the network service in the history result file, the current time is taken as the history fault discovery time in the history service survival state information of the network service in the history result file, and the fusion value of the history fault count in the history service survival state information of the network service in the history result file and the first fixed value is taken as the history fault count, so that the updated history result file is obtained.
In one embodiment, the method further comprises:
the current result file is sent to a management server, so that the management server stores the current result file into a preset storage space;
The management server receives a service inquiry request sent by the inquiry terminal, acquires target inquiry service identification information from the service inquiry request, inquires historical service association information corresponding to the target inquiry service identification information from a preset storage space, and sends the historical service association information to the inquiry terminal.
In one embodiment, the method further comprises:
when the network service corresponding to the target query service identification information does not exist in the preset storage space, the management server sends the association program of the network service corresponding to the target query service identification information to the target server corresponding to the target query service identification information;
and the target server installs and operates the associated program, acquires a current result file of the network service corresponding to the associated program, and sends the current result file to the management server so that the management server sends the information of the current result file to the query terminal.
In a second aspect, the present application further provides a network service detection apparatus. The device comprises:
the system comprises an acquisition module, a service identification module and a service survival module, wherein the acquisition module is used for acquiring a history result file and service association information corresponding to each network service at the current time, the service association information at least comprises service identification information and service survival state information, and the history result file comprises history service association information of each network service in a history time period;
The conversion module is used for merging and converting service association information corresponding to each network service into a standard structured file, and taking the standard structured file as a current result file;
the detection module is used for comparing the content in the current result file with the content in the historical result file, generating fault reminding information when the comparison result is that the content meeting the content difference condition exists, and sending the fault reminding information to the target terminal; wherein the content for which the symbol content difference condition exists includes: the current result file and the history result file have different network services corresponding to the service identification information; and/or the service survival status information of the same network service in the current result file is different from that in the historical result file.
A computer device comprising a memory storing a computer program and a processor which when executing the computer program performs the steps of:
acquiring a history result file and service association information corresponding to each network service at the current time, wherein the service association information at least comprises service identification information and service survival state information, and the history result file comprises history service association information of each network service in a history time period;
Combining and converting service association information corresponding to each network service into a standard structured file, and taking the standard structured file as a current result file;
comparing the content in the current result file with the content in the historical result file, generating fault reminding information when the comparison result is that the content meeting the content difference condition exists, and sending the fault reminding information to the target terminal;
wherein the content for which the symbol content difference condition exists includes:
the current result file and the history result file have different network services corresponding to the service identification information;
and/or the number of the groups of groups,
the service survival status information of the same network service in the current result file is different from that in the history result file.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
acquiring a history result file and service association information corresponding to each network service at the current time, wherein the service association information at least comprises service identification information and service survival state information, and the history result file comprises history service association information of each network service in a history time period;
combining and converting service association information corresponding to each network service into a standard structured file, and taking the standard structured file as a current result file;
Comparing the content in the current result file with the content in the historical result file, generating fault reminding information when the comparison result is that the content meeting the content difference condition exists, and sending the fault reminding information to the target terminal;
wherein the content for which the symbol content difference condition exists includes:
the current result file and the history result file have different network services corresponding to the service identification information;
and/or the number of the groups of groups,
the service survival status information of the same network service in the current result file is different from that in the history result file.
According to the network service detection method, the network service detection device, the computer equipment and the storage medium, the service association information corresponding to each network service in the current time is obtained through the historical result file, wherein the service association information at least comprises service identification information and service survival state information, and the historical result file comprises historical service association information of each network service in a historical time period; combining and converting service association information corresponding to each network service into a standard structured file, and taking the standard structured file as a current result file; comparing the content in the current result file with the content in the historical result file, generating fault reminding information when the comparison result is that the content meeting the content difference condition exists, and sending the fault reminding information to the target terminal; wherein the content for which the symbol content difference condition exists includes: the current result file and the history result file have different network services corresponding to the service identification information; and/or, the service survival state information of the same network service in the current result file is different from that of the historical result file, so that the real-time detection of the network service is realized, the current result file and the historical result file are set to be standard structured files, and the historical result file is updated in real time, thereby being beneficial to improving the comparison efficiency and accuracy of the current result file and the historical result file, avoiding that excessive redundant information is recorded in the historical result file, avoiding the problem that a large amount of historical data causes large compared field data volume in the prior art, and leading to lower fault detection efficiency and lower response speed of the system, and further improving the efficiency of carrying out automatic and real-time detection on each network service.
Drawings
FIG. 1 is an application environment diagram of a network service detection method in one embodiment;
FIG. 2 is a flow chart of a method of detecting network services according to one embodiment;
FIG. 3 is a block diagram of a network service detection device in one embodiment;
FIG. 4 is an internal block diagram of a computer device in one embodiment;
fig. 5 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The network service detection method provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Wherein 102 is a target terminal, 104 is a detected server, 106 is a management server, 108 is a query terminal, and the target terminal 102, the server 104, the management server 106 and the query terminal 108 communicate with each other through a network. The data storage system may store data that needs to be processed by the server 104 and the management server 106. The data storage system may be integrated on the server 104 and the management server 106, or may be located on the cloud or other network server. The server 104 is configured to obtain a history result file and service association information corresponding to each network service at the current time, where the service association information at least includes service identification information and service survival status information, and the history result file includes history service association information of each network service in a history time period; combining and converting service association information corresponding to each network service into a standard structured file, and taking the standard structured file as a current result file; comparing the content in the current result file with the content in the history result file, generating fault reminding information when the comparison result is that the content meeting the content difference condition exists, and sending the fault reminding information to the target terminal 102; wherein the content for which the symbol content difference condition exists includes: the current result file and the history result file have different network services corresponding to the service identification information; and/or the service survival status information of the same network service in the current result file is different from that in the historical result file.
The terminals 102 and 108 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices, where the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. Servers 104 and 106 may be implemented as individual servers or as a cluster of servers.
In one embodiment, as shown in fig. 2, a network service detection method is provided, and the method is applied to the server 104 in fig. 1 for illustration, and includes the following steps:
step S200, obtaining a history result file and service association information corresponding to each network service at the current time, wherein the service association information at least comprises service identification information and service survival state information, and the history result file comprises history service association information of each network service in a history time period.
The history result file is a file for recording the history detection result information of the network service; may be stored in json format, where the stored field information includes, but is not limited to, service listening ports (i.e., service port identification), service listening IP (i.e., service network address), service process number, server hostname, server host IP, service surviving status, failure discovery time, failure count times, comprehensive detection results (normal status and abnormal status), etc. The current time refers to the current corresponding time. Web services refer to a service process running on a server. The service association information refers to the related information of detecting network services; including but not limited to information on service listening ports (i.e., service port identification), service listening IP (i.e., service network address), service process number, server hostname, service survival status, time of failure discovery, failure count, etc. Service identification information refers to information for identifying a network service; including but not limited to service port identification, service network address, service process number, server hostname, etc. Service survival status information refers to information used for characterizing network service survival status and whether faults exist; including but not limited to service survival status, time of failure discovery, failure count, etc. The historical time period refers to the recorded time period; may be the time interval between the forward time from the start of the first detection to the current time. The history service related information refers to detection results of each network service recorded in a history time period; when the information is recorded, the information related to each detection is not recorded in the historical result file, but the historical result file is updated based on the detection result of each detection, so that the situation that each network service in the historical result file is recorded with the latest condition is ensured, and a large amount of information is prevented from being stored in the historical result file in a redundant mode.
Specifically, the operating system obtains service identification information of each network service running in each server in the current system, such as tcp/udp ports monitored by each network service in each server (i.e. service port identification), monitored IP (i.e. service network address), service process number, server host name, server host IP and other information through ping command, and can also detect the survival state of the corresponding network service based on the service port identification and service network address of each network service through a tool for network service survival detection, thereby obtaining the current service survival state of each network service in the current time; if the network service is in a non-survival state, recording the current fault time in service survival state information of the network service belonging to the non-survival state in the current time as the current time, and recording the current fault count as a first fixed value, namely recording the current fault count as 1; if the network service is in a surviving state, the current failure time and the current failure count in the service surviving state information of the network service belonging to the surviving state at the current time are recorded as the second fixed value, that is, are both recorded as 0. In addition, in order to compare with the history detection condition in the subsequent step to find and locate the fault, a history result file may be obtained to prepare data for the subsequent step.
Step S202, combining and converting service association information corresponding to each network service into a standard structured file, and taking the standard structured file as a current result file.
Wherein, the standard structured file refers to a data structured file; a json file that may be a structured json format field. The current result file refers to a detection result file formed by the relevant information of each network service obtained by current time detection; including but not limited to information such as service monitor port (i.e., service port identification), service monitor IP (i.e., service network address), service process number, server hostname, service survival status, time of failure discovery, failure count, etc.
Specifically, in order to better obtain information of each field of the running condition of each network service in the server, so as to improve the comparison efficiency of the information of each field and the efficiency of data interaction between the follow-up service and the management service, service related information of each network service can be combined into a file, the combined file is converted into a standard structured file, namely a json file, and the standard structured file is used as a current result file obtained by detection under the current time.
Step S204, comparing the content in the current result file with the content in the historical result file, generating fault reminding information when the comparison result is that the content meeting the content difference condition exists, and sending the fault reminding information to the target terminal; wherein the content for which the symbol content difference condition exists includes: the current result file and the history result file have different network services corresponding to the service identification information; and/or the service survival status information of the same network service in the current result file is different from that in the historical result file.
Wherein the content difference condition refers to a condition for restricting a difference form of the comparison content. The fault reminding information refers to information for reminding that faults exist; including but not limited to identification information of the failed network service, information about the specific location of the failure, failure discovery time, number of failure durations, type of failure (first failure, continuous failure, initialization failure), etc. The target terminal refers to a terminal for receiving and displaying the fault reminding information; the method can set terminals corresponding to the user identifiers according to actual demands, and when faults are found, fault reminding information is sent to enterprise WeChat corresponding to the set user identifiers so as to show fault alarms.
Specifically, not all previous detection contents are recorded in the history result file, and the data information of each field is changed according to the content of the current result file, so that the content recorded in the history result file is the concentrated content of the history detection result, and the subsequent comparison step is fast and efficient. The current result file and the historical result file can be compared to obtain the transition condition of each network service operation, whether abnormal change occurs is compared and detected, and the change of certain field data information belongs to a normal phenomenon, so that the determination of the abnormal change can not only confirm that the difference between the content in the current result file and the content in the historical result file is abnormal, but also that the difference between the content needs to meet the content difference condition, namely that the current result file and the historical result file have different network services corresponding to service identification information, and it can be understood that at least one network service in the current result file is not in the historical result file, namely that the service identification information of at least one network service in the current result file is not in the historical result file, and the determination is equivalent to the detection of a new network service in the current result file; and the history result file has at least one network service which is not in the current result file, namely the history result file has at least one network service which has service identification information which is not in the current result file, which is equivalent to that the detected network service type in the current result file is less than that of the history result file, and one or more network services are not detected, wherein the two conditions indicate that the operation of the network service is suddenly changed and the possibility of faults exists. In addition, when the service survival state of the same network service in the current result file is inconsistent with the survival state in the historical result file, the network service survival state is indicated to be suddenly changed, and at the moment, faults possibly exist, and fault reminding information containing information such as what faults are, where the faults occur and the like can be generated and sent to the target terminal, so that the target terminal displays the fault reminding information, and operation and maintenance staff maintain the faults according to the fault reminding information.
According to the network service detection method, the history result file and the service association information corresponding to each network service at the current time are obtained, the service association information at least comprises service identification information and service survival state information, and the history result file comprises history service association information of each network service in a history time period; combining and converting service association information corresponding to each network service into a standard structured file, and taking the standard structured file as a current result file; comparing the content in the current result file with the content in the historical result file, generating fault reminding information when the comparison result is that the content meeting the content difference condition exists, and sending the fault reminding information to the target terminal; wherein the content for which the symbol content difference condition exists includes: the current result file and the history result file have different network services corresponding to the service identification information; and/or, the service survival state information of the same network service in the current result file is different from that of the historical result file, so that the real-time detection of the network service is realized, the current result file and the historical result file are set to be standard structured files, and the historical result file is updated in real time, thereby being beneficial to improving the comparison efficiency and accuracy of the current result file and the historical result file, avoiding that excessive redundant information is recorded in the historical result file, avoiding the problem that a large amount of historical data causes large compared field data volume in the prior art, and leading to lower fault detection efficiency and lower response speed of the system, and further improving the efficiency of carrying out automatic and real-time detection on each network service.
In one embodiment, step S200 includes:
step S300, obtaining service identification information corresponding to each network service at the current time, wherein the service identification information comprises a service port identification and a service network address.
Step S302, based on a preset service survival detection mode, service port identifiers corresponding to the network services and service network addresses, the survival state of the network services is detected, and service survival detection results corresponding to the network services are obtained.
In step S304, if the service survival detection result is in a non-survival state, the first fixed value is used as a current failure count of the network service corresponding to each non-survival state, and the current time is used as a current failure discovery time of the network service corresponding to each non-survival state.
In step S306, if the service survival detection result is the survival status, the second fixed value is used as the current fault discovery time and the current fault count of the network service corresponding to each survival status.
Step S308, the state corresponding to the service survival detection result of each network service is used as the current service survival state of each network service, the current service survival state, the current fault discovery time and the current fault meter of each network service are combined into service survival state information corresponding to each network service, and service association information corresponding to each network service is generated based on the service identification information and the service survival state information of each network service.
Wherein, the service port identification refers to a port number for identifying a port; which is the port number of the tcp/udp that the service listens to. The service network address refers to the IP address that the service listens to. The preset service survival detection mode refers to a mode of detecting whether the network service survives; the method comprises the steps that a tcping tool of an operating system detects the survival state of network services corresponding to service port identifiers and service network addresses, and if the tcping tool normally returns to contain keywords judged to be in a normal state, the network services are indicated to be in the survival state; if other conditions are returned and the keywords corresponding to the normal state are not contained, the network service is indicated to be in a non-survival state; it should be noted that, detecting the survival status of the network service is not limited to using the tcping tool, but other tools that can detect the survival status of the network may be used, and the keywords corresponding to the normal status may be different for different detection tools. The service survival detection result refers to a result of detecting whether the obtained network service is in a survival state, and may be in a survival state or a non-survival state. The first fixed value refers to a preset fixed value, is used for representing existence and counting, and is 1. The current fault count refers to statistics used for representing whether network service under current time detection has faults or not; and if the current fault count is a first fixed value, namely 1, representing that the corresponding network service has faults under the current time detection. The current fault finding time refers to the time at which the fault is found under the current time detection. The second fixed value refers to a preset fixed value, which is used for representing the absence, and is 0. The current service survival state refers to the survival state of the network service under the current time detection.
Specifically, the operating system obtains service identification information of each network service running in each server in the current system, for example, obtains information such as tcp/udp ports (i.e. service port identifications), monitored IPs (i.e. service network addresses), service process numbers, server hostnames, server host IPs and the like monitored by each network service in each server through a ping command, obtains service port identifications and service network addresses of each network service from the service identification information of each network service after obtaining the service identification information of each network service, and detects survival states of the network services corresponding to each service port identification and service network address through a service detection tool corresponding to a preset service survival detection mode to obtain corresponding service survival detection results. The method comprises the steps that the current fault discovery time and the current fault count of each network service under current time detection are determined by service survival detection results of each network service under the current time, namely, the current fault discovery time of the network service with the service survival detection results being in a non-survival state is set as the current time, and the current fault count is set as a first fixed value; and setting the current failure count and the current failure discovery time of the network service with the service survival detection result being in a survival state to be a second fixed value; it should be noted that the current failure count in the current result file is only a transition between the first fixed value and the second fixed value, and is not accumulated as the historical failure count in the historical result file, and the current failure count in the current result file is only used for representing the detected failure in the current result file and providing a data basis for accumulated statistics of the historical failure count in the historical result file.
Further, the service survival detection result includes a survival state and a non-survival state, so that the service survival detection corresponding to each network service can be directly used as the current service survival state of each network service, the service survival state information corresponding to each network service is combined based on the current service survival state, the current fault discovery time and the current fault meter corresponding to each network service, and the service association information corresponding to each network service is generated based on the service identification information and the service survival state information corresponding to each network service. And the information corresponding to other fields is modified according to the current time, such as a server detailed operation command field, which can obtain server detailed operation command information corresponding to each network service according to the service process number of each network service at the current time, and set the information of the service detailed operation command field corresponding to each network service at the current time as corresponding server detailed operation command information, wherein the server detailed operation command information also comprises service association information for generating fault reminding information.
For example, if the service survival detection result of the network service 1 in the current result file is a survival state, setting the current service survival state of the network service 1 in the current result file to be a survival state, setting the current fault discovery time to be 0, and setting the current fault count to be 0; if the service survival detection result of the network service 1 in the current result file is a non-survival state, setting the current service survival state of the network service 1 in the current result file to be a non-survival state, setting the current fault finding time to be the current time, and setting the current fault count to be 1.
In the above embodiment, by acquiring the service identification information corresponding to each network service at the current time and setting the service survival state information corresponding to each network service, the service association information corresponding to each network service is obtained, so that the detection of the survival state of each network service is realized, and meanwhile, the detection is converted into the standard structured file for the subsequent conversion, so that the efficiency of network service fault detection is further improved, and a data base is provided.
In one embodiment, step S308 includes:
step S400, generating initial service association information corresponding to each network service based on the service identification information and the service survival status information of each network service.
Step S402, based on the preprocessing rule corresponding to each field type in each initial service related information, the information of each field is processed to obtain the service related information corresponding to each network service.
The initial service related information refers to service related information which is not preprocessed and contains more information which is invalid or affects result comparison analysis; the preprocessing refers to the processing of replacing, escaping, deleting and the like of special characters of each field in the initial service association information, or converting the format type of the information in a specific field into a unified form and the like. The preprocessing rule refers to a rule for processing character information in a field.
Specifically, because the operating system is provided with a tool for acquiring network service identification information and a service survival detection tool, the acquired information may have some special characters or different formats of information corresponding to each network service in the same field, so that invalid data exists in initial service related information obtained by combining service identification information and service survival state information of each network service, or the condition that the efficiency of detecting network service faults by comparing a subsequent current result file with a historical result file is affected is influenced, the information of each field can be processed according to preprocessing rules corresponding to different field types, so as to obtain service related information which is favorable for improving the detection efficiency of each network service fault.
For example, the information corresponding to the detailed operation command field of the server included in the service association information may include more command information, and the obtained special characters in the command information which do not conform to the command rule may be replaced or deleted; for example, when the character coded into other special characters appears in the service identification information, the special characters are modified into correct characters; for example, in the service network address field, since the obtained service network addresses are different in expression mode, that is, the expression modes of the ipv4 and the ipv6 are inconsistent, under the ipv4, monitoring that the expression formats of all the ip network cards are 0.0:123, and under the ipv6, monitoring that the expression formats of all the ip network cards are 123, in order to ensure that the expression formats of the information in the service network address field are consistent, the comparison efficiency of the subsequent steps is improved and the processing efficiency of the data is improved, the information of the service network addresses of all the network services can be processed based on the format unification rule corresponding to the service network address field, that is, the preprocessing rule of the service network address field, so as to obtain the service network address after the format unification.
In the above embodiment, the initial service association information corresponding to each network service is generated based on the service identification information and the service survival state information of each network service, and the information of each field is processed based on the preprocessing rule corresponding to each field type in each initial service association information to obtain the service association information corresponding to each network service, so that the data in the service association information is more effective and the format is unified, thereby being beneficial to improving the efficiency of the content comparison of the subsequent current result file and the historical result file.
In one embodiment, after step S204, further includes:
step S500, if the network service corresponding to the service identification information which does not exist in the history result file exists in the current result file, the service association information of the network service is added into the history result file, and the updated history result file is obtained.
Step S502, if the network service corresponding to the service identification information which does not exist in the current result file exists in the history result file, deleting the service related information of the network service from the history result file to obtain an updated history result file.
Step S504, if the service survival status information of the same network service in the current result file is different from the service survival status information of the same network service in the history result file, the history service survival status information of the network service in the history result file is modified based on the service survival status information of the network service in the current result file, so as to obtain an updated history result file.
Specifically, if the current result file and the history result file have network services corresponding to different service identification information, it may be determined whether the current result file newly detects the network services not in the history result file or whether the current result file has fewer network services in the history result file. If the network service corresponding to the service identification information which does not exist in the history result file is detected in the current result file, service related information of the newly detected network service in the current result file is added into the history result file, at this time, the history fault finding time corresponding to the newly detected network service in the history file is the current time, the history fault count is 1, the history service survival state is the service survival state corresponding to the newly detected network service, if the service survival state corresponding to the newly detected network service is a non-survival state, when the fault reminding information is generated, besides the newly detected network service, the situation that the newly detected network service is the non-survival state can be fed back, and attention is paid to that the fault reminding information feeds back all related information of the network service with the fault, and different information has corresponding fields, so that the fed back fault reminding information is clearer, and the fault position is positioned more quickly and efficiently. If the network service which exists in the historical result file but does not exist in the current result file exists in the current result file, corresponding fault reminding information is generated according to the related information of the network service which does not exist in the current result file and recorded in the historical result file, so that faults are fed back, the network service can be automatically deleted in the historical result file after the target terminal receives the fault reminding information, and when the network service is detected to exist after the maintenance is successful, the network service can be recorded in the historical result file again. Further, if the current result file has different service survival states corresponding to the same network service in the history result file, the record of the network service in the history result file can be modified, so that the record is updated in real time, and the accuracy of subsequent network service fault detection is ensured.
In the above embodiment, the historical result file is updated according to the comparison result of the current result file and the historical result file, so as to ensure the validity of the record of the historical result file, and facilitate improving the efficiency and accuracy of fault comparison detection of each network service at each current time.
In one embodiment, after step S504, further includes:
step S600, if the current service survival state in the service survival state information of the network service in the current result file is the survival state, the survival state is used as the historical service survival state in the historical service survival state information of the network service in the historical result file, and the second fixed value is used as the historical fault discovery time and the historical fault count in the historical service survival state information of the network service in the historical result file.
Step S602, if the current service survival state in the service survival state information of the network service in the current result file is a non-survival state, using the non-survival state as a history service survival state in the history service survival state information of the network service in the history result file, using the current time as a history fault discovery time in the history service survival state information of the network service in the history result file, and using a fusion value of a history fault count in the history service survival state information of the network service in the history result file and a first fixed value as a history fault count, thereby obtaining an updated history result file.
Wherein the historical service survival status information refers to service survival status information of the history record. The historical service survival status refers to the survival status of the network service of the history record. The historical fault discovery time refers to the fault discovery time of the historical record; it does not always keep the latest failure time of the network service, and when the failure is repaired, it is detected that the repaired network service is not failed, the historical failure discovery time is set to 0. Historical failure count refers to failure count of the history; it is to count up 1 when the network service continuously fails, and to set the historical failure count to 0 once the network service detects that no failure exists.
In particular, since the service survival state or the non-survival state of the network service has an influence on the determination of the current failure time and the current failure count in the current result file, and the network service in the current result file is the survival state or the non-survival state, the manner of correspondingly modifying the history result file is different, so that the history result file can be modified according to the service survival state of the network service. And the network services with different service survival state information corresponding to the same network services in the current result file and the historical result file are called as to-be-processed network services. If the service survival state corresponding to the network service to be processed in the current result file is a survival state, whether the historical service survival state of the network service to be processed in the historical result file is a survival state or a non-survival state, the historical service survival state of the network service to be processed in the historical result file is ensured to be the survival state, and the historical fault discovery time and the historical fault count of the network service to be processed are set to be a second fixed value. If the current service survival state of the network service to be processed in the current result file is a non-survival state, the historical service survival state of the network service to be processed in the historical result file is a survival state, setting the historical service survival state of the network service to be processed in the historical result file to be a non-survival state, taking the current time as the historical fault discovery time of the network service to be processed, and taking the first fixed value as the historical fault count of the network service to be processed; if the service survival states of the network service to be processed in the current result file and the historical result file are both non-survival states, setting the historical fault finding time of the network service to be processed in the historical result file as the current time, and taking the fusion value of the historical fault count of the network service to be processed in the historical result file and the first fixed value as the historical fault count in the network service to be processed. Wherein the first fixed value is 1 and the second fixed value is 0.
In one embodiment, the fault reminding information may be classified into a first fault reminding or a continuous fault reminding according to the historical fault count in the historical result file, that is, when the historical fault count is equal to the first fixed value, the fault type in the fault reminding information is the first fault reminding, and when the historical fault count is greater than the first fixed value, the fault type in the fault reminding information is the continuous fault reminding.
In one embodiment, if the network service detects immediately after the initialization, if the detection result is that there is a fault, the information including the initialization fault prompt may be sent to the target terminal, and the initialization fault is not required to be repaired, and is treated as a normal state, which belongs to the case of normal sending.
In one embodiment, if the current result file detected at the current time is detected for the first time, the current result file is directly copied into a historical result file of a blank file, and then the current result file corresponding to the current time is obtained after a preset time period, and the historical result file is modified based on a comparison result of the current result file and the historical result file.
In the above embodiment, the contents in the history result file are modified according to the comparison result of the current result file and the history result file, so that the accuracy of the contents in the history result file is ensured, and therefore, the efficient and accurate fault detection result can be obtained under each cycle comparison.
In one embodiment, the method further comprises:
step S700, the current result file is sent to the management server, so that the management server stores the current result file in a preset storage space.
Step S702, the management server receives the service query request sent by the query terminal, acquires the target query service identification information from the service query request, queries the history service association information corresponding to the target query service identification information from the preset storage space, and sends the history service association information to the query terminal.
The management server is a server for objectively managing network services running in each server. The preset storage space refers to a storage space of a preset designated position. The inquiry terminal refers to a terminal that inquires a network service detection result of the server. The service query request refers to a request for querying a detection result of a network service running in the server. The detection result may reflect the operation condition of each network service operated in the server. The target query service identification information refers to information for identifying a target network service in the target query server.
Specifically, the management server manages the detection results of each network service running in each server under the current system, and can initiate a service query request at the query terminal, and determine target query service identification information from the service query request, where the target query service identification information includes a target query server identification and a target query network service identification corresponding to the target query server identification. The management server may receive a current result file sent by each server at a preset time interval, store the current result file in a preset storage space, and when a service query request is received, obtain historical service association information corresponding to the service query request from the preset storage space based on a target query server identifier and a target query network service identifier in the target query service identifier information, and may obtain a service keyword from the service query request, obtain relevant information of the service keyword from the preset space based on the service keyword, and send the obtained historical service association information or relevant information of the service keyword to the query terminal, so that the query terminal displays the queried historical service association information or relevant information of the service keyword in a list form. It should be noted that, when a service query request carrying information such as a service IP range or a service keyword is used for query, historical service related information corresponding to a plurality of network services may be obtained through query, and at this time, service detection related information of a multi-row list is also displayed by the terminal.
In the above embodiment, the current result file is sent to the management server, so that the management server stores the current result file in the preset storage space, so that the management server receives the service query request sent by the query terminal, obtains the target query service identification information from the service query request, queries the historical service association information corresponding to the target query service identification information from the preset storage space, and sends the historical service association information to the query terminal, thereby realizing the query of the detection results of each network service in each server, enriching the function of the system for detecting each network service in each server, and facilitating the screening and analysis of the information according to the query function, thereby improving the objection management capability of each network service.
In one embodiment, the method further comprises:
step S800, when the network service corresponding to the target query service identification information does not exist in the preset storage space, the management server sends the association program of the network service corresponding to the target query service identification information to the target server corresponding to the target query service identification information.
Step S802, the target server is enabled to install and run the association program, the current result file of the network service corresponding to the association program is obtained, the current result file is sent to the management server, and the management server is enabled to send the information of the current result file to the query terminal.
Wherein, the associated program refers to the program associated with the corresponding network service in the target query service identification information. The target server refers to the queried server; the target query service identification information includes identification information for identifying the target server.
Specifically, when the network service corresponding to the target query service identification information does not exist in the preset storage space, it is indicated that the target server corresponding to the target query service identification information is not installed with the associated program corresponding to the network service corresponding to the target query service identification information, the associated program can be issued to the target server for installation and deployment, and the associated program is directly operated, so that the target server detects the operation condition of the network service corresponding to the associated program, obtains the current result file of the network service corresponding to the association degree, sends the current result file to the management server for storage, and sends the current result file to the query terminal.
In the above embodiment, when the network service corresponding to the target query service identification information does not exist in the preset storage space, the management server sends the association program of the network service corresponding to the target query service identification information to the target server corresponding to the target query service identification information, so that the target server installs and operates the association program, obtains the current result file of the network service corresponding to the association program, and sends the current result file to the management server, so that the management server sends the information of the current result file to the query terminal, and the management server automatically sends the association program to the corresponding server, so that the corresponding server installs and operates, and detects the network service operation corresponding to the association program, thereby improving the automation and real-time detection of each network service operated in each server, being beneficial to fault location and resource allocation optimization according to the detection result, and being beneficial to improving the response speed of the system to a certain extent.
In one embodiment, a description is given taking as an example the detection of web services running in services in an enterprise system. The method comprises the steps that service identification information of each network service under the current time is obtained through a tool carried by an enterprise operation system, the service identification information comprises but is not limited to information such as a service monitoring port (namely service port identification), a service monitoring IP (namely service network address), a service process number, a server host name, a server host IP and the like, the service survival state of each network service is detected through a service survival detection tool based on the service monitoring port and the IP of each network service, the current service survival state of each network service is obtained, the current fault discovery time and the current fault count of each network service are determined based on the current service survival state of each network service, when the current service survival state is the survival state, the current fault time and the current fault count are set to be a second fixed value (namely 0), when the current service survival state is the non-survival state, the current fault time is set to be the current time and the first fixed value (namely 1) is set to be the current fault count, in addition, the server detailed running command information of each network service can be obtained based on the service process number of each network service, fault positioning information is provided when fault reminding information is generated later, and the current fault positioning information is formed based on the current service survival state, the current fault time and the fault count and the service fault count can be related to the service information in the network service information. And combining and converting service association information corresponding to each network service into a current result file in json format, comparing the current result file with a historical result file, if different network services exist in the current result file and the historical result file or service survival state information of the same network service in the current result file and the historical result file is different, generating fault reminding information comprising information of what type of fault, where the fault is located and the like, and sending the fault reminding information into enterprise WeChat of a terminal corresponding to a preset user identifier so as to alarm the fault, and maintaining the fault by operation and maintenance personnel according to the fault reminding information. In addition, the historical result file can be modified according to the comparison result between the current result file and the historical result file, so that the historical result file is updated, the validity of the historical record information in the historical result file is ensured, the backward time of the current time is used as the current time, the detection of each network service under the current time is repeated, the real-time monitoring of the network service is realized, the current result file and the historical result file are set as json files, the comparison efficiency of the current result file and the historical result file is improved, the historical result file is updated in real time, excessive redundant information is prevented from being recorded in the historical result file, and the problem that compared field data is enlarged due to a large amount of historical data in the prior art, so that the failure detection efficiency and the response speed of a system are lower is avoided, and the efficiency of automatic and real-time detection of each network service is improved, and the response speed of the system is improved.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a network service detection device for implementing the above related network service detection method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the network service detection device or devices provided below may refer to the limitation of the network service detection method hereinabove, and will not be repeated herein.
In one embodiment, as shown in fig. 3, there is provided a network service detection apparatus, including: an acquisition module 300, a conversion module 302, and a detection module 304, wherein:
the obtaining module 300 is configured to obtain a history result file and service association information corresponding to each network service at the current time, where the service association information at least includes service identification information and service survival status information, and the history result file includes history service association information of each network service in a history period.
The conversion module 302 is configured to combine and convert service association information corresponding to each network service into a standard structured file, and use the standard structured file as a current result file.
The detection module 304 is configured to compare the content in the current result file with the content in the historical result file, generate fault reminding information when the comparison result is that there is content meeting the content difference condition, and send the fault reminding information to the target terminal; wherein the content for which the symbol content difference condition exists includes: the current result file and the history result file have different network services corresponding to the service identification information; and/or the service survival status information of the same network service in the current result file is different from that in the historical result file.
In one embodiment, the obtaining module 300 is further configured to obtain service identification information corresponding to each network service at the current time, where the service identification information includes a service port identifier and a service network address; detecting the survival state of each network service based on a preset service survival detection mode, a service port identifier corresponding to each network service and a service network address, and obtaining a service survival detection result corresponding to each network service; if the service survival detection result is in a non-survival state, taking the first fixed value as the current fault count of the network service corresponding to each non-survival state, and taking the current time as the current fault discovery time of the network service corresponding to each non-survival state; if the service survival detection result is the survival state, the second fixed value is used as the current fault discovery time and the current fault count of the network service corresponding to each survival state; and taking the state corresponding to the service survival detection result of each network service as the current service survival state of each network service, combining the current service survival state, the current fault discovery time and the current fault meter of each network service into service survival state information corresponding to each network service, and generating service association information corresponding to each network service based on the service identification information and the service survival state information of each network service.
In one embodiment, the obtaining module 300 is further configured to generate initial service association information corresponding to each network service based on service identifier information and service survival status information of each network service; and processing the information of each field based on the preprocessing rule corresponding to each field type in the initial service association information to obtain the service association information corresponding to each network service.
In one embodiment, the network service detection apparatus further includes an update module 306, configured to, if a network service corresponding to service identification information that does not exist in the history result file exists in the current result file, add service association information of the network service to the history result file, to obtain an updated history result file; if the network service corresponding to the service identification information which does not exist in the current result file exists in the history result file, deleting the service related information of the network service from the history result file to obtain an updated history result file; and if the service survival state information of the network service in the current result file is different from that of the network service in the history result file, modifying the history service survival state information of the network service in the history result file based on the service survival state information of the network service in the current result file to obtain an updated history result file.
In one embodiment, the updating module 306 is further configured to, if the current service survival state in the service survival state information of the network service in the current result file is a survival state, use the survival state as a historical service survival state in the historical service survival state information of the network service in the historical result file, and use the second fixed value as a historical failure discovery time and a historical failure count in the historical service survival state information of the network service in the historical result file; if the current service survival state in the service survival state information of the network service in the current result file is a non-survival state, the non-survival state is taken as the history service survival state in the history service survival state information of the network service in the history result file, the current time is taken as the history fault discovery time in the history service survival state information of the network service in the history result file, and the fusion value of the history fault count in the history service survival state information of the network service in the history result file and the first fixed value is taken as the history fault count, so that the updated history result file is obtained.
In one embodiment, the network service detection apparatus further includes a query module 308, configured to send the current result file to the management server, so that the management server stores the current result file in a preset storage space; the management server receives a service inquiry request sent by the inquiry terminal, acquires target inquiry service identification information from the service inquiry request, inquires historical service association information corresponding to the target inquiry service identification information from a preset storage space, and sends the historical service association information to the inquiry terminal.
In one embodiment, the network service detection apparatus further includes an installation module 310, configured to enable the management server to send, when the network service corresponding to the target query service identification information does not exist in the preset storage space, an association program of the network service corresponding to the target query service identification information to the target server corresponding to the target query service identification information; and the target server installs and operates the associated program, acquires a current result file of the network service corresponding to the associated program, and sends the current result file to the management server so that the management server sends the information of the current result file to the query terminal.
The respective modules in the above network service detection apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 4. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used to store data related to the execution process. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a network service detection method.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 5. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a network service detection method. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the structures shown in fig. 4 and 5 are block diagrams of only portions of structures associated with the present application and are not intended to limit the computer device to which the present application is applied, and that a particular computer device may include more or less elements than those shown, or may be combined with certain elements, or have different arrangements of elements.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, storing a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
In one embodiment, a computer program product or computer program is provided that includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in the above-described method embodiments.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to comply with the related laws and regulations and standards of the related countries and regions.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as Static Random access memory (Static Random access memory AccessMemory, SRAM) or dynamic Random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (10)

1. A method for detecting network services, the method comprising:
acquiring a history result file, and acquiring service identification information corresponding to each network service at the current time, wherein the service identification information comprises a service port identification and a service network address; detecting the survival state of each network service based on a preset service survival detection mode, a service port identifier corresponding to each network service and a service network address, and obtaining a service survival detection result corresponding to each network service; if the service survival detection result is in a non-survival state, taking the first fixed value as a current fault count of the network service corresponding to each non-survival state, and taking the current time as a current fault discovery time of the network service corresponding to each non-survival state; if the service survival detection result is the survival state, the second fixed value is used as the current fault discovery time and the current fault count of the network service corresponding to each survival state; the method comprises the steps of taking a state corresponding to a service survival detection result of each network service as a current service survival state of each network service, combining the current service survival state, the current fault discovery time and the current fault meter of each network service into service survival state information corresponding to each network service, and generating service association information corresponding to each network service based on service identification information and service survival state information of each network service; the service association information at least comprises service identification information and service survival state information, and the history result file comprises history service association information of each network service in a history time period;
Combining and converting service association information corresponding to each network service into a standard structured file, and taking the standard structured file as a current result file;
comparing the content in the current result file with the content in the historical result file, generating fault reminding information when the comparison result is that the content meeting the content difference condition exists, and sending the fault reminding information to a target terminal;
wherein the content meeting the content difference condition comprises:
network services corresponding to different service identification information exist in the current result file and the historical result file;
and/or the number of the groups of groups,
and the service survival state information of the same network service in the current result file is different from that in the historical result file.
2. The method of claim 1, further comprising classifying the fault type in the fault alert information as a first fault alert or a continuous fault alert based on a historical fault count in a historical results file.
3. The method of claim 1, wherein generating service association information corresponding to each network service based on service identification information and service survival status information of each network service comprises:
Generating initial service association information corresponding to each network service based on the service identification information and the service survival state information of each network service;
and processing the information of each field based on the preprocessing rule corresponding to each field type in the initial service association information to obtain the service association information corresponding to each network service.
4. The method according to claim 1, wherein after the comparison result is that the content meeting the content difference condition exists, further comprising:
if the network service corresponding to the service identification information which does not exist in the history result file exists in the current result file, service association information of the network service is added into the history result file to obtain an updated history result file;
if the network service corresponding to the service identification information which does not exist in the current result file exists in the history result file, deleting the service related information of the network service from the history result file to obtain an updated history result file;
and if the service survival state information of the same network service in the current result file is different from the service survival state information of the same network service in the historical result file, modifying the historical service survival state information of the network service in the historical result file based on the service survival state information of the network service in the current result file to obtain an updated historical result file.
5. The method of claim 4, wherein modifying the historical service survival information for the network service in the historical results file based on the service survival information for the network service in the current results file, the obtaining an updated historical results file comprises:
if the current service survival state in the service survival state information of the network service in the current result file is a survival state, taking the survival state as a historical service survival state in the historical service survival state information of the network service in the historical result file, and taking a second fixed value as historical fault discovery time and historical fault count in the historical service survival state information of the network service in the historical result file;
and if the current service survival state in the service survival state information of the network service in the current result file is a non-survival state, taking the non-survival state as a historical service survival state in the historical service survival state information of the network service in the historical result file, taking the current time as a historical fault discovery time in the historical service survival state information of the network service in the historical result file, and taking a fusion value of a historical fault count in the historical service survival state information of the network service in the historical result file and a first fixed value as the historical fault count to obtain an updated historical result file.
6. The method according to claim 1, wherein the method further comprises:
the current result file is sent to a management server, so that the management server stores the current result file into a preset storage space;
and the management server receives a service inquiry request sent by an inquiry terminal, acquires target inquiry service identification information from the service inquiry request, inquires historical service association information corresponding to the target inquiry service identification information from the preset storage space, and sends the historical service association information to the inquiry terminal.
7. The method of claim 6, wherein the method further comprises:
when the network service corresponding to the target query service identification information does not exist in the preset storage space, the management server sends the association program of the network service corresponding to the target query service identification information to the target server corresponding to the target query service identification information;
and the target server installs and runs the association program, acquires a current result file of the network service corresponding to the association program, and sends the current result file to the management server so that the management server sends the information of the current result file to the query terminal.
8. A network service detection apparatus, the apparatus comprising:
the acquisition module is used for acquiring a history result file and acquiring service identification information corresponding to each network service at the current time, wherein the service identification information comprises a service port identification and a service network address; detecting the survival state of each network service based on a preset service survival detection mode, a service port identifier corresponding to each network service and a service network address, and obtaining a service survival detection result corresponding to each network service; if the service survival detection result is in a non-survival state, taking the first fixed value as a current fault count of the network service corresponding to each non-survival state, and taking the current time as a current fault discovery time of the network service corresponding to each non-survival state; if the service survival detection result is the survival state, the second fixed value is used as the current fault discovery time and the current fault count of the network service corresponding to each survival state; the method comprises the steps of taking a state corresponding to a service survival detection result of each network service as a current service survival state of each network service, combining the current service survival state, the current fault discovery time and the current fault meter of each network service into service survival state information corresponding to each network service, and generating service association information corresponding to each network service based on service identification information and service survival state information of each network service; the service association information at least comprises service identification information and service survival state information, and the history result file comprises history service association information of each network service in a history time period;
The conversion module is used for merging and converting service association information corresponding to each network service into a standard structured file, and taking the standard structured file as a current result file;
the detection module is used for comparing the content in the current result file with the content in the historical result file, generating fault reminding information when the comparison result is that the content meeting the content difference condition exists, and sending the fault reminding information to the target terminal; wherein the content meeting the content difference condition comprises: network services corresponding to different service identification information exist in the current result file and the historical result file; and/or, the service survival state information of the same network service in the current result file is different from that in the historical result file.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202311364818.7A 2023-10-20 2023-10-20 Network service detection method, device, computer equipment and storage medium Active CN117097599B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311364818.7A CN117097599B (en) 2023-10-20 2023-10-20 Network service detection method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311364818.7A CN117097599B (en) 2023-10-20 2023-10-20 Network service detection method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117097599A CN117097599A (en) 2023-11-21
CN117097599B true CN117097599B (en) 2024-01-16

Family

ID=88772069

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311364818.7A Active CN117097599B (en) 2023-10-20 2023-10-20 Network service detection method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117097599B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8676958B1 (en) * 2006-02-10 2014-03-18 Open Invention Network, Llc System and method for monitoring the status of multiple servers on a network
EP3503503A1 (en) * 2017-12-21 2019-06-26 Apple Inc. Health status monitoring for services provided by computing devices
CN111385365A (en) * 2020-03-23 2020-07-07 广州极晟网络技术有限公司 Processing method and device for reported data, computer equipment and storage medium
CN112769652A (en) * 2021-01-14 2021-05-07 苏州浪潮智能科技有限公司 Node service monitoring method, device, equipment and medium
CN112882885A (en) * 2019-11-29 2021-06-01 北京沃东天骏信息技术有限公司 Method, device and system for monitoring business service survival
CN116185760A (en) * 2022-12-28 2023-05-30 远光软件股份有限公司 Dynamic monitoring method, device, equipment and storage medium for service operation
CN116594843A (en) * 2023-05-24 2023-08-15 浙江中控技术股份有限公司 Service monitoring method, device and system and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8676958B1 (en) * 2006-02-10 2014-03-18 Open Invention Network, Llc System and method for monitoring the status of multiple servers on a network
EP3503503A1 (en) * 2017-12-21 2019-06-26 Apple Inc. Health status monitoring for services provided by computing devices
CN112882885A (en) * 2019-11-29 2021-06-01 北京沃东天骏信息技术有限公司 Method, device and system for monitoring business service survival
CN111385365A (en) * 2020-03-23 2020-07-07 广州极晟网络技术有限公司 Processing method and device for reported data, computer equipment and storage medium
CN112769652A (en) * 2021-01-14 2021-05-07 苏州浪潮智能科技有限公司 Node service monitoring method, device, equipment and medium
CN116185760A (en) * 2022-12-28 2023-05-30 远光软件股份有限公司 Dynamic monitoring method, device, equipment and storage medium for service operation
CN116594843A (en) * 2023-05-24 2023-08-15 浙江中控技术股份有限公司 Service monitoring method, device and system and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
面向特定服务的网络安全态势数据采集与分析;周仁杰;王慧强;梁颖;;武汉大学学报(理学版)(01);第113-116页 *

Also Published As

Publication number Publication date
CN117097599A (en) 2023-11-21

Similar Documents

Publication Publication Date Title
US20190213206A1 (en) Systems and methods for providing dynamic indexer discovery
WO2020015115A1 (en) Fault alarm method and terminal device
CN113760641A (en) Service monitoring method, device, computer system and computer readable storage medium
US20120166250A1 (en) Data visualization for time-based cohorts
CN114780335A (en) Correlation method and device of monitoring data, computer equipment and storage medium
CN115480987A (en) Link data display method and device and computer equipment
CN112100239A (en) Portrait generation method and apparatus for vehicle detection device, server and readable storage medium
CN112052134A (en) Service data monitoring method and device
JP2010128597A (en) Information processor and method of operating the same
US20190089608A1 (en) Dynamic event catalyst system for distributed networks
CN117097599B (en) Network service detection method, device, computer equipment and storage medium
CN105607983A (en) Data exception monitoring method and apparatus
US11544343B1 (en) Codeless anchor generation for detectable features in an environment
CN111368039B (en) Data management system
CN114756301A (en) Log processing method, device and system
CN113778996A (en) Large data stream data processing method and device, electronic equipment and storage medium
CN109450700B (en) Visual service detection method and device
CN116881318A (en) Maintenance period entry generation method, device, computer equipment and storage medium
CN117194165A (en) Server performance monitoring method, device, computer equipment and storage medium
CN115866003A (en) Device control method, device, computer device and storage medium
CN116663907A (en) Method and device for generating early warning information, computer equipment and storage medium
CN118069718A (en) Data display method, device, computer equipment and storage medium
CN116541145A (en) Data calling method, device, computer equipment and computer storage medium
CN114816945A (en) Method and device for monitoring operation of server
CN118051344A (en) Method and device for distributing hardware resources and hardware resource management system

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