Ecological environment law enforcement inspection intelligent guiding method and system

Through the intelligent guidance system, the mobile terminal interactive module and ecological environment law enforcement think tank are used to solve the problems of difficulty in information positioning and insufficient experience in law enforcement inspections, efficient and accurate law enforcement support is achieved, and the standardization and efficiency of on-site inspections are improved.

CN120256558APending Publication Date: 2025-07-04BEIJING SILU INNOVATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510254308.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-05
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

During the ecological environment law enforcement inspection, law enforcement personnel need to have rich professional knowledge and experience, the on-site inspection is inefficient and difficult to quickly locate relevant information. The existing big data and artificial intelligence technologies are not fully utilized, resulting in insufficient inspection complexity and accuracy.

Method used

An intelligent guidance system is adopted, including a mobile interactive module, an intelligent guidance model and an ecological environment law enforcement think tank, and a natural language instruction recognition, intention extraction and multi-channel data retrieval, and law enforcement inspection guidance items are generated.

Benefits of technology

It improves the efficiency and accuracy of law enforcement inspections, provides intelligent question-and-answer and guidance support, adapts to different inspection objects and task requirements, dynamically recommends inspection plans, and improves law enforcement normativeness and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120256558A_ABST
    Figure CN120256558A_ABST
Patent Text Reader

Abstract

The invention provides an ecological environment law enforcement inspection intelligent guiding method and system, and belongs to the technical field of ecological environment law enforcement inspection. According to the method, an intelligent guidance system is used for ecological environment law enforcement inspection; the intelligent guiding system comprises a mobile terminal interaction module, an intelligent guiding model and an ecological environment law enforcement think tank. The method comprises the following steps: waking up a mobile terminal interaction module and starting an intelligent guide model; recognizing a natural language instruction from the ecological environment by using an intelligent guidance model; extracting an intention from the natural language instruction by using an intelligent guidance model; related data matched with the intention are retrieved from an ecological environment law enforcement think tank through an intelligent guidance model; generating guidance item information based on the multi-path result by using an intelligent guidance model; and the mobile terminal interaction module outputs intelligent guidance data based on the guidance item information. According to the invention, the actual law enforcement process and the intelligent means are combined, the intelligent guidance model is established, and intelligent question answering and intelligent guidance support is provided for development of law enforcement field inspection work.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of ecological environment law enforcement inspections, and particularly relates to an intelligent guidance method and system for ecological environment law enforcement inspections. Background Art

[0002] Facing the complexity of on-site law enforcement inspections, law enforcement officers need to possess profound professional knowledge and rich practical experience in order to deeply understand the law enforcement requirements and guidelines. At the same time, given the diversity and complexity of inspection tasks, law enforcement officers must comprehensively understand the basic situation of enterprises before execution and identify potential risk points to ensure the accuracy and effectiveness of law enforcement work.

[0003] In the field of ecological environment law enforcement inspections, law enforcement officers must conduct a detailed review and analysis of enterprise data before executing tasks. Currently, before conducting on-site inspections, law enforcement officers need to comprehensively understand the environmental protection status of enterprises through diversified information channels. Specifically, it includes:

[0004] Utilize data such as pollution source file systems, pollution discharge permits, and environmental impact assessments of construction projects to deeply master key information such as the pollution generation links, pollution control technologies, and pollutant discharge standards of enterprises.

[0005] Provide guidance for on-site inspections by collecting and analyzing problem clues discovered during non-on-site law enforcement processes.

[0006] Refer to relevant documents such as inspection guidance guidelines to systematically learn and master the inspection processes, key inspection points, and law enforcement standards of enterprises in specific industries.

[0007] However, this data is often scattered in different platforms and documents, resulting in inconvenient on-site queries and difficulty in quickly locating information related to specific tasks and inspection objects.

[0008] In addition, the inspection requirements vary for different industries and tasks, and the inspection links involved in enterprises (such as pollution generation links, treatment processes, and pollution emissions) are also different, which requires law enforcement officers to have rich law enforcement experience and professional knowledge. The complexity of on-site inspections further increases the challenge of inspection efficiency and may reduce the problem discovery rate.

[0009] Although current big data and artificial intelligence technologies, especially large language models, have great potential in processing and analyzing large amounts of text and voice information, in the actual application of ecological environment law enforcement inspections, these technologies have not been fully utilized. This indicates that there is a need to further explore and develop the potential of these technologies in improving law enforcement efficiency and accuracy. Summary of the Invention

[0010] To solve the above technical problems, the present invention proposes an intelligent guidance solution for ecological environment law enforcement inspections.

[0011] In the first aspect of the present invention, an intelligent guidance method for ecological environment law enforcement inspection is proposed. The method uses an intelligent guidance system for ecological environment law enforcement inspection. The intelligent guidance system includes a mobile terminal interaction module, an intelligent guidance model, and an ecological environment law enforcement think tank. The method includes:

[0012] Step S1: Wake up the mobile terminal interaction module and start the intelligent guidance model;

[0013] Step S2: Use the intelligent guidance model to identify natural language instructions from the ecological environment;

