Overwater law enforcement supervision intelligent early warning system and method based on early warning model

Through streaming data processing technology and data caching technology based on early warning model, real-time generation of early warning information in water law enforcement supervision and instant update of early warning rules is achieved, and the problems of difficult update and slow generation of early warning matching rules in the existing technology are solved, and the flexibility and efficiency of the early warning system are improved.

CN119807619APending Publication Date: 2025-04-11HAIHUA ELECTRONICS ENTERPRISECHINA CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411886834.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

In the existing water law enforcement supervision, early warning matching rules are difficult to update, ship warning generation is slow, and the problem of real-time update and iteration of early warning rules has not been effectively solved.

Method used

The streaming data processing technology based on the early warning model is adopted to analyze massive ship-perceived data through flexible definitions, and efficient pattern matching is achieved using streaming data processing and data caching technology, generate early warning information in real time, and real-time update and iteration of early warning rules are achieved by monitoring the incremental log of the database.

Benefits of technology

It effectively improves the flexibility of update and iteration of early warning model and the real-time generation of early warning information, solves the problem of real-time update and iteration of early warning rules, and improves the execution efficiency and accuracy of model matching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807619A_ABST
    Figure CN119807619A_ABST
Patent Text Reader

Abstract

The invention discloses a water law enforcement supervision intelligent early-warning system and method based on an early-warning model, and the system comprises the steps: setting early-warning model data elements and early-warning conditions through an early-warning model management module, carrying out the publishing of the early-warning model, and generating the definition data of the early-warning model; the model injection module obtains an early warning model operation increment log, analyzes an early warning model increment change log, establishes a model condition parameter and an early warning model definition file, forms an early warning model object and stores the early warning model object in a state cache of the streaming data processing module; the stream data processing module is used for reading the ship target sensing data from the message middleware message queue, and performing early warning matching calculation on all the ship sensing data and the early warning model to obtain a matching result of the ship target and the early warning model; and the real-time early warning module outputs ship early warning information based on the early warning model ID of the matching result and the corresponding ship MMSI number. According to the method, the flexibility of updating iteration of the early warning model and the real-time performance of early warning information generation can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of water supervision and early warning technology, and in particular to an intelligent early warning system and method for water law enforcement supervision based on an early warning model. Background Art

[0002] At present, most of the water law enforcement supervision uses manual inspection and fixed rule matching to detect abnormal data and target early warning. This model has problems such as low efficiency and prone to errors, difficulty in updating matching rules, and difficulty in law enforcement evidence collection.

[0003] Many existing solutions are focused on solving the problem of intelligent ship warning, mainly based on rule engines for pattern matching and ship warning. However, considering the number of ships traveling on busy waterways, ship perception data comes from data sources such as radar and AIS, and the target data is updated frequently. Very few technologies can solve the problem of real-time warning of massive ship perception data. At the same time, combined with the needs of water law enforcement and the current status of water supervision, ship warning rules require frequent updates and adjustments, and few technologies can solve the problem of real-time updating and iteration of warning rules. Summary of the invention

[0004] In order to overcome the defects and shortcomings of the prior art, the present invention provides an intelligent early warning system and method for water law enforcement supervision based on an early warning model. The present invention analyzes the massive perception data of ships through flexibly defined multiple models, utilizes streaming data processing and data caching technology to achieve efficient pattern matching, generates early warning information in real time, and automatically pushes the matched early warning information of ships suspected of violating laws and regulations to the corresponding regulatory unit department; at the same time, by monitoring and parsing the database incremental log technology, any modifications to the early warning model can be captured in real time, thereby realizing instant updating and iteration of the early warning rules.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions:

[0006] The present invention provides an intelligent early warning system for water law enforcement and supervision based on an early warning model, comprising: an early warning area setting module, an early warning model management module, a target perception data access module, a message middleware, a model injection module, a stream data processing module, and a real-time early warning module;

[0007] The warning area setting module is used to set the warning area based on the electronic nautical chart;

