A semantic search method based on dense knowledge graph

By designing a cloud-edge collaborative secure semantic search architecture in the Internet of Vehicles and using encrypted knowledge graphs for semantic association search, the accuracy and comprehensiveness issues of ciphertext data search in the Internet of Vehicles are solved, and efficient and secure data sharing and privacy protection are achieved.

CN119691810BActive Publication Date: 2025-09-30CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411859195.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-09-30
Estimated Expiration
2044-12-17

AI Technical Summary

Technical Problem

In the Internet of Vehicles, existing ciphertext data search methods cannot achieve accurate semantic relevance search under user privacy protection, resulting in low recall rate, and traditional keyword search methods based on encrypted space cannot meet the complex needs of users.

Method used

A cloud-edge collaborative secure semantic search architecture is designed. By building an encrypted knowledge graph, using edge servers for local search and combining it with the global index in the cloud, semantic association search is achieved to protect user privacy.

Benefits of technology

It improves the comprehensiveness and accuracy of search results, ensures data privacy and security, reduces user search delays, and meets complex search needs in Internet of Vehicles scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119691810B_ABST
    Figure CN119691810B_ABST
Patent Text Reader

Abstract

The present invention relates to a semantic search method based on a secret knowledge graph, belonging to the field of information security and privacy protection technology, and includes the following steps: S1: constructing a cloud-edge collaborative security semantic search system for the Internet of Vehicles; S2: the authorization center initializes the system; S3: the authorization center registers the user; S4: the edge server generates ciphertext; S5: the authorized user sends the query request to the nearest edge server, the edge server generates a query trap for the legitimate user request and performs a search match. If the search is unsuccessful, the edge server sends the query trap to the cloud for search matching, and finally the edge server decrypts the search results and returns them to the user. The present invention improves the comprehensiveness and accuracy of search results, protects the privacy and security of data, and is suitable for semantic search of encrypted data in the Internet of Vehicles scenario.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of information security and privacy protection, and relates to a semantic search method based on a secret knowledge graph. Background Art

[0002] With the rapid development of the Internet of Things (IoT), connected vehicles (IoV) technology has been widely applied in areas such as vehicle monitoring, intelligent transportation, and driver assistance, providing users with a smarter and more convenient travel experience. However, as data volumes increase, the limited resources of onboard terminal devices make it difficult to meet the demands of powerful applications requiring intensive computing and large caches, such as autonomous driving, artificial intelligence processing, and low-latency content delivery. Therefore, data needs to be outsourced to cloud computing centers to leverage their powerful computing and storage capabilities. Given the massive and valuable volume of IoV data, users can access IoV-related data through searches to achieve on-demand access. For example, a user might want to use a keyword search to retrieve sensor data on a road section to analyze traffic flow. However, this data contains sensitive information such as specific geographic location and time. If leaked, it could lead to the tracking of users' movements and activities, exposing their personal privacy. Therefore, protecting user and data privacy during data search is of great research value. Existing methods encrypt data before outsourcing. However, the indistinguishability of ciphertext data poses a significant challenge to search and matching in encrypted environments.

[0003] To further enable data sharing without leaking data privacy, searchable encryption technology enables users to use indexes under ciphertext to perform keyword searches. Currently, ciphertext data search methods in the Internet of Vehicles mainly support precise keyword matching based on secret spaces. When data is stored in ciphertext on a cloud server, users can leverage the powerful computing power of the cloud server for keyword searches while ensuring that the server cannot obtain any user's private information, thereby enabling data sharing without leaking data privacy. However, due to differences in the background knowledge of search users, there are large deviations in their keyword descriptions of the search objects, resulting in a low recall rate for keyword-based searchable encryption schemes in precise matching mode. Due to the large differences in the subjective cognition of search users, search matching based solely on keywords will severely limit recall performance. Existing data search methods do not consider semantic relevance search under user privacy protection. For example, a user in the connected car market searches for a hotel with good road conditions and easy parking near their current location. They want to find the hotel and understand surrounding traffic conditions and parking availability. Traditional searchable encryption schemes typically rely on precise keyword matching, returning only results that exactly match the query "hotel," failing to filter out potential matches that meet the user's needs for good road conditions and easy parking. Therefore, the introduction of semantic search technology is of great significance in the connected car market.

