Algorithm execution processing methods, devices and related equipment
By reporting performance and resource usage to the server through the edge gateway and dynamically adjusting algorithm execution, the problem of insufficient computing power of the edge gateway is solved, and higher stability and reliability are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-19
- Publication Date
- 2026-03-10
AI Technical Summary
The limited computing power of edge gateways makes it difficult for them to effectively execute intelligent algorithms to analyze and detect base station videos, and the execution and deployment of algorithms have a low degree of matching with the performance of software and hardware.
The gateway device reports hardware performance and resource usage to the server, receives notifications from the server indicating whether to execute or stop the target algorithm, and suspends algorithm execution when performance is insufficient to optimize resource utilization.
This improves the stability and reliability of the edge gateway, better matching the algorithm's execution and deployment with the gateway device's hardware and software performance, ensuring normal operation.
Smart Images

Figure CN116091975B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to an algorithm execution processing method, apparatus, and related equipment. Background Technology
[0002] Edge gateways are typically connected to multiple cameras and can acquire video footage from various locations within the base station. Therefore, to achieve digitalization and intelligentization of base station operation and maintenance, edge gateway devices are currently commonly used for anomaly detection. In existing technologies, the server pre-deploys some intelligent algorithms on the edge gateway for execution, enabling the edge gateway to analyze and detect potential risks in the base station by executing these algorithms.
[0003] However, due to the limited computing power of edge gateways, when their performance is weak and / or resource occupancy is high, it is difficult for them to execute algorithms to analyze and detect video to identify potential risks at base stations. Therefore, existing technologies suffer from a low degree of compatibility between algorithm deployment and the hardware and software performance of the edge gateway. Summary of the Invention
[0004] This invention provides an algorithm execution processing method, apparatus, and related equipment to address the problem of low matching degree between algorithm execution deployment and edge gateway hardware and software performance.
[0005] In a first aspect, embodiments of the present invention provide an algorithm execution processing method applied to a gateway device, the method comprising:
[0006] Send target data to the server, the target data being used to characterize the hardware performance and / or resource usage of the gateway device;
[0007] Receive the target notification sent by the server, the target notification being generated based on the target data;
[0008] If the target notification instructs the gateway device to stop executing the target algorithm deployed on the gateway device, the target algorithm shall be stopped; if the target notification instructs the gateway device to execute the target algorithm, the target algorithm shall be executed.
[0009] Optionally, the method further includes stopping the execution of the target algorithm when the target notification instructs the gateway device to stop executing the target algorithm deployed on the gateway device; and before executing the target algorithm when the target notification instructs the gateway device to execute the target algorithm, the method further includes:
[0010] Get video streams captured by K acquisition devices, where K is a positive integer greater than or equal to 2;
[0011] The video stream acquired by the first acquisition device is processed within the first time period to obtain the video data corresponding to the first acquisition device. The first acquisition device is any N acquisition devices among the K acquisition devices, where N is an integer greater than 0 and less than K.
[0012] The video stream acquired by the second acquisition device is processed during the second time period to obtain the video data corresponding to the second acquisition device. The second acquisition device is all acquisition devices except the first acquisition device among the K acquisition devices. The second time period is after the first time period.
[0013] Store the video data.
[0014] Optionally, executing the target algorithm includes:
[0015] The target algorithm is executed based on the video data to obtain the target algorithm result, which is used to indicate whether there are abnormal image frames in the video data.
[0016] If the result of the target algorithm indicates that there is an abnormal image frame in the video data, an alarm message is generated based on a first identifier and a second identifier. The first identifier is used to identify the abnormal image frame and / or the acquisition device corresponding to the abnormal image frame, and the second identifier is used to identify the target algorithm.
[0017] Send the alarm information to the server.
[0018] Optionally, the step of processing the video stream acquired by the first acquisition device within the first time period to obtain video data corresponding to the first acquisition device includes:
[0019] Determine whether the first acquisition device is the target acquisition device, and determine whether the current time period is within the target time period;
[0020] If the first acquisition device is the target acquisition device and / or is currently within the target time period, the video stream acquired by the first acquisition device is processed within the first time period based on the first frame extraction period to obtain the video data corresponding to the first acquisition device; otherwise, the video stream acquired by the first acquisition device is processed within the first time period according to the second frame extraction period to obtain the video data corresponding to the first acquisition device; the first frame extraction period is less than the second frame extraction period; and / or...
[0021] The process of processing the video stream acquired by the second acquisition device during the second time period to obtain the video data corresponding to the second acquisition device includes:
[0022] Determine whether the second acquisition device is the target acquisition device, and determine whether the current time period is within the target time period;
[0023] If the second acquisition device is the target acquisition device and / or is currently within the target time period, the video stream acquired by the second acquisition device is processed within the second time period based on the third frame extraction period to obtain the video data corresponding to the second acquisition device; otherwise, the video stream acquired by the second acquisition device is processed within the second time period according to the fourth frame extraction period to obtain the video data corresponding to the second acquisition device; the third frame extraction period is less than the fourth frame extraction period.
[0024] Secondly, embodiments of the present invention provide an algorithm execution processing method applied to a server, the method comprising:
[0025] Receive target data sent by the gateway device, the target data being used to characterize the hardware performance and / or resource usage of the gateway device;
[0026] A target notification is generated based on the target data. The target notification is used to instruct the gateway device to stop executing the target algorithm deployed on the gateway device or to instruct the gateway device to execute the target algorithm.
[0027] Send the target notification to the gateway device.
[0028] Optionally, if the target notification instructs the gateway to execute the target algorithm, after sending the target notification to the gateway device, the method further includes:
[0029] The system receives alarm information sent by the gateway device. The alarm information is generated based on a first identifier and a second identifier. The first identifier is used to identify abnormal image frames in the video data stored by the gateway device and / or the acquisition device corresponding to the abnormal image frames. The second identifier is used to identify the target algorithm.
[0030] Optionally, if the target notification instructs the gateway device to stop executing the target algorithm deployed on the gateway device, the method further includes, after sending the target notification to the gateway device:
[0031] Obtain the video data stored on the gateway device;
[0032] The target algorithm deployed on the server is executed based on the video data to obtain the target algorithm result, which is used to indicate whether there are abnormal image frames in the video data.
[0033] Thirdly, embodiments of the present invention provide an algorithm execution processing device, wherein a gateway device includes the algorithm execution processing device, and the algorithm execution processing device includes:
[0034] The first sending module is used to send target data to the server, wherein the target data is used to characterize the hardware performance and / or resource usage of the gateway device;
[0035] The first receiving module is used to receive the target notification sent by the server, the target notification being generated based on the target data;
[0036] The first processing module is configured to: stop executing the target algorithm when the target notification instructs the gateway device to stop executing the target algorithm deployed on the gateway device; and execute the target algorithm when the target notification instructs the gateway device to execute the target algorithm.
[0037] Fourthly, embodiments of the present invention provide an algorithm execution processing device, the server including the algorithm execution processing device, the algorithm execution processing device comprising:
[0038] The second receiving module is used to receive target data sent by the gateway device, the target data being used to characterize the hardware performance and / or resource usage of the gateway device;
[0039] The generation module is used to generate a target notification based on the target data. The target notification is used to instruct the gateway device to stop executing the target algorithm deployed on the gateway device or to instruct the gateway device to execute the target algorithm.
[0040] The second sending module is used to send the target notification to the gateway device.
[0041] Fifthly, embodiments of the present invention provide an electronic device, including: a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor; the processor is configured to read the program in the memory to implement the steps in the method described in the first aspect, or to implement the steps in the method described in the second aspect.
[0042] In a sixth aspect, embodiments of the present invention provide a readable storage medium for storing a program, which, when executed by a processor, implements the steps of the method described in the first or second aspect.
[0043] In this embodiment, a target algorithm is deployed on the gateway device. The gateway device reports its own hardware performance and / or resource usage to the server, receives target notifications sent by the server, and executes or stops executing the target algorithm according to the target notifications. Through this setting, the server can dynamically adjust the execution and deployment of the target algorithm based on the hardware performance and / or resource usage of the gateway device. When the gateway device has weak performance, low load margin, and high resource consumption, the gateway device stops executing the target algorithm to ensure its normal operation. When the gateway device has strong performance, large load margin, and low resource consumption, the gateway device executes the target algorithm, thereby improving the stability and reliability of the gateway device and making the matching degree between the algorithm's execution and deployment and the gateway device's hardware and software performance higher. Attached Figure Description
[0044] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 This is one of the flowcharts illustrating the algorithm execution processing method provided in this embodiment of the invention;
[0046] Figure 2 This is a second flowchart illustrating the algorithm execution processing method provided in this embodiment of the invention;
[0047] Figure 3 This is a schematic diagram of the edge gateway functional architecture provided in an embodiment of the present invention;
[0048] Figure 4 This is a schematic diagram of the end-to-end network architecture provided in an embodiment of the present invention;
[0049] Figure 5 This is one of the structural diagrams of the algorithm execution processing device provided in the embodiments of the present invention;
[0050] Figure 6 This is the second structural diagram of the algorithm execution processing device provided in the embodiments of the present invention;
[0051] Figure 7 This is a structural diagram of the electronic device provided in an embodiment of the present invention. Detailed Implementation
[0052] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0053] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship also changes accordingly.
[0054] Please see Figure 1 This invention provides an algorithm execution processing method applied to a gateway device. The specific structure of the gateway device is not limited herein. In some embodiments, the gateway device is an edge gateway, and this method can be applied to scenarios where the edge gateway performs anomaly detection on a base station through algorithm execution.
[0055] like Figure 1 As shown, this embodiment of the invention provides an algorithm execution processing method applied to a gateway device. The method specifically includes the following steps:
[0056] Step 101: Send target data to the server. The target data is used to characterize the hardware performance and / or resource usage of the gateway device.
[0057] In some embodiments, the gateway device periodically reports target data to the server, enabling the server to determine the hardware performance and / or resource usage of the gateway device based on the target data. In other embodiments, the server sends a query request to the gateway device, and the gateway device responds by sending the target data to the server.
[0058] The specific content of the target data is not limited here. For example, when the target data is used to characterize the hardware performance of a gateway device, the target data includes at least one of the following: hardware usage time of the gateway device, presence of hardware faults, and hardware performance indicators. When the target data is used to characterize the resource usage of the gateway device, the target data includes at least one of the following: resource occupancy, load size, and load margin.
[0059] The server receives target data and generates a target notification based on the target data. The target notification is used to instruct the gateway device to execute the target algorithm deployed on the gateway device or to instruct the gateway device to stop executing the target algorithm.
[0060] The specific method by which the server generates the target notification based on the target data is not limited here. For example, in some embodiments, if the hardware performance of the gateway device is lower than or equal to a first threshold and / or the resource occupancy rate is higher than or equal to a second threshold, the server generates a target notification to instruct the gateway device to stop executing the target algorithm; otherwise, the server generates a target notification to instruct the gateway device to execute the target algorithm deployed on the gateway device.
[0061] It should be understood that the target algorithm is pre-deployed on the gateway device, and the gateway device has the capability to execute the target algorithm. In some embodiments, the server can send a target notification to the gateway device via signaling to control the gateway device to enable or disable the execution of the target algorithm.
[0062] In some embodiments, the gateway device deploys a target algorithm, and the gateway device executes the target algorithm by default. In this embodiment, the server sends a target notification to the gateway device only if it generates a target notification instructing the gateway device to stop executing the target algorithm. If no target notification is received, the gateway device executes the target algorithm.
[0063] The target algorithm can be any algorithm, and its specific content is not limited herein. In some embodiments, the target algorithm includes at least one of the following: a human detection algorithm, an image change recognition algorithm, and a face recognition algorithm.
[0064] In other embodiments, the target algorithm includes any algorithm of various intelligent algorithm models for managing and monitoring base station equipment and facilities such as air conditioners, batteries, equipment cabinet doors, and holes, and is not specifically limited here.
[0065] After generating a target notification based on the target data, the server sends the target notification to the gateway device.
[0066] Step 102: Receive the target notification sent by the server, the target notification being generated based on the target data.
[0067] Step 103: If the target notification instructs the gateway device to stop executing the target algorithm deployed on the gateway device, stop executing the target algorithm; if the target notification instructs the gateway device to execute the target algorithm, execute the target algorithm.
[0068] In this embodiment, a target algorithm is deployed on the gateway device. The gateway device reports its own hardware performance and / or resource usage to the server, receives target notifications sent by the server, and executes or stops executing the target algorithm according to the target notifications. Through this setting, the server can dynamically adjust the execution and deployment of the target algorithm based on the hardware performance and / or resource usage of the gateway device. When the gateway device has weak performance, low load margin, and high resource consumption, the gateway device stops executing the target algorithm to ensure its normal operation. When the gateway device has strong performance, large load margin, and low resource consumption, the gateway device executes the target algorithm, thereby improving the stability and reliability of the gateway device and making the matching degree between the algorithm's execution and deployment and the gateway device's hardware and software performance higher.
[0069] Optionally, in some embodiments, before step 103, the method further includes:
[0070] Get video streams captured by K acquisition devices, where K is a positive integer greater than or equal to 2;
[0071] The video stream acquired by the first acquisition device is processed within the first time period to obtain the video data corresponding to the first acquisition device. The first acquisition device is any N acquisition devices among the K acquisition devices, where N is an integer greater than 0 and less than K.
[0072] The video stream acquired by the second acquisition device is processed during the second time period to obtain the video data corresponding to the second acquisition device. The second acquisition device is all acquisition devices except the first acquisition device among the K acquisition devices. The second time period is after the first time period.
[0073] Store the video data.
[0074] The gateway device stores video data corresponding to the first acquisition device and video data corresponding to the second acquisition device. In specific implementation, the gateway device continuously acquires video streams from K acquisition devices, processes the video streams using the method provided in this embodiment, obtains the corresponding video data, and stores it. When storing video data, the gateway device also stores the information associated with which acquisition device acquired the video data.
[0075] It should be understood that the specific method of processing the video stream acquired by the acquisition device is not limited here. For example, the video stream acquired by the acquisition device is decoded, and image frames are extracted from the video stream at certain periods to obtain the corresponding video data.
[0076] In some embodiments, the gateway device is an edge gateway. To improve the security, reliability, and stability of the communication base station, the edge gateway is used for real-time anomaly detection of the base station. In this embodiment, the edge gateway connects to multiple acquisition devices and can acquire video streams collected by the acquisition devices. For example, the acquisition device is a camera.
[0077] In normal operation, base stations experience low traffic and minimal scene changes. In this embodiment, video streams collected by K acquisition devices are processed in the first and second time periods respectively, eliminating the need to process multiple video streams simultaneously. This saves processing resources on the gateway device and improves the utilization rate of the gateway device's computing resources.
[0078] In some embodiments, N is greater than or equal to 2, and the number of first acquisition devices is at least two. In this embodiment, video streams acquired by at least two first acquisition devices can be processed simultaneously within a first time period, or they can be processed in time intervals.
[0079] Similarly, in some embodiments, the number of second acquisition devices is at least two. The video streams acquired by at least two second acquisition devices can be processed simultaneously during the second time period, or the video streams acquired by at least two second acquisition devices can be processed in different time periods.
[0080] It should be understood that the first time period and the second time period can be two adjacent time periods or two time periods set at an interval.
[0081] Optionally, the step of processing the video stream acquired by the first acquisition device within the first time period to obtain video data corresponding to the first acquisition device includes:
[0082] Determine whether the first acquisition device is the target acquisition device, and determine whether the current time period is within the target time period;
[0083] If the first acquisition device is the target acquisition device and / or is currently within the target time period, the video stream acquired by the first acquisition device is processed within the first time period based on the first frame extraction period to obtain the video data corresponding to the first acquisition device; otherwise, the video stream acquired by the first acquisition device is processed within the first time period according to the second frame extraction period to obtain the video data corresponding to the first acquisition device; the first frame extraction period is less than the second frame extraction period.
[0084] Optionally, the step of processing the video stream acquired by the second acquisition device during the second time period to obtain video data corresponding to the second acquisition device includes:
[0085] Determine whether the second acquisition device is the target acquisition device, and determine whether the current time period is within the target time period;
[0086] If the second acquisition device is the target acquisition device and / or is currently within the target time period, the video stream acquired by the second acquisition device is processed within the second time period based on the third frame extraction period to obtain the video data corresponding to the second acquisition device; otherwise, the video stream acquired by the second acquisition device is processed within the second time period according to the fourth frame extraction period to obtain the video data corresponding to the second acquisition device; the third frame extraction period is less than the fourth frame extraction period.
[0087] In some embodiments, a target acquisition device and / or a target time period can be preset. For example, for the video stream acquired by the target acquisition device, the decoding time period can be extended and / or the frame extraction period can be shortened; within the target time period, the decoding time period for the video streams acquired by K acquisition devices can be extended and / or the frame extraction period can be shortened.
[0088] To facilitate understanding, a specific embodiment will be used as an example below. In this embodiment, the acquisition device is a camera, and the number of cameras is 4, i.e., K is 4. The gateway device can simultaneously acquire video streams from the 4 cameras, but the gateway device does not need to process the video streams from the 4 cameras simultaneously.
[0089] Based on the field of view of each camera and combined with historical data, it is pre-determined whether each camera is in a normal or potentially problematic state at different time periods. For videos in a normal state, the decoding period is appropriately shortened and the frame extraction period is extended; for videos in a potentially problematic state, the decoding period is appropriately extended and the frame extraction period is shortened.
[0090] For example, based on experience, it is known that between 5 pm and 6 pm, one of the four cameras has a higher probability of capturing an intruder. Therefore, this camera is identified as being in a potentially dangerous state between 5 pm and 6 pm. This camera is in a normal state at other times, and the other three cameras are in a normal state throughout the day.
[0091] The video captured by the camera between 5 pm and 6 pm is considered to be in a potentially problematic state. For this potentially problematic video, the decoding period should be appropriately shortened and the frame extraction cycle shortened to obtain more video data captured by the camera during this time period.
[0092] Since base stations typically experience low traffic and minimal scene changes, there is no need to decode multiple video streams simultaneously. For normal video streams, the decoding period can be shortened and the frame extraction cycle extended to reduce the data processing load on gateway devices and free up some of their computing resources.
[0093] Optionally, in some embodiments, executing the target algorithm includes:
[0094] The target algorithm is executed based on the video data to obtain the target algorithm result, which is used to indicate whether there are abnormal image frames in the video data.
[0095] If the result of the target algorithm indicates that there is an abnormal image frame in the video data, an alarm message is generated based on a first identifier and a second identifier. The first identifier is used to identify the abnormal image frame and / or the acquisition device corresponding to the abnormal image frame, and the second identifier is used to identify the target algorithm.
[0096] Send the alarm information to the server.
[0097] If the target algorithm indicates the presence of an abnormal image frame in the video data, the gateway device will not generate an alarm. The algorithm result obtained by executing the target algorithm on the video data will vary depending on the specific target algorithm.
[0098] To facilitate understanding, the following example uses a gateway device to perform anomaly detection on a base station, and combines several specific target algorithms to explain the results of the target algorithms and the abnormal image frames.
[0099] In some embodiments, the target algorithm includes a human detection algorithm, which is executed based on video data to detect whether a human figure appears in the video, and obtains the result of the target algorithm. If a human figure appears in the video, it can be considered that someone has entered the base station, and the image including the human figure is an abnormal image frame.
[0100] In other embodiments, the target algorithm includes an image change recognition algorithm. This algorithm is executed based on video data to detect whether images in the video have changed, thus obtaining the target algorithm result. If any two frames in the video are different, it can be assumed that the base station equipment has been damaged or displaced, and the changed image is considered an abnormal image frame.
[0101] In other embodiments, the target algorithm includes a face recognition algorithm, which is executed based on video data to detect whether a face appears in the video and obtain the result of the target algorithm. If a face appears in the video, it can be considered that someone has entered the base station, and the image including the face is an abnormal image frame.
[0102] When the target algorithm indicates the presence of abnormal image frames in the video data, the gateway device generates an alarm message and sends it to the server, which then receives the alarm message. The alarm message is generated based on a first identifier and a second identifier. In specific implementations, the format and content of the alarm message can be configured according to relevant protocols.
[0103] After receiving the alarm information, the server can perform relevant actions based on the alarm information and handle the content prompted by the alarm information in a timely manner. The specific method is not limited here.
[0104] The first identifier is used to identify the abnormal image frame and / or the acquisition device corresponding to the abnormal image frame. In some embodiments, after receiving the alarm information, the server may send relevant signaling or notification to the gateway device to obtain the abnormal image frame from the gateway device based on the first identifier, and / or obtain the video data acquired by the acquisition device corresponding to the abnormal image frame from the gateway device.
[0105] The second identifier is used to identify the target algorithm. After receiving the alarm information, the server can determine the target algorithm based on the second identifier, thereby determining the alarm type. For example, if the target algorithm is a human figure recognition algorithm or a face recognition algorithm, the server can consider the alarm type to be intrusion. If the target algorithm is an image change recognition algorithm, the server can consider the alarm type to be equipment failure.
[0106] In this embodiment, the gateway device executes the target algorithm to obtain the target algorithm result. If the target algorithm result indicates that there are abnormal image frames in the video data, it generates alarm information based on the first identifier and the second identifier and sends it to the server. In this embodiment, the gateway device only needs to send alarm information to the server when there are abnormal image frames in the video data, without having to send all the video data to the server, thus reducing the amount of data transmission between the gateway device and the server and lowering the cost of the gateway device.
[0107] If the target notification instructs the gateway device to stop executing the target algorithm, the gateway device will stop executing the target algorithm. In some embodiments, the gateway device may be instructed to resume executing the target algorithm after its hardware performance recovers or its resource utilization decreases.
[0108] In other embodiments, the server can execute the target algorithm itself. Specifically, the server obtains video data stored on the gateway device; based on the video data, it executes the target algorithm deployed on the server to obtain the target algorithm result, which is used to indicate whether there are abnormal image frames in the video data.
[0109] The target algorithm is also pre-deployed on the server, so the server also has the ability to execute the target algorithm. However, the server needs to obtain the video data stored on the gateway device in order to execute the target algorithm based on the video data and obtain the target algorithm result. It should be understood that the video data obtained by the server from the gateway device includes the video data corresponding to the first acquisition device and the video data corresponding to the second acquisition device, which are obtained and stored by the gateway device.
[0110] The server executes the target algorithm deployed on the server based on the video data. The specific method for obtaining the target algorithm result can be referred to the relevant process of the gateway device executing the target algorithm. To avoid repetition, it will not be described in detail here.
[0111] In this embodiment, the server can obtain video data stored in the gateway device and execute the target algorithm deployed on the server based on the video data to obtain the target algorithm result. When the gateway device has weak hardware performance, small load margin, and high resource consumption, executing the target algorithm through the server can improve the stability and reliability of the gateway device, while ensuring that the relevant algorithm can be executed smoothly without affecting the gateway device's ability to inspect the base station.
[0112] Please see Figure 2 This invention provides an algorithm execution processing method applied to a server, the method specifically including the following steps:
[0113] Step 201: Receive target data sent by the gateway device, the target data being used to characterize the hardware performance and / or resource usage of the gateway device.
[0114] Step 202: Generate a target notification based on the target data. The target notification is used to instruct the gateway device to stop executing the target algorithm deployed on the gateway device or to instruct the gateway device to execute the target algorithm.
[0115] Step 203: Send the target notification to the gateway device.
[0116] In this embodiment, a target algorithm is deployed on the gateway device. The gateway device reports its own hardware performance and / or resource usage to the server, receives target notifications sent by the server, and executes or stops executing the target algorithm according to the target notifications. Through this setting, the server can dynamically adjust the execution and deployment of the target algorithm based on the hardware performance and / or resource usage of the gateway device. When the gateway device has weak performance, low load margin, and high resource consumption, the gateway device stops executing the target algorithm to ensure its normal operation. When the gateway device has strong performance, large load margin, and low resource consumption, the gateway device executes the target algorithm, thereby improving the stability and reliability of the gateway device and making the matching degree between the algorithm's execution and deployment and the gateway device's hardware and software performance higher.
[0117] Optionally, in some embodiments, when the target notification instructs the gateway to execute the target algorithm, after step 203, the method further includes:
[0118] The system receives alarm information sent by the gateway device. The alarm information is generated based on a first identifier and a second identifier. The first identifier is used to identify abnormal image frames in the video data stored by the gateway device and / or the acquisition device corresponding to the abnormal image frames. The second identifier is used to identify the target algorithm.
[0119] Optionally, in some embodiments, if the target notification instructs the gateway device to stop executing the target algorithm, after step 203, the method further includes:
[0120] Obtain the video data stored on the gateway device;
[0121] The target algorithm deployed on the server is executed based on the video data to obtain the target algorithm result, which is used to indicate whether there are abnormal image frames in the video data.
[0122] In this embodiment, the server can obtain video data stored in the gateway device and execute the target algorithm deployed on the server based on the video data to obtain the target algorithm result. When the gateway device has weak hardware performance, small load margin, and high resource consumption, executing the target algorithm through the server can improve the stability and reliability of the gateway device, while ensuring that the relevant algorithm can be executed smoothly without affecting the gateway device's ability to inspect the base station.
[0123] It should be understood that this embodiment is as a comparison with... Figure 1 The server-side implementation corresponding to the illustrated embodiment can be found in the following documentation for details. Figure 1 The relevant descriptions in the illustrated embodiments are provided. This implementation method can also be applied to... Figure 1 The corresponding embodiments achieve the same beneficial effects.
[0124] The following description uses a specific embodiment as an example. Please refer to [link / reference]. Figure 3 and Figure 4 In this embodiment, the gateway device is an edge gateway, and the server is a cloud platform. The edge gateway is installed inside the communication base station and communicates with cameras (acquisition devices) deployed inside and outside the station. It also communicates with the cloud platform via 4G / 5G technology. The station contains several base station devices and facilities.
[0125] like Figure 3As shown, the edge gateway consists of a three-layer architecture comprising physical devices, firmware system, and application system. The application system comprises an Artificial Intelligence (AI) and rules layer, and a World Wide Web (Web) and application layer. The physical devices and firmware system form the basic hardware and software environment of the edge gateway. Video protocol adaptation, camera management, alarm management, and platform cascading modules provide standard application programming interfaces (APIs).
[0126] In this embodiment, the AI and rules layer is decoupled from the hardware. This layer can run on any hardware platform that implements standard APIs, which reduces the cost of upgrading edge gateway hardware and promotes the development of hardware products towards better cost performance.
[0127] In this embodiment, the algorithm warehouse loads and manages various intelligent algorithm models for monitoring base station equipment and facilities such as air conditioners, batteries, equipment cabinet doors, and holes, thereby enabling the inspection of different equipment and facilities within the base station, timely detection of potential hazards, and improving the convenience and reliability of base station inspection.
[0128] like Figure 4 As shown, the cloud platform (AI middleware platform) manages cameras by accessing the web console of the edge gateway, adapting to video protocols. The edge gateway can have a built-in internet module or connect to the operation and maintenance monitoring system via an externally configured internet module.
[0129] In some embodiments, the cloud platform can set preset positions for cameras during inspections and monitoring positions during non-inspections, and view video data, alarm information, and corresponding short videos. It can also set inspection rules, report alarm information, and download updates / upgrade programs and algorithms through platform cascading modules. The edge gateway uses standard APIs to decouple algorithms and rules downloaded from the cloud from the gateway hardware.
[0130] The rules engine dynamically loads several intelligent algorithm models based on the camera's different preset positions and monitoring positions, according to the inspection rules, to identify the scene in the camera's field of view.
[0131] Although the edge gateway connects multiple cameras, it doesn't necessarily decode all their videos simultaneously, nor does it need to perform intelligent recognition algorithms on every frame of the video stream. Instead, it adaptively decodes each video stream in time segments, extracting image frames from the video stream at regular intervals for intelligent recognition. When the rule engine determines that a camera's field of view is in a hazardous state, it extends the video decoding period for that camera and shortens the frame extraction cycle of the video stream. Hazard information, images, and short videos are stored on the edge gateway, while alarm information is uploaded to the cloud platform. The cloud platform can view hazard information, images, and short videos through the edge gateway's web console when needed. The cloud platform can also directly handle related hazards based on alarm information.
[0132] In practice, both the cloud platform and the edge gateway are equipped with multiple intelligent algorithms. The cloud platform can dynamically configure the deployment and execution of each preset algorithm among the multiple intelligent algorithms based on the target data reported by the edge gateway in real time, the gateway's hardware performance, load status, and hardware resource usage status, and schedule which intelligent algorithms are executed by the edge gateway and which are executed by the cloud platform.
[0133] With the above settings, the deployment and execution of various algorithms can be dynamically scheduled according to the real-time hardware and software performance of the edge gateway. When the edge gateway has weak performance, low load margin, and high resource consumption, several algorithms can be dynamically adjusted to be executed on the cloud platform. When the edge gateway has strong performance, high load margin, and low resource consumption, the deployed algorithms can be executed on the edge gateway, enabling the edge gateway to access multiple video streams and execute various intelligent algorithms at a lower cost.
[0134] This invention also provides an algorithm execution processing device, and the gateway device includes the algorithm execution processing device. See also Figure 5 , Figure 5 This is a structural diagram of the algorithm execution processing device provided in an embodiment of the present invention. Since the principle by which the algorithm execution processing device solves the problem is similar to the algorithm execution processing method in the embodiment of the present invention, the implementation of this algorithm execution processing device can be found in [reference needed]. Figure 1 The implementation of the method shown will not be repeated here.
[0135] like Figure 5 As shown, this embodiment of the invention provides an algorithm execution processing device 500. A gateway device includes the algorithm execution processing device 500, which includes:
[0136] The first sending module 501 is used to send target data to the server, the target data being used to characterize the hardware performance and / or resource usage of the gateway device;
[0137] The first receiving module 502 is used to receive the target notification sent by the server, the target notification being generated based on the target data;
[0138] The first processing module 503 is configured to: stop executing the target algorithm when the target notification instructs the gateway device to stop executing the target algorithm deployed on the gateway device; and execute the target algorithm when the target notification instructs the gateway device to execute the target algorithm.
[0139] Optionally, the algorithm execution processing device 500 further includes:
[0140] The first acquisition module is used to acquire video streams from K acquisition devices, where K is a positive integer greater than or equal to 2;
[0141] The second processing module is used to process the video stream acquired by the first acquisition device within a first time period to obtain the video data corresponding to the first acquisition device. The first acquisition device is any N acquisition devices among the K acquisition devices, where N is an integer greater than 0 and less than K.
[0142] The third processing module is used to process the video stream acquired by the second acquisition device within the second time period to obtain the video data corresponding to the second acquisition device. The second acquisition device is all acquisition devices other than the first acquisition device among the K acquisition devices. The second time period is located after the first time period.
[0143] A storage module is used to store the video data.
[0144] Optionally, the first processing module 503 is specifically used for:
[0145] The target algorithm is executed based on the video data to obtain the target algorithm result, which is used to indicate whether there are abnormal image frames in the video data.
[0146] If the result of the target algorithm indicates that there is an abnormal image frame in the video data, an alarm message is generated based on a first identifier and a second identifier. The first identifier is used to identify the abnormal image frame and / or the acquisition device corresponding to the abnormal image frame, and the second identifier is used to identify the target algorithm.
[0147] Send the alarm information to the server.
[0148] Optionally, the second processing module includes:
[0149] The first judgment unit is used to determine whether the first acquisition device is the target acquisition device and whether the current time period is the target time period.
[0150] A first processing unit is configured to, when the first acquisition device is the target acquisition device and / or is currently within the target time period, process the video stream acquired by the first acquisition device within a first time period based on a first frame extraction period to obtain video data corresponding to the first acquisition device; otherwise, process the video stream acquired by the first acquisition device within a first time period according to a second frame extraction period to obtain video data corresponding to the first acquisition device; wherein the first frame extraction period is less than the second frame extraction period; and / or...
[0151] The third processing module includes:
[0152] The second judgment unit is used to determine whether the second acquisition device is the target acquisition device and whether the current time period is the target time period.
[0153] The second processing unit is configured to, when the second acquisition device is the target acquisition device and / or is currently within the target time period, process the video stream acquired by the second acquisition device within the second time period based on a third frame extraction period to obtain video data corresponding to the second acquisition device; otherwise, process the video stream acquired by the second acquisition device within the second time period according to a fourth frame extraction period to obtain video data corresponding to the second acquisition device; wherein the third frame extraction period is less than the fourth frame extraction period.
[0154] The algorithm execution processing device 500 provided in this embodiment of the invention can execute the above-described algorithm. Figure 1 The method embodiments shown are similar in principle and technical effect, and will not be described again here.
[0155] This invention also provides an algorithm execution processing device, and the server includes the algorithm execution processing device. See also Figure 6 , Figure 6 This is a structural diagram of the algorithm execution processing device provided in an embodiment of the present invention. Since the principle by which the algorithm execution processing device solves the problem is similar to the algorithm execution processing method in the embodiment of the present invention, the implementation of this algorithm execution processing device can be found in [reference needed]. Figure 2 The implementation of the method shown will not be repeated here.
[0156] like Figure 6 As shown, this embodiment of the invention provides an algorithm execution processing device 600, the server including the algorithm execution processing device 600, the algorithm execution processing device 600 including:
[0157] The second receiving module 601 is used to receive target data sent by the gateway device, the target data being used to characterize the hardware performance and / or resource usage of the gateway device;
[0158] The generation module 602 is used to generate a target notification based on the target data. The target notification is used to instruct the gateway device to stop executing the target algorithm deployed on the gateway device or to instruct the gateway device to execute the target algorithm.
[0159] The second sending module 603 is used to send the target notification to the gateway device.
[0160] Optionally, the algorithm execution processing device 600 further includes:
[0161] The third receiving module is used to receive alarm information sent by the gateway device. The alarm information is generated based on a first identifier and a second identifier. The first identifier is used to identify abnormal image frames in the video data stored by the gateway device and / or the acquisition device corresponding to the abnormal image frames. The second identifier is used to identify the target algorithm.
[0162] The algorithm execution processing device 600 provided in this embodiment of the invention can execute the above-described algorithm. Figure 2 The method embodiments shown are similar in principle and technical effect, and will not be described again here.
[0163] This invention also provides an electronic device. Since the principle by which the electronic device solves the problem is similar to the algorithm execution processing method in this invention, the implementation of this electronic device can be found in the method implementation; repeated details will not be elaborated further. Figure 7 As shown, the electronic device of this embodiment includes:
[0164] Processor 700 is used to read the program from memory 720 and execute the following procedures:
[0165] If the target notification instructs the gateway device to stop executing the target algorithm deployed on the gateway device, then stop executing the target algorithm; if the target notification instructs the gateway device to execute the target algorithm, then execute the target algorithm.
[0166] The target data is sent to the server via transceiver 710. The target data is used to characterize the hardware performance and / or resource usage of the gateway device.
[0167] The transceiver 710 receives the target notification sent by the server, the target notification being generated based on the target data;
[0168] Alternatively, processor 700 may read the program from memory 720 and execute the following procedures:
[0169] A target notification is generated based on the target data. The target notification is used to instruct the gateway device to stop executing the target algorithm deployed on the gateway device or to instruct the gateway device to execute the target algorithm.
[0170] The transceiver 710 receives target data sent by the gateway device, the target data being used to characterize the hardware performance and / or resource usage of the gateway device.
[0171] The target notification is sent to the gateway device via transceiver 710;
[0172] Transceiver 710 is used to receive and send data under the control of processor 700.
[0173] Among them, Figure 7 In this context, the bus architecture can include any number of interconnected buses and bridges, specifically linking various circuits together, represented by one or more processors (processor 700) and memory (memory 720). The bus architecture can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface. The transceiver 710 can be multiple elements, including transmitters and transceivers, providing a unit for communicating with various other devices over a transmission medium. The processor 700 is responsible for managing the bus architecture and general processing, and the memory 720 can store data used by the processor 700 during operation.
[0174] Optionally, the processor 700 is also used to read the program from the memory 720 and perform the following steps:
[0175] Get video streams captured by K acquisition devices, where K is a positive integer greater than or equal to 2;
[0176] The video stream acquired by the first acquisition device is processed within the first time period to obtain the video data corresponding to the first acquisition device. The first acquisition device is any N acquisition devices among the K acquisition devices, where N is an integer greater than 0 and less than K.
[0177] The video stream acquired by the second acquisition device is processed during the second time period to obtain the video data corresponding to the second acquisition device. The second acquisition device is all acquisition devices except the first acquisition device among the K acquisition devices. The second time period is after the first time period.
[0178] Store the video data.
[0179] Optionally, the processor 700 is also used to read the program from the memory 720 and perform the following steps:
[0180] The target algorithm is executed based on the video data to obtain the target algorithm result, which is used to indicate whether there are abnormal image frames in the video data.
[0181] If the result of the target algorithm indicates that there is an abnormal image frame in the video data, an alarm message is generated based on a first identifier and a second identifier. The first identifier is used to identify the abnormal image frame and / or the acquisition device corresponding to the abnormal image frame, and the second identifier is used to identify the target algorithm.
[0182] Send the alarm information to the server.
[0183] Optionally, the processor 700 is also used to read the program from the memory 720 and perform the following steps:
[0184] Determine whether the first acquisition device is the target acquisition device, and determine whether the current time period is within the target time period;
[0185] If the first acquisition device is the target acquisition device and / or is currently within the target time period, the video stream acquired by the first acquisition device is processed within the first time period based on the first frame extraction period to obtain the video data corresponding to the first acquisition device; otherwise, the video stream acquired by the first acquisition device is processed within the first time period according to the second frame extraction period to obtain the video data corresponding to the first acquisition device; the first frame extraction period is less than the second frame extraction period; and / or...
[0186] Processor 700 is also used to read programs from memory 720 and perform the following steps:
[0187] Determine whether the second acquisition device is the target acquisition device, and determine whether the current time period is within the target time period;
[0188] If the second acquisition device is the target acquisition device and / or is currently within the target time period, the video stream acquired by the second acquisition device is processed within the second time period based on the third frame extraction period to obtain the video data corresponding to the second acquisition device; otherwise, the video stream acquired by the second acquisition device is processed within the second time period according to the fourth frame extraction period to obtain the video data corresponding to the second acquisition device; the third frame extraction period is less than the fourth frame extraction period.
[0189] Optionally, the processor 700 is also used to read the program from the memory 720 and perform the following steps:
[0190] The system receives alarm information sent by the gateway device. The alarm information is generated based on a first identifier and a second identifier. The first identifier is used to identify abnormal image frames in the video data stored by the gateway device and / or the acquisition device corresponding to the abnormal image frames. The second identifier is used to identify the target algorithm.
[0191] The electronic device provided in this embodiment of the invention can perform the above-described functions. Figure 1 or Figure 2 The implementation principle and technical effect of the method embodiment are similar, and will not be described again here.
[0192] This invention also provides a readable storage medium storing a program or instructions that, when executed by a processor, implement as follows: Figure 1 or Figure 2 The various processes of the method embodiments shown can achieve the same technical effect, and will not be described again here to avoid repetition.
[0193] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0194] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can be physically comprised separately, or two or more units can be integrated into one unit. The integrated unit described above can be implemented in hardware or in the form of hardware plus software functional units.
[0195] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute some steps of the transmission and reception methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0196] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. An algorithm execution processing method characterized by comprising: The method applied to a gateway device comprises: sending target data to a server in real time, the target data being used to represent hardware performance and / or resource usage of the gateway device; receiving a target notification sent by the server in real time, the target notification being generated based on the target data; in the case of meeting a preset condition, the target notification is used to stop executing a target algorithm, in the case of not meeting the preset condition, the target notification is used to execute the target algorithm, the preset condition being that the hardware performance is lower than or equal to a first threshold value and / or the resource usage is higher than or equal to a second threshold value; stopping executing the target algorithm in the case of the target notification indicating the gateway device to stop executing a target algorithm deployed on the gateway device; executing the target algorithm in the case of the target notification indicating the gateway device to execute the target algorithm; before the stopping executing the target algorithm in the case of the target notification indicating the gateway device to stop executing a target algorithm deployed on the gateway device; executing the target algorithm in the case of the target notification indicating the gateway device to execute the target algorithm, the method further comprises: acquiring video streams collected by K collection devices, K being a positive integer greater than or equal to 2; processing video streams collected by a first collection device in a first time period to obtain video data corresponding to the first collection device, the first collection device being any N collection device in the K collection devices, N being an integer greater than 0 and less than K; processing video streams collected by a second collection device in a second time period to obtain video data corresponding to the second collection device, the second collection device being all collection devices except the first collection device in the K collection devices, the second time period being located after the first time period; storing the video data; the processing video streams collected by a first collection device in a first time period to obtain video data corresponding to the first collection device comprises: judging whether the first collection device is a target collection device and whether a current time is a target time period; in the case of the first collection device being the target collection device and / or the current time being in the target time period, processing video streams collected by the first collection device in the first time period based on a first frame extraction period to obtain video data corresponding to the first collection device; otherwise, processing video streams collected by the first collection device in the first time period according to a second frame extraction period to obtain video data corresponding to the first collection device; the first frame extraction period is less than the second frame extraction period; and / or the processing video streams collected by a second collection device in a second time period to obtain video data corresponding to the second collection device comprises: judging whether the second collection device is a target collection device and whether a current time is a target time period; In a case where the second collection device is the target collection device and / or is currently in the target time period, processing a video stream collected by the second collection device in a second time period based on a third frame extraction period to obtain video data corresponding to the second collection device; otherwise, processing the video stream collected by the second collection device in the second time period according to a fourth frame extraction period to obtain the video data corresponding to the second collection device; the third frame extraction period is less than the fourth frame extraction period.
2. The method of claim 1, wherein, The executing the target algorithm comprises: executing the target algorithm based on the video data to obtain a target algorithm result, the target algorithm result being used to indicate whether there is an abnormal image frame in the video data; in a case where the target algorithm result indicates that there is an abnormal image frame in the video data, generating alarm information based on a first identifier and a second identifier, the first identifier being used to identify the abnormal image frame and / or a collection device corresponding to the abnormal image frame, and the second identifier being used to identify the target algorithm; sending the alarm information to the service end.
3. An algorithm execution processing method characterized by comprising: The method applied to the service end comprises: receiving target data sent by a gateway device, the target data being used to represent hardware performance and / or resource usage of the gateway device; generating a target notification based on the target data, the target notification being used to instruct the gateway device to stop executing a target algorithm deployed on the gateway device or instruct the gateway device to execute the target algorithm; sending the target notification to the gateway device; in a case where the target notification instructs the gateway device to stop executing the target algorithm deployed on the gateway device, after the target notification is sent to the gateway device, the method further comprises: obtaining video data stored on the gateway device; executing a target algorithm deployed on the service end based on the video data to obtain a target algorithm result, the target algorithm result being used to indicate whether there is an abnormal image frame in the video data; in the case where the target notification instructs the gateway device to stop executing the target algorithm deployed on the gateway device, stopping executing the target algorithm; in the case where the target notification instructs the gateway device to execute the target algorithm, before the target algorithm is executed, the method further comprises: obtaining video streams collected by K collection devices, K being a positive integer greater than or equal to 2; processing a video stream collected by a first collection device in a first time period to obtain video data corresponding to the first collection device, the first collection device being any N collection device in the K collection devices, N being an integer greater than 0 and less than K; processing a video stream collected by a second collection device in a second time period to obtain video data corresponding to the second collection device, the second collection device being all collection devices except the first collection device in the K collection devices, and the second time period being located after the first time period; storing the video data; the processing the video stream collected by the first collection device in the first time period to obtain the video data corresponding to the first collection device comprises: determining whether the first collection device is a target collection device and whether a current time is in a target time period; in a case where the first collection device is the target collection device and / or the current time is in the target time period, processing a video stream collected by the first collection device in a first time period based on a first frame extraction period to obtain video data corresponding to the first collection device; otherwise, processing the video stream collected by the first collection device in the first time period according to a second frame extraction period to obtain the video data corresponding to the first collection device; the first frame extraction period is less than the second frame extraction period; and / or the processing of the video stream collected by the second collection device in the second time period to obtain the video data corresponding to the second collection device comprises: determining whether the second collection device is a target collection device and whether a current time is in a target time period; in a case where the second collection device is the target collection device and / or the current time is in the target time period, processing a video stream collected by the second collection device in a second time period based on a third frame extraction period to obtain video data corresponding to the second collection device; otherwise, processing the video stream collected by the second collection device in the second time period according to a fourth frame extraction period to obtain the video data corresponding to the second collection device; the third frame extraction period is less than the fourth frame extraction period.
4. The method of claim 3, wherein, in a case where the target notification instructs the gateway to execute the target algorithm, after the target notification is sent to the gateway device, the method further comprises: receiving alarm information sent by the gateway device, the alarm information being generated based on a first identifier and a second identifier, the first identifier being used to identify an abnormal image frame in video data stored by the gateway device and / or a collection device corresponding to the abnormal image frame, and the second identifier being used to identify the target algorithm.
5. An algorithm execution processing apparatus characterized by comprising: The gateway device comprises the algorithm execution processing apparatus, and the algorithm execution processing apparatus comprises: a first sending module configured to send target data to a server in real time, the target data being used to represent hardware performance and / or resource usage of the gateway device; a first receiving module configured to receive a target notification sent by the server in real time, the target notification being generated based on the target data; in a case where a preset condition is met, the target notification is used to stop executing a target algorithm, and in a case where the preset condition is not met, the target notification is used to execute the target algorithm, the preset condition being that the hardware performance is lower than or equal to a first threshold value and / or the resource usage is higher than or equal to a second threshold value; a first processing module configured to, in a case where the target notification instructs the gateway device to stop executing a target algorithm deployed on the gateway device, stop executing the target algorithm; and in a case where the target notification instructs the gateway device to execute the target algorithm, execute the target algorithm. The algorithm execution processing apparatus further includes: acquiring video streams collected by K collection devices, K being a positive integer greater than or equal to 2; processing the video stream collected by the first collection device in a first time period to obtain video data corresponding to the first collection device, the first collection device being any N collection device in the K collection devices, N being an integer greater than 0 and less than K; processing the video stream collected by the second collection device in a second time period to obtain video data corresponding to the second collection device, the second collection device being all collection devices except the first collection device in the K collection devices, the second time period being located after the first time period; storing the video data; The processing of the video stream collected by the first collection device in the first time period to obtain the video data corresponding to the first collection device includes: determining whether the first collection device is a target collection device and whether the current time is in a target time period; if the first collection device is the target collection device and / or the current time is in the target time period, processing the video stream collected by the first collection device in the first time period based on a first frame extraction period to obtain the video data corresponding to the first collection device; otherwise, processing the video stream collected by the first collection device in the first time period according to a second frame extraction period to obtain the video data corresponding to the first collection device; the first frame extraction period is less than the second frame extraction period; and / or The processing of the video stream collected by the second collection device in the second time period to obtain the video data corresponding to the second collection device includes: determining whether the second collection device is a target collection device and whether the current time is in a target time period; if the second collection device is the target collection device and / or the current time is in the target time period, processing the video stream collected by the second collection device in the second time period based on a third frame extraction period to obtain the video data corresponding to the second collection device; otherwise, processing the video stream collected by the second collection device in the second time period according to a fourth frame extraction period to obtain the video data corresponding to the second collection device; the third frame extraction period is less than the fourth frame extraction period.
6. An algorithm execution processing apparatus characterized by comprising: The server includes the algorithm execution processing apparatus, and the algorithm execution processing apparatus includes: a second receiving module configured to receive target data sent by a gateway device, the target data being used to represent hardware performance and / or resource usage of the gateway device; a generating module configured to generate a target notification based on the target data, the target notification being used to instruct the gateway device to stop executing a target algorithm deployed on the gateway device or instruct the gateway device to execute the target algorithm; a second sending module configured to send the target notification to the gateway device. In the case that the target notification instructs the gateway device to stop executing the target algorithm deployed on the gateway device, after the algorithm execution processing apparatus sends the target notification to the gateway device, the algorithm execution processing apparatus further comprises: acquiring video data stored on the gateway device; executing the target algorithm deployed on the server based on the video data to obtain a target algorithm result, the target algorithm result being used to indicate whether there is an abnormal image frame in the video data; In the case that the target notification instructs the gateway device to stop executing the target algorithm deployed on the gateway device, before stopping executing the target algorithm, in the case that the target notification instructs the gateway device to execute the target algorithm, the algorithm execution processing apparatus further comprises: acquiring video streams collected by K collection devices, K being a positive integer greater than or equal to 2; processing the video stream collected by the first collection device in a first time period to obtain video data corresponding to the first collection device, the first collection device being any N collection device in the K collection devices, N being an integer greater than 0 and less than K; processing the video stream collected by the second collection device in a second time period to obtain video data corresponding to the second collection device, the second collection device being all collection devices except the first collection device in the K collection devices, the second time period being located after the first time period; storing the video data; The processing of the video stream collected by the first collection device in the first time period to obtain the video data corresponding to the first collection device comprises: determining whether the first collection device is a target collection device and whether the current time is in a target time period; in the case that the first collection device is the target collection device and / or the current time is in the target time period, processing the video stream collected by the first collection device in the first time period based on a first frame extraction period to obtain the video data corresponding to the first collection device; otherwise, processing the video stream collected by the first collection device in the first time period according to a second frame extraction period to obtain the video data corresponding to the first collection device; the first frame extraction period is less than the second frame extraction period; and / or The processing of the video stream collected by the second collection device in the second time period to obtain the video data corresponding to the second collection device comprises: determining whether the second collection device is a target collection device and whether the current time is in a target time period; in the case that the second collection device is the target collection device and / or the current time is in the target time period, processing the video stream collected by the second collection device in the second time period based on a third frame extraction period to obtain the video data corresponding to the second collection device; otherwise, processing the video stream collected by the second collection device in the second time period according to a fourth frame extraction period to obtain the video data corresponding to the second collection device; the third frame extraction period is less than the fourth frame extraction period.
7. An electronic device, comprising: The transceiver, the memory, the processor, and a computer program stored in the memory and runtable on the processor; characterized in that The processor is configured to read the program in the memory to implement the steps in the method of any one of claims 1 to 2, or to implement the steps in the method of any one of claims 3 to 4.
8. A readable storage medium for storing a program, characterized by The program, when executed by the processor, implements the steps in the method of any one of claims 1 to 4.
Citation Information
Patent Citations
Abnormal event recognition method and device, storage medium and electronic device
CN112291520A
Algorithm deploying and scheduling method and algorithm deploying and scheduling device
CN114168331A