Legal query method and system based on access control

The improved ASPE technology with random numbers and permutations, combined with a polynomial access control strategy, addresses the vulnerabilities of existing encryption schemes, ensuring secure and efficient matching of law firms with client needs, enhancing the security and efficiency of legal query systems.

CN118862172BActive Publication Date: 2024-12-20HANGZHOU NORMAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411325565.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2024-12-20
Estimated Expiration
2044-09-23

AI Technical Summary

Technical Problem

Existing encryption schemes for law firms, such as ASPE technology, are unsafe and vulnerable to known plaintext attacks, leading to potential data leaks of sensitive information, and there is a lack of accurate and efficient methods to match clients with suitable law firms.

Method used

A legal query method and system using improved ASPE technology with random numbers and permutations, combined with a polynomial access control strategy, to encrypt and verify user access roles, ensuring secure and efficient matching of law firms based on geographic and keyword queries.

Benefits of technology

Enhances the security of legal query systems by resisting chosen plaintext attacks and reducing computing and storage overheads, while ensuring accurate and efficient matching of law firms with client needs, thereby protecting sensitive information and optimizing resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118862172B_ABST
    Figure CN118862172B_ABST
Patent Text Reader

Abstract

The invention discloses a legal query method and system based on access control, belonging to the field of information query technology. The method first constructs an index structure according to the geographical location and keyword group of the law firm, and adopts the improved ASPE technology to encrypt the index structure to obtain an encrypted index structure; then constructs a query index structure according to the query request of the client, introduces an access role set into the query index structure and adopts the improved ASPE technology to encrypt the query index structure to obtain a query threshold; adopts a polynomial access control strategy to verify the authority of the client, and traverses the database according to the query threshold of the authorized client to obtain a query result; the method quickly and accurately matches the law firm corresponding to the client's claim for the query request initiated by the client, saving time cost for the client.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of information query, and in particular to a legal query method and system based on access control. Background Art

[0002] In recent years, with the rapid development of social economy and the general improvement of people's legal awareness, the role and status of law firms have indeed gradually become prominent, and their scale is also expanding rapidly. When parties encounter legal issues such as civil disputes or traffic violations, ways to quickly find law firms include searching on maps, consulting local people, etc. Local people may convey incorrect information, not all law firms will update their location information on the map in a timely manner, or some law firms may choose not to display on the map for some reason. This may make it impossible to accurately find a law firm that meets the needs of the client.

[0003] In addition, law firms outsource their data to cloud servers to reduce local storage and computing burdens, but this operation is subject to privacy leakage. In the process of handling cases, law firms will be exposed to a large amount of sensitive information of the parties, including their personal information, business secrets, etc. In order to ensure that this information is not leaked, law firms adopt various encryption schemes to protect the confidentiality of customer data. The existing encryption scheme uses ASPE (Asymmetric Scalar Product Preserving Encryption) technology to encrypt customer data, but ASPE technology has been proven to be unsafe and does not resist known plaintext attacks. Summary of the invention

[0004] In view of the problems existing in the prior art, the present invention provides a legal query method and system based on access control, which can quickly and accurately match corresponding legal affairs according to the demands of the parties, thereby efficiently solving the legal problems of the parties.

[0005] In order to achieve the above objectives, this application adopts the following technical solutions:

[0006] In the first aspect, the present application proposes a legal query method based on access control, which is applied to the query end and includes:

[0007] A query index structure is constructed according to a user's query request and in combination with encoding technology, wherein the query request includes a query geographic scope and a query keyword group; an access role set of the user is introduced into the query index structure, and the query index structure is encrypted using an improved ASPE technology to obtain a query threshold, and the query threshold is sent to a cloud server;

[0008] Receive the query result of the cloud server on the authorized user, the query result of the cloud server on the authorized user is obtained by the following method:

[0009] The cloud server uses a polynomial access control strategy to verify the user's access role, confirm that the user is an authorized user, traverse the encrypted index structure according to the query threshold of the authorized user, use the inner product of the encrypted index structure and the query threshold to verify the query result, and send the verified query result to the authorized user;

