A city safety monitoring and early warning method and system

Through federated learning and sub-region division technology, the problems of data leakage and cross-regional data sharing difficulties in urban security monitoring are solved, the accuracy and efficiency of urban security monitoring and early warning are improved, and more efficient data collaboration and model optimization are achieved.

CN118278049BActive Publication Date: 2024-09-17JIANGSU SANLENG SMARTCITY&IOT SYST CO LTD

Patent Information

Application Number
CN202410695321.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-09-17
Estimated Expiration
2044-05-31

AI Technical Summary

Technical Problem

Existing urban security monitoring technology has problems with data leakage and difficulty in sharing data across regions, resulting in low accuracy and efficiency of security monitoring and early warning, affecting urban security.

Method used

By obtaining the early warning terminal distribution information of the target city, divide the sub-regions, determine the early warning terminal cluster heads, and conduct model training in each sub-region based on federated learning, output the security monitoring and early warning model, download and iteratively optimize until convergence, and generate global security Monitoring and early warning model, used for urban safety monitoring and early warning.

Benefits of technology

It achieves the protection of data privacy and security, promotes cross-regional data collaboration, improves the model's generalization capabilities and real-time response capabilities, and improves the accuracy and efficiency of urban safety monitoring and early warning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118278049B
    Figure CN118278049B
Patent Text Reader

Abstract

The present application provides a method and system for monitoring and early warning of urban safety, which relates to the field of urban safety monitoring technology. The method includes: obtaining the distribution information of early warning terminals in the target city; dividing into multiple sub-areas; determining the early warning terminal cluster heads in each sub-area; using the early warning terminal cluster heads as the central aggregation server, training the monitoring data of the early warning terminals based on federated learning, and outputting multiple safety monitoring and early warning models corresponding to multiple sub-areas; until multiple safety monitoring and early warning models converge, downloading the converged multiple safety monitoring and early warning models, iteratively optimizing the converged multiple safety monitoring and early warning models using random gradients, and outputting a global safety monitoring and early warning model; and performing safety monitoring and early warning on the target city according to the global safety monitoring and early warning model. The present application can solve the problem of low accuracy and efficiency of urban safety monitoring and early warning in the prior art, and achieve the technical effect of improving the effect of urban safety monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of urban safety monitoring, and in particular to an urban safety monitoring and early warning method and system. Background Art

[0002] With the rapid development of economy and society, the scale of cities continues to expand, and security anomaly monitoring in various fields of cities plays a significant role in urban safety.

[0003] At present, existing urban safety monitoring often requires centralized data collection and processing, which may expose sensitive data to risks, such as data leakage or illegal access, thus causing privacy and security issues. At the same time, it is difficult to achieve cross-regional data sharing. Each region may have its own independent data set, but due to privacy restrictions, it is difficult to integrate the data from each region, resulting in the formation of data islands, which limits the effectiveness of safety monitoring and early warning.

[0004] To sum up, the existing technology has security issues such as data leakage. At the same time, the data combination effect of multiple areas in the city is poor, resulting in low accuracy and efficiency of urban safety monitoring and early warning, which further affects the technical problems of urban safety. Summary of the invention

[0005] The purpose of this application is to provide a city security monitoring and early warning method and system to solve the security problems existing in the prior art due to data leakage, etc. At the same time, the data combination effect of multiple areas in the city is poor, resulting in low accuracy and efficiency of city security monitoring and early warning, further affecting the technical problems of urban safety.

[0006] In view of the above problems, the present application provides a city safety monitoring and early warning method and system.

[0007] In a first aspect, the present application provides a city safety monitoring and early warning method, which is implemented through a city safety monitoring and early warning system, wherein the method includes: obtaining early warning terminal distribution information of the target city; dividing into multiple sub-areas according to the early warning terminal distribution information; determining the early warning terminal cluster head in each sub-area by analyzing each of the multiple sub-areas, wherein each sub-area includes multiple early warning terminals; using the early warning terminal cluster head in each sub-area as a central aggregation server, performing model training on the monitoring data of the early warning terminal belonging to each sub-area based on federated learning, and outputting multiple safety monitoring and early warning models corresponding to the multiple sub-areas; until the multiple safety monitoring and early warning models converge, downloading the converged multiple safety monitoring and early warning models, using stochastic gradient to iteratively optimize the converged multiple safety monitoring and early warning models, and outputting a global safety monitoring and early warning model; performing safety monitoring and early warning on the target city according to the global safety monitoring and early warning model.

