A method for generating a police patrol route, an electronic device, and a readable storage medium

The police patrol route generation model is constructed through deep learning algorithms, and the softmax loss function is used for optimization, which solves the problem of police patrol route planning dependence in the existing technology, and improves patrol efficiency and the accuracy of output results.

CN115730751BActive Publication Date: 2025-03-11HAINA CLOUD IOT TECH CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210611828.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-31
Publication Date
2025-03-11
Estimated Expiration
2042-05-31

AI Technical Summary

Technical Problem

The planning of police patrol routes in the prior art relies on experience and lack of data support, resulting in a decrease in patrol efficiency.

Method used

A deep learning algorithm is used to build a police patrol route generation model, train it through historical data, and optimize the model using softmax loss function to improve the robustness and accuracy of the output results.

Benefits of technology

By leveraging the advantages of historical data, algorithm optimization is achieved, the accuracy and robustness of the output results of the police patrol route generation model are improved, and patrol efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115730751B_ABST
    Figure CN115730751B_ABST
Patent Text Reader

Abstract

The present invention provides a method for generating a police patrol route, comprising: constructing a first sample data set, the first sample data set including specific historical data of different time periods within a patrol range; constructing a police patrol route generation model based on a deep learning algorithm; using the first sample data set, training the police patrol route generation model based on a softmax loss function to obtain a trained police patrol route generation model. The present invention constructs a police patrol route generation model by adopting a deep learning algorithm, which can give play to the advantages of historical data big data and achieve algorithm optimization. Moreover, the use of a softmax loss function to train the police patrol route generation model can minimize the distance between data distributions in similar geographical locations and similar time periods, thereby mapping data of different modalities to similar hidden space regions, thereby improving the robustness and accuracy of the output results of the police patrol route generation model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer technology, and in particular, relates to a method for generating a police patrol route, an electronic device, and a readable storage medium. Background Art

[0002] As an indispensable technical means for social public security, security prevention plays an important role in social security protection. In security prevention, police patrols can not only effectively prevent and stop crimes, but also reduce police operation costs and improve police execution efficiency. In the process of police force dispatch and patrol, it is an important requirement to reasonably allocate police force and plan appropriate patrol routes. At present, the planning of appropriate patrol routes for police force is entirely based on human experience, without data basis, resulting in reduced patrol efficiency.

[0003] In view of this, the present invention is proposed. Summary of the invention

[0004] The technical problem to be solved by the present invention is to overcome the deficiencies in the prior art and provide a method for generating a police patrol route, which aims to construct a police patrol route generation model by adopting a deep learning algorithm, which can give full play to the advantages of historical data big data and achieve algorithm optimization. And by adopting a softmax loss function to train the police patrol route generation model, the distance between data distributions in similar geographical locations and similar time periods can be minimized, so that data of different modes are mapped to similar hidden space areas, and the robustness and accuracy of the output results of the police patrol route generation model are improved.

[0005] In order to solve the above technical problems, the basic concept of the technical solution adopted by the present invention is:

[0006] The present invention provides a method for generating a police patrol route, comprising:

[0007] Constructing a first sample data set, wherein the first sample data set includes specific historical data of different time periods within the patrol range;

[0008] Construct a police patrol route generation model based on deep learning algorithms;

[0009] The police patrol route generation model is trained using the first sample data set based on a softmax loss function to obtain a trained police patrol route generation model.

[0010] In some implementations, constructing a first sample data set includes:

[0011] Collecting the specific historical data, wherein the specific historical data includes at least one of the alarm data of key personnel, vehicle flow data, and pedestrian flow data;

[0012] Inputting the specific historical data into a preset encoder for encoding to obtain encoded data;

[0013] The encoded data is shuffled in a preset data shuffling manner to generate the first sample data set.

[0014] In some implementations, the encoding lengths of the encoders are the same, and the encoders encode according to the time period, geographic coordinates, data category, and data value contained in the specific historical data.

[0015] In some implementations, shuffling the encoded data using a preset data shuffling method includes:

[0016] The encoded data of multiple data categories are taken as a whole and shuffled in time series so that the encoded data are not arranged in time order.

[0017] In some implementations, the police patrol route generation model uses a single-layer MLP as a mapping head function and Relu as a fully connected layer.

[0018] In some implementations, training the police patrol route generation model based on a softmax loss function to obtain a trained police patrol route generation model includes:

[0019] Pre-training the police patrol route generation model based on a softmax loss function to obtain a pre-trained model of the police patrol route generation model;

[0020] constructing a second sample data set, wherein the second sample data set includes the urgency of police force demand;

