Distributed dial test monitoring method and system, and electronic device and storage medium
By using non-blocking I/O model and zero-copy method in a distributed environment, the dial-test request and response data are asynchronously processed, and the problems of high performance bottlenecks, delays and resource occupancy in traditional methods are solved, and efficient and real-time distributed dial-test monitoring is achieved.
Patent Information
- Application Number
- PCT/CN2024/135870
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-06
- Filing Date
- 2024-11-29
- Publication Date
- 2025-06-12
AI Technical Summary
Traditional performance testing methods have problems such as performance bottlenecks, increased latency, inefficient data transmission, low concurrency efficiency and high resource occupancy in distributed environments.
The non-blocking I/O model and zero copy method are used to process dial requests and response data asynchronously through event multiplexers, reducing the number of data copies and improving data transmission efficiency.
Real-time and efficient distributed dial-up monitoring is realized, reducing latency and improving the accuracy of server resource utilization and performance measurement.
Smart Images

Figure CN2024135870_12062025_PF_FP_ABST
Abstract
Description
Distributed dialing monitoring method, system, electronic device and storage medium Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a distributed dialing monitoring method, system, electronic device, and storage medium. Background Art
[0002] Performance testing is crucial for assessing the capabilities and limitations of various systems and applications. Traditional performance testing methods often rely on blocking I / O and copying data for data exchange, which can lead to performance bottlenecks and increased latency in distributed environments. These methods are no longer able to meet the needs of high-performance, real-time, and accurate monitoring. Traditional monitoring methods face the following challenges:
[0003] (1) Inefficient data transmission: Traditional methods may need to copy data multiple times during data transmission, from disk to memory buffer and then to network buffer, resulting in low data transmission efficiency.
[0004] (2) High latency: In traditional methods, the use of blocking I / O models may cause threads to be blocked, thereby increasing the latency of data transmission. In a distributed environment, since data needs to be transmitted between multiple nodes, the latency problem of traditional methods is particularly obvious.
[0005] (3) Data interaction between dial-up test node systems occupies a large amount of system resources: Data interaction between traditional distributed dial-up test node systems occupies a large amount of system resources, affecting the normal operation of dial-up test monitoring object tasks.
[0006] In summary, traditional monitoring methods have problems such as high latency, low concurrency efficiency, and high resource utilization. Summary of the Invention
[0007] The main purpose of this application is to propose a real-time, efficient, and high-performance distributed dialing monitoring method, system, electronic device, and storage medium.
[0008] To achieve the above objectives, an embodiment of the present application provides a distributed dialing monitoring method, the method comprising:
[0009] When the dial test request node initiates a dial test, the dial test request connection event is registered to the connection request event multiplexer to obtain a first event set;
[0010] Polling the first event set through the connection request event multiplexer to determine a first connection event;
[0011] Registering the first connection event to a data read event multiplexer to obtain a second event set;
[0012] Polling the second event set through the data read event multiplexer to determine a ready data read event;
[0013] Based on the zero-copy method, according to the ready data reading event, the dial test response data is read through the data reading thread pool;
[0014] Encapsulating the dial test response data, and creating a data analysis and processing module connection event according to the encapsulated dial test response data;
[0015] Registering the data analysis and processing module connection event to the connection request event multiplexer to obtain a third event set;
[0016] Polling the third event set through the connection request event multiplexer to determine a ready data analysis and processing module connection event;
[0017] Sending the dial test response data to the data analysis and processing module according to the ready data analysis and processing module connection event;
[0018] The data analysis and processing module performs data analysis on the dial test response data to obtain a data analysis result.
[0019] In some embodiments, polling the first event set through the connection request event multiplexer to determine the first connection event includes:
[0020] The first event set is polled, and the connected dial test request connection event is determined as a first connection event.
[0021] In some embodiments, after determining the first connection event, the current time and the connection start time of the first connection event are obtained; the connection duration of the first connection event is calculated based on the current time and the connection start time; wherein the connection duration is used as one of the dial test response data.
[0022] In some embodiments, the zero-copy method is based on the ready data read event, and the dial test response data is read by the data reading thread pool, including:
[0023] Create a data reading thread pool and a direct buffer type object, and create a thread task class object for reading the dial test response data;
[0024] According to the ready data reading event, submitting the thread task class object to the data reading thread pool for asynchronous execution;
[0025] The dial test response data is read into the direct buffer through the read function of the direct buffer type object.
[0026] In some embodiments, performing data analysis and processing on the dial test response data by the data analysis and processing module to obtain a data analysis result includes:
[0027] Registering a monitoring connection request event to the connection request event multiplexer to obtain a fourth event set; wherein the monitoring connection request event is used to monitor the dialing test result sent by the dialing test object node;
[0028] Polling the fourth event set through the connection request event multiplexer to determine the ready listening connection request event;
[0029] Generate a dial test result reading event according to the ready listening connection request event, and register the dial test result reading event to the data reading event multiplexer to obtain a fifth event set;
[0030] Polling the result fifth event set through the data read event multiplexer to determine the ready dial test result read event;
[0031] Based on the zero-copy method, according to the ready dial test result reading event, the dial test result is read through the data reading thread pool;
[0032] Perform result analysis on the dial test result to obtain a data analysis result.
[0033] In some embodiments, the method further comprises:
[0034] Receive and save the dialing information of the dialing object to be monitored;
[0035] When the dial test information is updated, the dial test information is resent to the dial test requesting node.
[0036] In some embodiments, the method further comprises:
[0037] An alarm is issued for the test object whose data analysis results show abnormality.
[0038] To achieve the above objectives, another aspect of the present application further provides a distributed dialing monitoring system, the system comprising:
[0039] The first module is configured to register a dial test request connection event to a connection request event multiplexer when a dial test request node initiates a dial test, thereby obtaining a first event set;
[0040] A second module is configured to poll the first event set through the connection request event multiplexer to determine a first connection event;
[0041] a third module, configured to register the first connection event to a data read event multiplexer to obtain a second event set;
[0042] a fourth module, configured to poll the second event set through the data read event multiplexer to determine a ready data read event;
[0043] A fifth module is configured to read the dial test response data through a data reading thread pool based on a zero-copy method and according to the ready data reading event;
[0044] A sixth module is configured to encapsulate the dial test response data and create a data analysis and processing module connection event according to the encapsulated dial test response data;
[0045] A seventh module is configured to register the data analysis and processing module connection event to the connection request event multiplexer to obtain a third event set;
[0046] An eighth module, configured to poll the third event set through the connection request event multiplexer to determine a ready data analysis and processing module connection event;
[0047] A ninth module, configured to send the dial test response data to the data analysis and processing module according to the ready data analysis and processing module connection event;
[0048] The data analysis and processing module is used to perform data analysis and processing on the dial test response data to obtain data analysis results.
[0049] It should be noted that, in some embodiments, the system may further include at least one of the following modules:
[0050] The central node management module is used to receive and save the dial test information of the dial test object to be monitored; when the dial test information is updated, the central node management module is used to resend the dial test information to the dial test request node.
[0051] The alarm module is used to perform alarm processing on the dial test object whose data analysis results show abnormality.
[0052] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application further provides an electronic device, including: a processor and a memory; the memory is used to store programs; the processor executes the program to implement the method described above.
[0053] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application further provides a computer storage medium, in which a program executable by a processor is stored. The program executable by the processor is used to implement the method described above when executed by the processor.
[0054] The embodiments of the present application include at least the following beneficial effects: the present application provides a distributed dialing monitoring method, system, electronic device and storage medium, which can realize asynchronous data interaction by registering events to an event multiplexer and polling to determine the specific process of the event, thereby improving thread blocking and resource waste; using a zero-copy method for data reading can reduce the number of data copies in the distributed dialing monitoring process, thereby improving the data transmission efficiency and performance between dialing nodes, reducing latency, and achieving real-time and efficient beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] The accompanying drawings are used to provide a further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.
[0056] FIG1 is a flow chart of a distributed dialing monitoring method provided by an embodiment of the present application;
[0057] FIG2 is a flow chart of step S102 in FIG1 ;
[0058] FIG3 is a flow chart of step S105 in FIG1 ;
[0059] FIG4 is a flow chart of step S110 in FIG1 ;
[0060] FIG5 is a flowchart of step S120 provided in an embodiment of the present application;
[0061] FIG6 is a flowchart of step S130 provided in an embodiment of the present application;
[0062] 7 is a data processing flow chart of a central node management module and a dialing node module provided in an embodiment of the present application;
[0063] FIG8 is a data processing flow chart of a data processing and analysis module provided in an embodiment of the present application;
[0064] FIG9 is a structural diagram of an implementation scheme of a distributed dial monitoring system provided in an embodiment of the present application;
[0065] 10 is a schematic structural diagram of another embodiment of the distributed dial monitoring system provided in an embodiment of the present application;
[0066] FIG11 is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0067] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are merely examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the appended claims.
[0068] Although the system diagrams illustrate functional modules and the flowcharts illustrate a logical sequence, in some cases, the steps shown or described may be performed in a different order than the module divisions in the system or the order in the flowcharts. The terms "first / S101," "second / S102," and the like in the specification, claims, and drawings are used to distinguish similar items and are not necessarily used to describe a specific order or precedence.
[0069] It will be understood that the terms "first", "second", etc. used in this application may be used herein to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0070] The terms "at least one", "plurality", "each", "any", etc. used in this application include "at least one", "two" or more, "plurality" or "each", "any" or "any one", "each" or "any one" as used herein.
[0071] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0072] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0073] Before explaining the embodiments of the present application in detail, some of the nouns and terms involved in the embodiments of the present application are first explained. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.
[0074] (1) NIO: synchronous non-blocking IO, IO stands for input and output;
[0075] (2) Zero-Copy: The CPU does not need to consume resources for copying data between memories. The main technologies used to achieve zero copy are DMA data transmission technology and memory area mapping technology.
[0076] (3) Reactor pattern: Reactor pattern or responder pattern is an event-driven design pattern;
[0077] (4) Event multiplexer: Its more detailed full name is event reactor thread multiplexer. The embodiments of the present application involve a connection request event multiplexer and a data read event multiplexer. The connection request event multiplexer, i.e., the connection event reactor thread multiplexer, is used to register each connection event and perform polling and distribution processing on the corresponding connection events; the data read event multiplexer, i.e., the data read event reactor thread multiplexer, is used to register data read events and perform polling and distribution processing on the corresponding data read events.
[0078] (5)HTTP (Hypertext Transfer Protocol): Hypertext Transfer Protocol.
[0079] (6)DirectByteBuffer: direct buffer, or direct memory.
[0080] Traditional monitoring methods suffer from system inefficiency, high latency, low concurrency efficiency, and high resource utilization. In view of this, embodiments of the present application provide a distributed dial-up monitoring method, system, electronic device, and storage medium. This solution uses NIO's non-blocking I / O model and a zero-copy approach to monitor and manage each node object and data transmission process in distributed dial-up testing, thereby improving server resource utilization, reducing data transmission latency, and enhancing the accuracy of performance measurements.
[0081] The distributed dialing monitoring method provided in the embodiment of the present application relates to the field of computer technology. The distributed dialing monitoring method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server, or can be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a car terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or can be configured as a server cluster or distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network; the software can be an application that implements the distributed dialing monitoring method, etc., but is not limited to the above forms.
[0082] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.
[0083] FIG1 is an optional flowchart of a distributed dialing monitoring method provided by an embodiment of the present application. The method in FIG1 may include but is not limited to steps S101 to S110.
[0084] S101. When a dial test request node initiates a dial test, a dial test request connection event is registered in a connection request event multiplexer to obtain a first event set.
[0085] S102: Poll the first event set through the connection request event multiplexer to determine a first connection event.
[0086] S103: Register the first connection event to a data read event multiplexer to obtain a second event set.
[0087] S104: Poll the second event set through the data read event multiplexer to determine a ready data read event.
[0088] S105 : Based on the zero-copy method, according to the ready data reading event, the dial test response data is read by the data reading thread pool.
[0089] S106: Encapsulate the dial test response data, and create a data analysis and processing module connection event according to the encapsulated dial test response data.
[0090] S107: Register the data analysis and processing module connection event to the connection request event multiplexer to obtain a third event set.
[0091] S108: Poll the third event set through the connection request event multiplexer to determine a ready data analysis and processing module connection event.
[0092] S109: Send the dial test response data to the data analysis and processing module according to the ready data analysis and processing module connection event.
[0093] S110: Perform data analysis and processing on the dial test response data by the data analysis and processing module to obtain a data analysis result.
[0094] Steps S101 to S110 shown in the embodiment of the present application adopt NIO's non-blocking I / O model, generate corresponding events according to the connection and data reading process of the distributed dial test, and poll and distribute the events through various event multiplexers for execution, thereby realizing asynchronous data interaction and greatly reducing thread blocking and resource waste. Moreover, by adopting the zero-copy method, the embodiment of the present application can also reduce the number of data copies in the distributed dial test monitoring process, thereby improving the efficiency and performance of data transmission between dial test nodes, and further improving server resource utilization.
[0095] Please refer to FIG. 2 . In some embodiments, step S102 may include but is not limited to step S201 .
[0096] S201: Poll the first event set and determine the connected dial test request connection event as a first connection event.
[0097] In some embodiments, in step S201, after determining the first connection event, the current time and the connection start time of the first connection event can be further obtained; the connection duration of the first connection event can be calculated based on the current time and the connection start time; wherein the connection duration is used as one of the dial test response data. Taking the JAVA language implementation as an example, the connection start time stored in the attachment attribute of the SelectionKey can be read and combined with the current time to calculate the connection duration between the dial test node and the dial test object (i.e., the monitoring object).
[0098] By calculating the connection duration based on the current time and the connection start time of the first connection event, the connection duration can be calculated more accurately, providing a numerical basis for subsequent data analysis and processing.
[0099] In step S201 of some embodiments, the Reactor thread multiplexer of the connection event (i.e., the connection request event multiplexer) polls all dialing connection events registered therein, returns the connected dialing connection event and obtains the current time and the connection start time of the dialing connection event; calculates the connection duration based on the above current time and connection start time, and distributes the dialing connection event to the Reactor thread multiplexer registered for the data reading event.
[0100] In step S102 of the embodiment of the present application, by polling the first event set and determining the connected dial test request connection event, it is beneficial to further process the dial test request later.
[0101] Please refer to FIG. 3 . In some embodiments, step S105 may include but is not limited to the following steps S301 to S303 .
[0102] S301: Create a data reading thread pool and a direct buffer type object, and create a thread task class object for reading the dial test response data.
[0103] S302: According to the ready data reading event, submit the thread task class object to the data reading thread pool for asynchronous execution.
[0104] S303: Read the dial test response data into a direct buffer through the read function of the direct buffer type object.
[0105] In step S301 of some embodiments, taking JAVA language as an example, the ThreadPoolExecute class in JAVA language can be used to create a data reading thread pool, and then create an object of the thread task class DataReadTask for reading the dial response data. The DataReadTask task class receives the ready event clientChannel parameter when it is created.
[0106] In step S302 of some embodiments, according to the ready data read event, the DataReadTask task class is submitted to the data read thread pool for asynchronous execution.
[0107] In step S303 of some embodiments, the run() method in the DateReadTask task class is used for implementation, the allocateDirect() method in the ByteBuffer class is used to create a DirectByteBuffer type object buffer (direct memory object in JAVA), and clientChannel.read(buffer) is used to read the dial response data directly into the direct memory, thereby realizing the application of zero-copy technology.
[0108] Step S105 of the embodiment of the present application performs asynchronous data reading based on a zero-copy method, which can read the response data of the received and processed dialing node object more quickly.
[0109] Please refer to FIG. 4 . In some embodiments, step S110 may include but is not limited to the following steps S401 to S406 .
[0110] S401: Register a monitoring connection request event to the connection request event multiplexer to obtain a fourth event set; wherein the monitoring connection request event is used to monitor a dialing test result sent by a dialing test object node.
[0111] S402: Poll the fourth event set through the connection request event multiplexer to determine the ready listening connection request event.
[0112] S403: Generate a dial test result reading event according to the ready listening connection request event, and register the dial test result reading event to the data reading event multiplexer to obtain a fifth event set.
[0113] S404: Poll the fifth result event set through the data read event multiplexer to determine the ready dial test result read event.
[0114] S405 : Based on the zero-copy method, according to the ready dial test result reading event, read the dial test result through the data reading thread pool.
[0115] S406: Analyze and process the dialing test result to obtain a data analysis result.
[0116] In step S401 of some embodiments, a Reactor thread multiplexer of a connection event is used to register a connection request for monitoring a dialing result sent by a dialing node.
[0117] In steps S402 to S403 of some embodiments, after the Reactor thread multiplexer of the connection event polls the ready dial test result reading event, it connects the dial test result sent by the dial test node to generate a read event, registers it to the Reactor thread multiplexer of the data read event, and obtains a fifth event set.
[0118] In step S404 of some embodiments, the Reactor thread multiplexer of the data reading event polls the registered data reading events and returns a ready dialing test result reading event, which is handed over to the data reading thread pool to read the dialing test result data.
[0119] In step S405 of some embodiments, the data reading thread pool uses a zero-copy method similar to that described in step S105 to asynchronously read the dialing test result data through the data reading thread pool according to the ready dialing test result reading event.
[0120] In step S406 of some embodiments, the dialing test result data sent by the dialing test node is analyzed and processed.
[0121] Step S110 of the embodiment of the present application is based on the idea of NIO's synchronous non-blocking model, uses NIO and the master-slave Reactor multi-threaded mode to achieve a faster response to the dial test result request initiated by the dial test node, and uses the zero-copy method to improve the data analysis and processing module's reading, receiving and processing speed of the dial test data results sent by a large number of dial test nodes.
[0122] Referring to FIG. 5 , the distributed dialing monitoring method according to the embodiment of the present application may further include the following step S120 .
[0123] S120: Receive and save the dial test information of the dial test object to be monitored; when the dial test information is updated, resend the dial test information to the dial test request node.
[0124] Saving the dialing information and resending it when there is an update (including but not limited to addition, deletion, modification, etc.) can reduce unnecessary information sending, help improve monitoring efficiency, and reduce resource usage.
[0125] Referring to FIG. 6 , the distributed dialing monitoring method according to the embodiment of the present application may further include the following step S130 .
[0126] S130: Performing alarm processing on the dial test object whose data analysis result shows abnormality.
[0127] The monitoring process of this application is highly efficient and has good performance. It can accurately monitor abnormalities of the dialing test object, and alarm processing of the dialing test object is conducive to timely adjustment of the dialing test object and reduce losses caused by abnormalities.
[0128] The following is a detailed description and explanation of the solution of the embodiment of the present application with reference to specific application examples:
[0129] In an embodiment of the present application, a distributed dial test monitoring method is provided, which can be applied to a distributed dial test monitoring scenario of a system performance test. Referring to FIG7 , a central node management module, a dial test node module, and a data analysis and processing module can be constructed to implement the method of the embodiment of the present application.
[0130] The central node management module is used to receive and save the persistent dialing test information of the user's monitored objects. When the dialing test information is updated (including but not limited to addition, deletion, modification, etc.), the new dialing test information is sent to the dialing test request node.
[0131] In the dial test node module, the master-slave Reactor multi-threaded dial test initiation module processes the dial test request as follows:
[0132] (1) Using the Reactor thread multiplexer of the connection event, register the dial test request connection event with the Reactor thread multiplexer of the connection event when the dial test is initiated.
[0133] (2) The Reactor thread multiplexer of the connection event will poll all the connection events registered in it, return the connected dial-up connection event and obtain the connection start time and current time, calculate the connection time, and distribute the dial-up connection event to the Reactor thread multiplexer registered for the data reading event.
[0134] (3) The Reactor thread multiplexer of the data reading event polls the registered reading events and returns the ready dial test response data reading event, which is handed over to the data reading thread pool to execute the task of reading the dial test response data.
[0135] (4) The data reading thread pool uses DirectByteBuffer (direct buffer) to implement zero-copy technology and asynchronously read the dial test response data. --Use the ThreadPoolExecutor class in the JAVA language to create a thread pool and create an object of the thread task class DataReadTask that reads the dial test response data. When the DataReadTask task class is created, it receives the ready event clientChannel parameter. Submit the DataReadTask task class to the thread pool for asynchronous execution. In the run() method implementation of the DataReadTask task class, use the allocateDirect() method in the ByteBuffer class to create a DirectByteBuffer type object buffer (direct memory object in JAVA), and use clientChannel.read(buffer) to read the dial test response data directly into direct memory, thereby realizing the application of zero-copy technology.
[0136] (5) After the dial test response data is preliminarily processed and encapsulated, an event is created to connect to the data analysis and processing module, which is registered to the Reactor thread multiplexer of the connection event and the preliminarily processed and encapsulated dial test response data is sent to the data analysis and processing module.
[0137] (6) After the Reactor thread multiplexer of the connection event polls the event of the ready connection data analysis and processing module, it returns the event connection of the ready connection data analysis and processing module and registers it to the Reactor thread multiplexer of the data sending event.
[0138] (7) The Reactor thread multiplexer of the data sending event polls the ready dial test response data sending event and hands it over to the sending work thread pool to perform the sending work.
[0139] (8) The data sending thread pool uses the allocateDirect() method of ByteBuffer to create a DirectByteBuffer. It writes data into the DirectByteBuffer, uses the address() method of DirectByteBuffer to obtain its underlying address, passes the underlying address of the DirectByteBuffer to the send method of the underlying network library or operating system to achieve zero copy, and sends the data to the data analysis and processing module.
[0140] In addition, caching technology can be used to configure relevant monitoring information of the dial test object in the dial test node module, which can reduce unnecessary data interaction between the dial test object and the central node module.
[0141] Referring to Figure 8, the data analysis and processing module also mainly processes through the master-slave Reactor multi-threaded dial test initiation module model. The difference between it and the master-slave Reactor multi-threaded dial test initiation module in the dial test node module is the registered events, read data, and the processing performed on the data. Specifically, the data analysis and processing module performs, but is not limited to, the following processing:
[0142] (1) Use the Reactor thread multiplexer of the connection event and register it to monitor the dial test result connection request sent by the dial test node.
[0143] (2) After the Reactor thread multiplexer of the connection event polls the ready dial test result connection, it generates a read event for the dial test result connection sent by the dial test node and registers it to the Reactor thread multiplexer of the data read event.
[0144] (3) The Reactor thread multiplexer of the data reading event polls the registered data reading events and returns the ready dialing result data reading event, which is handed over to the data reading thread pool to execute the task of reading the dialing result data.
[0145] (4) The data reading thread pool uses DirectByteBuffer (direct buffer) to implement zero-copy technology and asynchronously read the dial test result data.
[0146] (5) Analyze and process the dial test result data sent by the dial test node, and issue an alarm for abnormal dial test objects that need to be alarmed.
[0147] Referring to FIG9 , an embodiment of the present application further provides a distributed dialing monitoring system, the system comprising:
[0148] The first module is configured to register a dial test request connection event to a connection request event multiplexer when a dial test request node initiates a dial test, thereby obtaining a first event set;
[0149] A second module is configured to poll the first event set through the connection request event multiplexer to determine a first connection event;
[0150] a third module, configured to register the first connection event to a data read event multiplexer to obtain a second event set;
[0151] a fourth module, configured to poll the second event set through the data read event multiplexer to determine a ready data read event;
[0152] A fifth module is configured to read the dial test response data through a data reading thread pool based on a zero-copy method and according to the ready data reading event;
[0153] A sixth module is configured to encapsulate the dial test response data and create a data analysis and processing module connection event according to the encapsulated dial test response data;
[0154] A seventh module is configured to register the data analysis and processing module connection event to the connection request event multiplexer to obtain a third event set;
[0155] An eighth module, configured to poll the third event set through the connection request event multiplexer to determine a ready data analysis and processing module connection event;
[0156] A ninth module, configured to send the dial test response data to the data analysis and processing module according to the ready data analysis and processing module connection event;
[0157] The data analysis and processing module is used to perform data analysis and processing on the dial test response data to obtain data analysis results.
[0158] It should be noted that, in some embodiments, the system may further include at least one of the following modules:
[0159] The central node management module is used to receive and save the dial test information of the dial test object to be monitored; when the dial test information is updated, the central node management module is used to resend the dial test information to the dial test request node.
[0160] The alarm module is used to perform alarm processing on the dial test object whose data analysis results show abnormality.
[0161] It should be further explained that, referring to FIG. 10 , which is another implementation of the system embodiment, the first to ninth modules of the system can be integrated and encapsulated as the master-slave Reactor multi-threaded dial test initiation module in the aforementioned dial test node module.
[0162] It can be understood that the contents of the above method embodiments are all applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0163] Please refer to FIG11 , which illustrates a hardware structure of an electronic device according to another embodiment. The electronic device includes:
[0164] The processor 901 can be implemented as a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0165] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and is called by the processor 901 to execute the distributed dialing monitoring method of the embodiments of this application.
[0166] Input / output interface 903, used to implement information input and output;
[0167] Communication interface 904, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);
[0168] Bus 905 , which transmits information between various components of the device (e.g., processor 901 , memory 902 , input / output interface 903 , and communication interface 904 );
[0169] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0170] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned distributed dialing monitoring method is implemented.
[0171] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiment, the functions specifically implemented by the present storage medium embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0172] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0173] The distributed dialing monitoring method, system, electronic device, and storage medium provided by the embodiments of the present application generally have the following beneficial effects, including but not limited to:
[0174] 1. Improved server resource utilization: Traditional blocking I / O models require waiting for data to arrive or complete before processing I / O operations. However, the non-blocking I / O model implemented by NIO in this application enables asynchronous data exchange, avoiding thread blocking and resource waste. Combined with zero-copy technology, this reduces the number of data copies, thereby improving the efficiency and performance of data transmission between nodes and further enhancing server resource utilization.
[0175] 2. Reduce latency: By adopting NIO's synchronous non-blocking I / O and zero-copy technology, the embodiments of the present application can reduce the intermediate steps and copy operations in the data transmission process, thereby reducing latency, improving the timeliness of monitoring of monitored objects, and promptly detecting system failures.
[0176] 3. More Accurate Performance Measurement: The methods in this application utilize NIO synchronization, non-blocking methods, and zero-copy methods in multiple locations, combined with a master-slave Reactor multithreading model to prevent the impact of resource usage factors such as system IO blocking on the accuracy of dial-up test results. By parsing and processing transmitted data, it can be combined with other customized data processors and measurement algorithms to calculate and record various performance indicators, such as response time and throughput, providing an accurate measurement and analysis foundation for performance testing.
[0177] The embodiments described in the embodiments of this application are intended to more clearly illustrate the technical solutions of the embodiments of this application and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0178] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0179] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.
[0180] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.
[0181] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0182] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0183] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0184] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0185] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0186] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes multiple instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: various media that can store programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0187] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present invention should be within the scope of the present invention.
Claims
1. A distributed dialing monitoring method, characterized in that: include: When the dial test request node initiates a dial test, the dial test request connection event is registered to the connection request event multiplexer to obtain a first event set; Polling the first event set through the connection request event multiplexer to determine a first connection event; Registering the first connection event to a data read event multiplexer to obtain a second event set; Polling the second event set through the data read event multiplexer to determine a ready data read event; Based on the zero-copy method, according to the ready data reading event, the dial test response data is read through the data reading thread pool; Encapsulating the dial test response data, and creating a data analysis and processing module connection event according to the encapsulated dial test response data; Registering the data analysis and processing module connection event to the connection request event multiplexer to obtain a third event set; Polling the third event set through the connection request event multiplexer to determine a ready data analysis and processing module connection event; According to the ready data analysis and processing module connection event, sending the dial test response data to the data analysis and processing module; The data analysis and processing module performs data analysis and processing on the dial test response data to obtain a data analysis result.
2. A distributed dialing monitoring method according to claim 1, characterized in that: Polling the first event set through the connection request event multiplexer to determine the first connection event includes: The first event set is polled, and the connected dial test request connection event is determined as a first connection event.
3. A distributed dialing monitoring method according to claim 1 or 2, characterized in that: After determining the first connection event, the current time and the connection start time of the first connection event are obtained; the connection duration of the first connection event is calculated according to the current time and the connection start time; wherein the connection duration is used as one of the dial test response data.
4. A distributed dialing monitoring method according to claim 1, characterized in that: The zero-copy method is based on the ready data reading event, and the dial test response data is read through the data reading thread pool, including: Create a data reading thread pool and a direct buffer type object, and create a thread task class object for reading the dial test response data; According to the ready data reading event, submitting the thread task class object to the data reading thread pool for asynchronous execution; The dial test response data is read into the direct buffer through the read function of the direct buffer type object.
5. A distributed dialing monitoring method according to claim 1, characterized in that: The step of performing data analysis and processing on the dial test response data by the data analysis and processing module to obtain a data analysis result includes: Registering the connection request monitoring event to the connection request event multiplexer to obtain a fourth event set; wherein the connection request monitoring event is used to monitor the dialing test result sent by the dialing test object node; Polling the fourth event set through the connection request event multiplexer to determine the ready listening connection request event; Generate a dial test result reading event according to the ready listening connection request event, and register the dial test result reading event to the data reading event multiplexer to obtain a fifth event set; Polling the fifth result event set through the data read event multiplexer to determine the ready dial test result read event; Based on the zero copy method, according to the ready dial test result reading event, the dial test result is read through the data reading thread pool; Perform result analysis processing on the dialing test result to obtain a data analysis result.
6. A distributed dialing monitoring method according to claim 1, characterized in that: The method further comprises: Receiving dialing information of a dialing object to be monitored, and saving the dialing information to a database; When the dialing test information is updated, the dialing test information is resent to the dialing test requesting node.
7. A distributed dialing monitoring method according to claim 1, characterized in that: The method further comprises: An alarm is issued to the test object whose data analysis result shows abnormality.
8. A distributed dialing monitoring system, characterized in that: include: The first module is used to register the dial test request connection event to the connection request event multiplexer when the dial test request node initiates the dial test, so as to obtain a first event set; A second module is configured to poll the first event set through the connection request event multiplexer to determine a first connection event; A third module is used to register the first connection event to a data reading event multiplexer to obtain a second event set; A fourth module is used to poll the second event set through the data read event multiplexer to determine a ready data read event; A fifth module is used to read the dial test response data through a data reading thread pool based on a zero copy method and according to the ready data reading event; The sixth module is used to encapsulate the dial test response data and create a data analysis and processing module connection event according to the dial test response data after encapsulation; A seventh module is used to register the data analysis and processing module connection event to the connection request event multiplexer to obtain a third event set; An eighth module, configured to poll the third event set through the connection request event multiplexer to determine a ready data analysis and processing module connection event; A ninth module, configured to send the dial test response data to the data analysis and processing module according to the ready data analysis and processing module connection event; The data analysis and processing module is used to perform data analysis and processing on the dial test response data through the data analysis and processing module to obtain data analysis results.
9. An electronic device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to any one of claims 1 to 7.
10. A computer storage medium storing a program executable by a processor, characterized in that: The program executable by the processor is used to implement the method according to any one of claims 1 to 7 when executed by the processor.
Citation Information
Patent Citations
Multiplexing asynchronous processing system and method
CN111464628A
Industrial Internet edge gateway design method supporting Web high concurrent access
CN112954006A
Method and server for processing concurrent services based on reactor network model
CN113127204A
Dial testing system
CN116017546A
Distributed dial test monitoring method and system, electronic equipment and storage medium
CN117632683A