[0008] In the second aspect, the present application also provides a city safety monitoring and early warning system for executing a city safety monitoring and early warning method as described in the first aspect, wherein the system includes: an early warning terminal distribution information acquisition module, the early warning terminal distribution information acquisition module is used to obtain the early warning terminal distribution information of the target city; a sub-area division module, the sub-area division module is used to divide a plurality of sub-areas according to the early warning terminal distribution information; an early warning terminal cluster head determination module, the early warning terminal cluster head determination module is used to determine the early warning terminal cluster head in each sub-area by analyzing each of the plurality of sub-areas, wherein each sub-area includes a plurality of early warning terminals; a safety monitoring and early warning model output module, the safety monitoring and early warning model The output module is used to use the early warning terminal cluster head of each sub-area as the central aggregation server, perform model training on the monitoring data of the early warning terminal in each sub-area based on federated learning, and output multiple safety monitoring and early warning models corresponding to the multiple sub-areas; the global safety monitoring and early warning model output module is used to download the converged multiple safety monitoring and early warning models until the multiple safety monitoring and early warning models converge, use stochastic gradient to iteratively optimize the converged multiple safety monitoring and early warning models, and output the global safety monitoring and early warning model; the safety monitoring and early warning module is used to perform safety monitoring and early warning on the target city according to the global safety monitoring and early warning model.

[0009] One or more technical solutions provided in this application have at least the following technical effects or advantages:

[0010] By obtaining the early warning terminal distribution information of the target city; dividing the city into multiple sub-areas according to the early warning terminal distribution information; determining the early warning terminal cluster head in each sub-area by analyzing each of the multiple sub-areas, wherein each sub-area includes multiple early warning terminals; using the early warning terminal cluster head of each sub-area as the central aggregation server, model training is performed on the monitoring data of the early warning terminal in each sub-area based on federated learning, and multiple safety monitoring and early warning models corresponding to the multiple sub-areas are output; until the multiple safety monitoring and early warning models converge, the multiple converged safety monitoring and early warning models are downloaded, and the multiple converged safety monitoring and early warning models are iteratively optimized using stochastic gradients to output a global safety monitoring and early warning model; safety monitoring and early warning are performed on the target city according to the global safety monitoring and early warning model. That is to say, the urban safety monitoring and early warning through federated learning not only protects data privacy and security, but also promotes cross-regional data collaboration, improves the generalization ability and real-time response ability of the model, and finally achieves the technical goal of improving the accuracy and efficiency of urban safety monitoring and early warning, and achieves the technical effect of improving the effect of urban safety monitoring.

[0011] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented according to the contents of the specification, and in order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are specifically cited below. It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easy to understand through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0013] Figure 1 The present invention is a flowchart of a method for urban safety monitoring and early warning for this application.

[0014] Figure 2 The present invention is a structural diagram of a city safety monitoring and early warning system for this application.

[0015] Description of reference numerals:

[0016] Warning terminal distribution information acquisition module 11, sub-area division module 12, warning terminal cluster head determination module 13, safety monitoring and warning model output module 14, global safety monitoring and warning model output module 15, safety monitoring and warning module 16. DETAILED DESCRIPTION

[0017] This application provides a city safety monitoring and early warning method and system, which solves the existing technical problems such as data leakage and the poor effect of combining data from multiple areas of the city, resulting in low accuracy and efficiency of city safety monitoring and early warning, further affecting the city's safety. The technical goal of improving the accuracy and efficiency of city safety monitoring and early warning is achieved, and the technical effect of improving the effect of city safety monitoring is achieved.

[0018] Below, the technical solutions in the present application will be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments of the present application. It should be understood that the present application is not limited to the example embodiments described herein. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application. It should also be noted that, for the convenience of description, only the parts related to the present application are shown in the accompanying drawings, rather than all of them.

[0019] Embodiment 1

[0020] Please refer to the attached Figure 1 The present application provides a city safety monitoring and early warning method, wherein the method is applied to a city safety monitoring and early warning system, and the method specifically comprises the following steps:

[0021] Step 1: Obtain the early warning terminal distribution information of the target city;

[0022] Specifically, the target city is a city to be subject to security monitoring and early warning. The early warning terminal distribution information of the target city is obtained. The early warning terminal distribution information includes the monitoring and early warning distribution information in the fields of transportation, community, fire protection, buildings and industry. For example, the early warning terminal distribution information of the target city is obtained through official channels, emergency management departments or news reports.

[0023] Step 2: Divide into multiple sub-areas according to the early warning terminal distribution information;

[0024] Specifically, the distribution information of early warning terminals is analyzed, including the number, location, coverage and other information of early warning terminals. The distribution information of early warning terminals is visualized by using geographic information systems, etc., so as to more intuitively understand their distribution in the city. The standards for sub-region division are determined based on the coverage and density of early warning terminals, as well as urban terrain, functional zoning and other factors. Among them, areas with similar risk characteristics or early warning needs can be divided into the same sub-region. The divided sub-regions are evaluated to check whether there are early warning blind spots or repeated coverage. The sub-region division is adjusted and optimized based on the evaluation results to ensure that the early warning system can comprehensively and accurately cover the entire target city, thereby obtaining multiple sub-regions.

[0025] Step 3: determining the early warning terminal cluster head in each sub-area by analyzing each of the multiple sub-areas, wherein each sub-area includes multiple early warning terminals;