[0021] The pre-trained model is trained using the second sample data set based on a classification loss function to obtain a trained police patrol route generation model.

[0022] In some embodiments, the classification loss function uses a cross entropy loss function.

[0023] In some implementations, after obtaining the trained police patrol route generation model, the generation method further includes:

[0024] Constructing a third sample data set, wherein the third sample data set includes at least one of historical police situation data of different time periods within the patrol range, historical police patrol area data, police patrol martial law level data, and police force data;

[0025] According to the third sample data set, obtaining police force input data in different time periods and distribution heat maps of patrol key areas in different time periods;

[0026] The patrol route for each time period is obtained by combining the output results of the police patrol route generation model with the police force input data and the patrol key area distribution heat map.

[0027] An electronic device comprising: a processor; and

[0028] A memory is communicatively connected to the processor, wherein the memory stores a program executable by the processor, and when the program is executed by the processor, the processor is able to execute the method for generating a police patrol route as described above.

[0029] A readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for generating a police patrol route as described above is implemented.

[0030] After adopting the above technical scheme, the present invention has the following beneficial effects compared with the prior art.

[0031] 1. By using deep learning algorithms to build a police patrol route generation model, we can take advantage of historical data and big data to achieve algorithm optimization.

[0032] 2. By using the softmax loss function to train the police patrol route generation model, the distance between data distributions in similar geographical locations and similar time periods can be minimized, so that data of different modalities are mapped to similar latent space areas, thereby improving the robustness and accuracy of the output results of the police patrol route generation model.

[0033] 3. By combining the softmax loss function and the cross entropy loss function, the robustness and accuracy of the output results of the police patrol route generation model can be further improved.

[0034] 4. Combine different historical data with the time dimension to form relevant data, and use historical data to extract derivative data through data analysis methods to make the data dimension richer and more realistic.

[0035] 5. By integrating multi-dimensional reference information, a timely dispatch and command model is formed, which can be used as a reference for the command center to deploy police forces.

[0036] The specific implementation modes of the present invention are further described in detail below in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The accompanying drawings are part of the present invention and are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but do not constitute an improper limitation of the present invention. Obviously, the accompanying drawings described below are only some embodiments. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0038] Figure 1 It is a flowchart of a method for generating a police patrol route provided by an embodiment of the present invention;

[0039] Figure 2 is a flowchart of step S110 provided in an embodiment of the present invention;

[0040] Figure 3 is a flowchart of step S130 provided in an embodiment of the present invention;

[0041] Figure 4 is a schematic diagram of a neural network structure provided by an embodiment of the present invention;

[0042] Figure 5 is a schematic diagram of an electronic device provided by an embodiment of the present invention;

[0043] Figure 6 is a schematic diagram of an electronic device provided by another embodiment of the present invention.

[0044] It should be noted that these drawings and textual descriptions are not intended to limit the conceptual scope of the present invention in any way, but are intended to illustrate the concept of the present invention for those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The following embodiments are used to illustrate the present invention but are not used to limit the scope of the present invention.

[0046] In the description of the present invention, it should be noted that the directions or positional relationships indicated by terms such as “upper”, “lower”, “front”, “back”, “left”, “right”, “vertical”, “inside” and “outside” are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as a limitation on the present invention.

[0047] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0048] The present invention provides a method for generating a police patrol route, comprising: constructing a first sample data set, wherein the first sample data set includes specific historical data of different time periods within a patrol range; constructing a police patrol route generation model based on a deep learning algorithm; using the first sample data set, training the police patrol route generation model based on a softmax loss function to obtain a trained police patrol route generation model. In the above scheme, by constructing a police patrol route generation model using a deep learning algorithm, the advantages of historical data big data can be brought into play and algorithm optimization can be achieved. Moreover, by using a softmax loss function to train the police patrol route generation model, the distance between data distributions in similar geographical locations and similar time periods can be minimized, thereby mapping data of different modalities to similar hidden space areas, thereby improving the robustness and accuracy of the output results of the police patrol route generation model.

[0049] Figure 1 FIG. 2 is a schematic diagram showing a method for generating a police patrol route according to an embodiment of the present invention. Figure 1 As shown, the method for generating a police patrol route includes the following steps:

[0050] S110, constructing a first sample data set, wherein the first sample data set includes specific historical data of different time periods within a patrol range;

[0051] S120, constructing a police patrol route generation model based on a deep learning algorithm; and

[0052] S130. Using the first sample data set, the police patrol route generation model is trained based on a softmax loss function to obtain a trained police patrol route generation model.