[0014] Step S3: Use the intelligent guidance model to extract the intention from the natural language instructions;

[0015] Step S4: Use the intelligent guidance model to retrieve relevant data matching the intention from the ecological environment law enforcement think tank;

[0016] Step S5: Use the intelligent guidance model to generate guidance item information based on multiple results;

[0017] Step S6: The mobile terminal interaction module outputs intelligent guidance data based on the guidance item information.

[0018] According to the method of the first aspect of the present invention, in step S1, the way to wake up the mobile terminal interaction module includes voice wake-up or touch wake-up. After waking up the mobile terminal interaction module, the intelligent guidance system automatically starts the intelligent guidance model.

[0019] According to the method of the first aspect of the present invention, in step S2, the specific ways to use the intelligent guidance model to identify natural language instructions from the ecological environment are one or more of the following:

[0020] The intelligent guidance model identifies the corresponding instruction information based on the input instructions in the form of text, voice, and pictures, and converts the instruction information into natural language instructions;

[0021] The intelligent guidance model identifies the name of the enterprise at the current location based on the longitude and latitude information obtained by positioning after waking up the mobile terminal interaction module, uses the name of the enterprise as the instruction information, and converts the instruction information into natural language instructions;

[0022] The intelligent guidance model extracts the enterprise name and inspection item information as the instruction information based on the filling / registration information in the current screen of the wake-up mobile terminal interaction module, and converts the instruction information into natural language instructions.

[0023] According to the method of the first aspect of the present invention, in step S3, extracting the intention from the natural language instructions specifically includes:

[0024] Step S3-1: Perform multi-dimensional vectorization preprocessing on the natural language instruction; including:

[0025] Taking the natural language instruction as text, convert the text into a word sequence {w1, w2,..., wn} through word segmentation processing;

[0026] Construct a triple embedding layer, including:

[0027] A word embedding layer for mapping words to d-dimensional dense vectors Te;

[0028] A segment embedding layer for generating text paragraph identification vectors Se;

[0029] A position embedding layer for generating position encoding vectors Pe of words;

[0030] Perform weighted fusion on the triple embedding vectors to obtain a fusion vector E;

[0031] E = α * Te + β * Se + γ * Pe

[0032] where α, β, and γ are trainable fusion weight parameters;

[0033] Step S3-2: Construct an improved multi-head attention mechanism; including:

[0034] Input the fusion vector E into three linear transformation matrices Q, K, and V respectively, where Q represents the query, K represents the key, and V represents the value;

[0035] The calculation method of the attention Attention(Q, K, V) is:

[0036] Attention(Q, K, V) = softmax(QK^T / √dk + M)V

[0037] where QK^T represents the multiplication of Q and the transpose of K, dk represents the dimension of Q and K, √dk: scales the result of QK^T, and M is an attention mask matrix used to suppress interference from irrelevant information;

[0038] Compute h different attention heads in parallel, and the output dimension of each attention head is dv to capture different features;

[0039] Concatenate the outputs of the h attention heads and obtain the output of the multi-head attention through linear transformation;

[0040] Step S3-3: Construct an adaptive feature fusion network to identify the intention, including:

[0041] Construct a multi-layer feedforward neural network, and the output of each layer is:

[0042] y = f(Wx + b + R)

[0043] Among them, R is the residual connection term, which is used to alleviate the vanishing gradient;

[0044] Among them, the multi-layer feedforward neural network is composed of multiple layers connected in sequence. Information is transmitted unidirectionally from the previous layer to the next layer, and there is no feedback connection; each layer contains a number of neurons, and the neurons perform calculations and information transmission through the weight matrix W, the bias term b, and the residual connection term R;

[0045] Design a feature adaptive fusion mechanism:

[0046] F = σ(GAP(x)) ⊙ x

[0047] Among them, GAP represents global average pooling, σ represents the sigmoid function, ⊙ represents element-wise multiplication, and F represents the feature vector obtained after feature adaptive fusion.

[0048] According to the method of the first aspect of the present invention, in step S3, during the process of extracting the intention:

[0049] When the confidence of the highest probability intention is lower than the threshold τ, extract the sub-optimal intention and construct a clarification question, and update the intention recognition result based on the user feedback;

[0050] When multiple high-probability intentions are detected, calculate the intention correlation matrix, eliminate conflicts based on rules and statistical information, and output a consistent intention result.

[0051] According to the method of the first aspect of the present invention, in the step S4, based on the intention analysis category label, retrieve relevant data matching the intention in the source database and external interface in the ecological environment law enforcement think tank. The source database includes a vector database, a graph database, and a relational database.

[0052] According to the method of the first aspect of the present invention, the retrieval of the vector database specifically includes:

[0053] Input vectorization encoding:

[0054] Receive query text data, preprocess the query text data, and convert the preprocessed query text data into a high-dimensional vector through a pre-trained vectorization model;

[0055] Vector database retrieval:

[0056] Use a hybrid search method, apply dense vector retrieval, sparse vector retrieval, and BM25 retrieval methods to perform the retrieval process, set weights, calculate the similarity between the input high-dimensional vector and each vector entry in the database, sort the vector entries from high to low according to the similarity score, and select several vector entries with higher rankings as the retrieval results;

