Data matching method, public key and ciphertext generation method, device, equipment and medium

By using matching trapdoors and feature keyword ciphertext for data matching during the data matching process, the problem of information leakage required by the data demander in the existing technology is solved, and information confidentiality and matching between the data supplier and the demander are achieved. accuracy of results.

CN118784235APending Publication Date: 2024-10-15CHONGQING CHANGAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410858840.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

The existing technology can easily lead to the leakage of demand information of data demanders, and fails to effectively protect the privacy of data suppliers and demanders.

Method used

Data matching is performed by using matching trapdoors and feature keyword ciphertext in the data matching process. The matching trapdoor represents the data characteristics of the data demand terminal, and the feature keyword ciphertext represents the data characteristics of the data supply terminal. Bilinear mapping and Ciphertext expressions calculate matching results to ensure data confidentiality.

Benefits of technology

It achieves the confidentiality of data information from both the data supply side and the demand side, improves the accuracy and encryption level of matching results, and ensures that data is not leaked.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118784235A_ABST
    Figure CN118784235A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data transaction, in particular to a data matching method, a public key and ciphertext generation method and device, equipment and a medium. According to the application, the matching trap door is used for representing the data features required by the data demand terminal, the feature keyword ciphertext is used for representing the features of the data which can be provided by the data supply terminal, and whether the data which can be provided by the data supply terminal is matched with the data required by the data demand terminal is judged through the matching trap door and the feature keyword ciphertext; because the feature keyword ciphertext is a ciphertext mode and the matching trap door is also a ciphertext mode, data matching is carried out through the matching trap door and the feature keyword ciphertext, data of a data supply terminal can be protected from being leaked, and data information required by a data demand terminal can be ensured from being leaked. Therefore, the confidentiality of the data information is realized from the two aspects of the supplier and the demander.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data transaction technology, and specifically to a data matching method, a public key and ciphertext generation method, apparatus, equipment, and medium. Background Art

[0002] The data provider (that is, the data supplier) publishes its data on the Internet platform, and the data consumer (that is, the data demander) also publishes its data demand information on the Internet platform, and the data required by the data demander is matched on the Internet platform. In order to ensure the security of data, current technology only encrypts the data provided by the data provider, but does not encrypt the demand information of the data demander, which can easily lead to the leakage of the demand information of the data demander.

[0003] In summary, existing technologies can easily lead to leakage of demand information of data demanders.

[0004] Therefore, the prior art still needs to be improved and enhanced. Summary of the invention

[0005] The present application provides a data matching method, a public key and ciphertext generation method, apparatus, device, and medium to solve the technical problems in related technologies that easily lead to the leakage of demand information of data demanders.

[0006] To achieve the above objectives, this application adopts the following technical solutions:

[0007] The first aspect of the present application provides a data matching method, comprising the following steps:

[0008] Obtaining a matching trapdoor sent by a data demand terminal, and screening out a target keyword set matching the matching trapdoor from a characteristic keyword ciphertext, wherein the matching trapdoor is used to characterize the characteristic of the demand data required by the data demand terminal, and the characteristic keyword ciphertext corresponds to the characteristic of the supply data provided by the data supply terminal;

[0009] According to the target keyword set and the matching trapdoor, a matching result of the demand data feature and the supply data feature is obtained, and the matching result is used to control whether the data supply terminal releases data to the data demand terminal.

[0010] According to the above-mentioned technical means, the embodiment of the present application uses a matching trapdoor to represent the data features required by the data demand terminal, and uses a feature keyword ciphertext to represent the features of the data that the data supply terminal can provide. By matching the trapdoor and the feature keyword ciphertext, it is determined whether the data that the data supply terminal can provide matches the data required by the data demand terminal. Since the feature keyword ciphertext is a ciphertext method and the matching trapdoor is also a ciphertext method, data matching is performed by matching the trapdoor and the feature keyword ciphertext, which can not only protect the data of the data supply terminal from being leaked, but also ensure that the data information required by the data demand terminal is not leaked, thereby achieving the confidentiality of data information from the perspectives of both the supplier and the demander.

[0011] Optionally, in one embodiment of the present application, the matching trapdoor includes a matching strategy, the matching strategy is used to characterize the demand keyword name in the demand data feature, the feature keyword ciphertext includes a supply keyword name, and the step of screening out a target keyword set matching the matching trapdoor from the feature keyword ciphertext includes:

[0012] Filtering out pre-selected keyword names matching the matching strategy from the supplied keyword names;

[0013] According to the number of keywords corresponding to the pre-selected keyword names, target keyword names are screened out from the pre-selected keyword names, and the target keyword names are combined into the target keyword set.

[0014] According to the above-mentioned technical means, the embodiment of the present application first selects each pre-selected keyword name from the supplied keyword names according to the demand keyword name, and then selects the target keyword name from the pre-selected keyword names according to the number of keywords corresponding to each pre-selected keyword name, thereby improving the accuracy of the selected target keyword name.

[0015] Optionally, in an embodiment of the present application, the feature keyword ciphertext further includes a preset first ciphertext value, a preset second ciphertext value, and a preset ciphertext expression, the matching trapdoor further includes a preset matching expression, and the matching result of the demand data feature and the supply data feature is obtained based on the target keyword set and the matching trapdoor, including:

[0016] Determining a target keyword value corresponding to the target keyword name in the target keyword set;

[0017] Applying the ciphertext expression to the target keyword value to obtain a target value;

[0018] Applying the matching expression to the target keyword value to obtain a target matching value;

[0019] Calculate a bilinear mapping value of the target value and the target matching value;

[0020] A matching result of the demand data feature and the supply data feature is obtained according to the bilinear mapping value, the first ciphertext value and the second ciphertext value.

[0021] According to the above technical means, the embodiment of the present application realizes the matching of data features through keyword values, target values, target matching values ​​and two ciphertext values. Since the present application uses the above multiple values ​​for matching data features, the accuracy of the matching results is improved.

[0022] Optionally, in an embodiment of the present application, obtaining a matching result between the demand data feature and the supply data feature according to the bilinear mapping value, the first ciphertext value, and the second ciphertext value includes:

[0023] Generate a private key value corresponding to the matching expression;

[0024] A matching result of the demand data feature and the supply data feature is obtained according to the private key value, the bilinear mapping value, the first ciphertext value, and the second ciphertext value.

[0025] According to the above technical means, the embodiment of the present application further considers the private key value, that is, the value that is not disclosed to the outside world, so that the obtained matching result is not affected by external factors, thereby further improving the accuracy of the obtained matching result.

[0026] The second aspect of the present application provides a method for generating a public key, comprising the following steps:

[0027] Generate a first generator and a second generator, and generate a first random number;

[0028] Applying a bilinear mapping to the first generator, the second generator, and the first random number to obtain a first sub-public key;

[0029] Generate a second random number, and calculate the power of the first generator based on the second random number to obtain a second sub-public key;

[0030] Generate a hash function;

[0031] A system public key is generated based on the first sub-public key, the second sub-public key, the first generator, the second generator and the hash function. The system public key is used to generate the feature keyword ciphertext required by the data supply terminal. The feature keyword ciphertext is used in the data matching method described above.

[0032] According to the above technical means, the embodiment of the present application applies bilinear mapping to generate feature keyword ciphertext, thereby improving the encryption level of the feature keyword ciphertext and further preventing data leakage.

[0033] The third aspect of the present application provides a method for generating ciphertext, comprising the following steps:

[0034] Obtaining a system public key sent by an authority center terminal, wherein the system public key is generated by the authority center terminal based on the public key generation method according to claim 5;

[0035] generating a third random number;

[0036] Parsing the system public key to obtain a first generator, and applying a bilinear mapping to the first generator and the third random number to obtain a first ciphertext value;

[0037] Parsing the system public key to obtain a first sub-public key, and obtaining a second ciphertext value according to the first sub-public key and the third random number;

[0038] The keyword features of the supply database are extracted, and based on the keyword features, the first ciphertext value, and the second ciphertext value, a characteristic keyword ciphertext of the keyword features is obtained, and the characteristic keyword ciphertext is used to implement the above-mentioned data matching method.

[0039] According to the above technical means, the characteristic keyword ciphertext of the embodiment of the present application includes keyword characteristics and two ciphertext values, thereby improving the encryption level of the characteristic keyword ciphertext of the present application.

[0040] Optionally, in an embodiment of the present application, obtaining the characteristic keyword ciphertext of the keyword feature according to the keyword feature, the first ciphertext value, and the second ciphertext value includes:

[0041] Determine a supply keyword name and a supply keyword value in the keyword feature;

[0042] Generate a ciphertext expression according to the supplied keyword value, the first generator and the third random number;