[0010] The encrypted index structure is an index structure constructed by the geographical location and keyword group of the law firm, and the index structure is encrypted using the improved ASPE technology to obtain the encrypted index structure;

[0011] The improved ASPE technology introduces random numbers and random permutations into the ASPE technology to improve the ASPE technology.

[0012] Furthermore, the query index structure is constructed according to the user's query request and in combination with the encoding technology, including:

[0013] Using a geographic location encoding method to perform hash encoding on the query geographic range to obtain a code string, converting the code string into a multidimensional vector to obtain a first query index vector;

[0014] Convert the query keyword phrase into a multi-dimensional vector to obtain a second query index vector;

[0015] The first query index vector and the second query index vector are combined to obtain a query index structure.

[0016] Furthermore, the geographic location encoding method is a Geohash algorithm.

[0017] Furthermore, the step of using the improved ASPE technology to encrypt the query index structure to obtain the query threshold includes:

[0018] The query index structure is expanded by using random numbers and access role sets to obtain an expanded index structure, the expanded index structure is permuted by using random permutation, the permuted expanded index structure is encrypted by using a user's secret key, and a query threshold is obtained.

[0019] Furthermore, the cloud server uses a polynomial access control strategy to verify the user's access role and determine that the user is an authorized user, including:

[0020] Substitute the user's access role set into the polynomial. When the access role in the access role set is the root of the polynomial, the user is an authorized user. When the access role is not the root of the polynomial, the user is an illegal user.

[0021] Furthermore, the expression of the polynomial is as follows:

[0022]

[0023] when hour, For the i Polynomial The highest order term of To access the role set, For the j access roles, For polynomial No. j +1 coefficient, T For variables, Access roles;

[0024] When the access role is not polynomial The root of ; When the access role is the root of a polynomial, then .

[0025] Furthermore, traversing the encrypted index structure according to the query threshold of the authorized user and verifying the query result using the inner product of the encrypted index structure and the query threshold includes:

[0026] The encrypted index structure and the query threshold are inner-producted, and the query result is verified based on the inner-product result. The query result includes law firms whose geographical locations meet the query request, law firms whose keyword groups meet the query request, and law firms whose geographical locations and keyword groups meet the query request.

[0027] Furthermore, the verification method of the query result is as follows:

[0028]

[0029] in, For the i The encrypted index structure of law firms, Query threshold, For the i polynomials, T is a variable, t Indicates the query geographic range code bit value, k is the number of query keywords, According to i The location of the law firm The first index vector created, According to i Keyword Groups for Law Firms The second index vector created is is the first query index vector established according to the query geographic scope, A second query index vector established according to the query keyword group;

[0030] like , the geographical location of the law firm is related to the query geographical scope All law firms with the same bit value are sent as query results to the authorized user;

[0031] like , will be related to the query keyword group All law firms with the same keyword are sent as query results to the authorized user;

[0032] like , the geographical location of the law firm is included in the query geographical scope, and all law firms whose corresponding keyword groups satisfy the query keyword groups are sent as query results to the authorized user.

[0033] In the second aspect, the present application proposes a legal query system based on access control, which is applied to the query end and includes:

[0034] The query threshold module is used to construct a query index structure according to the user's query request and in combination with the encoding technology, wherein the query request includes the query geographic scope and the query keyword group; introduce the user's access role set into the query index structure, and use the improved ASPE technology to encrypt the query index structure to obtain the query threshold, and send the query threshold to the cloud server;

[0035] The query result module is used to receive the query result of the cloud server on the authorized user. The query result of the cloud server on the authorized user is obtained by the following method:

[0036] The cloud server uses a polynomial access control strategy to verify the user's access role, confirm that the user is an authorized user, traverse the encrypted index structure according to the query threshold of the authorized user, use the inner product of the encrypted index structure and the query threshold to verify the query result, and send the verified query result to the authorized user;