[0008] The warning model management module is used to set the warning model data elements and warning conditions, publish the warning model, generate the warning model definition data, send the warning model definition data to the message middleware, and update the warning model data object in the state cache of the stream processing framework;

[0009] The model injection module is used to obtain the early warning model operation incremental log from the message middleware, parse the early warning model incremental change log, establish model condition parameters and early warning model definition files, and form an early warning model object to be stored in the state cache of the stream data processing module;

[0010] The stream data processing module is used to read the ship target perception data from the message middleware message queue, perform warning matching calculation on all the ship perception data and the warning model, and obtain the matching result between the ship target and the warning model;

[0011] The real-time warning module is used to output ship warning information based on the warning model ID of the matching result and the corresponding ship MMSI number.

[0012] As a preferred technical solution, the warning model management module is also used to add, modify, delete, and publish ship warning models, and send the warning model incremental change log to the message middleware;

[0013] For newly added models, the model synthesis function is used to add the definition of the new model to the state data environment of the stream processing module;

[0014] For deleting a model, remove the model according to the model name;

[0015] For modifying the model, the method of first deleting the model and then adding a new model is adopted.

[0016] As a preferred technical solution, the stream data processing module is used to read the ship target perception data from the message middleware message queue, and perform warning matching calculation on all ship perception data and the warning model, specifically including:

[0017] The stream data processing module is provided with an early warning matching calculation engine, which transmits the ship perception data to multiple stream processing operators, and the stream processing operators process the matching calculation of the ship target data and the early warning model in parallel to generate a model matching result.

[0018] As a preferred technical solution, the stream processing operator processes the matching calculation of the ship target data and the early warning model in parallel, specifically including:

[0019] Each processing operator receives a ship target data from the message queue, obtains the warning condition list in the warning model, and performs different processing on a single warning condition according to the condition type. After a single warning condition is matched and calculated to obtain a logical value of true or false, the logical relationship between the warning condition combinations in the model is judged, and the matching result between the ship target and the warning model is obtained by calculation.

[0020] As a preferred technical solution, the stream data processing module uses the Flink framework to implement stream data processing, parallelizes the processing tasks into multiple operators, and multiple processing operators form an execution chain to optimize the data analysis process.

[0021] As a preferred technical solution, a persistent data storage module and / or a cache data storage module is also provided. The persistent data storage module is used to store all ship archive data, and the cache data storage module is used to store matching calculation data, including: early warning model data, ship archive data, and ship behavior aggregation data. The ship archive data and ship behavior aggregation data are cached on demand and are placed in the cache when the matching calculation is called.

[0022] As a preferred technical solution, the cache data storage module adopts a distributed memory database based on Redis for storage, and sets a cache elimination mechanism to eliminate cold data and save hot data. After each cache read, the insertion time of the cache data read under a single condition of a single ship target is updated, and expired cache data is deleted.

[0023] The present invention provides an intelligent early warning method for water law enforcement supervision based on an early warning model, which is provided with the above-mentioned intelligent early warning system for water law enforcement supervision based on an early warning model. The method comprises the following steps:

[0024] Set warning areas based on electronic charts;

[0025] Use the expression grammar definer to generate warning conditions of expression grammar, and form a warning model through logical combination;

[0026] Obtain the ship target perception data in the warning area and obtain the warning model set from the state cache of the stream processing framework;

[0027] Perform warning matching calculation on the ship perception data and the warning model to obtain the matching result between the ship target and the warning model;

[0028] Based on the warning model ID of the matching result and the corresponding ship MMSI number, the ship warning information is output.

[0029] As a preferred technical solution, the warning conditions include operands, operators and operation functions, and the warning conditions are divided into ship archive attribute conditions, ship behavior attribute conditions and ship behavior aggregation conditions.

[0030] As a preferred technical solution, when judging a single warning condition in the warning model, the current value of each operand and the operation value of the operation function are first obtained, and then the operator is compared to obtain the Boolean value of the warning condition;