[0026] Specifically, the configuration information of all early warning terminals in each sub-area is collected. Each sub-area includes multiple early warning terminals. According to the configuration information of the early warning terminals, the features that have an important impact on the performance evaluation are extracted, and the early warning terminal with the greatest impact in each sub-area is selected as the cluster head of the sub-area.

[0027] Step 4: Using the early warning terminal cluster head of each sub-area as the central aggregation server, model training is performed on the monitoring data of the early warning terminal in each sub-area based on federated learning, and multiple security monitoring and early warning models corresponding to the multiple sub-areas are output;

[0028] Specifically, the cluster head of each sub-area, that is, the early warning terminal cluster head, is used as the central aggregation server of the corresponding sub-area. It is ensured that the cluster head has sufficient computing power and storage resources to support the functions of the central aggregation server, including model training, data aggregation and model update. The data in the model training process of each sub-area is collected in real time, and the training complexity index of each sub-area is calculated. The training process of federated learning in multiple sub-areas is compensated according to the training complexity index, that is, the data of the sub-area in multiple sub-areas with different training complexity indexes is transferred to another sub-area. The task monitoring data of multiple early warning terminals in each sub-area is collected. With the early warning terminal cluster head as the center, the task monitoring data of all early warning terminals are aggregated. The aggregated task monitoring data is input into the early warning terminal cluster head for model training. If the loss value of the early warning terminal cluster head tends to be stable, the early warning terminal cluster head converges, and outputs multiple security monitoring and early warning models corresponding to multiple sub-areas.

[0029] Step 5: until the multiple safety monitoring and early warning models converge, download the multiple safety monitoring and early warning models that have converged, iteratively optimize the multiple safety monitoring and early warning models that have converged using stochastic gradient, and output a global safety monitoring and early warning model;

[0030] Specifically, the loss value of the safety monitoring and early warning model of each sub-area is monitored. When the loss function value no longer decreases significantly in multiple consecutive iteration cycles, the model is considered to have converged. If the model is confirmed to have converged, the converged safety monitoring and early warning model of each sub-area is downloaded. The safety monitoring and early warning model is iteratively optimized through the expression of the global safety monitoring and early warning model, and the global safety monitoring and early warning model is output.

[0031] Step 6: Conduct security monitoring and early warning for the target city based on the global security monitoring and early warning model.

[0032] Specifically, real-time monitoring data of the target city is collected and input into the global security monitoring and early warning model for security monitoring and early warning to obtain security monitoring and early warning results.

[0033] The urban safety monitoring and early warning method is applied to an urban safety monitoring and early warning system, which can achieve the technical goal of improving the accuracy and efficiency of urban safety monitoring and early warning, and achieve the technical effect of improving the effect of urban safety monitoring.

[0034] Further, by analyzing each of the multiple sub-areas to determine the early warning terminal cluster head in each sub-area, step three of the present application also includes:

[0035] Obtain the configuration information of each warning terminal in each sub-area;

[0036] Perform feature recognition based on the configuration information of each early warning terminal, and output resource sample storage rate, data processing credibility, and terminal computing power indicators;

[0037] According to the resource sample storage rate, data processing credibility and terminal computing power index, an entropy operator is assigned to each warning terminal in each sub-area, and the entropy operator assignment result is output;

[0038] According to the entropy operator assignment result, the early warning terminal with the largest entropy operator in each sub-area is selected as the cluster head of the sub-area to which it belongs.

[0039] Specifically, the configuration information of all early warning terminals in each sub-area is collected, including the hardware configuration and software configuration of the early warning terminals.

[0040] Then, based on the configuration information of the early warning terminal, the features that have an important impact on the performance evaluation are extracted. These include resource sample storage rate, data processing credibility, and terminal computing power indicators. The resource sample storage rate is used to reflect the terminal storage capacity, the data processing credibility is used to reflect the accuracy and stability of terminal data processing, and the terminal computing power indicator is used to reflect the terminal computing power. The accuracy and reliability of the evaluation results can be ensured by the resource sample storage rate, data processing credibility, and terminal computing power indicators of each early warning terminal.

[0041] Next, the entropy operator is a calculation method used to measure uncertainty and is used to evaluate the comprehensive performance of the early warning terminal. The entropy operator is defined based on the resource sample storage rate, data processing credibility, and terminal computing power indicators. According to the defined entropy operator, each early warning terminal in each sub-area is assigned a value. During the calculation process, the comparability between different indicators is ensured through steps such as weight allocation and normalization.

[0042] Next, according to the entropy operator assignment result, the early warning terminal with the largest entropy operator in each sub-area is selected as the cluster head of the sub-area. The cluster head will be responsible for coordinating and managing other early warning terminals in the sub-area to realize functions such as data collection, processing and transmission.

[0043] By realizing the configuration information collection, feature recognition, entropy operator assignment and cluster head screening of the warning terminal in each sub-area, it provides strong support for subsequent partition security monitoring and warning.

[0044] Furthermore, after obtaining the early warning terminal distribution information of the target city, step one of this application also includes:

[0045] Divide the target city into inner ring urban areas and outer ring urban areas;

[0046] The target city is the union of the inner ring city area and the outer ring city area;

[0047] Establishing an internal-global security monitoring and early warning model for the inner ring urban area;

[0048] Establishing an outer-global safety monitoring and early warning model for the outer ring urban area;

[0049] Based on the internal-global security monitoring and early warning model and the external-global security monitoring and early warning model, the target city is subjected to zoned security monitoring and early warning.

[0050] Specifically, the target city is divided to identify the inner ring city area and the outer ring city area. The inner ring city area refers to the central area of ​​the city, including commercial areas, core residential areas and important public facilities. Among them, the inner ring city area has a high population density, frequent economic activities, and the demand for security monitoring and early warning is particularly prominent. The outer ring city area is the residential, industrial or agricultural area outside the city, with a relatively low population density, but there may also be specific security risks, such as industrial accidents, natural disasters, etc. For example, the division method is obtained through official channels. Furthermore, it is ensured that the union of the inner ring city area and the outer ring city area completely covers the entire target city to avoid monitoring blind spots, that is, the union is the target city.

[0051] Then, historical data and related information are collected based on the characteristics of the inner ring urban area, such as population density, traffic flow, building density, etc. The common types and occurrence patterns of safety risks in the inner ring area are analyzed, such as fires, traffic accidents, public security incidents, etc. Using data analysis, machine learning and other methods, a safety monitoring and early warning model for the inner ring urban area is established to achieve real-time monitoring and early warning of safety risks in the area.

[0052] Next, for the outer ring urban area, collect corresponding data by obtaining characteristics such as industrial layout, natural environment, and population distribution. Analyze the security risks that the outer ring area may face, such as industrial pollution, natural disasters, agricultural accidents, etc. According to the characteristics and risk types of the outer ring area, establish a corresponding security monitoring and early warning model to achieve timely monitoring and early warning of security risks in the area.

[0053] Next, the established internal-global safety monitoring and early warning model and external-global safety monitoring and early warning model will be integrated into the city's safety monitoring and early warning system. The safety monitoring data of each area will be collected and processed in real time, and the model will be used for analysis and prediction. When the safety risk detected exceeds the preset threshold, an early warning signal will be issued to remind relevant departments and personnel to take corresponding measures.

[0054] By dividing the target city into regions and establishing a targeted security monitoring and early warning model, we can achieve regional security monitoring and early warning and improve the city’s security level.

[0055] Furthermore, based on federated learning, model training is performed on the monitoring data of the early warning terminal in each sub-region. Step 4 of this application also includes:

[0056] Real-time monitoring of the model training process dataset in each sub-area;

[0057] Performing training complexity identification on the multiple sub-areas according to the training process data set, and outputting multiple training complexity indicators;

[0058] Generate a regional joint compensation group according to the multiple training complexity indicators, wherein each regional joint compensation group is a compensation group formed by combining a sub-region with a minimum training complexity indicator and a sub-region with a maximum training complexity indicator among the multiple training complexity indicators;

[0059] The regional joint compensation group is used to compensate for the training process of the federated learning of the multiple sub-regions.

[0060] Specifically, the preset monitoring mechanism is used to collect the process data set of the model training process in each sub-area in real time. For example, it includes key indicators of model training, such as training time, number of iterations, loss function value, accuracy, etc. The preset monitoring mechanism can be customized by those skilled in the art according to actual conditions.

[0061] Then, features related to training complexity are extracted from the training process dataset, such as training speed, convergence speed, resource utilization, etc. Based on the extracted features, the training complexity index of each sub-region is calculated to reflect the difficulty of the sub-region in the model training process. For example, the faster the training speed, the lower the training complexity index, and vice versa.

[0062] Next, multiple sub-regions are sorted according to the training complexity index to determine the sub-region with the smallest training complexity and the sub-region with the largest training complexity. The sub-region with the smallest training complexity is paired with the sub-region with the largest training complexity to form a regional joint compensation group, which is used to compensate the sub-region with the larger training complexity by the sub-region with the smaller training complexity.

[0063] Next, multiple sub-regions with different training complexity indicators are determined according to the regional joint compensation group. A data transmission channel is established between the sub-regions. Through the data transmission channel, the relevant data of the early warning terminal in the sub-region is transmitted to another sub-region, thereby compensating the training process of federated learning in multiple sub-regions.

[0064] Real-time monitoring of the model training process of each sub-region, identification of training complexity, and compensation of the federated learning training process based on the regional joint compensation group will help improve the efficiency and quality of model training in each sub-region, and provide more accurate and reliable support for regional safety monitoring and early warning.

[0065] Furthermore, the present application also includes the following steps:

[0066] establishing a data transmission channel according to the regional joint compensation group;

[0067] The data transmission channel is used to compensate the corresponding identification warning terminal in the sub-region with the largest training complexity index to the sub-region with the smallest training complexity index;

