Event detection method, computer device, and computer readable storage medium

By calculating the number and importance of weighted events of each event detection thread, dynamically update the detection thread group, solving the problem of low event detection efficiency in the existing technology, and maximizing event detection efficiency under limited computing resources and system Stable performance.

CN118626231BActive Publication Date: 2024-11-08CETC NEW SMART CITY RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411040658.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-11-08
Estimated Expiration
2044-07-31

AI Technical Summary

Technical Problem

The existing event detection system based on surveillance video is difficult to maximize the efficiency of event detection when computing resources are limited, and the camera patrol method is prone to missing events, resulting in low detection efficiency.

Method used

By obtaining the detection thread group, calculating the number of weighted events of each event detection thread, performing update operations based on the actual number of events and the degree of importance, eliminating the less efficient threads, ensuring that limited computing resources are concentrated on the most effective event detection activities. Improve overall detection efficiency and maintain system performance stability through regular updates.

Benefits of technology

The event detection efficiency under limited computing resources is maximized, the accuracy and sensitivity of detection are improved, and the rational allocation and maximum utilization of computing resources are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118626231B_ABST
    Figure CN118626231B_ABST
Patent Text Reader

Abstract

The present application is applicable to the field of computer technology, and provides an event detection method, a computer device, and a computer-readable storage medium, including: obtaining a plurality of running event detection threads, and determining the number of weighted events detected by each event detection thread based on the actual number of events detected by each event detection thread and the importance of each event detection thread; performing at least one update operation on the detection thread group based on the elimination ratio of the event detection thread and the number of each weighted event until the update stop condition is met; after each update operation is performed, determining the average event detection efficiency of the detection thread group, and determining the target detection thread group based on the average efficiency of each event detection; performing an event detection operation based on the target detection thread group to obtain a detection result. The present application can maximize the event detection efficiency under limited computing power resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of computer technology, and in particular, relates to an event detection method, a computer device, and a computer-readable storage medium. Background Art

[0002] Public safety event detection is an important means to discover hidden dangers in urban or regional safety, quickly eliminate risk factors, and prevent accidents or secondary accidents. In recent years, with the development of computer vision and deep learning technology, intelligent video event detection has made great progress.

[0003] The existing event detection system based on surveillance video mainly includes two detection forms, one is the real-time detection method using cameras, and the other is the camera patrol method. The real-time video detection mechanism usually requires a large amount of computing power equipment to support it, resulting in high project construction costs. The camera patrol mechanism often misses a large number of events, making it difficult to maximize event detection efficiency. Summary of the invention

[0004] In view of this, the embodiments of the present application provide an event detection method, a computer device, and a computer-readable storage medium, which can maximize the efficiency of event detection under limited computing resources.

[0005] A first aspect of an embodiment of the present application provides an event detection method, including:

[0006] Acquire a detection thread group, where the detection thread group includes a plurality of running event detection threads, each event detection thread supports an event detection operation of a single acquisition device for a single event type;

[0007] Determining the weighted number of events detected by each event detection thread based on the actual number of events detected by each event detection thread and the importance of each event detection thread;

[0008] Based on the elimination ratio of the event detection threads and the number of each weighted event, performing at least one update operation on the detection thread group until an update stop condition is met;

[0009] After each update operation is performed, determining the event detection average efficiency of the detection thread group, and determining a target detection thread group based on each of the event detection average efficiencies;

[0010] Based on the target detection thread group, an event detection operation is performed to obtain a detection result.

[0011] In an implementation of the first aspect, determining the weighted number of events detected by each event detection thread based on the actual number of events detected by each event detection thread and the importance of each event detection thread includes:

[0012] For each of the event detection threads, determining a location importance coefficient of a collection device associated with the event detection thread and a type importance coefficient of an event type associated with the event detection thread;

[0013] Performing weighted summation on the position importance coefficient and the type importance coefficient to obtain the importance of the event detection thread;

[0014] The actual event quantity and the importance degree are multiplied, and the product result is used as the weighted event quantity detected by the event detection thread.

[0015] In an implementation of the first aspect, the execution process of each update operation includes:

[0016] Based on the preset screening method and the detection thread group, determine the intermediate thread group involved in the update operation;

[0017] Determine the elimination quantity based on the number of event types, the number of acquisition devices associated with the intermediate thread group, and the elimination ratio;

[0018] Based on the elimination quantity and the quantity of each weighted event associated with the intermediate thread group, the intermediate thread group is updated to obtain an updated thread group.

[0019] In an implementation of the first aspect, updating the intermediate thread group based on the elimination quantity and the quantity of each weighted event associated with the intermediate thread group to obtain an updated thread group includes:

[0020] Based on a specified order of the weighted event quantity, the event detection threads in the intermediate thread group are sorted to obtain an ordered thread group;

[0021] Removing the eliminated number of event detection threads from the ordered thread group to obtain a remaining thread group, and stopping the removed event detection threads;

[0022] Acquire a specified number of designated acquisition devices, and allocate a new event detection thread corresponding to each of the event types to each of the designated acquisition devices;

[0023] The new event detection thread is added to the remaining thread group to obtain an updated thread group.

[0024] In an implementation of the first aspect, obtaining a specified number of specified acquisition devices includes:

[0025] Determine the idle computing resources released by the removed event detection thread;

[0026] Determining a specified number based on the idle computing resources and the number of types of event detection types;

[0027] The specified number of acquisition devices are selected from the current detection scene as designated acquisition devices.

[0028] In an implementation of the first aspect, determining the intermediate thread group participating in the update operation based on the preset screening method and the detection thread group includes:

[0029] If the preset screening method is the first screening method, determining at least one fixed detection thread in the detection thread group, the fixed detection thread does not participate in the update operation;