[0031] When the warning condition type is the ship file attribute condition, the ship file attribute data and the index are used for value comparison;

[0032] When the warning condition type is a ship behavior attribute condition, the ship's perception dynamic data and indicators are used for value comparison or logical judgment;

[0033] When the warning condition type is a ship behavior aggregation condition, the ship behavior aggregation data is obtained from the data cache according to the ship name or MMSI number, the ship behavior aggregation data is updated after being accumulated with the currently calculated ship dynamic data, and the updated ship behavior aggregation data is used for comparison or judgment.

[0034] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0035] (1) The present invention adopts a technical solution of streaming data processing based on the warning model, which solves the technical problems of the existing technology that the warning matching rules are difficult to update and the ship warning generation speed is slow, and effectively improves the flexibility of the warning model update iteration and the real-time generation of warning information.

[0036] (2) The present invention sets a cache to store the queried ship target archive data and the calculated ship behavior aggregation data, and sets a cache elimination mechanism to eliminate cold data and save hot data, thereby improving the execution efficiency and accuracy of model matching.

[0037] (3) The present invention adopts the technology of monitoring the incremental log of the database, monitoring the database log of the early warning model data storage, parsing and obtaining the operations of the early warning model data table, so as to capture any modification of the model (new creation, deletion, activation, deactivation) in real time, and send the early warning model incremental change log to the message middleware, and update the early warning model data object cached in the stream data processing in real time, which effectively solves the problem of real-time update and iteration of early warning rules. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 It is a schematic diagram of the architecture of the intelligent early warning system for water law enforcement and supervision based on the early warning model of the present invention;

[0039] Figure 2 A schematic diagram of the data architecture of the early warning model of the present invention;

[0040] Figure 3 It is a flow chart of the intelligent early warning method for water law enforcement and supervision based on the early warning model of the present invention. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0042] Example 1

[0043] like Figure 1 As shown, this embodiment provides an intelligent early warning system for water law enforcement supervision based on an early warning model, the system comprising: an early warning area setting module, an early warning model management module, a target perception data access module, a message middleware, a model injection module, a stream data processing module, a real-time early warning module, a persistent data storage module, and a cache data storage module;

[0044] In this embodiment, the warning area setting module is used to set the warning area based on the electronic nautical chart. The set warning area is associated with the regulatory unit department, and the warning occurring in the designated area is automatically pushed to the corresponding regulatory unit department;

[0045] In this embodiment, the warning model management module provides a Web form to set the warning model, add, modify, delete, and publish the ship warning model. The model setting form supports the definition of the warning model name, model priority, model type, warning disposal unit, and warning conditions; it supports flexible combination of warning conditions, such as whether to turn on AIS, whether to enter or pass through a specific area, whether to be on the blacklist, the number of behavior repetitions, etc., so that users can adjust the model according to the actual situation and improve the accuracy of the model;

[0046] In the early warning model management module, first customize the model through the Web front-end page, set the early warning model data elements and early warning conditions, publish the model, generate the early warning model definition data, store it in the Mysql database, and send the early warning model definition data to the message middleware, and dynamically update the early warning model data objects in the state cache of the stream processing framework.

[0047] The early warning model management module supports hot deployment of early warning models. After taking the running early warning model offline, reset the parameter values ​​of the early warning model, and then put the early warning model online. The modified early warning model takes effect immediately. The modification and deployment of the model does not require shutting down the system, and does not affect the operation of other early warning models in the system. The modified model can take effect immediately after deployment.

[0048] In this embodiment, for the hot update part of the warning model, the module management module captures any modification to the model (new creation, deletion, activation, deactivation) in real time by monitoring the incremental log of the Mysql database, and sends the incremental change log of the warning model to the message middleware. The model injection module obtains the incremental log of the warning model operation from the message middleware, and first parses the message to determine the required operation, such as adding, deleting or modifying the model. For the newly added model, the model synthesis function is directly used to add the definition of the new model to the state data (state) environment of the stream processing module; for the deleted model, the specific model is removed according to the model name; for the modified model, the method of deleting first and then adding is adopted. The hot update mechanism ensures that the warning matching calculation engine can respond to model changes in real time, so as to adapt to dynamic warning needs without interrupting services.

