An information retrieval method and system based on knowledge graph

By preprocessing railway data and real-time update of knowledge graphs, and optimizing them with user feedback, the problem of low accuracy of knowledge graph information retrieval in railway transportation is solved, achieving higher retrieval accuracy and user satisfaction.

CN118885622BActive Publication Date: 2025-03-18CHINA NAT INST OF STANDARDIZATION
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410907350.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2025-03-18
Estimated Expiration
2044-07-08

AI Technical Summary

Technical Problem

In the prior art, the accuracy of information retrieval through knowledge graphs in railway transportation is low, mainly due to the problems of noise, duplication, missing or inaccurate data obtained.

Method used

By preprocessing the initial railway data collected in real time, a railway data sequence is obtained, and a knowledge graph is constructed based on the data sequence. Combined with predicted key indicators such as train operation status and cargo arrival status, the knowledge graph is updated in real time, and it is matched with the user's real-time search information, and the knowledge graph is updated according to the user's feedback results.

Benefits of technology

It improves the accuracy of information retrieval through knowledge graphs in railway transportation, ensures real-time and accuracy of data, and enhances user satisfaction with search results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118885622B_ABST
    Figure CN118885622B_ABST
Patent Text Reader

Abstract

The present invention discloses an information retrieval method and system based on a knowledge graph, and relates to the technical field of electronic digital data processing. The information retrieval method based on the knowledge graph comprises the following steps: S1, collecting railway data sequences, S2, constructing a knowledge graph, S3, obtaining matching results, and S4, judging the matching results. The present invention obtains a railway data sequence by preprocessing the initial railway data in real time, then constructs a knowledge graph based on the railway data sequence and predicted key indicators, and then dynamically updates the knowledge graph according to the railway data sequence updated in real time, and finally matches the knowledge graph with the user's real-time search information to obtain a matching result, and judges whether the matching result is consistent with the user's feedback result, thereby achieving the effect of improving the accuracy of information retrieval through the knowledge graph in railway transportation, and solving the problem of low accuracy of information retrieval through the knowledge graph in railway transportation in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electronic digital data processing technology, and in particular to an information retrieval method and system based on a knowledge graph. Background Art

[0002] With the rapid development of information technology, the amount of information has exploded, and the channels and methods for people to obtain information have become increasingly diverse. At the same time, the demand for information retrieval in railway transportation has also increased. As an important research direction in the field of artificial intelligence, knowledge graph technology provides strong support for the field of information retrieval in railway transportation. Knowledge graph is a structured knowledge representation method that displays entities and their complex relationships in the form of graphs. In the field of railway transportation, knowledge graphs can cover entities such as trains and goods, as well as the relationships between them, to achieve comprehensive control and optimal allocation of railway transportation resources, and promote the intelligent development of the railway transportation industry.

[0003] In the prior art, a knowledge graph is constructed to perform semantic analysis on sentences, extract entities, concepts, and relationships, map them to the knowledge graph, and generate query paths for semantic matching, thereby achieving accurate retrieval of information.

[0004] For example, the data search method and device announced in the invention patent with announcement number: CN111159381B include: obtaining natural language input information; determining the search intent data corresponding to the natural language input information based on the natural language input information; determining the search intent type corresponding to the natural language input information based on the search intent data and a pre-established matching model, wherein the matching model is pre-established based on natural language historical input information, and the search intent type includes: list type, attribute value type or object information type; searching for data based on the natural language input information and the corresponding search intent type.

[0005] For example, a knowledge graph construction method announced in the invention patent with announcement number: CN112347263B includes: segmenting the sentence to be processed to obtain multiple individual words; identifying entities in multiple individual words to obtain entity pairs in groups of two; for each entity pair, obtaining the sentence vector of the sentence, the sentence vector includes the word-position vectors of multiple individual words; extracting the representation features of multiple aspects of the sentence according to the sentence vector; obtaining a fused feature according to the representation features of multiple aspects; predicting the entity relationship of the entity pair according to the fused feature; and constructing a knowledge graph according to the entity pairs and the corresponding entity relationships.

[0006] However, in the process of implementing the technical solution of the invention in the embodiments of the present application, the present application found that the above technology has at least the following technical problems:

[0007] In the existing technology, since the construction of the knowledge graph depends on high-quality data, the actual railway transportation-related data often has problems such as noise, duplication, missing or inaccurate, which makes it impossible to accurately construct the knowledge graph, and there is a problem of low accuracy in information retrieval through the knowledge graph in railway transportation. Summary of the invention

[0008] The embodiments of the present application solve the problem of low accuracy of information retrieval through knowledge graphs in railway transportation in the prior art by providing an information retrieval method and system based on knowledge graphs, thereby improving the accuracy of information retrieval through knowledge graphs in railway transportation.

[0009] An embodiment of the present application provides an information retrieval method based on a knowledge graph, comprising the following steps: S1, preprocessing the initial railway data collected in real time to obtain a railway data sequence, wherein the railway data sequence includes a train data sequence, a cargo data sequence, and a transportation environment data sequence; S2, obtaining the predicted key indicators of the train according to the railway data sequence and constructing a knowledge graph in combination with the railway data sequence, wherein the predicted key indicators include the train running status and the cargo arrival status; S3, matching the knowledge graph with the user's real-time search information to obtain a matching result; S4, judging whether the matching result is consistent with the user's feedback result, if so, outputting the matching result as the user's search result, and if not, updating the knowledge graph according to the user's real-time search information and the user's feedback result and executing S3 until the user's search result is obtained.