[0037] The encrypted index structure is an index structure constructed by the geographical location and keyword group of the law firm, and the index structure is encrypted using the improved ASPE technology to obtain the encrypted index structure;

[0038] The improved ASPE technology introduces random numbers and random permutations into the ASPE technology to improve the ASPE technology.

[0039] In a third aspect, the present application provides an electronic device, comprising:

[0040] Memory for storing computer programs;

[0041] A processor is used to implement the steps of the access control-based legal query method when executing the computer program.

[0042] Compared with the prior art, the present invention has the following beneficial technical effects:

[0043] The present application provides a legal query method based on access control, which adopts the improved ASPE technology to encrypt the index structure of the law firm and the query index structure of the user. The improved ASPE technology adds random numbers and random permutations to the existing ASPE technology to improve the ASPE technology. The improved ASPE technology is used to encrypt the index structure, which can achieve indistinguishability under chosen plaintext attacks and ensure that the accuracy of the query results is not affected, thereby improving the security of the legal intelligent range query system. In addition, the user's access role is verified based on the polynomial access strategy, so that the authorized user can operate on the data corresponding to the access role to ensure the security of the data. The use of encoding technology to construct the index structure can reduce the computing and storage overhead and improve the query efficiency. According to the query results, the user can choose a suitable law firm according to his actual situation, which can save time costs for the user and avoid other inconveniences and additional resource consumption caused by unfamiliar road conditions in an unfamiliar environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 This is the architecture diagram of the legal consultation intelligent query system of the present invention;

[0045] Figure 2 This is a first flow chart of the access control-based legal query method of the present invention;

[0046] Figure 3 This is a second flow chart of the access control-based legal query method of the present invention. DETAILED DESCRIPTION

[0047] The present invention will be further described in detail below in conjunction with the accompanying drawings, which are intended to explain the present invention rather than to limit it.

[0048] The access control-based legal query method of the present application is applied in a legal consultation intelligent query system. The legal consultation intelligent query system mainly consists of three entities, namely, a cloud server, a law firm and a user (a party), and of course, may also include a back-end. The legal consultation intelligent query system can be run on terminal devices such as computers, mobile phones, and tablet computers. After the user and the law firm register, a corresponding account is generated, and the user logs in to the legal consultation intelligent query system through the account.

[0049] The cloud server has unlimited storage space and computing power, stores the law firm's ciphertext data and encrypted index structure, and provides query services to users and returns query results.

[0050] The law firm builds an encrypted index structure based on the geographic location and keyword group of the law firm, encrypts the law firm's data to form ciphertext data, sends the encrypted index structure and ciphertext data to the cloud server, and assigns access roles to users.

[0051] It should be noted that the geographic location is the latitude and longitude coordinates of the law firm, the keyword group is the core business of the law firm, that is, the industry that the law firm is good at, and the access role is the user's access right in the legal consultation intelligent query system. The access right can be one or more access rights, and the access right refers to the ability to access and control specific information or resources. In the operation of a law firm, since a large amount of sensitive information and confidential data is involved, reasonable access right settings can ensure that this information is only accessed by authorized users, thereby effectively preventing information leakage and improper use.

[0052] User, the user sends a query request to the cloud server, the law firm sends the key and access role to the authorized user through a secure channel, and then the user generates a query threshold through the secret key and sends it to the cloud server. The authorized user receives the query result of the cloud server, which includes the geographic location and / or keywords of the law firm.

[0053] See also Figure 1 , the query method of the legal consultation intelligent query system is as follows:

[0054] 1. Each law firm encrypts its data and sends the ciphertext data to the cloud server;

[0055] 2. The law firm encrypts the index structure to form an encrypted index structure and sends it to the cloud server;

[0056] 3. The law firm sends the key and access role set to the client through a secure channel;

[0057] 4. The party converts the query request into a query threshold and sends it to the cloud server;

