Apartment leasing management system and method
Through the combination of the ResNet-50 model and the ChaCha20-Poly1305 algorithm, encrypted identity data is generated and electronic contract signing is used to use the Hyperledger Fabric network to solve the security bottleneck of fixed-mode encryption strategy in biometric data transmission, and efficient identity confirmation and data protection are achieved.
Patent Information
- Application Number
- CN202510591835.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-08-08
AI Technical Summary
In the prior art, biometric data generally adopts a fixed-mode encryption strategy during transmission, and fails to integrate dynamic environmental parameters as verification factors, resulting in the encryption system being threatened by selective plaintext attacks and the risk of key cracking is high.
The ResNet-50 model is used to generate facial feature vectors, combine the ChaCha20-Poly1305 algorithm to encrypt identity information, generate credit points identifiers through the SHA-256 algorithm, and generate electronic contract drafts using the Hyperledger Fabric network, combine GPS, Wi-Fi and Bluetooth for multimodal positioning verification, perform identity confirmation, and protect historical leasing behavior data through differential privacy methods.
Build a full-link protection system for biometric features to effectively resist man-in-the-middle attacks, ensure data security and privacy protection, and realize the reliability of identity confirmation and credit assessment.
Smart Images

Figure CN120449186A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to an apartment rental management system and method. Background Art
[0002] The development of smart cities is reshaping the leasing management ecosystem, with innovations continuously evolving in areas like identity verification and data exchange. Mainstream identity authentication systems have widely incorporated deep residual network architectures. This architecture, with its unique cross-layer connectivity design, effectively addresses network degradation challenges, demonstrating near-99% accuracy in static facial recognition scenarios. Data security developments are also worthy of attention. Hybrid encryption protocols combined with hash algorithms are becoming a mainstream protection system in the industry. Blockchain technology, leveraging consensus algorithms and automated contract mechanisms, is establishing a collaborative trust framework for leasing contracts.
[0003] However, existing technologies still have the following security bottlenecks: biometric data generally adopts a fixed-mode encryption strategy during transmission; when the encryption system fails to integrate dynamic environmental parameters as verification factors, the transmitted data will face the threat of selective plaintext attacks; typically reflected in the feature vector encryption process, dynamic information such as device fingerprints and timestamps are not included in the authentication system, and attackers can establish statistical models by analyzing fixed-format ciphertext data. Such vulnerabilities will significantly increase the risk of cracking encryption keys. Summary of the Invention
[0004] In view of the above existing problems, the present invention is proposed.
[0005] Therefore, the present invention provides an apartment rental management method to solve the problem of fixed-mode encryption strategy commonly used in the transmission process of biometric data.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, the present invention provides an apartment rental management method, which includes verifying the tenant's identity information through face recognition and liveness detection, generating facial feature vectors using a ResNet-50 model, encrypting the identity information and facial feature vectors using a ChaCha20-Poly1305 algorithm to generate encrypted identity data, and generating a credit score identifier and an initial credit score using a SHA-256 algorithm; processing the credit score identifier based on a joint learning framework to generate an anonymous credit query token, protecting historical rental behavior data using a differential privacy method, updating the credit score based on the historical rental behavior data, and generating a recommended housing list; geo-fencing verification of the target housing through multimodal positioning using GPS, Wi-Fi, and Bluetooth, comparing the facial feature vector and the real-time facial feature vector through cosine similarity, performing identity confirmation, and generating a rental verification result; generating an electronic contract draft using a Hyperledger Fabric network and chain code, storing the electronic contract draft in IPFS, and completing the decentralized signing between the tenant and the landlord through an ECDSA digital signature.
[0008] As a preferred solution of the apartment rental management method of the present invention, wherein: the ChaCha20-Poly1305 algorithm is a combination of the ChaCha20 algorithm and the Poly1305 algorithm;
[0009] The ChaCha20 algorithm encodes identity information and facial feature vectors into a plaintext stream, initializes the ChaCha20 algorithm state based on the tenant encryption key sequence and the Nonce random sequence, generates a key stream by changing the number of rounds, and uses the key stream to XOR encrypt the plaintext stream byte by byte to generate ciphertext;
[0010] The Poly1305 algorithm uses ciphertext, tenant encryption key sequence, and Nonce random sequence as inputs to the cryptographic library, derives the Poly1305 one-time key, processes the ciphertext block by block based on the one-time key to calculate the authentication code and generate the authentication tag;
[0011] The tenant encryption key sequence and Nonce random sequence are two sets of pseudo-random sequences generated by collecting physical noise data from the mobile phone hardware entropy source, performing SHA-256 hash to generate a random seed, and then using a pseudo-random number generator based on the random seed.
[0012] As a preferred solution of the apartment rental management method of the present invention, the encrypted data is obtained by generating a ciphertext using the ChaCha20 algorithm and generating an authentication tag using the Poly1305 algorithm, and then combining the ciphertext and the authentication tag.
[0013] As a preferred solution of the apartment rental management method described in the present invention, the generation of a credit score identifier and an initial credit score using the SHA-256 algorithm refers to performing a hash operation on the identity information and the facial feature vector to generate a credit score identifier as the tenant's unique credit identifier, and generating an initial credit score based on the credit score identifier as the starting point for the tenant's credit assessment.
[0014] As a preferred embodiment of the apartment rental management method of the present invention, the method of processing the credit score identifier based on the joint learning framework to generate an anonymous credit query token comprises: training a fully connected neural network model through multiple nodes, encoding the credit score identifier into a byte sequence using the SHA-256 algorithm to generate an intermediate representation, collaboratively processing the intermediate representation with two fully connected layers to generate a compressed feature vector, and converting the compressed feature vector into an anonymous credit query token through an output layer;
[0015] The use of differential privacy methods to protect historical rental behavior data refers to the cooperative platform querying historical rental behavior data based on anonymous credit query tokens, obtaining statistical results of the number of contract signings and renewal rates, and adding random noise to the statistical results through differential privacy methods to prevent inference of individual tenants' rental behavior.
[0016] As a preferred embodiment of the apartment rental management method of the present invention, the method of comparing the facial feature vector and the real-time facial feature vector by cosine similarity comprises extracting a stored facial feature vector, capturing a real-time facial image and generating a real-time facial feature vector, calculating the similarity between the facial feature vector and the real-time facial feature vector by a cosine similarity algorithm, setting a similarity threshold, and determining whether the identities match.
[0017] As a preferred solution of the apartment rental management method of the present invention, wherein: the electronic contract draft is generated by using the Hyperledger Fabric network and chain code, and the specific steps are:
[0018] Deploy chaincode in the Hyperledger Fabric network to define the terms and generation logic of the electronic contract;
[0019] The client application calls the chaincode and inputs the contract data;
[0020] The chain code generates an electronic contract draft based on the input contract data and forms a transaction proposal;
[0021] The endorsing node verifies the transaction proposal using the endorsement policy and generates an endorsement signature.
[0022] The client submits the transaction proposal and endorsement signature to the sorting service;
[0023] The sorting service packages the transaction proposals into blocks, and the peer nodes in the Hyperledger Fabric network verify the blocks and record the draft electronic contract to the Fabric ledger.
[0024] In a second aspect, the present invention provides an apartment rental management system, comprising:
[0025] The credit module verifies the tenant's identity through facial recognition and liveness detection, generates facial feature vectors using the ResNet-50 model, encrypts the identity information and facial feature vectors using the ChaCha20-Poly1305 algorithm to generate encrypted identity data, and generates a credit score identifier and initial credit score using the SHA-256 algorithm.
[0026] The query module is used to process the credit score identifier based on the federated learning framework to generate an anonymous credit query token, use differential privacy to protect historical rental behavior data, update the credit score based on historical rental behavior data, and generate a list of recommended properties;
[0027] The verification module is used to perform geo-fence verification of the target property through multi-modal positioning using GPS, Wi-Fi, and Bluetooth, and compare the facial feature vector with the real-time facial feature vector through cosine similarity to perform identity confirmation and generate a rental verification result;
[0028] The contract module is used to generate electronic contract drafts using the Hyperledger Fabric network and chaincode, store the electronic contract drafts in IPFS, and complete the decentralized signing between tenants and landlords through ECDSA digital signatures.
[0029] In a third aspect, the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, any step of the apartment rental management method described in the first aspect of the present invention is implemented.
[0030] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, any step of the apartment rental management method as described in the first aspect of the present invention is implemented.
[0031] The beneficial effects of the present invention are as follows: the present invention constructs a full-link biometric protection system by integrating the ResNet-50 model with the ChaCha20-Poly1305 dynamic encryption mechanism. The device-bound random seed is generated by using the mobile phone hardware entropy source, and the encryption key and Nonce value are dynamically derived in combination with the pseudo-random sequence, so that the key has spatiotemporal uniqueness. At the same time, the ciphertext integrity verification is realized through the Poly1305 algorithm, which effectively resists man-in-the-middle attacks. In the credit assessment link, the credit score identifier is nonlinearly mapped based on the federated learning framework to generate an anonymous query token, blocking the cooperation platform from reversely inferring the user's identity; differential privacy is used to perturb the rental behavior data to achieve a balance between individual privacy protection and data availability. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0033] Figure 1 This is the authentication and encryption flow chart.
[0034] Figure 2 Flowchart for the Federated Learning Credit Processing.
[0035] Figure 3 Flowchart for multimodal localization validation.
[0036] Figure 4 Generate flow charts for blockchain contracts. DETAILED DESCRIPTION
[0037] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0038] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0039] Secondly, the term "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in various places throughout this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive of other embodiments.
[0040] Reference Figures 1 to 4 This embodiment provides an apartment rental management method, comprising the following steps:
[0041] S1. Verify the tenant's identity information through face recognition and liveness detection, generate facial feature vectors using the ResNet-50 model, encrypt the identity information and facial feature vectors using the ChaCha20-Poly1305 algorithm to generate encrypted identity data, and generate a credit score identifier and initial credit score using the SHA-256 algorithm.
[0042] Furthermore, tenants open the platform application, complete real-name authentication by entering their identity information (tenant name, ID number, contact number, emergency contact) and taking a photo of their ID card, and enter the interface;
[0043] The platform application prompts the tenant to perform facial recognition, calls the camera to start the liveness detection function, and asks the tenant to blink three times to collect facial images;
[0044] The facial features of the facial image are analyzed using the ResNet-50 model to generate a 512-dimensional facial feature vector.
[0045] The ResNet-50 model includes convolutional layers, pooling layers, and fully connected layers;
[0046] The convolutional layer scans the facial image and extracts low-level features (such as the outline of the eyes and the shape of the nose);
[0047] The pooling layer compresses low-level features and retains key facial features (such as the position of the corners of the eyes);
[0048] The fully connected layer integrates low-level features to form an overall facial representation (such as the proportion of facial features) and outputs a 512-dimensional facial feature vector.
[0049] Encode the identity information and the 512-dimensional facial feature vector into a plaintext stream (e.g., 5 kilobytes, approximately 1 kilobyte for identity information + approximately 4 kilobytes for the 512-dimensional facial feature vector);
[0050] Use a cryptography library to collect physical noise data from the phone's hardware entropy source (accelerometer noise, touch screen coordinates), perform a SHA-256 hash on the physical noise data, generate a random seed, and use a pseudo-random number generator (Fortuna PRNG) to generate two sets of pseudo-random sequences based on the random seed. The first set is the tenant encryption key sequence (e.g., 32 bytes, 256 bits, meeting the requirements of the ChaCha20 encryption algorithm), and the second set is the nonce random sequence (e.g., 12 bytes, 96 bits, meeting the requirements of ChaCha20-Poly1305).
[0051] The cryptography library loads the tenant encryption key sequence, the Nonce random sequence, and the counter (initialized to 0), and initializes the ChaCha20 algorithm state. Based on the ChaCha20 encryption algorithm state, it performs transformation rounds (e.g., 20 rounds of addition, XOR, and bit shift), each generating a pseudo-random block (e.g., 64 bytes). Depending on the size of the plaintext stream, it loops multiple times (e.g., 78 times, based on the plaintext stream size divided by the pseudo-random block size) to generate a key stream (e.g., 5 kilobytes), triggering encryption.
[0052] The cryptography library calls the ChaCha20 algorithm interface, reads the keystream and plaintext stream, and performs an XOR operation byte by byte (modulo the addition of each byte, for example, plaintext byte 0x41 and keystream byte 0x5B generate ciphertext byte 0x1A). This generates ciphertext (for example, 5 kilobytes, approximately 1 kilobyte of identity information + approximately 4 kilobytes of a 512-dimensional facial feature vector). This ciphertext protects the tenant's identity information and the 512-dimensional facial feature vector, ensuring privacy.
[0053] The cryptography library takes the tenant encryption key sequence, Nonce random sequence and ciphertext as input, executes the Poly1305 algorithm, derives the Poly1305 one-time key (32 bytes), processes the ciphertext block by block (16 bytes per block, approximately 312 blocks), calculates the authentication code, and generates the tenant authentication tag (e.g., 16 bytes, 128 bits); the Poly1305 algorithm is a message authentication code (MAC) algorithm, which is combined with the ChaCha20 algorithm to form ChaCha20-Poly1305, providing ciphertext integrity and authenticity verification.
[0054] Use the Zstandard algorithm to compress the ciphertext and tenant authentication tag from 5 kilobytes to 2 kilobytes through block segmentation, dictionary compression, finite state entropy coding, and sequence compression to generate encrypted identity data;
[0055] The platform application reads the tenant ID number and calculates the hash value using the SHA-256 algorithm, as follows:
[0056] Convert the tenant ID number into a byte sequence (18 bytes) using UTF-8 encoding;
[0057] The platform application pads the byte sequence to make it 512 bits (64 bytes) long; appending 1 byte (0x80) to 18 bytes yields 19 bytes, appending 37 bytes (0x00) yields 56 bytes, and appending 8 bytes (64-bit binary with a length of 18 bytes) yields 64 bytes.
[0058] Call the cryptography library, load the eight 32-bit initial hash values of the SHA-256 algorithm, and decompose the padded byte sequence into 16 32-bit words (each 4 bytes constitutes a word) as a block;
[0059] Expand 16 32-bit words to generate 64 32-bit words: the first 16 words are used directly, and the last 48 words are generated by performing rotations and shifts on Wi-2 and Wi-15, and combining Wi-7 and Wi-16 addition (modulo 2^32) to generate a new word, a 32-bit value, as part of the expanded word;
[0060] Perform 64 rounds of compression on 64 32-bit words, initializing 8 working variables to the initial hash value; each round reads one word and one constant, and updates the working variables through logical operations (selection function, majority function) and addition (modulo 2^32); the constant is the round constant defined by the SHA-256 hash standard;
[0061] After compression is completed, the working variable is added to the initial hash value, and a 32-byte hash value is output as a credit score identifier.
[0062] Initialize the initial credit score to 100 points (out of 200 points, for example, 10 points are added for signing the contract and 20 points are added for renewal);
[0063] The credit score identifier and initial credit score are stored in the local cache via the SQLite database;
[0064] The platform application displays a privacy terms interface, which lists the authorization scope for tenant identity information processing, 512-dimensional facial feature vector storage, geolocation access, and Wi-Fi and Bluetooth signal scanning. The interface supports multiple languages (Chinese, English, Spanish, etc.) and is adapted according to the language selected by the tenant during registration;
[0065] The tenant confirms their agreement to the privacy terms by checking the box, and the platform application records the authorization status (Boolean value: Authorized status is true);
[0066] If the tenant does not tick the box to agree, the platform application will display a prompt "You must agree to the privacy terms to continue registration" and stop the subsequent process; if you tick the box to agree, proceed to the next step;
[0067] The platform application reads the encrypted identity data, credit score identifier, initial credit score, and authorization status from the local cache and converts them into a tenant registration request in JSON format;
[0068] The cryptography library is called again to collect physical noise from the phone's hardware entropy source (accelerometer noise, touch screen coordinates), generate a random seed, and use a pseudo-random number generator to generate a 16-byte UUID v4 random sequence based on the random seed. The 16-byte UUID v4 random sequence is converted to a 36-byte string, and the four hyphens are removed to generate a 32-byte unique identifier for the tenant registration request.
[0069] Query the local cache to ensure that the unique identifier of the tenant registration request is not duplicated. If so, regenerate it. If not, continue.
[0070] The platform application uploads the tenant registration request to the platform server via the HTTPS protocol; the tenant registration request includes encrypted identity data, credit score identifier, initial credit score, authorization status, tenant registration request unique identifier, and language selection;
[0071] It should be noted that the cryptography library is an independent software library (such as Libsodium and OpenSSL) used by platform applications to provide cryptographic security functions. The cryptography library includes random number generation (tenant encryption key sequence, Nonce random sequence and UUID v4 random sequence), encryption algorithm (ChaCha20 algorithm), authentication algorithm (Poly1305 algorithm), and hash algorithm (SHA-256 algorithm); the cryptography library is usually pre-installed in the mobile phone operating system (such as Android's javax.crypto framework and iOS's CommonCrypto framework) or as an embedded dependency of the application, providing a unified API interface; the platform application calls the ChaCha20 algorithm, Poly1305 algorithm and SHA-256 algorithm through the cryptography library, relying on the mobile phone hardware entropy source (accelerometer noise, touch screen coordinates) to generate random seeds to ensure data security and uniqueness.
[0072] S2. Based on the federated learning framework, the credit score identifier is processed to generate an anonymous credit query token. The historical rental behavior data is protected using differential privacy methods. The credit score is updated based on the historical rental behavior data to generate a list of recommended properties.
[0073] Furthermore, the platform server receives the tenant registration request and checks the authorization status. If the authorization status is true, the process continues. If the authorization status is false, the tenant registration request is discarded and the platform application is notified to display "Unauthorized, please agree to the privacy terms";
[0074] The cryptography library loads the tenant encryption key sequence and Nonce random sequence, initializes the ChaCha20 encryption algorithm state, performs 20 rounds of transformations (addition, XOR, and shift) based on the ChaCha20 encryption algorithm state, generates a key stream (2 kilobytes), and decrypts the encrypted identity data;
[0075] Use the ChaCha20 algorithm to XOR the key stream and the encrypted identity data byte by byte, decrypt the encrypted identity data, and generate a plaintext stream;
[0076] The cryptography library takes the tenant encryption key sequence, the nonce random sequence, and the plaintext stream as input, executes the Poly1305 algorithm, derives the Poly1305 one-time key, processes the plaintext stream block by block, calculates the authentication code, and verifies the tenant authentication tag. If the authentication tag matches, decryption is successful. If the authentication tag does not match, the tenant registration request is discarded and re-registration is required.
[0077] Based on the federated learning framework, a fully connected neural network model is constructed to generate anonymous credit query tokens, as follows:
[0078] The fully connected neural network model includes an input layer, a two-layer fully connected layer, and an output layer;
[0079] The input layer receives the credit score identifier, encodes the credit score identifier into a byte sequence using the SHA-256 algorithm, performs a hash calculation, and generates an intermediate representation (including the hash feature of the credit score identifier);
[0080] The first fully connected layer receives the intermediate representation and performs matrix multiplication and bias addition through 32 neurons to convert the intermediate representation into a facial feature vector. The facial feature vector is an abstract attribute of the credit score identifier. The ReLU activation function is used to set the negative values of the facial feature vector to zero, enhance the nonlinear features, and output the facial feature vector.
[0081] The second fully connected layer receives the facial feature vector and performs weight matrix multiplication and bias addition through 16 neurons to compress the facial feature vector, retaining the core attributes of the credit score identifier. It uses the ReLU activation function to enhance the sparse features of the facial feature vector and outputs the compressed facial feature vector.
[0082] The output layer receives the compressed vector and performs matrix multiplication and bias addition through 64 neurons to generate a byte sequence of anonymous credit query tokens. The sigmoid activation function is used to map the byte sequence value to the range of 0 to 1. The byte sequence is converted into a fixed-length anonymous credit query token through quantization.
[0083] The platform server sends the anonymous credit query token to the partner platform (property management company, other rental platform) to initiate a credit query;
[0084] The cooperative platform receives the anonymous credit query token, compares the anonymous credit query token with the cooperative platform's local database, and searches for historical leasing behavior data; historical leasing behavior data includes the number of contract signings and renewal rates;
[0085] The historical rental behavior data is protected by differential privacy method as follows:
[0086] The cooperative platform responds to the anonymous credit query token from the platform server, queries the local database, and obtains the statistical results of the number of contract signings and renewal rates;
[0087] Differential privacy methods add random noise to statistical results to prevent inference of specific tenants' leasing behavior and protect the individual privacy of historical leasing behavior data. Specific tenant leasing behavior refers to the specific historical leasing records of a single tenant (such as the number of contracts signed and renewal rates).
[0088] Using the Laplace noise mechanism, the noise scale is determined based on a privacy parameter ε of 0.1 and query sensitivity. Random noise is generated (integer noise, such as ±1, is used for the number of contract signings, and decimal noise, such as ±0.05, is used for the renewal rate). This random noise is then added to the statistical results of the number of contract signings and the renewal rate. Integer noise is added to the number of contract signings, and decimal noise is added to the renewal rate. This blurs the rental behavior data of individual tenants and generates noisy historical rental behavior data. The collaboration platform chose a privacy parameter ε of 0.1 based on the high sensitivity and privacy requirements of rental behavior data. 0.1 meets the industry standard for differential privacy.
[0089] The statistical results after noise addition are returned to the platform server as historical rental behavior data.
[0090] The platform server receives historical rental behavior data, sets credit score rules, and updates tenant credit scores. The initial credit score is 100 points, which increases by 10 points for each contract signed and 20 points for each renewal, with a maximum credit score of 200 points. If historical rental behavior data shows two contracts signed and one renewal, the credit score is updated to 140 points.
[0091] Generate a credit assessment report based on the credit score rules. The credit assessment report includes the credit score, risk level (low risk: credit score greater than 120 points; medium risk: credit score between 80 and 120 points; high risk: credit score less than 80 points) and behavior summary (for example, "signed twice and renewed once");
[0092] Call the PostgreSQL database to filter properties based on the credit assessment report and generate a list of recommended properties. For low-risk tenants (credit scores greater than 120), all properties are screened; for medium-risk tenants (credit scores between 80 and 120), 70% of properties are screened (excluding high-end apartments); for high-risk tenants (credit scores less than 80), 30% of properties are screened (only short-term rentals). The recommended property list includes the property number, address, rent, and facilities.
[0093] The recommended property list is pushed to the platform application and displayed as a card-style interface. Each card displays the property number, address, rent, facilities, and an interactive 3D panorama. The interface text is adapted to the tenant's selected interface language. The tenant confirms the target property through touch screen or voice, clicks "Apply for Lease", and a rental application request is generated. The rental application request includes a credit score ID, a unique tenant registration request ID, the property number, and a language selection.
[0094] Upload the rental application request to the platform server via the HTTPS protocol to trigger geofence verification.
[0095] S3. Perform geo-fence verification on the target property through multimodal positioning using GPS, Wi-Fi, and Bluetooth. Perform identity confirmation by comparing the facial feature vector with the real-time facial feature vector through cosine similarity to generate a rental verification result.
[0096] Furthermore, the platform server parses the property ID, queries the SQLite database, obtains the geofence parameters of the target property, and generates a location verification request;
[0097] The platform application receives the location verification request, calls the device positioning function (based on GPS and Wi-Fi scanning), and collects the tenant's current location coordinates and a list of nearby Wi-Fi SSIDs;
[0098] Encapsulate the tenant's current location coordinates and Wi-Fi SSID list into location response data;
[0099] Extract the tenant's current location coordinates from the location response data and compare them with the target listing's geofence center coordinates to calculate the Euclidean distance. If the Euclidean distance is less than the geofence radius (e.g., 500 meters), the geolocation verification passes. If the Euclidean distance is greater than or equal to the radius, the geolocation verification fails.
[0100] The Euclidean distance expression is:
[0101]
[0102] Where d is the Euclidean distance between the center of the target listing's geofence and the tenant's current location, x1 is the latitude of the target listing's geofence center, x2 is the latitude of the tenant's current location, y1 is the longitude of the target listing's geofence center, and y2 is the longitude of the tenant's current location.
[0103] The platform server extracts the Wi-Fi SSID list from the location response data and compares it with the Wi-Fi SSID of the target property. If the SSID list contains the target property's SSID, Wi-Fi verification succeeds. If it does not, Wi-Fi verification fails.
[0104] Combine the results of geographic location verification and Wi-Fi verification. If both pass, geofence verification passes. If either verification fails, geofence verification fails, and the tenant registration request unique identifier is recorded in the SQLite database.
[0105] Based on the result of the geo-fence verification, identity confirmation is initiated, the SQLite database is queried, the 512-dimensional facial feature vector corresponding to the tenant registration request unique identifier is extracted, and an authentication request is generated. The authentication request contains the tenant registration request unique identifier, the property ID, and the verification type (face recognition);
[0106] The platform application receives the authentication request, calls the device (such as a mobile phone) camera, collects the tenant's face image, and extracts the real-time 512-dimensional facial feature vector;
[0107] Encapsulate the real-time 512-dimensional facial feature vector and the tenant registration request unique identifier into identity response data;
[0108] The platform server receives the identity response data, compares the real-time 512-dimensional facial feature vector with the 512-dimensional facial feature vector stored in the SQLite database, and calculates the cosine similarity;
[0109] An identity threshold is set based on cosine similarity. If the cosine similarity is greater than the identity threshold (e.g., 0.95), the identity confirmation is successful. If the cosine similarity is less than or equal to the identity threshold, the identity confirmation fails.
[0110] Combined geo-fence verification and identity confirmation results, if both pass, a lease verification result is generated;
[0111] The lease verification results are stored in the SQLite database and pushed to the platform application via the HTTPS protocol. If the tenant is notified that "lease application verification passed", the subsequent lease signing process is triggered. If any verification fails, the platform application is notified that "lease application verification failed, please try again".
[0112] S4. Generate an electronic contract draft using the Hyperledger Fabric network and chain code, store the electronic contract draft in IPFS, and complete the decentralized signing between the tenant and the landlord through ECDSA digital signature.
[0113] Furthermore, the platform server queries the SQLite database to extract the credit score corresponding to the tenant's registration request unique identifier and adjusts the lease terms based on the credit score. If the credit score is greater than 120 points, preferential terms are offered (for example, a 10% reduction in the first month's rent); if the credit score is between 80 and 120 points, standard terms are offered (no discounts or additional fees); if the credit score is less than 80 points, a deposit clause is added (for example, a deposit of two months' rent).
[0114] Call the Hyperledger Fabric network, connect to the "lease-channel" channel through the Fabric SDK, trigger the chain code, and enter the tenant registration request unique identifier, property ID, landlord registration unique identifier, and lease terms as contract data; the landlord registration unique identifier is generated when the landlord registers;
[0115] Deploy chaincode in the Hyperledger Fabric network to define the terms and generation logic of the electronic contract;
[0116] The platform server calls the chain code and inputs the contract data;
[0117] The chain code verifies the validity of the contract data, generates an electronic contract draft, and forms a transaction proposal;
[0118] The endorsing node verifies the transaction proposal using the endorsement policy and generates an endorsement signature.
[0119] After collecting the endorsement signatures, the platform server submits the transaction proposal and endorsement signatures to the sorting service;
[0120] The sorting service packages the transaction proposals into blocks, which contain the draft electronic contract data and are temporarily stored in the Fabric ledger.
[0121] The peer nodes of the Hyperledger Fabric network validate the blocks and record the draft electronic contract into the Fabric ledger;
[0122] The chaincode returns the draft electronic contract to the platform server;
[0123] Submitting transaction proposals, endorsing signatures, and packaging blocks are the transaction processes of the Hyperledger Fabric network. Chaincode is a smart contract in the Hyperledger Fabric network, a program written by developers that runs on peer nodes in the Hyperledger Fabric network and is developed based on the Hyperledger Fabric blockchain platform.
[0124] Convert the draft electronic contract into a byte stream through the cryptography library, initialize the SHA-256 algorithm, process the byte stream block by block, generate the contract hash, upload the draft electronic contract to the IPFS network, and obtain the IPFS content identifier;
[0125] Record the IPFS content identifier and contract hash to the Fabric ledger, call the chain code "lease-contract" through the Fabric SDK, enter the contract number, tenant registration request unique identifier, landlord registration unique identifier, IPFS content identifier, contract hash, submit the transaction proposal to the peer node, collect endorsement responses, and then package the blocks through the sorting service and broadcast them to the channel "lease-channel" node, update the Fabric ledger state database (storing the latest contract data) and blockchain (recording transaction history), and confirm that the contract record is successful;
[0126] Generate a tenant signing request based on the tenant registration request unique identifier, property ID, contract ID, IPFS content identifier, contract hash, and language selection, and send the tenant signing request to the platform application via the HTTPS protocol;
[0127] The platform application receives the tenant's signing request, downloads the electronic contract draft from the IPFS network, renders the signing interface, and adapts the interface text to the language selection;
[0128] The platform application calls the mobile phone encryption library (implemented through the WebCrypto API), loads the tenant's ECDSA private key from the mobile phone's secure storage, extracts the IPFS content identifier from the tenant's signing request, downloads the electronic contract draft (JSON format) through the IPFS API, parses the JSON into a byte stream, recalculates the SHA-256 hash, and compares it byte by byte with the contract hash in the tenant's signing request to verify consistency; if the contract hash is inconsistent, the tenant is notified that "contract verification failed, please try again" and the process is terminated; if the contract hash is consistent, the ECDSA-SHA256 signature function is called to generate a random number k (256 bits), calculate the signature point (r, s) based on the secp256k1 curve, output the digital signature (64 bytes, r and s 32 bytes each, hexadecimal encoding), and generate the tenant signature data (including the signature, the tenant registration request unique identifier, and the contract number);
[0129] Upload the tenant signature data and contract number to the platform server via HTTPS protocol;
[0130] The platform server verifies the tenant's digital signature and uses the tenant's ECDSA public key to check the validity of the signature. If the signature is valid, a landlord signing request is generated and the process continues. If the signature is invalid, the platform application is notified and a message "Tenant signature is invalid, please try again" is displayed.
[0131] Send the landlord's signing request to the landlord's platform application via the HTTPS protocol;
[0132] The landlord's platform application receives the landlord's signing request, downloads the electronic contract draft from the IPFS network, displays the contract terms and the tenant's signature, and the landlord clicks "Confirm Signing" on the touch screen, calling the encryption library to generate the landlord's ECDSA digital signature and generate the landlord's signature data (including the signature and the landlord's registered unique identifier);
[0133] The landlord's digital signature is verified using the landlord's ECDSA public key (generated when the landlord registered). If the signature is valid, the tenant and landlord's digital signatures are embedded in the draft electronic contract to generate the final lease contract. The platform server uploads the final lease contract to IPFS, obtains a new IPFS content identifier, and updates the Hyperledger Fabric network (recording the final contract hash and IPFS content identifier).
[0134] Store the contract record in the SQLite database and generate the contract result;
[0135] Push the contract signing results to the tenant's platform application and the landlord's platform application via the HTTPS protocol;
[0136] It should be noted that the Fabric ledger is part of the Hyperledger Fabric network, which specifically carries the storage and verification functions of electronic contract-related data.
[0137] This embodiment also provides an apartment rental management system, including:
[0138] The credit module verifies the tenant's identity through facial recognition and liveness detection, generates facial feature vectors using the ResNet-50 model, encrypts the identity information and facial feature vectors using the ChaCha20-Poly1305 algorithm to generate encrypted identity data, and generates a credit score identifier and initial credit score using the SHA-256 algorithm.
[0139] The query module is used to process the credit score identifier based on the federated learning framework to generate an anonymous credit query token, use differential privacy to protect historical rental behavior data, update the credit score based on historical rental behavior data, and generate a list of recommended properties;
[0140] The verification module is used to perform geo-fence verification of the target property through multi-modal positioning using GPS, Wi-Fi, and Bluetooth, and compare the facial feature vector with the real-time facial feature vector through cosine similarity to perform identity confirmation and generate a rental verification result;
[0141] The contract module is used to generate electronic contract drafts using the Hyperledger Fabric network and chaincode, store the electronic contract drafts in IPFS, and complete the decentralized signing between tenants and landlords through ECDSA digital signatures.
[0142] This embodiment also provides a computer device suitable for the apartment rental management method, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute computer-executable instructions to implement the apartment rental management method proposed in the above embodiment.
[0143] The computer device may be a terminal, comprising a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a button, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse.
[0144] This embodiment also provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the apartment rental management method proposed in the above embodiment; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0145] In summary, the present invention builds a full-link biometric protection system by integrating the ResNet-50 model with the ChaCha20-Poly1305 dynamic encryption mechanism. The device-bound random seed is generated by using the mobile phone hardware entropy source, and the encryption key and Nonce value are dynamically derived by combining the pseudo-random sequence, so that the key has temporal and spatial uniqueness. At the same time, the ciphertext integrity verification is realized through the Poly1305 algorithm, which effectively resists man-in-the-middle attacks. In the credit assessment link, the credit score identifier is nonlinearly mapped based on the federated learning framework to generate an anonymous query token, blocking the cooperative platform from reversely inferring the user's identity; differential privacy is used to perturb the rental behavior data to achieve a balance between individual privacy protection and data availability.
[0146] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for apartment rental management, characterized by: include, The tenant's identity information is verified through face recognition and liveness detection. The facial feature vector is generated using the ResNet-50 model. The identity information and facial feature vector are encrypted using the ChaCha20-Poly1305 algorithm to generate encrypted identity data. The credit score identifier and initial credit score are generated using the SHA-256 algorithm. Based on the federated learning framework, the credit score identifier is processed to generate an anonymous credit query token. The historical rental behavior data is protected using differential privacy methods. The credit score is updated based on the historical rental behavior data to generate a list of recommended properties. Geofence verification of the target property is performed using multimodal positioning using GPS, Wi-Fi, and Bluetooth. Facial feature vectors are compared with real-time facial feature vectors using cosine similarity to perform identity confirmation and generate rental verification results. The electronic contract draft is generated using the Hyperledger Fabric network and chain code, stored in IPFS, and the decentralized signing between the tenant and the landlord is completed through ECDSA digital signature.
2. The apartment rental management method according to claim 1, wherein: The ChaCha20-Poly1305 algorithm is a combination of the ChaCha20 algorithm and the Poly1305 algorithm; The ChaCha20 algorithm encodes identity information and facial feature vectors into a plaintext stream, initializes the ChaCha20 algorithm state based on the tenant encryption key sequence and the Nonce random sequence, generates a key stream by changing the number of rounds, and uses the key stream to XOR encrypt the plaintext stream byte by byte to generate ciphertext; The Poly1305 algorithm uses ciphertext, tenant encryption key sequence, and Nonce random sequence as inputs to the cryptographic library, derives the Poly1305 one-time key, processes the ciphertext block by block based on the one-time key to calculate the authentication code and generate the authentication tag; The tenant encryption key sequence and Nonce random sequence are two sets of pseudo-random sequences generated by collecting physical noise data from the mobile phone hardware entropy source, performing SHA-256 hash to generate a random seed, and then using a pseudo-random number generator based on the random seed.
3. The apartment rental management method according to claim 2, wherein: The encrypted data is obtained by combining the ciphertext with the authentication tag after the ciphertext is generated by the ChaCha20 algorithm and the authentication tag is generated by the Poly1305 algorithm.
4. The apartment rental management method according to claim 1, wherein: The generation of the credit score identifier and the initial credit score by the SHA-256 algorithm refers to performing a hash operation on the identity information and the facial feature vector to generate the credit score identifier, and generating the initial credit score based on the credit score identifier.
5. The apartment rental management method according to claim 1, wherein: Processing the credit score identifier based on the joint learning framework to generate an anonymous credit query token refers to collaboratively training a fully connected neural network model through multiple nodes, encoding the credit score identifier into a byte sequence using the SHA-256 algorithm to generate an intermediate representation, collaboratively processing the intermediate representation with two fully connected layers to generate a compressed feature vector, and converting the compressed feature vector into an anonymous credit query token at an output layer; The use of differential privacy methods to protect historical rental behavior data refers to the cooperative platform querying historical rental behavior data based on anonymous credit query tokens, obtaining statistical results of the number of contract signings and renewal rates, and adding random noise to the statistical results through differential privacy methods.
6. The apartment rental management method according to claim 1, wherein: Comparing the facial feature vector and the real-time facial feature vector by cosine similarity refers to extracting the stored facial feature vector, collecting the real-time facial image and generating the real-time facial feature vector, calculating the similarity between the facial feature vector and the real-time facial feature vector by the cosine similarity algorithm, setting a similarity threshold, and determining whether the identities match.
7. The apartment rental management method according to claim 1, wherein: The specific steps of using Hyperledger Fabric network and chain code to generate electronic contract draft are as follows: Deploy chaincode in the Hyperledger Fabric network to define the terms and generation logic of the electronic contract; The client application calls the chaincode and inputs the contract data; The chain code generates an electronic contract draft based on the input contract data and forms a transaction proposal; The endorsing node verifies the transaction proposal using the endorsement policy and generates an endorsement signature. The client submits the transaction proposal and endorsement signature to the sorting service; The sorting service packages the transaction proposals into blocks, and peer nodes in the Hyperledger Fabric network verify the blocks and record the draft electronic contract to the Fabric ledger.
8. An apartment rental management system, based on the apartment rental management method according to any one of claims 1 to 7, characterized in that: include, The credit module verifies the tenant's identity through facial recognition and liveness detection, generates facial feature vectors using the ResNet-50 model, encrypts the identity information and facial feature vectors using the ChaCha20-Poly1305 algorithm to generate encrypted identity data, and generates a credit score identifier and initial credit score using the SHA-256 algorithm. The query module is used to process the credit score identifier based on the federated learning framework to generate an anonymous credit query token, use differential privacy to protect historical rental behavior data, update the credit score based on historical rental behavior data, and generate a list of recommended properties; The verification module is used to perform geo-fence verification of the target property through multi-modal positioning using GPS, Wi-Fi, and Bluetooth, and compare the facial feature vector with the real-time facial feature vector through cosine similarity to perform identity confirmation and generate a rental verification result; The contract module is used to generate electronic contract drafts using the Hyperledger Fabric network and chaincode, store the electronic contract drafts in IPFS, and complete the decentralized signing between tenants and landlords through ECDSA digital signatures.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the apartment rental management method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the apartment rental management method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Biometric-integrated coin
US12639700B2