[0010] Furthermore, the specific acquisition process of the railway data sequence is as follows: check whether there are missing values ​​in the initial railway data and fill the missing values, thereby obtaining the first railway data sequence; check whether there are outliers in the first railway data sequence and remove the outliers, thereby obtaining the second railway data sequence; check whether there are duplicate values ​​in the second railway data sequence and delete the duplicate values, thereby obtaining the railway data sequence.

[0011] Furthermore, the specific method for obtaining the train running status is as follows: obtain the train running coefficient according to the train data sequence, and the train running coefficient is used to quantitatively determine the running status of the train; compare the obtained train running coefficient with the train running coefficient deviation, if the absolute value of the train running coefficient is not greater than the train running coefficient deviation, it indicates that the corresponding train running status is normal running, if the train running coefficient is greater than the train running coefficient deviation, it indicates that the corresponding train running status is delayed arrival, if the train running coefficient is less than the negative value of the train running coefficient deviation, it indicates that the corresponding train running status is early arrival; the train running coefficient is calculated by the following formula:

[0012]

[0013] Where t represents the number of the running time, t = 1, 2, ..., T, T represents the total running time, Z t represents the train operation coefficient at the tth running time, S represents the train travel distance in the preset time period, and Y t It represents the train running speed at the tth running moment, and Y0 represents the preset train running speed.

[0014] Furthermore, the specific method for obtaining the cargo arrival status is as follows: obtaining the cargo transportation status coefficient according to the train data sequence, and the cargo transportation status coefficient is used to judge the transportation status of the cargo; comparing the obtained cargo transportation status coefficient with the cargo transportation status deviation, if the cargo transportation status coefficient is less than the cargo transportation status deviation, it indicates that the corresponding cargo arrival status is that the cargo is being distributed, otherwise it indicates that the corresponding cargo arrival status is that the cargo has arrived; the cargo transportation status coefficient is calculated by the following formula:

[0015]

[0016] In the formula, t represents the number of the running time, t=1,2,……,T, T represents the total running time, D t represents the freight transport status coefficient at the t-th running time, S represents the train travel distance in the preset time period, and Y t represents the train running speed at the tth running time, and X0 represents the train departure time.

[0017] Furthermore, the specific steps of constructing the knowledge graph are as follows: obtaining entities and relationships between entities from the predicted key indicators of the train and the railway data sequence, thereby obtaining nodes and edges of the knowledge graph, and then obtaining the knowledge graph; comparing the constructed knowledge graph with the railway data sequence and combining the entity weights and relationship weights to obtain the knowledge graph conformity, the knowledge graph conformity is used to comprehensively quantify the conformity between the constructed knowledge graph and the railway data sequence; judging whether the knowledge graph conformity is within a preset threshold range, if the knowledge graph conformity is within the preset threshold range, it indicates that the knowledge graph construction is completed, otherwise the constructed knowledge graph is optimized until the corresponding knowledge graph conformity is within the preset threshold range; the knowledge graph conformity is calculated by the following formula:

[0018]

[0019] In the formula, F represents the conformity of the knowledge graph, |G1| represents the number of intersections between the knowledge graph and the railway data sequence entities, |G2| represents the number of unions between the knowledge graph and the railway data sequence entities, |H1| represents the number of intersections between the knowledge graph and the railway data sequence entities, |H2| represents the number of intersections between the knowledge graph and the railway data sequence entities, α represents the entity weight, and β represents the relationship weight.

[0020] Furthermore, the construction of the knowledge graph also includes dynamically updating the knowledge graph according to the real-time updated railway data sequence, and the specific steps are as follows: collecting initial railway data in real time, and preprocessing it to obtain a real-time railway data sequence, and adding a timestamp for each real-time railway data; comparing the data of the real-time railway data sequence with the railway data sequence according to a preset time window and obtaining key change points in the data; incrementally updating the knowledge graph according to the key change points, and the incremental update is used to update and create nodes, attributes and relationships of the knowledge graph.

[0021] Furthermore, the specific method for obtaining the user real-time search information is as follows: remove stop words from the initial user search information obtained, thereby obtaining the first user search information; perform word segmentation processing on the first user search information obtained, thereby obtaining the second user search information; perform synonym replacement on the second user search information obtained, thereby obtaining the user real-time search information.

[0022] Furthermore, the specific method for obtaining the matching result is as follows: preprocessing the initial user real-time search information to obtain the user real-time search information, executing the search statement in the knowledge graph, and combining the entity weight and the relationship weight to obtain the matching result; the matching result is calculated by the following formula:

[0023]

[0024] In the formula, P represents the matching result, |M| represents the number of entity sequences of user real-time retrieval information, |N| represents the number of entity sequences in the knowledge graph that satisfy the retrieval statement, |C| represents the number of intersections of matching entities, |A| represents the number of relationship sequences of user real-time retrieval information, |B| represents the number of relationship sequences in the knowledge graph that satisfy the retrieval statement, |E| represents the number of intersections of matching relationships, e represents a natural constant, α represents the entity weight, and β represents the relationship weight.

[0025] Furthermore, a specific method for obtaining the user feedback result is as follows: the user obtains the user feedback result by annotating the matching result, and the result annotation includes correct annotation and incorrect annotation; if the matching result does not meet the user feedback result, the knowledge graph is updated according to the user's real-time search information and the user feedback result, and matching is performed again, otherwise the matching result is output as the user search result.