[0004] Semantic search has significantly improved the comprehensiveness of information retrieval tasks. Although relevant research on semantic search has achieved certain results in the past, most semantic search methods do not consider user and data privacy issues and cannot meet the privacy protection requirements and information needs of users in the Internet of Vehicles environment. Currently, there are relatively few methods that meet the privacy data protection and semantic search needs of the Internet of Vehicles. Wang et al. proposed a method to achieve encrypted data retrieval by performing fuzzy retrieval on misspelled keywords and sorting the results by relevance scores in "Encrypted data retrieval and sharing scheme in space–air–ground-integrated vehicular networks" [IEEE Internet of Things Journal, 2021, 9(8): 5957-5970]. However, this scheme mainly relies on word frequency-inverse document frequency to calculate the correlation between documents and queries, resulting in insufficient association capabilities and limited ability to search for context-related information.

[0005] Therefore, achieving secure retrieval of encrypted data in the connected vehicle (IoV) scenario still faces many challenges. On the one hand, the complexity and uncertainty of the road environment necessitate high real-time and accuracy requirements. On the other hand, due to significant differences in subjective perception among search users, traditional keyword search methods based on dense space typically rely on exact keyword matching, returning results containing only matches for that keyword, severely limiting the search system's recall rate. Summary of the Invention

[0006] In view of this, the purpose of the present invention is to address the problem that the accuracy and comprehensiveness of system searches under encrypted data in the Internet of Vehicles cannot be met. Different from the traditional precise matching keyword search method based on encrypted space, the present invention designs a cloud-edge collaborative secure semantic search architecture, which consists of a three-layer architecture of end-edge-cloud, integrating the advantages of the edge side being close to the data source for real-time response and the characteristics of the cloud side with powerful computing power and convenient data sharing. The edge directly returns local search results to reduce user search delays. Secondly, in response to the problem that existing encrypted search methods mainly focus on precise matching of keywords and do not fully utilize the semantic relationship between data, the present invention uses encrypted knowledge graphs to perform semantic association search, constructs corresponding knowledge graphs through semantic relationships between data, and encrypts and protects sensitive information. When a user queries, the query is semantically parsed, and related nodes and edges are found in the knowledge graph, and results that meet the query intent are returned. This method supports semantic search of user encrypted data, improves the comprehensiveness and accuracy of search results, and ensures data privacy and security.

[0007] In order to achieve the above object, the present invention provides the following technical solutions:

[0008] A semantic search method based on a dense knowledge graph includes the following steps:

[0009] S1: Build a secure semantic search system for cloud-edge collaboration in the Internet of Vehicles;

[0010] S2: The authorization center initializes the system;

[0011] S3: The authorization center registers the user;

[0012] S4: The edge server generates ciphertext;

[0013] S5: The authorized user sends the query request to the nearest edge server. The edge server generates a query trapdoor for the legitimate user request and performs a search match. If the search is unsuccessful, the edge server sends the query trapdoor to the cloud for search matching. Finally, the edge server decrypts the search results and returns them to the user.

[0014] Furthermore, the IoV cloud-edge collaborative secure semantic search system includes:

[0015] Authorization Center: The authorization center is a trusted organization responsible for the generation and issuance of keys and user registration authorization;

[0016] Data entity: entity data collected by sensors of vehicle entities and surrounding facilities;

[0017] Edge Server: Responsible for the following tasks: 1) Organizing data entities, extracting key information, constructing and encrypting the corresponding attribute graph, generating indexes for each node entity and edge in the attribute graph, and then locally caching the encrypted knowledge graph and uploading a backup to the cloud server for storage; 2) Based on the natural language query requirements entered by the user, performing natural language processing, extracting core keywords, generating trapdoors for search matching; 3) Decrypting the results of successful search matching, and finally returning the results to the user in plain text;

[0018] Cloud server: used to organize the encrypted data uploaded to the cloud by each edge server into a global database storage, provide it to users for search, and return matching results to the corresponding edge server;