[0043] The feature keyword ciphertext of the keyword feature is obtained according to the generated ciphertext expression, the first ciphertext value, the second ciphertext value and the supplied keyword name.

[0044] According to the above technical means, the embodiment of the present application adds a third random number to the characteristic keyword ciphertext, further improving the encryption level of the characteristic keyword ciphertext.

[0045] A fourth aspect of the present application provides a data matching device, including:

[0046] A screening module, used to obtain a matching trapdoor sent by a data demand terminal, and screen out a target keyword set matching the matching trapdoor from a characteristic keyword ciphertext, wherein the matching trapdoor corresponds to the characteristic of the demand data required by the data demand terminal, and the characteristic keyword ciphertext corresponds to the characteristic of the supply data provided by the data supply terminal;

[0047] A matching module is used to obtain a matching result of the demand data feature and the supply data feature based on the target keyword set, the matching trapdoor and the feature keyword, and the matching result is used to control whether the data supply terminal releases data to the data demand terminal.

[0048] A fifth aspect of the present application provides a terminal device, the terminal device comprising a memory, a processor, and a data matching program stored in the memory and executable on the processor, wherein when the processor executes the data matching program, the steps of the above-mentioned data matching method are implemented;

[0049] Alternatively, the terminal device includes a memory, a processor, and a public key generation program stored in the memory and executable on the processor, and when the processor executes the public key generation program, the steps of the public key generation method described above are implemented;

[0050] Alternatively, the terminal device includes a memory, a processor, and a ciphertext generation program stored in the memory and executable on the processor, and when the processor executes the ciphertext generation program, the steps of the ciphertext generation method described above are implemented.

[0051] A sixth aspect of the present application provides a computer-readable storage medium, on which a data matching program is stored. When the data matching program is executed by a processor, the steps of the above-mentioned data matching method are implemented;

[0052] Alternatively, the computer-readable storage medium stores a public key generation program, and when the public key generation program is executed by the processor, the steps of the public key generation method described above are implemented;

[0053] Alternatively, a ciphertext generation program is stored on the computer-readable storage medium, and when the ciphertext generation program is executed by the processor, the steps of the ciphertext generation method described above are implemented.

[0054] Beneficial effects of this application:

[0055] (1) In the embodiment of the present application, a matching trapdoor is used to represent the data features required by the data demand terminal, and a feature keyword ciphertext is used to represent the features of the data that can be provided by the data supply terminal. The matching trapdoor and the feature keyword ciphertext are used to determine whether the data that can be provided by the data supply terminal matches the data required by the data demand terminal. Since the feature keyword ciphertext is a ciphertext method and the matching trapdoor is also a ciphertext method, data matching is performed by matching trapdoors and feature keyword ciphertexts, which can not only protect the data of the data supply terminal from being leaked, but also ensure that the data information required by the data demand terminal is not leaked, thereby achieving the confidentiality of data information from the perspectives of both the supplier and the demander.

[0056] (2) The embodiment of the present application realizes the matching of data features through keyword values, target values, target matching values ​​and two ciphertext values. Since the present application uses the above-mentioned multiple values ​​for matching data features, the accuracy of the matching results is improved.

[0057] (3) The characteristic keyword ciphertext of the embodiment of the present application includes keyword characteristics and two ciphertext values, thereby improving the encryption level of the characteristic keyword ciphertext of the present application.

[0058] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0060] Figure 1 This is the overall flow chart of this application;

[0061] Figure 2 A schematic diagram of the interaction between the server, data consumer, data provider, and authority center in an embodiment of the present application;

[0062] Figure 3 This is a flowchart of generating ciphertext of characteristic keywords in the embodiment of the present application;

[0063] Figure 4 A flow chart for generating a matching trapdoor in an embodiment of the present application;

[0064] Figure 5 This is a data matching flow chart in an embodiment of the present application;

[0065] Figure 6 A schematic diagram of the structure of a data matching device according to an embodiment of the present application;

[0066] Figure 7This is a block diagram of the internal structure of the terminal device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0067] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0068] The data matching method, public key and ciphertext generation method, device, equipment, and medium of the embodiment of the present application are described below with reference to the accompanying drawings. In view of the fact that the prior art mentioned in the above background technology is prone to leakage of demand information of the data demander, the present application provides a data matching method, in which a matching trapdoor sent by the data demand terminal is first obtained, and a target keyword set matching the matching trapdoor is screened out from the feature keyword ciphertext, and finally, based on the target keyword set and the matching trapdoor, a matching result of the demand data feature and the supply data feature is obtained.

