Information search method and related apparatus, device and medium
By constructing graph-structured data in information search and converting it into serialized data stored in a graph database, the problem of low accuracy and recall in existing information search technologies is solved, achieving a wider data range and higher search accuracy.
Patent Information
- Application Number
- CN202410452052.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-15
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2044-04-15
AI Technical Summary
Existing technologies struggle to guarantee accuracy and recall when searching for information, especially when dealing with information related to object activities.
By collecting the movement data of the target object based on several preset points, dividing the data set, constructing the graph structure data, and using natural language query statements to search the graph structure data, including the construction of object nodes, set nodes, subset nodes and attribute nodes, the data is converted into serialized data and stored in the graph database for querying.
It expands the data scope of information search, breaks through the limitations of registration data, reduces search errors and omissions, and improves the accuracy and recall rate of information search.
Smart Images

Figure CN118349706B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to an information search method and related apparatus, equipment and media. Background Technology
[0002] Currently, existing technologies typically search for information related to an object by performing information searches within registration-type data (such as vehicle information registered with vehicle management departments).
[0003] However, the aforementioned methods are typically limited to searching for information about the inherent attributes of relevant objects. When searching for other information, such as information related to the object's activities, they are usually not feasible, resulting in difficulties in guaranteeing both accuracy and recall in information retrieval using existing technologies. Therefore, improving the accuracy and recall of information retrieval has become an urgent problem to be solved. Summary of the Invention
[0004] The main technical problem addressed by this application is to provide an information search method and related apparatus, equipment, and media that can improve the accuracy and recall rate of information search.
[0005] To address the aforementioned issues, the first aspect of this application provides an information search method, comprising: dividing data collected from several preset locations on a target object into data sets belonging to each target object; constructing graph structure data based on the data sets of each target object; and searching the graph structure data based on natural language query statements about the search target to obtain search results for the search target.
[0006] To address the aforementioned problems, a second aspect of this application provides an information search device, comprising: a partitioning module, a construction module, and a search module. The partitioning module is used to partition the travel data collected from target objects based on several preset points to obtain data sets belonging to each target object. The construction module is used to construct graph structure data based on the data sets of each target object. The search module is used to search the graph structure data based on natural language query statements about the search target to obtain search results for the search target.
[0007] To address the aforementioned problems, a third aspect of this application provides an electronic device including a memory and a processor coupled to each other. The memory stores program instructions, and the processor executes the program instructions to implement the information search method described in the first aspect.
[0008] To address the aforementioned problems, a fourth aspect of this application provides a computer-readable storage medium storing program instructions executable by a processor, the program instructions being used to implement the information search method described in the first aspect.
[0009] The above scheme, based on the movement data collected from several preset points on the target object, divides the data into sets belonging to each target object. Then, based on these sets, a graph structure is constructed. A natural language query about the search target is then used to search this graph structure to obtain search results. This approach expands the scope of information retrieval to the activity data of various objects, overcoming the limitation of existing technologies that can only search for information on registration-type data. Furthermore, by dividing the data into sets belonging to each target object and constructing graph structure data for searching, unstructured data can be converted into structured data, minimizing errors or omissions during the search. Therefore, it improves the accuracy and recall of information retrieval. Attached Figure Description
[0010] Figure 1 This is a flowchart illustrating an embodiment of the information search method of this application;
[0011] Figure 2 This is a schematic diagram of an embodiment of graph structure data;
[0012] Figure 3 This is a schematic diagram of another embodiment of graph structure data;
[0013] Figure 4a This is a schematic diagram of an embodiment of the sequence row data of an object node;
[0014] Figure 4b This is a schematic diagram of an embodiment of the sequence row data of a set node;
[0015] Figure 4c This is a schematic diagram of an embodiment of the sequence row data of a subset node;
[0016] Figure 4d This is a schematic diagram of an embodiment of the sequence row data of attribute nodes that represent characteristic attributes;
[0017] Figure 4e This is a schematic diagram of an embodiment of the sequence row data of attribute nodes representing link attributes;
[0018] Figure 5 This is a schematic diagram of the framework of an embodiment of the information search device of this application;
[0019] Figure 6 This is a schematic diagram of the framework of an embodiment of the electronic device of this application;
[0020] Figure 7 This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium of this application. Detailed Implementation
[0021] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0022] In the following description, specific details such as particular system architectures, interfaces, and technologies are presented for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of this application.
[0023] In this paper, the terms "system" and "network" are often used interchangeably. The term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "many" in this paper means two or more.
[0024] Please see Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the information search method of this application.
[0025] Specifically, this may include the following steps:
[0026] Step S11: Based on the travel data collected from several preset points on the target object, divide the data into sets belonging to each target object.
[0027] In one implementation scenario, for example, if N target objects pass through a preset point (e.g., a toll station), their travel data can be collected separately. The preset point can then collect the travel data of the N target objects sequentially. As one possible implementation, the travel data of a target object at a preset point may include: travel time, images taken during the journey, and the identifier of the preset point (e.g., latitude and longitude, point code, etc.), which is not limited here. Of course, the above example is merely one possible illustration in practical application and does not limit the specific process of collecting travel data.
[0028] In one implementation scenario, taking the travel data containing captured images as an example, target detection can be performed on the captured images to obtain the target regions of the target objects in the captured images. Then, feature extraction is performed based on the target regions to obtain the image features of the target objects in the captured images. Based on this, the captured images can be clustered according to the image features to obtain several cluster sets, and each cluster set contains at least one captured image. For example, the similarity between the image features extracted from each captured image can be obtained, and captured images with similarity higher than a preset threshold can be grouped into the same cluster set. Of course, other clustering methods such as K-Means can also be used, and are not limited here. After obtaining several cluster sets, the travel data to which each captured image in the same cluster set belongs can be grouped into the same data set, which can be considered as a data set belonging to the same target object. Of course, when the target objects are different types of objects, the above clustering process can also be adaptively adjusted. For example, when the target object is a vehicle, the target region obtained by target detection of the captured images should at least cover the entire vehicle. As a possible implementation, the target region obtained by target detection should preferably cover the distinctive parts that can distinguish different target objects. When the target object is another type of object, the same principle applies, and examples will not be given here.
[0029] Step S12: Construct graph structure data based on the data sets of each target object.
[0030] In one implementation scenario, graph-structured data can specifically contain object nodes, set nodes connected to object nodes, subset nodes connected to set nodes, and attribute nodes connected to subset nodes. It should be noted that object nodes represent target objects, set nodes represent the dataset of target objects, subset nodes represent subsets of data consisting of path data collected from the same preset point, and attribute nodes represent data attributes derived from the path data collected from the target point within the dataset. The target point is one of several preset points, and attribute nodes are connected to subset nodes related to the target point. This method, by constructing graph-structured data through object nodes, set nodes, subset nodes, and attribute nodes, can structurally, systematically, and comprehensively represent the relevant attributes of a target object as it traverses different preset points, helping to improve the accuracy and recall of information retrieval.
[0031] In a specific implementation scenario, the data attributes extracted from the travel data collected from the same preset point within the dataset include at least one of the following: spatiotemporal attributes, feature attributes, and link attributes. It should be noted that different attribute nodes connected to the same subset node represent different data attributes. That is, different attribute nodes connected to the same subset node represent different data attributes of the travel data collected from the target object by the preset point of the subset node. Furthermore, spatiotemporal attributes represent the time and space information of the travel data collected from the same preset point, feature attributes represent the physical characteristics of the target object, and link attributes contain the link address of the travel data collected from the same preset point, such as a URL (Uniform Resource Locator) address. Taking a vehicle as an example, spatiotemporal attributes can include the time information (e.g., month and day) and space information (e.g., route) of a vehicle's travel data collected from the same preset point; still using a vehicle as an example, feature attributes can represent physical characteristics of the vehicle, such as vehicle type (e.g., sedan, SUV, truck, etc.) and body color (e.g., white, black, red, etc.). When the target object is another type of object, the same principle applies, and examples will not be given here. The above method uses data attributes that include at least one of spatiotemporal attributes, feature attributes, and link attributes, which can comprehensively represent the relevant attributes of the target object and help improve the accuracy and recall of information retrieval.
[0032] In a specific implementation scenario, please refer to the relevant documents. Figure 2 , Figure 2 This is a schematic diagram of an embodiment of graph-structured data. For example... Figure 2 As shown, the graph structure data includes object nodes representing target object A, set nodes connected to it and representing the data set of target object A, two subset nodes connected to the set nodes and representing data subset A and data subset B belonging to target object A respectively, and attribute nodes connected to the subset node representing data subset A and representing different data attributes such as spatiotemporal attributes, feature attributes, and link attributes respectively. Of course, Figure 2 The example shown is merely one possible instance of graph-structured data and does not limit the specific form of graph-structured data in actual applications.
[0033] In one implementation scenario, after dividing the data sets of various target objects, several data subsets can be obtained based on the preset points from which each row of data originates. Then, based on the row data within these subsets, at least one data attribute is extracted. This allows for the construction of graph-structured data based on the object information of the target objects, the set information of the data sets, the point information of the preset points, and the data attributes. This approach, by first dividing the data into subsets and then extracting at least one data attribute from each subset, combines the object information of the target objects, the set information of the data sets, the point information of the preset points, and the data attributes to construct graph-structured data. This maximizes the completeness of the graph-structured data, contributing to improved accuracy and recall during subsequent information searches.
[0034] In a specific implementation scenario, taking target object A as an example, its dataset contains several travel data points, one part of which comes from preset point A and the other part from preset point B. Based on this, the dataset can be divided into two subsets, which can be referred to as subset A and subset B for easy distinction. Subset A contains travel data from preset point A, and subset B contains travel data from preset point B. Of course, the above example is merely one possible illustration in practical applications and does not limit the specific number of data subsets.
[0035] In a specific implementation scenario, after dividing the data into subsets, feature extraction can be performed on the passing data within these subsets to obtain the feature attributes of the data subsets. For example, taking the passing data as including captured images, target detection can be performed on the captured images to obtain the target regions of the target objects in the captured images. Then, based on the image data in the target regions, the attribute features of the target objects can be extracted. Taking a vehicle as an example, attribute features such as the vehicle model and body color of the target object can be extracted.
[0036] In a specific implementation scenario, after dividing the data into subsets, the data within the subsets can be stored, and the link addresses to their storage spaces can be obtained. Based on these link addresses, the link attributes of the data subsets can be obtained.
[0037] In a specific implementation scenario, after dividing the data into subsets, the collection time of the data passing through the subset can be analyzed. For example, if the collection time is from XX:00 AM to XX:00 PM on XX month XX day, the temporal attribute of the data subset can be obtained based on this. Similarly, based on the location information of the preset points of each data point within the subset, such as the preset point being located on XX road, the spatial information of the data subset can be obtained. Based on this, the spatiotemporal attributes of the data subset can be obtained by combining the temporal and spatial attributes.
[0038] It should be noted that the above examples are only a few possible examples when the data attributes of a data subset include feature attributes, link attributes, and spatiotemporal attributes. When the data attributes also include other types of attributes, the same logic can be applied, and they will not be listed one by one here.
[0039] In a specific implementation scenario, to further improve the accuracy and recall of information retrieval, the relationships between various target objects can also be obtained. For example, these relationships can be obtained through registration data analysis. For instance, registration data might reveal that target object A and target object B belong to the same location. Based on this, a graph structure can be constructed using the object information of the target objects, the relationships between them, the set information of the dataset, the location information of preset points, and data attributes. The corresponding nodes of the target objects with relationships are connected in the graph structure through edges, and the edge attribute of these edges is the relationship. Please refer to [further details needed]. Figure 2 Taking vehicles as an example, Figure 2 Taking a scenario where target object A and target object B belong to the same location, we can connect the object nodes of target object A to the object nodes of target object B, and attach an association relationship to the connection edge. Of course, Figure 2 The example shown is merely one possible instance in a practical application and does not limit other relationships. Furthermore, when other relationships exist between target objects, graph structure data can be constructed similarly, which will not be listed here. The above method first obtains the relationships between various target objects, and then constructs graph structure data based on the object information of the target objects, the relationships between the target objects, the set information of the data set, the location information of the preset points, and the data attributes. The corresponding nodes of the target objects with relationships are connected in the graph structure data through connecting edges, and the edge attributes of the connecting edges are relationships. Therefore, the graph structure data can further represent the relationships between objects, thus enabling the graph structure data to characterize the relationships between the data set and target objects, and between target objects themselves. This makes the relationships more intuitive and helps improve the accuracy and recall rate of subsequent information searches.
[0040] Step S13: Search the graph structure data based on the natural language query statement about the search target to obtain the search results for the search target.
[0041] In this embodiment, the search target can be a specific object, an attribute of an object, or an activity of an object; the specific meaning of the search target is not limited here. Furthermore, the natural language query can be input by the user through a client, or generated by the user selecting time, location, etc., on the client side. It should be noted that when a user inputs a natural language query through a client, the client needs to transmit the user's intent and other information to the server. The user's intent includes information such as time, location, and query statement. Time can be selected by the user or included in the query statement. If selected, the time transmitted to the server will be in a pre-defined format, such as a timestamp, year, month, and day. The time in the query statement does not require processing. For spatial information, the methods of transmitting it to the server include latitude and longitude and address selection. Address selection includes methods such as province, city, district, and street.
[0042] As one possible implementation, taking a certain object as the search target, the natural language query statement about the search target may include, but is not limited to: green sedan on XX Road in XX City, red sports car on XX Road in XX City during XX time period, etc., without limitation.
[0043] As one possible implementation, taking a certain attribute of an object as the search target, the natural language query statement about the search target may include, but is not limited to: where the red sports car that appeared on XX Road in XX City during the XX time period in the morning was located at the XX time period in the afternoon, or where the green sedan on XX Road in XX City was located at the XX time period in the morning, etc., without limitation.
[0044] As one possible implementation method, taking a certain object or activity as the search target, the natural language query statement about the search target may include, but is not limited to: whether there are non-public vehicles driving in the bus lane on XX Road in XX City during XX time period, whether there are green cars entering XX Hospital on XX Road in XX City during XX time period, etc., without limitation.
[0045] It should be noted that the examples above are merely a few possible examples of search targets and do not limit the specific content of search targets and their natural language queries.
[0046] In one implementation scenario, the natural language query can be analyzed first to obtain the node query path related to the search target. For example, taking the natural language query "XX City XX Road Green Car" as an example, the node query path can be parsed as: (attribute node, feature attribute, green), (attribute node, spatiotemporal attribute, XX City XX Road). Of course, the above example is only one possible example of the node query path in practical applications and does not limit the specific content of the node query path. Furthermore, if the natural language query about the search target contains other content, the node query path can be deduced similarly, which will not be listed here. Based on this, the node query path can be used to query graph structure data to obtain the search results for the search target. Please refer to 3. Figure 3 This is a schematic diagram of another embodiment of graph-structured data. It should be noted that... Figure 3 The image shown is only a portion of the data in the constructed graph structure described above. For example... Figure 3 As shown, taking vehicles as an example, the natural language query "green sedan on XX Road, XX City" can be found in the constructed graph structure data by following the node query path (attribute node, feature attribute, green) and (attribute node, spatiotemporal attribute, XX City, XX Road). Figure 3 The partial graph structure data shown above, which meets the requirements of the node query path, can be used to search for the object node connected to the set node in the graph structure data, namely vehicle A, which is the search result of the natural language query "green sedan on XX Road, XX City". Of course, the above example is only one possible example in actual application. If the natural language query or the graph structure data is different, the search can be performed in the same way, which will not be elaborated here.
[0047] In another implementation scenario, unlike the aforementioned methods, to further improve search efficiency, after constructing the graph structure data and before searching the graph structure data based on natural language queries, the graph structure data can be converted into serialized data based on the unique identifiers and node attributes of the nodes. This serialized data is then stored in a graph database. During information retrieval, a database query statement can be generated from the natural language query, and then the database query statement can be used to search the graph database to obtain search results. This approach, by converting the graph structure data into serialized data and storing it in a graph database, and then using natural language queries to generate database query statements and search the graph database to obtain search results, means that the entire information retrieval process only additionally relies on the graph database engine. Under a specific graph database storage format, there is no additional storage consumption. Furthermore, using graph query language to query features and spatiotemporal relationships makes graph queries more efficient and readable in relational query scenarios.
[0048] In a specific implementation scenario, graph databases can include, but are not limited to, JanusGraph graph databases, etc. Taking JanusGraph graph database as an example, its computation engine is JanusGraph, and its underlying data storage is HBase. The same principle applies when using other types of graph databases; further examples will not be provided here. It should be noted that using HBase as the underlying storage offers excellent scalability for attributes and nodes / edges. Furthermore, sharing storage with the graph database reduces storage space requirements.
[0049] In a specific implementation scenario, during the conversion of graph-structured data into serialized data, for each node in the graph-structured data, a sequence of rows starting with the node's unique identifier can be generated. Then, based on the node's attributes, columns of data within the sequence of rows can be generated. Finally, the serialized data is obtained by combining the sequence of rows from each node. Please refer to the following example... Figure 2 and Figure 4a , Figure 4b , Figure 4c , Figure 4d , Figure 4a This is a schematic diagram of an embodiment of the sequence row data of an object node. Figure 4b This is a schematic diagram of an embodiment of the sequence row data of a set node. Figure 4c This is a schematic diagram of an embodiment of the sequence row data of a subset node. Figure 4d This is a schematic diagram of an embodiment of a sequence of attribute nodes representing characteristic attributes. Figure 4e This is a schematic diagram of an embodiment of the sequence row data of attribute nodes representing link attributes.
[0050] As one possible implementation method, please refer to [the relevant documentation]. Figure 4a For object nodes, a sequence of rows can be generated based on the object node's unique identifier, starting with that identifier. It's important to note that each target object can be configured with a unique identifier, serving as the rowkey for the sequence. Based on this, columns of data within the sequence can be generated based on the various node attributes of the object node. Taking a vehicle as an example, columns of data in the sequence can be generated based on node attributes such as the brand name; that is, node attributes can be stored in column format. Of course, the same logic applies to other types of objects besides vehicles, which will not be elaborated upon here. Furthermore, as mentioned earlier, an object node can be associated with at least one other object node to represent the association between target objects. Additionally, an object node can also be associated with a collection node, indicating that the data set corresponding to the collection node belongs to the target object corresponding to the object node.
[0051] As one possible implementation method, please refer to [the relevant documentation]. Figure 4b For a collection node, a sequence of rows can be generated based on the unique identifier of the collection node, starting with that unique identifier. It should be noted that each data collection can be configured with a unique identifier, serving as the rowkey for the sequence of rows. Based on this, columns of data in the sequence of rows can be generated based on the various node attributes of the collection node. For example, still using a vehicle as the target object, the collection node can include node attributes such as update time and creation time to generate columns of data in the sequence of rows; that is, node attributes can be stored in column format. Of course, when the target object is a different type of object than a vehicle, the node attributes can be similarly represented, but examples will not be provided here. The aforementioned unique identifier can be obtained using an ID generator to ensure that there are no collection nodes with duplicate IDs in the database. As mentioned earlier, a collection node can be associated with an object node and at least one subset node.
[0052] As one possible implementation method, please refer to [the relevant documentation]. Figure 4cFor subset nodes, a sequence of row data starting with the unique identifier of the subset node can be generated. It should be noted that each data subset can be configured with a unique identifier, serving as the rowkey for the sequence of row data. Based on this, columns of data in the sequence of row data can be generated based on the node attributes of each subset node. For example, subset nodes can include node attributes such as collection details, update time, creation time, and location information to generate columns of data in the sequence of row data; that is, node attributes can be stored in column format. Similar to the aforementioned description, the unique identifier of the data subset can also be obtained using an ID generator to ensure that there are no subset nodes with duplicate IDs in the database. It should be noted that collection details can record various parameters when collecting data at preset locations. Taking the row data containing captured images as an example, various parameters may include, but are not limited to, image size, etc. Furthermore, update time and creation time can record the creation time and effective time of the data subset, respectively, while location information can record information such as the device number and device area for capturing images, etc., without limitation.
[0053] As one possible implementation method, please refer to [the relevant documentation]. Figure 4d For attribute nodes representing characteristic attributes, a sequence of row data starting with the unique identifier of the attribute node can be generated. It should be noted that different types of data attributes obtained from different data subsets can be configured with different unique identifiers as the rowkey of the sequence row data. As mentioned earlier, this can be obtained using an ID generator. Based on this, columns of data in the sequence row data can be generated based on the individual node attributes of the attribute nodes. For example, taking a vehicle as the target object, the attribute nodes representing characteristic attributes can include, but are not limited to, the following node attributes: vehicle model, body color, etc., to generate columns of data in the sequence row data; that is, node attributes can be stored in column format. Furthermore, as mentioned earlier, typically, an attribute node is associated with only one subset node.
[0054] As one possible implementation method, please refer to [the relevant documentation]. Figure 4eFor attribute nodes representing link attributes, a sequence of row data starting with the unique identifier of the attribute node can be generated. It should be noted that different types of data attributes obtained from different data subsets can be configured with different unique identifiers as the rowkey of the sequence row data. As mentioned earlier, this can be obtained using an ID generator. Based on this, columns of data in the sequence row data can be generated based on the node attributes of the attribute nodes. For example, assuming the row data includes at least captured images, the node attributes of an attribute node representing a link attribute can include each captured image from the corresponding data subset of its connected subset node, to generate columns of data in the sequence row data; that is, node attributes can be stored in column format. Furthermore, as mentioned earlier, typically, an attribute node is associated with only one subset node.
[0055] In a specific implementation scenario, to facilitate information retrieval in a graph database using natural language queries, the natural language query can first be converted into a database query. Specifically, based on the natural language query, several triples can be extracted, and then a query graph can be obtained based on these triples. The query graph is a graph structure generated based on the query intent, which is represented by several triples. On this basis, the labels and / or attribute values in the query graph can be reduced to generate the database query. It should be noted that triples are used to represent the relationship between entities, or the attribute value of a certain attribute of an entity. In terms of content, the structure of a triple is: "resource-attribute-attribute value". The resource entity is represented by a URI (Uniform Resource Identifier), and the attribute value can be the URI of another resource entity or a value of a certain data type, also known as literals. For example, taking the natural language query "XX City XX Road Green Sedan" as an example, the following triples can be extracted: (vehicle, body color, green) and (vehicle, address, XX City XX Road). Of course, the above example is merely one possible illustration in practical applications and does not limit the specific content of the triple. Furthermore, queries... Figure 1Generally, a graph structure refers to a graph structure generated based on query intent. At the conceptual level, it belongs to a subgraph of the entire graph model, also known as a concept subgraph. After reducing its actual labels / tags and property key-value pairs, equivalent query statements can be generated directly or indirectly. Depending on the GQL (Graph Query Language), declarative query languages such as SPARQL and Cypher can generate it directly; while imperative languages like Gremlin require defining the traversal logic. Taking the natural language query "Green sedan on XX Road, XX City" as an example, we can extract several triples: (vehicle, feature, green), (vehicle, time and space, XX City, XX Road). Based on this, we can obtain the query graph: (feature, carColor, value), (time and space, address, value). The triples mentioned above all represent attributes within a node: (feature, carColor, value). "Feature" represents the node's label, "carColor" represents the attribute value within the node (Property), and "value" represents the attribute value, which can be a numeric type or a literal. Of course, the above example is merely one possible way to convert a natural language query into a database query and does not limit the specific content of the database query. This method extracts several triples from the natural language query, and then uses these triples to obtain a query graph. The query graph is a graph structure generated based on the query intent, which is represented by several triples. Based on this, the labels and / or attribute values in the query graph are reduced to generate the database query. This allows for the extraction of a database query that represents the query logic, helping to further improve the accuracy and recall of subsequent information searches.
[0056] In a specific implementation scenario, after obtaining the database query statement, a search can be performed in the graph database based on the database search statement to obtain the search results. For example, taking any target object as the search target, such as the natural language query statement "green sedan on XX Road, XX City", in this case, a subset of nodes in the graph database that match all keywords in the database query statement can be selected as the first node, where the keywords represent at least one attribute of the search target. Again using the aforementioned natural language query statement as an example, please refer to [reference needed]. Figure 3Keywords can include: XX City XX Road, green, etc. Therefore, we can first filter out attribute nodes representing spatiotemporal attributes whose node attribute is "XX City XX Road". If an attribute node representing a feature attribute connected to this node in the same subset of nodes has the node attribute "green", then this subset of nodes can be used as the first node. Based on this, we can select object nodes in the graph database that are connected to the interval set of nodes between the first node and the second node, i.e. Figure 3 The first node represents the target object A. Then, based at least on the object information contained in the second node, the search results can be obtained. Specifically, if the database query contains other key information besides the keywords mentioned above, such as the key information "relationship," then the graph database can continue to search for object nodes with the aforementioned relationship to the second node, and the node attributes of those object nodes can be used as the search results. Conversely, if the database query does not contain other key information besides the keywords mentioned above, then the node attributes of the second node can be directly used as the search results. Of course, the above example is only one possible example of information search when the search target is any target object. The same principle applies to other situations where the search target is different, and will not be elaborated upon here. In the above method, if the search target is any target object, then the subset of nodes in the graph database that match all the keywords in the database query statement are selected as the first node, and the keywords represent at least one attribute of the search target. Then, the object nodes in the graph database that are connected to the interval set of nodes of the first node are selected as the second node. Thus, the search results are obtained based at least on the object information contained in the second node. In this way, information search can be carried out through multi-feature association, which helps to further improve the accuracy and recall of information search.
[0057] The above scheme, based on the movement data collected from several preset points on the target object, divides the data into sets belonging to each target object. Then, based on these sets, a graph structure is constructed. A natural language query about the search target is then used to search this graph structure to obtain search results. This approach expands the scope of information retrieval to the activity data of various objects, overcoming the limitation of existing technologies that can only search for information on registration-type data. Furthermore, by dividing the data into sets belonging to each target object and constructing graph structure data for searching, unstructured data can be converted into structured data, minimizing errors or omissions during the search. Therefore, it improves the accuracy and recall of information retrieval.
[0058] Please see Figure 5 , Figure 5This is a schematic diagram of the framework of an embodiment of the information search device 50 of this application. The information search device 50 includes: a partitioning module 51, a construction module 52, and a search module 53. The partitioning module 51 is used to partition the data collected from the target objects based on several preset points to obtain data sets belonging to each target object. The construction module 52 is used to construct graph structure data based on the data sets of each target object. The search module 53 is used to search the graph structure data based on natural language query statements about the search target to obtain search results for the search target.
[0059] The above scheme involves the information search device 50 collecting movement data from several preset locations on the target object, dividing the data into sets belonging to each target object, and then constructing graph-structured data based on these sets. The graph-structured data is then searched using natural language queries about the search target to obtain search results. This approach expands the scope of information search to include the activity data of various objects, overcoming the limitation of existing technologies that only search for information on registration-type data. Furthermore, by dividing the data into sets belonging to each target object and constructing graph-structured data for searching, unstructured data can be converted into structured data, minimizing errors or omissions during the search. Therefore, it improves the accuracy and recall rate of information search.
[0060] In some disclosed embodiments, the graph structure data includes object nodes, set nodes connected to the object nodes, subset nodes connected to the set nodes, and attribute nodes connected to the subset nodes; wherein, the object node represents the target object, the set node represents the data set of the target object, the subset node represents the data subset consisting of the travel data of the target object collected from the same preset point, the data attribute represented by the attribute node is obtained based on the travel data collected from the target point within the data set, and the target point is one of several preset points, and the attribute node is connected to the subset node related to the target point.
[0061] In some disclosed embodiments, the construction module 52 includes a subset partitioning submodule, used to partition the data set into several data subsets based on the preset points from which each row data in the data set originates; the construction module 52 includes an attribute extraction submodule, used to extract at least one data attribute based on the row data in the data subsets; and the construction module 52 includes a graph construction submodule, used to construct graph structure data based on the object information of the target object, the set information of the data set, the point information of the preset points, and the data attributes.
[0062] In some disclosed embodiments, the construction module 52 further includes a relationship acquisition submodule, which is used to acquire the association relationship between each target object; the graph construction submodule is specifically used to construct graph structure data based on the object information of the target object, the association relationship between each target object, the set information of the data set, the point information of the preset point and the data attributes; wherein, the corresponding nodes of the target objects with association relationship are connected by connecting edges in the graph structure data, and the edge attribute of the connecting edge is the association relationship.
[0063] In some disclosed embodiments, the data attributes extracted from the travel data collected from the same preset point within the data set include at least one of spatiotemporal attributes, feature attributes, and link attributes; wherein, the spatiotemporal attributes characterize the temporal and spatial information of the travel data collected from the same preset point, the feature attributes characterize the physical characteristics of the target object, and the link attributes contain the link addresses of the travel data collected from the same preset point.
[0064] In some disclosed embodiments, the information search device 50 includes a conversion module for converting the graph structure data into serialized data based on the unique identifiers and node attributes of the nodes in the graph structure data, so as to store it in the graph database; the search module 53 includes a statement conversion submodule for converting a natural language query statement into a database query statement; and the search module 53 includes an information search submodule for searching in the graph database based on the database query statement to obtain search results.
[0065] In some disclosed embodiments, the conversion module includes a generation submodule, which is used to generate a sequence of row data starting with the unique identifier of each node in the graph structure data, and to generate column data in the sequence of row data based on the node attributes of each node; the conversion module includes a combination submodule, which is used to combine the sequence of row data of each node to obtain serialized data.
[0066] In some disclosed embodiments, the statement conversion submodule includes a triple extraction unit for extracting a number of triples based on a natural language query statement; the statement conversion submodule includes a query graph acquisition unit for acquiring a query graph based on the number of triples; wherein, the query graph is a graph structure generated based on the query intent, and the query intent is represented by the number of triples; the statement conversion submodule includes a query graph reduction unit for reducing the labels and / or attribute values in the query graph to generate a database query statement.
[0067] In some disclosed embodiments, the search target is any target object. The information search submodule includes a node filtering unit for filtering a subset of nodes in the graph database that match all keywords in the database query statement, as the first node; wherein, the keywords represent at least one attribute of the search target. The information search submodule includes a node selection unit for selecting object nodes in the graph database that are connected to the first node's interval set of nodes, as the second node. The information search submodule includes a result acquisition unit for obtaining search results based at least on the object information contained in the second node.
[0068] Please see Figure 6 , Figure 6 This is a schematic diagram of an embodiment of the electronic device 60 of this application. The electronic device 60 includes a memory 61 and a processor 62 coupled to each other. The memory 61 stores program instructions, and the processor 62 is used to execute the program instructions to implement the steps in any of the above-described information search method embodiments. For details, please refer to the foregoing disclosed embodiments, which will not be repeated here. It should be noted that the electronic device 60 may include, but is not limited to, servers, desktop computers, laptops, etc., and is not limited here.
[0069] Specifically, processor 62 can also be referred to as a CPU (Central Processing Unit). Processor 62 may be an integrated circuit chip with signal processing capabilities. Processor 62 can also be a general-purpose processor, digital signal processor, application-specific integrated circuit, field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. The general-purpose processor can be a microprocessor or any conventional processor. In addition, processor 62 can be implemented by multiple integrated circuit chips.
[0070] In the above-described scheme, the processor 62 in the electronic device 60 implements the steps in any of the above information search method embodiments. On the one hand, it can expand the data scope of information search to the activity data of various objects, thereby overcoming the limitation of existing technologies that can only search for information targets in registration-type data. On the other hand, by dividing the data sets belonging to various target objects and constructing graph-structured data based on them for searching, it can convert unstructured data into structured data, thereby minimizing errors or omissions during the search. Therefore, it can improve the accuracy and recall rate of information search.
[0071] Please see Figure 7 , Figure 7This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium 70 of this application. The computer-readable storage medium 70 stores processor-executable program instructions 71, which can be executed to implement the steps in any of the above-described information search method embodiments.
[0072] It should be noted that the computer-readable storage medium 70 can be a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, or a medium that can store program instructions 71. Alternatively, it can be a server that stores the program instructions 71, which can send the stored program instructions 71 to other devices for execution, or it can execute the stored program instructions 71 itself.
[0073] The above-described solution, implemented by the computer-readable storage medium 70 in any of the above information search method embodiments, expands the data scope of information search to the activity data of various objects, thereby overcoming the limitation of existing technologies that can only search for information targets in registration-type data. Furthermore, by dividing the data into sets belonging to various target objects and constructing graph-structured data for searching, unstructured data can be converted into structured data, thus minimizing errors or omissions during the search. Therefore, it can improve the accuracy and recall rate of information search.
[0074] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0075] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0076] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0077] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0078] If the technical solution of this application involves personal information, the product using this technical solution has clearly informed the user of the personal information processing rules and obtained the user's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using this technical solution has obtained the user's separate consent before processing the sensitive personal information, and also meets the requirement of "express consent". For example, at personal information collection devices such as cameras, clear and prominent signs are set up to inform users that they have entered the scope of personal information collection and that personal information will be collected. If an individual voluntarily enters the collection scope, it is deemed that they have agreed to the collection of their personal information; or on the personal information processing device, with clear signs / information informing users of the personal information processing rules, authorization is obtained from the user through pop-up information or by asking the user to upload their personal information; wherein, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the types of personal information processed.
Claims
1. An information search method, characterized in that, include: Based on the travel data collected from the target objects at several preset points, data sets belonging to each target object are obtained; wherein, the travel data includes: travel time, images taken during the travel, and identifiers of the preset points; Based on the data sets of each target object, a graph structure data is constructed; wherein, the graph structure data contains object nodes, set nodes connected to the object nodes, subset nodes connected to the set nodes, and attribute nodes connected to the subset nodes. The object nodes represent the target objects, the set nodes represent the data sets of the target objects, the subset nodes represent the data subsets consisting of the travel data of the target objects collected from the same preset point, and the data attributes represented by the attribute nodes are obtained based on the travel data collected from the target points within the data sets, and the target point is one of the plurality of preset points. The attribute nodes are connected to the subset nodes related to the target point. The graph structure data is searched based on a natural language query about the search target to obtain the search results for the search target.
2. The method according to claim 1, characterized in that, The graph structure data constructed based on the data sets of each of the target objects includes: Based on the preset points from which each of the travel data in the data set comes, several data subsets are obtained; Based on the route data within the data subset, at least one data attribute is extracted; The graph structure data is constructed based on the object information of the target object, the set information of the data set, the location information of the preset points, and the data attributes.
3. The method according to claim 2, characterized in that, Before constructing the graph structure data based on the object information of the target object, the set information of the data set, the point information of the preset points, and the data attributes, the method further includes: Obtain the relationships between the various target objects; The graph structure data is constructed based on the object information of the target object, the set information of the data set, the point information of the preset points, and the data attributes, including: Based on the object information of the target object, the association relationship between the target objects, the set information of the data set, the location information of the preset point, and the data attributes, the graph structure data is constructed. In this context, the corresponding nodes of the target objects with the aforementioned association relationship are connected by connecting edges in the graph structure data, and the edge attribute of the connecting edge is the association relationship.
4. The method according to claim 1 or 2, characterized in that, The data attributes extracted from the travel data collected from the same preset point within the data set include at least one of the following: spatiotemporal attributes, feature attributes, and link attributes; The spatiotemporal attribute represents the temporal and spatial information of the travel data collected from the same preset point, the feature attribute represents the physical characteristics of the target object, and the link attribute contains the link address of the travel data collected from the same preset point.
5. The method according to claim 1, characterized in that, After constructing the graph structure data based on the datasets of each of the target objects, and before searching the graph structure data based on a natural language query statement about the search target to obtain the search results for the search target, the method further includes: Based on the unique identifier of the node in the graph structure data and the node attributes of the node, the graph structure data is converted into serialized data for storage in the graph database; The process of searching the graph structure data based on a natural language query about the search target to obtain search results for the search target includes: Based on the natural language query statement, a database query statement is obtained; The search results are obtained by performing a search on the graph database based on the database query statement.
6. The method according to claim 5, characterized in that, The process of converting the graph structure data into serialized data based on the unique identifiers of the nodes and the node attributes of the nodes includes: For each node in the graph structure data, a sequence of row data starting with the unique identifier of the node is generated, and each column of data in the sequence of row data is generated based on the node attributes of the node. The serialized data is obtained by combining the sequence row data of each node.
7. The method according to claim 5, characterized in that, The process of converting the natural language query statement into a database query statement includes: Based on the natural language query statement, several triples are extracted; Based on the aforementioned triples, a query graph is obtained; wherein the query graph is a graph structure generated based on the query intent, and the query intent is represented by the aforementioned triples; The labels and / or attribute values in the query graph are reduced to generate the database query statement.
8. The method according to claim 5, characterized in that, The search target is any of the target objects, and the search results obtained by performing a search in the graph database based on the database query statement include: A subset of nodes that match all keywords in the database query statement and are connected in the graph database are selected as the first node; wherein, the keywords represent at least one attribute of the search target; Select the object node in the graph database that is connected to the first node interval set node as the second node; The search results are obtained based at least on the object information contained in the second node.
9. An information search device, characterized in that, include: The segmentation module is used to segment the travel data collected from the target objects based on several preset points to obtain data sets belonging to each of the target objects; wherein, the travel data includes: travel time, images taken during the travel, and identifiers of the preset points; A construction module is used to construct graph structure data based on the data sets of each target object; wherein the graph structure data contains object nodes, set nodes connected to the object nodes, subset nodes connected to the set nodes, and attribute nodes connected to the subset nodes. The object nodes represent the target objects, the set nodes represent the data sets of the target objects, the subset nodes represent the data subsets consisting of the travel data of the target objects collected from the same preset point, and the data attributes represented by the attribute nodes are obtained based on the travel data collected from the target points within the data sets, wherein the target point is one of the plurality of preset points, and the attribute nodes are connected to the subset nodes related to the target point. The search module is used to search the graph structure data based on a natural language query about the search target, and obtain the search results for the search target.
10. An electronic device, characterized in that, The method includes a memory and a processor coupled to each other, the memory storing program instructions, and the processor executing the program instructions to implement the information search method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, The system stores program instructions that can be executed by a processor, the program instructions being used to implement the information search method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Disambiguating join paths for natural language queries
CN107016011A
Track data processing method and device
CN117591757A