[0019] User: Sends query request to the nearest edge server through a secure channel; receives decrypted plaintext result from the edge server.

[0020] Furthermore, in step S2, the authorization center performs global initialization and takes the security parameter k as input, outputs the key K = {K1, K2, K3} and the system parameter S, where S∈Z qIt is used for user registration authorization. The length of K1 and K2 are both k-bit. The symmetric key K3 is generated by a symmetric encryption algorithm and is used to encrypt data.

[0021] Furthermore, in step S3, the authorization center generates a user authorization certificate using the identity information sent by the user and S And send it to the edge server authorized user list list, thereby adding a new authorized user u i ,in

[0022] H1:{0,1} * →Z q .

[0023] Furthermore, in step S4, the edge server organizes the collected data into a knowledge graph and corresponding indexes, encrypts them, and backs them up to the cloud server, which specifically includes the following steps:

[0024] S41: Data processing: Integrate various types of data, extract entities, attributes, and relationships between entities, and process the data into a key-value pair structured attribute graph for storage;

[0025] S42: Index generation: sort the key-value pair data by key and generate num values ​​in sequence. <k i ,v i ,num i > triples, and using each <k i ,v i ,num i >k in i Generate partial index EInd i =MAC(Ind xi ,1); then define the random permutation π:[n]→[n], for each <k i ,v i ,num i > in num i generate Storage, forming the final index structure DInd i ={EInd i ,Enum i} to store;

[0026] S43: Data encryption: key-value pairs generated after data processing i =(k i ,v i ) is encrypted and stored to form ciphertext c, and all elements are padded to the same length; where j∈J,J∈[1,|m|], m=(k1,k2,...k i ) is a key-value pair information library;

[0027]

[0028] Furthermore, step S5 specifically includes the following steps:

[0029] S51: Trapdoor generation: The authorized user sends an authorization certificate and a query request to the nearest edge server; first, the edge server verifies the user according to the user's authorization certificate Ac; Is it in the authorized user list list? If The edge server extracts keywords from the user query request through natural language processing and generates the corresponding query trap as ET i ;

[0030] S52: Search matching: The edge server compares the query keyword set {w q1 ,...,w qn} by the keyword w q1 The generated trapdoor Eτ1=MAC(td x1 ,1) and the stored index EInd i If the two are equal, the index structure DInd i ={EInd i ,Enum i}Find the corresponding num i =π -1 (j) value as a pointer to locate the corresponding key-value pair (ck j ,cv j ); will (ck j ,cv j ) as the starting node to retrieve the one-hop subgraph to obtain the nodes corresponding to w q1 The set of directly related nodes and edges S1 = (V, R);

[0031] Then in the initial search result S1, according to w q2 Filter out the node and edge set S2=(V',R') that matches it, and so on, filter out the nodes and edges that match the subsequent query keyword {w q3 ,...,w qn} matching set of nodes and edges, if the set is matched by w qi ∈{w q2 ,...,w qn The corresponding ciphertext trapdoors generated by} all satisfy Eτ i ∈{Eτ2,...,Eτ n} and {Eτ2,...,Eτ n}∈EInd, then we can finally get the q1 ,...,w qn}Matched nodes and corresponding edge set S n =(V * ,R * );

[0032] V * ={(ck1,cv1),...,(ck n ,cv n )},n≤m

[0033] S53: Data decryption: Decrypt the retrieved data S n =(V * ,R * ) is decrypted on the edge server, and a new information subgraph SubG is constructed based on the decrypted nodes and edges and returned to the user.

[0034] Furthermore, in the key-value mode, the one-hop subgraph query retrieves the attribute value corresponding to the entity through the entity identifier, and simultaneously retrieves the edges related to the entity and the attribute values ​​of the edges to return all related nodes:

[0035] V={(ck1,cv1),...,(ck m ,cv m )}.