[0053] It should be understood that the steps shown in the method for generating a police patrol route are not exclusive, and the method for generating a police patrol route may also include additional steps not shown and / or may omit the steps shown, and the scope of the present invention is not limited in this respect. Figure 2 To Attachment Figure 5 The above steps S110 to S130 are further described.

[0054] S110

[0055] In some embodiments, Figure 2 As shown, constructing the first sample data set in step S110 includes:

[0056] S111, collecting the specific historical data, wherein the specific historical data includes at least one of the alarm data of key personnel, vehicle flow data, and pedestrian flow data;

[0057] S112, inputting the specific historical data into a preset encoder for encoding to obtain encoded data;

[0058] S113: Use a preset data shuffling method to shuffle the encoded data to generate the first sample data set.

[0059] Specifically, if Figure 4 As shown, in step S111, at least one of the alarm data, vehicle flow data, and pedestrian flow data of key personnel in different time periods within the patrol range is collected.

[0060] Then in step S112, an encoder is used to encode the above data. Exemplarily, the encoder can be set to an encoding rule with a fixed and identical encoding length, and the contents are respectively the time period, geographical coordinates, data category, and data value. In this way, information of different modes has a unified input format, which is convenient for subsequent training.

[0061] Among them, the data categories, i.e. the alarm data of key personnel, vehicle flow data, and human flow data mentioned above, can be represented in a digital form to represent different data categories, for example, the alarm data of key personnel is represented as "1", the vehicle flow data is represented as "2", and the human flow data is represented as "3". It is understandable that the data categories can also be represented in other forms.

[0062] The data value may be, for example, a cumulative summed value within the time period.

[0063] In an optional manner, in order to further enhance the distribution convergence during the training process of the police patrol route generation model, a normalization method can be used to normalize the above-mentioned specific historical data to the range of 0-1.

[0064] Then, in step S113, the above data is shuffled so that the data is no longer arranged in chronological order. In an optional manner, the above three types of data are shuffled as a whole. The purpose of this is to allow the subsequently trained police patrol route generation model to focus more on the relationship between the data, that is, the discrete correlation distribution between the alarm data of key personnel, vehicle flow data, pedestrian flow data and geographical location, and time period, and the deep learning algorithm will not learn the changing trend of the data over time because the data is arranged in chronological order. This is to turn the police patrol route generation model of the present invention into a predictive type model.

[0065] S120

[0066] In step S120, a mainstream backbone network in the field of Neuro-Linguistic Programming (NLP), such as LSTM, Transformer and other algorithms, can be selected to construct a police patrol route generation model. Figure 4 As shown, the mapping head function is a single-layer MLP+Relu+ fully connected method for nonlinear mapping, where the number of fully connected categories is the number of input data.

[0067] For the process of constructing a police patrol route generation model using algorithms such as LSTM and Transformer, reference may be made to related technologies, and the present invention will not go into details here.

[0068] S130

[0069] In some embodiments, Figure 3 As shown, in step S130, the police patrol route generation model is trained based on the softmax loss function, and the trained police patrol route generation model is obtained, including:

[0070] S131, pre-training the police patrol route generation model based on a softmax loss function to obtain a pre-trained model of the police patrol route generation model;

[0071] S132, constructing a second sample data set, wherein the second sample data set includes the urgency of police force demand;

[0072] S133. Use the second sample data set to train the pre-trained model based on the classification loss function to obtain a trained police patrol route generation model.

[0073] Specifically, in step S131, the softmax loss function can be expressed as follows with reference to formula ①:

[0074]

[0075] The superscript i refers to all instances, and the subscript c refers to all categories. If c = i, then When c≠i, is the parameter distribution of the ith instance.

[0076] Furthermore, in the above loss function, the present invention uses a softmax method to express it. Preferably, the output of each input is the parameter z in the hidden parameter space obtained after the input data passes through the encoder. i Multiply by the weight value wi of the i-th class; finally, the final form is obtained according to the operation principle of the log function, which is used as a reference for program coding. The parameters without meaning in the softmax loss function of the present invention can be understood as common knowledge in the field and can be explained with reference to related technologies.

[0077] In the above scheme, each piece of data corresponds to a position in the latent space. The purpose of this loss function is to minimize the distance between data distributions in similar geographical locations and time periods, so that data of different modes are mapped to similar latent space areas, such as Figure 4 shown.

[0078] Based on the above softmax loss function, the police patrol route generation model is trained until the model converges as a pre-training model.