[0057] Reordering:

[0058] Using a vector entry as a document fragment, calculating the maximum similarity score between each query term and all terms in the document fragment using a delayed interaction mechanism. For each query term, find the most similar term in the document fragment and calculate its maximum similarity. The final document similarity score is the accumulation or average of the maximum similarities, and the retrieved document fragments are reordered according to the scores to obtain a new ordered set;

[0059] Content generation:

[0060] Combining the query text data with the ordered set as a new input sequence, which is used as the input of a large language model. The large language model generates an enhanced answer as the generated content.

[0061] According to the method of the first aspect of the present invention, retrieving the graph database specifically includes:

[0062] Interaction and question understanding: Understanding the query intention through intention recognition and question decomposition;

[0063] Entity linking: Linking the entities and labels in the query to the corresponding nodes in the knowledge graph through semantic recognition;

[0064] Constructing a query path: Establishing the shortest link between the query object and the label and optimizing the query path;

[0065] Graph query: Querying the subgraph related to the question, inputting the Schema information into the large model, constructing a CYPHER query statement, and executing the query in the graph database to retrieve relevant information;

[0066] Summarizing the query results: Summarizing and generalizing the query results and returning the query results.

[0067] According to the method of the first aspect of the present invention, retrieving the relational database specifically includes:

[0068] Offline model training:

[0069] Collecting data tables containing the question coverage, selecting a pre-trained model for performing the text generation task, and fine-tuning the pre-trained model using the prepared dataset; the fine-tuning dataset contains natural language queries and corresponding SQL statements;

[0070] Training the pre-trained model with the fine-tuning dataset, adjusting the parameters of the pre-trained model to optimize its performance in a specific business scenario; during the training process, regularly evaluating the performance of the model to ensure the effectiveness of the fine-tuning;

[0071] Question preprocessing:

[0072] The query problem is proposed in the form of natural language, and the input query is preprocessed, including word segmentation, stop word removal, part-of-speech tagging, and anaphora resolution;

[0073] Intent recognition:

[0074] The query intent is determined through natural language understanding, and the question is associated with the relevant table structure;

[0075] Entity alignment:

[0076] Relevant entities in the question are extracted through entity extraction technology, linked to the specific values in the database using vector search, and aligned;

[0077] SQL language conversion:

[0078] The understood natural language query is converted into an SQL query statement using a fine-tuned pre-trained model, and potential query optimizations are processed to ensure query efficiency;

[0079] SQL query execution:

[0080] The generated SQL query statement is executed in the database, and the query result is obtained from the database;

[0081] Result processing:

[0082] The query result is formatted, sorted, and aggregated to meet the user's query requirements; the processed result is returned, and the result is converted into a chart, list, or other visual form.

[0083] In a second aspect of the present invention, an intelligent guidance system for ecological environment law enforcement inspection is proposed. The intelligent guidance system includes a mobile terminal interaction module, an intelligent guidance model, and an ecological environment law enforcement think tank; where:

[0084] Wake up the mobile terminal interaction module and start the intelligent guidance model;

[0085] Use the intelligent guidance model to identify natural language instructions from the ecological environment;

[0086] Use the intelligent guidance model to extract the intent from the natural language instructions;

[0087] Use the intelligent guidance model to retrieve relevant data matching the intent from the ecological environment law enforcement think tank;

[0088] Use the intelligent guidance model to generate guidance item information based on multiple results;

[0089] The mobile terminal interaction module outputs intelligent guidance data based on the guidance item information.

[0090] In summary, the present invention combines the actual law enforcement process and intelligent means to establish an intelligent guidance model, providing better intelligent question answering and intelligent guidance support for the development of on-site law enforcement inspection work, and comprehensively improving the standardization and efficiency of law enforcement work. As an auxiliary tool before and during the execution of tasks, the law enforcement intelligent guidance is mainly applicable to tasks with specific inspection objects; the present invention will flexibly configure law enforcement guidance items according to task requirements and on-site inspection content, and recommend dynamic information and inspection plans in a targeted manner according to actual law enforcement needs to assist the efficient execution of tasks and the development of enterprise file improvement work. BRIEF DESCRIPTION OF THE DRAWINGS

[0091] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0092] Figure 1 Schematic diagram of an intelligent guidance system for ecological environment law enforcement inspection according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0093] In order to make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0094] As Figure 1 shown, the intelligent guidance system for ecological environment law enforcement inspection includes a mobile terminal interaction module a, an intelligent guidance model b, and an ecological environment law enforcement think tank c.

[0095] The method for intelligent guidance of ecological environment law enforcement inspection includes the following steps:

[0096] Step S1, wake up the mobile terminal interaction module and start the intelligent guidance model.

[0097] Law enforcement staff wake up the mobile terminal interaction module a and start the intelligent guidance model b. There are two ways for law enforcement staff to wake up the mobile terminal interaction module a, one is voice wake-up and the other is touch wake-up; after waking up the mobile terminal interaction module a, the system automatically starts the intelligent guidance model b.