[0036] The beneficial effects of the present invention are as follows: the present invention designs a semantic search method based on an encrypted knowledge graph under the cloud-edge collaborative secure semantic search architecture of the Internet of Vehicles, aiming to enable the knowledge graph to capture the user's potential information needs by associating different terms and contextual information, and provide more comprehensive and accurate search results. At the same time, it effectively improves the accuracy and efficiency of encrypted data retrieval and protects the privacy of Internet of Vehicles users. Symmetric encryption is used to encrypt and store key-value pair data and user query data in the knowledge graph, allowing users to search for data information while data is encrypted, and providing ciphertext information sharing on the basis of protecting user privacy and data information. In the Internet of Vehicles scenario, the user's query information and the specific location, driving trajectory and other information of the vehicle are considered sensitive. The present invention realizes search and matching in a ciphertext state, so the actual data content will not be leaked, and sensitive information is protected.

[0037] Other advantages, objects, and features of the present invention will be described in part in the following description and, in part, will be apparent to those skilled in the art upon examination of the following description or may be learned from practice of the present invention. The objects and other advantages of the present invention may be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below with reference to the accompanying drawings, in which:

[0039] Figure 1 This is a system model diagram of the edge-cloud collaborative efficient encrypted semantic search method described in the present invention;

[0040] Figure 2 Schematic diagram of the knowledge graph encryption method designed for the present invention;

[0041] Figure 3 Flowchart of the efficient encrypted semantic search method for edge-cloud collaboration designed for the present invention. DETAILED DESCRIPTION

[0042] The following describes the embodiments of the present invention by means of specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and the following embodiments and features in the embodiments can be combined with each other without conflict.

[0043] It should be noted that the illustrations provided in the following embodiments are merely schematic illustrations of the basic concept of the present invention. Therefore, the illustrations only show components related to the present invention and are not drawn according to the number, shape, and size of components in actual implementation. In actual implementation, the type, quantity, and proportion of each component may be changed arbitrarily, and the component layout may also be more complex.

[0044] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it will be apparent to those skilled in the art that the embodiments of the present invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring the embodiments of the present invention.

[0045] Figure 1This diagram shows a system model for an efficient encrypted semantic search method with edge-cloud collaboration, provided by a specific embodiment of the present invention. Traditional encrypted search architectures rely on precise keyword matching in the cloud, which fails to accurately understand user query intent, resulting in low query efficiency and difficulty meeting user needs. This architecture leverages searchable encryption to protect entity data privacy and fully integrates the advantages of edge and cloud. The edge directly returns local search results, reducing user search latency. The architecture comprises five participants: an authorization center, data entities, edge servers, cloud servers, and search users. Authorized users can search for required data on edge servers or the cloud. In the connected vehicle network, due to the spatial location of sensors and other entities, each edge server stores and processes data from nearby local entities, enabling efficient data processing and data access for user search requests. Encrypted data storage, both locally and in the cloud, ensures data privacy. All edge servers upload encrypted knowledge graph indexes of local data to cloud servers to meet users' complex search needs. Due to their proximity to search users, edge servers can respond to local search requests more promptly. Furthermore, with the global index in the cloud, users can expand their search space and query non-local data or local historical data, enabling a wider range of queries.

[0046] In the IoV cloud-edge collaborative secure semantic search architecture:

[0047] Authorization Center: The authorization center is a trusted organization that is primarily responsible for the generation and issuance of keys and user registration authorization.

[0048] Data entity: Sensor entity data such as vehicle entities and surrounding facilities are uploaded to the nearest edge server through a secure channel.

[0049] Edge servers are primarily responsible for the following tasks: 1) Organizing uploaded data, extracting key information, constructing and encrypting the corresponding attribute graph, generating indexes for each node entity and edge in the attribute graph, and then locally caching the encrypted knowledge graph so that local users can more quickly query information. This data is then backed up and uploaded to the cloud server for storage. 2) Based on the user's natural language query input, such as a car networking user searching for "nearby hotels with good road conditions and easy parking," natural language processing is performed to extract core keywords and generate trapdoors for search matching. 3) Successful search matching results are decrypted and the final results are returned to the user in plain text.

[0050] Cloud Server: The cloud organizes the encrypted data uploaded to the cloud by various edge servers into a global database storage, provides it to users for search, and returns data that matches the user's query through cooperation with the edge servers.