[0058] 5. The cloud server traverses the database according to the query threshold of the authorized party, obtains the query results and sends them to the authorized party.

[0059] See also Figure 2 Based on the query method of the above-mentioned legal consultation intelligent query system, this application proposes a legal query method based on access control, which is applied to the query end of the legal consultation intelligent query system, including the following steps:

[0060] S1. Constructing a query index structure according to a user's query request and in combination with encoding technology, wherein the query request includes a query geographic scope and a query keyword group; introducing the user's access role set into the query index structure, and using the improved ASPE technology to encrypt the query index structure to obtain a query threshold, and sending the query threshold to the cloud server;

[0061] It should be noted that the information that the user needs to input during the query process includes location information and keywords related to his or her demands. The location information and keywords output by the user are used as the query geographic scope and query keyword group to build a query index structure. The query index structure is encrypted to form a query threshold, and the query threshold is sent to the cloud server. The cloud server returns the query result corresponding to the query threshold.

[0062] S2. Receive the query result of the cloud server on the authorized user, where the query result of the cloud server on the authorized user is obtained by the following method:

[0063] The cloud server uses a polynomial access control strategy to verify the user's access role, confirm that the user is an authorized user, traverse the encrypted index structure according to the query threshold of the authorized user, use the inner product of the encrypted index structure and the query threshold to verify the query result, and send the verified query result to the authorized user;

[0064] The encrypted index structure is an index structure constructed by the geographical location and keyword group of the law firm, and the index structure is encrypted using the improved ASPE technology to obtain the encrypted index structure;

[0065] The improved ASPE technology introduces random numbers and random permutations into the ASPE technology to improve the ASPE technology.

[0066] It should be noted that the law firm's encrypted index combination and corresponding ciphertext data are stored in the cloud server. The query result is the ciphertext data corresponding to the traversed index structure. The query result can be the geographical location or keyword group of multiple law firms, or the location information and keywords of the law firm. Users can choose the appropriate law firm according to their actual situation.

[0067] See also Figure 3 , which is a second flow chart of the access control-based legal query method of this application, including the following steps:

[0068] Step 1: construct an index structure based on the geographic location and keyword group of the law firm, and use the improved ASPE technology to encrypt the index structure to obtain an encrypted index structure, and send the encrypted index structure and the ciphertext data of the law firm to the cloud server;

[0069] The index structure is constructed as follows:

[0070] S1.1. For each law firm Generate the corresponding identifier , Geographical location and keyword groups .

[0071] in, Indicates i The law firm identifier, Indicates i Law firms, Indicates i The geographical location of each law firm, is the longitude coordinate of the geographic location, is the latitude coordinate of the geographic location, Indicates i Keyword groups corresponding to law firms, For keywords, W is the keyword set of the legal consultation intelligent query system, b represents the i The number of keyword groups corresponding to each law firm.

[0072] S1.2. Geographic location of the law firm and keyword groups Convert into the first index vector and the second index vector respectively;

[0073] First, the geographical location The Geohash (latitude and longitude hashing) algorithm is used to encode it into an 8-character Geohash code, which is then converted into an 8-dimensional vector using the Base32 (binary 32) algorithm. , and then the 8-dimensional vector Each dimension is transformed into a 32-dimensional vector , j represents the jth dimension, and the first index vector is obtained , the dimension of the first index vector is 32×8, the first index vector The expression is as follows:

[0074]

[0075] Then, the keyword group Convert to Dimensional vector , and as the second index vector, it is expressed as follows:

[0076]

[0077] in, Indicates the value of the keyword. The value of the keyword is 0 or 1. The keywords in the legal consultation intelligent query system belong to the keyword set W , the keyword takes the value 1, otherwise it takes the value 0. m Keyword collection W The number of keywords in the .

[0078] Secondly, random numbers and random permutations are introduced into the ASPE technology to improve the ASPE technology. The improved ASPE technology is used to and the second index vector Encryption is performed to obtain an encrypted index structure. The encryption method is as follows:

[0079] The first index vector and the second index vector After merging, it is represented as an index structure , using random number pair index structure Expand and obtain the expanded index structure , are random numbers, Polynomial The coefficient of T is a variable; random permutation will expand the index structure Replace with , For random permutation, the extended index structure after permutation Using secret key Encrypt and get the encrypted index structure , that is, i An encrypted index structure of law firms.

[0080] Finally, the AES (Advanced Encryption Standard) algorithm is used to encrypt the law firm’s data to obtain ciphertext data.

[0081] S1.3. Upload the encrypted index structure and ciphertext data to the cloud server.

[0082] Step 2: The law firm sends the secret key to the authorized party through a secure channel and access role sets , and based on the access role set Constructing polynomials ;

[0083] S2.1. Access role set Indicates the authority of the party concerned, , n To access the role, No. access roles.

[0084] For each party according to its access role set corresponding data, a corresponding polynomial can be constructed , the access rights of the parties are verified through polynomials, and the expression of the polynomials is as follows:

[0085]

[0086] when hour, For the i Polynomial The highest order term.

[0087] in, For the j access roles, For polynomial No. j + 1 coefficients, T is a variable.

[0088] It should be noted that the following polynomial-based access control strategy is used to control the rights of the parties. The rights of the parties in the legal consultation intelligent query system can be understood as verifying whether the access role corresponding to the party is the root of the polynomial. When the access role is not the root of the polynomial, the party is an illegal party. When the access role is the root of the polynomial, the party corresponding to the access role is an authorized party.

[0089] S2.2. The key generation method includes: , Legal Consulting Intelligent Query System Production Key , which is expressed as follows:

[0090]

[0091] in, s is a bit vector of random dimension, and are two random reversible matrices, are all random numbers and satisfy , For random replacement.

[0092] Step 3: construct a query index structure according to the query request of the parties, the query request includes the query geographic scope and the query keyword group, introduce the access role set into the query index structure and use the improved ASPE technology to encrypt the query index structure to obtain the query threshold, as follows:

[0093] S3.1. Parties Generate Query Requests ;

[0094] in, Represents a random number generated by the party within the query geographic range. To query the geographic scope, q is a random number, Indicates the query keyword phrase generated by the party. To search for keywords, For the Search keywords.

[0095] S3.2. Query geographic scope The Geohash algorithm is used to encode it into an 8-character Geohash code, which is then converted into an 8-dimensional vector using the Base32 algorithm. , the 8-dimensional vector Each dimension of is converted into a 32-dimensional vector , get the multidimensional query vector, and convert the multidimensional query vector into the first query index vector , which is expressed as follows:

[0096]

[0097] S3.3. Query keyword group Convert to Dimensional vector , and as the second query index vector, expressed as follows:

[0098]

[0099] in, m Keyword collection W The number of keywords in The value of the query keyword is 0 or 1. Each query keyword in belongs to the keyword set of the legal consultation intelligent query system W , the query keyword takes the value 1, otherwise it takes the value 0.

[0100] S3.4. Based on the first query index vector and the second query index vector Construct a query index structure, use the access role set to expand the query index structure, and then use the improved ASPE technology to encrypt the expanded query index structure to obtain the query threshold, as follows:

[0101] The first query index vector and the second query index vector Merge to get the query index structure, , t Indicates the query geographic range code bit value, k The number of search keywords.

[0102] The query index structure is expanded using random numbers and access role sets to obtain an expanded index structure. , random permutation will be used to expand the index structure Replace with , the key is used for the extended index structure after replacement Encrypt and get the query threshold .

[0103] In bit vector s The extended index structure after replacement under the action of Split into two random vectors , the splitting method is as follows:

[0104]

[0105] S3.5. Send the query threshold to the cloud server.

[0106] Step 4: Use a polynomial access control strategy to verify the access role of the party, determine that the party is the authorized party, and traverse the encrypted index structure according to the query threshold of the authorized party. , using encrypted index structure and query threshold The inner product of the query result is verified and the verified query result is sent to the authorized party.