[0049] In this embodiment, the target perception data access module is used to access the real-time perception data of ships, such as ship target radar data, ship target AIS data, and target data after the fusion of ship radar and AIS, etc., among which, the ship fusion target data is the fusion of radar data and AIS data of the same ship target, and radar data and AIS data are ship data that cannot be fused. The three types of ship real-time perception data all contain the real-time latitude and longitude position, speed, bow direction and other information of the ship target. The accessed ship perception data is pushed to the message middleware, and the stream data processing module performs subsequent warning matching calculation processing.

[0050] In this embodiment, the resident process of the message middleware is used to collect real-time perception data of ship targets, early warning model definition data and early warning model operation increment logs. The process provides the collected data to message consumers for real-time processing according to different topics.

[0051] In this embodiment, the model injection module is used to parse the early warning model incremental change log, and establish model condition parameters and early warning model definition files, and further form early warning model objects, which are stored in the state cache of the stream data processing module;

[0052] In this embodiment, the stream data processing module reads the ship target perception data from the message middleware message queue, and performs warning matching calculation on all the ship perception data and the warning model. The warning matching calculation engine passes the ship perception data to multiple stream processing operators to process the matching calculation of the ship target data and the warning model in parallel to generate a model matching result.

[0053] Specifically, the processing operators of the early warning matching calculation engine process the matching calculation of ship target data and early warning models in parallel. Each processing operator receives a ship target data from the message queue and matches it with the early warning model in the cache. When the processing operator performs specific matching calculation, it first obtains the early warning condition list of the model, and performs different processing on a single early warning condition according to the condition type: if the early warning condition is a ship archive attribute condition, the archive attribute is associated from the data cache for comparison and judgment; if the early warning condition is a ship behavior attribute condition, the dynamic real-time data and indicators in the ship perception data are directly used for value comparison; if the early warning condition is a behavior aggregation condition, the accumulated data of ship behavior over a period of time is used for comparison and judgment. After a single early warning condition is matched and calculated to obtain a logical value of true or false, the "and, or, or not" relationship of the early warning condition combination in the model is judged, and the matching result of the ship target and the early warning model is obtained by calculation. The model matching calculation result includes the ship MMSI number of the ship perception data and the matching early warning model ID.

[0054] In this embodiment, the stream data processing module uses the Flink framework to implement stream data processing, perform real-time analysis on massive data, and provide data support. Flink is a unified computing framework that combines batch processing and stream processing, and provides a stream data processing engine for data distribution and parallel computing. The stream data processing module parallelizes the processing tasks into multiple operators, and multiple processing operators are strung together to form an execution chain to optimize the data analysis process.

[0055] In this embodiment, the real-time warning module uses the matching calculation results output by the warning matching calculation engine to automatically generate ship warning information according to the warning model ID and the corresponding ship MMSI number in the matching results, and automatically pushes the ship warning information to the corresponding law enforcement and supervision department personnel according to the warning disposal department defined by the warning model. The warning information content mainly includes: warning name, warning information description, Chinese name of the suspected ship, MMSI number, warning time and warning location, among which the Chinese name of the ship, MMSI number, warning time and warning location are obtained from the Chinese name of the ship, MMSI number, data update time and longitude and latitude position attribute data of the ship target object, and the warning information name and warning information description are obtained from the warning model name and model description attribute information of the matched warning model.

[0056] In this embodiment, the persistent data storage module stores all ship archive data, which can be stored in a relational database such as GBase;