[0068] The identified warning terminal is a warning terminal with the shortest transmission distance in the sub-area with the largest training complexity index.

[0069] Specifically, according to the regional joint compensation group, the sub-region with the largest training complexity index and the sub-region with the smallest training complexity index are determined. The network topology between the sub-region with the largest training complexity index and the sub-region with the smallest training complexity index is analyzed to establish a data transmission channel. Among them, the relevant parameters of the channel, such as transmission rate, bandwidth, delay, etc., are configured to ensure the efficiency and real-time performance of data transmission.

[0070] Then, in the sub-area with the largest training complexity index, the warning terminal is screened according to the transmission distance of the warning terminal, and the warning terminal with the smallest transmission distance is selected as the identification warning terminal to ensure that the data transmission of the compensated terminal is better and can participate in federated learning more effectively. Through the data transmission channel, the relevant data of the identification warning terminal, such as model parameters, training data, etc., are compensated to the sub-area with the smallest training complexity index. In the sub-area with the smallest training complexity index, the corresponding access interface and protocol are configured for the received identification warning terminal to ensure that it can smoothly access the model training in the sub-area with the smallest training complexity index. The model parameters are integrated and updated through the data of the identification warning terminal received in the sub-area with the smallest training complexity index, thereby improving the efficiency and effect of model training.

[0071] By compensating the corresponding identification warning terminals in the sub-areas with the largest training complexity index, the efficiency and quality of the overall model training are improved. At the same time, it provides more reliable and efficient technical support for zone safety monitoring and warning.

[0072] Furthermore, based on federated learning, model training is performed on the monitoring data of the early warning terminal in each sub-region. The model training process of this application includes:

[0073] Obtain the mission monitoring data of all early warning terminals in each sub-area;

[0074] Aggregate model training is performed on the monitoring data of all early warning terminals in the early warning terminal cluster of each sub-area, and when the early warning loss of the early warning terminal cluster is less than the preset loss, so that the model is in a convergence state, multiple security monitoring early warning models corresponding to the multiple sub-areas are output;

[0075] Downloading the current gradients of the multiple security monitoring and early warning models to each early warning terminal, and optimizing the local model of each early warning terminal;

[0076] The converged safety monitoring and early warning model gradient is a gradient based on balanced monitoring data, wherein the balanced monitoring data is data whose ratio between normal monitoring data and abnormal monitoring data used for training reaches a preset balanced ratio.

[0077] Specifically, in each sub-area, the task monitoring data of all early warning terminals are collected in real time or regularly through the network interface or data interface of the early warning terminal, including, for example, sensor readings, event logs, images and videos, etc.

[0078] Then, in each sub-area, the task monitoring data of all warning terminals are aggregated with the warning terminal cluster head as the center. For example, data encryption transmission, distributed storage and other technologies are used to ensure data security and privacy. The aggregated task monitoring data is input into the warning terminal cluster head for model training. Among them, the aggregated task monitoring data is divided into monitoring training data and monitoring verification data. The division ratio is customized by technical personnel in this field according to actual conditions. For example, the division ratio of monitoring training data and monitoring verification data is 7:3. Further, when the output of the warning terminal cluster head tends to be stable after the warning terminal cluster head is trained by monitoring training data, the output loss rate of the warning terminal cluster head is verified by monitoring verification data. If the output loss rate of the warning terminal cluster head is less than the preset loss threshold, it means that the output accuracy of the warning terminal cluster head is high, and the warning terminal cluster head has reached a convergence state, and then the training can be stopped, and the trained warning terminal cluster head is output as multiple security monitoring and warning models corresponding to multiple sub-areas.

[0079] Next, the current gradient information of the converged safety monitoring and early warning model is downloaded to each early warning terminal. For example, it is implemented through network transmission to ensure that each terminal can obtain the gradient information. Each early warning terminal optimizes the local model according to the downloaded gradient information. For example, it is implemented by gradient descent, etc. to improve the performance of the local model. Further, during the model training process, the ratio of normal monitoring data and abnormal monitoring data used for training is monitored, that is, the balanced monitoring data. Further, the preset balance ratio is the ratio between normal monitoring data and abnormal monitoring data as the preset balance ratio, that is, the ratio at 0.5, indicating that the abnormal monitoring data reaches twice the normal monitoring data. If the ratio between normal monitoring data and abnormal monitoring data in the gradient of the converged safety monitoring and early warning model does not reach the gradient of the balanced monitoring data, the converged safety monitoring and early warning model gradient is normal, and multiple early warning terminals are output.

[0080] By obtaining the task monitoring data of all early warning terminals in each sub-area, aggregate model training is performed, local models are optimized, and the balance of model training data is ensured, thereby outputting multiple security monitoring and early warning models.

[0081] Further, the converged multiple safety monitoring and early warning models are iteratively optimized using stochastic gradient to output a global safety monitoring and early warning model. Step five of this application also includes:

[0082] The expression is as follows:

[0083] ;