[0030] Based on other event detection threads in the detection thread group except the fixed detection threads, an intermediate thread group participating in the update operation is formed;

[0031] If the preset screening method is the second screening method, the detection thread group is determined as an intermediate thread group participating in the update operation.

[0032] In an implementation of the first aspect, after each update operation is performed, determining the average event detection efficiency of the detection thread group includes:

[0033] Determining a collection device associated with the detection thread group;

[0034] According to the acquisition device, the event detection threads in the detection thread group are grouped to obtain a device thread group;

[0035] Performing weighted summation on the weighted event quantities of the event detection threads in each device thread group to obtain the detection efficiency of each of the acquisition devices;

[0036] All the detection efficiencies are averaged to obtain the average event detection efficiency of the detection thread group.

[0037] In an implementation of the first aspect, determining a target detection thread group based on the average efficiency of each event detection includes:

[0038] Get the average efficiency of initial event detection of the initial detection thread group participating in the first update operation;

[0039] Sorting the initial event detection average efficiency and the event detection average efficiencies in descending order;

[0040] The detection thread group corresponding to the average efficiency of the first event detection after sorting is used as the target detection thread group.

[0041] A second aspect of an embodiment of the present application provides an event detection device, including:

[0042] An acquisition module, used to acquire a detection thread group, wherein the detection thread group includes a plurality of running event detection threads, each event detection thread supports an event detection operation of a single acquisition device for a single event type;

[0043] A first determination module, configured to determine the weighted number of events detected by each event detection thread based on the actual number of events detected by each event detection thread and the importance of each event detection thread;

[0044] An updating module, configured to perform at least one updating operation on the detection thread group based on the elimination ratio of the event detection threads and the number of each weighted event, until an updating stop condition is met;

[0045] A second determination module is used to determine the event detection average efficiency of the detection thread group after each update operation is performed, and determine a target detection thread group based on each event detection average efficiency;

[0046] The detection module is used to perform event detection operations based on the target detection thread group to obtain detection results.

[0047] In the first aspect of the embodiment of the present application, by calculating the weighted number of events of each event detection thread, the contribution and value of each event detection thread can be more accurately measured, thereby eliminating the less efficient event detection threads in the update operation, ensuring that limited computing resources are concentrated on the most effective event detection activities, and improving the overall detection efficiency. The update operation is performed regularly until the update stop condition is met, and the composition of the detection thread group can be dynamically adjusted according to the latest event detection data and changes in the detection environment to maintain the sensitivity for event detection. After each update operation, the average efficiency of event detection of the detection thread group is determined and monitored, which helps to maintain the stability of system performance and prevent efficiency fluctuations caused by unreasonable changes in the detection thread group. In this way, not only can the efficiency and accuracy of event detection be improved, but also the reasonable allocation and maximum utilization of limited computing resources can be ensured.

[0048] A third aspect of an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect when executing the computer program.

[0049] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0050] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0052] Figure 1 is a schematic diagram of the structure of an event detection system provided in an embodiment of the present application;

[0053] Figure 2 It is a schematic diagram of the implementation process of the event detection method provided in the embodiment of the present application;

[0054] Figure 3 This is a schematic diagram of event detection thread distribution provided by an embodiment of the present application;

[0055] Figure 4 It is a flowchart of a method for determining the number of weighted events provided in an embodiment of the present application;

[0056] Figure 5 It is a flowchart of a method for updating a detection thread group provided in an embodiment of the present application;

[0057] Figure 6 is another flowchart of the update method of the detection thread group provided in an embodiment of the present application;

[0058] Figure 7 It is a flowchart of a method for determining a designated collection device provided in an embodiment of the present application;

[0059] Figure 8 It is a flowchart of a method for determining an intermediate thread group provided in an embodiment of the present application;

[0060] Fig. 9 It is a flow chart of a method for determining the average efficiency of event detection provided in an embodiment of the present application;

[0061] Fig.10 This is a flow chart of a method for determining a target detection thread group provided in an embodiment of the present application;

[0062] Fig.11 is a schematic diagram of an event detection device provided in an embodiment of the present application;

[0063] Fig.12 It is a schematic diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0064] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0065] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0066] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0067] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0068] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0069] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0070] like Figure 1 As shown, the event detection system structure diagram provided in an embodiment of the present application specifies a detection scenario including multiple acquisition devices 100 (the figure shows an acquisition device 100-1, an acquisition device 100-2 and an acquisition device 100-N as examples) and a server 300 for executing an event detection method, and the acquisition device 100 is connected to the server 300 via a network module 200.

[0071] The server 300 allocates computing resources for the event detection of each event type to the collection device to support the normal execution of the associated event detection thread. When the computing resources are sufficient, the collection device 100 can collect event detection data of each event type of the specified detection scene.

[0072] Server 300, for a specified detection scenario, under the condition of limited computing resources, obtains a detection thread group, the detection thread group includes multiple running event detection threads, each event detection thread supports event detection operations of a single acquisition device for a single event type; based on the actual number of events detected by each of the event detection threads and the importance of each of the event detection threads, determines the weighted number of events detected by each of the event detection threads, the actual number of events being determined based on event detection data; based on the elimination ratio of event detection threads and the number of weighted events, performs at least one update operation on the detection thread group until an update stop condition is met; after each update operation is performed, determines the average event detection efficiency of the detection thread group, and determines a target detection thread group based on the average event detection efficiency; based on the target detection thread group, performs an event detection operation to obtain a detection result.

[0073] In the application, the server 300 can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or 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, content delivery networks (CDN), and big data and artificial intelligence platforms. The acquisition device 100 can be an image acquisition device, such as various models of cameras.