[0079] Then in step S132, a second sample data set including the urgency of police force demand is constructed, and the second sample data set is used in S133 to continue training the pre-trained model in step S131 based on the classification loss function to obtain a trained police patrol route generation model.

[0080] Exemplarily, the urgency of police force demand is defined as 1-5, and data of about one week is extracted and labeled to form a second sample data set. Then, the softmax loss function in the initial network structure of the police patrol route generation model is replaced with a common classification loss function, such as the cross entropy loss function, and fine-tuning training is performed to obtain the final police patrol route generation model.

[0081] In the above scheme, different distribution areas can be divided according to the degree of police force urgency to improve the business application logic.

[0082] In addition, since the softmax loss function can convert a set of variables into a probability distribution, and the cross entropy loss function can measure the distance between two probability distributions, the present invention combines the softmax loss function and the cross entropy loss function to further improve the robustness and accuracy of the output results of the police patrol route generation model.

[0083] In some embodiments, in step S130, after obtaining the trained police patrol route generation model, the generation method further includes:

[0084] S140, constructing a third sample data set, wherein the third sample data set includes at least one of historical police situation data of different time periods within the patrol range, historical police patrol area data, police patrol martial law level data, and police force data;

[0085] S150, obtaining police force input data in different time periods and distribution heat maps of patrol key areas in different time periods according to the third sample data set;

[0086] S160. Combining the output result of the police patrol route generation model with the police force input data and the patrol key area distribution heat map, obtain the patrol route for each time period.

[0087] After research, it is found that in addition to the alarm data of key personnel, vehicle flow data, pedestrian flow data and the urgency of police force demand, at least one of the historical police situation data, historical police patrol area data, police patrol martial law level data and police force data of different time periods within the patrol range also has an impact on the police patrol route. Therefore, after using the first sample data set and the second sample data set to train the police patrol route generation model, at least one of the historical police situation data, historical police patrol area data, police patrol martial law level data and police force data of different time periods within the patrol range can be further used in combination with the output of the police patrol route generation model to obtain the patrol route for each time period.

[0088] Specifically, in step S140, at least one of the historical police situation data, historical police patrol area data, police patrol martial law level data and police force data in different time periods within the patrol range is used as a third sample data set. Then, in step S150, the police force input data in different time periods and the distribution heat map of patrol key areas in different time periods are obtained based on the third sample data set. And in step S160, the patrol route for each time period is obtained by combining the output result of the police force patrol route generation model and the police force input data and the distribution heat map of patrol key areas.

[0089] In an embodiment of the present invention, in step S140, by summarizing historical police situation data, the probability of police situation occurring in each time period, the number of police situation occurrences and the average processing time can be obtained; by summarizing historical police patrol area data and police force data, the patrol area areas of walking patrol police officers, motorcycle patrol police officers, and car patrol police officers can be obtained; by summarizing police patrol martial law level data and police force data, the police force input data corresponding to different martial law levels can be obtained.

[0090] In addition, based on the above-mentioned method for generating a police patrol route, an embodiment of the present invention further provides an electronic device, such as a server, a cloud server, etc.

[0091] Figure 5 A schematic structural diagram of an electronic device according to a first embodiment of the present invention is shown.

[0092] like Figure 5 As shown, the electronic device includes: at least one processor 701; and a memory 702 that is communicatively connected to the at least one processor 701; wherein the memory stores instructions that can be executed by the at least one processor 701, and the instructions are executed by the at least one processor 701, so that the at least one processor 701 can execute the method for generating a police patrol route mentioned in the above embodiment. Wherein, the electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0093] Figure 6 A schematic structural diagram of an electronic device according to a second embodiment of the present invention is shown.

[0094] like Figure 6 As shown, the electronic device may also include, for example: an I / O interface 703, an input unit 704, an output unit 705, a communication unit 706, a read-only memory (ROM) 707, and a random access memory (RAM) 708. Specifically, the processor 701 may perform various appropriate actions and processes according to a computer program stored in the ROM 707 or a computer program loaded from the memory 702 to the RAM 708. In the RAM 708, various programs and data required for the operation of the electronic device may also be stored. The processor 701, the ROM 707, and the RAM 708 are connected to each other via a bus 709. The I / O interface (input / output interface) 703 is also connected to the bus 709.

