CN116545905A - Service health detection method and device, electronic equipment and storage medium - Google Patents

Service health detection method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116545905A
CN116545905A CN202310746268.9A CN202310746268A CN116545905A CN 116545905 A CN116545905 A CN 116545905A CN 202310746268 A CN202310746268 A CN 202310746268A CN 116545905 A CN116545905 A CN 116545905A
Authority
CN
China
Prior art keywords
service
health detection
health
state
target
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.)
Pending
Application number
CN202310746268.9A
Other languages
Chinese (zh)
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.)
China Southern Power Grid Digital Platform Technology Guangdong Co ltd
Original Assignee
China Southern Power Grid Digital Platform Technology Guangdong 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 China Southern Power Grid Digital Platform Technology Guangdong Co ltd filed Critical China Southern Power Grid Digital Platform Technology Guangdong Co ltd
Priority to CN202310746268.9A priority Critical patent/CN116545905A/en
Publication of CN116545905A publication Critical patent/CN116545905A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Medical Treatment And Welfare Office Work (AREA)

Abstract

The embodiment of the invention discloses a service health detection method, a device, electronic equipment and a storage medium. The method is applied to a health detection service, and comprises the following steps: responding to a health detection instruction, and acquiring a health detection address of a target service to be subjected to health detection in at least one candidate service; executing access operation on the representational state transfer interface corresponding to the health detection address, wherein the representational state transfer interface is predefined for the target service; and receiving response data returned by the representational state transfer interface for the access operation, and determining the health state of the target service based on the response data. The technical scheme of the embodiment of the invention realizes unified health detection of multiple services.

Description