[0026] An embodiment of the present application provides an information retrieval system based on a knowledge graph, and the information retrieval system based on the knowledge graph includes a data acquisition module, a knowledge graph construction module, an information matching module and a retrieval result judgment module; wherein the data acquisition module is used to preprocess the initial railway data collected in real time to obtain a railway data sequence, and the railway data sequence includes a train data sequence, a cargo data sequence and a transportation environment data sequence; the knowledge graph construction module is used to obtain the predicted key indicators of the train according to the railway data sequence and construct a knowledge graph in combination with the railway data sequence, and the predicted key indicators include the train running status and the cargo arrival status; the information matching module is used to match the knowledge graph with the user's real-time retrieval information to obtain a matching result; the retrieval result judgment module is used to judge whether the matching result is consistent with the user feedback result. If it is consistent, the matching result is output as the user retrieval result. If it is not consistent, the knowledge graph is updated according to the user's real-time retrieval information and the user feedback result, and then the function of the information matching module is executed until the user retrieval result is obtained.

[0027] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

[0028] 1. A knowledge graph is constructed through the obtained railway data sequence and updated in real time, and the knowledge graph is matched with the user's real-time search information. The user then provides feedback on the matching results, thereby realizing the real-time nature of railway data, and further improving the accuracy of information retrieval through knowledge graphs in railway transportation, effectively solving the problem of low accuracy of information retrieval through knowledge graphs in railway transportation in the prior art.

[0029] 2. By obtaining entities and the relationships between entities, the entities and relationships are used as nodes and edges to construct a knowledge graph. The railway data sequence is compared with the constructed knowledge graph to obtain the knowledge graph conformity. If the knowledge graph conformity is not within the preset threshold range, the knowledge graph is optimized until the knowledge graph conformity is within the preset threshold range. Otherwise, it indicates that the knowledge graph construction is completed, thereby improving the accuracy and reliability of the railway data, and further achieving the improvement of the accuracy and timeliness of the constructed knowledge graph.

[0030] 3. The user feedback results are obtained by the user annotating the matching results. If the matching results do not meet the user feedback results, the knowledge graph is adjusted and updated in time according to the user's real-time search information and user feedback results, and re-matching is performed. Otherwise, the matching results are output as user search results, thereby improving the accuracy and relevance of the matching results, and further achieving improved user satisfaction and loyalty. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 A flow chart of an information retrieval method based on a knowledge graph provided in an embodiment of the present application;

[0032] Figure 2 A schematic diagram of the change of the matching results provided in the embodiment of the present application;

[0033] Figure 3 A schematic diagram of the structure of an information retrieval system based on a knowledge graph provided in an embodiment of the present application. DETAILED DESCRIPTION

[0034] The embodiments of the present application solve the problem of low accuracy of information retrieval through knowledge graphs in railway transportation in the prior art by providing an information retrieval method and system based on a knowledge graph. The railway data sequence is obtained by collecting initial railway data in real time and preprocessing it. Then, a knowledge graph is constructed based on the railway data sequence and predicted key indicators. The knowledge graph is then dynamically updated according to the real-time updated railway data sequence. Finally, the knowledge graph is matched with the user's real-time search information to obtain a matching result, and it is verified whether the matching result is consistent with the user's feedback result, thereby improving the accuracy of information retrieval through knowledge graphs in railway transportation.

[0035] The technical solution in the embodiment of the present application is to solve the problem of low accuracy of information retrieval through knowledge graph in the above-mentioned railway transportation. The overall idea is as follows:

[0036] A knowledge graph is constructed through the obtained railway data sequence and updated in real time. The user's real-time search information is then matched with the knowledge graph to obtain matching results. Finally, it is verified whether it conforms to the user feedback results, thereby achieving the effect of improving the accuracy of information retrieval through knowledge graphs in railway transportation.

[0037] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0038] like Figure 1As shown, an information retrieval method and system flow chart based on a knowledge graph provided in an embodiment of the present application, the method comprising the following steps: S1, preprocessing the initial railway data collected in real time to obtain a railway data sequence, the railway data sequence comprising a train data sequence, a cargo data sequence and a transportation environment data sequence; S2, obtaining the predicted key indicators of the train according to the railway data sequence and constructing a knowledge graph in combination with the railway data sequence, and dynamically updating the knowledge graph according to the real-time updated railway data sequence, the predicted key indicators comprising the train running status and the cargo arrival status; S3, matching the knowledge graph with the user's real-time search information to obtain a matching result, the user's real-time search information comprising the entity, relationship and semantic information of the user's real-time search statement; S4, judging whether the matching result is consistent with the user's feedback result, if so, outputting the matching result as the user's search result, if not, updating the knowledge graph according to the user's real-time search information and the user's feedback result and executing S3 until the user's search result is obtained.

[0039] In this embodiment, the initial railway data represents data obtained through various data sources; the data sources include sensors, monitoring systems and positioning systems; the train data sequence includes a train real-time position sequence, a train speed sequence, a train number sequence, a start station sequence and a target station sequence; the cargo data sequence includes a cargo type sequence, a quantity sequence, a loading position sequence and an unloading position sequence; the transportation environment data sequence includes a weather condition sequence and a track state sequence; the predicted key indicators represent indicators meaningful to users predicted by analyzing the data; the train operation status includes normal operation, delayed arrival and early arrival; the cargo arrival status includes being delivered and arrived; the user real-time retrieval information is obtained by preprocessing the initial user real-time retrieval information, a retrieval statement is constructed based on the user real-time retrieval information, the retrieval statement is executed in the knowledge graph, entities and relationships related to the retrieval statement are obtained, and matching relationships are obtained by combining entity weights and relationship weights; the retrieval statement represents a constructed statement that conforms to the knowledge graph retrieval language; the entity represents a specific object in the retrieval statement; the relationship represents the association between entities; the semantic information represents the context information in the retrieval statement; the user feedback result represents the user's evaluation of the matching result; and the accuracy of information retrieval through the knowledge graph in railway transportation is improved.

