High-speed traffic knowledge graph system, method, device and storage medium
By combining top-down and bottom-up approaches to construct a highway traffic knowledge graph, and employing sharded indexing and machine learning models, the problem of real-time monitoring and intelligent analysis of highway traffic conditions was solved, enabling timely updates of real-time data and intelligent question-and-answer functions.
Patent Information
- Application Number
- CN202510109824.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-01-23
AI Technical Summary
Existing technologies lack methods for constructing and maintaining knowledge graphs specifically for highway traffic, making it difficult to meet the characteristics of highway traffic and the timeliness requirements of real-time data. Traditional query mechanisms are also ill-suited to the rapid changes and complexities of highway traffic.
A business knowledge graph is constructed using a combination of top-down and bottom-up approaches. The real-time data graph is updated using a sharded indexing method, and intelligent analysis and question answering are performed using machine learning models to generate answers to user questions.
It enables real-time monitoring and rapid response to highway traffic conditions, supports intelligent analysis and question-and-answer functions, and can update real-time data maps in a timely manner, reducing the computational complexity of image recognition and improving question-and-answer performance.
Smart Images

Figure CN120012890B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of traffic knowledge graph technology, and in particular to a high-speed traffic knowledge graph system, method, device and storage medium. Background Technology
[0002] Traffic knowledge graphs aim to represent and store traffic-related signals in a structured way. As an emerging technology, they have shown great potential in improving traffic management, enabling more intelligent querying, analysis, and prediction.
[0003] While knowledge graphs have made significant progress in urban transportation, their application in highway transportation remains in its initial exploratory stage. Highway traffic patterns differ considerably from urban traffic patterns, necessitating consideration of highway characteristics when conducting traffic flow analysis or handling abnormal vehicles. For instance, due to the limited road space on highways, traffic congestion propagation and chain reactions caused by accidents are more pronounced, yet current technologies often limit analysis to the current road segment. Knowledge graph construction typically employs bottom-up and top-down approaches. Hybrid strategies have been proposed to compensate for the shortcomings of single methods, but the specific integration methods remain unclear. Furthermore, highway traffic conditions change rapidly, with vehicles entering and exiting the highway at every moment. Real-time data graphs are constantly evolving, and traditional knowledge graph query and modification mechanisms may struggle to meet this timeliness requirement.
[0004] Based on the above analysis of the development status of this technology field, existing technologies lack methods for constructing and maintaining knowledge graphs for highway traffic, designing application functions that fit highway scenarios, using a clear process to combine top-down and bottom-up approaches when constructing business knowledge graphs, and employing a sharded indexing method to maintain real-time data graphs with higher real-time requirements. Summary of the Invention
[0005] The purpose of this invention is to provide a high-speed traffic knowledge graph system, method, device, and storage medium, aiming to solve the above-mentioned problems in the prior art.
[0006] According to a first aspect of the present invention, a high-speed traffic knowledge graph system is provided, comprising:
[0007] The graph construction module is used to build a graph collection including domain knowledge graph, real-time data graph and business knowledge graph, and store the graph collection in the background. The business knowledge graph is built in an integrated manner.
[0008] The graph maintenance module is used to update the knowledge graph in the graph collection. The real-time data graph is updated in real time using a sharded index method.
[0009] The intelligent analysis module is used to analyze traffic conditions and obtain analysis results based on real-time data maps stored in the background using machine learning models;
[0010] The intelligent question-answering module is used to generate corresponding answers to user questions based on the graph set. After receiving the user's question from the front end, it extracts the user's intent and determines whether the user's question contains feature entities based on the intent. If not, it automatically generates prompt text.
[0011] According to a second aspect of the present invention, a method for creating a high-speed traffic knowledge graph is provided, comprising:
[0012] The graph construction module builds a graph collection including a domain knowledge graph, a real-time data graph, and a business knowledge graph, and stores the graph collection in the background. The business knowledge graph is built using an integrated approach.
[0013] The knowledge graph in the graph collection is updated through the graph maintenance module. The real-time data graph is updated in real time using a sharded indexing method.
[0014] The intelligent analysis module uses a machine learning model to analyze traffic conditions and obtain analysis results based on real-time data maps stored in the background.
[0015] The intelligent question-answering module generates corresponding answers to user questions based on the graph set. After receiving user questions from the front end, it extracts the intent of the user's question and determines whether the user's question includes feature entities based on the intent. If not, it automatically generates prompt text.
[0016] According to a third aspect of the present invention, an electronic device is provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the high-speed traffic knowledge graph method provided in the second aspect of the present disclosure.
[0017] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, on which an information transmission implementation program is stored, which, when executed by a processor, implements the steps of the high-speed traffic knowledge graph method provided in the second aspect of the present disclosure.
[0018] The technical solution provided by the embodiments of the present invention has the following beneficial effects: it establishes a graph set applicable to the field of highway traffic, which can monitor highway traffic status in real time and respond quickly, and supports intelligent analysis and intelligent question answering functions; the business knowledge graph is constructed in an integrated manner, taking into account the dynamic changes of strategic level and actual situation; the real-time data graph is updated in real time using a sharded indexing method, which can help the real-time data graph achieve timely updates.
[0019] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in one or more embodiments of this specification or in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a schematic diagram of the high-speed traffic knowledge graph system according to an embodiment of the present invention;
[0022] Figure 2 This is a schematic diagram of shard index update according to an embodiment of the present invention;
[0023] Figure 3 This is a schematic diagram of the high-speed traffic map structure according to an embodiment of the present invention;
[0024] Figure 4 This is a schematic diagram of the system architecture according to an embodiment of the present invention;
[0025] Figure 5 This is a flowchart of the high-speed traffic knowledge graph method according to an embodiment of the present invention;
[0026] Figure 6 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0027] To enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of this document.
[0028] System Implementation Examples
[0029] According to embodiments of the present invention, a high-speed traffic knowledge graph system is provided. Figure 1 This is a flowchart of the high-speed traffic knowledge graph system according to an embodiment of the present invention, such as... Figure 1 As shown, the high-speed traffic knowledge graph system according to an embodiment of the present invention specifically includes:
[0030] Graph construction module 10 is used to construct a graph collection including a domain knowledge graph, a real-time data graph, and a business knowledge graph, and to store the graph collection in the background. The business knowledge graph is constructed using an integrated approach, specifically including:
[0031] The domain knowledge graph construction module is used to build the knowledge graph in a top-down manner. It obtains the rules and common concepts of the high-speed transportation domain as a knowledge system, establishes the first graph framework based on the knowledge system, and fills the first graph framework with specific data to obtain the domain knowledge graph.
[0032] Since domain knowledge graphs focus more on standardized and consistent domain knowledge, a top-down approach is chosen for construction. The top-down approach starts with high-level concepts or a global perspective and then fills in specific data.
[0033] The real-time data map construction module is used to build data in a bottom-up manner to obtain real-time data generated on highways. The real-time data includes toll station entrance and exit flow data, gantry vehicle flow data, emergency command data, asset information data, charter order data, and hazardous goods transport order data to obtain a real-time data map.
[0034] Toll station entrance and exit flow data refers to records of vehicle entry and exit times, license plate numbers, etc.; gantry vehicle flow data includes information on vehicles passing through specific locations; emergency command data refers to information on traffic accidents, weather forecasts, and related events and their handling; asset information data covers the status and maintenance history of infrastructure such as road facilities, bridges, and tunnels; charter order data refers to details of car rental services for group travel or special needs; and dangerous goods cargo manifest data refers to relevant regulations and their implementation regarding the transportation of dangerous goods.
[0035] Because real-time data maps include a large amount of detailed data on vehicles, engineering, etc. on highways, a bottom-up approach is chosen to build them. Bottom-up approaches typically process basic data first and then integrate it to form larger units.
[0036] The business knowledge graph construction module is used to build the graph using both top-down and bottom-up integrated approaches. It acquires high-speed traffic-related businesses and generates clustering results using clustering algorithms. Based on the clustering results, it calculates the average revenue contribution within each category. Based on the average revenue contribution, it selects a category as the core business cluster. Based on the core business cluster, it constructs a second graph framework, fills the second graph framework, and expands the graph using a bottom-up approach to obtain the business knowledge graph.
[0037] In this embodiment of the invention, after determining the core business cluster, it is necessary to define relevant key concepts. If "highway monitoring" is defined as a core business in the cluster, then concepts such as "vehicle", "gantry", and "toll station" need to be defined.
[0038] In other words, the integration method first proceeds from top to bottom, and after the data is filled in, it expands and refines the map from bottom to top.
[0039] In this embodiment of the invention, a knowledge graph is constructed using data collected by sensors or cameras. The data processing includes extraction, integration, processing, transformation, and loading. Various types of data are extracted, including full extraction, incremental extraction, and real-time extraction. Entity recognition and relationship extraction utilize natural language processing technology to identify entities and their attributes, and extract the relationships between entities. The entities and relationships are then used to construct a knowledge graph. In this embodiment of the invention, the graph database is Neo4j.
[0040] The graph maintenance module 12 is used to update the knowledge graph in the graph collection. The real-time data graph is updated in real-time using a sharded indexing method, specifically including:
[0041] The direct update module is used to update the domain knowledge graph and the business knowledge graph;
[0042] Since the domain knowledge graph and business knowledge graph are updated at a low frequency, it is sufficient to use the update methods commonly used in the domain that can ensure accuracy. Therefore, this embodiment of the invention does not limit the update method of directly updating the knowledge graph in the model.
[0043] The shard index update module is used to update the real-time data map. It divides the real-time data map into data shards and stores them in the corresponding nodes. It maintains the copies of the data shards and the storage locations of the nodes in the standard retrieval library. It first updates the copies and then replaces the original data shards at the corresponding node locations with the updated copies.
[0044] In the distributed index update module, a large real-time data map is divided into multiple data slices and stored in corresponding nodes. Each node stores a part of the map and a series of corresponding data. The sharding method can distribute the load and make the system easier to scale horizontally.
[0045] The distributed nodes, when combined, can directly form a complete real-time data graph. The distributed nodes store the source data. Creating replicas avoids operational errors from direct updates, ensures security, and allows for quick location of the required update position. In this embodiment of the invention, preferably, a unique identifier that can identify the object is used as the query object in the standard retrieval library. The updated replica is quality checked before replacing the original data fragment. An automated script is written to check whether the updated part causes new conflicts. Figure 2 This is a schematic diagram of shard index update according to an embodiment of the present invention, as shown below. Figure 2 As shown, the distributed index architecture is illustrated.
[0046] The intelligent analysis module 14 is used to analyze traffic conditions and obtain analysis results based on real-time data maps stored in the background, using machine learning models. Specifically, it includes:
[0047] The traffic flow analysis module is used to acquire real-time data maps and construct road segment features. It acquires a pre-constructed highway traffic map structure, where nodes in the highway traffic map structure represent road segments and edges represent connections. It filters dependent road segments corresponding to the road segment to be analyzed from the highway traffic map structure, merges the road segment features of the road segment to be analyzed and dependent road segments as total features, and inputs the total features into a recurrent neural network to obtain the traffic flow prediction results of the road segment to be analyzed.
[0048] In the field of transportation, edges are often used as road segments. However, in this embodiment of the invention, it is important to select dependent road segments that are more relevant to the road segment to be analyzed when performing traffic flow analysis. Using connection relationships as edges is more reasonable. Figure 3 This is a schematic diagram of the high-speed traffic map structure according to an embodiment of the present invention, such as... Figure 3 As shown, the process of problem abstraction is illustrated. ABCDE are all road segments. In this embodiment of the invention, no other basic information about the graph structure is restricted.
[0049] The traffic analysis module is specifically used for:
[0050] Acquire real-time data from toll station entrances and exits, gantry vehicle flow data, emergency command data, and asset information data, and extract additional time features, gantry location, road segment length, and historical average traffic flow for the same period as basic road segment features;
[0051] Fourier transform is used to extract the periodic features of traffic flow data and extract historical events of road segments at different time scales. In this embodiment of the invention, the time scale includes hours, days, weeks and months. That is, the events before the time scale interval are extracted based on the current time node, namely, events one hour ago, one day ago, one week ago and one month ago. The periodic features and historical events are spliced together to form auxiliary features of the road segment.
[0052] The basic features and auxiliary features of a road segment are combined to form the road segment feature;
[0053] An embedding vector for each node is generated using a pre-trained graph neural network. Based on the embedding vector, the cosine similarity between the node represented by the road segment to be analyzed and the nodes within a preset number of hops is calculated. Dependent road segments are selected based on the cosine similarity, that is, the road segments with the highest cosine similarity are selected as dependent road segments. The road segment features of the road segment to be analyzed and all dependent road segments are combined as the total features. A recurrent neural network is used to obtain the traffic prediction result. In this embodiment of the invention, the recurrent neural network is a Long Short-Term Memory (LSTM) network because the LSTM model can predict the results at different time steps, which helps to provide more sufficient information reserves during intelligent question answering.
[0054] If a section of a highway becomes congested, drivers have fewer alternative routes to choose from compared to urban areas. Urban traffic flow analysis often focuses only on directly related road sections, but this embodiment of the invention can consider road sections that are not directly related. The preset number of hops can, to some extent, limit the distance between the road section to be analyzed and the dependent road sections to be too far.
[0055] In this embodiment of the invention, the vehicle anomaly identification is mainly divided into two categories. The first is based on the analysis of real-time data generated by the vehicle itself, corresponding to the first anomaly identification module. The second is to identify the lane change and intersection of the vehicle. For highway traffic, the requirements for lane change and intersection of vehicles are more stringent than those in urban areas, corresponding to the second anomaly identification module.
[0056] The first anomaly identification module is used to classify all vehicles in the current highway traffic into vehicle classes based on vehicle size, obtain real-time data maps to construct the clustering results of vehicle classes, and identify vehicles with abnormal clustering results as the first abnormal vehicles.
[0057] In this embodiment of the invention, vehicles can be classified into small cars, medium cars and large cars according to their size. A corresponding clustering diagram is constructed for each type of vehicle to obtain a clustering diagram for small cars, a clustering diagram for medium cars and a clustering diagram for large cars. Vehicles with similar vehicle sizes have many commonalities in their form patterns. Therefore, in each clustering diagram, vehicle samples that are far from the cluster can be regarded as the first abnormal vehicles.
[0058] The second anomaly identification module is used to identify vehicles changing lanes and weaving through traffic using a target detection model, and vehicles that change lanes and weaving through traffic more than a preset value are identified as the second abnormal vehicles.
[0059] The second anomaly detection module is specifically used for:
[0060] High-speed traffic video is acquired and segmented into frames. The resolution of the frames is reduced to obtain the pre-processed image. For the embodiments of the present invention, the content to be identified does not require the clarity of the image. Reducing the resolution can improve the computational efficiency. The distance threshold range of the lane lines in the pre-processed image is the area to be identified.
[0061] A lightweight target recognition model is used to identify lane changes and weaving by vehicles within the area to be identified. When the number of lane changes and weaving by a vehicle exceeds a threshold, a Kalman filter is used to track the lane changes and weaving by that vehicle, and a list including all filtered tracking is maintained, with the number of lane changes and weaving by each vehicle recorded in the list.
[0062] It should be noted that the number of occurrences threshold is not equal to the preset value. The number of occurrences threshold is the critical value that the Kalman filter needs to focus on detecting, while the preset value is the critical value for determining the second abnormal vehicle. Preferably, for charter order data and dangerous goods transport order data, the Kalman filter can be used to track them directly, or a smaller number of occurrences threshold and preset value can be set for focused attention.
[0063] The intelligent question-answering module 16 is used to generate corresponding answers to user questions based on the graph set. After receiving a user question from the front end, it extracts the intent of the user question and determines whether the user question includes feature entities based on the intent. If not, it automatically generates prompt text, which includes:
[0064] The intent analysis module is used to identify the intent of the user's question using a Naive Bayes classifier. The user's question is entered through the front-end interface.
[0065] In this embodiment of the invention, the user's question is "What is the traffic flow on section A?", and the Naive Bayes classifier categorizes the user's question as "traffic flow prediction".
[0066] The automatic suggestion module is used to extract the content entities in the user's question and obtain the feature topics defined in the preset rule matching table. If there is a content entity that belongs to the feature topic, then the user's question includes the feature entity, and the corresponding answer is directly retrieved in the graph set. Otherwise, a prompt text is generated to prompt the user to supplement the feature entity, and the answer is retrieved after the user has supplemented it.
[0067] The content entities identified by named entities are "Road Segment A" and "Traffic Flow". The feature theme defined in the preset rule matching table for "Traffic Flow Prediction" is "Time". This means that time is the key point for traffic prediction. Since there is no time-related content in the content entities, a prompt text "It is recommended to supplement time information" is generated and sent to the user.
[0068] After optimizing the user's query, a search request is sent to the backend to retrieve the results.
[0069] In addition, the high-speed traffic knowledge graph system also includes sorting and retrieval,
[0070] The above technical solutions of the embodiments of the present invention will be illustrated with reference to the following accompanying drawings.
[0071] Figure 4 This is a schematic diagram of the system architecture of an embodiment of the present invention, as shown below. Figure 4 As shown, the overall architecture of this invention is illustrated, including a platform service layer, a data support layer, and a foundation layer. The platform service layer is responsible for user interaction and interface display, including functions such as knowledge graph construction and intelligent question answering. The data support layer is used for data storage and related processing. The foundation layer is used for the deployment of software and hardware services, thus constructing a complete high-speed traffic knowledge graph system architecture. The system adopts containerized deployment.
[0072] In summary, addressing the existing problems, this invention, a high-speed traffic knowledge graph system, establishes a comprehensive knowledge graph set applicable to the highway traffic field. It enables real-time monitoring and rapid response of highway traffic conditions, supporting intelligent analysis and intelligent question-and-answer functions. In traffic flow analysis, it innovatively abstracts road segments as nodes, capturing the influence dependencies of directly or indirectly connected road segments to more comprehensively consider the chain reaction of highway traffic congestion. In vehicle anomaly identification, it defines only the distance threshold range of lane lines as the area to be identified, reducing the complexity of image recognition calculations. The intelligent question-and-answer module automatically generates prompt text to assist users in optimizing their questions and improving the question-and-answer effect. The business knowledge graph is constructed using an integrated approach, comprehensively considering both strategic and practical dynamic changes. The real-time data graph is updated in real-time using a sharded indexing method, ensuring timely updates. Distributing data across different nodes also distributes the load, making the system easier to scale horizontally.
[0073] Method Implementation Examples
[0074] According to embodiments of the present invention, a method for creating a high-speed traffic knowledge graph is provided. Figure 5 This is a schematic diagram of the high-speed traffic knowledge graph method according to an embodiment of the present invention, such as... Figure 5 As shown, the high-speed traffic knowledge graph method according to an embodiment of the present invention specifically includes:
[0075] In step S510, a graph set including a domain knowledge graph, a real-time data graph, and a business knowledge graph is constructed through the graph construction module, and the graph set is stored in the background. The business knowledge graph is constructed using an integrated approach, specifically including:
[0076] The domain knowledge graph construction module is built in a top-down manner to obtain the rules and common concepts of the high-speed transportation domain as a knowledge system. The first graph framework is established based on the knowledge system, and specific data is filled into the first graph framework to obtain the domain knowledge graph.
[0077] The real-time data map construction module is built in a bottom-up manner to obtain real-time data generated on highways. The real-time data includes toll station entrance and exit flow data, gantry vehicle flow data, emergency command data, asset information data, charter order data, and hazardous goods transport order data, to obtain a real-time data map.
[0078] The business knowledge graph construction module uses an integrated approach, including top-down and bottom-up methods, to build the graph. It acquires high-speed traffic-related businesses and generates clustering results using clustering algorithms. Based on the clustering results, it calculates the average revenue contribution within each category. Based on the average revenue contribution, it selects a category as the core business cluster. Based on the core business cluster, it constructs a second graph framework, fills the second graph framework, and expands the graph using a bottom-up approach to obtain the business knowledge graph.
[0079] In step S520, the knowledge graph in the graph set is updated through the graph maintenance module. The real-time data graph is updated in real-time using a sharded indexing method, specifically including:
[0080] The domain knowledge graph and business knowledge graph are updated directly through the update module;
[0081] The real-time data graph is updated through the shard index update module. The real-time data graph is divided into data shards and stored in the corresponding nodes. The copies of the data shards and the storage locations of the nodes are maintained in the standard retrieval library. The copies are updated first and then the updated copies replace the original data shards at the corresponding node locations.
[0082] In step S530, the intelligent analysis module analyzes traffic conditions using a machine learning model based on real-time data maps stored in the background, and obtains analysis results, specifically including:
[0083] The traffic analysis module acquires real-time data maps and constructs road segment features, and obtains a pre-constructed highway traffic map structure. In the highway traffic map structure, nodes represent road segments, and edges represent connections. Dependent road segments corresponding to the road segment to be analyzed are selected from the highway traffic map structure. The road segment features of the road segment to be analyzed and the dependent road segments are merged as the total features. The total features are input into a recurrent neural network to obtain the traffic prediction results of the road segment to be analyzed.
[0084] The traffic analysis module is specifically used for:
[0085] Acquire real-time data from toll station entrances and exits, gantry vehicle flow data, emergency command data, and asset information data, and extract additional time features, gantry location, road segment length, and historical average traffic flow for the same period as basic road segment features;
[0086] Fourier transform is used to extract the periodic features of traffic flow data, historical events of road segments at different time scales are extracted, and the periodic features and historical events are concatenated into auxiliary features of road segments.
[0087] The basic features and auxiliary features of a road segment are combined to form the road segment feature;
[0088] An embedding vector for each node is generated using a pre-trained graph neural network. Based on the embedding vector, the cosine similarity between the node represented by the road segment to be analyzed and the nodes within a preset number of hops is calculated. Dependent road segments are selected based on the cosine similarity. The road segment features of the road segment to be analyzed and all dependent road segments are combined as the total features. A recurrent neural network is then used to obtain the traffic prediction results.
[0089] The first anomaly identification module divides all vehicles in the current highway traffic into vehicle classes based on vehicle size, obtains real-time data maps to construct the clustering results of vehicle classes, and identifies vehicles with abnormal clustering results as the first abnormal vehicles.
[0090] The second anomaly identification module uses a target detection model to identify vehicles changing lanes and weaving through traffic, and vehicles that change lanes and weaving through traffic more than a preset value are identified as the second anomaly vehicles.
[0091] The second anomaly detection module is specifically used for:
[0092] High-speed traffic video is acquired and segmented into frames. The resolution of the frames is reduced to obtain preprocessed images. The distance threshold range of lane lines in the preprocessed images is the area to be identified.
[0093] A lightweight target recognition model is used to identify lane changes and weaving by vehicles within the area to be identified. When the number of lane changes and weaving by a vehicle exceeds a threshold, a Kalman filter is used to track the lane changes and weaving by that vehicle, and a list including all filtered tracks is maintained.
[0094] In step S540, the intelligent question-answering module generates corresponding answers to user questions based on the graph set. After receiving user questions from the front end, it extracts the intent of the user's question and determines whether the user question includes feature entities based on the intent. If not, it automatically generates prompt text, specifically including:
[0095] The intent analysis module uses a Naive Bayes classifier to identify the intent of the user's question;
[0096] The automatic prompting module extracts the content entities from the user's question and obtains the feature topics defined in the preset rule matching table. If there is a content entity that belongs to the feature topic, the user's question includes the feature entity, and the corresponding answer is directly retrieved in the graph set. Otherwise, a prompt text is generated to prompt the user to supplement the feature entity, and the answer is retrieved after the user has supplemented it.
[0097] In summary, addressing the existing problems, this invention presents a high-speed traffic knowledge graph method. It establishes a comprehensive knowledge graph set applicable to the highway traffic field, enabling real-time monitoring and rapid response of highway traffic conditions, and supporting intelligent analysis and question-and-answer functions. In traffic flow analysis, it innovatively abstracts road segments as nodes, capturing the influence dependencies of directly or indirectly connected road segments to more comprehensively consider the chain reaction of highway traffic congestion. In vehicle anomaly identification, it defines only the distance threshold range of lane lines as the area to be identified, reducing the complexity of image recognition calculations. The intelligent question-and-answer module automatically generates prompt text to assist users in optimizing their questions and improving the question-and-answer effect. The business knowledge graph is constructed using an integrated approach, comprehensively considering both strategic and practical dynamic changes. The real-time data graph is updated in real-time using a sharded indexing method, ensuring timely updates. Distributing data across different nodes also distributes the load, making the system easier to scale horizontally.
[0098] Electronic device examples
[0099] Figure 6 This is a schematic diagram of an electronic device according to an embodiment of the present invention. The electronic device 600 may include at least one processor 610 and a memory 620. The processor 610 can execute instructions stored in the memory 620. The processor 610 is communicatively connected to the memory 620 via a data bus. In addition to the memory 620, the processor 610 can also be communicatively connected to an input device 630, an output device 640, and a communication device 650 via the data bus.
[0100] Processor 610 can be any conventional processor, such as a commercially available CPU. The processor may also include, for example, a Graphics Processing Unit (GPU), a Field Programmable Gate Array (FPGA), a System on Chip (SOC), an Application Specific Integrated Circuit (ASIC), or a combination thereof.
[0101] The memory 620 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0102] In this embodiment of the disclosure, the memory 620 stores executable instructions, and the processor 610 can read the executable instructions from the memory 620 and execute the instructions to implement all or part of the steps of any of the exemplary embodiments of the high-speed traffic knowledge graph method described above.
[0103] Computer-readable storage medium embodiments
[0104] In addition to the methods and apparatus described above, exemplary embodiments of this disclosure may also be a computer program product or a computer-readable storage medium storing the computer program product, the computer product including computer program instructions that can be executed by a processor to implement all or part of the steps described in any of the high-speed traffic knowledge graph methods in the exemplary embodiments described above.
[0105] Computer program products can be written in any combination of one or more programming languages to perform the operations of the embodiments of this application. Programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages, and scripting languages (e.g., Python). The program code can be executed entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0106] Computer-readable storage media may take the form of any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media include: static random access memory (SRAM) having one or more electrically connected wires, electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk, or any suitable combination thereof.
[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A high-speed traffic knowledge graph system, characterized in that, include: The graph construction module is used to construct a graph set including a domain knowledge graph, a real-time data graph, and a business knowledge graph, and to store the graph set in the background. The business knowledge graph is constructed using an integrated approach, specifically including: The domain knowledge graph construction module is used to construct the knowledge graph in a top-down manner, obtain the rules and common concepts of the high-speed transportation domain as a knowledge system, establish a first graph framework based on the knowledge system, and fill the first graph framework with specific data to obtain the domain knowledge graph. The real-time data map construction module is used to construct data in a bottom-up manner to obtain real-time data generated on highways. The real-time data includes toll station entrance and exit flow data, gantry vehicle flow data, emergency command data, asset information data, charter order data, and hazardous goods transport order data to obtain a real-time data map. The business knowledge graph construction module is used to construct the graph using an integrated approach that includes top-down and bottom-up methods. It acquires high-speed traffic-related businesses and generates clustering results for the businesses using a clustering algorithm. Based on the clustering results, it calculates the average revenue contribution within each category. Based on the average revenue contribution, it selects a category as a core business cluster. Based on the core business cluster, it constructs a second graph framework, fills the second graph framework, and expands the graph using a bottom-up approach to obtain the business knowledge graph. The graph maintenance module is used to update the knowledge graph in the graph set, wherein the real-time data graph is updated in real time using a sharded indexing method; The intelligent analysis module is used to analyze traffic conditions and obtain analysis results based on the real-time data map stored in the background, using a machine learning model. Specifically, it includes: The traffic flow analysis module is used to acquire the real-time data map and construct road segment features, and acquire a pre-constructed highway traffic map structure, wherein the nodes of the highway traffic map structure represent road segments, the edges of the highway traffic map structure represent the existence of connection relationships, filter dependent road segments corresponding to the road segment to be analyzed in the highway traffic map structure, fuse the road segment features of the road segment to be analyzed and the dependent road segments as the total features, and input the total features into a recurrent neural network to obtain the traffic flow prediction result of the road segment to be analyzed; The first anomaly identification module is used to classify all vehicles in the current highway traffic into vehicle classes based on vehicle volume, obtain the real-time data map to construct the clustering results of the vehicle classes, and identify vehicles with abnormal clustering results as the first abnormal vehicles. The second anomaly identification module is used to identify vehicles changing lanes and weaving through traffic using a target detection model, and vehicles that change lanes and weaving through traffic more than a preset value are identified as second anomaly vehicles. The intelligent question-answering module is used to generate corresponding answers to user questions based on the graph set. After receiving a user question from the front end, it extracts the intent of the user question and determines whether the user question includes a feature entity based on the intent. If not, it automatically generates a prompt text.
2. The system according to claim 1, characterized in that, The map maintenance module specifically includes: The direct update module is used to update the domain knowledge graph and the business knowledge graph; The shard index update module is used to update the real-time data map, divide the real-time data map into data shards and store them in corresponding nodes, maintain the copies of the data shards and the node storage locations in the standard retrieval library, update the copies first and then replace the original data shards at the corresponding node locations with the updated copies.
3. The system according to claim 1, characterized in that, The flow analysis module is specifically used for: The system acquires toll station entrance and exit flow data, gantry vehicle flow data, emergency command data, and asset information data from the real-time data map, and extracts additional time features, gantry location, road segment length, and historical average flow rate for the same period as basic road segment features. Fourier transform is used to extract periodic features from traffic flow data, historical events of road segments at different time scales are extracted, and the periodic features and historical events are concatenated to form auxiliary features of road segments. The basic features and auxiliary features of the road segment are combined to form the road segment features; An embedding vector for each node is generated using a pre-trained graph neural network. Based on the embedding vector, the cosine similarity between the node represented by the road segment to be analyzed and the nodes within a preset number of hops is calculated. The dependent road segments are selected based on the cosine similarity. The road segment features of the road segment to be analyzed and all dependent road segments are combined as the total features. A recurrent neural network is then used to obtain the traffic prediction results.
4. The system according to claim 1, characterized in that, The second anomaly detection module is specifically used for: High-speed traffic video is acquired and segmented into frames. The resolution of the frames is reduced to obtain a preprocessed image. The distance threshold range of lane lines in the preprocessed image is the area to be identified. A lightweight target recognition model is used to identify lane changes and weaving by vehicles within the area to be identified. When the number of lane changes and weaving by a vehicle exceeds a threshold, a Kalman filter is used to track the lane changes and weaving by that vehicle, and a list including all filtered tracks is maintained.
5. The system according to claim 1, characterized in that, The intelligent question-answering module specifically includes: The intent analysis module is used to identify the intent of a user's question using a Naive Bayes classifier; The automatic prompting module is used to extract the content entities in the user's question, obtain the feature topics defined in the preset rule matching table of the intent, and if there is a content entity that belongs to the feature topic, then the user's question includes the feature entity, and the corresponding answer is directly retrieved in the knowledge graph set; otherwise, a prompt text is generated to prompt the user to supplement the feature entity, and the answer is retrieved after the user has supplemented the information.
6. A method for constructing a high-speed traffic knowledge graph, characterized in that, The high-speed traffic knowledge graph system for any one of claims 1 to 5 includes: A graph set including a domain knowledge graph, a real-time data graph, and a business knowledge graph is constructed through a graph construction module, and the graph set is stored in the background. The business knowledge graph is constructed in an integrated manner. The knowledge graph in the graph set is updated through the graph maintenance module, wherein the real-time data graph is updated in real time using a sharded indexing method; Based on the real-time data map stored in the background, the intelligent analysis module uses a machine learning model to analyze traffic conditions and obtain analysis results. The intelligent question-answering module generates corresponding answers to user questions based on the graph set. After receiving user questions from the front end, it extracts the intent of the user's question and determines whether the user's question includes feature entities based on the intent. If not, it automatically generates prompt text.
7. An electronic device, characterized in that, include: The memory, the processor, and the computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the high-speed traffic knowledge graph method as described in claim 6.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores an implementation program for information transmission, which, when executed by a processor, implements the steps of the high-speed traffic knowledge graph method as described in claim 6.
Citation Information
Patent Citations
Law question answering system based on intention recognition and knowledge graph
CN117891923A
Traffic accident prediction method and system based on Lie group manifold and time sequence knowledge graph
CN119204664A