[0098] Step S2, use the intelligent guidance model to identify natural language instructions from the ecological environment.

[0099] (1) Directly input text, voice, or image instructions to the intelligent guidance model b. Law enforcement personnel input instruction information to the intelligent guidance model b at any time and any place. The instruction forms include: recording voice, inputting text, and uploading pictures. The intelligent guidance model b recognizes the instruction information through the voice recognition model and converts it into natural language instructions. The instruction information is input into the intelligent guidance model b, and the voice and instruction information are recognized by the voice recognition model and converted into text instruction information. It also supports the correction function of proper nouns.

[0100] (2) Arriving near the enterprise, the intelligent guidance model b automatically identifies the name of the enterprise at the current location. When law enforcement personnel arrive near the enterprise at the field work site, they locate the longitude and latitude of the mobile terminal interaction module a, and the intelligent guidance model b automatically identifies the name of the enterprise at the current location. The intelligent guidance model b converts the enterprise name into natural language instructions through the voice recognition model. The recognized enterprise name information is input into the intelligent guidance model b as the instruction information, and the enterprise name instruction information is converted into natural language instructions through the voice recognition model.

[0101] (3) Task execution scenario: Intelligent guidance model b automatically identifies the company name and inspection item information in the current screen of mobile terminal interaction module a. When law enforcement personnel perform on-site law enforcement inspection tasks, they use mobile terminal interaction module a to fill in and register the inspection content. Intelligent guidance model b can automatically identify the information in the current screen of mobile terminal interaction module a and extract the company name and inspection item information as instruction information. Intelligent guidance model b converts the company name and inspection item information into natural language instructions through the voice recognition model. The recognized company name and inspection item information are input into intelligent guidance model b as instruction information, and the company name instruction information is converted into natural language instructions through the voice recognition model.

[0102] Step S3: extracting the intent from the natural language instruction using an intelligent guidance model.

[0103] The intention recognition model of the intelligent guidance model b recognizes the intention of natural language instructions and screens the source of guidance information data. The formed natural language instructions are input into the intelligent guidance model b, and the core requirements of the natural language instructions are analyzed through the intention recognition model, and the information most relevant to the query input is output. Intent recognition based on deep learning includes the following steps:

[0104] (1) Perform multi-dimensional vectorization preprocessing on the input natural language instructions, including:

[0105] Convert the input text into a word sequence {w1,w2,...,wn} through the word segmentation module;

[0106] Construct a triple embedding layer consisting of:

[0107] - Token Embedding layer: Maps words to d-dimensional dense vectors Te;

[0108] - Segment Embedding layer: Generates text paragraph identification vectors Se;

[0109] - Position Embedding layer: Generates position encoding vectors Pe;

[0110] Perform weighted fusion on the triple embedding vectors: E = α * Te + β * Se + γ * Pe;

[0111] where α, β, and γ are trainable fusion weight parameters, allowing the model to learn the importance of each embedding layer.

[0112] (2) Construct an improved multi-head attention mechanism, including:

[0113] Input the fused vector E into three linear transformation matrices Q (query), K (key), and V (value) respectively;

[0114] Design the attention calculation formula:

[0115] Attention(Q, K, V) = softmax(QK^T / √dk + M)V

[0116] M is the attention mask matrix, used to suppress interference from irrelevant information (such as padding). Calculate h different attention heads in parallel, and the output dimension of each head is dv to capture different features.

[0117] Q: Represents the query vector, which is obtained by passing the fused vector E through a linear transformation matrix. The query vector is used to perform a dot product operation with the key vector K to calculate the attention score for each position. These scores represent the correlation between the query vector and each key vector.

[0118] K: Represents the key vector, which is also obtained by linearly transforming the fused vector E. It participates in the calculation of the attention score together with Q. K provides information about the positions to be attended to, helping to determine which positions Q should attend to.

[0119] V: Represents the value vector, which is also generated by linearly transforming the fused vector E. After calculating the attention scores, V is used to perform a weighted sum of the information according to these scores to obtain the final attention output result.

[0120] Softmax: It is an activation function that normalizes the input vector and converts the result into a probability distribution, making all element values between 0 and 1 and the sum of elements equal to 1. In the attention mechanism, it is used to convert the calculated raw attention scores into weights for weighted summation of V.

[0121] QK^T: It represents the multiplication of the Q matrix and the transpose of the K matrix. The resulting matrix contains the similarity information between Q and K. This operation calculates the dot product between the query vector and the key vector, reflecting their correlation and used to measure the attention degree of each query vector to each key vector.

[0122] √dk: Here, dk is the dimension of the Q or K matrix. Taking the square root is to scale the result of QK^T. This is because when dk is large, the value of QK^T may become very large, causing the gradient of the softmax function to become very small and affecting the training effect. Dividing by √dk can alleviate this problem.

[0123] M: Usually an optional mask matrix used to mask or constrain the attention at certain positions. For example, when processing sequence data, to ensure that only elements before the current position are focused on (e.g., in the decoder to avoid seeing future information), the M matrix can be used to set the attention scores of future positions to a very large negative number. After softmax processing, the weights of these positions will approach 0, thus achieving the masking effect.