[0040] Furthermore, the specific process of obtaining the railway data sequence is as follows: check whether the initial railway data has missing values ​​and fill the missing values, thereby obtaining the first railway data sequence, and the first railway data sequence represents the data after the initial railway data is filled with missing values; check whether the first railway data sequence has outliers and remove the outliers, thereby obtaining the second railway data sequence, and the second railway data sequence represents the data after the first railway data sequence is removed from the outliers; check whether the second railway data sequence has duplicate values ​​and delete the duplicate values, thereby obtaining the railway data sequence, and the railway data sequence represents the data after the second railway data sequence is deleted from the duplicate values.

[0041] In this embodiment, the initial railway data is checked, and the missing values ​​therein are filled with the average value of the initial railway data to obtain a first railway data sequence, wherein the missing value indicates that there is no data at a position where data is expected in the railway data sequence; the outlier indicates data that obviously deviates from the overall trend of the railway data. Generally, if a value exceeds the standard deviation of the mean plus or minus 2 times, it is considered to be an outlier; the repeated value indicates data records that appear repeatedly in the railway data sequence; the quality problems of the railway data sequence are eliminated, thereby achieving the integrity and accuracy of the railway data sequence.

[0042] Furthermore, the specific method for obtaining the train running status is as follows: the train running coefficient is obtained according to the train data sequence, and the train running coefficient is used to quantitatively judge the running status of the train; the obtained train running coefficient is compared with the train running coefficient deviation, if the absolute value of the train running coefficient is not greater than the train running coefficient deviation, it indicates that the corresponding train running status is normal running, if the train running coefficient is greater than the train running coefficient deviation, it indicates that the corresponding train running status is delayed arrival, if the train running coefficient is less than the negative value of the train running coefficient deviation, it indicates that the corresponding train running status is early arrival, and the train running coefficient deviation is used to measure the deviation between the train running status and the preset running status; the train running coefficient is calculated by the following formula:

[0043]

[0044] Where t represents the number of the running time, t = 1, 2, ..., T, T represents the total running time, Z t represents the train operation coefficient at the tth running time, S represents the train travel distance in the preset time period, and Y t It represents the train running speed at the tth running moment, and Y0 represents the preset train running speed.

[0045] In this embodiment, taking the train travel distance S in the preset time period as 100 (kilometers / km) and the preset train running speed Y0 as 50 (km / h) as an example, the statistical table of changes in the train operation coefficient is shown in Table 1:

[0046] Table 1 Statistics of changes in train operation coefficient

