Distributed active detection method and device, computer equipment and storage medium
By determining the required device group and target scheduling equipment based on the detection task configuration information and edge detection equipment status in the distributed active detection system, the problem of inaccuracy of detection results caused by differences in different edge detection equipment types is solved, and the optimization of resource usage and the accuracy of detection results are achieved.
Patent Information
- Application Number
- CN202311799565.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-25
- Publication Date
- 2025-06-27
AI Technical Summary
The types of edge detection equipment of different targets vary greatly, making it difficult to ensure the accuracy of active detection results.
By obtaining the configuration information of the detection task and multiple edge detection devices in the online state, a required device group for performing the detection task is determined, and a target scheduling device whose detection resource usage meets the preset optimal conditions is determined from the multiple edge detection devices to perform active detection.
The use of detection resources is optimized, the consumption of detection resources is reduced, and the accuracy of detection results is ensured.
Smart Images

Figure CN120216351A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular, to a distributed active detection method, apparatus, computer device, and storage medium. Background Art
[0002] After the development of an online application is completed, performance testing is required. Usually, distributed edge devices are manipulated to initiate active detection on the online application service, simulate user access behaviors, and collect data such as performance metrics and response times of the online application service. Thereby, the performance evaluation of the online application service and the evaluation of the access experience of users to the online application service in different regions and network environments are realized, facilitating the timely discovery of potential performance problems and faults, and ensuring the availability of the online application service in different regions and network environments.
[0003] However, the types of different target edge detection devices vary greatly, and the differences in target edge detection devices in different countries and regions are also significant. Moreover, the detection requirements are also different, making it difficult to ensure the accuracy of the results of active detection. Summary of the Invention
[0004] In view of this, the present disclosure provides a distributed active detection method, apparatus, computer device, and storage medium to solve the problem of difficulty in ensuring the accuracy of the results of active detection.
[0005] In a first aspect, the present disclosure provides a distributed active detection method, including: obtaining configuration information of a detection task and a plurality of edge detection devices in an online state; determining a mandatory device group for executing the detection task based on the configuration information; determining, from the devices corresponding to the plurality of edge detection devices, a target scheduling device whose detection resource usage meets a preset optimal condition based on the plurality of edge detection devices and the mandatory device group; and performing active detection on the detection task using the target scheduling device.
[0006] In a second aspect, the present disclosure provides a distributed active detection apparatus, including: an obtaining module, configured to obtain configuration information of a detection task and a plurality of edge detection devices in an online state; a mandatory device determination module, configured to determine a mandatory device group for executing the detection task based on the configuration information; a scheduling device determination module, configured to determine, from the devices corresponding to the plurality of edge detection devices, a target scheduling device whose detection resource usage meets a preset optimal condition based on the plurality of edge detection devices and the mandatory device group; and a detection module, configured to perform active detection on the detection task using the target scheduling device.
[0007] In a third aspect, the present disclosure provides a computer device, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to execute the distributed active detection method according to the first aspect or any corresponding embodiment thereof.
[0008] In a fourth aspect, the present disclosure provides a computer-readable storage medium, on which computer instructions are stored. The computer instructions are used to cause a computer to execute the distributed active detection method according to the first aspect or any corresponding embodiment thereof.
[0009] The distributed active detection method, device, computer device, and storage medium provided by the present disclosure divide the mandatory device group according to the configuration information, and determine the target scheduling device in combination with the edge detection devices in the online state, so as to actively detect the detection task through the target scheduling device. Thus, it is possible to determine the required mandatory device group according to the configuration information of different detection requirements, so as to determine the target scheduling device with the optimal detection resource usage, which not only optimizes the detection resource usage, reduces the consumption of detection resources, but also ensures the accuracy of the detection result. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0011] Figure 1 is a flowchart of the distributed active detection method according to an embodiment of the present disclosure;
[0012] Figure 2 is a flowchart of another distributed active detection method according to an embodiment of the present disclosure;
[0013] Figure 3 is a flowchart of yet another distributed active detection method according to an embodiment of the present disclosure;
[0014] Figure 4 is a schematic diagram of replacing edge detection devices with a centralized detection device according to an embodiment of the present disclosure;
[0015] Figure 5 is a structural block diagram of the distributed active detection device according to an embodiment of the present disclosure;
[0016] Figure 6 is a schematic diagram of the hardware structure of the computer device according to an embodiment of the present disclosure. Detailed implementation manners
[0017] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure. Apparently, the described embodiments are some, but not all, of the embodiments of the present disclosure. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present disclosure without creative efforts shall fall within the protection scope of the present disclosure.
[0018] Currently, in order to understand the experience of real users when accessing online applications and timely discover experience problems, related technologies manipulate distributed edge nodes to initiate active detection of online application services, so as to debug and optimize online applications according to the results of active detection. However, the types of different target edge detection devices vary greatly, and the differences in target edge detection devices in different countries and regions are also very large. Moreover, the detection requirements are also different, resulting in a large amount of detection resource usage and it is difficult to ensure the accuracy of the results of active detection well.
[0019] Based on this, the technical solution of the present disclosure realizes active detection of detection tasks through refined scheduling of devices and centralized detection substitution, while ensuring the accuracy of detection results, optimizing the usage of detection resources.
[0020] According to the embodiments of the present disclosure, an embodiment of a distributed active detection method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0021] In this embodiment, a distributed active detection method is provided, which can be used in computer devices such as computers, mobile phones, servers, etc. Figure 1 is a flowchart of the distributed active detection method according to the embodiments of the present disclosure, as Figure 1 shown, the process includes the following steps:
[0022] Step S101, obtain the configuration information of the detection task and multiple edge detection devices in an online state.
[0023] The detection task is the task required to be detected for the online application service. The detection task can be scheduled and executed according to a preset period, where the preset period is a task execution period set in advance. The configuration information is the parameter information pre-configured by the tester for the detection task.
[0024] Specifically, testers can perform pre-configuration for the detection task, and the configuration information corresponds to the detection task. Thus, in each round of task scheduling for periodically executing the detection task, the configuration information corresponding to the detection task can be directly retrieved.
[0025] The edge detection device is a detection device required for actively detecting online applications, such as mobile phones, computers, servers, etc. Specifically, in each round of task scheduling for periodically executing the detection task, it is detected in real time whether each edge detection device used to execute the detection task is online, so as to determine one or more edge detection devices in the online state from all edge detection devices capable of executing the detection task in combination with the online detection results of the detection devices.
[0026] Step S102: Based on the configuration information, determine the mandatory device group for executing the detection task.
[0027] The mandatory device group is a device grouping composed of each necessary detection device required for executing the detection task. Specifically, by identifying the parameter information carried in the configuration information, the attributes, quantities, types, etc. of the devices required for executing the detection task are determined. Multiple necessary detection devices required for executing the detection task are determined according to the parameter information carried in the configuration information, and the multiple necessary detection devices are determined as the mandatory device group required for executing the detection task.
[0028] Step S103: Based on the multiple edge detection devices and the mandatory device group, determine the target scheduling device from the devices corresponding to the multiple edge detection devices whose detection resource usage meets the preset optimal condition.
[0029] The preset optimal condition is a condition preset for determining the detection resource usage, such as the least detection resource usage. The target scheduling device is a device that meets the detection requirements of the detection task and whose detection resource usage for executing the detection task meets the preset optimal condition. Among them, the detection resource usage is used to characterize the detection resources consumed for executing the detection task.
[0030] When executing the detection task, each edge detection device in the online state has a corresponding single-detection resource usage. By sorting the single-detection resource usages corresponding to each edge detection device, the corresponding sorting result is obtained. Then, according to the sorting result and the mandatory device group, the minimum detection resource usage required for executing the detection task is determined from the multiple edge detection devices, and the multiple detection devices corresponding to the minimum detection resource usage are determined as the target scheduling devices. Among them, the minimum detection resource usage is obtained by superimposing the single-detection resource usages corresponding to the multiple detection devices.
[0031] Step S104: Use the target scheduling device to actively detect the detection task.
[0032] In each round of task scheduling for periodically executing detection tasks, active detection requests can be regularly sent to online application services to simulate user access behavior. The active detection requests can be HTTP requests or requests containing specific performance indicators and load tests.
[0033] Specifically, after determining the target scheduling device, an active detection request is initiated to the online application service through the target scheduling device. Accordingly, the online application service can respond to the active detection request and feedback response data, such as response time, error code, and page content, to the target scheduling device that initiated the active detection request. In this way, the active detection of the detection task using the target scheduling device is realized, which facilitates the evaluation of the availability, stability, and user experience of the online application service based on the active detection results, so that corresponding measures can be taken in time to improve the performance and user experience of the online application service when problems are found.
[0034] The distributed active detection method provided in this embodiment divides the required equipment groups through configuration information, and determines the target scheduling device in combination with the edge detection device in an online state, so as to actively detect the detection task through the target scheduling device. Therefore, the required required equipment group can be determined in combination with the configuration information of different detection requirements to determine the target scheduling device with the best detection resource usage, which not only optimizes the detection resource usage and reduces the consumption of detection resource usage, but also ensures the accuracy of the detection results.
[0035] In this embodiment, a distributed active detection method is provided, which can be used for computer devices, such as computers, mobile phones, tablet computers, etc. Figure 2 is a flow chart of a distributed active detection method according to an embodiment of the present disclosure. Figure 2 As shown, the process includes the following steps:
[0036] Step S201, obtaining configuration information of the detection task and multiple edge detection devices in an online state. For detailed description, please refer to the relevant description corresponding to the above method embodiment, which will not be repeated here.
[0037] Step S202: Determine a required device group for executing the detection task based on the configuration information.
[0038] Specifically, the above step S202 may include:
[0039] Step S2021: Determine the number of required devices based on the task configuration information in the configuration information.
[0040] The task configuration information is used to describe the device attributes and the number of devices required for the detection task. Specifically, there are configuration items for the task configuration information in the configuration information, and testers can pre-configure the device parameters for the detection task. By parsing the description information corresponding to the task configuration information, the number of devices of the mandatory devices corresponding to the execution of the detection task can be determined.
[0041] For example, if the task configuration information is "5 devices in area A", then "area A" is the area attribute that the mandatory devices need to have, and "5" is the number of devices required for the mandatory devices.
[0042] Step S2022: Based on the alarm configuration information in the configuration information, determine the device grouping type of the mandatory devices.
[0043] The alarm configuration information is used to describe the grouping type of the detection devices required for the detection task. Specifically, there are configuration items for the alarm configuration information in the configuration information, and testers can pre-configure the alarm parameters for the detection task. By parsing the description information corresponding to the alarm configuration information, the device grouping type of the mandatory devices corresponding to the execution of the detection task can be determined.
[0044] For example, if the alarm configuration information is "grouped by operator", then "operator" is the grouping type that the mandatory devices need to have.
[0045] Step S2023: Based on the number of devices and the device grouping type, determine the mandatory device group.
[0046] Construct the mandatory device group for executing the detection task according to the number of devices and the device grouping type of the mandatory devices. For example, if the task configuration information is "5 devices in area A" and the alarm configuration information is "grouped by operator", combining "5 devices in area A" and "grouped by operator", the mandatory device group can be constructed as "5 devices in area A, with at least one device for each operator in area A".
[0047] The distributed active detection method provided in this embodiment combines the task configuration information and the alarm configuration information to determine the mandatory device group required for the detection task, realizes the accurate division of the detection device group, and ensures the accuracy of the subsequent detection results.
[0048] In some alternative embodiments, the above step S202 may further include:
[0049] Step S2024: When there is data analysis configuration information in the configuration information, determine the data analysis type based on the data analysis configuration information.
[0050] The data analysis configuration information is used to describe the fine-grained data analysis requirements for performing the detection task. Specifically, configuration items for the data analysis configuration information are set in the configuration information, and testers can pre-configure the data analysis for the detection task. By parsing the description information corresponding to the data analysis configuration information, the data analysis requirements for performing the detection task can be determined.
[0051] For example, if the data analysis configuration information is "analyze according to device type", then "device type" represents the data analysis granularity.
[0052] Step S2025, determine the mandatory device group based on the number of devices, the device grouping type, and the data analysis type.
[0053] Construct the mandatory device group for performing the detection task according to the number of mandatory devices, the device grouping type, and the data analysis type. For example, the task configuration information is "5 devices in area A", the alarm configuration information is "grouped according to operators", and the data analysis configuration information is "analyze according to device type". Combining "5 devices in area A", "grouped according to operators", and "analyze according to device type", the mandatory device group can be constructed as "5 devices in area A, at least one device for each operator in area A, and at least one device for each device type".
[0054] The distributed active detection method provided in this embodiment combines the task configuration information, the alarm configuration information, and the data analysis configuration information to determine the mandatory device group required for performing the detection task, realizes flexible setting of the data analysis granularity, facilitates subsequent fine-grained data analysis, and can accurately divide the detection device group from multiple dimensions, further ensuring the accuracy of subsequent detection results.
[0055] Step S203, based on multiple edge detection devices and the mandatory device group, determine the target scheduling device from the multiple edge detection devices whose detection resource usage meets the preset optimal conditions.
[0056] Specifically, the above step S203 may include:
[0057] Step S2031, sort each edge detection device based on the single-detection resource usage corresponding to each edge detection device to obtain the sorting result of the single-detection resource usage.
[0058] The single-detection resource usage is the resources consumed by the edge detection device for performing the current detection task. Here, the single-detection resource usage of each online edge detection device can be combined, and each online edge detection device can be sorted according to the single-detection resource usage to obtain a sorting result from low to high or from high to low.
[0059] Step S2032: Based on the sorting result and the mandatory device group, determine multiple target detection devices with low single-detection resource usage from multiple edge detection devices.
[0060] According to the constructed mandatory device group above, and in accordance with the sorting result of the single-detection resource usage, the edge detection devices corresponding to each single-detection resource usage can be determined from low to high. Subsequently, in the order of the single-detection resource usage from low to high, determine the edge detection devices with low single-detection resource usage from multiple online edge detection devices, and use the determined edge detection devices with low single-detection resource usage as the target detection devices.
[0061] Step S2033: Determine the multiple target detection devices as the target scheduling devices.
[0062] To ensure the optimal detection resource usage and save the resources consumed in performing the detection task, the multiple target detection devices with low single-detection resource usage determined here are used as the target scheduling devices.
[0063] In a specific example, assume that all available edge detection devices corresponding to the detection task are as follows:
[0064]
[0065] Among them, the single-detection resource usage is sorted from low to high.
[0066] Combining the online status of the edge detection devices and the mandatory device group ("5 devices in Area A, with at least one device from each operator in Area A"), the edge detection devices with low single-detection resource usage are 2, 3, 5, 7, and 8. Subsequently, determine the edge detection devices 2, 3, 5, 7, and 8 as the target scheduling devices required for performing the detection task.
[0067] In some alternative embodiments, the above step S203 may further include: in response to a detection parameter editing operation for an edge detection device, determine the single-detection resource usage of the edge detection device.
[0068] The detection parameter editing operation is an operation in which a tester individually enters the detection resource usage for each edge detection device. For each type of edge detection device (such as VPS and mobile phone), the tester can enter the individual single-detection resource usage for each edge detection device according to the actual usage scenario. Correspondingly, the computer device can respond to the tester's detection parameter editing operation and generate the single-detection resource usage for each edge detection device according to the detection parameter editing operation.
[0069] Of course, for each type of edge detection device, it may have an estimated default resource usage. At this time, the edge detection devices can be sorted according to the estimated default resource usage.
[0070] In the above embodiment, the single-detection resource usage of each edge detection device is supported to be input, which facilitates accurately calculating the single-detection resource usage according to the actual scenario, thus ensuring the accurate acquisition of the single-detection resource usage.
[0071] Step S204: Use the target scheduling device to actively detect the detection task. For detailed description, please refer to the relevant description corresponding to the above method embodiment, which will not be elaborated here.
[0072] The distributed active detection method provided by the embodiments of the present disclosure determines the target scheduling device required to execute the detection task through the mandatory device group and the single-detection resource usage of the edge detection device, thereby ensuring the lowest detection resource usage on the basis of achieving accurate detection.
[0073] In this embodiment, a distributed active detection method is provided, which can be used in computer devices such as computers, mobile phones, and tablets. Figure 3 is a flowchart of the distributed active detection method according to the embodiments of the present disclosure, as Figure 3 shown. The process includes the following steps:
[0074] Step S301: Obtain the configuration information of the detection task and multiple edge detection devices in the online state. For detailed description, please refer to the relevant description corresponding to the above method embodiment, which will not be elaborated here.
[0075] Step S302: Detect whether there is centralized detection information in the configuration information.
[0076] The centralized detection information indicates that a centralized detection device is used to replace the edge detection device to initiate an active detection request. Among them, centralized detection refers to a detection method in which all detection tasks and resources are centralized in a central device or a group of central devices for management and execution, and the centralized detection device is the central device used to execute all detection tasks.
[0077] Specifically, in the task configuration of the configuration information, there is a configuration item for centralized detection information, and testers can pre-configure the centralized detection information for the detection task. In each round of task scheduling for periodically executing the detection task, by parsing each configuration item in the configuration information, it is determined whether there is centralized detection information in the configuration information. When there is centralized detection information in the configuration information, step S303 is executed; otherwise, the target scheduling device is retrieved from the edge detection devices to actively detect the detection task through the target scheduling device.
[0078] Step S303: when there is centralized detection information in the configuration information, a target edge detection device corresponding to the detection task and a public network address corresponding to the target edge detection device are obtained from multiple edge detection devices.
[0079] The target edge detection device is an edge detection device that performs the current detection task; each edge detection device requires a public network address for network communication, and the public network address is used to identify and locate the position of the edge detection device in the Internet.
[0080] When there is centralized detection information in the configuration information, it means that the centralized detection device replaces the edge detection device to perform the current detection task. At this time, the target edge detection device for performing the detection task can be obtained from multiple edge detection devices, and the public network address corresponding to the target edge detection device can be determined.
[0081] Step S304, determine the edge device address corresponding to the public network address.
[0082] The edge device address is the internal link address for accessing online application services, that is, the IP address of the edge device in the content distribution network. Figure 4 As shown, the edge device address matches the public network address of the edge detection device, and the edge detection device in the external link communicates with the edge device in the internal link through the public network address.
[0083] Step S305: When the centralized detection device initiates an active detection request, the public network address is carried in the active detection request, and the centralized detection device is used to access the target edge device corresponding to the edge device address.
[0084] The target edge device is an edge device in the internal link used to access online application services. When a centralized detection device is used to initiate an active detection request, the public network address corresponding to the edge detection device (i.e., the public network exit IP address) is carried in the active detection request, and the edge device address in the internal link is obtained through the public network address. The target edge device for accessing the online application service is determined through the edge device address, so that the online application service can be accessed through the centralized detection device instead of the edge detection device.
[0085] Centralized detection and edge detection differ in external links, but are consistent in internal links. If the detection task is more sensitive to external links, since the external links of edge detection devices are closer to those of real users, edge detection devices can be used for detection. If the detection task does not care about external links but only internal links, since the internal links of centralized detection devices are consistent with those of real users and the detection resource usage is lower than that of edge detection devices, centralized detection devices can be used instead of edge detection devices for detection to reduce the detection resource usage.
[0086] In the distributed active detection method provided in this embodiment, in a scenario where the detection task does not care about the external link, a centralized detection device is used to replace the edge detection device to execute the detection task, reducing the amount of detection resources used and not affecting the accuracy of the detection result.
[0087] In some optional implementation manners, the above method for determining the public network address corresponding to the target edge detection device may include:
[0088] Step a1, access the address resolution network corresponding to the target edge detection device to determine the public network address corresponding to the target edge detection device.
[0089] The public network address of the target edge detection device can be determined through a third-party address resolution website. Specifically, the third-party address resolution website has a corresponding network address. Through this network address, the address resolution network corresponding to the target edge detection device can be accessed, and the public network address corresponding to the target edge detection device can be directly read from the address resolution network.
[0090] Step a2, obtain the heartbeat signal corresponding to the target edge detection device, and parse the public network address from the heartbeat signal.
[0091] The heartbeat signal is a signal periodically sent for detecting the network connection status. The heartbeat signal contains the identifier, timestamp, public network address, etc. of the edge detection device. Specifically, the edge detection device can report the heartbeat signal every 5 minutes. By parsing the information contained in the heartbeat signal, the most recently obtained public network address contained in it can be parsed from the heartbeat signal.
[0092] Step a3, access the database corresponding to the target edge detection device, and read the public network address from the database.
[0093] The public network address of the edge detection device will be recorded in the database. When centralized detection is used, after determining the target edge detection device corresponding to the centralized detection device, the public network address corresponding to the target edge detection device can be read from the database.
[0094] The distributed active detection method provided in this embodiment collects the public network address corresponding to the target edge detection device through multiple methods, ensuring the flexible acquisition of the public network address.
[0095] In some optional implementation manners, the above method may further include:
[0096] Step b1, obtain the centralized detection ratio in the centralized detection information.
[0097] Step b2, determine the edge detection ratio based on the centralized detection ratio.
[0098] Step b3: According to the centralized detection ratio and the edge detection ratio, perform centralized detection and edge detection on the detection task to generate a detection result for the detection task.
[0099] The centralized detection ratio refers to the ratio of using centralized detection devices to execute the detection task, and the centralized detection ratio is preset by the tester according to actual needs. The sum of the centralized detection ratio and the edge detection ratio is 100%. After determining the centralized detection ratio, the edge detection ratio can be determined. For example, the centralized detection ratio is 80% and the edge detection ratio is 20%.
[0100] When executing the detection task, the centralized detection ratio and the edge detection ratio will be determined according to the centralized detection ratio set in the configuration information, and thus, the centralized detection or the edge device detection will be determined for each round of detection task by combining the centralized detection ratio and the edge detection ratio. For example, if the centralized detection ratio is 80%, then for every 5 rounds of detection tasks, 4 rounds use centralized detection and 1 round uses edge device detection.
[0101] The distributed active detection method provided in this embodiment can select a matching detection method according to the actual application scenario by mixing the use of centralized detection and edge device detection, so as to minimize the consumption of detection resource usage.
[0102] In some optional implementation manners, the above method may further include:
[0103] Step c1: Respond to an input operation for a public network address to determine a target public network address.
[0104] Step c2: Carry the target public network address in the active detection request initiated by the centralized detection device, and use the centralized detection device to access the target edge device corresponding to the target public network address.
[0105] Centralized detection depends on edge detection devices. If there are fewer edge detection devices or no edge detection devices are set in a certain area, it is difficult to perform centralized detection in this area. At this time, a public network address can be configured separately to initiate centralized detection through the configured public network address.
[0106] Specifically, the input operation is an operation where a tester inputs a public network address, and the target public network address is the public network address generated by the tester according to the input operation. The tester can input the public network address and corresponding conditions such as the network environment and geographical location through a separate configuration file. Correspondingly, the computer device can respond to the input operation of the tester to determine the target public network address corresponding to the input operation. Subsequently, when an active detection request is initiated by the centralized detection device, the target public network address is carried in the active detection request to use the centralized detection device to access the target edge device corresponding to the target public network address, so as to implement centralized detection for the area corresponding to the target public network address.
[0107] The distributed active detection method provided in this embodiment realizes centralized detection through separate input of public network addresses, enabling a similar detection effect to be achieved without edge detection devices, and expanding the application scenarios of active detection.
[0108] In this embodiment, a distributed active detection device is also provided. This device is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. As used hereinafter, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0109] This embodiment provides a distributed active detection device, as Figure 5 shown, including:
[0110] An acquisition module 401, configured to acquire configuration information of a detection task and a plurality of edge detection devices in an online state.
[0111] A mandatory device determination module 402, configured to determine a group of mandatory devices for executing the detection task based on the configuration information.
[0112] A scheduling device determination module 403, configured to determine a target scheduling device whose detection resource usage meets a preset optimal condition from the devices corresponding to the plurality of edge detection devices based on the plurality of edge detection devices and the group of mandatory devices.
[0113] A detection module 404, configured to actively detect the detection task by using the target scheduling device.
[0114] In some alternative implementation manners, the above mandatory device determination module 402 may include:
[0115] A device quantity determination unit, configured to determine the quantity of mandatory devices based on the task configuration information in the configuration information.
[0116] A grouping type determination unit, configured to determine the device grouping type of the mandatory devices based on the alarm configuration information in the configuration information.
[0117] A first device group determination unit, configured to determine the mandatory device group based on the number of devices and the device grouping type.
[0118] In some alternative embodiments, the above-mentioned mandatory device determination module 402 may further include:
[0119] An analysis type determination unit, configured to determine the data analysis type based on the data analysis configuration information when there is data analysis configuration information in the configuration information.
[0120] A second device group determination unit, configured to determine the mandatory device group based on the number of devices, the device grouping type, and the data analysis type.
[0121] In some alternative embodiments, the above-mentioned scheduling device determination module 403 may include:
[0122] A sorting unit, configured to sort each edge detection device based on the single detection resource usage amount corresponding to each edge detection device, so as to obtain a sorting result of the single detection resource usage amount.
[0123] A first determination unit, configured to determine multiple target detection devices with a small single detection resource usage amount from multiple edge detection devices based on the sorting result and the mandatory device group.
[0124] A second determination unit, configured to determine the multiple target detection devices as the target scheduling devices.
[0125] In some alternative embodiments, the above-mentioned scheduling device determination module 403 may further include:
[0126] An editing unit, configured to determine the single detection resource usage amount of the edge detection device in response to a detection parameter editing operation for the edge detection device.
[0127] In some alternative embodiments, the above-mentioned device may further include:
[0128] A detection module, configured to detect whether there is centralized detection information in the configuration information.
[0129] A public network address acquisition module, configured to obtain the target edge detection device corresponding to the detection task and the public network address corresponding to the target edge detection device from multiple edge detection devices when there is centralized detection information in the configuration information.
[0130] An edge device address determination module, configured to determine the edge device address corresponding to the public network address.
[0131] The first access module is used to carry a public network address in the active detection request when the centralized detection device initiates an active detection request, and use the centralized detection device to access a target edge device corresponding to the edge device address.
[0132] In some optional implementations, the edge device address determination module may include:
[0133] The network access unit is used to access the address resolution network corresponding to the target edge detection device and determine the public network address corresponding to the target edge detection device.
[0134] The address resolution unit is used to obtain the heartbeat signal corresponding to the target edge detection device and resolve the public network address from the heartbeat signal.
[0135] The address reading unit is used to access the database corresponding to the target edge detection device and read the public network address from the database.
[0136] In some optional embodiments, the above device may further include:
[0137] The first detection ratio acquisition module is used to obtain the centralized detection ratio in the centralized detection information.
[0138] The second detection ratio acquisition module is used to determine the edge detection ratio based on the centralized detection ratio.
[0139] The combined detection module is used to perform centralized detection and edge detection on the detection task according to the centralized detection ratio and the edge detection ratio, and generate a detection result for the detection task.
[0140] In some optional embodiments, the above device may further include:
[0141] The address input module is used to determine a target public network address in response to an input operation on a public network address.
[0142] The second access module is used to carry the target public network address in the active detection request initiated by the centralized detection device, and use the centralized detection device to access the target edge device corresponding to the target public network address.
[0143] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0144] The distributed active detection device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0145] The distributed active detection device provided in this embodiment divides the mandatory device group through configuration information, and determines the target scheduling device in combination with the edge detection devices in the online state, so as to actively detect the detection task through the target scheduling device. Therefore, it can determine the required mandatory device group according to the configuration information of different detection requirements, so as to determine the target scheduling device with the optimal detection resource usage. This not only optimizes the detection resource usage, reduces the consumption of detection resources, but also ensures the accuracy of the detection results.
[0146] This embodiment of the present disclosure also provides a computer device having the above-mentioned Figure 5 distributed active detection device.
[0147] Please refer to Figure 6 , Figure 6 which is a schematic structural diagram of a computer device provided by an alternative embodiment of the present disclosure. As Figure 6 shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including a high-speed interface and a low-speed interface. Each component communicates with each other using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some alternative embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (such as an array of servers, a set of blade servers, or a multi-processor system). Figure 6 In
[0148] FIG., a single processor 10 is taken as an example.
[0149] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0150] The memory 20 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of a computer device presented by a kind of mini-program landing page, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 20 may optionally include a memory remotely disposed relative to the processor 10, and these remote memories can be connected to the computer device through 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.
[0151] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk, or a solid-state drive; the memory 20 may further include a combination of the above-mentioned types of memories.
[0152] The computer device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30, and the output device 40 can be connected through a bus or other means. Figure 6 Taking connection through a bus as an example.
[0153] The input device 30 can receive input digital or character information, and generate key signal inputs related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointing stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED), and a haptic feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light-emitting diode, a display, and a plasma display. In some alternative embodiments, the display device may be a touch screen.
[0154] The computer device further includes a communication interface for the computer device to communicate data with other devices or communication networks.
[0155] Embodiments of the present disclosure also provide a computer-readable storage medium. The methods according to the embodiments of the present disclosure can be implemented in hardware, firmware, or be implemented as computer code that can be recorded on a storage medium, or be implemented as computer code that is originally stored in a remote storage medium or a non-transitory machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the methods described herein can be processed by such software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code, and when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the methods shown in the above embodiments are implemented.
[0156] Although embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A distributed active detection method, characterized in that include: Obtain configuration information of the detection task and multiple edge detection devices that are online; Based on the configuration information, determining a required device group for performing the detection task; Based on the multiple edge detection devices and the mandatory device group, determining a target scheduling device whose detection resource usage meets a preset optimal condition from the multiple edge detection devices; The target scheduling device is used to actively detect the detection task.
2. The method according to claim 1, wherein The determining, based on the configuration information, a group of mandatory devices for performing the detection task includes: Determine the number of required devices based on the task configuration information in the configuration information; Determine the device grouping type of the mandatory device based on the alarm configuration information in the configuration information; The mandatory device group is determined based on the number of devices and the device grouping type.
3. The method according to claim 2, wherein Also includes: When data analysis configuration information exists in the configuration information, determining a data analysis type based on the data analysis configuration information; The mandatory device group is determined based on the number of devices, the device grouping type, and the data analysis type.
4. The method according to any one of claims 1 to 3, characterized in that Based on the multiple edge detection devices and the mandatory device group, determining a target scheduling device whose detection resource usage meets a preset optimal condition from the devices corresponding to the multiple edge detection devices includes: Based on the single detection resource usage corresponding to each of the edge detection devices, sorting the edge detection devices to obtain a sorting result of the single detection resource usage; Based on the sorting result and the required device group, determining a plurality of target detection devices with small single detection resource usage from the plurality of edge detection devices; The multiple target detection devices are determined as the target scheduling devices.
5. The method according to claim 4, wherein Also includes: In response to a detection parameter editing operation on the edge detection device, a single detection resource usage of the edge detection device is determined.
6. The method according to claim 1, wherein Also includes: Detecting whether there is centralized detection information in the configuration information; When the centralized detection information exists in the configuration information, acquiring a target edge detection device corresponding to the detection task and a public network address corresponding to the target edge detection device from the multiple edge detection devices; Determine the edge device address corresponding to the public network address; When the centralized detection device initiates an active detection request, the public network address is carried in the active detection request, and the centralized detection device is used to access the target edge device corresponding to the edge device address.
7. The method according to claim 6, wherein Obtaining the public network address corresponding to the target edge detection device includes: Accessing the address resolution network corresponding to the target edge detection device to determine the public network address corresponding to the target edge detection device; Or, obtaining a heartbeat signal corresponding to the target edge detection device, and parsing the public network address from the heartbeat signal; Or, access a database corresponding to the target edge detection device, and read the public network address from the database.
8. The method according to claim 6, wherein Also includes: Obtaining a centralized detection ratio in the centralized detection information; Based on the centralized detection ratio, determining the edge detection ratio; Perform centralized detection and edge detection on the detection task according to the centralized detection ratio and the edge detection ratio, and generate a detection result for the detection task.
9. The method according to claim 6, wherein Further includes: In response to an input operation for a public network address, determine a target public network address; Carry the target public network address in the active detection request initiated by the centralized detection device, and use the centralized detection device to access the target edge device corresponding to the target public network address.
10. A distributed active detection device, characterized in that, Includes: An acquisition module, configured to acquire configuration information of a detection task and a plurality of edge detection devices in an online state; An essential device determination module, configured to determine a group of essential devices for executing the detection task based on the configuration information; A scheduling device determination module, configured to determine a target scheduling device with a detection resource usage amount meeting a preset optimal condition from the plurality of edge detection devices based on the plurality of edge detection devices and the group of essential devices; A detection module, configured to perform active detection on the detection task by using the target scheduling device.
11. A computer device, characterized in that, Includes: A memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to execute the distributed active detection method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, Computer instructions are stored on the computer-readable storage medium, and the computer instructions are used to cause a computer to execute the distributed active detection method according to any one of claims 1 to 9.