[0124] Attention(Q,K,V): It represents the attention result calculated based on Q, K, and V. The final output is the result of weighted summation of the V vector according to the attention weights. It integrates information from different positions and redistributes the weights of this information according to the relationship between Q and K.

[0125] h: It represents the number of attention heads that are computed in parallel in the multi-head attention mechanism. By setting multiple attention heads, the model can capture information from different perspectives. Each attention head can learn different feature representations, and finally, these feature representations are concatenated and passed through a linear transformation to obtain the final output, which can enrich the model's ability to understand and express information.

[0126] dv: The dimension of the output vector calculated by each attention head. Since there are h attention heads and the output dimension of each head is dv, after concatenating the outputs of h attention heads, the dimension of the resulting vector is h*dv, and then it is mapped to the final output dimension we need through a linear transformation.

[0127] (3) Design an adaptive feature fusion network, including:

[0128] Construct a multi-layer feedforward neural network, and the calculation of each layer is as follows:

[0129] y = f(Wx + b + R)

[0130] Among them, R is the residual connection term, which is used to alleviate the vanishing gradient. Neural network layer: A multi-layer feedforward neural network is composed of multiple layers connected in sequence. Information is transmitted unidirectionally from the previous layer to the next layer, and there is no feedback connection. Each layer contains several neurons, and these neurons perform calculations and information transmission through the weight matrix W, the bias term b, and the residual connection term R.

[0131] Y: As the output of each layer, it is both the result of the current layer's processing of the input data and will be used as the input of the next layer, and is transmitted and processed layer by layer in the neural network.

[0132] W: In the neural network, W is the weight matrix connecting neurons in different layers. It determines the scaling and weighting degree of the input data during linear transformation. Different weight values will affect the response intensity of neurons to input signals, thereby affecting the learning and prediction capabilities of the entire network.

[0133] b: The bias term b is a learnable parameter, which allows the activation function to be translated on the coordinate axis. Even if all inputs are 0, the bias term can make the output of the neuron non-zero, thereby increasing the flexibility and expressive ability of the model, enabling the network to better fit the data.

[0134] R: The residual connection term is used to alleviate the vanishing gradient problem. In a deep neural network, as the number of layers increases, the gradient may become very small during backpropagation, resulting in difficulty for the previous layers to effectively learn. The residual connection adds the input directly to the output of a certain layer of the network, making the gradient easier to propagate in the network, which helps to train deeper networks.

[0135] Design a feature adaptive fusion mechanism:

[0136] F = σ(GAP(x)) ⊙ x

[0137] Among them, GAP is global average pooling, σ is the sigmoid function, and ⊙ is the element-wise product.

[0138] GAP: Global average pooling is a pooling operation that calculates the average of the entire input feature map to obtain a fixed-length vector. This operation can greatly reduce the number of model parameters while retaining the global information of the input data. It is often used in the last layer of a convolutional neural network to convert the feature map into a fixed-length feature vector.

[0139] σ (sigmoid function): A commonly used activation function that can map input values to the range between 0 and 1.

[0140] ⊙ (element-wise product): Refers to multiplying the corresponding elements of two vectors or matrices of the same shape.

[0141] In addition, for the intention confidence evaluation module, when the confidence of the highest probability intention is lower than the threshold τ: extract the sub-optimal intention; construct a clarification question; update the intention recognition result based on user feedback.

[0142] In addition, for the intention conflict handling module, when multiple high-probability intentions are detected: calculate the intention relevance matrix; eliminate conflicts based on rules and statistical information; output the final consistent intention result.

[0143] Step S4: Use the intelligent guidance model to retrieve relevant data matching the intention from the ecological environment law enforcement think tank.

[0144] After the intelligent guidance model b determines the user intention, through the intelligent retrieval model, relevant data is retrieved from the ecological environment law enforcement think tank c, which may involve vector databases, graph databases, relational databases, and external interface data, and retrieve relevant data from different sources.

[0145] Input the high-probability intention analysis category label into the intelligent guidance model b, and through the intelligent retrieval model, retrieve relevant data from the 3 source databases and external interfaces in the ecological environment law enforcement think tank c according to the label; the 3 source databases include vector databases, graph databases, and relational databases. Through the multi-way recall technology architecture, the comprehensiveness and accuracy of the retrieval are improved.

[0146] (1) Retrieve the vector database

[0147] Input vectorization encoding: Receive the query text data Q input by the user, which can be a question, request, or command in natural language form. Input the preprocessed text and convert it into a high-dimensional vector through a pre-trained vectorization model.

[0148] Initial vector database retrieval: Use a hybrid search method, comprehensively apply methods such as dense vector retrieval, sparse vector retrieval, and BM25 retrieval, and set their respective weights to calculate the similarity between the input vector and each vector entry in the database. Sort the vector entries from high to low according to the similarity score, and select the Top K vector entries closest to the query vector.

[0149] Re - ranking: Using the delayed interaction mechanism (ColBERT), calculate the maximum similarity score between each query term and all terms in the document fragments. For each query term, find the most similar term in the document fragment and calculate its maximum similarity. The final document similarity score is the accumulation or average of these maximum similarities. Re - rank the initially retrieved document fragments according to the scores to obtain a new sorted set.

