Unstructured data anonymous trace query method and device, equipment and medium
By building the server table structure and using a general visual model to extract and encrypt the unstructured data, the traditional query method has solved the shortcomings in data privacy and adaptability to complex query scenarios, and achieved efficient and secure unstructured Data query.
Patent Information
- Application Number
- CN202411568274.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-02-18
AI Technical Summary
Traditional unstructured data query methods have shortcomings in protecting data privacy and adapting to complex query scenarios, and it is difficult to achieve fine-grained permission control and hidden query intentions, resulting in the risk of data security and privacy leakage.
By obtaining the server to be queried and its corresponding data application scenarios, the server table structure is constructed, and the unstructured data is characterized by using a pre-trained general visual model to extract structured data. At the same time, homomorphic encryption is performed on the query data to ensure the protection of data privacy.
It improves the security and efficiency of unstructured data anonymous query, ensures data privacy protection and fine-grained permission control, and adapts to the needs of complex query scenarios.
Smart Images

Figure CN119474411A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of software development and medical health, and in particular to a method, device, equipment and medium for anonymous query of unstructured data. Background Art
[0002] In today's era of digital information explosion, whether in Internet social networking, medical information systems, business intelligence, government data management and other fields, the scale and application scope of unstructured data are expanding rapidly. In the field of Internet social networking, unstructured data such as user dynamics, comments, multimedia content, etc. contain huge value; in medical information systems, unstructured data such as doctors' diagnostic records, text descriptions in medical records, and medical imaging reports are crucial for disease analysis and research.
[0003] At present, traditional unstructured data query methods face many problems. On the one hand, the ability to protect data privacy is insufficient. During the query process, a large amount of data is often transmitted and processed in the system in plain text, which makes sensitive information easy to be leaked. For example, in medical information query, the patient's condition details may be illegally obtained during the query process, thereby infringing the patient's privacy. On the other hand, traditional query methods lack adaptability to complex query scenarios. When faced with massive unstructured data, the existing query methods based on simple keyword matching or indexing are inefficient and cannot meet diverse query needs, such as fuzzy queries, semantic related queries, etc. At the same time, in a multi-user or multi-organization data sharing environment, different users have different access rights to data. Traditional methods cannot effectively implement fine-grained permission control, which easily leads to the risk of data abuse. In addition, when processing unstructured data, existing query methods are difficult to hide the query intent while ensuring query accuracy, which may be maliciously exploited, further endangering data security. Therefore, there is an urgent need for an unstructured data anonymous query method to solve these problems, ensure security and privacy in the data query process, and improve query efficiency and flexibility. Summary of the invention
[0004] The present invention provides a method, device, equipment and medium for anonymous query of unstructured data to improve the security of anonymous query of unstructured data.
[0005] In a first aspect, a method for anonymous query of unstructured data is provided, comprising:
[0006] Obtain a server to be queried and its corresponding data application scenario, construct a server table structure corresponding to the server, extract unstructured data to be analyzed from the server, and input the unstructured data as input data into a pre-trained general visual model;
[0007] Using the feature mining layer in the general visual model to perform feature mining processing on the unstructured data to obtain a data feature map, and using the feature sampling layer in the general visual model to perform downsampling processing on the data feature map to obtain a sampling feature map;
[0008] In combination with the server-side table structure, the sampling feature graph is adapted using the feature adaptation layer in the general visual model to obtain adaptation features, and based on the adaptation features, structured data corresponding to the optimized unstructured data is extracted;
[0009] Determine the data query request of the server and its corresponding query client, query the data to be queried from the structured data based on the data query request, perform homomorphic encryption on the data to be queried to obtain encrypted query data, and feed back the encrypted query data to the query client to obtain a feedback result.
[0010] In a second aspect, a non-structured data anonymous query device is provided, comprising:
[0011] A data processing module is used to obtain a server to be queried and its corresponding data application scenario, construct a server table structure corresponding to the server, extract unstructured data to be analyzed from the server, and input the unstructured data as input data into a pre-trained general visual model;
[0012] A feature sampling module, used to perform feature mining processing on the unstructured data using the feature mining layer in the general visual model to obtain a data feature map, and to perform downsampling processing on the data feature map using the feature sampling layer in the general visual model to obtain a sampling feature map;
[0013] A structured data extraction module, used to combine the server-side table structure, use the feature adaptation layer in the general visual model to adapt the sampled feature map to obtain adaptation features, and extract structured data corresponding to the optimized unstructured data based on the adaptation features;
[0014] A data encryption feedback processing module is used to determine the data query request of the server and its corresponding query client, query the data to be queried from the structured data based on the data query request, perform homomorphic encryption processing on the data to be queried to obtain encrypted query data, and feed back the encrypted query data to the query client to obtain a feedback result.
[0015] In a third aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned unstructured data anonymous query method when executing the computer program.
[0016] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned unstructured data anonymous query method is implemented.
[0017] Compared with the problems described in the background technology, firstly, the present invention obtains the server to be queried and its corresponding data application scenario, provides an analysis direction for subsequent data processing, constructs a server table structure corresponding to the server, and lays a foundation for the subsequent optimization of the extraction of structured data corresponding to the unstructured data. Secondly, the present invention uses the feature mining layer in the general visual model to perform feature mining processing on the unstructured data, and can obtain the deep features corresponding to the unstructured data. The unstructured data that was originally difficult to be directly processed and understood by the computer becomes interpretable. For example, in the field of image recognition, the mined features can help explain why a picture is classified as a certain category because the shape, color and other features of the object conform to the pattern of the category. This understandability is very important for Subsequent data analysis and decision making are very important. Next, the present invention combines the server-side table structure and utilizes the feature adaptation layer in the general visual model to adapt the sampling feature map. The required features corresponding to the server-side table structure can be extracted from the sampling feature map, thereby laying a basis for the extraction of structured data corresponding to the optimized unstructured data. Furthermore, the present invention can protect the data privacy in the data to be queried by performing homomorphic encryption on the data to be queried, avoid the leakage of data privacy during subsequent feedback to the query client, and improve the security of data feedback. Therefore, the unstructured data anonymous query method, device, equipment and medium proposed in the present invention can improve the security of unstructured data anonymous query. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0019] Figure 1 Schematic diagram of an application environment of an unstructured data anonymous query method in an embodiment of the present invention;
[0020] Figure 2 It is a flow chart of a method for anonymous query of unstructured data in one embodiment of the present invention;
[0021] Figure 31 is a schematic diagram of a structure of an unstructured data anonymous query device in one embodiment of the present invention;
[0022] Figure 4 is a schematic diagram of a structure of a computer device in one embodiment of the present invention;
[0023] Figure 5 It is another structural schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0024] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. The unstructured data anonymous query method provided in the embodiments of the present invention can be applied to Figure 1 In an application environment, the client communicates with the server through a network. The server can obtain the development scenario corresponding to the front-end project through the client, analyze the public content requirements in the development scenario, determine the public content category in the development scenario based on the public content requirements, sort out the content of the public content category, and obtain a public content list; based on the public content list, build a dual warehouse management mechanism corresponding to the front-end project, and perform version control on the public content in the public warehouse of the dual warehouse management mechanism to obtain version control information; based on the dual warehouse management mechanism and version control information, analyze the development efficiency and code quality corresponding to the front-end project, calculate the overall performance index corresponding to the front-end project according to the development efficiency and the code quality, and evaluate the development effect corresponding to the front-end project based on the overall performance index; identify the positive and negative factors in the development effect, analyze the project architecture corresponding to the front-end project based on the positive and negative factors, and formulate the optimization strategy of the front-end project based on the project architecture; based on the optimization strategy, optimize the front-end project to obtain an optimized project, analyze the project goals corresponding to the optimized project, and generate the front-end management plan corresponding to the front-end project based on the project goals. The client may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The server may be implemented by an independent server or a server cluster consisting of multiple servers. The present invention is described in detail below through specific embodiments.
[0025] See also Figure 2 As shown, Figure 2 A flowchart of a method for anonymous query of unstructured data provided by an embodiment of the present invention includes the following steps:
[0026] S1. Obtain the server to be queried and its corresponding data application scenario, construct a server table structure corresponding to the server, extract unstructured data to be analyzed from the server, and input the unstructured data as input data into a pre-trained general visual model.
[0027] The present invention obtains the server to be queried and its corresponding data application scenario, provides an analysis direction for subsequent data processing, constructs a server table structure corresponding to the server, and lays a foundation for the subsequent optimization of the extraction of structured data corresponding to unstructured data.
[0028] Furthermore, an exemplary description of obtaining the server to be queried and its corresponding data application scenario is as follows: on an online education server, for the data application scenario of course learning, according to the data characteristics and access frequency of different types of courses (such as video courses, document courses, live courses), the basic course information (such as course name, teacher, introduction) can be stored in one table, and the course learning progress data (such as student ID, course ID, learning time, completed chapters) can be stored in another table. This targeted storage layout can improve data storage efficiency and reduce data redundancy.
[0029] Among them, the server is used to provide a service platform for query, such as parking lot video surveillance processing. The parking lot management office provides query services, and the parking lot management office is the server. The data application scenario is the scenario in which the data in the server corresponds to the data, such as the vehicle access management scenario. The server table structure is the data organization structure corresponding to the server. For example, for the parking lot video surveillance scenario, it is necessary to focus on information such as license plates and vehicle appearance, and the table structure is agreed to record the appearance time, license plates and vehicle appearance of the vehicles appearing in the video. After such an agreement is made, when processing the surveillance video, the time corresponding to each frame is recorded, and the task of extracting license plates and vehicle appearance is used as an auxiliary prompt word input of the general visual model in addition to the video picture.
[0030] As an embodiment of the present invention, the construction of the server table structure corresponding to the server includes: extracting the scenario attribute tag of the data application scenario, and calculating the tag weight corresponding to the scenario attribute tag; based on the tag weight, screening out key attribute tags from the scenario attribute tags; performing category parsing on the key attribute tags to obtain attribute categories; and constructing the server table structure corresponding to the server according to the key attribute tags.
[0031] Among them, the scene attribute label is a scene description of the data application scenario. For example, in a shopping festival promotion scenario, its scene attribute labels may include "big promotion activities", "limited time discounts", "discounts for purchases above a certain amount", "gift strategy", etc. The label weight indicates the importance of the scene attribute label. The key attribute label is the label with the largest label weight value corresponding to the scene attribute label. For example, in a parking lot video surveillance scenario, if the main purpose is to ensure vehicle safety, "vehicle appearance condition" is a key attribute label, because it is crucial to monitor the appearance of the vehicle in real time to prevent scratches, collisions, etc. For example, when other vehicles may collide with the target vehicle during parking or reversing, changes in the appearance of the vehicle (such as new scratches, dents, etc.) can be discovered in time through video surveillance, so that the responsibility can be quickly determined and corresponding measures can be taken. At this time, the weight value of the "vehicle appearance condition" label may be the largest relative to other scene attribute labels under the main purpose of ensuring vehicle safety. The attribute category is the specific type corresponding to the key attribute label.
[0032] Furthermore, the extraction of scenario attribute labels of the data application scenario can be achieved through a label extraction tool, and the label extraction tool is compiled by a scripting language; the calculation of label weights corresponding to the scenario attribute labels can be achieved through an entropy weight algorithm, and the data of the scenario attribute labels need to be standardized. For example, in a data set containing multiple data application scenarios, for the scenario attribute label of "user activity", the user activity data under different scenarios should be unified into a comparable range, and then the information entropy of each scenario attribute label is calculated. The larger the information entropy, the more uncertain the information contained in the label, and the smaller its weight should be. For example, in the data application scenario of a social network, if the difference in the label of "online time" among different user groups is small, the information entropy is large, which means that it has a relatively small effect on distinguishing user behavior patterns and has a lower weight. Finally, according to Information entropy calculates the weight of each scenario attribute label, and the weight is inversely proportional to the information entropy; when the label weight is greater than the preset weight, the key attribute label is screened out from the scenario attribute label, and the preset weight can be set to 0.8, or it can be set according to the actual business scenario; the category parsing of the key attribute label can be achieved through a semantic rule-based method, and the category of the key attribute label is parsed through pre-defined semantic rules. This requires an in-depth understanding of the business field and data application scenarios to formulate accurate semantic rules. For example, in the e-commerce data application scenario, if the key attribute label contains words such as "price", "discount" and "promotion", it can be classified as "marketing price category". These rules can be constructed based on industry terms, key concepts in business processes, etc.; the construction of the server-side table structure corresponding to the server can be achieved through the PowerDesigner tool.
[0033] The present invention extracts unstructured data to be analyzed from the server, and inputs the unstructured data as input data into a pre-trained universal visual model, thereby facilitating analysis and processing of the unstructured data through the universal visual model, wherein the unstructured data is the original data resource in the server, such as a parking lot surveillance video, and the universal visual model is an artificial intelligence model that can handle a variety of visual tasks and has wide applicability and strong generalization ability. Optionally, the extraction of the unstructured data to be analyzed from the server can be achieved through a web crawler.
[0034] S2. Use the feature mining layer in the general visual model to perform feature mining processing on the unstructured data to obtain a data feature map, and use the feature sampling layer in the general visual model to downsample the data feature map to obtain a sampling feature map.
[0035] The present invention utilizes the feature mining layer in the general visual model to perform feature mining processing on the unstructured data, and can obtain the deep features corresponding to the unstructured data. The unstructured data that was originally difficult to be directly processed and understood by the computer becomes explainable. For example, in the field of image recognition, the mined features can help explain why a picture is classified into a certain category, because the shape, color and other features of the object conform to the pattern of the category. This comprehensibility is very important for subsequent data analysis and decision making. Among them, the feature mining layer is a neural layer in the general visual model used to extract the deep features of the data, and the data feature map is a structured display of the features of the unstructured data.
[0036] As an embodiment of the present invention, the feature mining layer in the general visual model is used to perform feature mining processing on the unstructured data to obtain a data feature map, including: using the purification layer in the feature mining layer to purify the unstructured data to obtain target data; using the convolution layer in the feature mining layer to extract features of the target data to obtain initial data features; using the information gain function in the feature mining layer to calculate the feature gain value corresponding to the initial data feature; based on the feature gain value, using the output layer in the feature mining layer to filter the initial data features to obtain target data features; using the fully connected layer in the feature mining layer to perform feature fusion processing on the target data features to obtain a data feature map.
[0037] Among them, the purification layer is a neural layer used in the feature mining layer to clean the input data, and is composed of a cleaning function, which is compiled by a programming language. The target data is the data obtained after the invalid data in the unstructured data is cleaned. The convolution layer is a neural layer in the feature mining layer for extracting features, and is composed of multiple convolution kernels. The initial data feature is the basic representation of the target data. The information gain function is a function used to calculate the gain value corresponding to the feature, such as the Shannon entropy function. The feature gain value represents the information gain degree of the initial data feature. The output layer is a neural layer in the feature mining layer for screening the results, and is composed of an output function. The target data feature is the feature with the largest feature gain value corresponding to the initial data feature. The fully connected layer is a feature obtained by fusing the features in the feature mining layer.
[0038] The present invention downsamples the data feature map using the feature sampling layer in the general visual model, thereby retaining the main features in the data feature map, so as to facilitate subsequent adaptation processing of the sampled feature map and improve the accuracy of structured data extraction, wherein the feature sampling layer is a neural layer that retains the main features of the data feature map, and the sampled feature map is an important feature map retained in the data feature map.
[0039] As an embodiment of the present invention, the downsampling process of the data feature map using the feature sampling layer in the general visual model to obtain the sampling feature map includes: using the feature pooling layer in the feature sampling layer to reduce the dimension of the data feature map to obtain the reduced dimension feature map; using the bidirectional encoder in the feature sampling layer to perform bidirectional encoding on the reduced dimension feature map to obtain a forward encoding feature map and a backward encoding feature map, and the processing formula of the bidirectional encoder is:
[0040] A a =B(D a ×E a +F|a|×g(d-1))
[0041] A b =B(D b ×E b +F|b|×g(d+1))
[0042] Among them, A a and A b They represent the forward coding feature map and the backward coding feature map respectively, B() represents the probability scaling factor, and D a Represents the forward transfer matrix of the reduced-dimensional feature map, E arepresents the features corresponding to the reduced-dimensional feature map during forward encoding, F|a| represents the forward transfer matrix, g(d-1) represents the previous reduced-dimensional feature map during forward encoding, and D b represents the posterior transfer matrix of the reduced-dimensional feature map, E b represents the features corresponding to the reduced-dimensional feature map during backward encoding, F|b| represents the backward transfer matrix, and g(d+1) represents the next reduced-dimensional feature map during backward circulation;
[0043] The forward coding feature map and the backward coding feature map are combined to obtain a sampling feature map.
[0044] Among them, the feature pooling layer is a neural layer in the feature sampling layer used to perform dimensionality reduction processing on features, and is composed of pooling functions, such as maximum and minimum pooling functions. The bidirectional encoder is a core module in the feature sampling layer used to perform bidirectional encoding processing on the reduced dimensionality feature map. The forward encoding feature map and the backward encoding feature map are respectively a feature map encoded in forward order from the starting position of the reduced dimensionality feature map and a feature map encoded in reverse order from the end position of the reduced dimensionality feature map.
[0045] S3. In combination with the server-side table structure, the feature adaptation layer in the general visual model is used to adapt the sampling feature map to obtain adaptation features, and based on the adaptation features, structured data corresponding to the unstructured data is extracted.
[0046] The present invention combines the server-side table structure and utilizes the feature adaptation layer in the general visual model to adapt the sampling feature map, so as to extract the required features corresponding to the server-side table structure from the sampling feature map, thereby laying a foundation for the extraction of structured data corresponding to the optimized unstructured data, wherein the feature adaptation layer is a neural layer in the general visual model used to align the sampling feature map, and the adaptation feature is a feature in the sampling feature map that is adapted to the server-side table structure.
[0047] As an embodiment of the present invention, the sampling feature map is adapted and processed by the feature adaptation layer in the general visual model in combination with the server-side table structure to obtain an adapted feature, including: extracting the feature descriptor corresponding to the sampling feature map by using the extraction function in the feature adaptation layer, and identifying the structure field in the server-side table structure; calculating the adaptation index between the structure field and the feature descriptor by using the adaptation function in the feature adaptation layer; and adapting the sampling feature map by using the adaptation layer in the feature adaptation layer in combination with the adaptation index to obtain an adapted feature.
[0048] Among them, the extraction function is a function used to extract the feature descriptor corresponding to the sampling feature map, such as a SIFT (Scale Invariant Feature Transform) function, the feature descriptor is a representative constituent element corresponding to the sampling feature map, the structure field is a property division field in the server-side table structure, the adaptation function is a function used in the feature adaptation layer to calculate the adaptation index, the adaptation index represents the degree of adaptation between the structure field and the feature descriptor, and the adaptation layer is a feature used in the feature adaptation layer to match the sampling feature map according to the features corresponding to the structure field to obtain the features.
[0049] Furthermore, the recognition of the structure fields in the server-side table structure can be achieved through OCR recognition technology; the adaptation layer is composed of an activation function, such as a Sigmoid function.
[0050] Further, as an optional embodiment of the present invention, the use of the adaptation function in the feature adaptation layer to calculate the adaptation index between the structure field and the feature descriptor includes: respectively vectorizing the structure field and the feature descriptor to obtain a field vector and a descriptor vector; respectively extracting the feature vectors corresponding to the field vector and the descriptor vector to obtain a field feature vector and a descriptor feature vector; respectively standardizing the field feature vector and the descriptor feature vector to obtain a first feature vector and a second feature vector; using the adaptation function to calculate the vector fitness between the first feature vector and the second feature vector; and based on the vector fitness, obtaining the adaptation index between the structure field and the feature descriptor.
[0051] Among them, the field vector and the descriptor vector are expression vectors corresponding to the structure field and the feature descriptor respectively, the field feature vector and the descriptor feature vector are representative vectors in the field vector and the descriptor vector respectively, the first feature vector and the second feature vector are vectors obtained by standardization of the field feature vector and the descriptor feature vector respectively, in order to eliminate the influence of the corresponding vector modulus on the vector fitness calculation, the vector fitness represents the degree of adaptation between the first feature vector and the second feature vector.
[0052] Furthermore, the vectorization processing of the structure field and the feature descriptor can be achieved through a coding algorithm, such as a one-hot encoding algorithm; the extraction of the feature vectors corresponding to the field vector and the descriptor vector can be achieved through a principal component analysis method; the standardization processing of the field feature vector and the descriptor feature vector can be achieved through a Z-score standardization method; the adaptation function is composed of a Manhattan distance function, firstly calculating the vector distance between the first feature vector and the second feature vector, converting the vector distance to obtain a vector fitness, and the conversion process is 1 / (1+vector distance); converting the vector fitness to obtain a fitness index between the structure field and the feature descriptor.
[0053] The present invention can improve the extraction accuracy of structured data by extracting structured data corresponding to the unstructured data based on the adaptation features, so as to provide accurate feedback data for the query client later, wherein the structured data is the normalized data corresponding to the unstructured data. Furthermore, the extraction process of the structured data corresponding to the unstructured data is as follows: in the parking lot monitoring scenario, the unstructured data is such as monitoring video. First, the adaptation features are extracted from the video, such as the appearance, color and other features of the vehicle as the adaptation features. Then, these features are analyzed through image recognition technology. After the specific features of the vehicle are identified, they are converted into structured data, such as the vehicle entry time, vehicle color, vehicle model, etc. These data are recorded, thereby realizing the extraction of structured data from the unstructured monitoring video.
[0054] S4. Determine the data query request of the server and its corresponding query client, query the data to be queried from the structured data based on the data query request, perform homomorphic encryption on the data to be queried to obtain encrypted query data, and feed back the encrypted query data to the query client to obtain a feedback result.
[0055] The present invention can protect the data privacy in the data to be queried by performing homomorphic encryption processing on the data to be queried, avoid the leakage of data privacy when the query client is subsequently fed back, and improve the security of data feedback, wherein the data query request is a trigger instruction when querying the data in the server, the query client is the initiator corresponding to the data query request, the data to be queried is the scheduling data corresponding to the data query request, and the encrypted query data is the data obtained after the data to be queried is encrypted. Furthermore, querying the data to be queried from the structured data can be achieved through an SQL query method.
[0056] As an embodiment of the present invention, the homomorphic encryption processing of the data to be queried to obtain encrypted query data includes: extracting data items and data indexes of the data to be queried; identifying incremental data in the data to be queried based on the data items and the data indexes; calculating a data encryption value corresponding to the incremental data using a preset homomorphic encryption function; and performing data update processing on the data to be queried using the data encryption value to obtain encrypted query data.
[0057] Among them, the data item and the data index are the specific content units and retrieval guidelines corresponding to the data to be queried, the incremental data are the newly added data in the data to be queried, the homomorphic encryption function is a function for calculating the encrypted representation corresponding to the incremental data, such as an inadvertent pseudo-random function, and the data encryption value is the data privacy protection form corresponding to the incremental data.
[0058] Furthermore, the extraction of the data items and data indexes of the data to be queried can be achieved through data warehouse tools, such as ETL tools; the data items and the data indexes are compared with the previous data structure. If they do not appear, the corresponding data is the incremental data in the data to be queried; the step of calculating the data encryption value corresponding to the incremental data using a preset homomorphic encryption function is: for example, if the incremental data is X={0, 3, 4}, then prepare a polynomial M(x)=(x-0)(x-3)(x-4), the characteristic of M is that if the input x is in X, then M(x)=0, otherwise M(x) is not zero. When the client queries, it provides a public key for the database to encrypt M, and provides an encrypted query request E(Q), where E is a homomorphic encryption function. After receiving the public key, the database encrypts it. To E(M), and input the query request E(Q). Since the homomorphic encryption function E is asymmetric, the database can only encrypt but not decrypt using the public key, so the client query request can be concealed. The database returns the query result E(M(Q)), and the client uses the private key to decrypt. If Q is in X, the decrypted result is 0, otherwise it is not 0. Since the client can obtain additional information about the database through the decrypted result in addition to whether the decrypted result is zero, in the above example, the client queries x=1, and the database returns the result and decrypts it to obtain M(1)=(1-0)*(1-3)*(1-4)=6, which is greater than 0. Therefore, the client can know that there are an even number of values greater than 1 in the database. Therefore, the incremental data needs to be obfuscated by the oblivious pseudo-random function (OPRF), so that the 0 in the result remains 0, while the non-zero value is mapped to an unrelated random value through the pseudo-random function. After the OPRF mapping, the 0 obtained by the client indicates that the query has obtained the result, while the non-zero value is random and does not contain any information related to the database.
[0059] In one embodiment, a non-structured data anonymous query device is provided, and the non-structured data anonymous query device corresponds to the non-structured data anonymous query method in the above embodiment. Figure 3 As shown, the unstructured data anonymous query device includes a data processing module 201, a feature sampling module 202, a structure data extraction module 203 and a data encryption feedback processing module 204. The functional modules are described in detail as follows:
[0060] The data processing module 201 is used to obtain the server to be queried and its corresponding data application scenario, construct a server table structure corresponding to the server, extract the unstructured data to be analyzed from the server, and input the unstructured data as input data into a pre-trained general visual model;
[0061] A feature sampling module 202 is used to perform feature mining processing on the unstructured data using the feature mining layer in the general visual model to obtain a data feature map, and to perform downsampling processing on the data feature map using the feature sampling layer in the general visual model to obtain a sampling feature map;
[0062] The structure data extraction module 203 is used to adapt the sampled feature graph using the feature adaptation layer in the general visual model in combination with the server-side table structure to obtain adaptation features, and extract structured data corresponding to the optimized unstructured data based on the adaptation features;
[0063] The data encryption feedback processing module 204 is used to determine the data query request of the server and its corresponding query client, query the data to be queried from the structured data based on the data query request, perform homomorphic encryption processing on the data to be queried to obtain encrypted query data, and feed back the encrypted query data to the query client to obtain a feedback result.
[0064] The specific definition of the unstructured data anonymous query device can be found in the definition of the front-end management method above, which will not be repeated here. Each module in the above-mentioned unstructured data anonymous query device can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0065] In one embodiment, when executing the construction of the server table structure corresponding to the server, the data processing module 201 is used to: extract the scenario attribute tags of the data application scenario, and calculate the tag weights corresponding to the scenario attribute tags; based on the tag weights, filter out key attribute tags from the scenario attribute tags; perform category analysis on the key attribute tags to obtain attribute categories; and construct the server table structure corresponding to the server based on the key attribute tags.
[0066] In one embodiment, when the feature sampling module 202 performs feature mining processing on the unstructured data using the feature mining layer in the general visual model to obtain a data feature graph, it is used to: use the purification layer in the feature mining layer to purify the unstructured data to obtain target data; use the convolution layer in the feature mining layer to extract features of the target data to obtain initial data features; use the information gain function in the feature mining layer to calculate the feature gain value corresponding to the initial data feature; based on the feature gain value, use the output layer in the feature mining layer to screen the initial data features to obtain target data features; use the fully connected layer in the feature mining layer to perform feature fusion processing on the target data features to obtain a data feature graph.
[0067] In one embodiment, when the feature sampling module 202 performs the downsampling processing on the data feature map using the feature sampling layer in the general visual model to obtain the sampling feature map, it is used to: perform dimensionality reduction processing on the data feature map using the feature pooling layer in the feature sampling layer to obtain a reduced dimensionality feature map; perform bidirectional encoding processing on the reduced dimensionality feature map using the bidirectional encoder in the feature sampling layer to obtain a forward encoding feature map and a backward encoding feature map; and combine the forward encoding feature map and the backward encoding feature map to obtain a sampling feature map.
[0068] In one embodiment, when the structural data extraction module 203 performs the adaptation processing on the sampling feature map in combination with the server-side table structure and obtains the adaptation feature by using the feature adaptation layer in the general visual model, it is used to: extract the feature descriptor corresponding to the sampling feature map by using the extraction function in the feature adaptation layer, and identify the structure field in the server-side table structure; calculate the adaptation index between the structure field and the feature descriptor by using the adaptation function in the feature adaptation layer; and adapt the sampling feature map by using the adaptation layer in the feature adaptation layer in combination with the adaptation index to obtain the adaptation feature.
[0069] In one embodiment, when the structure data extraction module 203 executes the calculation of the adaptation index between the structure field and the feature descriptor using the adaptation function in the feature adaptation layer, it is used to: respectively vectorize the structure field and the feature descriptor to obtain a field vector and a descriptor vector; respectively extract the feature vectors corresponding to the field vector and the descriptor vector to obtain a field feature vector and a descriptor feature vector; respectively standardize the field feature vector and the descriptor feature vector to obtain a first feature vector and a second feature vector; calculate the vector fitness between the first feature vector and the second feature vector using the adaptation function; and obtain the adaptation index between the structure field and the feature descriptor based on the vector fitness.
[0070] In one embodiment, when the data encryption feedback processing module 204 performs the homomorphic encryption processing on the data to be queried to obtain encrypted query data, it is used to: extract the data items and data indexes of the data to be queried; based on the data items and the data indexes, identify the incremental data in the data to be queried; use a preset homomorphic encryption function to calculate the data encryption value corresponding to the incremental data; and use the data encryption value to perform data update processing on the data to be queried to obtain encrypted query data.
[0071] For the specific definition of the unstructured data anonymous query device, please refer to the definition of the unstructured data anonymous query method above, which will not be repeated here. Each module in the above-mentioned unstructured data anonymous query device can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0072] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a service-side method for anonymous query of unstructured data.
[0073] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server through a network connection. When the computer program is executed by the processor, it realizes the functions or steps of the client side of a method for anonymous query of unstructured data
[0074] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0075] Obtain a server to be queried and its corresponding data application scenario, construct a server table structure corresponding to the server, extract unstructured data to be analyzed from the server, and input the unstructured data as input data into a pre-trained general visual model;
[0076] Using the feature mining layer in the general visual model to perform feature mining processing on the unstructured data to obtain a data feature map, and using the feature sampling layer in the general visual model to perform downsampling processing on the data feature map to obtain a sampling feature map;
[0077] In combination with the server-side table structure, the sampling feature graph is adapted using the feature adaptation layer in the general visual model to obtain adaptation features, and based on the adaptation features, structured data corresponding to the optimized unstructured data is extracted;
[0078] Determine the data query request of the server and its corresponding query client, query the data to be queried from the structured data based on the data query request, perform homomorphic encryption on the data to be queried to obtain encrypted query data, and feed back the encrypted query data to the query client to obtain a feedback result.
[0079] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0080] Obtain a server to be queried and its corresponding data application scenario, construct a server table structure corresponding to the server, extract unstructured data to be analyzed from the server, and input the unstructured data as input data into a pre-trained general visual model;
[0081] Using the feature mining layer in the general visual model to perform feature mining processing on the unstructured data to obtain a data feature map, and using the feature sampling layer in the general visual model to perform downsampling processing on the data feature map to obtain a sampling feature map;
[0082] In combination with the server-side table structure, the sampling feature graph is adapted using the feature adaptation layer in the general visual model to obtain adaptation features, and based on the adaptation features, structured data corresponding to the optimized unstructured data is extracted;
[0083] Determine the data query request of the server and its corresponding query client, query the data to be queried from the structured data based on the data query request, perform homomorphic encryption on the data to be queried to obtain encrypted query data, and feed back the encrypted query data to the query client to obtain a feedback result.
[0084] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0085] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0086] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0087] The above-described embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some of the technical features therein by equivalents; and these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should be included in the protection scope of the present invention. It should be noted that if software tools or components other than those of the company appear in the embodiments of this application, they are only used for illustration and do not represent actual use.
Claims
1. A method for anonymous query of unstructured data, characterized in that: include: Obtain a server to be queried and its corresponding data application scenario, construct a server table structure corresponding to the server, extract unstructured data to be analyzed from the server, and input the unstructured data as input data into a pre-trained general visual model; Using the feature mining layer in the general visual model to perform feature mining processing on the unstructured data to obtain a data feature map, and using the feature sampling layer in the general visual model to perform downsampling processing on the data feature map to obtain a sampling feature map; In combination with the server-side table structure, the sampling feature graph is adapted using the feature adaptation layer in the general visual model to obtain adaptation features, and based on the adaptation features, structured data corresponding to the optimized unstructured data is extracted; Determine the data query request of the server and its corresponding query client, query the data to be queried from the structured data based on the data query request, perform homomorphic encryption on the data to be queried to obtain encrypted query data, and feed back the encrypted query data to the query client to obtain a feedback result.
2. The unstructured data anonymous query method according to claim 1, characterized in that: The step of constructing a server table structure corresponding to the server includes: Extracting the scene attribute label of the data application scene, and calculating the label weight corresponding to the scene attribute label; Based on the tag weights, filtering out key attribute tags from the scene attribute tags; Performing category parsing on the key attribute tags to obtain attribute categories; According to the key attribute tag, a server table structure corresponding to the server is constructed.
3. The unstructured data anonymous query method according to claim 1, characterized in that: The step of performing feature mining processing on the unstructured data using the feature mining layer in the general visual model to obtain a data feature graph includes: Using the purification layer in the feature mining layer to purify the unstructured data to obtain target data; Using the convolution layer in the feature mining layer to extract features of the target data to obtain initial data features; Calculating the feature gain value corresponding to the initial data feature using the information gain function in the feature mining layer; Based on the feature gain value, the initial data features are screened using the output layer in the feature mining layer to obtain target data features; The target data features are subjected to feature fusion processing using the fully connected layer in the feature mining layer to obtain a data feature graph.
4. The unstructured data anonymous query method according to claim 1, characterized in that: The downsampling process of the data feature map by using the feature sampling layer in the general visual model to obtain the sampling feature map includes: Using the feature pooling layer in the feature sampling layer to perform dimensionality reduction processing on the data feature map to obtain a dimensionality reduction feature map; Using the bidirectional encoder in the feature sampling layer to perform bidirectional encoding processing on the dimension reduction feature map to obtain a forward encoding feature map and a backward encoding feature map; The forward coding feature map and the backward coding feature map are combined to obtain a sampling feature map.
5. The unstructured data anonymous query method according to claim 1, characterized in that: The combining the server-side table structure and using the feature adaptation layer in the general visual model to adapt the sampled feature graph to obtain the adapted feature includes: Extracting the feature descriptor corresponding to the sampled feature graph using the extraction function in the feature adaptation layer, and identifying the structure field in the server-side table structure; Calculating the adaptation index between the structure field and the feature descriptor using the adaptation function in the feature adaptation layer; In combination with the adaptation index, the sampling feature map is adapted using the adaptation layer in the feature adaptation layer to obtain an adaptation feature.
6. The method for anonymous query of unstructured data according to claim 5, characterized in that: The calculating the adaptation index between the structure field and the feature descriptor by using the adaptation function in the feature adaptation layer includes: Performing vectorization processing on the structure field and the feature descriptor respectively to obtain a field vector and a descriptor vector; Extracting feature vectors corresponding to the field vector and the descriptor vector respectively to obtain a field feature vector and a descriptor feature vector; Standardizing the field feature vector and the descriptor feature vector respectively to obtain a first feature vector and a second feature vector; Calculating the vector fitness between the first eigenvector and the second eigenvector using the adaptation function; Based on the vector fitness, an adaptation index between the structure field and the feature descriptor is obtained.
7. The unstructured data anonymous query method according to claim 1, characterized in that: The performing homomorphic encryption processing on the data to be queried to obtain encrypted query data includes: Extracting data items and data indexes of the data to be queried; Based on the data item and the data index, identifying incremental data in the data to be queried; Calculate the data encryption value corresponding to the incremental data using a preset homomorphic encryption function; The data to be queried is updated using the data encryption value to obtain encrypted query data.
8. A non-structured data anonymous query device, characterized in that: include: A data processing module is used to obtain a server to be queried and its corresponding data application scenario, construct a server table structure corresponding to the server, extract unstructured data to be analyzed from the server, and input the unstructured data as input data into a pre-trained general visual model; A feature sampling module, used to perform feature mining processing on the unstructured data using the feature mining layer in the general visual model to obtain a data feature map, and to perform downsampling processing on the data feature map using the feature sampling layer in the general visual model to obtain a sampling feature map; A structured data extraction module, used to combine the server-side table structure, use the feature adaptation layer in the general visual model to adapt the sampled feature map to obtain adaptation features, and extract structured data corresponding to the optimized unstructured data based on the adaptation features; A data encryption feedback processing module is used to determine the data query request of the server and its corresponding query client, query the data to be queried from the structured data based on the data query request, perform homomorphic encryption processing on the data to be queried to obtain encrypted query data, and feed back the encrypted query data to the query client to obtain a feedback result.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the unstructured data anonymous query method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the unstructured data anonymous query method as described in any one of claims 1 to 7 is implemented.