[0069] For example, the data demand terminal represents the electricity user, and the data supply terminal represents the power plant. The power plant and the electricity user exchange power data on the Internet platform, that is, the electricity user purchases the power plant's electric energy on the Internet platform, and the power plant sells the electric energy to the electricity user on the Internet platform. The two parties exchange data on the Internet platform, but when the two parties exchange data on the Internet platform, they do not want their respective data to be leaked, so they need to encrypt their respective data. The specific encryption process is as follows:

[0070] The power plant (that is, the data supply terminal) first encrypts the characteristics of its power data into a characteristic keyword ciphertext, and then sends it to the server, that is, the server stores the characteristic keyword ciphertext in advance. When the power user (that is, the data demand end) needs power data, the power user encrypts its demand information into a matching trap, and then the power user sends the matching trap to the server. The server selects the target keyword set that matches the matching trap from the characteristic keyword ciphertext, and finally judges whether the power data characteristics that the power plant can provide match the power data required by the power user based on the target keyword set and the matching trap, that is, whether the power data of the power plant can meet the user's power demand. If it does, the power plant will be informed to supply electricity to the user. If it does not meet the requirements, it will not supply electricity to the user.

[0071] Specifically, Figure 1 A flowchart of a data matching method provided in an embodiment of the present application.

[0072] like Figure 1As shown, the data matching method includes the following steps:

[0073] S100, obtaining a matching trapdoor sent by a data demand terminal, and screening out a target keyword set matching the matching trapdoor from a characteristic keyword ciphertext.

[0074] The matching trapdoor corresponds to the demand data feature required by the data demand terminal, and the feature keyword ciphertext corresponds to the supply data feature provided by the data supply terminal;

[0075] S200, obtaining a matching result of the demand data feature and the supply data feature according to the target keyword set and the matching trapdoor.

[0076] The matching result is used to control whether the data supply terminal releases data to the data demand terminal.

[0077] The data demand terminal of this application is Figure 2 The data consumer in the data supply terminal is Figure 2 The data provider in the data provider generates a feature keyword ciphertext C, and then sends the feature keyword ciphertext C to the server, which saves it. When the data consumer sends the demand information to the server in the form of a matching trapdoor T, the server determines whether the data provided by the data provider can meet the data required by the data consumer based on the feature keyword ciphertext C and the matching trapdoor T, that is, whether the provided data matches the required data. The feature keyword ciphertext C is generated by the data provider based on the system public key PK generated by the authoritative center.

[0078] Embodiment 1: In this embodiment, the authority center generates a system public key PK, including the following specific steps S011, S012, S013, S014, and S015:

[0079] S011, generate a first generator g and a second generator h, and generate a first random number a.