[0107] The multinomial access control strategy is used to verify the authority of the parties, so that only the authorized parties who have passed the authority verification can perform legal consultation operations with corresponding authority on the legal consultation intelligent query system, thereby effectively protecting the security of the legal consultation intelligent query system, as follows:

[0108] S4.1. Substitute the access role into the polynomial and determine whether the access role is a root of the polynomial. If the access role is not a root of the polynomial, The root of indicates that the party is an illegal party, and the query stops; when the access role is the root of the polynomial, then , indicating that the authorization is for the authorized party, and the verification method is as follows:

[0109]

[0110] When the access role is not polynomial The root of and , , indicating that the party is an illegal party, the verification result is discarded and the query is stopped. When the access role is the root of the polynomial, then , indicating that the authorization is for the authorized party.

[0111] S4.2. Traverse the encrypted index structure according to the query threshold of the authorized party, and and query threshold The inner product of the query result is verified and the verified query result is sent to the authorized party.

[0112] There are three types of query results after verification, as follows:

[0113] 1. If , indicating the geographical location of the law firm and query geographic scope have The same bit value, which is the geographic location of the law firm Included in query geographic scope The geographical location of the law firm is compared with the geographical scope of the query. have All law firms with the same bit value are sent as query results to the authorized party.

[0114] 2. If , indicating the keyword group corresponding to the law firm Satisfy the query keyword group , which is the keyword group of the law firm and query keyword phrases have The same keywords will be combined with the query keyword group have All law firms with the same keyword are sent as query results to the authorized party.

[0115] 3. If , indicating the geographical location of the law firm and query geographic scope Coordinates The same bit value, and the corresponding keyword group of the law firm and query keyword phrases have The same keyword, namely the location of the law firm Included in the query The keyword group corresponding to the law firm within the coordinates Satisfy the query keyword group , the geographic location of the law firm Included in query geographic scope The keyword group corresponding to the law firm Satisfy the query keyword group All law firms in the database are sent to authorized parties as query results.

[0116] Use polynomial control strategy to verify the access role. is the root of the polynomial, the access role The corresponding party is the authorized party, otherwise it is an illegal user. The authorized party uses the operation authority of the legal consultation intelligent query system to access the resources of the legal consultation intelligent query system.

[0117] The access control-based legal query method of the present application, firstly, uses Geohash algorithm encoding and Base32 algorithm to convert index data into vectors, thereby forming a new index structure construction method. The index structure constructed by this method can greatly reduce the computation and storage overhead, and uses Geohash encoding to achieve efficient range query. The length of Geohash code becomes shorter as the range increases, which speeds up the range query efficiency, and then can quickly and accurately match the law firm corresponding to the client's claim for the query request initiated by the client; secondly, random numbers and random permutations are added to the existing ASPE technology to improve the ASPE technology, random numbers are used to expand the index structure, random permutations are used to permutate the expanded index structure, and the encryption of the index structure is completed, which can achieve indistinguishability under chosen plaintext attacks, and ensure that the accuracy of the query results is not affected, thereby improving the security of the legal intelligent range query system; in addition, in the operation process of the law firm, since a large amount of sensitive information and confidential data are involved, it is very important to ensure the security of the data. The method of the present application reasonably sets the access rights of the client, and verifies the rights of the client based on the polynomial access control strategy, so that only the authorized client can access, thereby effectively preventing information leakage and improper use.

[0118] Based on the above-mentioned legal query method based on access control, the present application also proposes a legal query system based on access control, which is applied to the query end of the above-mentioned legal consultation intelligent query system and may include:

[0119] The query threshold module is used to construct a query index structure according to the user's query request and in combination with the encoding technology, wherein the query request includes the query geographic scope and the query keyword group; introduce the user's access role set into the query index structure, and use the improved ASPE technology to encrypt the query index structure to obtain the query threshold, and send the query threshold to the cloud server;