[0074] In one embodiment, Figure 2 As shown, an event detection method is provided, which is applied to Figure 1 The server in the example is used to illustrate, including the following steps S101 to S105. Among them:

[0075] Step S101 : obtaining a detection thread group, wherein the detection thread group includes a plurality of running event detection threads, each of which supports an event detection operation of a single acquisition device for a single event type.

[0076] In the application, event type refers to the type of public safety event, such as abnormal parking, congestion, pedestrians on the highway, electric bicycles putting up awnings, etc. in road traffic events, fighting, abnormal gathering of people, etc. in public security events. Event detection thread is a thread used to implement single event type detection. In a specified detection scenario, each acquisition device can usually perform event detection on all event types, that is, each acquisition device can deploy detection algorithms for all event types. When computing power resources are sufficient, the server can allocate all the required computing power to each acquisition device. The computing power used to implement event detection operations for a single event type by a single acquisition device can be called an event detection capability unit. The server allocates a corresponding event detection thread to each event detection capability unit to implement event detection operations for a single event type by a single acquisition device. Each acquisition device can be associated with a maximum number of event detection threads of the same type at the same time.

[0077] In the application, for the specified detection scenario, if there is N ( N is a positive integer greater than 1) available acquisition devices, the number of event types is M ( M is a positive integer greater than 0), then if the computing resources are sufficient, the server will allocate M * N The event detection threads perform event detection operations simultaneously. In the case of limited computing resources, it is usually selected to be less than ( M * N) event detection threads are executed concurrently. In order to maximize the event detection efficiency under limited computing resources, the server usually periodically updates the running event detection threads in the detection thread group to obtain some event detection threads that can maximize the event detection efficiency under limited computing resources. Event detection efficiency refers to the average event detection efficiency of the detection thread group. f (Average Efficiency of Incident Detection, AEID). When performing the event detection method of the embodiment of the present application, the server first obtains the detection thread group currently being used in the specified detection scene, and the detection thread group includes less than ( M * N ) running event detection threads. In the application, each event detection thread carries a specified identifier, which is used to indicate whether the event detection thread has been executed in the current statistical period. The first value of the specified identifier indicates that the event detection thread has not participated in the event detection operation in the current specified statistical period. The first value can be represented by the number "0". The second value of the specified identifier indicates that the event detection operation has been participated in the current specified statistical period. The second value can be represented by the number "1". Therefore, in the initial stage, the server sets the specified identifier of the event detection thread in the detection thread group to the second value, and sets the specified identifier of other event detection threads except the detection thread group to the first value. For example, if there are 40 event detection threads in the specified detection scenario (10 acquisition devices detect 4 event types), and there are 20 (assuming that the computing power resources can only support 20 concurrent executions at most) event detection threads running in the current detection thread group, the server sets the specified identifiers of the 20 event detection threads in the detection thread group to the second value "1", and sets the specified identifiers of the 20 event detection threads outside the detection thread group to the first value "0", so as to facilitate the subsequent update operation on the detection thread group.

[0078] In the case of limited computing resources, assuming that the average computing power consumed by each event detection thread for event detection of a single event type is r (that is, the computing power resources required for the operation of a single event detection thread), the number of event types is M . Then the limited computing power resource R can concurrently support at most n ( n is a positive integer greater than 0) event detection threads run simultaneously, among which, .

[0079] For example, it is assumed that computing resources can be counted by quantity, that is, the amount of computing power required for the event detection thread to perform event detection is 1. There are 10 collection devices at different locations in the specified detection scene. , can detect 4 types of events , when the computing power is sufficient R, 40 computing power is required to support the simultaneous opening of 40 event detection threads, but the current computing power resources are limited, with only 20, so only 20 of the 40 event detection threads can be supported to run simultaneously. The server sets the designated identifiers of the 20 running event detection threads to the second value "1", and sets the designated identifiers of the other 20 event detection threads that are not running to the first value "0". The partial distribution of the 20 running event detection threads is shown in the figure below. Figure 3 As shown, Figure 3 A variety of distributions are given as examples. Figure 3 (a)-(c) in the figure show the different distributions of 20 event detection threads. Figure 3 (a) All five acquisition devices are in full load, that is, they are all assigned four event detection threads for all event types. Figure 3 (b) 6 acquisition devices are assigned 20 event detection threads. Figure 3 In (c), 10 acquisition devices run 20 event detection threads.

[0080] Step S102: determining the weighted number of events detected by each event detection thread based on the actual number of events detected by each event detection thread and the importance of each event detection thread.

[0081] In the application, the actual number of events refers to the actual number of occurrences of a single event type. When performing an event detection operation, the server obtains the event detection data of each event detection thread in the detection array of the specified time window in the current statistical period. The event detection data includes the actual number of events. The statistical period can be a year, month, week, etc. The time window is the statistical time period of the event detection data. For example, a day can be divided into four time windows, namely 0-6 o'clock, 7-12 o'clock, 13-18 o'clock and 19-24 o'clock. The server parses the event detection data and can determine the actual number of events for a single event type for each running event detection thread in the specified time window. Assume that multiple event detection threads in the current detection thread group are associated with a total of N There are collection devices and the number of event types is M , for ease of representation, the event detection capability unit vector Characterization The first The actual number of events detected for each event type within the specified time window ,in, .

