CN108768768B - Blocking detection method and device for business system and storage medium - Google Patents

Blocking detection method and device for business system and storage medium Download PDF

Info

Publication number
CN108768768B
CN108768768B CN201810459426.1A CN201810459426A CN108768768B CN 108768768 B CN108768768 B CN 108768768B CN 201810459426 A CN201810459426 A CN 201810459426A CN 108768768 B CN108768768 B CN 108768768B
Authority
CN
China
Prior art keywords
component
service processing
message
blocking
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810459426.1A
Other languages
Chinese (zh)
Other versions
CN108768768A (en
Inventor
马文献
刘登科
张月宇
牛晓瑞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Keda Technology Co Ltd
Original Assignee
Suzhou Keda Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Keda Technology Co Ltd filed Critical Suzhou Keda Technology Co Ltd
Priority to CN201810459426.1A priority Critical patent/CN108768768B/en
Publication of CN108768768A publication Critical patent/CN108768768A/en
Application granted granted Critical
Publication of CN108768768B publication Critical patent/CN108768768B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/11Identifying congestion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Debugging And Monitoring (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The application relates to a blocking detection method, a device and a storage medium for a service system, belonging to the technical field of computers, wherein the method comprises the following steps: sending a blocking detection request to a service processing component, wherein the blocking detection request is used for detecting whether the service processing component is blocked or not; detecting whether a response message to the blocking detection request fed back by the service processing component is received or not within a preset time length; when the response message is not received within the preset time length, determining that the service processing assembly is blocked; the problem that the service request processing progress is slow due to the fact that whether the service processing assembly is blocked cannot be determined can be solved; whether the business processing assembly is blocked or not can be determined in time by sending the blocking detection request, so that the abnormity of the business processing assembly can be found in time, the business processing assembly is adjusted, and the processing progress of the business request can be improved.

Description

Blocking detection method and device for business system and storage medium
Technical Field
The application relates to a blocking detection method, a blocking detection device and a blocking detection storage medium for a service system, and belongs to the technical field of computers.
Background
A large part of the business systems on the market are message-driven, such as back-end business systems that monitor products. Each business system is composed of at least one business processing component, and the business processing components work together to complete a certain business request in the service.
In the working process of a certain service processing component, the service processing component processes at least one message in the message queue and sends the result of processing the message to other service processing components to trigger other service processing components to continue processing the message, so that the service is driven to complete the service request.
However, when a certain service processing component is blocked, other service processing components may not work continuously, thereby affecting the progress of the service request.
Disclosure of Invention
The application provides a blocking detection method, a blocking detection device and a storage medium for a service system, which can solve the problem that the progress of processing a service request is slow when a service processing assembly is blocked because whether the service processing assembly is blocked cannot be determined. The application provides the following technical scheme:
in a first aspect, a method for detecting blocking in a service system is provided, where the method includes:
sending a blocking detection request to a service processing component, wherein the blocking detection request is used for detecting whether the service processing component is blocked or not;
detecting whether a response message to the blocking detection request fed back by the service processing component is received or not within a preset time length;
and when the response message is not received within the preset time length, determining that the service processing assembly is blocked.
Optionally, the method further comprises:
detecting whether the number of times of sending the blocking detection request reaches a preset number of times;
and when the preset times are reached and the response message is not received within the preset time, determining that the service processing assembly is blocked.
Optionally, after determining that the service processing component is blocked, the method further includes:
acquiring a message processing record recorded by the service processing component, wherein the message processing record comprises at least one message processing record;
and determining a blocking point of the service processing component according to the message processing record.
Optionally, the determining a congestion point of the service processing component according to the message processing record includes:
detecting whether the message processing record comprises a processing record of which the end processing time is not recorded;
and when the message processing record comprises a processing record of which the processing time is not recorded, determining that the message corresponding to the processing record is the blocking point.
Optionally, after detecting whether the message processing record includes a processing record of an unrecorded processing end time, the method further includes:
and when the message processing record does not comprise a processing record of which the processing end time is not recorded, determining a message corresponding to the last processing record in the message processing record and the first n processing records of the last processing record as the blocking point, wherein n is a positive integer.
Optionally, before sending the blocking probe request to the service processing component, the method further includes:
receiving a registration request sent by the service processing component, wherein the registration request is used for requesting to monitor the blocking state of the service processing component and at least comprises a component identifier of the service processing component and the preset duration;
and recording the corresponding relation between the component identification and the preset duration.
Optionally, after receiving the registration request sent by the service processing component, the method further includes:
receiving a deregistration request sent by the service processing component, wherein the deregistration request is used for requesting to cancel monitoring of the blocking state of the service processing component and at least comprises the component identification;
and deleting the corresponding relation according to the registration canceling request.
In a second aspect, a congestion detection apparatus for a traffic system is provided, the apparatus comprising:
a request sending module, configured to send a blocking detection request to a service processing component, where the blocking detection request is used to detect whether the service processing component is blocked;
the response receiving module is used for detecting whether a response message to the blocking detection request fed back by the service processing component is received or not within a preset time length;
and the blocking determining module is used for determining that the service processing assembly is blocked when the response message is not received within the preset time length.
Optionally, the apparatus further comprises:
the number detection module is used for detecting whether the number of times of sending the blocking detection request reaches a preset number of times;
the blocking determining module is further configured to determine that the service processing component is blocked when the preset number of times is reached and the response message is not received within the preset time length.
Optionally, the apparatus further comprises:
the record acquisition module is used for acquiring the message processing record recorded by the service processing component after the service processing component is determined to be blocked, wherein the message processing record comprises at least one message processing record;
and the blocking point determining module is used for determining the blocking point of the service processing component according to the message processing record.
Optionally, the congestion point determining module includes:
an end time detection unit configured to detect whether the message processing record includes a processing record in which an end processing time is not recorded;
and the congestion point determining unit is used for determining that the message corresponding to the processing record is the congestion point when the message processing record comprises the processing record which does not record the processing ending time.
Optionally, the congestion point determining unit is further configured to:
and when the message processing record does not comprise a processing record of which the processing end time is not recorded, determining a message corresponding to the last processing record in the message processing record and the first n processing records of the last processing record as the blocking point, wherein n is a positive integer.
Optionally, the apparatus further comprises:
a registration request receiving module, configured to receive a registration request sent by a service processing component before sending a blocking detection request to the service processing component, where the registration request is used to request monitoring of a blocking state of the service processing component, and the registration request at least includes a component identifier of the service processing component and the preset duration;
and the corresponding relation recording module is used for recording the corresponding relation between the component identification and the preset duration.
Optionally, the apparatus further comprises:
a cancel request receiving module, configured to receive a cancel registration request sent by the service processing component after receiving a registration request sent by the service processing component, where the cancel registration request is used to request to cancel monitoring of a blocking state of the service processing component, and the cancel registration request at least includes the component identifier;
and the corresponding relation deleting module is used for deleting the corresponding relation according to the registration canceling request.
In a third aspect, a congestion detection apparatus for a traffic system is provided, the apparatus comprising a processor and a memory; the memory stores a program that is loaded and executed by the processor to implement the congestion detection method for a business system according to the first aspect.
In a fourth aspect, a computer-readable storage medium is provided, in which a program is stored, and the program is loaded and executed by the processor to implement the congestion detection method for a traffic system according to the first aspect.
The beneficial effect of this application lies in: the method comprises the steps that a blocking detection request is sent to a service processing assembly, and when a response message sent by the service processing assembly is not received within a preset time length, the service processing assembly is determined to be blocked; the problem that the service request processing progress is slow due to the fact that whether the service processing assembly is blocked cannot be determined can be solved; whether the business processing assembly is blocked or not can be determined in time by sending the blocking detection request, so that the abnormity of the business processing assembly can be found in time, the business processing assembly is adjusted, and the processing progress of the business request can be improved.
The foregoing description is only an overview of the technical solutions of the present application, and in order to make the technical solutions of the present application more clear and clear, and to implement the technical solutions according to the content of the description, the following detailed description is made with reference to the preferred embodiments of the present application and the accompanying drawings.
Drawings
Fig. 1 is a schematic structural diagram of a congestion detection system for a service system according to an embodiment of the present application;
fig. 2 is a flowchart of a congestion detection method for a service system according to an embodiment of the present application;
fig. 3 is a flowchart of a congestion detection method for a business system according to another embodiment of the present application;
fig. 4 is a flowchart of a congestion detection method for a business system according to another embodiment of the present application;
fig. 5 is a block diagram of a congestion detection apparatus for a service system according to an embodiment of the present application;
fig. 6 is a block diagram of a congestion detection apparatus for a service system according to an embodiment of the present application.
Detailed Description
The following detailed description of embodiments of the present application will be described in conjunction with the accompanying drawings and examples. The following examples are intended to illustrate the present application but are not intended to limit the scope of the present application.
Fig. 1 is a schematic structural diagram of a congestion detection system for a service system according to an embodiment of the present application, and as shown in fig. 1, the system at least includes: a congestion monitoring component 110 and at least one traffic processing component 120.
The congestion monitoring component 110 may be a software, hardware, or a combination of software and hardware components disposed in a congestion monitoring apparatus. Wherein, the blockage monitoring device can be a terminal, such as: mobile phones, desktop computers, handheld computers, wearable devices, and the like; alternatively, the present embodiment may be a server, which is not limited to this.
The congestion monitoring component 110 is used to monitor the traffic processing component 120 for processing messages. Illustratively, the congestion monitoring component 110 sends a congestion probe request to the traffic processing component 120; detecting whether a response message to the blocking detection request fed back by the service processing component 120 is received within a preset time length; and when the response message is not received within the preset time length, determining that the service processing assembly is blocked.
The blocking detection request is used for detecting whether the service processing component is blocked or not.
Optionally, the traffic processing component 110 is communicatively coupled to the congestion monitoring component 110 in a wired or wireless manner. Illustratively, the traffic processing component 110 is communicatively connected to the congestion monitoring component 110 via Inter-Process Communication (IPC).
The business processing component 110 can be a software, hardware, or a combination of software and hardware components disposed in a business processing apparatus. The service processing device may be a terminal, such as: mobile phones, desktop computers, handheld computers, wearable devices, and the like; alternatively, the present embodiment may be a server, which is not limited to this.
The service processing component 110 is configured to process the messages in the corresponding message queue, and further configured to feed back a response message to the congestion detection request to the congestion monitoring component 110 when receiving the congestion detection request sent by the congestion monitoring component 110.
Alternatively, the congestion monitoring component 110 and the traffic handling component 120 may be provided in the same device, such as: the blocking monitoring device and the service processing device are arranged in the same server (at the moment, the blocking monitoring device and the service processing device are the same device); alternatively, it may be provided in a different device, such as: the congestion monitoring component 110 is disposed in the server a, and the service processing component 120 is disposed in the server B (in this case, the congestion monitoring device and the service processing device are different devices), which is not limited in this embodiment.
In fig. 1, the congestion monitoring component 110 and the traffic processing component 120 are illustrated as being disposed in the same device. At this time, the congestion monitoring component 110 and the service processing component 120 may use the same shared memory area, in which a message processing record for the congestion monitoring component 110 to determine the congestion point of the service processing component 120 is stored.
It should be added that, in the present application, only one blocking monitoring component 110 is used as a description, and in actual implementation, the number of blocking monitoring components 110 may be multiple, which is not limited in this embodiment.
Fig. 2 is a flowchart of a congestion detection method for a service system according to an embodiment of the present application, where the method is applied to the congestion detection system for the service system shown in fig. 1, and a main body of execution of each step is an example of a congestion monitoring component 110 in the system. The method at least comprises the following steps:
step 201, a blocking detection request is sent to a service processing component.
The blocking probe request is used to detect whether a blocking occurs in a traffic processing component.
Optionally, after the blocking monitoring component sends the blocking probe request to the service processing component, the service processing component adds a message corresponding to the blocking probe request to the message queue.
Illustratively, the message body of the blocking probe request is empty.
Step 202, detecting whether a response message to the blocking detection request fed back by the service processing component is received within a preset time length.
Optionally, when the blocking monitoring component receives the response message within the preset time period, it is determined that the service processing component is not blocked, and step 201 is executed again; alternatively, the flow ends. When the congestion monitoring component does not receive the response message within the preset time period, step 203 is executed.
Optionally, the reply message includes, but is not limited to, a component identification of the business process component. The component identifier may be a name of the service processing component, a number of the service processing component, or the like, and the type of the component identifier is not limited in this embodiment. Of course, the reply message may also include other content, such as: the number of history messages of the service processing component, the load capacity of the service processing component, and the like.
Step 203, when the response message is not received within the preset time length, determining that the service processing component is blocked.
In summary, in the congestion detection method for the service system provided in this embodiment, a congestion detection request is sent to a service processing component, and when a response message sent by the service processing component is not received within a preset time period, it is determined that the service processing component is congested; the problem that the service request processing progress is slow due to the fact that whether the service processing assembly is blocked cannot be determined can be solved; whether the business processing assembly is blocked or not can be determined in time by sending the blocking detection request, so that the abnormity of the business processing assembly can be found in time, the business processing assembly is adjusted, and the processing progress of the business request can be improved.
Optionally, based on each method embodiment, after step 201, the congestion monitoring component may further detect whether the number of times of sending the congestion detection request reaches a preset number of times; when the preset times are reached and the response message is not received within the preset time length, determining that the service processing assembly is blocked; when the preset number of times is not reached, step 201 is executed again, at this time, the congestion monitoring component sends the congestion detection request again after a preset time interval.
The preset times can be sent by the service processing component; alternatively, the congestion monitoring component may be prestored in the congestion monitoring component, which is not limited in this embodiment.
Optionally, the congestion monitoring component may detect whether the number of times of sending the congestion detection request reaches a preset number before step 202; or, after step 202, it may also be detected whether the number of times of sending the blocking probe request reaches a preset number of times; alternatively, it may also be detected whether the number of times of sending the blocking probe request reaches the preset number of times when the step 202 is executed, and the execution sequence between the blocking monitoring component executing the step 202 and detecting whether the number of times of sending the blocking probe request reaches the preset number of times is not limited in this embodiment.
Because the number of messages processed by the service processing component may be large, the service processing component may be temporarily not in time to process the message corresponding to the blocking detection request, in this embodiment, the blocking monitoring component may determine that the service processing component is blocked when no feedback is received from any of the blocking detection requests sent multiple times, and may improve the accuracy of the blocking monitoring component in determining that the service processing component is blocked.
Optionally, based on various method embodiments, after step 203, the congestion monitoring component may further determine a congestion point at which the traffic processing component is congested. Illustratively, after determining that the business processing component is blocked, the blocking monitoring component acquires a message processing record recorded by the business processing component; a choke point for the business process component is determined from the message process record.
In the process of processing the message by the service processing component, the end processing time for processing the message is written into the message processing record, after the blocking monitoring component determines that the service processing component is blocked, the message processing record can be read, and the blocking point of the service processing component is determined according to the message processing record.
Alternatively, the message handling record may be stored in a shared memory area of the traffic handling component and the congestion monitoring component.
Wherein the message processing record comprises a processing record of at least one message. Optionally, the processing record comprises at least an identification of the message and an ending processing time of the message. Of course, the process record may also include other content, such as: the start processing time of the message, etc., and this embodiment does not limit this.
Illustratively, the congestion monitoring component determines a congestion point of the traffic processing component based on the message processing record, comprising: detecting whether the message processing record comprises a processing record of which the end processing time is not recorded; when the message processing record comprises a processing record of which the processing time is not recorded, determining a message corresponding to the processing record as a blocking point; and when the message processing record does not comprise a processing record of which the processing end time is not recorded, determining a message corresponding to the last processing record in the message processing record and the first n processing records of the last processing record as a blocking point, wherein n is a positive integer.
When the message processing record comprises the processing record of which the processing time is not recorded, the service processing component is explained to process the message corresponding to the processing record all the time, and at this time, the message is the congestion point. When the message processing record does not include the processing record of which the end processing time is not recorded, the number of the messages processed by the service processing component is excessive, and at this time, the messages corresponding to the last processing record and the first n processing records of the last processing record are determined as the blocking points.
In this embodiment, by determining the blocking point at which the service processing component is blocked after it is determined that the service processing component is blocked, the efficiency of determining the blocking point of the service processing component can be improved, thereby improving the efficiency of repairing the abnormality of the service processing component.
Optionally, based on various method embodiments, the traffic processing component may also register in the congestion monitoring component before step 201.
Fig. 3 is a flowchart of a congestion detection method for a service system according to another embodiment of the present application, and this embodiment explains an example in which the method is applied to the congestion detection system for the service system shown in fig. 1. The method at least comprises the following steps:
step 301, the service processing component sends a registration request to the congestion monitoring component.
The service processing component generates a registration request when the blocking condition of the message needs to be monitored by the blocking monitoring component, and sends the registration request to the blocking monitoring component.
The registration request is used for requesting the blocking monitoring component to monitor the blocking state of the service processing component.
Optionally, the registration request at least includes a component identifier of the service processing component and a preset duration. Optionally, the registration request may also include a preset number of times.
Illustratively, a service processing component stores a component identifier and a preset duration, and the preset duration can be set by a developer; or, the time duration may be sent by other devices, and the setting manner of the preset time duration is not limited in this embodiment.
Illustratively, when the registration request further includes a preset number of times, the service processing component further stores the preset number of times, which may be set by a developer; or, the number of times of the transmission may be transmitted by other devices, and the present embodiment does not limit the setting manner of the preset number of times.
Step 302, the congestion monitoring component receives a registration request sent by the service processing component.
Optionally, after receiving the registration request, the congestion monitoring component also feeds back a registration response to the service processing component. The message content in the registration reply may be the same as the message content in the registration request, or the message content in the registration reply may also be different from the message content in the registration request, which is not limited in this embodiment.
Step 303, the congestion monitoring component records a corresponding relationship between the component identifier and a preset duration.
After the blocking monitoring component receives the registration request sent by the service processing component, the corresponding relation between the identification of the registration component and the preset time length starts the blocking monitoring function of the service processing component.
Optionally, the preset durations corresponding to different service processing components may be different.
Optionally, when the registration request further includes a preset number of times, the congestion monitoring component records a corresponding relationship between the component identifier, the preset duration, and the preset number of times. Optionally, the preset times corresponding to different service processing components may be different.
In step 304, the congestion monitoring component sends a congestion probe request to the traffic processing component.
The related description of this step is detailed in step 201, and this embodiment is not described herein again.
Step 305, the congestion monitoring component detects whether a response message to the congestion detection request fed back by the service processing component is received within a preset time length.
Optionally, details of the step are described in step 202, and this embodiment is not described herein again.
In step 306, the congestion monitoring component detects whether the number of times of sending the congestion detection request reaches a preset number of times. Alternatively, step 306 may be performed after step 305; alternatively, it may be performed before step 305; alternatively, the step 305 may be executed at the same time, which is not limited in this embodiment.
Optionally, the blocking monitoring component receives a response message fed back by the service processing component within a preset time length, or executes step 304 again when the number of times of sending the blocking detection request does not reach the preset number of times; and when the number of times of sending the blocking detection request reaches the preset number of times and the response message fed back by the service processing component is not received within the preset duration, executing step 307.
Step 307, determining that the service processing component is blocked.
In summary, in this embodiment, the service processing component sends a registration request to the blocking monitoring component, and then the blocking monitoring component starts a function of monitoring a blocking state of the service processing component according to the registration request; the blocking monitoring component does not need to monitor all the service processing components, and only needs to monitor the service processing component which sends the registration request; the load of the jam monitoring component can be reduced.
Optionally, after step 303, if the traffic processing component does not need the blocking monitoring component to monitor the blocking status, a deregistration request may be sent to the traffic processing component.
Fig. 4 is a flowchart of a congestion detection method for a service system according to another embodiment of the present application, and this embodiment explains an example in which the method is applied to the congestion detection system for the service system shown in fig. 1. After step 303, the method comprises at least the following steps:
in step 401, the service processing component sends a deregistration request to the congestion monitoring component.
The deregistration request is used for requesting to cancel monitoring of the blocking state of the service processing component.
Optionally, the deregistration request includes at least a component identification.
In step 402, the congestion monitoring component receives a deregistration request sent by the service processing component.
Optionally, after receiving the deregistration request, the congestion monitoring component also feeds back a deregistration response to the service processing component. The message content in the deregistration response may be the same as the message content in the deregistration request, or the message content in the deregistration response may also be different from the message content in the deregistration request, which is not limited in this embodiment.
In step 403, the congestion monitoring component deletes the corresponding relationship between the component identifier and the preset duration according to the deregistration request.
And after receiving a registration cancellation request sent by the service processing component, the blocking monitoring component deletes the corresponding relation between the component identifier and the preset time length, and cancels the blocking monitoring function of the service processing component.
Optionally, when the registration request further includes a preset number of times, the congestion monitoring component deletes the corresponding relationship between the component identifier, the preset duration, and the preset number of times.
In summary, in this embodiment, the service processing component sends a registration cancellation request to the blocking monitoring component, and then the blocking monitoring component cancels the function of monitoring the blocking state of the service processing component according to the registration cancellation request; the blocking monitoring component does not need to monitor all the service processing components, and only needs to monitor the registered service processing components; the load of the jam monitoring component can be reduced.
Fig. 5 is a block diagram of a congestion detection apparatus for a service system according to an embodiment of the present application, and this embodiment takes the example that the apparatus is applied to the management server 120 in the congestion detection system for a service system shown in fig. 1. The device at least comprises the following modules: a request sending module 510, a response receiving module 520 and a blocking determination module 530.
A request sending module 510, configured to send a blocking probe request to a service processing component, where the blocking probe request is used to detect whether the service processing component is blocked;
a response receiving module 520, configured to detect whether a response message to the blocking detection request, which is fed back by the service processing component, is received within a preset time length;
a block determining module 530, configured to determine that the service processing component is blocked when the response message is not received within the preset time length.
Optionally, the apparatus further comprises:
the number detection module is used for detecting whether the number of times of sending the blocking detection request reaches a preset number of times;
the blocking determining module 530 is further configured to determine that the service processing component is blocked when the preset number of times is reached and the response message is not received within the preset time length.
Optionally, the apparatus further comprises: the device comprises a record acquisition module and a blockage point determination module.
The record acquisition module is used for acquiring the message processing record recorded by the service processing component after the service processing component is determined to be blocked, wherein the message processing record comprises at least one message processing record;
and the blocking point determining module is used for determining the blocking point of the service processing component according to the message processing record.
Optionally, the congestion point determining module includes: an end time detection unit and a choke point determination unit.
An end time detection unit configured to detect whether the message processing record includes a processing record in which an end processing time is not recorded;
and the congestion point determining unit is used for determining that the message corresponding to the processing record is the congestion point when the message processing record comprises the processing record which does not record the processing ending time.
Optionally, the congestion point determining unit is further configured to:
and when the message processing record does not comprise a processing record of which the processing end time is not recorded, determining a message corresponding to the last processing record in the message processing record and the first n processing records of the last processing record as the blocking point, wherein n is a positive integer.
Optionally, the apparatus further comprises: a registration request receiving module and a corresponding relation recording module.
A registration request receiving module, configured to receive a registration request sent by a service processing component before sending a blocking detection request to the service processing component, where the registration request is used to request monitoring of a blocking state of the service processing component, and the registration request at least includes a component identifier of the service processing component and the preset duration;
and the corresponding relation recording module is used for recording the corresponding relation between the component identification and the preset duration.
Optionally, the apparatus further comprises: a cancellation request receiving module and a corresponding relation deleting module.
A cancel request receiving module, configured to receive a cancel registration request sent by the service processing component after receiving a registration request sent by the service processing component, where the cancel registration request is used to request to cancel monitoring of a blocking state of the service processing component, and the cancel registration request at least includes the component identifier;
and the corresponding relation deleting module is used for deleting the corresponding relation according to the registration canceling request.
For relevant details reference is made to the above-described method embodiments.
It should be noted that: when the blocking detection device for the service system provided in the above embodiment performs the blocking detection for the service system, only the division of the above functional modules is used for illustration, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the blocking detection device for the service system is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the blocking detection apparatus for the service system and the blocking detection method for the service system provided in the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
Fig. 6 is a block diagram of a congestion detection apparatus for a service system according to an embodiment of the present application, where the apparatus may be an apparatus including the congestion monitoring component 110 in the congestion detection system for a service system shown in fig. 1, such as: a smartphone, a tablet, a laptop, a desktop, or a server. The blocking detection device for the service system may also be referred to as a user equipment, a portable terminal, a laptop terminal, a desktop terminal, a control terminal, etc., which is not limited in this embodiment. The apparatus includes at least a processor 610 and a memory 620.
Processor 601 may include one or more processing cores such as: 4 core processors, 6 core processors, etc. The processor 601 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 601 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 601 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, processor 601 may also include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
The memory 602 may include one or more computer-readable storage media, which may be non-transitory. The memory 602 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 602 is used to store at least one instruction for execution by processor 601 to implement the congestion detection method for a business system provided by the method embodiments herein.
In some embodiments, the congestion detection apparatus for a service system may further include: a peripheral interface and at least one peripheral. The processor 601, memory 602 and peripheral interface may be connected by a bus or signal lines. Each peripheral may be connected to the peripheral interface via a bus, signal line, or circuit board. Illustratively, peripheral devices include, but are not limited to: radio frequency circuit, touch display screen, audio circuit, power supply, etc.
Of course, the congestion detection apparatus for the service system may also include fewer or more components, which is not limited in this embodiment.
Optionally, the present application further provides a computer-readable storage medium, where a program is stored, and the program is loaded and executed by a processor to implement the congestion detection method for a service system provided in the foregoing method embodiment.
Optionally, the present application further provides a computer product, which includes a computer-readable storage medium, where a program is stored in the computer-readable storage medium, and the program is loaded and executed by a processor to implement the congestion detection method for a service system provided in the foregoing method embodiment.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (9)

1. A congestion detection method for a traffic system, the method comprising:
receiving a registration request sent by a service processing component, wherein the registration request is used for requesting to monitor the blocking state of the service processing component and at least comprises a component identifier and preset duration of the service processing component;
recording the corresponding relation between the component identification and the preset duration;
sending a blocking detection request to the service processing component to trigger the service processing component to add a message corresponding to the blocking detection request into a message queue; the blocking detection request is used for detecting whether the service processing component is blocked or not;
detecting whether a response message to the blocking detection request fed back by the service processing component is received or not within the preset time length;
and when the response message is not received within the preset time length, determining that the service processing assembly is blocked.
2. The method of claim 1, wherein the method further comprises:
detecting whether the number of times of sending the blocking detection request reaches a preset number of times;
and when the preset times are reached and the response message is not received within the preset time, determining that the service processing assembly is blocked.
3. The method of claim 1, wherein after determining that the traffic processing component is blocked, further comprising:
acquiring a message processing record recorded by the service processing component, wherein the message processing record comprises at least one message processing record;
and determining a blocking point of the service processing component according to the message processing record.
4. The method of claim 3, wherein said determining a congestion point for the traffic processing component from the message processing record comprises:
detecting whether the message processing record comprises a processing record of which the end processing time is not recorded;
and when the message processing record comprises a processing record of which the processing time is not recorded, determining that the message corresponding to the processing record is the blocking point.
5. The method of claim 4, wherein after said detecting whether the message processing record includes a processing record for which a processing end time is not recorded, further comprising:
and when the message processing record does not comprise a processing record of which the processing end time is not recorded, determining a message corresponding to the last processing record in the message processing record and the first n processing records of the last processing record as the blocking point, wherein n is a positive integer.
6. The method of claim 1, wherein after receiving the registration request sent by the service processing component, further comprising:
receiving a deregistration request sent by the service processing component, wherein the deregistration request is used for requesting to cancel monitoring of the blocking state of the service processing component and at least comprises the component identification;
and deleting the corresponding relation according to the registration canceling request.
7. A congestion detection apparatus for a traffic system, the apparatus comprising:
a module, configured to receive a registration request sent by a service processing component, where the registration request is used to request monitoring of a blocking state of the service processing component, and the registration request at least includes a component identifier and a preset duration of the service processing component;
a module for recording the corresponding relationship between the component identifier and the preset duration;
a request sending module, configured to send a blocking detection request to the service processing component, so as to trigger the service processing component to add a message corresponding to the blocking detection request to a message queue; the blocking detection request is used for detecting whether the service processing component is blocked or not;
a response receiving module, configured to detect whether a response message to the blocking detection request, which is fed back by the service processing component, is received within the preset duration;
and the blocking determining module is used for determining that the service processing assembly is blocked when the response message is not received within the preset time length.
8. A congestion detection apparatus for a traffic system, the apparatus comprising a processor and a memory; stored in the memory is a program that is loaded and executed by the processor to implement the congestion detection method for a traffic system according to any of claims 1 to 6.
9. A computer-readable storage medium, characterized in that the storage medium has stored therein a program which, when being executed by a processor, is adapted to implement the congestion detection method for a traffic system according to any one of claims 1 to 6.
CN201810459426.1A 2018-05-15 2018-05-15 Blocking detection method and device for business system and storage medium Active CN108768768B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810459426.1A CN108768768B (en) 2018-05-15 2018-05-15 Blocking detection method and device for business system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810459426.1A CN108768768B (en) 2018-05-15 2018-05-15 Blocking detection method and device for business system and storage medium

Publications (2)

Publication Number Publication Date
CN108768768A CN108768768A (en) 2018-11-06
CN108768768B true CN108768768B (en) 2020-12-01

Family

ID=64006839

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810459426.1A Active CN108768768B (en) 2018-05-15 2018-05-15 Blocking detection method and device for business system and storage medium

Country Status (1)

Country Link
CN (1) CN108768768B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113438520B (en) * 2021-06-29 2023-01-03 北京奇艺世纪科技有限公司 Data processing method, device and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101187892A (en) * 2006-11-17 2008-05-28 上海高性能集成电路设计中心 Device for real-time monitoring inside of processor
CN102915292A (en) * 2011-08-02 2013-02-06 北京大学 Communication method based on multi-core processor and detection method and control method thereof
CN103414916A (en) * 2013-08-30 2013-11-27 苏州科达科技股份有限公司 Fault diagnosis system and method
CN106453564A (en) * 2016-10-18 2017-02-22 北京京东尚科信息技术有限公司 Elastic cloud distributed massive request processing method, device and system
CN106815063A (en) * 2017-01-11 2017-06-09 福建升腾资讯有限公司 A kind of control platform of the automation equipment of many exchange channels
CN107590015A (en) * 2017-09-11 2018-01-16 北京京东尚科信息技术有限公司 The method and apparatus for monitoring the obstruction of main thread

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10200267B2 (en) * 2016-04-18 2019-02-05 Nyansa, Inc. System and method for client network congestion detection, analysis, and management

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101187892A (en) * 2006-11-17 2008-05-28 上海高性能集成电路设计中心 Device for real-time monitoring inside of processor
CN102915292A (en) * 2011-08-02 2013-02-06 北京大学 Communication method based on multi-core processor and detection method and control method thereof
CN103414916A (en) * 2013-08-30 2013-11-27 苏州科达科技股份有限公司 Fault diagnosis system and method
CN106453564A (en) * 2016-10-18 2017-02-22 北京京东尚科信息技术有限公司 Elastic cloud distributed massive request processing method, device and system
CN106815063A (en) * 2017-01-11 2017-06-09 福建升腾资讯有限公司 A kind of control platform of the automation equipment of many exchange channels
CN107590015A (en) * 2017-09-11 2018-01-16 北京京东尚科信息技术有限公司 The method and apparatus for monitoring the obstruction of main thread

Also Published As

Publication number Publication date
CN108768768A (en) 2018-11-06

Similar Documents

Publication Publication Date Title
CN106407031B (en) A kind of RAM leakage localization method and electronic equipment
EP3562096B1 (en) Method and device for timeout monitoring
CN106412091A (en) Method, device and system for controlling data transmission
CN108255620B (en) Service logic processing method, device, service server and system
CN107743137B (en) File uploading method and device
CN105607986A (en) Acquisition method and device of user behavior log data
CN107729213B (en) Background task monitoring method and device
CN104376036A (en) Socket management with reduced latency packet processing
CN114978883B (en) Network wakeup management method and device, electronic equipment and storage medium
CN105847446B (en) Method, device and system for acquiring network data
CN111913669B (en) SSD power-down speed improving method and device, computer equipment and storage medium
CN110597694A (en) Method and terminal for monitoring front-end page
CN108667740B (en) Flow control method, device and system
CN108768768B (en) Blocking detection method and device for business system and storage medium
CN106294364B (en) Method and device for realizing web crawler to capture webpage
CN109034668B (en) ETL task scheduling method, ETL task scheduling device, computer equipment and storage medium
CN105373393A (en) Method for realizing hot plug of equipment in OS in non-event driven mode
CN112965799A (en) Task state prompting method and device, electronic equipment and medium
CN109542198B (en) Method and equipment for controlling power-on of PCIE card
CN114024867B (en) Network anomaly detection method and device
CN112463514A (en) Monitoring method and device for distributed cache cluster
CN112866422B (en) Data request processing method and device
CN111090627B (en) Log storage method and device based on pooling, computer equipment and storage medium
CN114024878A (en) Data transmission method, device, medium and equipment
CN113835885A (en) Message detection method, device, electronic equipment and 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
GR01 Patent grant
GR01 Patent grant