[0120] The query result module is used to receive the query result of the cloud server on the authorized user. The query result of the cloud server on the authorized user is obtained by the following method:

[0121] The cloud server uses a polynomial access control strategy to verify the user's access role, confirm that the user is an authorized user, traverse the encrypted index structure according to the query threshold of the authorized user, use the inner product of the encrypted index structure and the query threshold to verify the query result, and send the verified query result to the authorized user;

[0122] The encrypted index structure is an index structure constructed by the geographical location and keyword group of the law firm, and the index structure is encrypted using the improved ASPE technology to obtain the encrypted index structure;

[0123] The improved ASPE technology introduces random numbers and random permutations into the ASPE technology to improve the ASPE technology.

[0124] It should be noted that in the embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely schematic. For example, the division of each module is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. The modules described as separate components may or may not be physically separated. The components displayed as modules may be one physical unit or multiple physical units, that is, they may be located in one place, or they may be distributed in multiple different places. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.

[0125] In addition, each module in each embodiment of the present invention may be integrated into a processing unit, each module may exist physically separately, or two or more modules may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit.

[0126] An electronic device provided in an embodiment of the present application includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the steps of the access control-based legal query method described in any of the above embodiments are implemented.

[0127] Another electronic device provided in the embodiment of the present application may also include: an input port connected to the processor, used to transmit multimodal data collected by an external acquisition device to the processor; and a display unit connected to the processor, used to display the processing results of the processor to the outside world; a communication module connected to the processor, used to realize communication between the electronic device and the outside world. The display unit can be a display panel, a laser scanning display, etc.; the communication mode adopted by the communication module includes but is not limited to mobile high-definition link technology, universal serial bus, high-definition multimedia interface, wireless connection (including wireless fidelity technology, Bluetooth communication technology, low-power Bluetooth communication technology).

[0128] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the access control-based legal query method described in any of the above embodiments are implemented.

[0129] The computer-readable storage medium involved in this application includes random access memory, memory, read-only memory, electrically programmable, electrically erasable programmable, register, hard disk, removable disk, or any other form of storage medium known in the technical field.

[0130] For the description of the relevant parts of the access-controlled legal inquiry system, electronic device, and computer-readable storage medium provided in the embodiments of the present application, please refer to the detailed description of the corresponding parts of the access-controlled legal inquiry method provided in the embodiments of the present application, which will not be repeated here. In addition, the parts of the above-mentioned technical solutions provided in the embodiments of the present application that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail to avoid excessive elaboration.

[0131] The above contents are only for explaining the technical idea of ​​the present invention and cannot be used to limit the protection scope of the present invention. Any changes made on the basis of the technical solution in accordance with the technical idea proposed by the present invention shall fall within the protection scope of the claims of the present invention.

Claims

1. A legal query method based on access control, applied to the query end, characterized in that: include: An index structure is constructed according to the geographic location and keyword group of the law firm, and the index structure is encrypted using the improved ASPE technology to obtain an encrypted index structure, and the encrypted index structure and the ciphertext data of the law firm are sent to the cloud server; The law firm sends the key to the authorized party through a secure channel and access role sets, and construct polynomials based on the access role sets; Constructing a query index structure based on a user's query request and in combination with a coding technique, wherein the query request includes a query geographic scope and a query keyword group; The user's access role set is introduced into the query index structure, and the query index structure is encrypted using the improved ASPE technology to obtain the query threshold, which is then sent to the cloud server. The constructing of the query index structure comprises: The query geographic range is hash-encoded using a geographic location coding method to obtain a code string, and the code string is converted into a multidimensional vector to obtain a first query index vector; the query keyword group is converted into a multidimensional vector to obtain a second query index vector; Merging the first query index vector and the second query index vector to obtain a query index structure; The query index structure is expanded using random numbers and access role sets to obtain an expanded index structure. , random permutation will be used to expand the index structure Replace with , the key is used for the extended index structure after replacement Encrypt and get the query threshold ; Receive the query result of the cloud server on the authorized user, the query result of the cloud server on the authorized user is obtained by the following method: The cloud server uses a polynomial access control strategy to verify the user's access role, confirm that the user is an authorized user, traverse the encrypted index structure according to the query threshold of the authorized user, use the inner product of the encrypted index structure and the query threshold to verify the query result, and send the verified query result to the authorized user; The encrypted index structure is an index structure constructed by the geographical location and keyword group of the law firm, and the index structure is encrypted using the improved ASPE technology to obtain the encrypted index structure; The improved ASPE technology introduces random numbers and random permutations into the ASPE technology to improve the ASPE technology.