[0082] In the application, in different time windows, the designated detection scenarios pay different attention to event detection of different event types, and the importance of each running event detection thread is also different. The importance depends on the importance coefficient of the location information of the collection device and the importance coefficient of the event type detected by the collection device. The location information of the collection device where the event occurred (usually expressed in longitude and latitude coordinates) can approximately represent the actual geographical location where the event occurred. For example, when there are some important regional activities in a large area, such as events, performances, conferences, etc., or important security places such as schools, hospitals, transportation hubs, government agencies and institutions during important periods, the selection of the location of the collection equipment is more important; when the city or region encounters important security guarantees and comprehensive governance concentrated actions, such as illegal governance of electric vehicles, regional gatherings, etc., the events to be detected in the event detection capability unit are more important. If the event detection thread a corresponds to the i The first j The event detection of each event type is performed using the importance of the event detection thread. Characterization, each acquisition device includes corresponding position information, and the fixedness of the acquisition device is actually determined by its corresponding position information. By i The location importance factor of each acquisition device and i The first capture device j Type importance coefficient of event type Determined jointly.

[0083] The server detects the importance of threads based on events The event detection thread targets the j The actual number of events of each event type is weighted to obtain the event detection thread for the first j Weighted number of events per event type .

[0084] Step S103: Based on the elimination ratio of event detection threads and the number of weighted events, at least one update operation is performed on the detection thread group until an update stop condition is met.

[0085] In applications, due to different detection scenarios, the location importance coefficient of the acquisition device and the type importance coefficient of the event type are set differently. When computing resources are limited, the event detection efficiency may not reach the maximum value. Therefore, in order to ensure the maximum event detection efficiency, the server updates the event detection thread in the detection thread group at least once to obtain a target detection thread group that can meet the maximum event detection efficiency. The event detection efficiency refers to the average event detection efficiency of the detection thread group. The average event detection efficiency of the detection thread group is the average of the event detection efficiencies of all acquisition devices associated with the detection thread group. The event detection efficiency of the acquisition device can be expressed by summing the weighted event numbers of the acquisition device for different event types. The weighted number of events of a single event type on a single acquisition device is determined by the corresponding event detection thread.

[0086] In the application, for limited computing resources, in order to obtain the target detection thread group with the maximum average event detection efficiency, the server performs at least one update operation on the currently used detection thread group until the update stop condition is met, and then selects multiple event detection threads running when the average event detection efficiency is the maximum according to the event detection average efficiency of the detection thread group after each update operation as the target detection thread group. The update stop condition includes that the specified identifiers of all event detection threads of the specified detection scene are set to the second value, or a preset statistical period is reached.

[0087] The update operation for the detection thread group is essentially to remove the event detection threads with a small number of weighted events from the detection thread group, and add the new event detection threads with the number of eliminations. The new event detection threads refer to the event detection threads with the designated identifier as the first value. In the application, for the selection of the event detection threads with the designated identifier as the first value, the event detection thread of the acquisition device in a fully loaded state can be selected first. The fully loaded state of the acquisition device refers to a single acquisition device that allocates a new event detection thread for each event type, such as 4 event types. The fully loaded state of the acquisition device refers to the acquisition device being associated with 4 event detection threads, and one event detection thread corresponds to one event type on the acquisition device. Then, the new event detection thread and the remaining event detection threads in the detection thread group are used to form a new detection thread group to perform event detection operations for a statistical cycle.

[0088] In the application, the number of event detection threads to be eliminated in the detection thread group is determined based on the preset elimination ratio. , The elimination ratio can be determined based on actual conditions.

[0089] Step S104: after each update operation is performed, determining the average event detection efficiency of the detection thread group, and determining a target detection thread group based on each of the event detection average efficiencies.

[0090] In the application, after each update operation is executed, the server determines the average event detection efficiency of the detection thread group of the current update operation. The average event detection efficiency of the detection thread group is represented by the ratio of the sum of the weighted event numbers of each event detection thread in the detection thread group to the number of associated acquisition devices. After S (S is an integer greater than 1) update operations, the server can determine S average event detection efficiencies of S different detection thread groups. The server compares these S average event detection efficiencies, determines the maximum average event detection efficiency, and uses the detection thread group corresponding to the maximum average event detection efficiency as the target detection thread group.

[0091] Step S105: Based on the target detection thread group, an event detection operation is performed to obtain a detection result.

[0092] In the application, when computing resources are limited, the server runs each event detection thread in the target detection thread group to obtain the detection results so as to make subsequent decisions based on the detection results.

[0093] In this embodiment, by calculating the weighted number of events of each event detection thread, the contribution and value of each event detection thread can be more accurately measured, thereby eliminating the event detection threads with lower efficiency in the update operation, ensuring that limited computing resources are concentrated on the most effective event detection activities, and improving the overall detection efficiency. The update operation is performed regularly until the update stop condition is met, and the event detection threads in the detection thread group can be dynamically updated and adjusted according to the latest event detection data and detection scene changes, maintaining the sensitivity and adaptability for event detection. After each update operation, the average efficiency of event detection of the detection thread group is determined, which helps to maintain the stability of system performance and prevent efficiency fluctuations caused by unreasonable changes in the detection thread group. In this way, not only can the efficiency and accuracy of event detection be improved, but also the reasonable allocation and maximum utilization of limited computing resources can be ensured.

[0094] In one embodiment, Figure 4 As shown, the implementation process of step S102 includes the following steps S201 to S203. Among them:

[0095] Step S201: for each of the event detection threads, determining the location importance coefficient of the acquisition device associated with the event detection thread and the type importance coefficient of the event type associated with the event detection thread.

[0096] In the application, for each event detection thread a in the detection thread group, its associatedi The collection device and j The server reads the event type. i The location importance coefficient of the location information of the acquisition device and j Type importance coefficient of event type The position importance coefficient and type importance coefficient are preset based on the actual needs of the specified detection scenario.

[0097] Step S202: performing weighted summation on the position importance coefficient and the type importance coefficient to obtain the importance of the event detection thread.