[0057] In actual water law enforcement supervision, the ship target data collected by the sensing device is often very large, and a large amount of calculations need to be completed, which seriously affects the execution efficiency of model matching. This embodiment sets a cache data storage module to store matching calculation data, including early warning model data, ship archive data, and ship behavior aggregation data. Basically, the early warning matching calculation is completed in the memory, and there is no need to query the background database, which greatly improves the execution efficiency of model matching; at the same time, the ship archive data and ship behavior aggregation data are cached on demand, and a large amount of ship archives and behavior aggregation data are not placed in the cache at the time of initialization. Only when the matching calculation needs to use the ship data, it is put into the cache, which is convenient for the subsequent matching calculation and greatly reduces the amount of data cached by the system. The significance of adding a cache data storage module in this embodiment: a large amount of ship archive data may be shared by different early warning conditions. Once a model early warning condition queries the ship archive data from the background database storage once, the ship archive data can be cached and repeatedly used by multiple model condition calculations; because the ship behavior aggregation data requires a large amount of statistical aggregation calculations, the same ship behavior aggregation data is repeatedly triggered and calculated, and the result of the first calculation can be reused.

[0058] Specifically, the cache data storage module can use a distributed memory database based on Redis for storage. The cache management module also sets up a cache elimination mechanism to eliminate cold data and save hot data. After each cache read, the cache data under a single condition of a single ship target is updated to update the insertion time of this cache data and delete expired cache data. The cache management module has a configurable size (number of key-value pairs) and a configurable survival time (TTL). When the cache reaches maximum capacity, the system should delete the least recently used items (LRU) to make room for new items.

[0059] This embodiment is designed for cache validity. Assuming that the cache result C1 has a range of t1-t3 and the cache result C2 has a range of t5-t7, the cache data is valid when the conditional ranges are similar to the following ranges:

[0060] Condition interval 1: t1–t7, then the query interval is: cache result C1+t3->t7+cached result C2;

[0061] Condition interval 2: t0–t4, then the query interval is: t0->t1+cached result C1+t3->t4;

[0062] Condition interval 3: t5–t10, then the query interval is: cache result C2+t7->t10.

[0063] Example 2

[0064] like Figure 3As shown, this embodiment provides an intelligent early warning method for water law enforcement supervision based on an early warning model, which is provided with the intelligent early warning system for water law enforcement supervision based on an early warning model of the above-mentioned embodiment 1. The method realizes access to perception data such as ship radar target data, AIS data, and fusion data, establishes multiple ship early warning models according to actual business needs, and performs matching calculations on the ship perception data and the early warning conditions of the early warning model, and generates ship early warning information in real time according to the matching results. The method specifically includes the following steps:

[0065] S1: Set warning areas based on electronic nautical charts. Specifically, set the scope of the supervision warning area corresponding to the supervision unit department according to the law enforcement and supervision needs;

[0066] S2: Define the ship warning model. First, set the warning conditions. Define the ship warning conditions based on the suspected illegal and irregular behavior patterns of ships summarized in daily law enforcement and supervision. For the warning situation of a single condition, use the expression grammar definer to generate the warning conditions of the expression grammar.

[0067] In this embodiment, the warning condition is composed of operands, operators and operation functions, where the operands can be constants, variables and runtime variables. Constants are those that will not change once the warning condition is defined; variables vary according to different warning models and need to be initialized when the warning model is initialized; runtime variables correspond to a certain attribute of the ship target entity. Operators are mainly comparison operations, mainly "equal to", "less than", "greater than", "not equal to", "not less than", "not greater than", and the special "point is within the area". The operation function is the calculation formula of the operand, mainly "SUMIF", "MAX", etc.