[0080] To the authoritative central terminal (that is, Figure 2 The authoritative center in the security parameter λ is input, a prime number p is selected from the security parameter λ, and two multiplication cyclic groups of order p are generated. The generators of are g and h. Two multiplicative cyclic groups and the multiplicative cyclic group Satisfies the bilinear map e:

[0081] S012, applying a bilinear mapping to the first generator g, the second generator h, and the first random number a to obtain a first sub-public key e(g, h) a .

[0082] S013: Generate a second random number b, and calculate the power of the first generator g based on the second random number b to obtain a second sub-public key g b ;

[0083] S014, generate a hash function H 1 .

[0084] The hash function H 1 The input range is {0,1} * , that is, the input range is {0,1} * The hash function of

[0085] The first random number a and the second random number b are both in within the range of A first random number a and a second random number b are randomly generated within a range of

[0086] S015, according to the first sub-public key e(g, h) a , the second sub-public key g b , the first generator g, the second generator h and the hash function H 1 , generate the system public key PK:

[0087] PK={e(g,h) a ,g b ,g,h,H 1}

[0088] The system public key PK of this embodiment may also be as follows:

[0089] PK={e(g,h) a ,g b ,g,h,e,H 1}

[0090] In this embodiment, the authority center not only generates a system public key PK, but also generates a system master key MK, wherein the system public key PK is made public by the authority center. Publication means that the authority center sends the system public key PK to Figure 2 The data provider in the system generates the ciphertext of the characteristic keywords according to the system public key PK, which is the public authority center sending the system public key PK to Figure 2The data consumer in is used by the data consumer to generate a matching trapdoor T according to the system public key PK. Among them, the system master key MK is retained by the authority center, that is, the system master key MK is not disclosed to the outside world. Only the staff responsible for the authority center knows the system master key MK, so that the staff can start the authority center through the system master key MK. The system master key MK is defined as follows: MK = {a, b}.

[0091] Embodiment 2 is based on embodiment 1. In this embodiment, a data provider (that is, a data supply terminal) generates a characteristic keyword ciphertext, including the following specific steps S021, S022, S023, S024, S025, S026, and S027:

[0092] S021, obtaining the system public key PK sent by the authoritative center terminal.

[0093] System public key PK: PK = {e(g,h) a ,g b ,g,h,e,H 1}, the purpose of the authority center terminal sending the system public key PK to the data provider is to deliver the data required for encryption to the data provider, that is, e(g,h) in the system public key PK a , g, h and H 1 It can help data providers encrypt data.

[0094] S022, generate a third random number S 1 .

[0095] That is, A third random number S is randomly generated within the range 1 ,Right now

[0096] S023, parsing the system public key PK = {e(g,h) a ,g b ,g,h,e,H 1}, obtain the first generator g, and perform the operations on the first generator g and the third random number s 1 Apply bilinear mapping to get the first ciphertext value C′ 0 :

[0097]

[0098] For the first ciphertext value C′ 0 The expression is transformed to get:

[0099]

[0100] That is for and the bilinear map value of g.

[0101] S024, parsing the system public key PK = {e(g,h) a ,g b ,g,h,e,H 1}, get the first child public key e(g, h) a , and according to the first sub-public key e(g, h) a and the third random number s 1 , get the second ciphertext value C 0 :

[0102]

[0103] Indicates g a and The bilinear map value of .

[0104] S025, extracting keyword features from the supply database, and determining supply keyword names and supply keyword values ​​in the keyword features.

[0105] like Figure 3 As shown, the data provider selects several keyword features, and the several keyword features are combined into a feature keyword set kw.

[0106] S026, based on the supplied keyword value w i and the first generator g and the third random number s 1 , generate the ciphertext expression C i :

[0107]

[0108] In the formula, i∈[1,d], d is the size of the feature keyword set kw, that is, d is equal to the number of keyword features contained in the feature keyword set kw.

[0109] S027, generating a ciphertext expression C according to the i , the first ciphertext value C′ 0 , the second ciphertext value C 0 and the supplied keyword name i , and obtain the characteristic keyword ciphertext C of the keyword feature:

[0110] C={C 0 ,C′ 0 ,{name i ,C i} i∈[1,d]}

[0111] That is, the ciphertext expression C will be generatedi , the first ciphertext value C′ 0 、Second ciphertext value C 0 and supply keyword name mame i Combining them together to form a set gives us the characteristic keyword ciphertext C.

[0112] Embodiment 3, based on embodiment 1, in this embodiment, the data consumer and the authority center jointly generate a matching trapdoor, such as Figure 4 As shown, the following specific steps are included: S031, S032, S033, S034, S035:

[0113] S031, the data consumer uses a secure channel to match the demand matching keyword set mw with the matching strategy Sent to the authoritative center, where the demand matching keyword set also includes the common keyword name (recorded as the demand keyword name) and the keyword value (recorded as the demand keyword value).

[0114] Assume that the size of the keyword set mw is d′, N represents a d′×n′ matrix, π represents the mapping of each row of the matrix N to the common keyword name corresponding to the row in the matching strategy, and q π Indicates the keyword value corresponding to this row.

[0115] S032, the authoritative center inputs the system master key MK, the system public key PK, and the server public key CPK to the data consumer (the server public key CPK is input by the server to the authoritative center, and the authoritative center then inputs the server public key CPK to the data consumer).

[0116] Data consumers will match the demand with the keyword set mw and the matching strategy Input to the authority center, and the authority center selects a random number And set the vector

[0117] S033, the authority center for each row N of the matrix N i , where i∈[1,d′], calculate Evaluate the matching expression T i :

[0118]

[0119] S034, hide q π Get matching trapdoor

[0120] S035, sending the matching trapdoor T to the data consumer.

[0121] After receiving the matching trapdoor T, the data consumer saves the matching trapdoor T. When it needs to obtain the data from the data provider from the server, it sends the matching trapdoor T to the server. The server determines whether the data provided by the data provider matches the consumer's demand for data based on the matching trapdoor T.

[0122] Embodiment 4, based on Embodiment 1, Embodiment 2 and Embodiment 3, in this embodiment, the server executes steps S100 and S200, that is, the server completes the matching operation. In this embodiment, step S100 includes the following specific steps S101 and S102:

[0123] S101, such as Figure 5 As shown, pre-selected keyword names matching the matching strategy are screened out from the supplied keyword names.

[0124] The characteristic keyword ciphertext stored by the server includes several supply keyword names. The data consumer sends the keyword names of the data it needs to the server in the form of a matching strategy. The π of represents the mapping of each row of the matrix N to the common keyword name corresponding to that row in the matching strategy, so A keyword name that can represent the data required by the data consumer.

[0125] S102, according to the number of keywords corresponding to the pre-selected keyword names, select target keyword names from the pre-selected keyword names, and combine the target keyword names into the target keyword set I.

[0126] That is, whichever pre-selected keyword name contains the least number of keywords is the target keyword name.

[0127] The target keyword name contains the least number of keywords, so the target keyword set is also the minimum keyword set I.

[0128] For example, if the platform is a book trading platform, the data consumer needs leisure books (that is, matching strategy The server stores history books, cooking books, physics books, travel books, and entertainment books provided by the data provider (these five major types of books are the supply keyword names). Among these five major types of books, the matching strategy between cooking books, entertainment books, and travel books and data consumers is Therefore, cookbooks, entertainment books and travel books are pre-selected keyword names. The cookbook category includes Chinese food books and Western food books (that is, the cookbook pre-selected keyword name contains two keywords), the entertainment book category includes film and television entertainment books and music entertainment books (that is, the entertainment book pre-selected keyword name contains two keywords), and the travel book category includes Spring Festival travel recommended books, summer travel recommended books, autumn travel recommended books and winter travel recommended books (that is, the travel book pre-selected keyword name contains four keywords). Since the two pre-selected keyword names of cookbooks and entertainment books contain the least number of keywords, cookbooks and entertainment books are the target keyword names.

[0129] In this embodiment, the characteristic keyword ciphertext also includes a preset first ciphertext value C′ 0 and the preset second ciphertext value C 0 And the preset ciphertext expression C i The matching trapdoor also includes a preset matching expression T i , step S200 includes the following specific steps S201, S202, S203, S204, S205, S206:

[0130] S201, determining the target keyword value corresponding to the target keyword name in the target keyword set I.

[0131] Each target keyword name has a target keyword value w′ i , that is, use a numerical value to represent the target keyword name.

[0132] S202, applying the ciphertext expression C to the target keyword value i , and get the target value C′ i .

[0133]

[0134] In the above formula, w i Replace with w′ i The target value C′ is obtained i :

[0135] S203, applying the matching expression Ti to the target keyword value to obtain a target matching value T′ i .

[0136]

[0137] q π Indicates the keyword value, that is, q πReplace with target keyword value w′ i The target matching value T′ is obtained i :

[0138]

[0139] S204, calculating the bilinear mapping value e(C′) of the target value and the target matching value i ,T′ i ).

[0140] S205, generating a private key value CSK corresponding to the matching expression Ti.

[0141] The private key value CSK is the private key of the server, CSK = μ, μ is a random number, and satisfies the following conditions:

[0142] S206, based on the private key value, the bilinear mapping value and the first ciphertext value C′ 0 And the second ciphertext value C 0 , and obtain the matching result of the demand data characteristics and the supply data characteristics.

[0143] This embodiment is based on satisfying the following equation as the basis for determining whether the match is successful:

[0144]

[0145] Where η i is a constant, and η i ∈Z p The premise for establishing the above equation is that a minimum keyword set I exists.

[0146] In this embodiment, the following equation can also be used as a basis for determining whether the match is successful:

[0147]

[0148] use To determine whether the match is successful, it is based on the following principles:

[0149] From linear secret sharing LSSS, we can see that the following equation holds true:

[0150]

[0151] With the help of the equation of linear secret sharing LSSS and when the characteristic keyword of the data provider is equal to the matching keyword of the data consumer, the left side of the equation can be derived as follows:

[0152]

[0153] The right side of the equation is derived as follows:

[0154]

[0155] The left side of the equation is equal to the right side of the equation, which means that the data is matched successfully.

[0156] In summary, the present application firstly adopts the searchable encryption technology, that is, the data provider and the data consumer encrypt the data feature keywords and feature matching keywords respectively, and can match the keywords, that is, while protecting the privacy information of the data provider and the data consumer, the encrypted data can be matched. At the same time, compared with the previous single keyword matching scheme, the present invention supports multiple keywords and supports matching strategies based on linear secret sharing (LSSS), and can express the required matching keywords through AND or OR, thereby improving the scalability of the system. On top of this, the present invention adopts a semi-hidden form of strategy, dividing the keywords into general keyword names and keyword values. The general keyword names can be made public in plain text, and the keyword values ​​are hidden, which can improve the matching efficiency while protecting privacy information.

[0157] Next, the data matching device proposed according to the embodiment of the present application is described with reference to the accompanying drawings.

[0158] like Figure 6 As shown, the data matching device 10 includes: a screening module 100 and a matching module 200 .

[0159] Specifically, the screening module 100 is used to obtain the matching trapdoor sent by the data demand terminal, and screen out a target keyword set that matches the matching trapdoor from the feature keyword ciphertext, wherein the matching trapdoor is used to characterize the demand data characteristics required by the data demand terminal, and the feature keyword ciphertext corresponds to the supply data characteristics provided by the data supply terminal.

[0160] The matching module 200 is used to obtain the matching result of the demand data feature and the supply data feature according to the target keyword set and the matching trapdoor, and the matching result is used to control whether the data supply terminal releases data to the data demand terminal.

[0161] It should be noted that the above explanations of the data matching method embodiment are also applicable to the data matching device of this embodiment, and will not be repeated here.

[0162] Figure 7 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. The terminal device may include:

[0163] A memory 501 , a processor 502 , and a computer program stored in the memory 501 and executable on the processor 502 .

[0164] When the processor 502 executes the program, the data matching method provided in the above embodiment is implemented.

[0165] Furthermore, the terminal device also includes:

[0166] The communication interface 503 is used for communication between the memory 501 and the processor 502 .

[0167] The memory 501 is used to store computer programs that can be executed on the processor 502 .

[0168] The memory 501 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0169] If the memory 501, the processor 502 and the communication interface 503 are implemented independently, the communication interface 503, the memory 501 and the processor 502 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0170] Optionally, in a specific implementation, if the memory 501, the processor 502 and the communication interface 503 are integrated on a chip, the memory 501, the processor 502 and the communication interface 503 can communicate with each other through an internal interface.