[0084] in, For the The global safety monitoring and early warning model obtained by rounds of iterations is For the The global safety monitoring and early warning model obtained by rounds of iterations is is the total number of early warning terminal cluster heads in the target urban area, For the The monitoring data participating in the training in the early warning terminal cluster head, is the monitoring data set of all early warning terminal cluster heads participating in the training. For the Round and The model loss of the global safety monitoring and early warning model in the round, For the first The nth warning terminal cluster head in the iteration round corresponds to the updated parameters of the security monitoring and warning model.

[0085] Specifically, calculate the The monitoring data participating in the training in the early warning terminal cluster head The monitoring data set of all early warning terminal cluster heads participating in the training and calculate the ratio of Round and The product of the model loss of the global safety monitoring and early warning model in the round. Among them, For the first The nth warning terminal cluster head in the iteration corresponds to the updated parameters of the security monitoring warning model, and updates the corresponding monitoring data through the updated parameters. The global safety monitoring and early warning model obtained by rounds of iteration Add the above product to get The global safety monitoring and early warning model obtained by rounds of iteration . Wherein, k, n and N are integers greater than or equal to 1. Further, if the model loss of the global safety monitoring and early warning model in each round of iteration is lower, the global safety monitoring and early warning model finally obtained is more accurate, otherwise, the error is greater.

[0086] The global safety monitoring and early warning model is calculated through the expression of the global safety monitoring and early warning model to further improve the performance of the global model.

[0087] In summary, the urban safety monitoring and early warning method provided by this application has the following technical effects:

[0088] By obtaining the early warning terminal distribution information of the target city; dividing the city into multiple sub-areas according to the early warning terminal distribution information; determining the early warning terminal cluster head in each sub-area by analyzing each of the multiple sub-areas, wherein each sub-area includes multiple early warning terminals; using the early warning terminal cluster head of each sub-area as the central aggregation server, model training is performed on the monitoring data of the early warning terminal in each sub-area based on federated learning, and multiple safety monitoring and early warning models corresponding to the multiple sub-areas are output; until the multiple safety monitoring and early warning models converge, the multiple converged safety monitoring and early warning models are downloaded, and the multiple converged safety monitoring and early warning models are iteratively optimized using stochastic gradients to output a global safety monitoring and early warning model; safety monitoring and early warning are performed on the target city according to the global safety monitoring and early warning model. That is to say, the urban safety monitoring and early warning through federated learning not only protects data privacy and security, but also promotes cross-regional data collaboration, improves the generalization ability and real-time response ability of the model, and finally achieves the technical goal of improving the accuracy and efficiency of urban safety monitoring and early warning, and achieves the technical effect of improving the effect of urban safety monitoring.

[0089] Embodiment 2

[0090] Based on the same inventive concept as the city safety monitoring and early warning method in the aforementioned embodiment, the present application also provides a city safety monitoring and early warning system, please refer to the attached Figure 2 , the system comprising:

[0091] An early warning terminal distribution information acquisition module 11, wherein the early warning terminal distribution information acquisition module 11 is used to acquire early warning terminal distribution information of a target city;

[0092] A sub-region division module 12, the sub-region division module 12 is used to divide a plurality of sub-regions according to the early warning terminal distribution information;

[0093] An early warning terminal cluster head determination module 13, the early warning terminal cluster head determination module 13 is used to determine the early warning terminal cluster head in each sub-area by analyzing each of the multiple sub-areas, wherein each sub-area includes multiple early warning terminals;

[0094] A safety monitoring and early warning model output module 14, wherein the safety monitoring and early warning model output module 14 is used to use the early warning terminal cluster head of each sub-area as a central aggregation server, perform model training on the monitoring data of the early warning terminal in each sub-area based on federated learning, and output multiple safety monitoring and early warning models corresponding to the multiple sub-areas;

[0095] A global safety monitoring and early warning model output module 15, wherein the global safety monitoring and early warning model output module 15 is used to download the converged multiple safety monitoring and early warning models until the multiple safety monitoring and early warning models converge, iteratively optimize the converged multiple safety monitoring and early warning models using stochastic gradient, and output a global safety monitoring and early warning model;

[0096] The safety monitoring and early warning module 16 is used to perform safety monitoring and early warning on the target city according to the global safety monitoring and early warning model.

[0097] Further, the early warning terminal cluster head determination module 13 in the system is also used for:

[0098] Obtain the configuration information of each warning terminal in each sub-area;

[0099] Perform feature recognition based on the configuration information of each early warning terminal, and output resource sample storage rate, data processing credibility, and terminal computing power indicators;

[0100] According to the resource sample storage rate, data processing credibility and terminal computing power index, an entropy operator is assigned to each warning terminal in each sub-area, and the entropy operator assignment result is output;

[0101] According to the entropy operator assignment result, the early warning terminal with the largest entropy operator in each sub-area is selected as the cluster head of the sub-area to which it belongs.

[0102] Furthermore, the early warning terminal distribution information acquisition module 11 in the system is also used for:

[0103] Divide the target city into inner ring urban areas and outer ring urban areas;