[0095] Multiple components in the electronic device are connected to the I / O interface 703, including: an input unit 704, such as a keyboard, a mouse, etc.; an output unit 705, such as various types of displays, speakers, etc.; a memory 702, such as a disk, an optical disk, etc.; and a communication unit 706, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 706 allows the electronic device to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0096] The processor 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 701 include, but are not limited to, a central color distribution determination unit 323 (CPU), a graphic color distribution determination unit 323 (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 701 performs the various methods and processes described above, such as a method for generating a police patrol route. For example, in some embodiments, a method for generating a police patrol route may be implemented as a computer software program, which is tangibly contained in a computer-readable storage medium, such as a memory 702. In some embodiments, part or all of the computer program may be loaded and / or installed on an electronic device via ROM 707 and / or a communication unit 706. When the computer program is loaded into RAM 708 and executed by the processor 701, one or more steps of the method for generating a police patrol route described above may be performed. Alternatively, in other embodiments, the processor 701 may be configured to execute the method for generating a police force patrol route in any other appropriate manner (eg, by means of firmware).

[0097] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0098] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. The above program code can be packaged into a computer program product. These program codes or computer program products can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor 701, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed completely on the computer, partially on the computer, as an independent software package, partially on the computer and partially on the remote computer, or completely on the remote computer or server.

[0099] For the specific description and beneficial effects of the electronic device, please refer to the description of the above-mentioned method for generating the police patrol route, which will not be repeated here.

[0100] In addition, it should be pointed out here that: on the other hand, the present invention also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program executed by the method for generating a police patrol route mentioned above, and the computer program includes program instructions. When the processor executes the program instructions, it can execute the description of the method for generating a police patrol route mentioned above, so it will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in the present invention, please refer to the description of the method embodiment of the present invention.

[0101] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0102] The above is only a preferred embodiment of the present invention, and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment, it is not used to limit the present invention. Any technician familiar with this patent can make some changes or modify the technical contents suggested above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention without departing from the content of the technical solution of the present invention still fall within the scope of the solution of the present invention.

Claims

1. A method for generating a police patrol route, characterized in that: include: Constructing a first sample data set, wherein the first sample data set includes specific historical data of different time periods within the patrol range; Construct a police patrol route generation model based on deep learning algorithms; Using the first sample data set, training the police patrol route generation model based on a softmax loss function to obtain a trained police patrol route generation model; The police patrol route generation model is trained based on the softmax loss function, and the trained police patrol route generation model is obtained, including: Pre-training the police patrol route generation model based on a softmax loss function to obtain a pre-trained model of the police patrol route generation model; constructing a second sample data set, wherein the second sample data set includes the urgency of police force demand; The pre-trained model is trained using the second sample data set based on a classification loss function to obtain a trained police patrol route generation model.

2. A method for generating a police patrol route according to claim 1, characterized in that: Constructing the first sample dataset includes: Collecting the specific historical data, wherein the specific historical data includes at least one of the alarm data of key personnel, vehicle flow data, and pedestrian flow data; Inputting the specific historical data into a preset encoder for encoding to obtain encoded data; The encoded data is shuffled in a preset data shuffling manner to generate the first sample data set.

3. A method for generating a police patrol route according to claim 2, characterized in that: The encoding lengths of the encoders are the same, and the encoders encode according to the time period, geographical coordinates, data category, and data value contained in the specific historical data.

4. A method for generating a police patrol route according to claim 2, characterized in that: The shuffling of the encoded data using a preset data shuffling method includes: The encoded data of multiple data categories are taken as a whole and shuffled in time series so that the encoded data are not arranged in time order.

5. The method for generating a police patrol route according to claim 1, characterized in that: The police patrol route generation model adopts a single-layer MLP as the mapping head function and Relu as the fully connected layer.

6. A method for generating a police patrol route according to claim 1, characterized in that: The classification loss function adopts a cross entropy loss function.

7. A method for generating a police patrol route according to claim 1, characterized in that: After obtaining the trained police patrol route generation model, the generation method further includes: Constructing a third sample data set, wherein the third sample data set includes at least one of historical police situation data of different time periods within the patrol range, historical police patrol area data, police patrol martial law level data, and police force data; According to the third sample data set, obtaining police force input data in different time periods and distribution heat maps of patrol key areas in different time periods; The patrol route for each time period is obtained by combining the output results of the police patrol route generation model with the police force input data and the patrol key area distribution heat map.

8. An electronic device, characterized in that: include: processor; as well as A memory is communicatively connected to the processor, wherein the memory stores a program executable by the processor, and when the program is executed by the processor, the processor can execute the method for generating a police patrol route according to any one of claims 1 to 7.

9. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for generating a police patrol route according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Community public security patrolling route optimization design method based on deep studying algorithm

    CN106447109A

  • Processing method of multi-modal data intermediate layer fusion full-connection geological map prediction model

    CN112163374A