[0068] In this embodiment, the warning conditions can be divided into three categories based on application requirements: the first is the ship archive attribute condition, which uses the archive static data of the ship target as the condition for triggering the ship warning. For example, if a warning is generated when the ship certificate expires, the warning condition generated by the expression grammar definer is "$Date-${S.cert}>1800". Among them, the operand $Date is the current date, which is assigned when the warning model is initialized; the operand ${S.cert} is the ship certificate date, which is the attribute value corresponding to the ship target at runtime; the operand 1800 is a constant, which is the indicator threshold for certificate expiration; the second is the ship behavior attribute condition. The real-time dynamic characteristics of the ship target are used as the conditions for the suspected violation of the ship. If a warning is generated when the ship target enters or passes through a specific area, the warning condition generated by the expression grammar definer is "${S.pos}==[(22.726275, 113.649358), (22.731183, 113.67218), ...]". Among them, the operand ${S.pos} is the ship position, which is the real-time dynamic attribute value corresponding to the ship target at runtime; the operator == is used to determine whether the trajectory point is located in a specific area; the operand [(22.726275, 113.649358), ...] is a constant, which is the specified area range; the third is the ship behavior aggregation condition. The behavior characteristics of the ship target within a certain period of time are used as the conditions for the suspected violation of the ship target. For example, if the ship target shuts down the AIS multiple times within 30 minutes to generate an early warning, the early warning condition generated by the expression syntax definer is SUMIF (${S.shut}, "time<=30")>5. Among them, the operation function SUMIF sums the operands that meet the conditions, and the condition "time<=30" is within 30 minutes; the operand ${S.shut} is the ship's AIS shutdown behavior, which is the behavior characteristic data of the ship target at runtime; the operand 5 is a constant, which is the indicator threshold for the number of times the ship target shuts down the AIS.

[0069] In this embodiment, the ship warning conditions are flexibly combined through "and", "or" and "not" logic combinations to form a warning model. When the warning conditions are combined, the logic combination priority can be changed through brackets.

[0070] like Figure 2 As shown, the data structure of the early warning model is represented in Json format to facilitate model matching. The early warning model data structure includes model data elements and early warning condition combinations. Model data elements include model name, model type, early warning priority, model matching push supervision unit department, etc.; early warning condition combinations include early warning condition lists. For a single early warning condition, it includes condition id, early warning condition type, condition matching mode, operand list, early warning condition combination form (and, or, not), etc.

[0071] In this embodiment, the definition data of the early warning model is read from the database storage during initialization, and after the early warning model object is generated, it is stored in the state cache of the stream processing framework;

[0072] In this embodiment, model management supports hot deployment of early warning models. When the early warning model is added, modified, or deleted, after the updated deployment of the model takes effect, the backend Mysql database generates an incremental operation log of the early warning model data table. Model management listens to the Mysql database binary log file binlog through Canal, and can obtain every Insert / Update / Delete script executed by the database, as well as the data before and after the modification. When the log data changes, the model management parses the incremental log of the early warning model metadata, and takes different processing according to the type of early warning model update, synchronously updates the early warning model and early warning conditions cached in the state, and realizes dynamic control of the model. For newly added models, the early warning model object is directly generated and added to the state cache environment of the stream processing framework; for deleted models, the specific model is removed from the state cache according to the model name; for modified models, the method of deleting first and then adding is adopted.

[0073] S3: The stream data processing framework (Flink) obtains the ship perception data from the message queue and associates the ship archive data from the data cache according to the ship name or MMSI number, including:

[0074] S31: The stream data processing module subscribes to the ship perception data from the message queue and obtains the real-time perception data of the ships in the supervision area.

[0075] S32: The stream data processing module associates the ship file attribute data from the cache management according to the ship name or MMSI number in the ship target perception data. The ship file data is static attribute data, and together with the ship's dynamic perception data, it constitutes the complete attribute data of the ship target. The ship file attributes include the ship name, ship MMSI number, ship type, ship nationality, length, ship width, tonnage, etc.; the ship dynamic attributes include the ship speed, the longitude, latitude, bow direction of the ship's position, data update time, etc.

[0076] In this embodiment, if the ship archive attribute data cannot be obtained from the cache management according to the ship name or MMSI, the ship archive data is queried from the background database storage; at the same time, the ship MMSI number is used as the key value, and the queried ship archive data is stored in the cache management, so that the ship archive attribute data can be directly obtained from the cache management according to the ship MMSI number later;

[0077] S33: Get the warning model set from the state cache of the stream processing framework.

[0078] S4: The warning matching engine matches the ship perception data with the warning model.