[0051] User: Sends a query request to the nearest edge server through a secure channel. The edge server generates a trapdoor and searches for data on the edge server or in the cloud. Finally, the user receives the decrypted plaintext result from the edge server.

[0052] The collaborative process of this method is:

[0053] During system initialization, the authorization center performs global initialization and issues keys, which are then securely transmitted to other components. The key generation algorithm is run by the authorization center, which takes as input the security parameter k and outputs the key K and system parameter S.

[0054] User registration, performed by the authorization center, adds a new authorized user u i The authorization center uses the identity information sent by the user to generate a user authorization credential and sends it to the edge server's authorized user list.

[0055] Data encryption is performed by the edge server. The uploaded data is constructed into a key-value pair attribute graph G and then an encryption algorithm is run. The key K and the attribute graph G are used as input, and the output is the encrypted knowledge graph Θ.

[0056] Index Generation,This algorithm is run by the edge server.,It takes the keyword set W and key K as input to generate the,data index EInd.

[0057] Trapdoor Generation,The edge server executes the algorithm and generates a trapdoor ET by inputting the query keyword set and the key.

[0058] Secure semantic search, an algorithm executed by edge servers or cloud servers, matches the user's query trapdoor with the stored data index EInd. If the search matches, the corresponding data entity node position J is returned. Based on J, the entity node's position in the attribute graph is located, and the search is performed starting from this node to obtain node data adjacent to and related to this entity.

[0059] S17: Data decryption. When the search results are returned to the edge server, the edge server decrypts them using the corresponding key and returns them to the user via a secure channel.

[0060] like Figure 2 This is a schematic diagram of the knowledge graph encryption method for efficient and secure semantic search. It uses encrypted knowledge graphs for semantic association search, builds corresponding knowledge graphs based on semantic relationships between data, and encrypts sensitive information to protect it. When a user queries, the query is semantically parsed, and related nodes and edges are found in the knowledge graph, returning results that meet the query intent. Figure 3 As shown, this method specifically includes the following steps:

[0061] S1: System initialization. GenKey(1k )→(K,S) The authorization center calls the algorithm of this stage. Specifically, it takes the security parameter k as input and outputs the key K = {K1, K2, K3} and the system parameter S, where S∈Z q It is used for user registration authorization. The length of K1 and K2 are both k-bit. The symmetric key K3 is generated by the secure symmetric encryption algorithm π and is used to encrypt data.

[0062] S2: User registration. Executed by the authorization center, add a new authorized user u i The authorization center uses the identity information sent by the user and S to generate the user authorization certificate. And send to the edge server authorized user list list, where H1:{0,1} * →Z q .

[0063] S3: Encryption generation. EncData(K,G)→Θ: This stage is performed by the edge server, which organizes the collected data into a knowledge graph and corresponding indexes and encrypts them. Subsequently, it is backed up to the cloud server.

[0064] (1) Data processing: Integrate various types of data, extract entities, attributes, and relationships between entities, and process the data into a key-value pair structured attribute graph for storage.

[0065] (2) Index generation: sort the key-value pairs by key and generate num values ​​in order. <k i ,v i ,num i > triples, and using each <k i ,v i ,num i >k in i Generate partial index EInd i =MAC(Ind xi ,1). Then define the random permutation π:[n]→[n], for each <k i ,v i ,num i > in num i generate Storage, forming the final index structure DInd i ={EInd i ,Enum i} for storage.

[0066] (3) Data encryption: The key-value pairs generated after data processing are the data nodes. i =(k i ,vi ) is encrypted and stored to form ciphertext c, and all elements are padded to the same length. Among them, j∈J,J∈[1,|m|], m=(k1,k2,...k i ) is a key-value pair information library.

[0067]

[0068] S4: Matching Search and Decryption. This process consists of two phases: the search and matching phase and the decryption phase. In the search and matching phase, an authorized user sends a query request to the nearest edge server. The edge server first verifies the user's legitimacy using the user's credentials Ac. If the user is a registered, authorized user, the edge server generates a corresponding query trapdoor ET for the user's request and performs a search. If the search is unsuccessful, the edge server sends ET to the cloud for further matching. If a match is still not found, the user's search request is rejected. In the decryption phase, the edge server decrypts the encrypted search results and returns them to the user.