[0098] In the application, the server sets a first weight for the position importance coefficient of each event detection thread, sets a second weight for the type importance coefficient, and weights and sums the position importance coefficient and the type importance coefficient by the first weight and the second weight to obtain the importance of the event detection thread. The sum of the first weight and the second weight is 1.

[0099] For example, for the related i Collection device j The event detection thread of each event type has its position importance coefficient The first weight is , Type importance coefficient The second weight of ), the importance of the event detection thread .

[0100] Step S203: performing a product processing on the actual event quantity and the importance degree, and taking the product result as the weighted event quantity detected by the event detection thread.

[0101] In the application, for each event detection thread in the detection thread group, the server obtains the product of the importance of the event detection thread and the actual number of events of the event detection thread, and uses the product as the weighted number of events detected by the event detection thread.

[0102] For example, for the related i Collection device j The importance of event detection threads for each event type The actual number of events is , and the corresponding number of weighted events is .

[0103] In this embodiment, by quantifying the importance of location and event type, the server can more carefully evaluate the contribution and value of each event detection thread. The calculation of the degree of importance enables the system to dynamically adjust resource allocation and processing priority according to the actual importance of the detection thread, ensuring that detection tasks of key event types are given priority and fully utilizing limited computing resources.

[0104] In one embodiment, Figure 5 As shown, the updating operation in step S103 includes the following steps S301 to S303. Among them:

[0105] Step S301, based on a preset screening method and the detection thread group, determine the intermediate thread group participating in the update operation.

[0106] In the application, when the server updates the detection thread group, it can select some or all event detection threads in the detection thread group for update according to the preset screening method. The preset screening method includes a first screening method and a second screening method. In the application, if there are a certain number of event detection threads that must always run in the detection scenario, such event detection threads are called fixed detection threads. Fixed detection threads are not allowed to be eliminated and do not participate in the update operation. For this scenario, the first screening method can be selected as the target screening method, that is, event detection threads other than fixed detection threads are selected from the detection thread group as the intermediate thread group participating in the update operation.

[0107] In the application, for detection scenarios that do not require preset fixed detection threads, the parameters of the event detection capability unit corresponding to the event detection thread in the detection scenario, such as location, event type, and time, can be dynamically adjusted. The server can select the second filtering method as the target filtering method, that is, each event detection thread in the detection thread group can participate in the update operation.

[0108] Step S302: determining the elimination quantity based on the number of event types, the number of acquisition devices associated with the intermediate thread group, and the elimination ratio.

[0109] In the application, the number of event detection threads participating in each update operation is the number of event detection threads eliminated in the intermediate thread group in this update operation. The determination of the elimination number is related to the elimination ratio. The server determines the number of acquisition devices associated with the intermediate thread group, and determines the product of the number of types of event types, the number of acquisition devices associated with the intermediate thread group, and the elimination ratio as the elimination ratio.

[0110] Step S303: based on the elimination quantity and the quantity of each weighted event associated with the intermediate thread group, the intermediate thread group is updated to obtain an updated thread group.

[0111] In the application, after the server determines the elimination number based on the elimination ratio, it first sorts the intermediate thread group according to the preset sorting method, and then removes the eliminated event detection threads from the sorted intermediate thread group. Then, from the event detection threads carrying the event detection of the specified mark, select the eliminated new event detection threads and the remaining event detection threads in the intermediate thread group as the updated thread group, completing an update operation on the intermediate thread group.

[0112] In this embodiment, a preset screening method is used to determine the intermediate thread group participating in the update operation, and the elimination number is determined in combination with the number of event types, the number of acquisition devices and the elimination ratio, and then the intermediate thread group is updated, so that efficient use of limited computing resources can be achieved.

[0113] In one embodiment, Figure 6 As shown, the implementation process of step S303 includes the following steps S401 to S404. Among them:

[0114] Step S401 : sorting the event detection threads in the intermediate thread group based on a specified order of the weighted event quantity to obtain an ordered thread group.

[0115] In the application, the specified order of the weighted event quantity includes the order of the weighted event quantity from large to small, or the order of the weighted event quantity from small to large. The server sorts the event detection threads in the intermediate thread group according to the specified order to obtain an ordered thread group. If the order of the weighted event quantity from large to small is followed, the event detection threads in the ordered thread group are arranged in descending order according to the weighted event quantity.

[0116] Step S402: remove the eliminated number of event detection threads from the ordered thread group to obtain a remaining thread group, and stop running the removed event detection threads.

[0117] In the application, the server removes the eliminated number of event detection threads from the ordered thread group to obtain the remaining thread group, and stops running the removed event detection threads. To indicate that the event detection thread has participated in the update operation, the designated identifier of the event detection thread is set to the second value.

[0118] Step S403: obtaining a specified number of designated collection devices, and allocating a new event detection thread corresponding to each of the event types to each of the designated collection devices.

[0119] In the application, the selection of the event detection thread for the filling position can be performed at the acquisition device level. At this time, it is ensured that the newly added acquisition device can be in a fully loaded state, that is, the designated acquisition device in a fully loaded state is associated with the event detection thread corresponding to each event type.

[0120] For example, Figure 3 In, assuming Figure 3 (a) in the figure is the event detection thread distribution of the detection array before the update. Since 4 event detection threads are eliminated, the acquisition device can detect 4 event types when it is fully loaded, so the specified number is 1, and the server is Figure 3 The designated acquisition device S6 in (b) is assigned 4 new event detection threads, making the designated acquisition device S6 fully loaded. The number of 20 event detection threads supported by the limited computing resources remains unchanged, and the distribution of event detection threads is changed from before the update to Figure 3 (a) in the above code is changed to the updated Figure 3 (b) in the figure.

[0121] Step S404: adding the new event detection thread to the remaining thread group to obtain an updated thread group.