[0150] Content generation: Combine the original query Q with the set of retrieved text fragments C to form a new input sequence Q + C, which constitutes the input content for the final generation model. Generate an enhanced answer through a large - language model.

[0151] (2) Retrieving the knowledge graph

[0152] User interaction and question understanding: The user poses a query question. The system understands the user's query intention through intent recognition and question decomposition.

[0153] Entity linking: The system links the entities and labels in the query to the corresponding nodes in the knowledge graph through semantic recognition (entity linking).

[0154] Constructing the query path: The system establishes the shortest link between the query object and the label and optimizes the query path.

[0155] Graph query: Retrieve the sub - graph related to the question, then input the Schema information into the large model to construct a CYPHER query statement and execute the query in the graph database to retrieve relevant information.

[0156] Query result summary: The system summarizes and generalizes the query results and presents the final results to the user.

[0157] (3) Relational database query

[0158] Offline model training: Collect data tables covering the scope of user questions, ensuring that the database field names, types, and annotations are reasonably designed. Select a pre - trained model suitable for text generation tasks, such as Qwen214B, etc. Fine - tune the model using the prepared dataset. The fine - tuning dataset should contain natural - language queries and corresponding SQL statements. Train the model with the fine - tuning dataset and adjust the model's parameters to optimize its performance in specific business scenarios. During the training process, regularly evaluate the model's performance, such as accuracy, recall, etc., to ensure the effectiveness of fine - tuning.

[0159] Question pre - processing: The user poses a query question in natural language. The system pre - processes the user input, including word segmentation, stop - word removal, part - of - speech tagging, anaphora resolution, etc., to prepare for further natural - language understanding.

[0160] Intent recognition: The system determines the user's query intent through natural language understanding (NLU) and associates the question with the relevant table structure.

[0161] Entity alignment: The system extracts relevant entities in the question through entity extraction technology (NER), uses vector search to link to specific values in the database, and performs alignment.

[0162] SQL language conversion: Use a fine-tuned model to convert the understood natural language query into an SQL query statement. And handle possible query optimizations to ensure query efficiency.

[0163] SQL query execution: The system executes the generated SQL query statement in the database and obtains the query result from the database.

[0164] Result formatting: Post-process the results, such as formatting, sorting, or aggregating, to meet the user's query requirements. The system presents the processed results to the user in a user-friendly manner. It may include converting the results into charts, lists, or other visual forms.

[0165] Step S5: Use the intelligent guidance model to generate guidance item information based on multiple results.

[0166] The intelligent guidance model b evaluates the multiple recall results, selects the text most relevant to the question, and generates guidance item information according to the specified template.

[0167] Based on the 3 source databases and interface data, the intelligent guidance model b ranks the retrieved result data according to the relevance to the question. Precision refers to the relevance of the retrieved data to the question; select the text most relevant to the question and generate answers according to the specified template. The specified template includes lists, pictures, and texts.

[0168] Step S6: The mobile interaction module outputs intelligent guidance data based on the guidance item information.

[0169] The mobile interaction module a outputs intelligent guidance result data. Return the answer generated in step S5 to the intelligent guidance model b, and the mobile interaction module a outputs intelligent guidance result data.

[0170] It should be clear that the natural language instructions formed in step S2 include the enterprise name and inspection guidance item information. The recommended guidance item list is differentiated, and a customized guidance item list is recommended according to different tasks, different inspection items, and different enterprises; the guidance content is dynamically updated according to the enterprise status at different times.

[0171] It can be seen that the present invention establishes an intelligent guidance method and system for ecological environment law enforcement inspections, which can be used as an independent system or as an integrated tool to meet different law enforcement requirements. The independent system mode allows law enforcement officers to directly utilize the intelligent guidance system, without relying on other platforms or devices, to obtain comprehensive law enforcement guidance and information support. The integrated tool mode allows the system to be seamlessly embedded as a module into the existing mobile interaction module a, that is, the mobile application of the ecological environment law enforcement system, enabling law enforcement officers to directly access the intelligent guidance function in a familiar operating environment.

[0172] The present invention establishes an intelligent guidance model b, constructs a speech recognition model, an intention recognition model, a retrieval augmented generation joint model, and an enforcement knowledge graph model, and initializes and trains each model with data to achieve an efficient intelligent guidance function.

[0173] Specifically, the intelligent guidance model b allows users to input in natural language in the form of text or voice, and intelligently analyzes and accurately extracts information such as key enterprise information, laws and regulations, industry knowledge, case analysis, etc. related to the current law enforcement task, as well as problem diagnosis. This provides a convenient, efficient, and intelligent Q&A channel for users, greatly improving the immediacy and accuracy of law enforcement Q&A. In addition, the system can automatically push the latest guidance information related to local enterprises according to the user's location, and these information will be updated synchronously with the real-time changes of the enterprise status. When law enforcement officers conduct on-site inspections, the system focuses on a specific enterprise, provides targeted guidance on filling in inspection items, realizes pre-filling of inspection results, and rapid retrieval and viewing of relevant data information.