[0047] Time t <![CDATA[Train running speed Y t (km / h)]]> <![CDATA[Train operation coefficient Z t > 1 48.129 0.440 2 49.383 0.297 3 57.601 -0.686 4 61.124 -0.776 5 74.367 -0.982 ... ... ...

[0048] From Table 1, it can be seen that if the running speed of the first group of trains is less than the preset train running speed, the train running coefficient is greater than zero, and if the running speed of the third group of trains is greater than the preset train running speed, the train running coefficient is less than zero; if the fourth group and the fifth group are compared, the greater the train running speed, the smaller the train running coefficient; in general, the train running speed is inversely proportional to the train running coefficient, and the specific situation is compared based on the calculation results of the corresponding data, and the corresponding running coefficient relationship cannot be estimated based solely on the size of a single independent variable; an accurate assessment of the train running status is achieved, thereby improving the accuracy of knowledge graph construction.

[0049] Specifically, the train operation coefficient deviation is obtained from a preset database. In a specific embodiment, the relationship between the train operation speed at the tth moment and the train operation coefficient is fitted by the initial train operation speed and the preset train operation speed to obtain a fitting curve, and the real-time train operation speed is obtained according to the fitting curve to determine the corresponding train operation coefficient deviation.

[0050] Furthermore, the specific method for obtaining the cargo arrival status is as follows: obtain the cargo transportation status coefficient according to the train data sequence, and the cargo transportation status coefficient is used to judge the transportation status of the cargo; compare the obtained cargo transportation status coefficient with the cargo transportation status deviation, if the cargo transportation status coefficient is less than the cargo transportation status deviation, it indicates that the corresponding cargo arrival status is that the cargo is being distributed, otherwise it indicates that the corresponding cargo arrival status is that the cargo has arrived, and the cargo transportation status deviation is used to measure the deviation between the cargo transportation status and the preset transportation status; the cargo transportation status coefficient is calculated by the following formula:

[0051]

[0052] In the formula, t represents the number of the running time, t=1,2,……,T, T represents the total running time, D t represents the freight transport status coefficient at the t-th running time, S represents the train travel distance in the preset time period, and Y t represents the train running speed at the tth running time, and X0 represents the train departure time.

[0053] In this embodiment, taking the train travel distance S in the preset time period as 100 (kilometers / km) and the train departure time X0 as 5 (hours / h) as an example, the statistical table of changes in the freight transportation state coefficient is shown in Table 2:

[0054] Table 2 Statistics of changes in train operation coefficient

[0055] Time t <![CDATA[Train running speed Y t (km / h)]]> <![CDATA[Coefficient Z of goods transportation status t > 1 59.393 5.671 2 48.129 6.186 3 44.510 6.414 4 64.249 5.510 5 74.367 5.248 ... ... ...

[0056] From Table 2, comparing the second and third groups, the greater the train speed, the smaller the cargo transportation status coefficient; in general, the train speed is inversely proportional to the cargo transportation status coefficient. The specific situation is compared based on the calculation results of the corresponding data, and the corresponding operation coefficient relationship cannot be estimated based solely on the size of a single independent variable; the cargo transportation status deviation is obtained from the preset database, which is an indicator for quantitatively measuring the deviation between the cargo transportation status and the preset transportation status; it realizes an accurate assessment of the cargo transportation status, thereby improving the accuracy of knowledge graph construction.

[0057] Specifically, the cargo transportation state deviation is obtained from a preset database. In a specific embodiment, the relationship between the train running speed at the initial moment and the preset train running speed is fitted to obtain a fitting curve between the train running speed at the tth moment and the cargo transportation state coefficient, and the real-time cargo transportation state coefficient is obtained according to the fitting curve to determine the corresponding cargo transportation state deviation.

[0058] Furthermore, the specific steps of constructing the knowledge graph are as follows: obtain entities and the relationships between entities from the predicted key indicators of the train and the railway data sequence, and obtain the nodes and edges of the knowledge graph based on this, and then obtain the knowledge graph, where the nodes are entities and the edges are the relationships between entities, add attributes to the entities and relationships, and define the concepts in the field and their hierarchical relationships to form the ontology of the knowledge graph; compare the constructed knowledge graph with the railway data sequence and combine the entity weights and relationship weights to obtain the knowledge graph conformity, which is used to comprehensively quantify the conformity between the constructed knowledge graph and the railway data sequence; determine whether the knowledge graph conformity is within the preset threshold range. If the knowledge graph conformity is within the preset threshold range, it indicates that the knowledge graph construction is completed, otherwise the constructed knowledge graph is optimized until the corresponding knowledge graph conformity is within the preset threshold range; the knowledge graph conformity is calculated by the following formula:

[0059]

[0060] In the formula, F represents the conformity of the knowledge graph, |G1| represents the number of intersections between the knowledge graph and the railway data sequence entities, |G2| represents the number of unions between the knowledge graph and the railway data sequence entities, |H1| represents the number of intersections between the knowledge graph and the railway data sequence entities, |H2| represents the number of intersections between the knowledge graph and the railway data sequence entities, α represents the entity weight, and β represents the relationship weight.

[0061] In this embodiment, entities and the relationships between entities are obtained from the predicted key indicators of the train and the railway data sequence. Each node corresponds to an entity, and the edge between two nodes corresponds to the relationship. Detailed information is added to the nodes and edges, and concepts in the field and their hierarchical relationships are defined; the physical train is the core of transporting goods, and its attributes include train number, train position, expected running speed, and running status. The physical goods are the objects being transported, and their attributes include the starting station of the goods, the target station of the goods, and the transportation status of the goods. The station is a fixed point where the train stops, and its attributes include the geographical location information of the station. The transportation line is the path of the train, and its attributes include the starting station, the target station, and the transportation status. , distance, and estimated transportation time; when the number of intersections between the knowledge graph and railway data sequence entities or the number of intersections between the knowledge graph and railway data sequence relationships increases, the conformity between the railway data sequence and the knowledge graph increases; when the number of unions between the knowledge graph and railway data sequence entities or the number of unions between the knowledge graph and railway data sequence relationships increases, the conformity between the railway data sequence and the knowledge graph decreases; the ratio of the number of intersections to the number of unions between the knowledge graph and railway data sequence entities represents the conformity between the knowledge graph and railway data sequence entities; the ratio of the number of intersections to the number of unions between the knowledge graph and railway data sequence relationships represents the conformity between the knowledge graph and railway data sequence relationships.

[0062] Specifically, the entity weight is obtained from a preset database. In a specific embodiment, the relationship between the number of intersections of the user's real-time search information and the matching entities in the knowledge graph and the matching results is fitted by the number of entity sequences matching the user's real-time search information in the knowledge graph and the number of entity sequences of the user's real-time search information to obtain a fitting curve, and the corresponding entity weight is determined based on the number of intersections of the real-time user's real-time search information and the matching entities in the knowledge graph obtained from the fitting curve.

[0063] Specifically, the relationship weight is obtained from a preset database. In a specific embodiment, the relationship between the number of intersections of the user's real-time search information and the matching relationship in the knowledge graph and the matching result is fitted by the number of relationship sequences matching the user's real-time search information in the knowledge graph and the number of user's real-time search information relationship sequences to obtain a fitting curve, and the corresponding relationship weight is determined based on the number of intersections of the real-time user's real-time search information and the matching relationship in the knowledge graph obtained from the fitting curve.

[0064] Furthermore, a knowledge graph is constructed, and then the knowledge graph is dynamically updated according to the real-time updated railway data sequence. The specific steps are as follows: initial railway data is collected in real time, and preprocessed to obtain a real-time railway data sequence, and a timestamp of each real-time railway data is added; the real-time railway data sequence is compared with the railway data sequence according to a preset time window to obtain key change points in the data. The key change points represent data points that cause significant changes in nodes, attributes or relationships in the knowledge graph. Significant changes include the conversion of train operation status between normal arrival, delayed arrival and early arrival, the occurrence of failures, and the conversion of cargo arrival status between being distributed and having arrived; the knowledge graph is incrementally updated according to the key change points. The incremental update is used to update and create nodes, attributes and relationships in the knowledge graph.

[0065] In this embodiment, in each time window, the real-time railway data sequence is compared with the railway data sequence, and the key change points in the data are focused on. According to the identified key change points, the knowledge graph is incrementally updated, and the conformity of the knowledge graph is verified after each update. The incremental update operation is based on the following: if a new train, cargo or failure event is detected, a new node is created; if the attributes of an existing node change, the corresponding attributes are updated; if the relationship between the nodes changes, a new relationship is updated or created; if a train changes from normal arrival to delayed arrival, the state attribute of the train node in the knowledge graph is changed from "normal" to "delayed arrival". If a station fails and the train stays longer at the station, a new failure event node is created, and the relationship between the relevant train and the station in the knowledge graph is updated to reflect the extended stay time; if a cargo changes from the "delivery" state to the "arrived" state, the state attribute of the cargo node in the knowledge graph is updated from "delivery" to "arrived"; the timestamp is used to record a time mark for data collection; the preset time window is obtained from the preset database and is a preset time period for comparing and analyzing data; the accuracy and reliability of the knowledge graph are improved.

[0066] Furthermore, a specific method for acquiring user real-time search information is as follows: performing stop word removal on the acquired initial user search information, thereby acquiring first user search information, the first user search information representing data after the stop word removal processing on the initial user search information; performing word segmentation processing on the acquired first user search information, cutting continuous text into independent words or phrases through the maximum matching method, thereby acquiring second user search information, the second user search information representing data after the word segmentation processing on the first user search information; performing synonym replacement on the acquired second user search information, thereby acquiring user real-time search information, the user real-time search information representing data after the synonym replacement processing on the second user search information.

[0067] In this embodiment, taking railway-related retrieval information as an example, the user inputs "query the high-speed rail timetable and fare information from Beijing to Shanghai". After stop words are removed, "query the Beijing Shanghai high-speed rail timetable and fare information" is obtained. After word segmentation processing, ["query", "Beijing", "Shanghai", "high-speed rail", "timetable", "fare", "information"] is obtained. After synonym replacement, ["search", "Beijing", "Shanghai", "EMU", "timetable", "price", "information"] is obtained; stop words refer to common words that do not contribute to or interfere with the search results in information retrieval; word segmentation processing means dividing the text into meaningful units according to words; synonym replacement means replacing words in the text with other semantically similar words; the accuracy of information retrieval is improved.

[0068] Furthermore, the specific method for obtaining the matching results is as follows: preprocessing the initial user real-time search information to obtain the user real-time search information, executing the search statement in the knowledge graph, and combining the entity weight and the relationship weight to obtain the matching result, the user search information includes entities, the relationship between entities and attributes, and the search statement represents the statement established through the user real-time search information; the matching result is calculated by the following formula:

[0069]

[0070] In the formula, P represents the matching result, |M| represents the number of entity sequences of user real-time retrieval information, |N| represents the number of entity sequences in the knowledge graph that satisfy the retrieval statement, |C| represents the number of intersections of matching entities, |A| represents the number of relationship sequences of user real-time retrieval information, |B| represents the number of relationship sequences in the knowledge graph that satisfy the retrieval statement, |E| represents the number of intersections of matching relationships, e represents a natural constant, α represents the entity weight, and β represents the relationship weight.

[0071] In this embodiment, the number of intersections of matching entities represents the number of intersections of the user's real-time retrieval information entity sequence and all entity sequences in the knowledge graph that satisfy the retrieval statement; the number of intersections of matching relationships represents the number of intersections of the user's real-time retrieval information relationship sequence and all relationship sequences in the knowledge graph that satisfy the retrieval statement; taking the entity weight as 0.6, the relationship weight as 0.4, the number of user real-time retrieval information entity sequences as 10, the number of entity sequences in the knowledge graph that match the user's real-time retrieval information as 8, the number of user real-time retrieval information relationship sequences as 6, and the number of relationship sequences in the knowledge graph that match the user's real-time retrieval information as 4 as an example, Figure 2As shown, it is a schematic diagram of the change of the matching results provided in the embodiment of the present application, that is, the matching results and the number of intersections between the user's real-time retrieval information and the matching entities in the knowledge graph are positively correlated, and the matching results and the number of intersections between the user's real-time retrieval information and the matching relationships in the knowledge graph are positively correlated; it can be seen from the figure that the greater the number of intersections between the user's real-time retrieval information and the matching entities in the knowledge graph, the greater the matching result; the greater the number of intersections between the user's real-time retrieval information and the matching relationships in the knowledge graph, the greater the matching result.

[0072] Furthermore, a specific method for obtaining user feedback results is as follows: the user obtains user feedback results by annotating the matching results, and the result annotations include correct annotations and incorrect annotations. Correct annotations indicate that the matching results are consistent with the user's search information, and incorrect annotations indicate that the matching results are inconsistent with the user's search information; if the matching results do not meet the user feedback results, the knowledge graph is updated according to the user's real-time search information and the user feedback results, and matching is performed again, otherwise the matching results are output as user search results, the user feedback results are the annotations made by the user based on the matching results, and the user search results are the final results output to the user based on the matching results and the user feedback results.

[0073] In this embodiment, when the matching result is marked as an error, the system needs to update the knowledge graph based on the user's real-time search information and user feedback results, obtain the deficiencies or errors in the knowledge graph through the user feedback results, and incrementally update the knowledge graph to correct and supplement new information so that it more accurately reflects the user's needs and search intentions. The updated knowledge graph is matched again to provide results that are more in line with the user's expectations; the accuracy and relevance of the matching results are improved, thereby achieving an improvement in user satisfaction.

[0074] like Figure 3As shown, it is a structural schematic diagram of an information retrieval system based on a knowledge graph provided in an embodiment of the present application. An information retrieval system based on a knowledge graph provided in an embodiment of the present application includes: a data acquisition module, a knowledge graph construction module, an information matching module and a retrieval result judgment module; wherein the data acquisition module is used to preprocess the initial railway data collected in real time to obtain a railway data sequence, and the railway data sequence includes a train data sequence, a cargo data sequence and a transportation environment data sequence; the knowledge graph construction module is used to obtain the predicted key indicators of the train according to the railway data sequence and construct a knowledge graph in combination with the railway data sequence, and the predicted key indicators include the train running status and the cargo arrival status; the information matching module is used to match the knowledge graph with the user's real-time retrieval information to obtain a matching result, and the user's real-time retrieval information includes the entity, relationship and semantic information of the user's real-time retrieval statement; the retrieval result judgment module is used to judge whether the matching result is consistent with the user feedback result. If it is consistent, the matching result is output as the user retrieval result. If it is not consistent, the knowledge graph is updated according to the user's real-time retrieval information and the user feedback result, and the function of the information matching module is executed until the user retrieval result is obtained.

[0075] In this embodiment, the system establishes a user feedback channel, collects user annotations on matching results, obtains user feedback results, and updates the knowledge graph based on the user feedback results; thereby improving the practicality of the information retrieval system based on the knowledge graph, and further improving the accuracy of information retrieval.

[0076] To summarize, the embodiment of the present application constructs a knowledge graph through the obtained railway data sequence and updates it in real time, and matches the knowledge graph with the user's real-time search information, based on which the user provides feedback on the matching results, thereby achieving the real-time nature of the railway data, and further achieving improved accuracy of information retrieval through the knowledge graph in railway transportation, effectively solving the problem of low accuracy of information retrieval through the knowledge graph in railway transportation in the prior art.

[0077] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0078] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0079] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0080] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0081] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0082] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. An information retrieval method based on knowledge graph, characterized in that: The following steps are involved: S1, preprocessing the initial railway data collected in real time to obtain a railway data sequence, wherein the railway data sequence includes a train data sequence, a cargo data sequence, and a transportation environment data sequence; S2, obtaining the predicted key indicators of the train according to the railway data sequence and constructing a knowledge graph in combination with the railway data sequence, wherein the predicted key indicators include the train running status and the cargo arrival status; S3, matching the knowledge graph with the user's real-time search information to obtain matching results; S4, determine whether the matching result is consistent with the user feedback result. If it is consistent, the matching result is output as the user search result. If it is not consistent, the knowledge graph is updated according to the user's real-time search information and the user feedback result, and then S3 is executed until the user search result is obtained; The specific method for obtaining the train running status is as follows: Acquire a train operation coefficient according to the train data sequence, wherein the train operation coefficient is used to quantitatively determine the operation status of the train; The obtained train operation coefficient is compared with the train operation coefficient deviation. If the absolute value of the train operation coefficient is not greater than the train operation coefficient deviation, it indicates that the corresponding train operation state is normal operation. If the train operation coefficient is greater than the train operation coefficient deviation, it indicates that the corresponding train operation state is delayed arrival. If the train operation coefficient is less than the negative value of the train operation coefficient deviation, it indicates that the corresponding train operation state is early arrival. The train operation coefficient is calculated by the following formula: ; In the formula, t represents the number of the running time, , T represents the total running time, represents the train operation coefficient at the tth running time, S represents the train travel distance in the preset time period, represents the train running speed at the tth running time, Indicates the preset train running speed; The train operating coefficient deviation is obtained from a preset database. The relationship between the train operating speed at the tth moment and the train operating coefficient is fitted by the initial train operating speed and the preset train operating speed to obtain a fitting curve, and the real-time train operating speed is obtained according to the fitting curve to determine the corresponding train operating coefficient deviation.