Service health detection method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computer application, in particular to a service health detection method, a device, electronic equipment and a storage medium.
Background
Nowadays, with the development of mobile phones, the use frequency of application software on the mobile phones is higher and higher, which causes the pressure of services for providing data interfaces for the application software to increase dramatically, so that real-time detection of service health is needed to find out problems in time and solve the problems in time.
At present, unified health detection cannot be carried out on multiple services, and tapping is to be solved.
Disclosure of Invention
The embodiment of the invention provides a service health detection method, a device, electronic equipment and a storage medium, which realize unified health detection of multiple services.
According to an aspect of the present invention, there is provided a service health detection method, which may include:
responding to the health detection instruction, and acquiring a health detection address of a target service to be subjected to health detection in at least one candidate service;
executing access operation on the representational state transfer interface corresponding to the health detection address, wherein the representational state transfer interface is predefined and obtained aiming at the target service;
response data returned by the representational state transfer interface for the access operation is received, and the health state of the target service is determined based on the response data.
According to another aspect of the present invention, there is provided a service health detection apparatus, which may include:
the health detection address acquisition module is used for responding to the health detection instruction and acquiring a health detection address of a target service to be subjected to health detection in at least one candidate service;
the access operation execution module is used for executing access operation on the representational state transfer interface corresponding to the health detection address, wherein the representational state transfer interface is predefined for the target service;
and the health state determining module is used for receiving response data returned by the representational state transfer interface for the access operation and determining the health state of the target service based on the response data.
According to another aspect of the present invention, there is provided an electronic device, which may include:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to cause the at least one processor to implement the service health detection method provided by any embodiment of the present invention when executed.
According to another aspect of the present invention, there is provided a computer readable storage medium having stored thereon computer instructions for causing a processor to implement the service health detection method provided by any embodiment of the present invention when executed.
According to the technical scheme, the health detection address of the target service is obtained by responding to the health detection instruction and aiming at the target service to be subjected to health detection in at least one candidate service; executing access operation on the representational state transfer interface corresponding to the health detection address, wherein the representational state transfer interface is predefined and obtained aiming at the target service; response data returned by the representational state transfer interface for the access operation is received, and the health state of the target service is determined based on the response data. According to the technical scheme, the representational state transfer interfaces are set for each of at least one candidate service, and the corresponding representational state transfer interfaces can be accessed through the health detection addresses respectively corresponding to the candidate services to carry out health detection, so that unified health detection of multiple services can be realized.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention, nor is it intended to be used to limit the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for service health detection provided in accordance with an embodiment of the present invention;
FIG. 2 is a flow chart of another service health detection method provided in accordance with an embodiment of the present invention;
FIG. 3 is a flow chart of an alternative example of another method of service health detection provided in accordance with an embodiment of the present invention;
fig. 4 is a block diagram of a service health detecting apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device implementing a service health detection method according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. The cases of "target", "original", etc. are similar and will not be described in detail herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Fig. 1 is a flowchart of a service health detection method according to an embodiment of the present invention. The embodiment is applicable to the condition of service health detection, in particular to the condition of service unified health detection. The method is applied to the health detection service, and can be executed by the service health detection device provided by the embodiment of the invention, the device can be realized by software and/or hardware, and the device can be integrated on electronic equipment, and the electronic equipment can be various user terminals or servers.
Referring to fig. 1, the method of the embodiment of the present invention specifically includes the following steps:
s110, responding to the health detection instruction, and acquiring a health detection address of a target service to be subjected to health detection in at least one candidate service.
Wherein a health detection service may be understood as a service for health detection of a service; the health detection service can be constructed based on a Spring Boot framework. Health detection instructions may be understood as instructions that indicate health detection of a service; the health detection instruction can be generated periodically or manually, for example, by an administrator manually through a presentation page. An alternative service may be understood as a service in which a health detection address is stored in the health detection service, and health detection is enabled; the alternative service is pre-established with a representational state transfer interface. The target service may be understood as an alternative service to be subjected to health detection among the at least one alternative service; the number of target services may be at least one. A health detection address may be understood as an address that can be accessed by a health detection service for health detection; the health detection address may be, for example, an address of a representational state transfer (representational state transfer, REST) interface pre-established on the target service; the health detection address may be, for example, a uniform resource locator (Uniform Resource Location, URL) address.
In the embodiment of the invention, in response to the health detection instruction, a health detection address of a target service is acquired for at least one target service to be subjected to health detection in at least one candidate service.
In the embodiment of the invention, each of the at least one alternative service can be used as the target service.
S120, executing access operation on the representational state transfer interface corresponding to the health detection address, wherein the representational state transfer interface is predefined for the target service.
In the embodiment of the invention, the representational state transfer interface can be predefined and obtained on the target service, and the address of the representational state transfer interface can be used as the health detection address of the target service; and executing access operation on the representational state transfer interface corresponding to the health detection address.
In the embodiment of the invention, if the target service integrates the springboot-activator component, the URL address which is built in the target service and used for health detection can be directly used as the health detection address, and the access operation can be executed on the health detection address; if the target service is not integrated with the springboot-activator component, a representational state transfer interface is predefined on the target service, an address of the representational state transfer interface is used as a health detection address, and an access operation is executed on the representational state transfer interface corresponding to the health detection address.
In the embodiment of the present invention, the access operation may specifically be, for example, accessing the health detection address through the httpclient component.
S130, response data returned by the representational state transfer interface for the access operation is received, and the health state of the target service is determined based on the response data.
Wherein, the response data can be understood as data generated by the response of the representational state transfer interface to the access operation; the response data may be a response code, which may be 404, for example, in the event of an access exception. Health status may be understood as a status that characterizes the health of the target service; the health status may be, for example, healthy or unhealthy, and the health status may be, for example, an access failure status, an access success status, or an access exception status; in the embodiment of the present invention, the expression form of the health state is not particularly limited.
In the embodiment of the present invention, response data returned by the representational state transfer interface for the access operation may be received, where the corresponding data may be, for example, data capable of indicating whether the response is successful or whether the response is abnormal, and in the embodiment of the present invention, the expression form of the response data is not specifically limited; the health status of the target service is determined based on the response data.
In the embodiment of the invention, a management page provided by the health detection service can be displayed, and the management page can be displayed with at least one alternative service or target service and the current health state corresponding to the at least one alternative service or target service respectively; after determining the health status of the target service based on the response data, the displayed at least one candidate service or the current health status corresponding to the target service respectively may be updated based on the health status, so that an administrator may view the health status of each service in real time on the management page.
According to the technical scheme, the health detection address of the target service is obtained by responding to the health detection instruction and aiming at the target service to be subjected to health detection in at least one candidate service; executing access operation on the representational state transfer interface corresponding to the health detection address, wherein the representational state transfer interface is predefined and obtained aiming at the target service; response data returned by the representational state transfer interface for the access operation is received, and the health state of the target service is determined based on the response data. According to the technical scheme, the representational state transfer interfaces are set for each of at least one candidate service, and the corresponding representational state transfer interfaces can be accessed through the health detection addresses respectively corresponding to the candidate services to carry out health detection, so that unified health detection of multiple services can be realized.
An optional technical solution, the service health detection method further includes: acquiring task information of a pre-configured detection task, wherein the task information at least comprises first service information of target service to be subjected to health detection and health detection frequency; periodically generating a health detection instruction based on the first service information and the health detection frequency; responding to the health detection instruction, aiming at a target service to be subjected to health detection in at least one candidate service, acquiring a health detection address of the target service, wherein the health detection address comprises the following steps: and responding to the health detection instruction, determining a target service in at least one candidate service according to the first service information, and acquiring a health detection address of the target service.
The detection task may be understood as a task of health detection of a service. Task information may be understood as information related to a detection task; the task information may include, for example, first service information of a target service to be subjected to health detection, a health detection frequency, a start time of a period of periodically generating health detection instructions, and/or an end time of a period of periodically generating health detection instructions, etc. The first service information may be understood as related information of the target service; the first service information may include, for example, identification information such as a name or number of the target service and/or a health detection address of the target service, etc. The health detection frequency may be understood as a frequency at which health detection instructions are periodically generated.
In the embodiment of the invention, a management page provided by the health detection service can be displayed, and the management page can be understood as a page for managing the health detection of the service; task information of a detection task which is configured for management page input in advance can be acquired; based on the task information, periodically generating a health detection instruction, for example, the health detection instruction can be generated once every one hour; and responding to the health detection instruction, determining a target service in at least one candidate service according to the task information, and acquiring a health detection address of the target service.
In the embodiment of the invention, a service timer can be integrated for the health detection service; the service timer may periodically generate the health detection instruction based on the task information of the detection task, or the service timer periodically generates and sends out the detection task, and generates the health detection instruction based on the task information of the detection task when the detection task is acquired.
In the embodiment of the invention, task information of a pre-configured detection task can be acquired, wherein the task information at least comprises first service information of target service to be subjected to health detection and health detection frequency; periodically generating a health detection instruction based on the first service information and the health detection frequency; and responding to the health detection instruction, determining a target service in at least one candidate service according to the first service information, and acquiring a health detection address of the target service. In the embodiment of the invention, the service health detection can be continuously performed periodically, so that the detection effect of the service health detection is improved.
Another optional solution, after determining the health status of the target service based on the response data, further includes: determining whether the target service is in an abnormal state according to the health state; and when the target service is in an abnormal state, an abnormal alarm is sent out according to the target service and the health state.
In the embodiment of the invention, whether the target service is in an abnormal state or not can be determined according to the health state, for example, if the health state is in an access failure state or an access abnormal state, the target service is determined to be in an abnormal state, and if the health state is in an access success state, the target service is determined to be in a non-abnormal state; in the case that the target service is in an abnormal state, an abnormal alarm is sent out according to the target service and the health state, the abnormal alarm can be, for example, a popup window for displaying information including the identification and/or the health state of the target service in the abnormal state on a display page, the abnormal alarm can be, for example, abnormal alarm information sent out by a terminal of an administrator, and in the embodiment of the invention, the alarm form of the abnormal alarm is not particularly limited. In the embodiment of the invention, the abnormal condition can be fed back in time through the abnormal alarm.
Still another optional technical solution, the service health detection method further includes: displaying a management page provided by the health detection service; receiving newly-added service information input for a management page, and determining newly-added service and a health detection address of the newly-added service according to the newly-added service information; and updating at least one alternative service according to the newly added service, and storing the health detection address of the newly added service.
Wherein, the newly added service information can be understood as information related to the newly added service; the newly added service information may include, for example, an identification of the newly added service and/or a health detection address of the newly added service, etc. The newly added service is understood to be a newly added service that can perform health detection.
In the embodiment of the invention, a management page provided by the health detection service can be displayed; modification service information input for the management page can be received, and modification service and modification content can be determined according to the modification service information; updating at least one alternative service and/or stored relevant information of the at least one alternative service according to the modified service and the modified content, wherein the relevant information of the at least one alternative service can be information such as service type information, health detection address and/or a representational state transfer interface corresponding to the health detection address; configuration service information input for the management page can also be received, and configuration service and configuration content can be determined according to the configuration service information; updating the at least one alternative service and/or stored relevant information of the at least one alternative service according to the configuration service and the configuration content. Wherein, the modified service information can be understood as information related to the modified service; the modification service information may include, for example, an identification of the modification service, a service type of the modification service, and/or a health check address of the modification service, etc. A modification service may be understood as an alternative service requiring modification of its relevant information. Configuration service information may be understood as information related to configuration services; the configuration service information may include, for example, an identification of the configuration service, a service type of the configuration service, and/or a health detection address of the configuration service, etc. A configuration service may be understood as an alternative service requiring configuration of its related information.
In the embodiment of the invention, the management page provided by the health detection service can be displayed, so that an administrator inputs newly-added service information through the management page; receiving newly-added service information input for a management page, and determining newly-added service and a health detection address of the newly-added service according to the newly-added service information; and updating at least one alternative service according to the newly added service, and storing the health detection address of the newly added service. In the embodiment of the invention, at least one alternative service can be updated according to the newly added service, and the health detection address of the newly added service is stored, so that the service expansion capable of carrying out unified health detection is realized, and the expansibility is improved.
Fig. 2 is a flowchart of another service health detection method provided in an embodiment of the present invention. The present embodiment is optimized based on the above technical solutions. In this embodiment, optionally, after determining the health status of the target service based on the response data, the service health detection method further includes: the health status is sent to the target database so that the target database stores the health status according to the target service and/or the health detection address. Wherein, the explanation of the same or corresponding terms as the above embodiments is not repeated herein.
Referring to fig. 2, the method of this embodiment may specifically include the following steps:
s210, responding to the health detection instruction, and acquiring a health detection address of a target service to be subjected to health detection in at least one candidate service.
S220, executing access operation on the representational state transfer interface corresponding to the health detection address, wherein the representational state transfer interface is predefined for the target service.
And S230, receiving response data returned by the representational state transfer interface for the access operation, and determining the health state of the target service based on the response data.
And S240, sending the health state to a target database so that the target database stores the health state according to the target service and/or the health detection address.
The target database is understood to be a database into which the health status can be stored.
In the embodiment of the invention, the health status may be sent to the target database, so that the target database stores the health status according to the target service and/or the health detection address, for example, the target service includes a service a and a service B, the health status of the service a may be stored in a storage space corresponding to the service a of the target database, and the health status of the service B may be stored in a storage space corresponding to the service B of the target database.
In the embodiment of the invention, the health status may also be sent to the target database, so that the target database stores the health status according to the target service, the health detection address, the health status, and/or the time of responding to the health detection instruction, etc.
According to the technical scheme, the health state can be sent to the target database, so that the target database stores the health state according to the target service and/or the health detection address. In the embodiment of the invention, the health state can be stored, and the detailed unified storage management can be carried out on the health state.
An optional technical solution, the service health detection method further includes: displaying a management page provided by the health detection service; receiving health state checking information input for a management page, and acquiring a state to be checked from a target database according to the health state checking information; and displaying the state to be checked on the management page.
The health state checking information can be understood as information related to a state to be checked which needs to be checked; the health status viewing information may include, for example, second service information of the service to be viewed and/or a time of the status to be viewed, and the like. The second service information may be understood as related information of the service to be viewed; the second service information may include, for example, identification information such as a name or number of the service to be viewed and/or a health detection address of the service to be viewed, etc. The time of the state to be viewed may be understood as determining a point in time when the state to be viewed is obtained and/or a time span of the state to be viewed that is required to be viewed. The service to be checked can be understood as a service corresponding to the state to be checked, that is, the state to be checked can be obtained by performing health detection on the service to be checked. The state to be checked can be understood as the health state to be checked; the state to be checked can be one health state acquired once for the requirement to be checked, and can also be a plurality of health states acquired for a plurality of times for the requirement to be checked.
In the embodiment of the invention, the management page provided by the health detection service can be displayed, so that an administrator inputs health state viewing information through the management page; the method comprises the steps that health state checking information input for a management page is received, according to the health state checking information, a to-be-checked state is obtained from a target database, for example, the health state checking information comprises second service information of to-be-checked service and a time span of the to-be-checked state, and according to the second service information and the time span, the to-be-checked state obtained by carrying out health detection on the to-be-checked service determined in the time span can be obtained from the health states stored in the target database; the state to be checked is displayed on the management page, and in the embodiment of the invention, the display form for displaying the state to be checked on the management page is not particularly limited. In the embodiment of the invention, the state to be checked, which needs to be checked, can be displayed.
Based on the above scheme, an optional technical scheme, the health status checking information includes second service information of the service to be checked, and the service to be checked belongs to at least one alternative service; according to the health state checking information, acquiring a state to be checked from a target database, wherein the state to be checked comprises the following steps: and acquiring the to-be-checked state obtained by performing health detection on the to-be-checked service from the target database according to the second service information.
In the embodiment of the invention, the health status viewing information may include second service information of a service to be viewed, where the service to be viewed belongs to at least one alternative service; and acquiring the to-be-checked state obtained by performing health detection on the to-be-checked service from the target database according to the second service information. In the embodiment of the invention, more accurate searching of the state to be checked which needs to be checked can be realized.
For better understanding of the technical solution of the embodiment of the present invention described above, an alternative example is provided herein. Illustratively, referring to FIG. 3, at least one alternative service pre-configures the representational state transfer interface; the health detection service responds to the health detection instruction, and a health detection address of a target service to be subjected to health detection in at least one candidate service is obtained; executing access operation on the representational state transfer interface corresponding to the health detection address; receiving response data returned by the representational state transfer interface for the access operation, and determining the health state of the target service based on the response data; and updating and displaying the health state of the target service on the management page.
Fig. 4 is a block diagram of a service health detection device according to an embodiment of the present invention, where the device is configured in a health detection service and is configured to execute the service health detection method according to any of the above embodiments. The device and the service health detection method of the above embodiments belong to the same inventive concept, and reference may be made to the above embodiments of the service health detection method for details not described in detail in the embodiments of the service health detection device. Referring to fig. 4, the apparatus may specifically include: a health detection address acquisition module 310, an access operation execution module 320, and a health status determination module 330.
The health detection address obtaining module 310 is configured to obtain, in response to the health detection instruction, a health detection address of a target service to be subjected to health detection in at least one candidate service;
the access operation execution module 320 is configured to execute an access operation on a representational state transfer interface corresponding to the health detection address, where the representational state transfer interface is predefined for the target service;
the health status determining module 330 is configured to receive response data returned by the representational state transfer interface for the access operation, and determine a health status of the target service based on the response data.
Optionally, the service health detection device further includes:
the task information acquisition module is used for acquiring task information of a pre-configured detection task, wherein the task information at least comprises first service information of target service to be subjected to health detection and health detection frequency;
the health detection instruction generation module is used for periodically generating a health detection instruction based on the first service information and the health detection frequency;
the health detection address acquisition module 310 includes:
the health detection address acquisition unit is used for responding to the health detection instruction, determining a target service in at least one candidate service according to the first service information, and acquiring the health detection address of the target service.
Optionally, the service health detection device further includes:
the abnormal state determining module is used for determining whether the target service is in an abnormal state according to the health state after determining the health state of the target service based on the response data;
and the abnormal alarm sending module is used for sending out an abnormal alarm according to the target service and the health state under the condition that the target service is in an abnormal state.
Optionally, the service health detection device further includes:
and the health state sending module is used for sending the health state to the target database after the health state of the target service is determined based on the response data, so that the target database stores the health state according to the target service and/or the health detection address.
Optionally, on the basis of the above device, the service health detection device further includes:
the first management page display module is used for displaying a management page provided by the health detection service;
the to-be-checked state acquisition module is used for receiving the health state checking information input for the management page and acquiring the to-be-checked state from the target database according to the health state checking information;
and the to-be-checked state display module is used for displaying the to-be-checked state on the management page.
Optionally, on the basis of the device, the health status checking information includes second service information of a service to be checked, and the service to be checked belongs to at least one alternative service;
the to-be-checked state acquisition module comprises:
the to-be-checked state acquisition unit is used for acquiring the to-be-checked state obtained by carrying out health detection on the to-be-checked service from the target database according to the second service information.
Optionally, the service health detection device further includes:
the second management page display module is used for displaying a management page provided by the health detection service;
the health detection address determining module is used for receiving the newly-added service information input for the management page and determining newly-added service and health detection addresses of the newly-added service according to the newly-added service information;
and the health detection address storage module is used for updating at least one alternative service according to the newly added service and storing the health detection address of the newly added service.
According to the service health detection device provided by the embodiment of the invention, the health detection address of the target service is obtained for the target service to be subjected to health detection in at least one candidate service through the health detection address obtaining module responding to the health detection instruction; executing access operation on the representational state transfer interface corresponding to the health detection address through the access operation execution module, wherein the representational state transfer interface is predefined for the target service; response data returned by the representational state transfer interface for the access operation is received through the health state determination module, and the health state of the target service is determined based on the response data. According to the device, the representational state transfer interfaces are set for each of at least one candidate service, and the corresponding representational state transfer interfaces can be accessed through the health detection addresses respectively corresponding to the candidate services to carry out health detection, so that unified health detection of multiple services can be realized.
The service health detection device provided by the embodiment of the invention can execute the service health detection method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
It should be noted that, in the embodiment of the service health detection apparatus, each unit and module included are only divided according to the functional logic, but not limited to the above-mentioned division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
Fig. 5 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the service health detection method.
In some embodiments, the service health detection method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the service health detection method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the service health detection method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A service health detection method, applied to a health detection service, the method comprising:
responding to a health detection instruction, and acquiring a health detection address of a target service to be subjected to health detection in at least one candidate service;
executing access operation on the representational state transfer interface corresponding to the health detection address, wherein the representational state transfer interface is predefined for the target service;
And receiving response data returned by the representational state transfer interface for the access operation, and determining the health state of the target service based on the response data.
2. The method as recited in claim 1, further comprising:
acquiring task information of a pre-configured detection task, wherein the task information at least comprises first service information of target service to be subjected to health detection and health detection frequency;
periodically generating a health detection instruction based on the first service information and the health detection frequency;
the responding to the health detection instruction, aiming at a target service to be subjected to health detection in at least one candidate service, obtains a health detection address of the target service, and comprises the following steps:
and responding to the health detection instruction, determining the target service in at least one alternative service according to the first service information, and acquiring a health detection address of the target service.
3. The method of claim 1, further comprising, after said determining a health status of said target service based on said response data:
determining whether the target service is in an abnormal state according to the health state;
And under the condition that the target service is in an abnormal state, sending out an abnormal alarm according to the target service and the health state.
4. The method of claim 1, further comprising, after said determining a health status of said target service based on said response data:
and sending the health state to a target database, so that the target database stores the health state according to the target service and/or the health detection address.
5. The method according to claim 4, further comprising:
displaying a management page provided by the health detection service;
receiving health state checking information input for the management page, and acquiring a state to be checked from the target database according to the health state checking information;
and displaying the state to be checked on the management page.
6. The method of claim 5, wherein the health status viewing information includes second service information for a service to be viewed, the service to be viewed belonging to the at least one alternative service;
the obtaining the state to be checked from the target database according to the health state checking information comprises the following steps:
And acquiring the to-be-checked state obtained by carrying out health detection on the to-be-checked service from the target database according to the second service information.
7. The method according to claim 1, characterized in that the method further comprises:
displaying a management page provided by the health detection service;
receiving newly-added service information input for the management page, and determining newly-added service and a health detection address of the newly-added service according to the newly-added service information;
and updating the at least one alternative service according to the newly added service, and storing the health detection address of the newly added service.
8. A service health detection device configured for a health detection service, comprising:
the health detection address acquisition module is used for responding to the health detection instruction and acquiring a health detection address of a target service to be subjected to health detection in at least one candidate service;
the access operation execution module is used for executing access operation on the representational state transfer interface corresponding to the health detection address, wherein the representational state transfer interface is predefined and obtained for the target service;
And the health state determining module is used for receiving response data returned by the representational state transfer interface for the access operation and determining the health state of the target service based on the response data.
9. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores a computer program executable by the at least one processor to cause the at least one processor to perform the service health detection method of any one of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to perform the service health detection method according to any one of claims 1-7.
CN202310746268.9A 2023-06-20 2023-06-20 Service health detection method and device, electronic equipment and storage medium Pending CN116545905A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310746268.9A CN116545905A (en) 2023-06-20 2023-06-20 Service health detection method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310746268.9A CN116545905A (en) 2023-06-20 2023-06-20 Service health detection method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116545905A true CN116545905A (en) 2023-08-04