[0069] (1) Trapdoor Generation: The edge server executes the algorithm, and the authorized user sends the authorization certificate and query request to the nearest edge server. First, the edge server verifies the user according to the user's authorization certificate Ac. Is it in the authorized user list list? If Then execute the subsequent operations. The edge server extracts the keywords in the user query request through natural language processing to generate the corresponding query trap door ET i .

[0070] (2) Search matching: This step is used to find relevant information of the query request submitted by the user in the encrypted database. By comparing the query keyword set {w q1 ,...,w qn} by the keyword w q1 The generated trapdoor Eτ1=MAC(td x1 ,1) and the stored index EInd i If the two are equal, the index structure DInd i ={EInd i ,Enum i}Find the corresponding num i =π -1 (j) value is used as a pointer to locate the corresponding key-value pair (ck j ,cv j ). The key value (ck j ,cv j ) as the starting node to retrieve the one-hop subgraph to obtain the nodes corresponding to w q1The set of directly related nodes and edges S1 = (V, R). In the key-value mode, a one-hop subgraph query retrieves the attribute value corresponding to the entity through the entity identifier, and simultaneously retrieves the edges related to the entity and the attribute values ​​of the edges to return all related nodes.

[0071] V={(ck1,cv1),…,(ck m ,cv m )}

[0072] Then in the initial search result S1, according to w q2 Filter out the node and edge set S2=(V',R') that matches it, and so on, filter out the nodes and edges that match the subsequent query keyword {w q3 ,...,w qn} matching set of nodes and edges, if the set is matched by w qi ∈{w q2 ,...,w qn The corresponding ciphertext trapdoors generated by} all satisfy Eτ i ∈{Eτ2,...,Eτ n} and {Eτ2,...,Eτ n}∈EInd, and finally get q1 ,…,w qn}Matched nodes and corresponding edge set S n =(V * ,R * ).

[0073] V * ={(ck1,cv1),...,(ck n ,cv n )},n≤m

[0074] (3) Data decryption: Decrypt the retrieved data S n =(V * ,R * ) is decrypted on the edge server, and a new information subgraph SubG is constructed based on the decrypted nodes and edges and returned to the user.

[0075] In the above embodiments, references to "this embodiment" in the specification indicate that a particular feature, structure, or characteristic described in conjunction with the embodiment is included in at least some embodiments, but not necessarily all embodiments. Multiple occurrences of "this embodiment" do not necessarily refer to the same embodiment.

[0076] In the above embodiments, although the invention has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those skilled in the art based on the foregoing description. For example, other memory structures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed. The embodiments of the present invention are intended to encompass all such alternatives, modifications, and variations that fall within the broad scope of the appended claims.

[0077] This embodiment further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, any one of the methods in this embodiment is implemented.

[0078] This embodiment also provides an electronic terminal, including: a processor and a memory;

[0079] The memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the terminal executes any one of the methods in this embodiment.

[0080] Regarding the computer-readable storage medium in this embodiment, those skilled in the art will appreciate that all or part of the steps in the aforementioned method embodiments can be implemented using hardware associated with the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When executed, the program performs the steps in the aforementioned method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0081] The electronic terminal provided in this embodiment includes a processor, a memory, a transceiver and a communication interface. The memory and the communication interface are connected to the processor and the transceiver and complete communication with each other. The memory is used to store computer programs, the communication interface is used for communication, and the processor and the transceiver are used to run computer programs so that the electronic terminal executes the various steps of the above method.

[0082] In this embodiment, the memory may include a random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage.

[0083] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

[0084] The present invention can be used in a wide variety of general-purpose or special-purpose computing system environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments that include any of the above.

[0085] The present invention may be described in the general context of computer-executable instructions, such as program modules, executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media, including storage devices.

[0086] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solutions, which should all be included in the scope of the claims of the present invention.

Claims