[0104] The target city is the union of the inner ring city area and the outer ring city area;

[0105] Establishing an internal-global security monitoring and early warning model for the inner ring urban area;

[0106] Establishing an outer-global safety monitoring and early warning model for the outer ring urban area;

[0107] Based on the internal-global security monitoring and early warning model and the external-global security monitoring and early warning model, the target city is subjected to zoned security monitoring and early warning.

[0108] Furthermore, the safety monitoring and early warning model output module 14 in the system is also used for:

[0109] Real-time monitoring of the model training process dataset in each sub-area;

[0110] Performing training complexity identification on the multiple sub-areas according to the training process data set, and outputting multiple training complexity indicators;

[0111] Generate a regional joint compensation group according to the multiple training complexity indicators, wherein each regional joint compensation group is a compensation group formed by combining a sub-region with a minimum training complexity indicator and a sub-region with a maximum training complexity indicator among the multiple training complexity indicators;

[0112] The regional joint compensation group is used to compensate for the training process of the federated learning of the multiple sub-regions.

[0113] Furthermore, the safety monitoring and early warning model output module 14 in the system is also used for:

[0114] establishing a data transmission channel according to the regional joint compensation group;

[0115] The data transmission channel is used to compensate the corresponding identification warning terminal in the sub-region with the largest training complexity index to the sub-region with the smallest training complexity index;

[0116] The identified warning terminal is a warning terminal with the shortest transmission distance in the sub-area with the largest training complexity index.

[0117] Furthermore, the global safety monitoring and early warning model output module 15 in the system is also used for:

[0118] Obtain the mission monitoring data of all early warning terminals in each sub-area;

[0119] Aggregate model training is performed on the monitoring data of all early warning terminals in the early warning terminal cluster of each sub-area, and when the early warning loss of the early warning terminal cluster is less than the preset loss, so that the model is in a convergence state, multiple security monitoring early warning models corresponding to the multiple sub-areas are output;

[0120] Downloading the current gradients of the multiple security monitoring and early warning models to each early warning terminal, and optimizing the local model of each early warning terminal;

[0121] The converged safety monitoring and early warning model gradient is a gradient based on balanced monitoring data, wherein the balanced monitoring data is data whose ratio between normal monitoring data and abnormal monitoring data used for training reaches a preset balanced ratio.

[0122] Furthermore, the safety monitoring and early warning model output module 14 in the system is also used for:

[0123] The expression is as follows:

[0124] ;

[0125] in, For the The global safety monitoring and early warning model obtained by rounds of iterations is For the The global safety monitoring and early warning model obtained by rounds of iterations is is the total number of early warning terminal cluster heads in the target urban area, For the The monitoring data participating in the training in the early warning terminal cluster head, is the monitoring data set of all early warning terminal cluster heads participating in the training. For the Round and The model loss of the global safety monitoring and early warning model in the round, For the first The nth warning terminal cluster head in the iteration round corresponds to the updated parameters of the security monitoring and warning model.

[0126] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The city safety monitoring and early warning method and specific examples in the aforementioned embodiment 1 are also applicable to a city safety monitoring and early warning system in this embodiment. Through the aforementioned detailed description of a city safety monitoring and early warning method, those skilled in the art can clearly know a city safety monitoring and early warning system in this embodiment, so for the sake of brevity of the specification, it will not be described in detail here. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0127] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

[0128] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application belong to the scope of the present application and its equivalent technology, the present application is also intended to include these modifications and variations.

Claims

1. A city safety monitoring and early warning method, characterized in that: The method comprises: Obtain the early warning terminal distribution information of the target city; Divide into multiple sub-areas according to the early warning terminal distribution information; Determine the early warning terminal cluster head in each sub-area by analyzing each of the multiple sub-areas, wherein each sub-area includes multiple early warning terminals; Using the early warning terminal cluster head of each sub-area as a central aggregation server, model training is performed on the monitoring data of the early warning terminal in each sub-area based on federated learning, and multiple security monitoring and early warning models corresponding to the multiple sub-areas are output; Until the multiple safety monitoring and early warning models converge, download the multiple converged safety monitoring and early warning models, use stochastic gradient to iteratively optimize the multiple converged safety monitoring and early warning models, and output a global safety monitoring and early warning model; Performing security monitoring and early warning on the target city according to the global security monitoring and early warning model; Among them, random gradient is used to iteratively optimize multiple converged safety monitoring and early warning models, and the global safety monitoring and early warning model is output. The expression is as follows: ; in, For the The global safety monitoring and early warning model obtained by rounds of iterations is For the The global safety monitoring and early warning model obtained by rounds of iterations is is the total number of early warning terminal cluster heads in the target urban area, For the The monitoring data participating in the training in the early warning terminal cluster head, is the monitoring data set of all early warning terminal cluster heads participating in the training. For the Round and The model loss of the global safety monitoring and early warning model in the round, For the first The nth warning terminal cluster head in the iteration round corresponds to the updated parameters of the security monitoring and warning model.