[0122] In the application, the server merges the new event detection thread with the remaining thread groups to obtain an updated thread group.

[0123] In this embodiment, the detection thread group is updated based on the weighted number of events associated with each event detection thread, which can accurately remove event detection threads with low contributions in the detection thread group and improve the event detection efficiency of the updated thread group.

[0124] In one embodiment, Figure 7 As shown, the implementation process of step S403 includes the following steps S501 to S503. Among them:

[0125] Step S501, determining the idle computing resources released by the removed event detection thread.

[0126] In the application, for the specified number of specified acquisition devices, the server first determines the idle computing resources released by the removed event detection threads. . The amount of computing power required to detect a single event thread The product of the number of eliminations.

[0127] Step S502: Determine a specified quantity based on the idle computing resources and the quantity of event detection types.

[0128] In the application, the server determines the idle computing resources The ratio of the number of event types M is used as the specified number of required specified acquisition devices.

[0129] Step S503: Select the designated number of acquisition devices from the current detection scene as designated acquisition devices.

[0130] In the application, the server selects a specified number of collection devices from the collection devices that have not yet participated in the event detection in the current detection scene as designated collection devices according to a preset selection method. And allocates event detection threads of each event detection type to the designated collection devices. The preset selection method can be random selection or selection based on prior knowledge. Figure 3 There are 4 event types in Figure 3 (a) in the figure shows the distribution of event detection threads in the detection thread group before the update. Since four event detection threads are eliminated, the specified number of acquisition devices to be selected is 1. The server selects Figure 3 The acquisition device S6 in (a) that has not yet participated in event detection is used as the designated acquisition device, and 4 new event detection threads are assigned to it. The new event detection threads are added to the detection thread group, and the following is obtained: Figure 3 The event detection thread distribution of the updated detection thread group is shown in (b).

[0131] In this embodiment, by selecting a designated acquisition device in a fully loaded state through idle computing resources, it can be ensured that the designated acquisition device is in a fully loaded state using the idle computing resources, thereby improving the efficient allocation of idle computing resources.

[0132] In one embodiment, Figure 8 As shown, the implementation process of step S301 includes the following steps S601 to S602. Among them:

[0133] Step S601, if the preset screening method is the first screening method, at least one fixed detection thread in the detection thread group is determined, and based on other event detection threads in the detection thread group except the fixed detection threads, an intermediate thread group participating in the update operation is formed.

[0134] In the application, the preset screening method is a method for selecting multiple event detection threads participating in the update. The preset screening method is determined according to the actual situation of the current detection scenario. If there is a fixed detection thread in the detection thread group, and the fixed detection thread does not participate in the update operation, the first screening method is selected for screening. The screening based on the first screening method is actually to first obtain at least one fixed detection thread in the detection thread group, and then select the event detection thread other than the fixed detection thread from the detection thread group as the intermediate thread group participating in the update operation.

[0135] In the application, there are designated detection scenarios that require some event detection threads to be fixed. The fixed event detection threads are called fixed detection threads, and fixed detection threads always participate in the execution of event detection. Fixed event detection threads can be fixed based on the location of the associated collection equipment. For example, in actual governance scenarios, hospitals, schools, transportation hubs, etc. are key locations for event detection and early warning, and they need to be fixed. Fixed event detection threads can also be fixed based on the associated event types, such as pedestrian intrusions on highways, slope collapses in key mountainous areas, and other events that are likely to cause major safety hazards. Fixed event detection threads need to be run all year round; or fixed event detection threads need to be run on important roads and areas during a fixed time period, such as major holidays, key events or meetings.

[0136] Step S602: If the preset screening method is the second screening method, the detection thread group is determined as an intermediate thread group participating in the update operation.

[0137] In the application, for detection scenarios that do not require preset fixed detection threads, such as detection scenarios without fixed task deployment and extensive patrols, the second screening method can be used to determine the intermediate thread group participating in the update operation, that is, each event detection thread in the detection thread group can participate in the update operation.

[0138] In this embodiment, the method of determining the intermediate thread group by using two preset screening methods can improve the accuracy of determining the event detection threads participating in the update in various detection scenarios.

[0139] In one embodiment, Fig. 9 As shown, the implementation process of step S104 includes the following steps S701 to S704. Among them:

[0140] Step S701, determining a collection device associated with the detection thread group.

[0141] In the application, after each update operation, the server obtains the event detection data of the specified time window in the new statistical period based on the updated detection thread group, and determines the average event detection efficiency of the detection thread group. The server determines at least one associated acquisition device from the detection thread group to facilitate determining the detection efficiency of a single acquisition device. The maximum number of event detection threads that can be associated with a collection device is the number of event types, and an event detection thread can only be associated with one collection device and one event type.

[0142] Step S702: grouping the event detection threads in the detection thread group according to the acquisition device to obtain a device thread group.

[0143] In the application, the server groups multiple event detection threads in the detection thread group based on the acquisition device, and obtains at least one event detection thread corresponding to each acquisition device as a device thread group.

[0144] Step S703: performing weighted summation on the weighted event quantities of the event detection threads in each device thread group to obtain the detection efficiency of each of the acquisition devices.

[0145] In the application, for each device thread group, the server obtains the weighted event quantity of each event detection thread in the device thread group, obtains the weight of each weighted event quantity, and performs weighted summation of all weighted event quantities of the device thread group based on the weight to obtain the detection efficiency of the acquisition device. If the weights are all 1, the summation of all weighted event quantities of the device thread group is directly performed, and the summation result is used as the detection efficiency of the acquisition device.

[0146] Step S704: averaging all the detection efficiencies to obtain an average event detection efficiency of the detection thread group.