[0171] The processor 502 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0172] This embodiment also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the above data matching method is implemented.

[0173] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0174] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0175] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or N executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes additional implementations, in which the order shown or discussed may not be followed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0176] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can read instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or N wirings (electronic devices), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically by optically scanning the paper or other medium and then editing, interpreting or otherwise processing in a suitable manner if necessary and then storing it in a computer memory.

[0177] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0178] A person skilled in the art may understand that all or part of the steps in the above-mentioned embodiment method may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0179] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0180] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A data matching method, characterized in that: The following steps are involved: Obtaining a matching trapdoor sent by a data demand terminal, and screening out a target keyword set matching the matching trapdoor from a characteristic keyword ciphertext, wherein the matching trapdoor is used to characterize the characteristic of the demand data required by the data demand terminal, and the characteristic keyword ciphertext corresponds to the characteristic of the supply data provided by the data supply terminal; According to the target keyword set and the matching trapdoor, a matching result of the demand data feature and the supply data feature is obtained, and the matching result is used to control whether the data supply terminal releases data to the data demand terminal.

2. The data matching method according to claim 1, characterized in that: The matching trapdoor includes a matching strategy, and the matching strategy is used to characterize the demand keyword name in the demand data feature, the feature keyword ciphertext includes the supply keyword name, and the target keyword set matching the matching trapdoor is selected from the feature keyword ciphertext, including: Filtering out pre-selected keyword names matching the matching strategy from the supplied keyword names; According to the number of keywords corresponding to the pre-selected keyword names, target keyword names are screened out from the pre-selected keyword names, and the target keyword names are combined into the target keyword set.