2. The information retrieval method based on knowledge graph as claimed in claim 1, characterized in that: The specific acquisition process of the railway data sequence is as follows: Check whether the initial railway data has missing values ​​and fill the missing values, thereby obtaining the first railway data sequence; Check whether the first railway data sequence has outliers and remove the outliers, thereby obtaining a second railway data sequence; Check whether the second railway data sequence has duplicate values ​​and delete the duplicate values, thereby obtaining the railway data sequence.

3. The information retrieval method based on knowledge graph as claimed in claim 1, characterized in that: The specific method for obtaining the cargo arrival status is as follows: Acquire a cargo transportation status coefficient according to the train data sequence, wherein the cargo transportation status coefficient is used to determine the transportation status of the cargo; The obtained cargo transportation status coefficient is compared with the cargo transportation status deviation. If the cargo transportation status coefficient is less than the cargo transportation status deviation, it indicates that the corresponding cargo arrival status is that the cargo is being delivered; otherwise, it indicates that the corresponding cargo arrival status is that the cargo has arrived. The cargo transportation status coefficient is calculated by the following formula: ; In the formula, t represents the number of the running time, , T represents the total running time, represents the freight transport status coefficient at the t-th running time, S represents the train travel distance in the preset time period, Indicates The train running speed at the running time, Indicates the departure time of the train.