2. A legal query method based on access control according to claim 1, characterized in that: The geographic location encoding method is the Geohash algorithm.

3. A legal query method based on access control according to claim 1, characterized in that: The cloud server uses a polynomial access control strategy to verify the user's access role and determine that the user is an authorized user, including: Substitute the user's access role set into the polynomial. When the access role in the access role set is the root of the polynomial, the user is an authorized user. When the access role is not the root of the polynomial, the user is an illegal user.

4. A legal query method based on access control according to claim 3, characterized in that: The expression of the polynomial is as follows: when hour, For the i Polynomial The highest order term of To access the role set, For the j access roles, For polynomial No. j +1 coefficient, T is a variable, For the Access roles; When the access role is not polynomial The root of ; When the access role is a root of a polynomial, then .

5. The access control-based legal query method according to claim 1 is characterized in that: The step of traversing the encrypted index structure according to the query threshold of the authorized user and verifying the query result by using the inner product of the encrypted index structure and the query threshold includes: The encrypted index structure and the query threshold are inner-producted, and the query result is verified based on the inner-product result. The query result includes law firms whose geographical locations meet the query request, law firms whose keyword groups meet the query request, and law firms whose geographical locations and keyword groups meet the query request.

6. A legal query method based on access control according to claim 5, characterized in that: The verification method of the query result is as follows: in, For the i The encrypted index structure of law firms, Query threshold, For the i polynomials, T is a variable, t Indicates the query geographic range code bit value, k is the number of query keywords, According to i The location of the law firm The first index vector created, According to i Keyword Groups for Law Firms The second index vector created, is the first query index vector established according to the query geographic scope, A second query index vector established according to the query keyword group; like , the geographical location of the law firm is related to the query geographical scope All law firms with the same bit value are sent as query results to the authorized user; like , will be related to the query keyword group All law firms with the same keyword are sent as query results to the authorized user; like , the geographical location of the law firm is included in the query geographical scope, and all law firms whose corresponding keyword groups satisfy the query keyword groups are sent as query results to the authorized user.

7. A system for executing the access control-based legal query method according to any one of claims 1 to 6, applied to a query end, characterized in that: include: A query threshold module, used to construct a query index structure according to a user's query request and in combination with a coding technique, wherein the query request includes a query geographic scope and a query keyword group; The user's access role set is introduced into the query index structure, and the query index structure is encrypted using the improved ASPE technology to obtain the query threshold, which is then sent to the cloud server. The query result module is used to receive the query result of the cloud server on the authorized user. The query result of the cloud server on the authorized user is obtained by the following method: The cloud server uses a polynomial access control strategy to verify the user's access role, confirm that the user is an authorized user, traverse the encrypted index structure according to the query threshold of the authorized user, use the inner product of the encrypted index structure and the query threshold to verify the query result, and send the verified query result to the authorized user; The encrypted index structure is an index structure constructed by the geographical location and keyword group of the law firm, and the index structure is encrypted using the improved ASPE technology to obtain the encrypted index structure; The improved ASPE technology introduces random numbers and random permutations into the ASPE technology to improve the ASPE technology.

8. An electronic device, characterized in that: include: Memory for storing computer programs; A processor is used to implement the steps of the access control-based legal query method according to any one of claims 1 to 6 when executing the computer program.