3. The data matching method according to claim 2, characterized in that: The characteristic keyword ciphertext further includes a preset first ciphertext value, a preset second ciphertext value, and a preset ciphertext expression, and the matching trapdoor further includes a preset matching expression. The matching result of the demand data feature and the supply data feature is obtained based on the target keyword set and the matching trapdoor, including: Determining a target keyword value corresponding to the target keyword name in the target keyword set; Applying the ciphertext expression to the target keyword value to obtain a target value; Applying the matching expression to the target keyword value to obtain a target matching value; Calculate a bilinear mapping value of the target value and the target matching value; A matching result of the demand data feature and the supply data feature is obtained according to the bilinear mapping value, the first ciphertext value and the second ciphertext value.

4. The data matching method according to claim 3, characterized in that: The obtaining the matching result of the demand data feature and the supply data feature according to the bilinear mapping value and the first ciphertext value and the second ciphertext value includes: generating a private key value corresponding to the matching expression; A matching result of the demand data feature and the supply data feature is obtained according to the private key value, the bilinear mapping value, the first ciphertext value, and the second ciphertext value.

5. A method for generating a public key, characterized in that: The following steps are involved: Generate a first generator and a second generator, and generate a first random number; Applying a bilinear mapping to the first generator, the second generator, and the first random number to obtain a first sub-public key; Generate a second random number, and calculate the power of the first generator based on the second random number to obtain a second sub-public key; Generate a hash function; A system public key is generated based on the first sub-public key, the second sub-public key, the first generator, the second generator and the hash function. The system public key is used to generate the feature keyword ciphertext required by the data supply terminal. The feature keyword ciphertext is used to implement the data matching method described in claim 1.