[0147] In the application, the server determines the average value of the sum of the detection efficiencies of all acquisition devices, and uses the average value as the event detection average efficiency of the detection thread group.

[0148] In this embodiment, the average event detection efficiency of the detection thread group is determined based on the acquisition devices as the grouping basis, which can improve the accuracy of the average event detection efficiency.

[0149] In one embodiment, Fig.10 As shown, the implementation process of step S104 includes the following steps S801 to S803. Among them:

[0150] Step S801, obtaining the average efficiency of initial event detection of the initial detection thread group participating in the first update operation.

[0151] In the application, the server is based on Figure 2 The method in determines the average efficiency of initial event detection of the initial detection thread group participating in the first update operation.

[0152] Step S802: sort the initial event detection average efficiency and each event detection average efficiency in descending order.

[0153] In the application, the server sorts the average efficiency of initial event detection and the average efficiency of each event detection in descending order.

[0154] Step S803 : taking the detection thread group corresponding to the first event detection average efficiency after sorting as the target detection thread group.

[0155] In the application, the server uses the detection thread group corresponding to the average efficiency of the first event detection after sorting as the target detection thread group. That is, when the computing power resources are limited, the average efficiency of event detection warning can be maximized when the target detection thread group is used for event detection.

[0156] It should be noted that after each update operation, the average event detection efficiency of the corresponding detection thread group can be calculated. , and the average event detection efficiency of the detection thread group after the last update operation For comparison, if , indicating that the updated detection thread group has better efficiency, then save the acquisition device configuration corresponding to the updated detection thread group, and use the updated detection thread group to perform event detection in the new statistical period. After the new statistical period, use the updated detection thread group as the detection thread group for update, so as to obtain a detection thread group with better efficiency. , indicating that the detection thread group before the update is more efficient, then save the acquisition device configuration corresponding to the detection thread group before the update, and re-execute the update operation for the detection thread group before the update until the detection thread group with the highest average event detection efficiency is obtained.

[0157] In this embodiment, by identifying the most efficient detection thread group, it is possible not only to ensure that limited computing resources are used most effectively, but also to maximize the efficiency of event detection.

[0158] The present application also provides an event detection device for executing the steps in the above event detection method embodiment. The resource access device is deployed in the proxy node associated with the namespace. Fig.11 As shown, the event detection device 800 provided in the embodiment of the present application includes:

[0159] The acquisition module 810 is used to acquire a detection thread group, where the detection thread group includes a plurality of running event detection threads, each of which supports an event detection operation of a single acquisition device for a single event type.

[0160] The first determination module 820 is configured to determine the weighted number of events detected by each event detection thread based on the actual number of events detected by each event detection thread and the importance of each event detection thread.

[0161] The updating module 830 is used to perform at least one updating operation on the detection thread group based on the elimination ratio of the event detection threads and the number of each weighted event until an updating stop condition is met.

[0162] The second determination module 840 is used to determine the event detection average efficiency of the detection thread group after each update operation is performed, and determine the target detection thread group based on each event detection average efficiency.

[0163] The detection module 850 is used to perform event detection operations based on the target detection thread group to obtain detection results.

[0164] In one embodiment, the first determination module is also used to determine, for each of the event detection threads, a position importance coefficient of the acquisition device associated with the event detection thread and a type importance coefficient of the event type associated with the event detection thread; perform weighted summation of the position importance coefficient and the type importance coefficient to obtain the importance level of the event detection thread; perform product processing on the actual number of events and the importance level, and use the product result as the weighted number of events detected by the event detection thread.

[0165] In one embodiment, the update module is also used to determine the intermediate thread group participating in the update operation based on a preset screening method and the detection thread group; determine the elimination number based on the number of event types, the number of acquisition devices associated with the intermediate thread group, and the elimination ratio; and update the intermediate thread group based on the elimination number and the number of weighted events associated with the intermediate thread group to obtain an updated thread group.

[0166] In one embodiment, the update module is also used to sort the event detection threads in the intermediate thread group based on a specified order of the weighted event quantity to obtain an ordered thread group; remove the eliminated number of event detection threads from the ordered thread group to obtain a remaining thread group, and stop running the removed event detection threads; obtain a specified number of designated acquisition devices, and allocate a new event detection thread corresponding to each event type to each designated acquisition device; add the new event detection thread to the remaining thread group to obtain an updated thread group.

[0167] In one embodiment, the update module is also used to determine the idle computing resources released by the removed event detection thread; determine the specified number based on the idle computing resources and the number of event detection types; and select the specified number of acquisition devices as designated acquisition devices from the current detection scenario.

[0168] In one embodiment, the update module is also used to determine at least one fixed detection thread in the detection thread group if the preset filtering method is the first filtering method, and the fixed detection thread does not participate in the update operation; based on other event detection threads in the detection thread group except the fixed detection threads, an intermediate thread group participating in the update operation is formed; if the preset filtering method is the second filtering method, the detection thread group is determined as an intermediate thread group participating in the update operation.

[0169] In one embodiment, the second determination module is also used to determine the acquisition device associated with the detection thread group; group the event detection threads in the detection thread group according to the acquisition device to obtain the device thread group; perform weighted summation on the weighted number of events of the event detection threads in each device thread group to obtain the detection efficiency of each of the acquisition devices; and average all the detection efficiencies to obtain the average event detection efficiency of the detection thread group.

[0170] In one embodiment, the second determination module is also used to obtain the initial event detection average efficiency of the initial detection thread group participating in the first update operation; sort the initial event detection average efficiency and each event detection average efficiency in descending order; and use the detection thread group corresponding to the first event detection average efficiency after sorting as the target detection thread group.

[0171] In applications, each module in the resource access device may be a software program module, or may be implemented by different logic circuits integrated in a processor, or may be implemented by multiple distributed processors.