[0079] In this embodiment, the warning matching engine performs matching calculations on the ship target perception data and the warning models in the model set one by one. The matching of the ship perception data and the warning model is actually a comparison and judgment of the ship data and the warning conditions in the model one by one. After the single warning condition is matched and calculated to obtain a logical value of true or false, it is combined and calculated through the AND or NOT logical relationship of the conditions in the warning condition combination to obtain the logical value of the warning model.

[0080] In this embodiment, the judgment of a single warning condition first obtains the current value of each operand and the operation value of the operation function, and then performs operator comparison to obtain the Boolean value of the warning condition. When judging the warning condition, the warning condition judgment is divided into two categories: value comparison and logical judgment. The logical value of the warning condition is true or false.

[0081] When judging a single early warning condition, when the early warning condition type is a ship file attribute condition, the ship file attribute data and indicators are directly used for value comparison. For example, when the early warning condition is "the nationality of the ship is foreign", the ship attribute nationality is compared to see whether it is a non-Chinese ship.

[0082] When the warning condition type is a ship behavior attribute condition, the ship's dynamic data and indicators are used for value comparison or logical judgment. For example, if the warning condition is "ship speeding", compare whether the ship's attribute speed is greater than the specified speed value; if the warning condition is "entering or passing through a specific area", judge whether the longitude and latitude of the ship's attribute position is within the specified area interval.

[0083] When the warning condition type is a ship behavior aggregation condition, the ship behavior aggregation data is obtained from the data cache according to the ship name or MMSI number. Ship behavior aggregation data refers to the cumulative data of ship navigation behavior within a certain time interval, such as the number of stays in the regulatory area in one day, the number of AIS shutdowns within 3 hours, etc. The ship behavior aggregation data is updated after accumulation with the current calculated ship dynamic data, and the updated ship behavior aggregation data is used for comparison or judgment. If the warning condition is "the number of AIS shutdowns within 30 minutes", the matching calculation first obtains the cumulative number of AIS shutdowns of the ship in the previous 30 minutes from the data cache, and then calculates whether the AIS is turned off in the current ship perception data, and updates the ship's behavior aggregation value after accumulation, and then compares and matches the updated number of AIS shutdowns within 30 minutes with the index value. At the same time, the ship MMSI+"-"+"SUM" is used as the key value to store in the cache management, so that the ship aggregation behavior data can be directly obtained from the cache according to the ship MMSI+"-"+"SUM" later.

[0084] S5: Generate ship warning information in real time. According to the true or false logical value calculated by the warning model matching in the previous step, judge whether the ship target meets all the warning conditions in the warning model. For the warning models that match, according to the priority of the warning model, ship warning information is generated for the warning model with high priority first. When generating ship warning information, the ship warning information content is automatically generated according to the warning information content template and pushed to the user of the supervision unit corresponding to the warning model.

[0085] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.

Claims

1. An intelligent early warning system for water law enforcement and supervision based on an early warning model, characterized in that: include: Warning area setting module, warning model management module, target perception data access module, message middleware, model injection module, stream data processing module, real-time warning module; The warning area setting module is used to set the warning area based on the electronic nautical chart; The warning model management module is used to set the warning model data elements and warning conditions, publish the warning model, generate the warning model definition data, send the warning model definition data to the message middleware, and update the warning model data object in the state cache of the stream processing framework; The model injection module is used to obtain the early warning model operation incremental log from the message middleware, parse the early warning model incremental change log, establish model condition parameters and early warning model definition files, and form an early warning model object to be stored in the state cache of the stream data processing module; The stream data processing module is used to read the ship target perception data from the message middleware message queue, perform warning matching calculation on all the ship perception data and the warning model, and obtain the matching result between the ship target and the warning model; The real-time warning module is used to output ship warning information based on the warning model ID of the matching result and the corresponding ship MMSI number.