[0174] More importantly, the intelligent guidance model b can generate differentiated guidance results according to different enterprise characteristics, inspection task requirements, and inspection item details, thus solving the problems of low inspection efficiency and low problem discovery rate caused by differences in law enforcement experience and professional levels of law enforcement officers.

[0175] The present invention establishes an ecological environment law enforcement think tank c, integrates ecological environment law enforcement data, including environmental impact assessment permit data, industry standard data, pollutant discharge permit data, laws and regulations data, law enforcement ledger data, inspection guidance data, administrative penalty data, etc., and constructs a comprehensive data support system; by constructing 3 types of databases (vector database, graph database, relational database) and interface data, it provides a powerful data retrieval and analysis basis for the intelligent guidance model b.

[0176] Specifically, the vector database is responsible for storing and retrieving high-dimensional data, the graph database is used to process complex relational data, the relational database stores structured data, and the interface data provides the ability to interact with data from other systems. The collaborative work of these four types of data provides a comprehensive, flexible, and efficient data support platform for the intelligent guidance model b. It not only solves the problem of scattered ecological environment law enforcement data and the need to search for data in a vast amount of documents during the law enforcement inspection process, but also greatly improves the efficiency and accuracy of data retrieval.

[0177] Please note that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as within the scope described in this specification. The above embodiments only represent several implementation manners of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be pointed out that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention patent should be subject to the appended claims.

Claims

1. An intelligent guidance method for ecological environment law enforcement inspection, characterized in that, The method uses an intelligent guidance system for ecological environment law enforcement inspections; the intelligent guidance system includes a mobile interaction module, an intelligent guidance model, and an ecological environment law enforcement think tank; the method includes: Step S1, wake up the mobile interaction module and start the intelligent guidance model; Step S2, use the intelligent guidance model to identify natural language instructions from the ecological environment; Step S3, use the intelligent guidance model to extract the intention from the natural language instructions; Step S4, use the intelligent guidance model to retrieve relevant data matching the intention from the ecological environment law enforcement think tank; Step S5, use the intelligent guidance model to generate guidance item information based on multiple results; Step S6, the mobile interaction module outputs intelligent guidance data based on the guidance item information.

2. The intelligent guidance method for ecological environment law enforcement inspection according to claim 1, wherein In step S1, the way to wake up the mobile interaction module includes voice wake-up or touch wake-up. After waking up the mobile interaction module, the intelligent guidance system automatically starts the intelligent guidance model.

3. The intelligent guidance method for ecological environment law enforcement inspection according to claim 1, characterized in that, In step S2, the specific ways to use the intelligent guidance model to identify natural language instructions from the ecological environment are one or more of the following: The intelligent guidance model identifies the corresponding instruction information based on the input instructions in the form of text, voice, and pictures, and converts the instruction information into natural language instructions; The intelligent guidance model identifies the enterprise name at the current location based on the longitude and latitude information obtained by positioning after waking up the mobile interaction module, uses the enterprise name as the instruction information, and converts the instruction information into natural language instructions; The intelligent guidance model extracts the enterprise name and inspection item information as the instruction information based on the filling / registration information in the current screen of the awakened mobile interaction module, and converts the instruction information into natural language instructions.

4. An intelligent guidance method for ecological environment law enforcement inspection according to claim 3, characterized in that, In step S3, extracting the intention from the natural language instructions specifically includes: Step S3-1, perform multi-dimensional vectorization preprocessing on the natural language instructions; including: Taking the natural language instruction as the text, converting the text into a word sequence {w1, w2,..., wn} through word segmentation processing; Construct a triple embedding layer, including: A word embedding layer for mapping words into d-dimensional dense vectors Te; A segment embedding layer for generating text paragraph identification vectors Se; A position embedding layer for generating the position encoding vector Pe of the word; Perform weighted fusion on the triple embedding vectors to obtain a fusion vector E; E = α * Te + β * Se + γ * Pe where α, β, and γ are trainable fusion weight parameters; Step S3-2, construct an improved multi-head attention mechanism; including: Input the fusion vector E into three linear transformation matrices Q, K, and V respectively, where Q represents the query, K represents the key, and V represents the value; The calculation method of the attention Attention(Q, K, V) is: Attention(Q, K, V) = softmax(QK^T / √dk + M)V Among them, \(QK^T\) represents the transpose multiplication of \(Q\) and \(K\), \(d_k\) represents the dimension of \(Q\) and \(K\), \(\sqrt{d_k}\) is used to scale the result of \(QK^T\), \(M\) is the attention mask matrix, which is used to suppress the interference of irrelevant information; \(h\) different attention heads are calculated in parallel, and the output dimension of each attention head is \(d_v\) to capture different features; The outputs of the \(h\) attention heads are concatenated and linearly transformed to obtain the output of the multi-head attention; Step S3-3: Construct an adaptive feature fusion network to identify the intention, including: Construct a multi-layer feed-forward neural network, and the output of each layer is: \(y = f(Wx + b + R)\) Among them, \(R\) is the residual connection term, which is used to alleviate the vanishing gradient; Among them, the multi-layer feed-forward neural network is composed of multiple levels connected in sequence, and the information is unidirectionally transmitted from the previous layer to the next layer without feedback connection; each layer contains several neurons, and the neurons perform calculations and information transmission through the weight matrix \(W\), the bias term \(b\), and the residual connection term \(R\); Design a feature adaptive fusion mechanism: \(F=\sigma(GAP(x))\odot x\) Among them, \(GAP\) represents global average pooling, \(\sigma\) represents the sigmoid function, \(\odot\) represents element-wise multiplication, and \(F\) represents the feature vector obtained after feature adaptive fusion.