[0172] Fig.12 The following is a schematic diagram of the structure of a computer device that implements an event detection method provided in an embodiment of the present application. Fig.12 As shown, the computer device 1000 of this embodiment includes: at least one processor 1010 ( Fig.12 Only one is shown in the figure) a processor, a memory 1020, and a computer program 1030 stored in the memory 1020 and executable on the at least one processor 1010, wherein when the processor 1010 executes the computer program 1030, the steps in any of the above-mentioned event detection method embodiments are implemented.

[0173] The computer device 1000 may include, but is not limited to, a processor 1010 and a memory 1020. Those skilled in the art will appreciate that Fig.12 The computer device 1000 is merely an example and does not constitute a limitation on the computer device 1000 . The computer device 1000 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the computer device 1000 may also include input and output devices, network access devices, etc.

[0174] The processor 1010 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0175] In some embodiments, the memory 1020 may be an internal storage unit of the computer device 1000, such as a hard disk or memory of the computer device 1000. In other embodiments, the memory 1020 may also be an external storage device of the computer device 1000, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 1000. Further, the memory 1020 may also include both an internal storage unit of the computer device 1000 and an external storage device. The memory 1020 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 1020 may also be used to temporarily store data that has been output or is to be output.

[0176] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0177] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0178] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0179] An embodiment of the present application provides a computer program product. When the computer program product is run on a computer device, the computer device can implement the steps in the above-mentioned method embodiments when executing the computer device.

[0180] 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 present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to a computer device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0181] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0182] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0183] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, 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 as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0185] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. An event detection method, characterized in that: include: Acquire a detection thread group running based on limited computing resources, wherein the detection thread group includes a plurality of running event detection threads, each event detection thread supports an event detection operation of a single acquisition device for a single event type, and each of the acquisition devices deploys an event detection thread for each event type; Determining the weighted number of events detected by each event detection thread based on the actual number of events detected by each event detection thread and the importance of each event detection thread; Based on the elimination ratio of the event detection threads and the number of each weighted event, performing at least one update operation on the detection thread group until an update stop condition is met; After each update operation is performed, determining the event detection average efficiency of the detection thread group, and determining a target detection thread group based on each of the event detection average efficiencies, wherein the target detection thread group includes a plurality of event detection threads running when the event detection average efficiency is the largest; Based on the target detection thread group, an event detection operation is performed to obtain a detection result.

2. The event detection method according to claim 1, characterized in that: The determining, based on the actual number of events detected by each event detection thread and the importance of each event detection thread, the number of weighted events detected by each event detection thread comprises: For each of the event detection threads, determining a location importance coefficient of a collection device associated with the event detection thread and a type importance coefficient of an event type associated with the event detection thread; Performing weighted summation on the position importance coefficient and the type importance coefficient to obtain the importance of the event detection thread; The actual event quantity and the importance degree are multiplied, and the product result is used as the weighted event quantity detected by the event detection thread.

3. The event detection method according to claim 1, characterized in that: The execution process of each update operation includes: Based on the preset screening method and the detection thread group, determine the intermediate thread group involved in the update operation; Determine the elimination quantity based on the number of event types, the number of acquisition devices associated with the intermediate thread group, and the elimination ratio; Based on the elimination quantity and the quantity of each weighted event associated with the intermediate thread group, the intermediate thread group is updated to obtain an updated thread group.

4. The event detection method according to claim 3, characterized in that: The updating of the intermediate thread group based on the elimination quantity and the quantity of each weighted event associated with the intermediate thread group to obtain an updated thread group includes: Based on a specified order of the weighted event quantity, the event detection threads in the intermediate thread group are sorted to obtain an ordered thread group; Removing the eliminated number of event detection threads from the ordered thread group to obtain a remaining thread group, and stopping the removed event detection threads; Acquire a specified number of designated acquisition devices, and allocate a new event detection thread corresponding to each of the event types to each of the designated acquisition devices; The new event detection thread is added to the remaining thread group to obtain an updated thread group.

5. The event detection method according to claim 4, characterized in that: The obtaining of a specified number of specified acquisition devices includes: Determine the idle computing resources released by the removed event detection thread; Determining a specified number based on the idle computing resources and the number of types of event detection types; The specified number of acquisition devices are selected from the current detection scene as designated acquisition devices.

6. The event detection method according to claim 3, characterized in that: The determining of the intermediate thread group participating in the update operation based on the preset screening method and the detection thread group includes: If the preset screening method is the first screening method, determining at least one fixed detection thread in the detection thread group, and forming an intermediate thread group participating in the update operation based on other event detection threads in the detection thread group except the fixed detection threads; If the preset screening method is the second screening method, the detection thread group is determined as an intermediate thread group participating in the update operation.

7. The event detection method according to claim 1, characterized in that: After each update operation is performed, determining the average event detection efficiency of the detection thread group includes: Determining a collection device associated with the detection thread group; According to the acquisition device, the event detection threads in the detection thread group are grouped to obtain a device thread group; Performing weighted summation on the weighted event quantities of the event detection threads in each device thread group to obtain the detection efficiency of each of the acquisition devices; All the detection efficiencies are averaged to obtain the average event detection efficiency of the detection thread group.

8. The event detection method according to claim 1, characterized in that: The step of determining a target detection thread group based on the average efficiency of each event detection comprises: Get the average efficiency of initial event detection of the initial detection thread group participating in the first update operation; Sorting the initial event detection average efficiency and the event detection average efficiencies in descending order; The detection thread group corresponding to the average efficiency of the first event detection after sorting is used as the target detection thread group.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the event detection method according to any one of claims 1 to 8 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the event detection method according to any one of claims 1 to 8 is implemented.