4. The information retrieval method based on knowledge graph according to claim 1, characterized in that: The specific steps of constructing the knowledge graph are as follows: Obtain entities and relationships between entities from the train prediction key indicators and railway data sequences, and obtain nodes and edges of the knowledge graph based on them, and then obtain the knowledge graph; The constructed knowledge graph is compared with the railway data sequence and the knowledge graph conformity is obtained by combining the entity weight and the relationship weight. The knowledge graph conformity is used to comprehensively quantify the conformity between the constructed knowledge graph and the railway data sequence. Determine whether the knowledge graph conformity is within the preset threshold range. If the knowledge graph conformity is within the preset threshold range, it indicates that the knowledge graph construction is completed. Otherwise, the constructed knowledge graph is optimized until the corresponding knowledge graph conformity is within the preset threshold range. The knowledge graph conformity is calculated using the following formula: ; In the formula, F represents the knowledge graph conformity, represents the number of intersections between the knowledge graph and the railway data sequence entities, represents the number of unions of knowledge graph and railway data sequence entities, represents the number of intersections between the knowledge graph and the railway data sequence relationship, represents the number of unions of the knowledge graph and the railway data sequence relationship, represents the entity weight, Represents the relationship weight.

5. The information retrieval method based on knowledge graph as claimed in claim 1, characterized in that: The construction of the knowledge graph further includes dynamically updating the knowledge graph according to the real-time updated railway data sequence. The specific steps are as follows: Collect initial railway data in real time, pre-process it to obtain a real-time railway data sequence, and add a timestamp to each piece of real-time railway data; Compare the data of the real-time railway data series with the railway data series according to the preset time window and obtain the key change points in the data; The knowledge graph is incrementally updated according to key change points, and the incremental update is used to update and create nodes, attributes and relationships of the knowledge graph.