Family

ID=87456276

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310746268.9A Pending CN116545905A (en) 2023-06-20 2023-06-20 Service health detection method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116545905A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116775364A (en) * 2023-08-16 2023-09-19 中国电子信息产业集团有限公司第六研究所 Application service health management method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116775364A (en) * 2023-08-16 2023-09-19 中国电子信息产业集团有限公司第六研究所 Application service health management method and device, electronic equipment and storage medium
CN116775364B (en) * 2023-08-16 2023-12-05 中国电子信息产业集团有限公司第六研究所 Application service health management method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN116545905A (en) Service health detection method and device, electronic equipment and storage medium
CN112965799A (en) Task state prompting method and device, electronic equipment and medium
CN113986135B (en) Method, device, equipment and storage medium for processing request
CN115905322A (en) Service processing method and device, electronic equipment and storage medium
CN115309730A (en) Data auditing method and device, electronic equipment and storage medium
CN114389969A (en) Client test method and device, electronic equipment and storage medium
CN113656731A (en) Advertisement page processing method and device, electronic equipment and storage medium
CN114500438B (en) File sharing method and device, electronic equipment and storage medium
CN116719621B (en) Data write-back method, device, equipment and medium for mass tasks
CN117742900B (en) Method, device, equipment and storage medium for constructing service call graph
CN115858104A (en) Method, device and equipment for acquiring snapshot of transaction commit sequence number and storage medium
CN117093274A (en) Application running stack analysis method, device, equipment and storage medium
CN117670236A (en) Mobile-terminal-based to-be-handled flow approval method, device, equipment and medium
CN117032746A (en) Data updating method, device, electronic equipment and storage medium
CN115983222A (en) EasyExcel-based file data reading method, device, equipment and medium
CN117806702A (en) Target software acquisition method and device, electronic equipment and storage medium
CN115718771A (en) Method, device and equipment for extracting drive code and storage medium
CN114416040A (en) Page construction method, device, equipment and storage medium
CN117729005A (en) Network asset mapping method
CN117193825A (en) Method and device for calling update function, electronic equipment and storage medium
CN113934581A (en) Method and device for acquiring disk fault information of storage system, electronic equipment and medium
CN115061664A (en) Object conversion method and device, electronic equipment and storage medium
CN117573267A (en) Application program data display method, system, electronic equipment and storage medium
CN115686911A (en) Server-side self-checking method and device, electronic equipment and storage medium
CN115455029A (en) Battery replacement data acquisition method and device, electronic equipment and storage medium

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