5. The intelligent guidance method for ecological environment law enforcement inspection according to claim 4, wherein, In step S3, during the process of extracting the intention: When the confidence of the highest probability intention is lower than the threshold \(\tau\), extract the sub-optimal intention and construct a clarification question, and update the intention recognition result based on the user feedback; When multiple high-probability intentions are detected, calculate the intention relevance matrix, eliminate conflicts based on rules and statistical information, and output a consistent intention result.

6. The intelligent guidance method for ecological environment law enforcement inspection according to claim 5, characterized in that, In the step S4, based on the intention analysis category label, retrieve relevant data matching the intention in the source database and external interfaces in the ecological environment law enforcement think tank according to the category label. The source database includes a vector database, a graph database, and a relational database.

7. The intelligent guidance method for ecological environment law enforcement inspection according to claim 6, characterized in that, The specific process of retrieving the vector database includes: Input vectorization encoding: Receive the query text data, preprocess the query text data, and convert the preprocessed query text data into a high-dimensional vector through a pre-trained vectorization model; Vector database retrieval: Use a hybrid search method, apply dense vector retrieval, sparse vector retrieval, and BM25 retrieval methods to execute the retrieval process, set weights, calculate the similarity between the input high-dimensional vector and each vector entry in the database, sort the vector entries from high to low according to the similarity score, and select several vector entries with higher rankings as the retrieval results; Re-ranking: Taking a vector entry as a document fragment, use the delayed interaction mechanism to calculate the maximum similarity score between each query word and all words in the document fragment. For each query word, find the word in the document fragment that is most similar to it and calculate its maximum similarity. The final document similarity score is the accumulation or average of the maximum similarities, and re-rank the retrieved document fragments according to the score to obtain a new sorted set; Content generation: Combine the query text data with the sorted set into a new input sequence, use it as the input of the large language model, and generate an enhanced answer by the large language model as the generated content.

8. The intelligent guidance method for ecological environment law enforcement inspection according to claim 7, characterized in that, The specific process of retrieving the graph database includes: Interaction and problem understanding: Understand the query intent through intent recognition and problem decomposition; Entity linking: Link the entities and labels in the query to the corresponding nodes in the knowledge graph through semantic recognition; Construct query path: Establish the shortest link between the query object and the label, and optimize the query path; Graph query: Query the subgraph related to the problem, input the Schema information into the large model, construct the CYPHER query statement, execute the query in the graph database, and retrieve relevant information; Summary of query results: Summarize and generalize the query results, and return the query results.

9. The intelligent guidance method for ecological environment law enforcement inspection according to claim 8, characterized in that, Retrieving the relational database specifically includes: Offline model training: Collect data tables covering the problem scope, select a pre-trained model for text generation tasks, and fine-tune the pre-trained model using the prepared dataset; the fine-tuning dataset includes natural language queries and corresponding SQL statements; Train the pre-trained model with the fine-tuning dataset, adjust the parameters of the pre-trained model to optimize its performance in specific business scenarios; during the training process, regularly evaluate the performance of the model to ensure the effectiveness of fine-tuning; Problem preprocessing: Pose the query problem in the form of natural language, and preprocess the input query, including word segmentation, stop word removal, part-of-speech tagging, and anaphora resolution; Intent recognition: Determine the query intent through natural language understanding, and associate the problem with the relevant table structure; Entity alignment: Extract relevant entities in the problem through entity extraction technology, use vector search to link to the specific values in the database, and perform alignment; SQL language conversion: Use the fine-tuned pre-trained model to convert the understood natural language query into an SQL query statement, and handle potential query optimizations to ensure query efficiency; SQL query execution: Execute the generated SQL query statement in the database to obtain the query results from the database; Result processing: Format, sort, and aggregate the query results to meet the user's query requirements; return the processed results, and convert the results into charts, lists, or other visual forms.

10. An intelligent guidance system for ecological environment law enforcement inspection, characterized in that, The intelligent guidance system includes a mobile interaction module, an intelligent guidance model, and an ecological environment law enforcement think tank; among them: Wake up the mobile interaction module and start the intelligent guidance model; Use the intelligent guidance model to identify natural language instructions from the ecological environment; Use the intelligent guidance model to extract the intent from the natural language instructions; Use the intelligent guidance model to retrieve relevant data matching the intent from the ecological environment law enforcement think tank; Use the intelligent guidance model to generate guidance item information based on multiple results; The mobile interaction module outputs intelligent guidance data based on the guidance item information.