Event identification method and system for pig house intelligent monitoring, camera and medium
By introducing a pre-configured tag rule engine and 4G communication into the intelligent pigsty monitoring system, the problems of data reliability and event identification accuracy of the pigsty monitoring system in a wireless network environment are solved, and efficient and flexible pigsty monitoring data processing and deployment are realized.
Patent Information
- Application Number
- CN202610014622.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-07
- Publication Date
- 2026-03-31
AI Technical Summary
Existing intelligent monitoring systems for pig farms lack specificity in event identification, cannot accurately identify pigs and personnel, and have low data reliability in wireless network environments, resulting in high deployment costs, long construction cycles, and frequent data loss.
By employing a pre-configured tag rule engine combined with specific monitoring areas in the pigsty, target identification and event generation are achieved. Data is stored locally and uploaded to the cloud via 4G mobile communication over a wireless network, ensuring data reliability.
It achieves highly targeted, flexible and accurate event identification for pigsties, improves system processing efficiency and response capabilities, ensures the integrity and reliability of monitoring data, and reduces deployment and operation and maintenance costs.
Smart Images

Figure CN121767905A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent monitoring technology for pigsties, specifically to an event recognition method, system, camera, and medium for intelligent monitoring of pigsties. Background Technology
[0002] As modern animal husbandry develops towards large-scale and refined operations, utilizing technology to achieve intelligent monitoring of the pigsty environment and promptly grasp pig activities, personnel operations, and abnormal situations is of great significance for improving breeding efficiency and safety management. Therefore, the industry is attempting to introduce general-purpose intelligent video monitoring technology into pigsty management.
[0003] However, when applied to the specific scenario of pigsties, existing general solutions face the following two core problems, making it difficult for them to meet actual management needs: On the one hand, existing solutions have significant shortcomings in terms of the business-specificity of event recognition. The core of general monitoring systems is to detect common security events such as personnel intrusion or vehicle appearances. Their built-in AI recognition models and event rules are not tailored for pig farm management. This results in the system's inability to accurately identify the core target of pigs, and even more so, its inability to configure and trigger events with practical management significance based on the pig farm's unique management logic (e.g., determining whether pigs have entered personnel-only passageways or whether personnel have entered designated pig activity areas). Existing systems lack a mechanism that can deeply link AI recognition results, specific monitoring areas, and flexibly configurable judgment rules, thus failing to achieve accurate and useful pig farm business event recognition.
[0004] On the other hand, existing solutions face challenges in practical deployment and data reliability. Many pig farm environments, especially older or remotely located farms, often lack pre-installed wired networks. Traditional intelligent monitoring solutions typically rely on stable wired networks to transmit high-definition video streams back to remote servers for analysis. This results in high system deployment costs, long construction periods, and even makes implementation impossible in areas without network access. Even with the adoption of wireless networks such as 4G, existing solutions lack effective mechanisms to cope with signal fluctuations or brief interruptions, often leading to the loss of critical event data and video evidence, compromising the continuity and reliability of monitoring.
[0005] Therefore, there is an urgent need in this field for an intelligent monitoring technology solution that can perform intelligent analysis directly on-site in pigsties, support the definition of pigsty-specific event rules, and adapt to wireless network environments to ensure data reliability. Summary of the Invention
[0006] To address the problems of inaccurate event recognition, inflexible system deployment, and low data reliability in existing technologies for pigsty monitoring, this invention provides an event recognition method, system, camera, and medium for intelligent pigsty monitoring, thereby resolving the aforementioned technical deficiencies.
[0007] In a first aspect, the present invention proposes an event recognition method for intelligent monitoring of pigsties, the method comprising the following steps: S1. Collect video streams of the pigsty environment and sample them to obtain sampled images; S2. Perform target recognition processing on the sampled image to obtain the recognition result, which includes: target category, location coordinates and confidence level. The target categories include pigs, people and vehicles. S3. Perform label matching processing on the recognition results based on pre-configured label rules to obtain label matching results; the label matching processing executes the judgment of at least two of the following rules in parallel or serially: S31. Target Occurrence Rule: Determine whether a specified target category appears in the recognition results; S32, Area Intersection Rule: Determine whether a specified target category appears and whether the area defined by its location coordinates intersects with the pre-configured monitoring area; wherein, the pre-configured monitoring area includes an effective area used to limit the activity range of pigs and a passageway area used to identify abnormal entry; S33, Target Persistence Rule: Determine whether a specified target category appears in multiple consecutive recognition results and continues to meet the set duration; S34. Target Disappearance Rule: Determine whether a specified target category disappears in multiple consecutive recognition results and continues to meet the set duration; S4. Based on the tag matching results, perform event matching according to the pre-configured event rules. When a match is successful, generate a pigsty monitoring event. Pigsty monitoring events include events such as pigs appearing in the aisle area, personnel appearing in the effective area, and vehicles appearing in the monitoring area. S5 responds to the generation of pigsty monitoring events, extracts video clips before and after the event, and monitors network signal status to choose whether to store the event data and video clips locally or report them to the cloud platform.
[0008] Preferably, in step S1, the sampled image is stored in a sampling queue; step S2 further includes: obtaining the sampled image from the sampling queue for target recognition processing, and storing the obtained recognition result in an inference queue; step S3 further includes: performing label matching processing on the recognition result obtained from the inference queue based on pre-configured label rules to obtain label matching results.
[0009] Preferably, in step S32, determining whether a specified target category appears and whether the area defined by its location coordinates intersects with the pre-configured monitoring area specifically includes the following sub-steps: S321. Determine the target bounding box based on the location coordinates in the recognition results; S322. Calculate the geometric intersection area between the target bounding box and a selected area in the pre-configured monitoring area; S323. Determine whether the area of the geometric intersection is greater than zero and whether the proportion of the selected area exceeds a preset percentage threshold.
[0010] Preferably, in step S33, determining whether the specified target category appears in multiple consecutive recognition results and continuously meets the set duration specifically includes the following sub-steps: S331. Maintain an occurrence count counter and a time window for a specified target category; S332. When a specified target category is detected in consecutive recognition results within a time window, increment the counter; S333. If the counter value reaches or exceeds the preset occurrence threshold when the time window expires, it is determined that the target continuous occurrence rule is met.
[0011] Preferably, in step S4, event matching is performed according to pre-configured event rules, which specifically includes the following sub-steps: S41. Parse the tag matching results and extract one or more event tag codes contained therein; S42. Traverse the pre-configured event rule library and match the event tag code with the trigger tag conditions defined in the event rules; S43. If a match is successful, a pigsty monitoring event containing the event code, event time, target information, and associated media file path will be generated according to the matched event rules.
[0012] Preferably, in step S4, the pigsty monitoring events include at least one of the following: Personnel appearance events generated by target appearance rules and whose target category is personnel; A warning event for pigs entering the passageway is generated by the region intersection rule, where the target category is pigs and the monitoring area is the passageway area; An event generated when a person enters a valid area, triggered by a regional intersection rule, with the target category being personnel and the monitored area being a valid area; Vehicle occurrence events generated by target occurrence rules or region intersection rules, where the target category is vehicle; Events triggered by the continuous occurrence rule of the target include: personnel continuously staying in the effective area and vehicles continuously staying in the passageway area; Events triggered by the target disappearance rule include: pigs disappearing from the effective area for an extended period of time, and personnel leaving their posts.
[0013] Preferably, in step S5, monitoring the network signal status to select whether to store the event data and video clips locally or report them to the cloud platform specifically includes the following sub-steps: S51. Monitor the signal quality of the 4G mobile communication network in real time and obtain the reference signal received power and signal-to-noise ratio. S52. If the received power of the reference signal is lower than the first strength threshold, or the signal-to-noise ratio is lower than the first quality threshold, then proceed to step S53; otherwise, proceed to step S54. S53. Store the currently generated pigsty monitoring events and corresponding video clips into the local storage queue, and pause reporting to the cloud platform; S54. Immediately report the pigsty monitoring events and corresponding video clips to the cloud platform; S55. Continuously monitor the received power and signal-to-noise ratio of the reference signal; S56. When it is determined that the received power of the reference signal is higher than the second intensity threshold and the signal-to-noise ratio is higher than the second quality threshold, all event data and video clips temporarily stored in the local storage queue are uploaded to the cloud platform in batches.
[0014] Secondly, this invention proposes an event recognition system for intelligent monitoring of pigsties, used to implement the method described in any of the above claims, the system comprising: The image acquisition and sampling module is configured to acquire video streams of the pigsty environment and sample them to obtain sampled images. The target recognition processing module is configured to perform target recognition processing on the sampled image to obtain the recognition result, which includes: target category, location coordinates and confidence level, wherein the target category includes pigs, people and vehicles; The label rule engine module is configured to perform label matching processing on the recognition results based on pre-configured label rules to obtain label matching results; the label rule engine module is configured to execute the judgment of at least two of the following rules in parallel or serially: The target occurrence rule judgment unit is configured to determine whether a specified target category appears in the recognition results; The region intersection rule judgment unit is configured to determine whether a specified target category appears and whether the area defined by its location coordinates intersects with a pre-configured monitoring area; wherein, the pre-configured monitoring area includes an effective area for limiting the activity range of pigs and a passageway area for identifying abnormal entry; The target continuous appearance rule judgment unit is configured to determine whether a specified target category appears in multiple consecutive recognition results and continuously meets the set duration; The target disappearance rule judgment unit is configured to determine whether a specified target category disappears in multiple consecutive recognition results and continues to meet a set duration. The event rule engine module is configured to perform event matching based on tag matching results and pre-configured event rules. When a match is successful, a pigsty monitoring event is generated. Pigsty monitoring events include events such as pigs appearing in the aisle area, personnel appearing in the effective area, and vehicles appearing in the monitored area. The communication and storage control module is configured to respond to the generation of pigsty monitoring events, capture video clips before and after the event, and monitor the network signal status to choose whether to store the event data and video clips locally or report them to the cloud platform.
[0015] Thirdly, the present invention proposes an AI monitoring camera, comprising: an image sensor, an AI computing chip, a 4G mobile communication module, a memory, a processor, and a computer program stored in the memory and capable of running on the processor; when the processor executes the computer program, it is used to implement the steps of any of the above-described event recognition methods for intelligent monitoring of pigsties.
[0016] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the above-described methods for intelligent monitoring of pigsties, specifically for event recognition.
[0017] Compared with the prior art, the beneficial effects of the present invention are as follows: (1) It achieves highly targeted, flexible, and accurate event recognition specifically for pigsties. By introducing a pre-configured tag rule engine that integrates at least four matching logics (target appearance, area intersection, target continuous appearance, target disappearance), and combining it with specific monitoring areas defined for pigsties (such as effective areas and aisle areas), this invention can transform general AI target recognition results (pigs, personnel, vehicles) into specific events that fit the business logic of pigsty management (such as warnings of pigs entering aisles and personnel entering effective areas). This mechanism of linking rules and areas makes event definition no longer dependent on simple thresholds, significantly reducing false alarms and false negatives caused by changes in lighting, normal activities, etc., and greatly improving the accuracy and scene adaptability of event recognition.
[0018] (2) Significantly improved system processing efficiency and response capability. By adopting an asynchronous queued processing architecture such as sampling queues and inference queues, the steps of video sampling, AI recognition, tag matching and event generation are decoupled. Each module can work in parallel or pipelined mode, which effectively alleviates the processing pressure under high-concurrency video streams, reduces the overall system response latency, and thus ensures the smoothness of real-time monitoring.
[0019] (3) It ensures the integrity and reliability of monitoring data in environments without wired networks or with weak networks. By monitoring the signal quality of the 4G mobile communication network in real time and deciding on the reporting strategy based on preset dual thresholds (strength and quality), this method creatively realizes edge collaboration between 4G and AI. When the signal is poor, event data and video clips are automatically stored locally and then transmitted in batches after the signal is restored. This mechanism fundamentally solves the problem of data loss in traditional solutions when the wireless network is unstable, ensuring the continuity and integrity of key monitoring evidence, and is particularly suitable for farm environments with weak network infrastructure.
[0020] (4) Improved system deployment convenience and integration. This invention integrates core functions such as AI target recognition, event rule processing, and network communication decision-making into the software logic of field devices (such as cameras), reducing real-time dependence on backend servers. Combined with 4G communication capabilities, the system can operate without relying on complex wired network deployment, simplifying construction, significantly reducing initial construction and operation and maintenance costs, and improving the system's deployment flexibility in different pigsty environments. Attached Figure Description
[0021] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments, taken with reference to the accompanying drawings: Figure 1 This is a flowchart of the first half of the intelligent monitoring event recognition method for pigsties in this application; Figure 2 This is a flowchart of the latter part of the intelligent monitoring event recognition method for pigsties in this application; Figure 3 This is a schematic diagram illustrating the linkage between regional configuration and AI analysis; Figure 4 This is a detailed flowchart of the event algorithm rule engine; Figure 5 This is a flowchart of the collaborative working mechanism between 4G and AI; Figure 6 This is a schematic diagram of the intelligent monitoring event recognition system for pigsties of the present invention; Figure 7 This is a schematic diagram of the structure of a computer system suitable for implementing the embodiments of the present invention. Detailed Implementation
[0022] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0023] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0024] The method described in this invention operates on an AI surveillance camera with an integrated event algorithm rule engine. The hardware of this AI surveillance camera mainly includes: an image acquisition and encoding module containing an image sensor (such as CMOS), a processing unit with a built-in AI computing chip, a 4G mobile communication module, a memory, a power supply module, and a local storage module. The AI computing chip (e.g., with a computing power of 2TOPs INT8) is used to perform target recognition processing on the device side, and the 4G communication module (e.g., LTE Cat 4) is used to achieve data communication in a wireless network environment.
[0025] In this invention, the image sensor is used to acquire raw video streams; the AI computing chip is used to run a target recognition model, process the sampled images to generate recognition results; the processor executes computer programs stored in memory to implement logical functions such as tag rule matching and event rule matching; the 4G mobile communication module is used for network communication and, under the control of the processor, executes data reporting or local storage strategies based on signal status. All hardware components and software programs work together to constitute a dedicated AI surveillance camera for implementing the aforementioned event recognition method.
[0026] Figure 1 and Figure 2 A flowchart of the intelligent monitoring event recognition method for pigsties according to this application is shown, wherein Figure 1 The flowchart shows the first part of the intelligent monitoring event recognition method for pigsties, mainly illustrating the sampling, AI recognition, and tag matching stages. Figure 2 This is a flowchart of the latter part of the intelligent monitoring event recognition method for pigsties, mainly showing the event generation, video processing, and data reporting stages, and connecting... Figure 1 The process is shown below. (Refer to the reference.) Figure 1 and Figure 2 The method includes the following steps: S1. Collect video streams of the pigsty environment and sample them to obtain sampled images. Store the sampled images in the sampling queue.
[0027] This step is completed collaboratively by the image acquisition module of the intelligent monitoring camera deployed at the pigsty and the sampling module of the software system. The specific implementation is as follows: The camera body includes an image acquisition module, typically employing a 4-megapixel CMOS image sensor to continuously acquire raw video streams from the pigsty monitoring points, with a resolution of up to 1920×1080. To adapt to the potentially low-light environment in the pigsty, the camera also integrates a supplementary lighting module (such as an 850nm infrared LED) to ensure clear monitoring images are still obtained at night or in low light conditions.
[0028] The acquired raw video stream is first processed by a video encoding module. This module supports multiple video encoding standards such as H.265, H.264, and MJPEG. In a preferred embodiment of the invention, the H.265 encoding algorithm is preferentially used to compress the video stream. Compared to traditional encoding methods such as H.264, H.265 can significantly reduce the bitstream bandwidth by approximately 50% while maintaining video quality, thereby reducing the pressure on subsequent transmission and storage. This is particularly important for edge devices that rely on 4G wireless networks and have limited storage resources.
[0029] The sampling module is responsible for extracting keyframes, or sampled images, from the encoded continuous video stream according to a predefined strategy for AI analysis. The sampling frequency can be flexibly configured based on the real-time requirements of the monitoring scenario. For example, under normal inspection conditions, it can be set to sample one frame every 2 to 6 seconds; while in specific monitoring periods or areas requiring higher real-time performance, it can switch to a high-frequency sampling mode, such as sampling one frame every 1 to 2 seconds. This configurable sampling mechanism balances processing resource consumption with the timeliness of event detection.
[0030] like Figure 1 As shown, to decouple the various processing stages of the system and improve overall throughput and response speed, this invention adopts an asynchronous queued processing architecture. After acquiring each sampled image, the sampling module does not immediately perform subsequent time-consuming AI recognition processing, but instead stores it in a buffer called a sampling queue. As a first-in, first-out (FIFO) data structure, the sampling queue effectively isolates the video acquisition / sampling (producer) from the downstream AI recognition (consumer) stages. In this way, even if the AI recognition processing occasionally experiences delays, it will not block the continuous acquisition and sampling of video, ensuring the continuity of the data source and laying the foundation for the stable and efficient operation of the entire system. The sampled images stored in the sampling queue will await consumption by the target recognition processing module in step S2.
[0031] Continue to refer to Figure 1 and Figure 2 The intelligent monitoring event recognition method for pigsties provided in this application also includes the following steps: S2. Obtain sampled images from the sampling queue, perform target recognition processing, and store the obtained recognition results into the inference queue. The recognition results include: target category, location coordinates, and confidence level. The target categories include pigs, people, and vehicles.
[0032] This step is executed by the target recognition and processing module in the system software and relies on the AI computing power processing unit integrated in the camera hardware. For example... Figure 1 As shown, this step is a crucial part of the asynchronous processing pipeline, and its specific implementation is as follows: The target recognition and processing module, acting as a consumer, sequentially retrieves sampled images from the sampling queue. Subsequently, this module invokes a dedicated target detection algorithm model already loaded into the device's memory for inference and analysis. This algorithm model is specifically trained and optimized for pigsty monitoring scenarios, such as being based on the YOLO architecture, and can efficiently identify typical targets in the pigsty environment. The model's deployment and operation rely on the camera's built-in AI computing unit, which typically includes a dedicated AI chip (such as an ARM architecture chip with 2 Tops INT8 computing power). This chip connects to the main control board via a high-speed interface (such as PCIe), providing the model with the computing power required for real-time edge-side inference, thus avoiding the latency and bandwidth pressure caused by uploading the entire video stream to the cloud for analysis.
[0033] After inference on the sampled images, the model outputs structured recognition results. Each detected target corresponds to a result item, and each result item contains at least the following core information: Target Category: Identifies the category of the identified object. In the application of this invention to pigsties, basic and key categories include pigs (e.g., labeled "pig"), people (e.g., labeled "person"), and vehicles (e.g., labeled "vehicle"). Furthermore, the model can be extended to identify other relevant categories, such as cats, dogs, and birds, to cover a wider range of anomalies.
[0034] Location coordinates: Based on the image pixel coordinate system, these are rectangular bounding boxes describing the location of the target. They are usually represented by the coordinates of the top-left and bottom-right corners of the box, for example, (min_x, min_y, max_x, max_y), used to precisely define the target's region in the image. These coordinates are the basis for subsequent spatial relationship analysis (such as region intersection determination).
[0035] Confidence score: A score between 0 and 1, representing the model's confidence level in predicting the target's category and location. This information can be used to filter out low-confidence interference detections, improving the accuracy of subsequent processing.
[0036] Similar to step S1, to maintain the asynchronicity and efficiency of the processing chain, the target recognition processing module does not directly perform complex rule matching after generating the recognition result. Instead, it treats it as a new data producer, storing the structured recognition result in the next buffer—the inference queue. The inference queue is also a first-in, first-out (FIFO) data structure, decoupling the computationally intensive AI recognition process from the subsequent logically complex label matching process. This allows the AI recognition module to continuously process new sampled images without waiting for the label engine's processing speed, significantly improving the overall system's concurrent processing capability and throughput. The recognition results stored in the inference queue await consumption and processing by the label rule engine module in step S3.
[0037] Continue to refer to Figure 1 and Figure 2 The intelligent monitoring event recognition method for pigsties provided in this application also includes the following steps: S3. Based on the pre-configured label rules, perform label matching processing on the recognition results obtained from the inference queue to obtain label matching results (Tags); the label matching processing executes at least two of the following rules in parallel or serially: target appearance rule, region intersection rule, target continuous appearance rule, and target disappearance rule.
[0038] This step is executed by the tag rule engine module, whose function is to perform the initial mapping between general AI recognition results and the specific business logic of pig farms. For example... Figure 1 As shown, this module acts as a consumer, retrieving recognition results from the inference queue. Based on a set of dynamically configurable tag rules stored in a local database (such as SQLite), it performs flexible logical judgments on the recognition results and generates standardized intermediate products—event tags. The set of all tags constitutes the tag matching result. In actual implementation, the judgment of these rules can be executed sequentially or in parallel, depending on the processor's load and capabilities. Figure 1 In the illustrated embodiment, to clearly demonstrate the logical flow, the process is explained in a sequential judgment manner. The recognition results are processed by label matching based on pre-configured label rules to obtain label matching results; the label matching process sequentially performs judgments on at least two of the following rules: S31. Target Appearance Rule: This rule determines whether a specified target category appears in the current recognition result list. For example, the rule configuration specifies the target category class_ids as "person". When the label rule engine processes a recognition result, it iterates through all detected target categories in the result. If "person" is found, the rule is satisfied, and a corresponding event label, such as appear_person, is generated. This rule is suitable for detecting basic target appearance scenarios.
[0039] S32. Region Intersection Rule: This rule is the core of refined judgment based on spatial constraints. For the linkage mechanism between region configuration and AI analysis, please refer to... Figure 3 .like Figure 3 As shown, the system allows for the predefinition of different monitoring areas (such as aisle areas) in the monitoring screen. This area information is deeply integrated with the tag rule engine. This rule determines whether a specified target category appears and whether the area defined by its location coordinates intersects with the pre-configured monitoring areas. The pre-configured monitoring areas are defined and drawn through a separate area configuration module in the system. This module allows users to draw rectangular areas in the video screen, including but not limited to effective areas for limiting the activity range of pigs and aisle areas for identifying abnormal pig entry. Area information (such as ID, type, vertex coordinates) is stored in a local configuration file or database. The specific implementation includes the following sub-steps: S321. Determine the target bounding box: Based on the position coordinates (such as min_x, min_y, max_x, max_y) in the recognition result, determine the target bounding box in the image pixel coordinate system.
[0040] S322. Calculate the geometric intersection area: Obtain the boundary coordinates of the monitoring area specified by the rule (e.g., bg_ids points to a certain aisle area) from the region configuration module. Calculate the geometric intersection area between the target bounding box and the selected monitoring area. Let the coordinates of the target bounding box be (min_x1, min_y1, max_x1, max_y1), and the coordinates of the pre-configured monitoring area be (min_x2, min_y2, max_x2, max_y2). The calculation formula is: Intersection area = max(0, min(max_x1, max_x2) - max(min_x1, min_x2)) × max(0, min(max_y1, max_y2) - max(min_y1, min_y2)).
[0041] S323. Determine Area Ratio: Determine if the calculated geometric intersection area is greater than zero, and if the proportion of this area to the total area of the selected region exceeds a preset percentage threshold (e.g., 30%). If the specified target category (e.g., "pig") appears and this area ratio condition is met, then the corresponding region intersection label, such as insection_pig_aisle, is generated, thereby achieving... Figure 3 The example illustrates precise spatial event recognition, such as "pigs entering the aisle".
[0042] S33. Target Persistence Rule: This rule is used to determine the persistence of a target, requiring that a specified target category appear in multiple consecutive recognition results and persist for a set duration. The specific implementation includes the following sub-steps: S331, Maintain Counter and Time Window: Initialize an occurrence counter and a sliding time window for a specified target category (e.g., the time period check_cycle is set to 60 seconds).
[0043] S332, Detect and increment the counter: When processing consecutive recognition results within a time window, increment the counter whenever the specified target category is detected in a single result.
[0044] S333. Determine if the rule is met: When the time window expires, check if the counter value reaches or exceeds the preset occurrence threshold (e.g., 5 times). If it does, the target continuous occurrence rule is met, and a corresponding continuous label is generated, such as continue_person (continuously appearing person). This rule is applicable to scenarios such as detecting people staying for extended periods or vehicles blocking the road.
[0045] S34. Target Disappearance Rule: This rule is used to determine the continuous disappearance of a target. It requires that a specified target category disappears in multiple consecutive recognition results and continues for a set duration. Its implementation is similar to the continuous appearance rule, but the logic is reversed. The system maintains a timer or status record for the target category. When the target is not found in consecutive recognition results, the timer increments. If the disappearance state continues for more than the set time period (check_cycle), the target disappearance rule is satisfied, and a target disappearance label is generated, such as none_pig (pig disappeared). This rule is applicable to scenarios such as detecting pigs leaving their pens or personnel leaving their posts. For example, for personnel leaving their posts, one or more work areas (such as the feeder's work area) can be predefined in the video footage. When the system detects the disappearance of a personnel target that was originally present in the predefined work area in multiple consecutive recognition results, and this disappearance state continues for more than the set departure judgment duration (such as 5 minutes), a personnel departure event is triggered.
[0046] The tag rule engine organizes all event tags generated after matching the above rules (e.g., appear_person for "personnel present", insection_pig_aisle for "pigs entering the aisle") to form the tag matching result for this identification. This result, as standardized intermediate data, will be passed to the event rule engine in step S4 for the final generation of pigsty monitoring events. This design, separate from the event rule engine, supports multi-tag combination matching, significantly improving the flexibility and accuracy of event identification.
[0047] Continue to refer to Figure 1 and Figure 2 The intelligent monitoring event recognition method for pigsties provided in this application also includes the following steps: S4. Based on the tag matching results, perform event matching according to the pre-configured event rules. When the match is successful, generate pigsty monitoring events. Pigsty monitoring events include events where pigs appear in the aisle area, events where personnel appear in the effective area, and events where vehicles appear in the monitoring area.
[0048] This step is executed by the event rules engine module, which is responsible for transforming standardized intermediate tags into final monitoring events with clear business meaning. For example... Figure 2 As shown, this module receives tag matching results from the tag rule engine. Its core function is to perform final business logic mapping on the tags based on a set of pre-configured event rules, thereby generating pigsty monitoring events. The specific implementation includes the following sub-steps: S41. Parse the tag matching results and extract one or more event tag codes contained therein. The event rule engine first parses the received tag matching results. This result contains all event tags generated by the tag rule engine based on rules S31 to S34. Each tag has its unique code, such as appear_person for "persons appearing", insection_pig_aisle for "pigs entering the passageway", continue_vehicle for "vehicles continuously appearing", or none_pig for "pigs disappearing", etc. The task of this step is to extract the set of all event tag codes corresponding to this identification from this structured data.
[0049] S42. Traverse the pre-configured event rule base and match the event tag codes with the trigger tag conditions defined in the event rules. Subsequently, the engine traverses and queries the pre-configured event rule base stored in a local database (such as SQLite). Each event rule is a complete business event template, and its configuration information typically includes: event code, event name, priority, risk level, deployment time, and crucial trigger tag conditions. The trigger tag conditions explicitly define the tag logic required to generate this event, and can be defined using flexible query expressions (such as JSONPath, an expression language for querying JSON data). For example, a rule's condition might be configured as ["=", "<-$.tags[*].code->", "insection_pig_aisle"], indicating that it needs to check if insection_pig_aisle exists in the extracted tag code set. The engine compares the tag code set extracted in step S41 with the trigger conditions of each rule in the rule base one by one.
[0050] S43. If a match is successful, a pigsty monitoring event containing the event code, event time, target information, and associated media file path is generated based on the matched event rule. A "successful match" occurs when the extracted tag code set meets the triggering condition of an event rule. At this point, the event rule engine instantiates the rule, generating a complete, structured pigsty monitoring event object. This event object contains at least the following information: Event code (event_code): Corresponds to the matched event rule and is used to uniquely identify the event type.
[0051] Event time: This includes the time the event occurred and the time the system detected it.
[0052] Target information: derived from the original recognition results, including the target category that triggered the event, location coordinates, and confidence level.
[0053] Associated media file path: The system will associate an event with a scene image (usually a sampled image that triggered the event) and a video clip (captured by subsequent step S5). The storage or access path of these media files is recorded here.
[0054] In addition, the event object will inherit the event name, priority, risk level and other attributes configured in the rules.
[0055] Based on different tag combinations and rule configurations, the generated pigsty monitoring events can cover a variety of typical pigsty management scenarios, including but not limited to at least one of the following: Person appearance events are generated by the target appearance rule and the target category is personnel (such as the appear_person tag matching the corresponding rule).
[0056] An alert event for pigs entering the aisle is generated when the region intersection rule is triggered, the target category is pigs, and the monitoring area is the aisle area (e.g., the insection_pig_aisle tag matches the corresponding rule).
[0057] Events generated when a person enters a valid area (e.g., the insection_person_valid tag matches the corresponding rule) are triggered by the area intersection rule, the target category is personnel, and the monitored area is a valid area.
[0058] Vehicle occurrence events generated by target occurrence rules or region intersection rules, where the target category is vehicle.
[0059] Events triggered by the continuous occurrence of the target, such as: people continuously staying in the effective area, vehicles continuously staying in the passageway area.
[0060] Events triggered by the target disappearance rule, such as: pigs disappearing from the effective area for a long time, or personnel leaving their posts.
[0061] Through the above sub-steps S41 to S43, the event rule engine completes the key transformation from machine-readable tags to human-understandable and operable business events. The generated pigsty monitoring event objects will be passed to step S5 for further processing.
[0062] The working principle of the tag engine and event engine working together, that is, the complete logical chain from AI recognition results to final event generation, can be found in [link to documentation]. Figure 4 The event algorithm rule engine flowchart shown is as follows: Figure 4 As shown, the AI recognition results first enter the tag engine, which generates tags through parallel matching of multiple rules. Then, the event engine performs rule matching based on these tags, and finally triggers and generates specific AI events, thus clearly demonstrating the complete logical chain from recognition to event triggering.
[0063] Continue to refer to Figure 1 and Figure 2 The intelligent monitoring event recognition method for pigsties provided in this application also includes the following steps: S5 responds to the generation of pigsty monitoring events, extracts video clips before and after the event, and monitors network signal status to choose whether to store the event data and video clips locally or report them to the cloud platform.
[0064] This step, completed collaboratively by the video processing module and the communication and storage control module, is a crucial link in ensuring the integrity of event evidence and the reliability of data transmission. For example... Figure 2 As shown, when the event rules engine generates a pigsty monitoring event, the system immediately triggers the following response process: First, the video processing module starts automatically. Based on the timestamp of the event recorded in the pigsty monitoring event, it precisely extracts a video clip strongly related to the event from the raw video stream that the device is recording or caching. The time range of the extraction is usually configurable; for example, extracting continuous video from 4 seconds before to 6 seconds after the event, for a total duration of 10 seconds, to fully present the cause and effect and immediate state of the event. This video clip is encoded in an efficient format (such as H.265) and saved to local storage.
[0065] Meanwhile, the communication and storage control module is responsible for executing the network-adaptive data reporting strategy. Its core function is to intelligently decide data transmission behavior based on real-time network conditions to ensure data integrity and reliability in pigsty environments where wireless networks are unstable. The decision-making process for the aforementioned 4G and AI collaborative operation can be found in [link to relevant documentation]. Figure 5 . Figure 5This clearly demonstrates how the system continuously monitors RSRP / SINR signal strength and selects a path based on preset thresholds. The specific implementation of this strategy includes the following sub-steps: S51. Monitor the signal quality of the 4G mobile communication network in real time and obtain the reference signal received power and signal-to-noise ratio.
[0066] By periodically sending AT commands to the 4G communication module integrated into the device, the current network signal parameters are queried. Two key indicators are primarily obtained: Reference Signal Receiving Power (RSRP, in dBm) and Signal-to-Interference Plus Noise Ratio (SINR, in dB). These values objectively reflect the signal strength and communication quality of the current 4G link.
[0067] S52. If the received power of the reference signal is lower than the first strength threshold, or the signal-to-noise ratio is lower than the first quality threshold, then proceed to step S53; otherwise, proceed to step S54.
[0068] The system compares the monitored RSRP and SINR values with preset thresholds to make a decision branch. A first strength threshold and a first quality threshold define the boundaries of a weak signal. For example, in a preferred embodiment, the first strength threshold can be set to -110 dBm and the first quality threshold to -3 dB. That is, when RSRP ≤ -110 dBm or SINR ≤ -3 dB, the network signal quality is determined to be poor and insufficient to support reliable real-time data upload, thus switching to a local caching strategy (execute S53). If this weak signal condition is not met (i.e., the signal is still acceptable), the system switches to an immediate reporting strategy (execute S54).
[0069] S53. Store the currently generated pigsty monitoring events and corresponding video clips into the local storage queue, and pause reporting to the cloud platform.
[0070] When a weak signal is detected, the system enters cache mode. The currently generated pigsty monitoring event object (containing all event metadata, target information, and image snapshot paths) and the video clip just captured in step S5 are packaged and stored in a local storage queue on the device's local storage medium (such as an SD card). This queue is typically designed as a first-in, first-out (FIFO) structure and has a capacity management mechanism to prevent storage overflow. At this time, the system enters... Figure 5 As shown in the local storage process, the system suspends reporting operations to the cloud platform, but the crucial core processing flows such as AI recognition, tag matching, and event generation remain completely unaffected and continue to operate normally, ensuring the continuity of monitoring functions.
[0071] S54. Immediately report the pigsty monitoring events and corresponding video clips to the cloud platform. When the detected signal strength and quality are both better than the weak signal threshold, the system determines that the current network condition is good. Therefore, the communication module immediately starts the upload process, and immediately reports the data packets of the pigsty monitoring events and the associated video clips to the cloud platform through the available network channel (4G is used first, and wired network is used as a backup), thereby realizing near real-time remote alarm and recording.
[0072] S55. Continuously monitor the received reference signal power and signal-to-noise ratio (SNR). Regardless of whether the system is in immediate reporting mode or local buffering mode, the communication and storage control module will continuously monitor RSRP and SINR values to dynamically sense changes in the network environment.
[0073] S56. When it is determined that the received power of the reference signal is higher than the second intensity threshold and the signal-to-noise ratio is higher than the second quality threshold, all event data and video clips temporarily stored in the local storage queue are uploaded to the cloud platform in batches.
[0074] During periods of weak signal, the system continues to perform S55 monitoring. For example, in a preferred embodiment, the second strength threshold can be set to -95 dBm, and the second quality threshold can be set to 3 dB. When the network signal is detected to have recovered and stabilized at a good level, i.e., the conditions of RSRP ≥ -95 dBm and SINR ≥ 3 dB are met, the system automatically triggers the resume transmission mechanism. At this time, the module will upload all historical pig farm monitoring event data and their corresponding video clips temporarily stored in the local storage queue to the cloud platform in batches, according to time sequence, ensuring that no critical monitoring data generated during the network interruption is lost.
[0075] Through the closed-loop decision-making and execution process comprised of the aforementioned sub-steps S51 to S56, this invention creatively realizes a collaborative working mechanism between 4G and AI. This enables the intelligent monitoring system to readily address common network instability issues in pigsty environments. While ensuring uninterrupted edge AI analysis, it fundamentally solves the industry pain point of data loss in wireless monitoring scenarios through local caching and delayed transmission strategies, significantly improving the system's deployment adaptability and data reliability in environments without wired networks or with weak networks.
[0076] Further reference Figure 6 As an implementation of the above method, in a second aspect, the present invention provides an embodiment of the structural diagram of an event recognition system 200 for intelligent monitoring of pigsties, which can be specifically applied to various electronic devices. The event recognition system 200 for intelligent monitoring of pigsties includes the following modules: The image acquisition and sampling module 210 is configured to acquire video streams of the pigsty environment and sample them to obtain sampled images. The target recognition processing module 220 is configured to perform target recognition processing on the sampled image to obtain the recognition result, which includes: target category, location coordinates and confidence level, wherein the target category includes pigs, people and vehicles; The label rule engine module 230 is configured to perform label matching processing on the recognition results based on pre-configured label rules to obtain label matching results; the label rule engine module is configured to execute the judgment of at least two of the following rules in parallel or serially: The target occurrence rule judgment unit 231 is configured to determine whether a specified target category appears in the recognition result; The region intersection rule judgment unit 232 is configured to determine whether a specified target category appears and whether the area defined by its location coordinates intersects with a pre-configured monitoring area; wherein, the pre-configured monitoring area includes an effective area for limiting the activity range of pigs and a passageway area for identifying abnormal entry. The target continuous appearance rule judgment unit 233 is configured to judge whether a specified target category appears in multiple consecutive recognition results and continuously meets the set duration. The target disappearance rule judgment unit 234 is configured to judge whether a specified target category disappears in multiple consecutive recognition results and continues to meet a set duration; The event rule engine module 240 is configured to perform event matching based on tag matching results and pre-configured event rules. When a match is successful, a pigsty monitoring event is generated. The pigsty monitoring events include events such as pigs appearing in the aisle area, personnel appearing in the effective area, and vehicles appearing in the monitored area. The communication and storage control module 250 is configured to respond to the generation of pigsty monitoring events, capture video clips before and after the event, and monitor the network signal status to choose whether to store the event data and video clips locally or report them to the cloud platform.
[0077] Thirdly, the present invention proposes an AI monitoring camera, comprising: an image sensor, an AI computing chip, a 4G mobile communication module, a memory, a processor, and a computer program stored in the memory and capable of running on the processor; when the processor executes the computer program, it is used to implement the steps of any of the above-described event recognition methods for intelligent monitoring of pigsties.
[0078] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the above-described methods for intelligent monitoring of pigsties, specifically for event recognition.
[0079] The following is for reference. Figure 7It shows a schematic diagram of the structure of a computer system 300 suitable for implementing electronic devices (such as AI surveillance cameras) in the embodiments of this application. Figure 7 The terminal device or server shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0080] like Figure 7 As shown, the computer system 300 includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 302 or programs loaded from storage section 308 into random access memory (RAM) 303. The RAM 303 also stores various programs and data required for the operation of the computer system 300. The CPU 301, ROM 302, and RAM 303 are interconnected via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0081] The following components are connected to I / O interface 305: an input section 306 including a keyboard, mouse, etc.; an output section 307 including a liquid crystal display (LCD) and speakers, etc.; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN card and a modem, etc. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to I / O interface 305 as needed. A removable medium 311, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 310 as needed so that computer programs read from it can be installed into storage section 308 as needed.
[0082] Specifically, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 309, and / or installed from removable medium 311. When the computer program is executed by central processing unit (CPU) 301, it performs the functions defined in the methods of this application. It should be noted that the computer-readable medium described in this application can be a computer-readable signal medium or a computer-readable medium or any combination thereof. The computer-readable medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, a computer-readable medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. Program code contained on a computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0083] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0084] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0085] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. An event recognition method for intelligent monitoring of pigsties, characterized in that, Includes the following steps: S1. Collect video streams of the pigsty environment and sample them to obtain sampled images; S2. Perform target recognition processing on the sampled image to obtain recognition results, the recognition results including: target category, location coordinates and confidence level, wherein the target category includes pigs, people and vehicles; S3. Perform label matching processing on the recognition results based on pre-configured label rules to obtain label matching results; the label matching processing performs judgments on at least two of the following rules in parallel or serially: S31. Target Occurrence Rule: Determine whether a specified target category appears in the recognition results; S32, Area Intersection Rule: Determine whether a specified target category appears and whether the area defined by its location coordinates intersects with a pre-configured monitoring area; wherein, the pre-configured monitoring area includes an effective area for limiting the activity range of pigs and a passageway area for identifying abnormal entry; S33, Target Persistence Rule: Determine whether a specified target category appears in multiple consecutive recognition results and continues to meet a set duration; S34. Target disappearance rule: Determine whether the specified target category disappears in multiple consecutive recognition results and continues to meet the set duration; S4. Based on the tag matching results, perform event matching according to the pre-configured event rules. When the matching is successful, generate a pigsty monitoring event. The pigsty monitoring event includes events such as pigs appearing in the passageway area, personnel appearing in the effective area, and vehicles appearing in the monitoring area. S5. In response to the generation of the pigsty monitoring event, capture video clips before and after the event, and monitor the network signal status to choose whether to store the event data and the video clips locally or report them to the cloud platform.
2. The event recognition method for intelligent monitoring of pigsties according to claim 1, characterized in that, The method also includes: in step S1, storing the sampled image into a sampling queue; in step S2, obtaining the sampled image from the sampling queue for target recognition processing and storing the obtained recognition result into an inference queue; and in step S3, performing label matching processing on the recognition result obtained from the inference queue based on pre-configured label rules to obtain a label matching result.
3. The event recognition method for intelligent monitoring of pigsties according to claim 1, characterized in that, In step S32, it is determined whether the specified target category appears and whether the area defined by its location coordinates intersects with the pre-configured monitoring area. This includes the following sub-steps: S321. Determine the target bounding box based on the position coordinates in the recognition result; S322. Calculate the geometric intersection area between the target bounding box and a selected area in the pre-configured monitoring area; S323. Determine whether the geometric intersection area is greater than zero and whether the proportion of the selected area exceeds a preset percentage threshold.
4. The event recognition method for intelligent monitoring of pigsties according to claim 1, characterized in that, In step S33, determining whether the specified target category appears in multiple consecutive recognition results and continuously meets the set duration specifically includes the following sub-steps: S331. Maintain an occurrence count counter and a time window for the specified target category; S332. When the specified target category is detected in the continuous recognition results within the time window, the counter is incremented; S333. If the value of the counter reaches or exceeds the preset occurrence threshold when the time window expires, it is determined that the target continuous occurrence rule is satisfied.
5. The event recognition method for intelligent monitoring of pigsties according to claim 1, characterized in that, In step S4, event matching is performed according to the pre-configured event rules, which specifically includes the following sub-steps: S41. Parse the tag matching result and extract one or more event tag codes contained therein; S42. Traverse the pre-configured event rule library and match the event tag code with the trigger tag conditions defined in the event rules; S43. If a match is successful, the pigsty monitoring event containing the event code, event time, target information, and associated media file path is generated according to the matched event rules.
6. The event recognition method for intelligent monitoring of pigsties according to claim 1, characterized in that, In step S4, the pigsty monitoring events include at least one of the following: Personnel appearance events generated by target appearance rules and whose target category is personnel; A pig entry warning event is generated when the region intersection rule is triggered, the target category is pigs, and the monitoring area is the passageway area. An event is generated when a person enters the effective area, triggered by the area intersection rule, with the target category being personnel and the monitoring area being the effective area. Vehicle occurrence events generated by target occurrence rules or region intersection rules, where the target category is vehicle; Events triggered by the continuous occurrence rule of the target include: events in which personnel remain continuously in the effective area and events in which vehicles remain continuously in the passageway area; Events triggered by the target disappearance rule include: pigs disappearing from the effective area for an extended period of time, and personnel leaving their posts.
7. The event recognition method for intelligent monitoring of pigsties according to claim 1, characterized in that, In step S5, monitoring the network signal status to choose whether to store the event data and the video clip locally or report them to the cloud platform specifically includes the following sub-steps: S51. Monitor the signal quality of the 4G mobile communication network in real time and obtain the reference signal received power and signal-to-noise ratio. S52. If the received power of the reference signal is lower than the first strength threshold, or the signal-to-noise ratio is lower than the first quality threshold, then proceed to step S53. Otherwise, proceed to step S54; S53. Store the currently generated pigsty monitoring event and corresponding video clips into the local storage queue, and pause reporting to the cloud platform; S54. Immediately report the pigsty monitoring events and corresponding video clips to the cloud platform; S55. Continuously monitor the received power and signal-to-noise ratio of the reference signal; S56. When it is determined that the received power of the reference signal is higher than the second intensity threshold and the signal-to-noise ratio is higher than the second quality threshold, all event data and video clips temporarily stored in the local storage queue are uploaded to the cloud platform in batches.
8. An event recognition system for intelligent monitoring of pigsties, used to implement the method as described in any one of claims 1 to 7, characterized in that, The system includes: The image acquisition and sampling module is configured to acquire video streams of the pigsty environment and sample them to obtain sampled images. The target recognition processing module is configured to perform target recognition processing on the sampled image to obtain recognition results. The recognition results include: target category, location coordinates, and confidence level, wherein the target category includes pigs, people, and vehicles. The tag rule engine module is configured to perform tag matching processing on the recognition results based on pre-configured tag rules to obtain tag matching results; the tag rule engine module is configured to execute the judgment of at least two of the following rules in parallel or serially: The target occurrence rule judgment unit is configured to determine whether a specified target category appears in the recognition result; The region intersection rule judgment unit is configured to determine whether a specified target category appears and whether the region defined by its location coordinates intersects with a pre-configured monitoring area; wherein, the pre-configured monitoring area includes an effective area for limiting the activity range of pigs and a passageway area for identifying abnormal entry; The target continuous appearance rule judgment unit is configured to determine whether a specified target category appears in multiple consecutive recognition results and continuously meets a set duration. The target disappearance rule judgment unit is configured to determine whether a specified target category disappears in multiple consecutive recognition results and continues to meet a set duration. The event rule engine module is configured to perform event matching based on the tag matching results and according to pre-configured event rules. When a match is successful, a pigsty monitoring event is generated. The pigsty monitoring event includes events such as pigs appearing in the passageway area, personnel appearing in the effective area, and vehicles appearing in the monitoring area. The communication and storage control module is configured to respond to the generation of the pigsty monitoring event, capture video clips before and after the event, and monitor the network signal status to select whether to store the event data and the video clips locally or report them to the cloud platform.
9. An AI surveillance camera, characterized in that, include: Image sensor, AI computing chip, 4G mobile communication module, memory, processor, and computer program stored in the memory and capable of running on the processor; When the processor executes the computer program, it is used to implement the steps of the event recognition method for intelligent monitoring of pigsties as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the event recognition method for intelligent monitoring of pigsties as described in any one of claims 1 to 7.