6. The information retrieval method based on knowledge graph as claimed in claim 1, characterized in that: The specific method for obtaining the user real-time retrieval information is as follows: Remove stop words from the acquired initial user search information, and acquire first user search information accordingly; Performing word segmentation processing on the acquired first user search information, and acquiring second user search information accordingly; Synonym replacement is performed on the acquired second user search information, thereby acquiring the user real-time search information.

7. The information retrieval method based on knowledge graph as claimed in claim 6, characterized in that: The specific method for obtaining the matching results is as follows: Preprocess the initial user real-time search information to obtain the user real-time search information, execute the search statement in the knowledge graph, and obtain the matching results by combining the entity weight and relationship weight; The matching result is calculated by the following formula: ; In the formula, P represents the matching result, Indicates the number of information entity sequences retrieved by users in real time. Represents the number of entity sequences in the knowledge graph that satisfy the search statement. represents the number of intersections of matching entities, Indicates the number of user real-time retrieval information relationship sequences, Represents the number of all relation sequences in the knowledge graph that satisfy the search statement. represents the number of intersections of matching relationships, e represents a natural constant, represents the entity weight, Represents the relationship weight.

8. The information retrieval method based on knowledge graph as claimed in claim 1, characterized in that: The specific method for obtaining the user feedback result is as follows: The user obtains user feedback results by annotating the matching results, and the result annotations include correct annotations and incorrect annotations; If the matching result does not match the user feedback result, the knowledge graph is updated according to the user's real-time search information and the user feedback result, and matching is performed again, otherwise the matching result is output as the user search result.

9. An information retrieval system based on knowledge graph, used to execute the method according to any one of claims 1 to 8, characterized in that: The information retrieval system based on knowledge graph: includes a data collection module, a knowledge graph construction module, an information matching module and a retrieval result judgment module; The data acquisition module is used to pre-process the initial railway data collected in real time to obtain a railway data sequence, wherein the railway data sequence includes a train data sequence, a cargo data sequence and a transportation environment data sequence; The knowledge graph construction module is used to obtain the predicted key indicators of the train according to the railway data sequence and construct the knowledge graph in combination with the railway data sequence, wherein the predicted key indicators include the train running status and the cargo arrival status; The information matching module is used to match the knowledge graph with the user's real-time search information to obtain a matching result; The search result judgment module is used to judge whether the matching result is consistent with the user feedback result. If it is consistent, the matching result is output as the user search result. If it is not consistent, the knowledge graph is updated according to the user's real-time search information and the user feedback result, and then the function of the information matching module is executed until the user search result is obtained; The specific method for obtaining the train running status is as follows: Acquire a train operation coefficient according to the train data sequence, wherein the train operation coefficient is used to quantitatively determine the operation status of the train; The obtained train operation coefficient is compared with the train operation coefficient deviation. If the absolute value of the train operation coefficient is not greater than the train operation coefficient deviation, it indicates that the corresponding train operation state is normal operation. If the train operation coefficient is greater than the train operation coefficient deviation, it indicates that the corresponding train operation state is delayed arrival. If the train operation coefficient is less than the negative value of the train operation coefficient deviation, it indicates that the corresponding train operation state is early arrival. The train operation coefficient is calculated by the following formula: ; In the formula, t represents the number of the running time, , T represents the total running time, represents the train operation coefficient at the tth running time, S represents the train travel distance in the preset time period, represents the train running speed at the tth running time, Indicates the preset train running speed.

Citation Information

Patent Citations

  • Data search method and device

    CN111159381B

  • A knowledge graph construction method

    CN112347263B

  • Knowledge graph model construction method and device and storage medium

    CN112307217A

  • Knowledge graph-driven medical large model diagnosis method

    CN118280562A