City governance event disposal method, device and equipment and storage medium
Through the improved dung beetle optimization algorithm based on graph coloring theory, urban governance events are modeled and optimized, and the problem of inaccurate resource scheduling and decision-making in traditional event handling methods is solved, and the optimal allocation of resources and efficient handling of events is achieved.
Patent Information
- Application Number
- CN202411900785.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-22
AI Technical Summary
When traditional incident handling methods face the complex and changing needs of modern urban governance, they lack effective resource scheduling mechanisms and scientific decision-making mechanisms supported by data, resulting in unreasonable resource allocation and inaccurate decision-making, which affects governance efficiency and security.
Using an improved dung beetle optimization algorithm based on graph coloring theory, we model historical urban governance event data, iteratively optimize the parameters of the graph coloring model, obtain the event handling model, and import real-time data to obtain the optimal treatment method.
It realizes optimal allocation of resources and efficient handling of events, improves the intelligence level of decision-making and the comprehensiveness and accuracy of event handling, and avoids resource mismatch and security risks.
Smart Images

Figure CN119863015A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and storage medium for handling urban governance events. Background Art
[0002] Traditional incident handling methods often expose some obvious drawbacks when facing the complex and ever-changing needs of modern urban governance. On the one hand, traditional handling methods often lack an effective resource scheduling mechanism, resulting in irrational resource allocation. During peak periods, some areas may have excessive concentration of resources, while other areas are short of resources. For example, during holidays or large-scale events, resources such as traffic management and public security maintenance around popular attractions may be seriously insufficient, while other non-hot spots have idle resources, which not only reduces the overall governance efficiency, but also may cause safety hazards due to resource mismatch. On the other hand, traditional incident handling often relies on experience judgment and intuition, and lacks a scientific decision-making mechanism supported by data. When facing emergencies, decision makers may find it difficult to make accurate judgments and decisions due to incomplete information and delayed data updates. For example, in public health events, without a real-time data monitoring and analysis system, it is difficult to quickly assess the development trend and transmission risk of the epidemic, thereby affecting the effectiveness and pertinence of prevention and control measures. Summary of the invention
[0003] Purpose of the invention: To propose a method, device, equipment and storage medium for handling urban governance events, and to optimize the event processing flow through an improved dung beetle optimization algorithm based on graph coloring theory, in order to solve the problem of rapid response and efficient handling of complex and changeable urban or rural events.
[0004] The first aspect of the present invention provides a method for handling urban governance events, comprising the following steps:
[0005] Collect historical city governance event data;
[0006] Modeling the historical city governance event data to obtain a graph coloring model;
[0007] Iterating relevant parameters of the graph coloring model using an improved dung beetle optimization algorithm, adjusting the graph coloring model using optimal parameters after iteration, and obtaining an event handling model;
[0008] Import real-time urban governance event data into the event handling model to obtain the optimal handling method for urban governance events.
[0009] In a further embodiment of the first aspect, there are N number of events to be solved in the graph coloring model, the number of solutions of personnel or organizations is M, the available matrix is L, the benefit matrix is B, the interference matrix is C, and the non-interference matrix is A;
[0010] The available matrix L is expressed as:
[0011] L = {l n,m |l n,m ∈{0,1}} N×M
[0012] In the formula, l n,m Indicates the handling status of the event, with a value of 0 or 1; when l n,m When it is 1, it means that event n is handled by solution m; when l n,m When it is 0, it means that event n cannot be handled by solution m;
[0013] The benefit matrix B is expressed as:
[0014] B = {b n,m} N×M
[0015] Where b n,m It represents the benefit that can be obtained when event n is handled by solution m. n,m When 0 is taken, b n,m is 0.
[0016] In a further embodiment of the first aspect, the interference matrix C is expressed as:
[0017] C={c n,k,m |c n,k,m ∈{0, 1}} N,N,M
[0018] In the formula, C n,k,m Indicates whether there is interference between events n and k when using solution m, and the value is 0 or 1; when c n,k,m When it is 0, it means that there is no interference when events n and k use solution m; when c n,k,m When it is 1, it means there is interference; there is a constraint between the interference matrix C and the available matrix L: c n,k,m ≤l n,m ·l k,m , and when n=k, there is c n,k,m =Il n,m .
[0019] The interference-free matrix A is expressed as:
[0020] A={a n,m |a n,m ∈{0, 1}} N×M
[0021] In the formula, a n,m Indicates whether solution m is assigned to event n, with a value of 0 or 1; n,mWhen it is 0, it means that solution m is not assigned to event n; when a n,m When it is 1, it means that solution m is assigned to event n;
[0022] The constraints that the interference-free matrix A needs to satisfy are:
[0023]
[0024] System Benefits R It is expressed as:
[0025]
[0026] in Represents all benefits generated by resolving event n.
[0027] In a further embodiment of the first aspect, the position update formula of the improved dung beetle optimization algorithm is as follows:
[0028]
[0029] In the formula, x i (t) is the position at the tth moment; x i (t+1) is the position at time t+1 after the update;
[0030] R Levy is the mathematical expression of Levy flight, defined as:
[0031]
[0032] R BM is the mathematical expression of Brownian motion, defined as:
[0033]
[0034] Among them, when λ=1+χ, and 0<χ≤2, μ and v satisfy the normal distribution.
[0035] In a further embodiment of the first aspect, the relevant parameters of the graph coloring model are iterated using an improved dung beetle optimization algorithm, specifically including:
[0036] S1: Initialize the relevant parameters of the graph coloring model: set the initial available solution M, the number of events to be processed N, generate the available matrix L, the benefit matrix B and the interference matrix C, and calculate the system benefit U. R Define the fitness function;
[0037] S2: Initialize optimization algorithm related parameters: set the maximum number of iterations T max , number of runs G, maximum population size Popsize, proportion coefficient of different dung beetles, upper limit of search space U band the lower limit L b And other parameters;
[0038] S3: Population initialization, using the improved Circle chaos map to generate the initial population;
[0039] S4: Calculate the fitness value of each individual in the population, record the best and worst fitness values and the corresponding individual positions;
[0040] S5: updating the position of the rolling dung beetle;
[0041] S6: Use the fitness function to calculate the optimal position of the individual at this time;
[0042] S7: Generate an egg-laying area, update the position of the breeding dung beetles, and repeat step S6;
[0043] S8: Generate a foraging area, update the position of the dung beetle, and repeat step S6;
[0044] S9: Update the position of the thief dung beetle and repeat step S6;
[0045] S10: Update the current population, sort the fitness of all dung beetles, optimize the dung beetles with the lowest fitness, and use the dung beetles with the highest fitness to generate new individuals; repeat step S6;
[0046] S11: Update individual optimal and global optimal positions;
[0047] S12: Determine whether the maximum number of iterations G is reached, if yes, exit the loop; otherwise, repeat steps S5 to S10 in sequence;
[0048] S13: Output the optimal solution and the optimal fitness value.
[0049] In a further embodiment of the first aspect, for the population after each iteration, some individuals with the lowest fitness values are eliminated, individuals with the highest fitness values are retained, and new individuals are regenerated based on the optimal individuals;
[0050] The elimination formula is as follows:
[0051]
[0052] Among them, κ1 and κ2 are random numbers between 0 and 1; ψ is the step size factor, expressed as:
[0053]
[0054] Among them, ψ min and ψ max is a constant; For random individuals.
[0055] The second aspect of the present invention proposes a municipal governance incident handling device for automatically executing the municipal governance incident handling method described in the first aspect. The municipal governance incident handling device includes a collection module, a modeling module, an adjustment module, and an output module.
[0056] The collection module is used to collect historical urban governance event data. The modeling module is used to model the historical urban governance event data to obtain a graph coloring model. The adjustment module uses the improved dung beetle optimization algorithm to iterate the relevant parameters of the graph coloring model, and uses the optimal parameters after iteration to adjust the graph coloring model to obtain an event handling model. The output module is used to import real-time urban governance event data into the event handling model to obtain the optimal handling method for urban governance events.
[0057] According to a third aspect of the present invention, an electronic device is proposed, comprising a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the method for handling urban governance incidents as described in the first aspect is implemented.
[0058] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, in which at least one executable instruction is stored. When the executable instruction is executed on an electronic device, the electronic device executes the method for handling urban governance incidents as described in the first aspect.
[0059] Compared with the prior art, this application has the following beneficial effects:
[0060] (1) Through graph coloring theory modeling, multiple responsible event handling parties are modeled using graph coloring theory, converting complex and abstract real-world problems into simple mathematical problems.
[0061] (2) The original algorithm is improved through improved Circle mapping, optimized regional boundary factors, parameter adaptive adjustment and population fitness optimization.
[0062] (3) Intelligent optimization decision-making mechanism. It can quickly find the optimal solution in complex urban governance events, achieve optimal resource allocation and efficient event handling. This mechanism improves the level of intelligent decision-making and makes resource scheduling more accurate and efficient.
[0063] (4) Iterate through the improved dung beetle optimization algorithm and obtain the optimal solution. Integrate comprehensive analysis of multi-source information. It can integrate multi-source information from different channels for comprehensive analysis, so as to achieve a comprehensive understanding of the incident and rapid response. Avoid the limitations of a single information source and improve the comprehensiveness and accuracy of incident handling. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1It is a flow chart of the method for handling urban governance events in an embodiment of the present invention.
[0065] Figure 2 The figure is an iterative flow chart of improving the dung beetle optimization algorithm in an embodiment of the present invention.
[0066] Figure 3 It is a schematic diagram of the structure of the urban governance event handling device in an embodiment of the present invention. DETAILED DESCRIPTION
[0067] In the following description, a large number of specific details are provided to provide a more thorough understanding of the present invention. However, it is apparent to those skilled in the art that the present invention can be implemented without one or more of these details. In other examples, in order to avoid confusion with the present invention, some technical features known in the art are not described.
[0068] In order to address the shortcomings of existing video recognition solutions, this patent discloses a method for handling urban governance events based on an improved dung beetle optimization algorithm.
[0069] The method first collects historical city governance event data. Then, the historical city governance event data is modeled to obtain a graph coloring model. The improved dung beetle optimization algorithm is used to iterate the relevant parameters of the graph coloring model, and the graph coloring model is adjusted using the optimal parameters after iteration to obtain an event handling model. Finally, the real-time city governance event data is imported into the event handling model to obtain the optimal handling method for city governance events.
[0070] The specific technical solutions are as follows:
[0071] Step 1: Collect historical urban governance event data, model the historical urban governance event data, and obtain a graph coloring model.
[0072] The data used in this patent can be the coordinates of the longitude and latitude of the relevant personnel or institutions in the project of urban governance. For each person or institution that can handle the incident, a model is built through graph coloring theory. The relevant process is as follows: Assuming that there are N incidents that need to be resolved, the number of personnel or institutions to solve is M, the available matrix is L, the benefit matrix is B, the interference matrix is C, and the non-interference matrix is A. The relevant descriptions are as follows:
[0073] The available matrix L is expressed as: L = {l n,m |l n,m ∈{0,1}} N×M , where l n,m Indicates the handling status of the event, and its value is 0 or 1. n,m When it is 1, it means that event n can be handled by solution m; when l n,mWhen it is 0, it means that event n cannot be handled by solution m.
[0074] The benefit matrix B is expressed as B = {b n,m} N×M , where b n,m Indicates the benefits that can be obtained when event n is handled by solution m. n,m When 0 is taken, b n,m is 0.
[0075] The interference matrix C is expressed as C = {c n,k,m |c n,k,m ∈{0,1}} N,N,M , where c n,k,m Indicates whether events n and k interfere with each other when using solution m, and takes a value of 0 or 1. n,k,m When it is 0, it means that there is no interference when events n and k use solution m; when c n,k,m When it is 1, it means there is interference. The interference matrix C and the available matrix L have constraints: c n,k,m ≤l n,m ·l k,m , and when n=k, there is c n,k,m =Il n,m .
[0076] The interference-free matrix A is expressed as A = {a n,m |a n,m ∈{0, 1}} N×M , where a n,m Indicates whether solution m is assigned to event n, and takes the value 0 or 1. n,m When it is 0, it means that solution m is not assigned to event n; when a n,m When it is 1, it means that solution m is assigned to event n. The constraints that A needs to satisfy are:
[0077]
[0078] Total benefit R It is expressed as: in Represents all benefits generated by resolving event n.
[0079] Step 2: Design multiple strategies to improve the dung beetle optimization algorithm
[0080] This application will describe in detail the various improvements to the dung beetle optimization algorithm: improved Circle mapping, optimized regional boundary factors, parameter adaptive adjustment, and population fitness optimization.
[0081] 2.1 Initialization Improvements
[0082] The original algorithm uses random initialization in the initialization phase, which easily causes uneven distribution and falls into local optimality, affecting the convergence speed of the algorithm and ultimately affecting the optimality of the allocation scheme. The present invention makes the following modifications based on Circle mapping:
[0083]
[0084] 2.2 Regional Boundary Factor Optimization
[0085] In the original algorithm, the upper and lower limits of the spawning area and the foraging area change with the convergence factor R, and the size of the boundary is greatly affected by the convergence factor. R is expressed as:
[0086]
[0087] Where t is the current iteration number and T max is the maximum number of iterations. The improved regional boundary factor can conduct a more extensive search of the global feasible area in the early stage, and pay more attention to the local development near the optimal solution in the later stage. The improved regional boundary factor is as follows:
[0088]
[0089] 2.3 Parameter Adaptive Adjustment
[0090] In the original algorithm, the update method of the thief dung beetle tends to perform local search at the optimal position:
[0091] x i (t+1)=X b +S·g·(|x i (t)-X * |+|x i (t)-X b |)
[0092] However, this strategy may cause the dung beetle to quickly assimilate during the iteration process, that is, fall into the local optimum, causing the search to stagnate. From the characteristics of Levy flight and Brownian motion, it can be seen that these two methods cannot achieve global and local search in a single area. However, combining these two strategies can make up for the shortcomings of both. Therefore, the present invention optimizes the position update formula of the dung beetle to:
[0093]
[0094] Among them, R Levy is the mathematical expression of Levy flight, defined as:
[0095]
[0096] Among them, the relationship between parameters χ and λ is: λ=1+χ, and when 0<χ≤2, μ and v satisfy the normal distribution, which is defined as:
[0097]
[0098] Among them, the variance σ μ and σ v They are:
[0099]
[0100] σ υ =1
[0101] R BM is the mathematical expression of Brownian motion, defined as:
[0102]
[0103] In the early iteration, Brownian motion is used to enhance the randomness of the dung beetle search and the diversity of the population, thereby enhancing the algorithm's search location. In the later iteration, Levy flight is used to keep the dung beetles active and able to conduct local and in-depth searches, which has more advantages than uniform random searches.
[0104] 2.4 Population fitness optimization
[0105] For the population after each iteration, some individuals with the lowest fitness values are eliminated, the individuals with the highest fitness values are retained, and new individuals are regenerated based on the optimal individuals. The elimination formula is as follows:
[0106]
[0107] Among them, κ1 and κ2 are random numbers between 0 and 1. ψ is the step size factor, expressed as:
[0108]
[0109] Among them, ψ min and ψ max are constants, taking values of 0.6 and 0.9 respectively. For random individuals.
[0110] Step 3: Iteratively train relevant parameters of the graph coloring model, and use the optimal parameters after iteration to adjust the graph coloring model to obtain an event handling model.
[0111] S3-1: Initialize the relevant parameters of the graph coloring model. Set the initial available solution M, the number of events to be processed N, generate the available matrix L, the benefit matrix B and the interference matrix C, and calculate the system benefit U. R Define the fitness function.
[0112] S3-2: Initialize the optimization algorithm related parameters. Set the maximum number of iterations T max , number of runs G, maximum population size Popsize, proportion coefficient of different dung beetles, upper limit of search space U b and the lower limit L b and other parameters.
[0113] S3-3: Population initialization, using the improved Circle chaos map to generate the initial population.
[0114] S3-4: Calculate the fitness value of each individual in the population, record the best and worst fitness values and the corresponding individual positions.
[0115] S3-5: Update the position of the rolling dung beetle.
[0116] S3-6: Use the fitness function to calculate the optimal position of the individual at this time.
[0117] S3-7: Generate an egg-laying area, update the position of breeding dung beetles, and repeat step S3-6.
[0118] S3-8: Generate a foraging area, update the position of the dung beetle, and repeat step S3-6.
[0119] S3-9: Update the position of the thief dung beetle and repeat step S3-6.
[0120] S3-10: Update the current population, sort the fitness of all dung beetles, optimize the dung beetles with the lowest fitness, and use the dung beetles with the highest fitness to generate new individuals. Repeat step S3-6.
[0121] S3-11: Update individual optimal and global optimal positions.
[0122] S3-12: Determine whether the maximum number of iterations G is reached. If so, exit the loop; otherwise, repeat steps S3-5 to S3-10 in sequence.
[0123] S3-13: Output the optimal solution and the best fitness value.
[0124] Step 4: Import the real-time city governance event data into the event handling model to obtain the optimal handling method for city governance events.
[0125] In addition, see Figure 3 As shown, this embodiment also discloses a city governance event handling device 500, which includes a collection module 501, a modeling module 502, an adjustment module 503, and an output module 504.
[0126] The collection module 501 is used to collect historical urban governance event data. The modeling module 502 is used to model the historical urban governance event data to obtain a graph coloring model. The adjustment module 503 uses the improved dung beetle optimization algorithm to iterate the relevant parameters of the graph coloring model, and uses the optimal parameters after iteration to adjust the graph coloring model to obtain an event handling model. The output module 504 is used to import real-time urban governance event data into the event handling model to obtain the optimal handling method for urban governance events.
[0127] The device can be used to automatically execute the above-mentioned urban governance event handling method, which will not be elaborated here.
[0128] In addition, this embodiment also discloses an electronic device, which includes a processor, a memory, a communication interface and a communication bus. The processor, the memory and the communication interface communicate with each other through the communication bus. The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute all the process steps of the municipal governance event handling method disclosed in the above embodiment, which will not be repeated here.
[0129] The electronic device may also communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may communicate with one or more devices that enable a user to interact with the electronic device, and / or may communicate with any device that enables the electronic device to communicate with one or more other computing devices (e.g., routers, modems, etc.). This communication may be performed through an input / output (I / O) interface. In addition, the electronic device may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) through a network adapter. The network adapter communicates with other modules of the electronic device through a bus. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0130] It should be noted that the above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0131] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0132] As described above, although the present invention has been shown and described with reference to specific preferred embodiments, it should not be construed as limiting the present invention itself. Various changes may be made to it in form and detail without departing from the spirit and scope of the present invention as defined in the appended claims.
Claims
1. A method for handling urban governance events, characterized in that: The steps include: Collect historical city governance event data; Modeling the historical city governance event data to obtain a graph coloring model; Iterating relevant parameters of the graph coloring model using an improved dung beetle optimization algorithm, adjusting the graph coloring model using optimal parameters after iteration, and obtaining an event handling model; Import real-time urban governance event data into the event handling model to obtain the optimal handling method for urban governance events.
2. The method for handling urban governance events according to claim 1 is characterized in that: In the graph coloring model, there are N events that need to be solved, the solution of personnel or organizations is M, the available matrix is L, the benefit matrix is B, the interference matrix is C, and the non-interference matrix is A; The available matrix L is expressed as: L={l n,m |l n,m ∈{0,1}} N×M In the formula, l n,m Indicates the handling status of the event, with a value of 0 or 1; when l n,m When it is 1, it means that event n is handled by solution m; when l n,m When it is 0, it means that event n cannot be handled by solution m; The benefit matrix B is expressed as: B={b n,m } N×M Where b n,m It represents the benefit that can be obtained when event n is handled by solution m. n,m When 0 is taken, b n,m is 0.
3. The method for handling urban governance events according to claim 2 is characterized in that: The interference matrix C is expressed as: C={c n,k,m |c n,k,m ∈{0,1}} N,N,M In the formula, c n,k,m Indicates whether there is interference between events n and k when using solution m, and the value is 0 or 1; when c n,k,m When it is 0, it means that there is no interference when events n and k use solution m; when c n,k,m When it is 1, it means there is interference; there is a constraint between the interference matrix C and the available matrix L: c n,k,m ≤l n,m ·l k,m , and when n = k, there is c n,k,m =ll n,m .
4. The method for handling urban governance events according to claim 2 is characterized in that: The interference-free matrix A is expressed as: A={a n,m |a n,m ∈{0,1}} N×M In the formula, a n,m Indicates whether solution m is assigned to event n, with a value of 0 or 1; n,m When it is 0, it means that solution m is not assigned to event n; when a n,m When it is 1, it means that solution m is assigned to event n; The constraints that the interference-free matrix A needs to satisfy are: System Benefits R It is expressed as: in Represents all benefits generated by resolving event n.
5. The method for handling urban governance events according to claim 4 is characterized in that: The position update formula of the improved dung beetle optimization algorithm is as follows: In the formula, x i (t) is the position at the tth moment; x i (t+1) is the position at time t+1 after the update; R Levy is the mathematical expression of Levy flight, defined as: R BM is the mathematical expression of Brownian motion, defined as: Among them, when λ=1+χ, and 0<χ≤2, μ and v satisfy the normal distribution.
6. The method for handling urban governance events according to claim 5 is characterized in that: The improved dung beetle optimization algorithm is used to iterate the relevant parameters of the graph coloring model, specifically including: S1: Initialize the relevant parameters of the graph coloring model: set the initial available solution M, the number of events to be processed N, generate the available matrix L, the benefit matrix B and the interference matrix C, and calculate the system benefit U. R Define the fitness function; S2: Initialize optimization algorithm related parameters: set the maximum number of iterations T max , number of runs G, maximum population size Popsize, proportion coefficient of different dung beetles, upper limit of search space U b and the lower limit L b And other parameters; S3: Population initialization, using the improved Circle chaos map to generate the initial population; S4: Calculate the fitness value of each individual in the population, record the best and worst fitness values and the corresponding individual positions; S5: updating the position of the rolling dung beetle; S6: Use the fitness function to calculate the optimal position of the individual at this time; S7: Generate an egg-laying area, update the position of the breeding dung beetles, and repeat step S6; S8: Generate a foraging area, update the position of the dung beetle, and repeat step S6; S9: Update the position of the thief dung beetle and repeat step S6; S10: Update the current population, sort the fitness of all dung beetles, optimize the dung beetles with the lowest fitness, and use the dung beetles with the highest fitness to generate new individuals; repeat step S6; S11: Update individual optimal and global optimal positions; S12: Determine whether the maximum number of iterations G is reached, if yes, exit the loop; otherwise, repeat steps S5 to S10 in sequence; S13: Output the optimal solution and the optimal fitness value.
7. The method for handling urban governance events according to claim 6 is characterized in that: For the population after each iteration, some individuals with the lowest fitness values are eliminated, the individuals with the highest fitness values are retained, and new individuals are regenerated based on the optimal individuals; The elimination formula is as follows: Among them, κ1 and κ2 are random numbers between 0 and 1; ψ is the step size factor, expressed as: Among them, ψ min and ψ max is a constant; For random individuals.
8. A city governance event handling device, used to automatically execute the city governance event handling method as described in any one of claims 1 to 7, characterized in that: The urban governance event handling device includes: The collection module is used to collect historical urban governance event data; A modeling module, used to model the historical city governance event data to obtain a graph coloring model; An adjustment module, using an improved dung beetle optimization algorithm to iterate relevant parameters of the graph coloring model, and using the optimal parameters after iteration to adjust the graph coloring model to obtain an event handling model; The output module is used to import real-time urban governance event data into the event handling model to obtain the optimal handling method for urban governance events.
9. An electronic device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the method for handling urban governance incidents as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The storage medium stores at least one executable instruction, and when the executable instruction is executed on an electronic device, the electronic device executes the method for handling urban governance incidents as described in any one of claims 1 to 7.