Traffic safety law and regulation matching method and system based on adaptive routing and hybrid retrieval, electronic device and storage medium
Patent Information
- Application Number
- CN202611058669.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-16
- Publication Date
- 2026-09-29
AI Technical Summary
[0009]针对现有技术的不足,本发明提供基于自适应路由与混合检索的交通安全法律法规匹配方法、系统、电子设备及存储介质,能够根据用户输入的信息,自动识别查询意图,动态选择最优检索路径,精准匹配法规条款,解决现有混合检索策略僵化、引用准确率低、响应时间不可控的问题
[0041]本发明根据用户输入的隐患描述信息,利用LLM大模型自动识别查询意图和关键词,根据字符串模糊匹配+语义向量匹配的双重实体对齐结果动态选择最优检索路径,采用精确知识图谱查询、语义文档检索还是混合检索;实现了精准匹配法规条款,解决了现有混合检索策略僵化、引用准确率低、响应时间不可控的问题。
Smart Images

Figure CN122838685A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of traffic safety technology, and specifically relates to a method, system, electronic device and storage medium for matching traffic safety laws and regulations based on adaptive routing and hybrid retrieval. Background Technology
[0002] Currently, traffic safety hazard investigation mainly relies on manual inspections and manual verification of monitoring room displays. When a safety hazard is discovered and a rectification process is initiated, safety personnel need to rely on their own experience or manually consult a large number of legal documents to determine the legal basis and penalties for the hazard, such as the "Road Traffic Safety Law" and the "Technical Specifications for Safety in Highway Engineering Construction". This manual confirmation process is inefficient and prone to errors.
[0003] In recent years, some question-answering systems based on general-purpose large language models have emerged. Users input a description of a potential problem, and the model can return relevant legal provisions, such as DeepSeek and Tongyi Qianwen. Furthermore, Retrieval Augmentation (RAG) technology has also been used to improve the accuracy of large model responses, retrieving similar document fragments from vector databases as context. Some systems have introduced knowledge graphs, using structured triples to store legal entity relationships for retrieval. However, these systems often employ a hybrid strategy of "fixed parallel retrieval" or "manual rule switching," for example, always performing document retrieval and knowledge graph retrieval simultaneously and then simply concatenating them, or switching retrieval sources solely based on keyword appearance. Existing technologies have the following drawbacks:
[0004] (1) The general model has a serious problem of "knowledge illusion". The reference of the provisions of the regulations is often wrong, omitted or fabricated, especially the cross-reference between regulations and the exceptions.
[0005] (2) Pure document vector retrieval RAG can only perform semantic similarity matching. When the user’s description of the hidden danger is inconsistent with the wording of the original regulation, such as “soil piled up at the edge of the foundation pit” and “materials shall not be piled up within 1m of the edge of the foundation pit” in the standard, the retrieval results will be greatly biased; and it cannot support precise clause number query.
[0006] (3) Existing hybrid retrieval methods adopt fixed strategies, such as always performing parallel retrieval or switching based on simple keywords. They cannot dynamically determine "when to use documents and when to use graphs" according to the user's query intent, resulting in rigid retrieval paths, poor answer relevance, and long response times.
[0007] (4) Lack of intelligent judgment on the hierarchy of regulations, such as laws, administrative regulations, local regulations, and standards and norms, and easy to cite clauses with inappropriate validity.
[0008] (5) It cannot automatically handle multi-hop reasoning, such as: potential hazards → violation of prohibitive clauses → corresponding penalty clauses → possible exemption from liability. Therefore, a hybrid retrieval method that can adaptively adjust the retrieval strategy according to the query intent is needed to improve the accuracy and efficiency of matching safety laws and regulations. Summary of the Invention
[0009] To address the shortcomings of existing technologies, this invention provides a method, system, electronic device, and storage medium for matching traffic safety laws and regulations based on adaptive routing and hybrid retrieval. It can automatically identify the query intent based on user input information, dynamically select the optimal retrieval path, and accurately match legal clauses, solving the problems of rigidity, low citation accuracy, and uncontrollable response time in existing hybrid retrieval strategies.
[0010] To achieve one of the above objectives, the technical solution adopted by the present invention is as follows:
[0011] A traffic safety laws and regulations matching method based on adaptive routing and hybrid retrieval, characterized by the following steps:
[0012] Step S1: Construct a hybrid knowledge base of traffic safety laws and regulations;
[0013] Step S2: Based on user input information, perform domain intent recognition and keyword extraction; use dual entity alignment of string fuzzy matching + semantic vector matching to link the keywords with standard entities in the knowledge graph, and based on the dual entity alignment results, dynamically determine the optimal retrieval path, selecting precise graph query, semantic document retrieval, or a combination of both.
[0014] Step S3: Perform multi-source evidence fusion and conflict resolution on the search results in S2;
[0015] Step S4: Generate and output the final search results.
[0016] Furthermore, the hybrid knowledge base includes a structured knowledge graph and an unstructured document vector library.
[0017] Furthermore, S2 specifically includes:
[0018] S201: User input information, based on the LLM large model, performs domain intent recognition on the user input information and extracts keywords;
[0019] S202: A dual entity alignment mechanism of string fuzzy matching + semantic vector matching is adopted to link the keywords extracted in S201 with the standard entities in the structured knowledge graph. The result of the dual entity alignment is divided into empty alignment, full alignment, or partial alignment. The optimal retrieval path is determined based on the result of the dual entity alignment. If empty alignment is selected, semantic document retrieval is selected; if full alignment is selected, precise graph query is selected; if partial alignment is selected, a hybrid retrieval of precise graph and semantic document is selected.
[0020] Furthermore, S3 specifically includes:
[0021] S301: Linearize the structured triples returned by the structured knowledge graph into a natural language description;
[0022] S302: Preset priority chain rules: knowledge graph precise information > document retrieval fragments > large model's own knowledge, automatically adjudicating conflicts based on the preset priority chain.
[0023] Further, step S4 specifically includes:
[0024] S401: Knowledge fusion based on a multi-level cue word framework, generating results based on the fused evidence using an LLM large model, and annotating the citation sources;
[0025] S402: The output results are divided into two parts: "Content Summary" and "Comprehensive Description". The content summary is the list of relevant legal provisions, and the comprehensive description is the suggestions for hazard rectification.
[0026] To achieve the second objective mentioned above, the technical solution adopted by the present invention is as follows:
[0027] A traffic safety laws and regulations matching system based on adaptive routing and hybrid retrieval includes an information interaction layer, a core data processing layer, and a knowledge base layer. The information interaction layer is connected to the core data processing layer, and the core data processing layer is connected to the knowledge base layer.
[0028] The information interaction layer is used to receive Web and APP requests from clients, and uses API interfaces to process and respond to Web and APP requests.
[0029] The knowledge base layer includes a structured knowledge graph and an unstructured document vector library.
[0030] The core data processing layer includes a routing decision module, a fusion module, and an LLM large model module.
[0031] The routing decision module is connected to the knowledge base layer, the LLM large model module and the fusion module respectively. It is used to perform dual entity alignment on the input keyword information, dynamically decide the optimal retrieval path based on the alignment result, call the knowledge base layer to perform retrieval according to the optimal retrieval path, and send the obtained retrieval results to the fusion module.
[0032] The fusion module is used to perform multi-source evidence fusion and conflict resolution on the retrieval results returned by the routing decision module;
[0033] The LLM large model module is connected to the information interaction layer, the routing decision module, and the fusion module, respectively. It is used to perform domain intent recognition and keyword extraction on the input information and send it to the routing decision module. Based on the fusion result fed back by the fusion module, it understands the input information and knowledge and generates output results, which include corresponding "content summary" and "comprehensive description" information.
[0034] To achieve the third objective mentioned above, the technical solution adopted by the present invention is as follows:
[0035] An electronic device, characterized in that it comprises: a processor and a memory,
[0036] The memory is used to store the executable instructions of the processor;
[0037] The processor is configured to execute the aforementioned traffic safety laws and regulations matching method based on adaptive routing and hybrid retrieval.
[0038] To achieve the fourth objective mentioned above, the technical solution adopted by the present invention is as follows:
[0039] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method for matching traffic safety laws and regulations based on adaptive routing and hybrid retrieval.
[0040] Significant effects of the present invention:
[0041] This invention uses a large LLM model to automatically identify query intent and keywords based on the user-input description of potential hazards. It dynamically selects the optimal retrieval path based on the dual entity alignment results of string fuzzy matching and semantic vector matching, and adopts precise knowledge graph query, semantic document retrieval, or hybrid retrieval. It achieves accurate matching of legal provisions and solves the problems of rigidity, low citation accuracy, and uncontrollable response time of existing hybrid retrieval strategies.
[0042] Verified by the question-and-answer test set for potential traffic safety hazards, compared with the SOTA baselines of RAG-only, knowledge graph-only and fixed parallel hybrid retrieval, the present invention achieves a regulation citation accuracy of 91.8% and an answer relevance of 0.7605, both of which are significantly ahead of the prior art. Moreover, the present invention adopts adaptive routing selection, so that the average response time of 13.535 seconds is better than 14.217 seconds of fixed parallel hybrid retrieval, which improves the working efficiency and can be adjusted adaptively according to the query complexity.
[0043] The problem of matching synonymous variants of professional terms is solved by a dual entity alignment mechanism, and information conflicts from different retrieval sources are handled by a multi-source evidence fusion and conflict resolution mechanism, so that traceable and evidence-based rectification suggestions are finally generated. The F1 value, which is the harmonic mean of precision and recall of the dual alignment algorithm on the entity linking task, reaches 90.6%, which effectively solves the problem of synonymous variant matching, such as "drunk driving" and "intoxicated driving".
[0044] The method and system of the present invention have been verified in deployment in traffic safety consultation scenarios, run stably, and received good user feedback. Description of Drawings
[0045] Figure 1 is a schematic flow block diagram of the first specific embodiment of the present invention
[0046] Figure 2 is a system principle block diagram of the second specific embodiment of the present invention. Detailed Description
[0047] The following further describes in detail the specific implementation modes and working principles of the present invention with reference to the accompanying drawings. Specific Embodiment 1:
[0049] Referring to Figure 1 , a traffic safety law and regulation matching method based on adaptive routing and hybrid retrieval, comprising the following steps:
[0050] Step S1: Construct a hybrid knowledge base of traffic safety law and regulation information, wherein the hybrid knowledge base comprises a structured knowledge graph and an unstructured document vector library.
[0051] The structured knowledge graph takes regulation clauses, hidden danger types and punishment measures as entities, and the relationships include "violate", "apply to", "cite" and the like, which is used for constructing a regulation hierarchical network.
[0052] The unstructured document vector library stores slices of original regulation texts and supports semantic similarity retrieval.
[0053] Taking *Technical Specification for Safety of Highway Engineering Construction* and *Road Traffic Safety Law of the People's Republic of China* as examples, the structured knowledge graph is constructed by adopting the existing knowledge graph method that combines top-down and bottom-up approaches:
[0054] The entities include: "material stockpiling at the edge of the foundation pit", "Article 99", and "lack of safety protection".
[0055] The relationships include: "Violation" - "Material stockpiling at the edge of the foundation pit" violates Article 4.2.3 of the "Specification"; "Basis for punishment" - Violation of this article can be punished in accordance with Article 99 of the "Production Safety Law".
[0056] The knowledge graph is stored in the non-relational native graph database Neo4j and supports Cypher queries.
[0057] The method for constructing the unstructured document vector library is as follows:
[0058] The original text of the regulations is segmented by clause, vectorized using the BGE-large-zh model, and stored in the vector database ChromaDB. This BGE-large-zh model vectorization employs an existing Chinese text representation model developed by the Beijing Academy of Artificial Intelligence, mapping any text into a high-dimensional dense vector for tasks such as retrieval, classification, clustering, or semantic matching. The unstructured document vector library is also configured to store supplementary information related to traffic hazards, with this supplementary information stored in association with the corresponding text vectors.
[0059] Step S2: Based on user input, perform domain intent recognition and keyword extraction; employ dual entity alignment using string fuzzy matching and semantic vector matching to link the keywords with standard entities in the knowledge graph; based on the dual entity alignment results, dynamically determine the optimal retrieval path, selecting precise graph query, semantic document retrieval, or a hybrid of both. Specifically, this includes:
[0060] Step S201: User input information. Based on the LLM large model, domain intent recognition is performed on the user input information, and keyword extraction is performed. In this specific embodiment: the user input information is mainly text information. Based on the relevant hazard descriptions in the user input text information, the LLM large model first performs domain intent recognition to determine whether it belongs to the traffic safety domain. If it belongs to the traffic safety domain, keywords in the text information are extracted; if not, the user is prompted that the input is irrelevant and should re-enter the information. The LLM large model is a general large model. The domain intent recognition and keyword extraction of the LLM large model adopt existing methods, so they are omitted here in this specific embodiment.
[0061] Step S202: A dual entity alignment mechanism of string fuzzy matching and semantic vector matching is adopted to link the keywords extracted in step S201 with the standard entities in the structured knowledge graph. The result of the dual entity alignment is divided into empty alignment, full alignment, or partial alignment. The optimal retrieval path is determined based on the result of the dual entity alignment. If empty alignment is selected, semantic document retrieval is selected; if full alignment is selected, precise graph query is selected; if partial alignment is selected, a hybrid retrieval of precise graph and semantic document is selected, thereby realizing adaptive routing dynamic decision-making.
[0062] The string fuzzy matching is implemented using existing technology. By calculating the string similarity, if the score reaches a preset first threshold, the entity is determined to be successfully matched, which is used to align entities in a structured knowledge graph.
[0063] The semantic vector matching method employs existing semantic vector matching techniques, transforming text into dense vectors (Embeddings) in a high-dimensional space. It measures the deep semantic similarity between texts by calculating the mathematical distance between vectors (such as cosine similarity). If the calculated similarity score reaches a preset second threshold, the entity is considered successfully matched. This dual entity alignment approach, combining "fuzzy matching for coarse screening" with "vector matching for fine judgment," effectively improves the overall performance of entity recognition.
[0064] The method for determining whether an empty alignment, full alignment, or partial alignment is:
[0065] If all keywords are aligned to structured knowledge graph entities, it is considered a full alignment. A pure knowledge graph precise query is then performed, and precise knowledge graph information is obtained through precise matching of the fully aligned entities. A definitive clause is then returned.
[0066] If there is no keyword alignment, it is determined to be empty alignment. The keywords are linked with the unstructured document vector library, and pure document vector semantic retrieval is performed to obtain document retrieval fragments.
[0067] If some keywords are aligned, it is determined to be partially aligned. Knowledge graph retrieval and document retrieval are then performed. The keywords are linked with the structured knowledge graph and the unstructured document vector library. Subsequently, the information from the knowledge graph retrieval and the document retrieval is integrated.
[0068] This routing decision mechanism does not require model training and achieves low-latency adaptive scheduling only through dual threshold filtering and intersection operations.
[0069] This specific embodiment takes the potential hazard of "soil piling at the edge of the foundation pit" as an example:
[0070] The user input information is: "soil stacking at the edge of foundation pit", domain intention recognition is performed based on the LLM large model, the large model judges whether the information input by the user belongs to the field of traffic safety, if it is recognized as belonging to the field of traffic safety, keyword extraction is performed, and the keywords are "foundation pit" and "soil stacking" respectively.
[0071] Performing dual entity alignment:
[0072] For the keyword "foundation pit", the entity "foundation pit edge" in the structured knowledge graph is matched by string fuzzy matching; the string similarity with "foundation pit edge" is 82%, which is greater than the preset first threshold of 60%, and entity alignment is performed; semantic vector matching is adopted, and the cosine similarity of semantic vectors is 0.85, which is greater than the preset second threshold of 0.6, and entity alignment is performed.
[0073] For the keyword "soil stacking", the entity "stacked materials" in the structured knowledge graph is matched by string fuzzy matching, the string similarity with "stacked materials" is 75%, which is greater than the preset first threshold of 60%, and entity alignment is performed; semantic vector matching is adopted, and the cosine similarity of semantic vectors is 0.72, which is greater than the preset second threshold of 0.6, and entity alignment is performed.
[0074] The preset first threshold of 60% and the preset second threshold of 0.6 are preferred empirical values in this embodiment. Those skilled in the art can perform adaptive adjustment according to the actual scale of the traffic safety regulation database and the complexity of terms, and the present invention imposes no absolute limitation thereon.
[0075] If both string fuzzy matching and semantic vector matching satisfy the alignment condition, it is determined as full alignment, and the routing decision selects pure knowledge graph retrieval.
[0076] The user input information is: "Precautions for driving in rainy days", domain intention recognition and keyword extraction are performed through the LLM large model, it is recognized as belonging to the field of traffic safety, and the extracted keywords are: rainy days, driving. Dual entity alignment of "string fuzzy matching + semantic vector matching" is performed, if no entity is aligned, only empty alignment is allowed, the keywords are linked with the unstructured document vector library, the routing decision selects pure document retrieval, and pure document vector semantic retrieval is performed.
[0077] The user input information is: "No protective railing is provided at the foundation pit soil stacking place", domain intention recognition is performed through the LLM large model, it is determined as belonging to the field of traffic safety, then the keywords "protective railing" and "foundation pit soil stacking" are extracted. Dual entity alignment of "string fuzzy matching + semantic vector matching" is performed, if "protective railing" is not aligned and "foundation pit soil stacking" is aligned, partial alignment is formed, the routing strategy selects to execute knowledge graph retrieval and document retrieval in parallel, and fuse the retrieval results.
[0078] Step S3: performing multi-source evidence fusion and conflict resolution on the retrieval results in S2;
[0079] Specifically, it includes:
[0080] S301: Linearize the structured triples returned by the structured knowledge graph into a natural language description.
[0081] S302: Preset priority chain rules: knowledge graph precise information > document retrieval fragments > LLM large model's own knowledge, automatically adjudicating conflicts based on the preset priority chain.
[0082] For example, when a document retrieval fragment references an older version of a regulation while the knowledge graph has a newer version, the knowledge graph content is adopted. In this specific embodiment: when a user queries "construction vehicles not displaying warning signs," the search results from step S2 return a mixture of information from the two searches. If the document retrieval returns the older version of Article 52 of the Road Traffic Safety Law (which has been repealed), while the knowledge graph returns the latest revised version, the newer clause from the knowledge graph will be automatically adopted according to a preset priority chain rule: knowledge graph precise information > document retrieval fragment, and the answer will be marked "based on the latest revised version."
[0083] Step S4: Generate and output the final search results
[0084] Specifically, it includes:
[0085] S401: Knowledge fusion based on a multi-level cue word framework is performed. The results are generated using an LLM large-scale model based on the evidence fused in step S3, and the citation sources are annotated. The multi-level cue word framework includes role definitions, internal reasoning rules, output format constraints, etc. In this specific embodiment, an existing five-level standardized cue word framework is adopted.
[0086] S402: The output consists of two parts: a "Content Summary" and a "Comprehensive Description." The Content Summary is a list of relevant legal provisions, and the Comprehensive Description is a suggestion for rectifying potential hazards. Additionally, if the document fragment provides supplementary information, such as a range for fines, this supplementary information, retrieved from an unstructured document vector library, will be integrated into the Comprehensive Description. Specific Implementation Example 2:
[0088] See Figure 2 As shown, a traffic safety laws and regulations matching system based on adaptive routing and hybrid retrieval includes an information interaction layer, a core data processing layer, and a knowledge base layer. The information interaction layer is connected to the core data processing layer, and the core data processing layer is connected to the knowledge base layer.
[0089] The information interaction layer is used to receive Web and APP requests from the client, and uses API interfaces to process and respond to Web and APP requests. The user inputs information through the information interaction layer.
[0090] The knowledge base layer includes a structured knowledge graph and an unstructured document vector library.
[0091] The core data processing layer includes a routing decision module, a fusion module, and an LLM large model module.
[0092] The routing decision module performs dual entity alignment on the input keyword information using both fuzzy string matching and semantic vector matching. This links the keywords to standard entities in the structured knowledge graph. Based on the dual entity alignment results, it dynamically determines the optimal retrieval path, selecting either precise graph query, semantic document retrieval, or a hybrid retrieval mechanism, thus implementing an adaptive routing decision mechanism for retrieval. Following the optimal retrieval path, it calls the knowledge base layer to execute the retrieval and sends the obtained retrieval results to the fusion module.
[0093] The fusion module is used to perform multi-source evidence fusion and conflict resolution on the retrieval results of the routing decision module.
[0094] The LLM large model module is connected to the information interaction layer, the routing decision module, and the fusion module, respectively. It is used to perform domain intent recognition and keyword extraction on the input information and send it to the routing decision module. Based on the fusion result fed back by the fusion module, it understands the input information and knowledge and generates output results, which include corresponding "content summary" and "comprehensive description" information.
[0095] The specific functions of each module are the same as in Specific Embodiment 1, so this Specific Embodiment is omitted here. Specific Implementation Example 3:
[0097] This specific embodiment provides an electronic device, including: a processor and a memory.
[0098] The memory is used to store the executable instructions of the processor;
[0099] The processor is configured to execute the traffic safety laws and regulations matching method based on adaptive routing and hybrid retrieval as described in Specific Embodiment 1, therefore this Specific Embodiment is omitted here. Specific Implementation Example 4:
[0101] This specific embodiment provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it is the traffic safety laws and regulations matching method based on adaptive routing and hybrid retrieval described in Specific Embodiment 1. Therefore, this specific embodiment is omitted here.
[0102] The technical solution provided by this invention has been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the above embodiments are only intended to help understand the method and core ideas of this invention. It should be noted that those skilled in the art can make various improvements and modifications to this invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this invention.
Claims
1. A method for matching traffic safety laws and regulations based on adaptive routing and hybrid retrieval, characterized in that, Includes the following steps: Step S1: Construct a hybrid knowledge base of traffic safety laws and regulations; Step S2: Based on user input information, perform domain intent recognition and keyword extraction; use dual entity alignment of string fuzzy matching + semantic vector matching to link the keywords with standard entities in the knowledge graph, and based on the dual entity alignment results, dynamically determine the optimal retrieval path, selecting precise graph query, semantic document retrieval, or a combination of both. Step S3: Perform multi-source evidence fusion and conflict resolution on the search results in S2; Step S4: Generate and output the final search results.
2. The traffic safety laws and regulations matching method based on adaptive routing and hybrid retrieval according to claim 1, characterized in that: The hybrid knowledge base includes a structured knowledge graph and an unstructured document vector library.
3. The traffic safety laws and regulations matching method based on adaptive routing and hybrid retrieval according to claim 1, characterized in that: S2 specifically includes: S201: User input information, based on the LLM large model, performs domain intent recognition on the user input information and extracts keywords; S202: A dual entity alignment mechanism of string fuzzy matching + semantic vector matching is adopted to link the keywords extracted in S201 with the standard entities in the structured knowledge graph. The result of the dual entity alignment is divided into empty alignment, full alignment, or partial alignment. The optimal retrieval path is determined based on the result of the dual entity alignment. If empty alignment is selected, semantic document retrieval is selected; if full alignment is selected, precise graph query is selected; if partial alignment is selected, a hybrid retrieval of precise graph and semantic document is selected.
4. The traffic safety laws and regulations matching method based on adaptive routing and hybrid retrieval according to claim 1, characterized in that: S3 specifically includes: S301: Linearize the structured triples returned by the structured knowledge graph into a natural language description; S302: Preset priority chain rules: knowledge graph precise information > document retrieval fragments > large model's own knowledge, automatically adjudicating conflicts based on the preset priority chain.
5. The traffic safety laws and regulations matching method based on adaptive routing and hybrid retrieval according to claim 1, characterized in that: Step S4 specifically includes: S401: Knowledge fusion based on a multi-level cue word framework, generating results based on the fused evidence using an LLM large model, and annotating the citation sources; S402: The output results are divided into two parts: "Content Summary" and "Comprehensive Description". The content summary is the list of relevant legal provisions, and the comprehensive description is the suggestions for hazard rectification.
6. A traffic safety laws and regulations matching system based on adaptive routing and hybrid retrieval, characterized in that: It includes an information interaction layer, a core data processing layer, and a knowledge base layer. The information interaction layer is connected to the core data processing layer, and the core data processing layer is connected to the knowledge base layer. The information interaction layer is used to receive Web and APP requests from clients, and uses API interfaces to process and respond to Web and APP requests. The knowledge base layer includes a structured knowledge graph and an unstructured document vector library. The core data processing layer includes a routing decision module, a fusion module, and an LLM large model module. The routing decision module is connected to the knowledge base layer, the LLM large model module and the fusion module respectively. It is used to perform dual entity alignment on the input keyword information, dynamically decide the optimal retrieval path based on the alignment result, call the knowledge base layer to perform retrieval according to the optimal retrieval path, and send the obtained retrieval results to the fusion module. The fusion module is used to perform multi-source evidence fusion and conflict resolution on the retrieval results returned by the routing decision module; The LLM large model module is connected to the information interaction layer, the routing decision module, and the fusion module, respectively. It is used to perform domain intent recognition and keyword extraction on the input information and send it to the routing decision module. Based on the fusion result fed back by the fusion module, it understands the input information and knowledge and generates output results, which include corresponding "content summary" and "comprehensive description" information.
7. An electronic device, characterized in that, include: Processor and memory, The memory is used to store the executable instructions of the processor; The processor is configured to execute the traffic safety laws and regulations matching method based on adaptive routing and hybrid retrieval as described in any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the traffic safety laws and regulations matching method based on adaptive routing and hybrid retrieval as described in any one of claims 1 to 5.