2. The intelligent early warning system for water law enforcement and supervision based on the early warning model according to claim 1 is characterized in that: The warning model management module is also used to add, modify, delete, and publish ship warning models, and send the warning model incremental change log to the message middleware; For newly added models, the model synthesis function is used to add the definition of the new model to the state data environment of the stream processing module; For deleting a model, remove the model according to the model name; For modifying the model, the method of first deleting the model and then adding a new model is adopted.

3. The intelligent early warning system for water law enforcement and supervision based on the early warning model according to claim 1 is characterized in that: The stream data processing module is used to read the ship target perception data from the message middleware message queue, and perform warning matching calculation on all the ship perception data and the warning model, specifically including: The stream data processing module is provided with an early warning matching calculation engine, which transmits the ship perception data to multiple stream processing operators, and the stream processing operators process the matching calculation of the ship target data and the early warning model in parallel to generate a model matching result.

4. The intelligent early warning system for water law enforcement and supervision based on the early warning model according to claim 1 is characterized in that: The stream processing operator processes the matching calculation of the ship target data and the early warning model in parallel, specifically including: Each processing operator receives a ship target data from the message queue, obtains the warning condition list in the warning model, and performs different processing on a single warning condition according to the condition type. After a single warning condition is matched and calculated to obtain a logical value of true or false, the logical relationship between the warning condition combinations in the model is judged, and the matching result between the ship target and the warning model is obtained by calculation.

5. The intelligent early warning system for water law enforcement and supervision based on the early warning model according to claim 1 is characterized in that: The stream data processing module uses the Flink framework to implement stream data processing, parallelizes the processing tasks into multiple operators, and multiple processing operators form an execution chain to optimize the data analysis process.

6. The intelligent early warning system for water law enforcement and supervision based on the early warning model according to claim 1 is characterized in that: A persistent data storage module and / or a cache data storage module are also provided. The persistent data storage module is used to store all ship archive data, and the cache data storage module is used to store matching calculation data, including: early warning model data, ship archive data, and ship behavior aggregation data. The ship archive data and ship behavior aggregation data are cached on demand and are put into the cache when the matching calculation is called.

7. The intelligent early warning system for water law enforcement and supervision based on the early warning model according to claim 1 is characterized in that: The cache data storage module adopts a distributed memory database based on Redis for storage, and sets a cache elimination mechanism to eliminate cold data and save hot data. After each cache read, the insertion time of the cache data under a single condition of a single ship target is updated, and expired cache data is deleted.

8. An intelligent early warning method for water law enforcement supervision based on an early warning model, characterized in that: An intelligent early warning system for water law enforcement and supervision based on an early warning model as described in any one of claims 1 to 7 is provided, and the method comprises the following steps: Set warning areas based on electronic charts; Use the expression grammar definer to generate warning conditions of expression grammar, and form a warning model through logical combination; Obtain the ship target perception data in the warning area and obtain the warning model set from the state cache of the stream processing framework; Perform warning matching calculation on the ship perception data and the warning model to obtain the matching result between the ship target and the warning model; Based on the warning model ID of the matching result and the corresponding ship MMSI number, the ship warning information is output.

9. The intelligent early warning method for water law enforcement and supervision based on the early warning model according to claim 8 is characterized in that: The early warning conditions include operands, operators and operation functions, and the early warning conditions are divided into ship archive attribute conditions, ship behavior attribute conditions and ship behavior aggregation conditions.

10. The intelligent early warning method for water law enforcement and supervision based on early warning model according to claim 9 is characterized in that: When judging a single warning condition in the warning model, first obtain the current value of each operand and the operation value of the operation function, then perform operator comparison to obtain the Boolean value of the warning condition; When the warning condition type is the ship file attribute condition, the ship file attribute data and the index are used for value comparison; When the warning condition type is a ship behavior attribute condition, the ship's perception dynamic data and indicators are used for value comparison or logical judgment; When the warning condition type is a ship behavior aggregation condition, the ship behavior aggregation data is obtained from the data cache according to the ship name or MMSI number, the ship behavior aggregation data is updated after being accumulated with the currently calculated ship dynamic data, and the updated ship behavior aggregation data is used for comparison or judgment.