1. A semantic search method based on a dense knowledge graph, characterized by: The following steps are involved: S1: Build a secure semantic search system for cloud-edge collaboration in the Internet of Vehicles; S2: The authorization center initializes the system; S3: The authorization center registers the user; S4: The edge server generates ciphertext; S5: The authorized user sends a query request to the nearest edge server. The edge server generates a query trapdoor for the legitimate user request and performs a search and match. If the search is unsuccessful, the edge server sends the query trapdoor to the cloud for further search and match. Finally, the edge server decrypts the search results and returns them to the user. In step S4, the edge server organizes the collected data into a knowledge graph and corresponding indexes, encrypts them, and backs them up to the cloud server, which specifically includes the following steps: S41: Data processing: Integrate various types of data, extract entities, attributes, and relationships between entities, and process the data into a key-value pair structured attribute graph for storage; S42: Index generation: sort the key-value pairs by key and generate them in order Value, generated triples, and using each in Generate a partial index ; Then define the random permutation , for each in generate Storage, forming the final index structure to store; S43: Data encryption: key-value pair data nodes generated after data processing Encrypted storage to form ciphertext , all elements are padded to the same length; , It is a key-value pair information library; The step S5 specifically includes the following steps: S51: Trapdoor generation: The authorized user sends an authorization credential and a query request to the nearest edge server; first, the edge server generates a query request based on the user's authorization credential. Ac Verify User Is it in the authorized user list? In, if ,in , , the edge server extracts the keywords in the user query request through natural language processing and generates the corresponding query trapdoor as ; S52: Search Matching: The edge server compares the query keyword set Keywords Generated trapdoor With the stored index If the two are equal, then the index structure Find the corresponding The value is used as a pointer to locate the corresponding key-value pair ;Will As the starting node, a one-hop subgraph is retrieved to obtain The set of directly related nodes and edges ; Then in the initial search results In, according to Filter out the set of nodes and edges that match it , and so on, filter out the keywords related to subsequent queries The set of nodes and edges that match, if The corresponding ciphertext trapdoors generated all satisfy and , then we will get the result with all keywords Matched nodes and corresponding edge sets ; S53: Data decryption: The retrieved data Decryption is performed on the edge server, and a new information subgraph is constructed based on the decrypted nodes and edges. Return to the user.

2. The semantic search method based on a dense knowledge graph according to claim 1, characterized in that: The IoV cloud-edge collaborative secure semantic search system includes: Authorization Center: The authorization center is a trusted organization responsible for the generation and issuance of keys and user registration authorization; Data entity: entity data collected by sensors of vehicle entities and surrounding facilities; Edge servers are responsible for the following tasks: 1) organizing data entities, extracting key information, constructing and encrypting the corresponding attribute graph, generating indexes for each node entity and edge in the attribute graph, and then locally caching the encrypted knowledge graph and backing it up to the cloud server for storage; 2) performing natural language processing based on user-entered natural language query requirements, extracting core keywords, and generating trapdoors for search and matching; 3) decrypting the results of successful search and matching, and returning the final results to the user in plaintext. Cloud server: used to organize the encrypted data uploaded to the cloud by each edge server into a global database storage, provide it to users for search, and return matching results to the corresponding edge server; User: Sends query request to the nearest edge server through a secure channel; receives decrypted plaintext result from the edge server.

3. The semantic search method based on a dense knowledge graph according to claim 1, characterized in that: In step S2, the authorization center performs global initialization and sets the security parameters As input, output key and system parameters ,in It is used for user registration authorization. The length of k-bit , symmetric key Generated by a symmetric encryption algorithm and used to encrypt data.

4. The semantic search method based on a dense knowledge graph according to claim 1, characterized in that: In step S3, the authorization center uses the identity information sent by the user and Generate user authorization credentials , and send it to the edge server authorized user list , thereby adding a new authorized user ,in , .

5. The semantic search method based on dense knowledge graph according to claim 1, characterized in that: In the key-value mode, the one-hop subgraph query retrieves the attribute value corresponding to the entity through the entity identifier, and retrieves the edges related to the entity and the attribute values ​​of the edges to return all related nodes: 。