6. A ciphertext generation method, characterized in that: The following steps are involved: Obtaining a system public key sent by an authority center terminal, wherein the system public key is generated by the authority center terminal based on the public key generation method according to claim 5; generating a third random number; Parsing the system public key to obtain a first generator, and applying a bilinear mapping to the first generator and the third random number to obtain a first ciphertext value; Parsing the system public key to obtain a first sub-public key, and obtaining a second ciphertext value according to the first sub-public key and the third random number; Extract the keyword features of the supply database, and obtain the characteristic keyword ciphertext of the keyword features based on the keyword features, the first ciphertext value, and the second ciphertext value. The characteristic keyword ciphertext is used to implement the data matching method described in claim 1.

7. The ciphertext generation method according to claim 6, characterized in that: The step of obtaining the characteristic keyword ciphertext of the keyword feature according to the keyword feature, the first ciphertext value, and the second ciphertext value includes: Determine a supply keyword name and a supply keyword value in the keyword feature; Generate a ciphertext expression according to the supplied keyword value, the first generator and the third random number; The feature keyword ciphertext of the keyword feature is obtained according to the generated ciphertext expression, the first ciphertext value, the second ciphertext value and the supplied keyword name.

8. A data matching device, characterized in that: include: A screening module, used to obtain a matching trapdoor sent by a data demand terminal, and screen out a target keyword set matching the matching trapdoor from a characteristic keyword ciphertext, wherein the matching trapdoor is used to characterize the demand data characteristics required by the data demand terminal, and the characteristic keyword ciphertext corresponds to the supply data characteristics provided by the data supply terminal; A matching module is used to obtain a matching result of the demand data feature and the supply data feature based on the target keyword set and the matching trapdoor, and the matching result is used to control whether the data supply terminal releases data to the data demand terminal.

9. A terminal device, characterized in that: The terminal device comprises a memory, a processor, and a data matching program stored in the memory and executable on the processor, wherein when the processor executes the data matching program, the steps of the data matching method according to any one of claims 1 to 4 are implemented; Alternatively, the terminal device includes a memory, a processor, and a public key generation program stored in the memory and executable on the processor, and when the processor executes the public key generation program, the steps of the public key generation method according to claim 5 are implemented; Alternatively, the terminal device includes a memory, a processor, and a ciphertext generation program stored in the memory and executable on the processor, and when the processor executes the ciphertext generation program, the steps of the ciphertext generation method as described in any one of claims 6-7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a data matching program, and when the data matching program is executed by the processor, the steps of the data matching method according to any one of claims 1 to 4 are implemented; or the computer-readable storage medium stores a public key generation program, and when the public key generation program is executed by the processor, the steps of the public key generation method according to claim 5 are implemented; Alternatively, a ciphertext generation program is stored on the computer-readable storage medium, and when the ciphertext generation program is executed by the processor, the steps of the ciphertext generation method according to any one of claims 6 to 7 are implemented.