2. The method according to claim 1, characterized in that By analyzing each of the multiple sub-areas, determining the early warning terminal cluster head in each sub-area, the method includes: Obtain the configuration information of each warning terminal in each sub-area; Perform feature recognition based on the configuration information of each early warning terminal, and output resource sample storage rate, data processing credibility, and terminal computing power indicators; According to the resource sample storage rate, data processing credibility and terminal computing power index, an entropy operator is assigned to each warning terminal in each sub-area, and the entropy operator assignment result is output; According to the entropy operator assignment result, the early warning terminal with the largest entropy operator in each sub-area is selected as the cluster head of the sub-area to which it belongs.

3. The method according to claim 1, characterized in that After obtaining the early warning terminal distribution information of the target city, the method further includes: Divide the target city into inner ring urban areas and outer ring urban areas; The target city is the union of the inner ring city area and the outer ring city area; Establishing an internal-global security monitoring and early warning model for the inner ring urban area; Establishing an outer-global safety monitoring and early warning model for the outer ring urban area; Based on the internal-global security monitoring and early warning model and the external-global security monitoring and early warning model, the target city is subjected to zoned security monitoring and early warning.

4. The method according to claim 1, characterized in that Based on federated learning, model training is performed on the monitoring data of the early warning terminal in each sub-region. The method includes: Real-time monitoring of the model training process dataset in each sub-area; Performing training complexity identification on the multiple sub-areas according to the training process data set, and outputting multiple training complexity indicators; Generate a regional joint compensation group according to the multiple training complexity indicators, wherein each regional joint compensation group is a compensation group formed by combining a sub-region with a minimum training complexity indicator and a sub-region with a maximum training complexity indicator among the multiple training complexity indicators; The regional joint compensation group is used to compensate for the training process of the federated learning of the multiple sub-regions.

5. The method according to claim 4, characterized in that Compensating the training process of the federated learning of the plurality of sub-regions by using the regional joint compensation group includes: establishing a data transmission channel according to the regional joint compensation group; The data transmission channel is used to compensate the corresponding identification warning terminal in the sub-region with the largest training complexity index to the sub-region with the smallest training complexity index; The identified warning terminal is a warning terminal with the shortest transmission distance in the sub-area with the largest training complexity index.

6. The method according to claim 1, characterized in that Based on federated learning, model training is performed on the monitoring data of the early warning terminal in each sub-region. The model training process includes: Obtain the mission monitoring data of all early warning terminals in each sub-area; Aggregate model training is performed on the monitoring data of all early warning terminals in the early warning terminal cluster of each sub-area, and when the early warning loss of the early warning terminal cluster is less than the preset loss, so that the model is in a convergence state, multiple security monitoring early warning models corresponding to the multiple sub-areas are output; Downloading the current gradients of the multiple security monitoring and early warning models to each early warning terminal, and optimizing the local model of each early warning terminal; The converged safety monitoring and early warning model gradient is a gradient based on balanced monitoring data, wherein the balanced monitoring data is data whose ratio between normal monitoring data and abnormal monitoring data used for training reaches a preset balanced ratio.

7. A city safety monitoring and early warning system, characterized in that: For implementing the steps of the method according to any one of claims 1 to 6, the system comprises: An early warning terminal distribution information acquisition module, wherein the early warning terminal distribution information acquisition module is used to acquire early warning terminal distribution information of a target city; A sub-region division module, the sub-region division module is used to divide a plurality of sub-regions according to the early warning terminal distribution information; An early warning terminal cluster head determination module, the early warning terminal cluster head determination module is used to determine the early warning terminal cluster head in each sub-area by analyzing each of the multiple sub-areas, wherein each sub-area includes multiple early warning terminals; A safety monitoring and early warning model output module, wherein the safety monitoring and early warning model output module is used to use the early warning terminal cluster head of each sub-area as a central aggregation server, perform model training on the monitoring data of the early warning terminal in each sub-area based on federated learning, and output multiple safety monitoring and early warning models corresponding to the multiple sub-areas; A global safety monitoring and early warning model output module, wherein the global safety monitoring and early warning model output module is used to download the converged multiple safety monitoring and early warning models until the multiple safety monitoring and early warning models converge, iteratively optimize the converged multiple safety monitoring and early warning models using stochastic gradient, and output the global safety monitoring and early warning model; A safety monitoring and early warning module is used to perform safety monitoring and early warning on the target city according to the global safety monitoring and early warning model.

Citation Information

Patent Citations

  • Smart city monitoring image recognition method based on data quality evaluation federated learning

    CN116246218A

  • Prognosis prediction and early warning model training method, system and equipment based on super network and federated learning

    CN116992980A

  • Urban dam piping danger advanced early warning method and system

    CN117787686A

  • Urban resource dynamic scheduling method and system based on digital economy

    CN118037000A

Cited By

  • New energy vehicle charging pile multi-dimensional data fusion monitoring and early warning method and system

    CN121515803A