Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art without any inventive work according to the embodiments of the present application are within the scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The network architecture applied by the embodiment of the application comprises a server and electronic equipment. The electronic device may be a Personal Computer (PC), a notebook computer, or a smart phone, and may also be an all-in-one machine, a palm computer, a tablet computer (pad), a smart television playing terminal, a vehicle-mounted terminal, or a portable device. The operating system of the PC-side electronic device, such as a kiosk or the like, may include, but is not limited to, operating systems such as Linux system, Unix system, Windows series system (e.g., Windows xp, Windows 7, etc.), Mac OS X system (operating system of apple computer), and the like. The operating system of the electronic device at the mobile end, such as a smart phone, may include, but is not limited to, an operating system such as an android system, an IOS (operating system of an apple mobile phone), a Window system, and the like.
The server is used for providing services for the electronic equipment. The electronic device in the embodiment of the application can install and run the application program, and the server can be a server corresponding to the application program installed in the electronic device and provide application service for the application program. The application program may be a system management platform, a monitoring platform, or the like, or may be a single integrated application program, or an applet embedded in other applications, or a system on a web page, and the like, which is not limited herein. The number of the electronic devices and the number of the servers are not limited in the embodiment of the application, and the servers can provide services for at least two electronic devices simultaneously. The server may be implemented as a stand-alone server or as a server cluster of at least two servers.
The method for monitoring the system provided by the embodiment of the application can be executed by a system monitoring device, wherein the device can be realized by software and/or hardware, can be generally integrated in a server, can monitor the system, can improve the effectiveness of system monitoring, can avoid the paralysis of the whole system, and improves the robustness of the system.
Referring to fig. 1, fig. 1 is a schematic flow chart of a system monitoring method provided in the present application. Taking the application of the method to a server as an example for illustration, the method includes the following steps S101 to S104, wherein:
s101: and determining the calling frequency of the system to be monitored.
In this embodiment of the application, the system to be monitored may be any system in the whole system, or may be a designated system, which is not limited herein. The calling frequency refers to the frequency of the system to be monitored or the modules in the system to be monitored being called by other systems. It is understood that when the system to be monitored and the module in the system to be monitored are called by other systems, the system to be monitored receives a calling function for instructing the system to be monitored or the module therein to perform a specific calling operation, and the data flow of the result of the calling operation, for example, whether the result of the calling operation is transmitted to the system sending the calling function or other systems.
In this embodiment of the present application, each system (including the system to be monitored and the associated system associated with the system to be monitored in this embodiment of the present application, or a system associated with the associated system, etc., which is not limited herein) may be connected through the monitoring platform, and a hook function is used to monitor a call function of each system. In this way, it is possible to monitor whether the calling function is called or not by the hook function, that is, whether the system is called or not by the hook function. In addition, the operation parameters of the called system, such as the start time and the finish time for executing the monitoring function, the memory size of the occupied system, the remaining resources, the response speed and other information, can also be determined by the hook function.
The method for determining the calling frequency of the system to be monitored is not limited, a hook function can be respectively set to monitor whether the system to be monitored or a module in the system to be monitored is called by the calling function called by the associated system, if yes, the calling frequency is increased by 1, and therefore the calling frequency of the system to be monitored can be determined based on the calling frequency and a preset monitoring period. The monitoring period is not limited, and dynamic setting can be performed according to the system type of the system to be monitored, or the time period corresponding to the current time. It can be understood that the usage rates of the systems of different system types are different, and the effectiveness of system monitoring can be improved by setting the monitoring period based on the system type. For example, if the financial system is used at a low rate, the monitoring period is long, and if the communication system is used frequently, the monitoring period is short. And the utilization rates of the systems in different time periods are different, and the monitoring period is set based on the time periods, so that the monitoring effectiveness of the system can be improved. For example, the monitoring period during peak hours is smaller than the monitoring period during low peak hours, and so on. In the embodiment of the present application, the system type may be determined according to the name of the system or the function of the system, and the time period may be determined according to the counted historical online number of people, which is not limited herein.
The execution method of step S101 is not limited in this application, and may be executed according to a preset monitoring period, for example, step S101 is executed within the duration of the monitoring period, or may be determined when the system to be monitored fails to be called. It should be noted that the monitoring period when the call failure of the system to be monitored is detected may be shorter than the monitoring period when the call failure is not monitored, so that whether the state of the system to be monitored is abnormal or not can be determined as quickly as possible.
S102: and if the calling frequency of the system to be monitored is less than the first threshold value, determining an associated system associated with the system to be monitored.
In the embodiment of the application, the first threshold is used for determining whether to perform state detection on the system to be monitored. When the calling frequency of the system to be monitored is less than the first threshold, the step of determining the associated system associated with the system to be monitored may be performed, which may be understood as a step of performing state detection on the system to be monitored, and when the calling frequency of the system to be monitored is greater than or equal to the first threshold, the step of performing state detection on the system to be monitored may not be performed.
The first threshold is not limited in the present application, and may be determined according to the system type of the system to be monitored. It can be appreciated that the usage rates of the systems of different system types are different, and the first threshold value is set based on the system type, so that the effectiveness of system monitoring can be improved. For example, if the financial system usage is low, the first threshold is small, and if the communication system is frequently used, the first threshold is large. The first threshold may also be determined according to a time period corresponding to the current time. It can be understood that the usage rates of the systems in different time periods are different, and the first threshold value is set based on the time periods, so that the monitoring effectiveness of the systems can be improved. For example, the first threshold for peak hours is greater than the first threshold for low peak hours, and so on. In the embodiment of the present application, the system type may be determined according to the name of the system or the function of the system, and the time period may be determined according to the counted historical online number of people, which is not limited herein.
In one possible example, the method further comprises: acquiring the system type and/or the current time of a system to be monitored; the first threshold is determined based on the system type and/or the current time. It will be appreciated that the first threshold determined based on the type of system and/or the current time may increase the flexibility of setting the first threshold, facilitating increased effectiveness of monitoring.
In this embodiment of the application, the association system is a system having business traffic with the system to be monitored, and is divided according to data streams, and may be a data acquisition system on a bottom layer of the system to be monitored, or a data processing system on an upper layer of the system to be monitored, and the like, which is not limited herein. The number of the associated systems is not limited in the present application, and may be one or at least two.
S103: and determining the state of the system to be monitored and the state of the associated system based on a virtual calling function between the associated system and the system to be monitored.
In the embodiment of the present application, the virtual calling function is used to determine whether the associated system can call the system to be monitored, and/or whether the system to be monitored can call the associated system. The state of the system to be monitored is abnormal, which indicates that the system to be monitored cannot be called by the associated system. The state of the system to be monitored is normal, which indicates that the system to be monitored can be called by the associated system. In the embodiment of the application, a virtual calling function of a system to be monitored is called by a related system can be sent to the system to be monitored through a monitoring platform, and if response information of the virtual calling function is not received or response failure information sent by the system to be monitored is received, the state of the system to be monitored is determined to be abnormal.
The state of the associated system is abnormal, which indicates that the system to be monitored cannot call the associated system. The state of the associated system is normal, which indicates that the system to be monitored can call the associated system. In the embodiment of the application, the monitoring platform can be used for sending the virtual calling function of the system to be monitored to the associated system, and if the response information of the virtual calling function is not received or the response failure information sent by the associated system is received, the state of the associated system is determined to be abnormal.
The virtual calling function between the relevant system and the system to be monitored is not limited in the embodiment of the application, and can include identification information of the relevant system and the system to be monitored, a calling request and the like. It should be noted that the virtual calling function is a virtual calling function, that is, the operation of the virtual calling function calling system is a simulation operation, not a real operation, and the normal production of the whole system is not affected. The virtual calling function may be a function preset for virtual calling between the relevant system and the system to be monitored, and may also be dynamically set. In one possible example, the method further comprises the following steps a 1-A3, wherein:
a1: and acquiring a correlation module between the correlation system and the system to be monitored.
The association module is a functional module for data transmission between the relevant system and the system to be monitored, such as an attendance module, a calculation module, an approval module, and the like, and is not limited herein. It should be noted that, between the association system and the system to be monitored, there may be an association module associated with an association module in another system, that is, there may be an association module in the association system associated with an association module in the system to be monitored.
A2: and constructing virtual information corresponding to the association module.
The virtual information may include input conditions (or execution conditions) and/or input data for calling the associated module, data used by the associated module, output results (or return results) of the associated module, and the like. The association module is taken as a function module in the association system related to calling the system to be monitored for example, the virtual information includes an input condition and input data of the system to be monitored calling the association module, the association module runs other data required to be called by the input data, and pre-output data (which can be understood as data that can be output when the state of the association system is normal) corresponding to the input data.
The method for constructing the virtual information is not limited in the application, and the virtual information can be constructed according to the specific functions and data types of the association module, for example, if the association module is a login module, the virtual information includes a virtual account and a virtual password, and the virtual account and the virtual password can be used as a positive sample and a negative sample for testing.
In one possible example, a test data set corresponding to the association module is obtained; determining the quantity of target test data based on the calling sub-frequency of the correlation module; selecting a target test data set from the test data sets based on the number of the target test data; and generating virtual information corresponding to the target test data set based on the system type of the associated system and the system type of the system to be monitored.
The test data set may be test data stored by a tester when testing the associated module, or may be a test data set constructed according to the associated module, and the like, which is not limited herein. The calling sub-frequencies are the frequencies called by the respective associated modules. It can be understood that when the calling sub-frequency is larger, the success rate that the association module can call is high, and a small amount of virtual information can be used for acquiring the virtual calling function. When the calling sub-frequency is lower, the calling frequency of the associated module is low, the success of calling is difficult to determine, and a large amount of virtual information can be adopted to obtain a virtual calling function, so that the monitoring accuracy can be improved.
It can be understood that, in this example, the number of the target test data sets is determined based on the calling sub-frequency of the association module, then the test data is selected from the test data sets to obtain the target test data sets, and then the virtual information corresponding to the target test data sets is generated according to the system type of the association system and the system type of the system to be monitored, so that the effectiveness of constructing the virtual information can be improved, and the monitoring accuracy can be improved.
A3: and generating a virtual calling function between the related system and the system to be monitored based on the virtual information.
In step a3, a virtual calling function may be generated based on the input condition (or execution condition) and/or input data corresponding to the virtual information, data used by the associated module, an output result (or return result) of the associated module, and the like, which is not limited herein.
It can be understood that, in steps a1 to A3, the association module between the relevant system and the system to be monitored is obtained first, and then the virtual information needed to be used for calling the association module is constructed, so that the virtual calling function between the relevant system and the system to be monitored is generated based on the virtual information, the effectiveness of calling the association module can be improved, and the effectiveness of monitoring can be improved conveniently.
In a possible example, if the number of association modules between the association system and the system to be monitored is greater than or equal to 2, the calling function includes at least two calling sub-functions, and each association module corresponds to one calling sub-function, step S103 includes the following steps B1 and B2, where:
b1: and acquiring the second priority of each associated module.
The second priority can be used to describe the importance of the association module in the system to be monitored or the association system, and can be determined according to the priority of the association module in the association system or the system to be monitored and the preset frequency called by the association system or the system to be monitored. It will be appreciated that the priority of the association module in the association system or the system to be monitored may be used to describe the importance of the association module to the operation of the association system or the system to be monitored. The preset frequency called by the associated system or the system to be monitored can be used for describing the number of times the associated system or the system to be monitored calls the associated module. The second priority of each association module is determined based on the priority and the preset frequency, the number of times of calling in a system where the association module is located and the number of times of calling by other systems are considered, and the accuracy of obtaining the second priority is improved.
B2: and determining the state of the system to be monitored and the state of the associated system based on the second priority and at least two calling sub-functions.
The method for determining the states of the system to be monitored and the associated system by the associated module and the calling subfunction of the associated module is not limited, when the state of one associated module in the system to be monitored is determined to be abnormal, the state of the system to be monitored is determined to be abnormal, and when the states of all the associated modules in the system to be monitored are determined to be normal, the state of the system to be monitored is determined to be normal. When the state of one correlation module in the correlation system is determined to be abnormal, the state of the correlation system is determined to be abnormal, and when the states of all correlation modules in the correlation system are determined to be normal, the state of the correlation system is determined to be normal. It can be understood that the states of the associated modules are sequentially determined according to the second priorities of the associated modules, and then the states of the system to be monitored and the states of the associated systems are determined according to the states of the associated modules, so that the monitoring accuracy can be improved.
The method for determining the state of each association module according to the second priority is not limited, and the calling state of each association module can be determined sequentially according to the calling subfunctions corresponding to each association module between the system to be monitored and the association system from large to small according to the size of the second priority, so that the states of the system to be monitored and the association system are determined respectively. Further, if the association module with the second higher priority is the bottom module of the smaller association module, the smaller association module is difficult to be called when the state of the larger association module is abnormal, and it can be determined that the state of the smaller association module is also abnormal.
In a second possible example, if there are at least two associated systems, step S103 comprises the following steps C1 and C2, wherein:
c1: a first priority of each associated system is obtained.
The first priority is used for determining the abnormal detection sequence of the system to be monitored and the associated system. The first priority may be determined according to a link relationship between the relevant system and the system to be monitored, where the link relationship is used to describe a connection relationship of the link. For example, the association system includes a first system, a second system, and a third system, and if the system to be monitored can be directly connected to the first system, the second system, and the third system, and can also be indirectly connected to the third system through the second system, the priority relationship among the first system, the second system, and the third system can be determined as second system > third system > first system. Therefore, abnormity monitoring can be carried out based on the link relation, and monitoring efficiency is improved conveniently. For another example, the associated system includes a first system, a second system, and a third system, and if the first system is the underlying system of the second system and the second system is the underlying system of the third system, the priority relationship between the first system, the second system, and the third system can be determined as first system > second system > third system. Therefore, abnormity monitoring can be performed from the bottom layer, and monitoring efficiency is improved conveniently.
In one possible example, step C1 includes: acquiring link relations between each related system and a system to be monitored; acquiring a correlation value between each correlation system and a system to be monitored; and acquiring the first priority of each association system based on the link relation and the association value.
For the link relationship, reference may be made to the foregoing description, and details are not repeated here. The association value is used to describe the calling relationship between the two systems. It will be appreciated that some connected systems have call relationships between them and some connected systems are used to transfer data between them. In this example, the first priority of the associated system is obtained based on the link relationship and the associated value between the associated system and the system to be monitored, so that the accuracy of obtaining the first priority can be improved, and the accuracy of monitoring can be improved conveniently.
C2: and determining the state of the system to be monitored and the state of each associated system based on the first priority and the virtual calling function between each associated system and the system to be monitored.
The method for determining the states of the system to be monitored and each associated system according to the first priority is not limited, and the calling states of the system to be monitored and the associated systems can be determined sequentially according to the virtual calling functions between the system to be monitored and the associated systems from large to small according to the size of the first priority, so that the states of the system to be monitored and the associated systems are determined respectively.
In one possible example, step C2 may include: acquiring a ratio between the calling frequency and a first threshold; and if the ratio is smaller than a second threshold, sequentially determining the state components of the system to be monitored and the states of the associated systems based on the first priority and the virtual calling functions between the associated systems and the system to be monitored, and determining the state of the system to be monitored based on the state components of the system to be monitored.
The ratio is a quotient between the call frequency and the first threshold, and may reflect a difference between the call frequency and the first threshold. The second threshold is not limited in the present application, and may be set according to the number of associated systems, or may be set based on the system type or time period of the system to be monitored. The method for determining the state of the system to be monitored by the state components of the system to be monitored is not limited, the state of the system to be monitored can be determined to be abnormal when at least one state component exists and is abnormal, and the state of the system to be monitored is determined to be normal when all the state components are normal; the probability of state abnormality can be acquired based on all the state components, so that whether the state of the system to be monitored is abnormal or not is determined based on the probability of state abnormality.
For example, when the priority relationship among the first system, the second system, and the third system is first system > second system > third system, and the state component of the system to be monitored is determined to be abnormal based on the virtual call function between the first system and the system to be monitored, the state of the first system is normal, the state component of the system to be monitored is determined to be normal based on the virtual call function between the second system and the system to be monitored, the state of the second system is abnormal, the state component of the system to be monitored is determined to be normal based on the virtual call function between the third system and the system to be monitored, and the state of the third system is abnormal. Assuming that the preset weights of the states of the system to be monitored, which are determined by the first system, the second system and the third system, are 0.6, 0.3 and 0.1, the corresponding value when the state component is abnormal is 0, and the corresponding value when the state component is long is 1, the probability of the state abnormality of the system to be monitored is 0.4. When the threshold value for judging the probability of the state abnormality is 0.5, and 0.4<0.5, the state of the system to be monitored can be determined to be abnormal.
It can be understood that, in this example, if the ratio between the call frequency and the first threshold is smaller than the second threshold, the state component of the system to be monitored and the state of the associated system are determined sequentially based on the virtual call function between the associated system and the system to be monitored according to the descending order of the first priority, and then the state of the system to be monitored is determined based on the state component of the system to be monitored, so that the accuracy of monitoring can be improved.
In one possible example, step C2 may further include: if the ratio is larger than or equal to the second threshold, after the virtual calling function between the target related system and the system to be monitored determines that the state of the system to be monitored is abnormal, the states of other related systems are determined based on the virtual calling functions between the other related systems and the system to be monitored.
The target association system is any association system except the minimum first priority, and the other association systems are association systems with the first priorities smaller than that of the target association system. That is, if the ratio between the calling frequency and the first threshold is greater than or equal to the second threshold, the state of the system to be monitored and the state of the associated system are determined in sequence according to the descending order of the first priority based on the virtual calling functions between the associated system and the system to be monitored. If the correlation function between the correlation system with the first priority and the system to be monitored determines that the state of the system to be monitored is abnormal, the correlation function between the correlation system behind the first priority and the system to be monitored only needs to determine the state of the correlation system, and does not need to determine whether the system to be monitored is abnormal again, so that the monitoring efficiency can be improved.
For example, when the priority relationship among the first system, the second system, and the third system is first system > second system > third system, if the state of the system to be monitored is determined to be abnormal based on the virtual call function between the first system and the system to be monitored, and the state of the first system is normal, then whether the second system is abnormal is determined based on the virtual call function between the second system and the system to be monitored, and then whether the third system is abnormal is determined according to the virtual call function between the third system and the system to be monitored, and it is not necessary to determine whether the system to be monitored is abnormal again, which can improve the monitoring efficiency.
S104: and if the state of the system to be monitored is abnormal or the state of the associated system is abnormal, sending first prompt information to a processor corresponding to the system to be monitored and sending second prompt information to a processor corresponding to the associated system.
The method and the system for processing the abnormal data are not limited by the processing person, and can be pre-designated personnel corresponding to the system to be monitored or personnel corresponding to the associated system, or can also be an abnormal processing system, and the abnormal processing system determines a specific processing person to process and the like. It should be noted that the processing person corresponding to the system to be monitored and the processing person corresponding to the associated system may be the same person or different persons.
In the embodiment of the application, the first prompt information is used for prompting a handler corresponding to the system to be monitored that the state of the system to be monitored is abnormal or the state of the associated system is abnormal. The second prompt information is used for prompting a handler corresponding to the associated system, and the state of the associated system is abnormal or the state of the system to be monitored is abnormal. The first prompt message and the second prompt message are not limited, and the first prompt message and the second prompt message can be the same or different. For example, the state of the system to be monitored is taken as an abnormal state, and the first prompt information and the second prompt information may include prompt information that the state of the system to be monitored is abnormal, and may also include interface information when the system to be monitored is abnormal, for example, previously received information that a response sent by the system to be monitored fails, or received information that a response sent by an associated system fails, and the like. It can be understood that the interface information when the system to be monitored is abnormal may include time information, an abnormal type, and the like, and when the first prompt information includes the interface information when the system to be monitored is abnormal, the system to be monitored may be subjected to an abnormality handling operation, which is convenient for improving the efficiency and accuracy of the abnormality handling. When the second prompt information includes the interface information when the system to be monitored is abnormal, the associated system can be prevented from calling the system to be monitored, and the calling failure can be avoided. The first prompt message and the second prompt message may further include information of a cause of the abnormality of the system to be monitored, a related note, and the like. The method for exception handling is not limited, and the exception handling method can be used for handling based on the reason of system failure, alternative systems and the like.
In the method shown in fig. 1, the calling frequency of the system to be monitored is determined first. And if the calling frequency is less than the first threshold value, determining an associated system associated with the system to be monitored. And then determining the state of the system to be monitored and the state of the associated system based on the virtual calling function between the associated system and the system to be monitored. When the state of the system to be monitored is abnormal or the state of the associated system is abnormal, the first prompt message can be sent to the handler corresponding to the system to be monitored, and the prompt message is sent to the handler corresponding to the associated system, so that the handler is informed to perform abnormal processing, the monitoring effectiveness of the system can be improved, the occurrence of paralysis of the whole system can be avoided, and the robustness of the system is improved.
The method of the embodiments of the present application is set forth above in detail and the apparatus of the embodiments of the present application is provided below.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a system monitoring apparatus according to the present application, and as shown in fig. 2, the system monitoring apparatus 200 includes:
a calling frequency determining unit 201, configured to determine a calling frequency of a system to be monitored;
an associated system determining unit 202, configured to determine an associated system associated with the system to be monitored if a call frequency in the system to be monitored is less than a first threshold;
a system state determining unit 203, configured to determine a state of the system to be monitored and a state of the associated system based on a virtual calling function between the associated system and the system to be monitored;
a prompt information sending unit 204, configured to send a first prompt information to a handler corresponding to the system to be monitored and send a second prompt information to a handler corresponding to the associated system if the state of the system to be monitored is abnormal or the state of the associated system is abnormal.
In a possible example, the number of the associated systems is greater than or equal to 2, and the associated system determining unit 202 is specifically configured to obtain a first priority of each of the associated systems; and determining the state of the system to be monitored and the state of each associated system based on the first priority and the virtual calling function between each associated system and the system to be monitored.
In a possible example, the association system determining unit 202 is specifically configured to obtain link relationships between the association systems and the systems to be monitored; acquiring a correlation value between each correlation system and the system to be monitored; and acquiring the first priority of each association system based on the link relation and the association value.
In a possible example, the association system determining unit 202 is specifically configured to obtain a ratio between the call frequency and the first threshold; if the ratio is smaller than a second threshold value, sequentially determining the state components of the system to be monitored and the states of the associated systems based on the first priority and virtual calling functions between the associated systems and the system to be monitored, and determining the state of the system to be monitored based on the state components of the system to be monitored; or, if the ratio is greater than or equal to the second threshold, after the virtual calling function between the target associated system and the system to be monitored determines that the state of the system to be monitored is abnormal, determining the state of another associated system based on the virtual calling function between the other associated system and the system to be monitored, where the target associated system is any associated system except for the minimum first priority, and the another associated system is an associated system whose first priority is lower than that of the target associated system.
In a possible example, the system monitoring apparatus 200 further includes a call function processing unit 205, configured to obtain an association module between the association system and the system to be monitored; constructing virtual information corresponding to the correlation module; and generating a virtual calling function between the related system and the system to be monitored based on the virtual information.
In a possible example, the number of the associated modules is greater than or equal to 2, the virtual calling function includes at least two calling sub-functions, each associated module corresponds to one calling sub-function, and the system state determining unit 203 is specifically configured to obtain a second priority of each associated module; and determining the state of the system to be monitored and the state of the associated system based on the second priority and the at least two calling sub-functions.
In one possible example, the system monitoring apparatus 200 further includes a threshold determining unit 206, configured to obtain a system type and/or a current time of the system to be monitored; determining the first threshold based on the system type and/or the current time.
For detailed processes executed by each unit in the system monitoring apparatus 200, reference may be made to the execution steps in the foregoing method embodiments, which are not described herein again.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present disclosure. The computer device comprises the electronic device and the server. As shown in fig. 3, the computer device 300 includes a processor 310, a memory 320, a communication interface 330, and one or more programs 340.
The one or more programs 340 are stored in the memory 320 and configured to be executed by the processor 310, the programs 340 including instructions for:
determining the calling frequency of a system to be monitored;
if the calling frequency of the system to be monitored is smaller than a first threshold value, determining an associated system associated with the system to be monitored;
determining the state of the system to be monitored and the state of the associated system based on a virtual calling function between the associated system and the system to be monitored;
and if the state of the system to be monitored is abnormal or the state of the associated system is abnormal, sending first prompt information to a processor corresponding to the system to be monitored and sending second prompt information to a processor corresponding to the associated system.
In one possible example, the number of associated systems is greater than or equal to 2, and in terms of determining the state of the system to be monitored and the state of the associated system based on a virtual calling function between the associated system and the system to be monitored, the program 340 is specifically configured to execute the following steps:
acquiring a first priority of each associated system;
and determining the state of the system to be monitored and the state of each associated system based on the first priority and the virtual calling function between each associated system and the system to be monitored.
In one possible example, in the aspect of obtaining the first priority of each of the associated systems, the program 340 is specifically configured to execute the following steps:
acquiring link relations between the relation systems and the system to be monitored;
acquiring a correlation value between each correlation system and the system to be monitored;
and acquiring the first priority of each association system based on the link relation and the association value.
In one possible example, in the aspect of determining the state of the system to be monitored and the state of each associated system based on the first priority and the virtual calling function between each associated system and the system to be monitored, the program 340 is specifically configured to execute the following steps:
acquiring a ratio between the calling frequency and the first threshold;
if the ratio is smaller than a second threshold value, sequentially determining the state components of the system to be monitored and the states of the associated systems based on the first priority and virtual calling functions between the associated systems and the system to be monitored, and determining the state of the system to be monitored based on the state components of the system to be monitored;
or, if the ratio is greater than or equal to the second threshold, after the virtual calling function between the target associated system and the system to be monitored determines that the state of the system to be monitored is abnormal, determining the state of another associated system based on the virtual calling function between the other associated system and the system to be monitored, where the target associated system is any associated system except for the minimum first priority, and the another associated system is an associated system whose first priority is lower than that of the target associated system.
In one possible example, the program 340 is further for executing the instructions of:
acquiring a correlation module between the correlation system and the system to be monitored;
constructing virtual information corresponding to the correlation module;
and generating a virtual calling function between the related system and the system to be monitored based on the virtual information.
In one possible example, the number of association modules is greater than or equal to 2, the virtual calling function includes at least two calling sub-functions, each of the association modules corresponds to one of the calling sub-functions, and in the aspect of determining the state of the system to be monitored and the state of the association system based on the virtual calling function between the association system and the system to be monitored, the program 340 is specifically configured to execute the following instructions:
acquiring a second priority of each association module;
and determining the state of the system to be monitored and the state of the associated system based on the second priority and the at least two calling sub-functions.
In one possible example, the program 340 is further for executing the instructions of:
acquiring the system type and/or the current time of the system to be monitored;
determining the first threshold based on the system type and/or the current time.
Embodiments of the present application also provide a computer storage medium, where the computer storage medium stores a computer program for causing a computer to execute to implement part or all of the steps of any one of the methods described in the method embodiments, and the computer includes an electronic device and a server.
Embodiments of the application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform to implement some or all of the steps of any of the methods recited in the method embodiments. The computer program product may be a software installation package, the computer comprising an electronic device and a server.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art will also appreciate that the embodiments described in this specification are presently preferred and that no particular act or mode of operation is required in the present application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, at least one unit or component may be combined or integrated with another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may also be distributed on at least one network unit. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a hardware mode or a software program mode.
The integrated unit, if implemented in the form of a software program module and sold or used as a stand-alone product, may be stored in a computer readable memory. With such an understanding, the technical solution of the present application may be embodied in the form of a software product, which is stored in a memory and includes several instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned memory comprises: various media capable of storing program codes, such as a usb disk, a read-only memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and the like.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash disk, ROM, RAM, magnetic or optical disk, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.