A method for supervising the risk of personnel flow based on ciphertext retrieval
By encrypting user information into ciphertext and building a global dictionary and index, the problem of inefficient privacy exposure and flow risk management in the flow risks of infectious disease patients is solved, and fast and accurate patient itinerary and close contact information positioning is achieved.
Patent Information
- Application Number
- CN202210182629.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-25
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2042-02-25
AI Technical Summary
In the case of sudden flow risks of infectious disease patients, it is difficult for the prior art to effectively manage the flow risks of personnel, and there is a problem of patient privacy information being exposed.
The personnel flow risk supervision method based on ciphertext retrieval is adopted. By converting user information into ciphertext information, and automatically identifying and searching patients based on ciphertext information, building a global dictionary and index, the encryption management of patient information is realized, privacy is ensured and flow risk management efficiency is improved.
It realizes the efficiency of monitoring of personnel flow risks without revealing user privacy, and can quickly locate patient itinerary information and close contacts, reducing data storage overhead.
Smart Images

Figure CN114611135B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of personnel flow risk control, and particularly to a personnel flow risk supervision method based on ciphertext retrieval. Background Art
[0002] In the event of an emergency in the flow risk of infectious disease patients, the exposure of personal information of relevant cases and the problem of consuming a large amount of manpower and material resources in the epidemiological investigation work have brought huge challenges to the prevention and control of personnel flow risks. Summary of the Invention
[0003] The technical problem of the present invention is to provide a personnel flow risk supervision method based on ciphertext retrieval, which converts user information into ciphertext information and automatically identifies and locates patients based on the ciphertext information, avoiding the exposure of patient privacy and improving the screening efficiency of personnel flow risk management.
[0004] To achieve the above object, the technical solution adopted by the present invention is as follows:
[0005] A personnel flow risk supervision method based on ciphertext retrieval includes the following steps: S2 The central server responds to the input instruction at the card swiping point, obtains the ciphertext of the card swiping information uploaded by the user from the card swiping point, and constructs a global dictionary and index based on the ciphertext of the card swiping information and the information of the area server corresponding to the card swiping point; S3 The central server responds to the first query instruction and obtains the itinerary information of the first target user through the global dictionary and index; S4 The central server responds to the second query instruction and obtains the second target user whose itinerary information overlaps with that of the first target user through the global dictionary and index. By encrypting the user's card swiping information and establishing a global dictionary and index based on the encrypted information, the encrypted management of patient information is realized, the privacy of users is guaranteed, and it is convenient for staff to accurately locate the itinerary information of patients and the information of close contacts, greatly improving the supervision efficiency of personnel flow risks.
[0006] Further, S2 includes: S21 The card swiping point responds to the user's card swiping operation, encrypts the user's card swiping information to obtain the ciphertext of the card swiping information, and the area server corresponding to the card swiping point constructs a first-level index and a second-level index based on the card swiping information and the ciphertext of the card swiping information; wherein, the card swiping information includes the user ID, mobile phone number and card swiping address time information; the ciphertext of the card swiping information is: the ciphertext of the user ID, the ciphertext of the mobile phone number and the ciphertext of the address time; S22 The central server responds to the input instruction at the card swiping point and constructs a global dictionary based on the ciphertext of the card swiping information and the ciphertext of the area code of the area server.
[0007] Further, before S2, it also includes: S1 The authorization agency initializes the user IC card, the central server and the area server, and distributes keys to the central server and the card swiping point.
[0008] Further, S21 includes: S211 The card swiping point encrypts the user's card swiping information in response to the user's card swiping operation, constructs a first-level index based on the user ID and the user ID ciphertext, and uploads it to the corresponding area server; S212 constructs a first database based on the first-level index, the address-time ciphertext, and the corresponding area server key; S213 the corresponding area server constructs a second-level index based on the user ID ciphertext and the address-time ciphertext; S214 the corresponding area server constructs a second database based on the first-level index and the user ID ciphertext; S215 the corresponding area server calculates the area code ciphertext and uploads it to the central server.
[0009] Further, S22 includes: S221 The central server constructs a third database based on the area code ciphertext, the mobile phone number ciphertext, and the user ID ciphertext in response to the input instruction of the card swiping point; the first database, the second database, and the third database constitute a global dictionary.
[0010] Further, S3 includes: S31 The central server decrypts the mobile phone number and user ID of the first target user in the plaintext state in response to the first query instruction; S32 The central server queries the third database based on the user ID ciphertext of the first target user to obtain the corresponding area code ciphertext set, decrypts the area code ciphertext in the area code ciphertext set to obtain the area code in the plaintext state; S33 The central server executes the trapdoor generation algorithm to obtain the ID trapdoor of the first target user, and sequentially sends the ID trapdoor to several target area servers corresponding to the area code ciphertext set; S34 The target area server executes the test algorithm to test whether the first-level index and the ID trapdoor under the target area server match; if they match, the address-time ciphertext and the card swiping point public key that match in the first database are sent to the central server, and S35 is executed; if they do not match, S35 is directly executed; S35 Other target area servers in the area code ciphertext set execute S34 until all target area servers corresponding to the area code ciphertext set are traversed to obtain all the address-time ciphertexts of the first target user and the card swiping point public keys corresponding to the address-time ciphertexts; S36 The central server decrypts the card swiping address-time information of the first target user based on the address-time ciphertext and the card swiping point public key of the first target user.
[0011] Further, S4 includes: S41 The central server, in response to the second query instruction, obtains the target address-time information corresponding to the first target user; S42 The central server executes a trapdoor generation algorithm, generates an address-time trapdoor based on the target address-time information, and sequentially sends the address-time trapdoor to the target area server corresponding to the area code ciphertext set of the first target user; S43 The target area server executes a test algorithm to test whether the secondary index under the target area server matches the address-time trapdoor; if they match, the user ID ciphertext corresponding in the second database is sent to the central server, and S44 is executed; if they do not match, S44 is directly executed; S44 Other target area servers corresponding to the area code ciphertext set execute S44 until all target area servers corresponding to the area code ciphertext set are traversed to obtain the user ID ciphertexts of all second target users; S45 The central server queries the third database based on the user ID ciphertexts of the second target users to obtain the area code ciphertexts and mobile phone number ciphertexts corresponding to the second target users; S46 The central server decrypts the mobile phone numbers and user IDs of the second target users. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] By reading the detailed description of the non-restrictive embodiments with reference to the following drawings, the present invention and its features, shapes, and advantages will become more obvious. The same reference numerals indicate the same parts in all the drawings. The drawings are not deliberately drawn to scale, and the focus is on showing the gist of the present invention.
[0013] Figure 1 is a diagram of the initialization process in a method for supervising personnel flow risks based on ciphertext retrieval provided by the present invention;
[0014] Figure 2 is a flowchart of constructing a global dictionary and index in a method for supervising personnel flow risks based on ciphertext retrieval provided by the present invention;
[0015] Figure 3 is a flowchart of patient epidemiological investigation in a method for supervising personnel flow risks based on ciphertext retrieval provided by the present invention;
[0016] Figure 4 is a flowchart of close contact epidemiological investigation in a method for supervising personnel flow risks based on ciphertext retrieval provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0017] The following is a further description of the present invention with reference to the drawings and specific embodiments, but it is not a limitation of the present invention.
[0018] A method for monitoring the risk of personnel flow based on ciphertext retrieval provided by the present invention includes the following steps: S1 distributes IC cards to users, and the authorized institution initializes the user IC cards, the central server and the area servers, and distributes keys to the central server and the card swiping points; S2 the central server responds to the input instruction of the card swiping point, obtains the ciphertext of the card swiping information uploaded by the user from the card swiping point, and constructs a global dictionary and an index based on the ciphertext of the card swiping information and the area server information corresponding to the card swiping point; S3 the central server responds to the first query instruction, and obtains the itinerary information of the first target user, that is, the patient, through the global dictionary and the index; the central server and the area server search for the itinerary information of the patient, and ensure that only the central server can obtain the itinerary information of the patient in plaintext form during the search process. S4 the central server responds to the second query instruction, and obtains the second target user whose itinerary information overlaps with that of the first target user through the global dictionary and the index, that is, the central server investigates the identity information of the close contacts within the same time and place according to the itinerary information of the first target user.
[0019] S2 includes: S21 the card swiping point responds to the user's card swiping operation, encrypts the user's card swiping information to obtain the ciphertext of the card swiping information, and the area server corresponding to the card swiping point constructs a first-level index and a second-level index based on the card swiping information and the ciphertext of the card swiping information; wherein, the card swiping information includes the user ID (i.e., UID in the figure), the mobile phone number and the card swiping address and time information; the ciphertext of the card swiping information is: the ciphertext of the user ID, the ciphertext of the mobile phone number and the ciphertext of the address and time; S22 the central server responds to the input instruction of the card swiping point, and constructs a global dictionary based on the ciphertext of the card swiping information and the ciphertext of the area code of the area server.
[0020] S21 includes: S211 the card swiping point responds to the user's card swiping operation, encrypts the user's card swiping information, constructs a first-level index based on the user ID and the ciphertext of the user ID, and uploads it to the corresponding area server; S212 constructs a first database based on the first-level index, the ciphertext of the address and time and the key of the corresponding area server; S213 the corresponding area server constructs a second-level index based on the ciphertext of the user ID and the ciphertext of the address and time; S214 the corresponding area server constructs a second database based on the first-level index and the ciphertext of the user ID; S215 the corresponding area server calculates the ciphertext of the area code and uploads it to the central server.
[0021] S22 includes: S221 the central server responds to the input instruction of the card swiping point, and constructs a third database based on the ciphertext of the area code, the ciphertext of the mobile phone number and the ciphertext of the user ID; the first database, the second database and the third database constitute the global dictionary.
[0022] S3 includes: S31 The central server decrypts the mobile phone number and user ID of the first target user in the plaintext state in response to the first query instruction; S32 The central server queries the third database based on the ciphertext of the user ID of the first target user to obtain the corresponding set of area code ciphertexts, decrypts the area code ciphertexts in the set of area code ciphertexts to obtain the area codes in the plaintext state; S33 The central server executes the trapdoor generation algorithm to obtain the ID trapdoor of the first target user, and sequentially sends the ID trapdoor to several target area servers corresponding to the set of area code ciphertexts; S34 The target area server executes the test algorithm to test whether the first-level index under the target area server matches the ID trapdoor; if they match, the matching address-time ciphertext and card-swipe point public key in the first database are sent to the central server, and S35 is executed; if they do not match, S35 is directly executed; S35 Other target area servers in the set of area code ciphertexts execute S34 until all target area servers corresponding to the set of area code ciphertexts are traversed to obtain all the address-time ciphertexts of the first target user and the card-swipe point public keys corresponding to the address-time ciphertexts; S36 The central server decrypts the card-swipe address-time information of the first target user based on the address-time ciphertext and card-swipe point public key of the first target user.
[0023] S4 includes: S41 The central server obtains the target address-time information corresponding to the first target user in response to the second query instruction; S42 The central server executes the trapdoor generation algorithm, generates an address-time trapdoor based on the target address-time information, and sequentially sends the address-time trapdoor to the target area servers corresponding to the set of area code ciphertexts of the first target user; S43 The target area server executes the test algorithm to test whether the second-level index under the target area server matches the address-time trapdoor; if they match, the corresponding user ID ciphertext in the second database is sent to the central server, and S44 is executed; if they do not match, S44 is directly executed; S44 Other target area servers corresponding to the set of area code ciphertexts execute S44 until all target area servers corresponding to the set of area code ciphertexts are traversed to obtain the user ID ciphertexts of all second target users; S45 The central server queries the third database based on the user ID ciphertext of the second target user to obtain the area code ciphertext and mobile phone number ciphertext corresponding to the second target user; S46 The central server decrypts the mobile phone number and user ID of the second target user.
[0024] In this embodiment, combined with Figure 1 , S1 is specifically that the authorization agency randomly selects an element g in the group G and elements x, y in the group Zp i , let sk cs = x, sk i = y i , where the element g is an algebraic structure of a binary operation in cryptography that satisfies closure, associativity, has an identity element, and has an inverse element in the group, sk cs is the private key of the central server, sk iis the private key of the card - swiping point i. Calculate the public key of the central server and the private key of the card - swiping point i as pk cs = g x , Then the authorization agency randomly selects the master private key K of the central server from {0, 1} λ , and calculates C pn = SM2.Enc(pk cs , pn), sk pn = H(K, pn), C UID = SM4.Enc(sk pn , UID), where C pn is the ciphertext of the user's mobile phone number obtained by encrypting the user's mobile phone number using the SM2 encryption algorithm with the public key of the central server. sk pn is the hash value of the mobile phone number obtained by performing a hash operation on the mobile phone number. C UID is the ciphertext of the user ID obtained by performing the SM4 encryption algorithm with the hash value of the mobile phone number as the key to encrypt the user ID; Write (C pn , C UID ) into the IC card.
[0025] In the above initialization process, the central server applies to the authorization agency for a pair of public - private key pairs (pk cs , sk cs ) and a master private key K. Each card - swiping point applies to the authorization agency for a pair of public - private key pairs (pk i , sk i ). The user registers his / her personal information at the authorization agency, and the authorization agency distributes an IC card to the user. The ciphertext of the mobile phone number C pn , and the ciphertext of the user's ID C UID are written into the card. The ciphertext of the mobile phone number is encrypted using the SM2 encryption algorithm with the public key of the central server as the encryption key, and the ciphertext of the ID is encrypted using the SM4 encryption algorithm with the master private key of the central server and the hash value of the mobile phone number as the key.
[0026] Combined with Figure 2 , S2 specifically refers to the card - swiping point calculating C at = SM4.Enc(sk i , ad||ti), constructing a first - level index uploading the data group to the server of the affiliated area, constructing the first database DB1, and then constructing a second index and then uploading the data group to the server of the affiliated area, constructing the second database DB2. Then calculate the ciphertext of the area number C dn = SM2.Enc(pk cs , dn), and upload (Cdn , C pn , C UID ) to the central server, and the central server constructs the third database DB t .
[0027] In the above process, the card swiping point encrypts and constructs an index for the ciphertext in the user's card (C pn , C UID ) and the address-time information (ad, ti) recorded in real time at the card swiping point. Note that we omit the user identity authentication process in the system here. In this process, the status code in the IC card matches the sensing module of the MFRC522. If the status codes do not match, the IC card cannot be sensed. First, use the SM4 encryption algorithm, with the negotiated key between the card swiping point and the central server as the private key, to encrypt the location-time information to obtain C at . Then construct the area server user ID index, use C UID as the encrypted keyword, and use the public key searchable encryption algorithm to encrypt it with the central server public key pk cs to obtain the first-level index Then upload this index together with the corresponding time-location ciphertext information and the public key of the card swiping point to the affiliated area server, and the server constructs the received data into the first database. Secondly, construct the second-level index, use (ad, ti) as the encrypted keyword, and the card swiping point encrypts it with the central server public key pk cs through the connected keyword searchable encryption algorithm to obtain the first-level index Then upload the first-level index together with the corresponding C UID to the affiliated area server, and the server constructs the received data into the second database. Finally, the card swiping point uses the SM2 encryption algorithm, with the central server public key as the key, to encrypt the area code dn of the affiliated area server to obtain the area code ciphertext C dn . Upload the area code ciphertext, mobile phone number ciphertext, and user ID ciphertext (C dn , C pn , C UID ) to the central server together. The central server constructs the received data into the third database, and the first database, the second database, and the third database together constitute the global dictionary. Such a structure enables the staff to accurately locate the information of the districts and cities where the user has been by querying the central server database, so as to require the corresponding districts and cities to assist in quickly completing the epidemiological investigation work, and also reduces the storage overhead of data. The present invention can ensure that during the entire information upload process, the user's data is completely transmitted in ciphertext form, ensuring that no other information will be leaked.
[0028] In the patient epidemiological investigation stage of S3, as Figure 3 shown, the central server calculates pn = SM2.Dec(skcs , C pn ), sk pn = H(K, pn), then calculate UID = SM4.Dec(sk pn , C UID ), and find database DB UID through C t to obtain C dn , then decrypt to get dn = SM2.Dec(sk cs , C dn ), calculate the trapdoor T UID = PEKS.Trapdoor(sk cs , C UID ), and send the trapdoor to the area server with the area code dn. The area server calculates If b = 1, then send the corresponding (C at , pk i ) in database DB1 to the central server; otherwise, perform a matching test on the others in DB1 with T UID until the entire DB1 is traversed. Then the central server calculates Calculate ad||ti = SM4.Dec(sk i , C at ).
[0029] In the above process, after receiving the patient's IC card, the central server can obtain (C pn , C UID ) by reading the information in the IC card. The central server first decrypts the mobile phone number ciphertext using its own private key sk cs through the SM2 decryption algorithm to obtain the patient's mobile phone number. Then, the main private key and the cleartext of the mobile phone number are hashed to obtain the private key sk pn for decrypting the user ID ciphertext. The central server can thus obtain the patient's ID and the cleartext of the mobile phone number, and then send them to the authorization agency to retrieve the patient's detailed information. Secondly, the central server searches for the area code ciphertext C UID corresponding to C dn in the third database, and decrypts it through the SM2 decryption algorithm to obtain the cleartext of the area code. Then, using C UID as the keyword, the ID trapdoor T UID is obtained through the trapdoor generation algorithm in the public key searchable encryption scheme and sent to the server corresponding to the area code. The area server traverses the in the first database and performs the test algorithm in the public key searchable encryption scheme on it with T UID . If the test result is 1, then send the corresponding (C at , pk i) Send it to the central server, otherwise return empty. Finally, the central server calculates the negotiated key sk i , and obtains the plaintext of the patient's address and time through the SM4 decryption algorithm.
[0030] For the close contact tracing stage of S4, as Figure 4 shown, the central server calculates T at = PECK.Trapdoor(sk cs , {ad, ti}), and sends T at to the district number server calculated during the contact tracing process. The district server calculates If b = 1, then send the corresponding C UID in the database DB2 to the central server, otherwise send other in DB2 to do a matching test with T at until the entire DB2 is traversed. The central server searches for the third database DB UID according to C t , and obtains (C dn , C pn ). The central server calculates pn = SM2.Dec(sk cs , C pn ), sk pn = H(K, pn), UID = SM4.Dec(sk pn , C UID ), and then can contact the close contacts for isolation.
[0031] In the above process, when the central server knows the patient's itinerary information, it investigates the personal information of the close contacts whose itinerary information coincides with that of the patient. First, the central server generates an address-time trapdoor T at with the address and time as the keyword through the trapdoor generation algorithm in the keyword public key searchable encryption scheme. And send it to the district number server obtained during the patient contact tracing process. Then, the district server traverses the in the second database and does a test algorithm in the keyword public key searchable encryption scheme with it and T at . If the test result is 1, it means that there is a user with the same address and time as the patient, then send the corresponding C UID to the central server, otherwise return empty. Finally, the central server searches for the third database according to C UID , and obtains (C dn , C pn ). Through the SM2 decryption algorithm, the mobile phone number of the close contact is obtained, so as to quickly contact the close contact and take corresponding prevention and control measures.
[0032] In summary, the present invention proposes a method for monitoring the risk of personnel flow based on ciphertext retrieval, which can ensure the security of information upload using domestic and autonomous national cipher algorithms during the process of uploading information, close contact tracing, and epidemiological investigation using RFID. Moreover, in order to quickly complete the epidemiological investigation work, a two-level index structure is creatively adopted to help the staff accurately locate the district and city information where the user appears through the query center server. In addition, a ciphertext retrieval algorithm, namely the public key searchable encryption algorithm, is adopted to allow users to search for ciphertext data containing specific keywords while ensuring data confidentiality. Compared with the existing RFID-based personnel control system design, the present invention greatly protects user privacy without sacrificing query efficiency.
[0033] The above describes the preferred embodiments of the present invention; it should be understood that the present invention is not limited to the above specific implementation manners, and the devices and structures not described in detail should be understood to be implemented in a common manner in the art; any person skilled in the art can make many possible changes and modifications without departing from the technical solution of the present invention, or modify it into an equivalent embodiment with equivalent changes, which does not affect the essence of the present invention; therefore, any simple modification, equivalent change, and modification made to the above embodiments based on the technical essence of the present invention without departing from the technical solution of the present invention still fall within the scope of protection of the technical solution of the present invention.
Claims
1. A method for monitoring the risk of personnel flow based on ciphertext retrieval, characterized in that, It includes the following steps: S2 The central server responds to the input instruction of the card swiping point, obtains the ciphertext of the card swiping information uploaded by the user from the card swiping point, and constructs a global dictionary and index based on the ciphertext of the card swiping information and the area server information corresponding to the card swiping point; Among them, the card swiping point obtains the card swiping information and encrypts it according to the user's card swiping operation, constructs a first-level index based on the user ID and the user ID ciphertext, and constructs a second-level index based on the user ID ciphertext and the address-time ciphertext; the area server corresponding to the card swiping point constructs a first database based on the first-level index, the address-time ciphertext and the corresponding area server key, and constructs a second database based on the first-level index and the user ID ciphertext; the central server constructs a third database based on the mobile phone number ciphertext, the user ID ciphertext and the area code ciphertext; The first database, the second database and the third database form a global dictionary; S3 The central server responds to the first query instruction, searches the third database through the user ID ciphertext, determines the area code of the corresponding area server and constructs the ID trapdoor of the first target user; decrypts the travel information and address-time information of the first target user based on the ID trapdoor of the first target user and the first-level index of the area server; S4 The central server responds to the second query instruction, constructs an address-time trapdoor based on the address-time information, and determines the second target user whose travel information overlaps with that of the first target user based on the second-level index of each area server and the third database.
2. The method for supervising the personnel flow risk based on ciphertext retrieval according to claim 1, wherein The S3 includes: S31 The central server responds to the first query instruction and decrypts the mobile phone number and user ID of the first target user in the plaintext state; S32 The central server queries the third database based on the user ID ciphertext of the first target user, obtains the corresponding set of area code ciphertexts, decrypts the area code ciphertexts in the set of area code ciphertexts, and obtains the area code in the plaintext state; S33 The central server executes the trapdoor generation algorithm to obtain the ID trapdoor of the first target user, and sequentially sends the ID trapdoor to several target area servers corresponding to the set of area code ciphertexts; S34 The target area server executes a test algorithm to test whether the first-level index under the target area server matches the ID trapdoor; if they match, it sends the matching address-time ciphertext and card swiping point public key in the first database to the central server and executes S35; if they do not match, it directly executes S35; S35 The other target area servers in the set of area code ciphertexts execute S34 until all target area servers corresponding to the set of area code ciphertexts are traversed, and all address-time ciphertexts of the first target user and the card swiping point public keys corresponding to the address-time ciphertexts are obtained; S36 The central server decrypts the card swiping address-time information of the first target user based on the address-time ciphertext and card swiping point public key of the first target user.
3. The method for monitoring the risk of personnel flow based on ciphertext retrieval according to claim 2, wherein The S4 includes: S41 The central server responds to the second query instruction and obtains the target address-time information corresponding to the first target user; The central server described in S42 executes a trapdoor generation algorithm, generates an address-time trapdoor based on the target address-time information, and sequentially sends the address-time trapdoor to the target area server corresponding to the area code ciphertext set of the first target user; The target area server described in S43 executes a test algorithm to test whether the secondary index under the target area server matches the address-time trapdoor; if they match, it sends the user ID ciphertext corresponding in the second database to the central server and executes S44; if they do not match, it directly executes S44; The other target area servers corresponding to the area code ciphertext set execute S44 until all the target area servers corresponding to the area code ciphertext set are traversed to obtain the user ID ciphertexts of all the second target users; The central server described in S45 queries the third database based on the user ID ciphertext of the second target user to obtain the area code ciphertext and mobile phone number ciphertext corresponding to the second target user; The central server described in S46 decrypts the mobile phone number and user ID of the second target user.
Citation Information
Patent Citations
Data processing method, device and apparatus and storage medium
CN111460330A
System and method for rapid identification of close contact person based on data mining technology
CN113257433A
Searchable encryption method and system capable of flexibly replacing ciphertexts, and computer equipment
CN113626484A