Multi-scene code scanning intelligent control method and system
By generating dynamically encrypted QR codes and implementing dual verification, combined with asymmetric and symmetric encryption algorithms, the problems of easy QR code theft and device malfunction in QR code control are solved, achieving efficient and secure QR code control in multiple scenarios.
Patent Information
- Application Number
- CN202611147209.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-30
- Publication Date
- 2026-11-06
AI Technical Summary
Existing QR code control technologies suffer from several problems, including fixed QR codes being easily stolen, encryption algorithms being unable to adapt to high-security scenarios, lack of environmental data verification, inability to generate customized control commands, and device malfunction due to cloud communication interruptions, all of which affect security and efficiency.
By generating scene-specific QR codes containing dynamically encrypted fields, combining biometric and environmental perception data for dual verification, employing asymmetric and symmetric encryption algorithms, generating customized control commands based on scene type, and activating local emergency control mode when cloud communication is interrupted.
It effectively avoids the risk of QR code theft, improves protection strength and efficiency, ensures that device responses are prioritized, optimizes user experience and enhances security, and provides a fast verification channel and emergency control mechanism.
Smart Images

Figure CN123050466A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a barcode scanning control method, and more specifically, to a multi-scenario intelligent barcode scanning control method and system. Background Technology
[0002] In today's era of rapid digital and intelligent development, QR code scanning has become an important interaction method connecting users with various scenarios and devices due to its convenience and efficiency. It can quickly meet diverse needs such as device control and information acquisition, and is widely used in various scenarios such as homes, scenic spots, factories, and banks. Whether it is remote control of smart home appliances in home scenarios, ticket verification and tour guide services in scenic spots, start and stop management of production equipment in factories, or security authentication and business processing in banking scenarios, QR code interaction has been integrated into daily life with its advantages of low threshold and high efficiency. Current QR code-based intelligent control technologies generate fixed QR codes, which users scan to complete simple identity verification or issue commands. These technologies often employ a uniform encryption algorithm to address different security levels, and the verification process typically focuses only on identity information matching. Furthermore, once generated, the QR code remains valid indefinitely, lacking dynamic updates. Identity verification is also largely limited to basic levels like account passwords and simple fingerprint comparisons, neglecting the correlation between ambient light intensity, geographical location, network environment, and operational security. Moreover, the same encryption logic is used in scenarios ranging from high-security bank transfers and factory equipment control to ordinary scenarios like park entry and home appliance control. Additionally, there is a lack of systematic credit assessment of users' historical activity and a lack of robust emergency response mechanisms. In summary, current QR code control technologies suffer from several drawbacks. Firstly, fixed QR codes are easily copied and misused, allowing malicious actors to forge QR codes and steal identity verification information, leading to security risks such as device malfunction and information leakage. Secondly, a single encryption algorithm cannot meet the protection requirements of high-security scenarios, particularly sensitive areas such as core production equipment in factories and banking financial data. In some scenarios, insufficient encryption strength can easily lead to security vulnerabilities, while the process is too cumbersome for ordinary scenarios, affecting efficiency. Furthermore, the lack of environmental data verification makes it unable to identify suspicious operations such as scanning codes in different locations or under abnormal lighting conditions, resulting in insufficient security. On the other hand, it cannot generate customized control commands based on scenario type and user operating habits, leading to insufficient usability of the control commands. It also cannot optimize the verification process based on user history; users with consistently compliant operations still need to repeat cumbersome verification steps, while users with abnormal operation records lack targeted risk management measures, resulting in poor flexibility and adaptability. Moreover, it is prone to control failure when cloud communication is interrupted; once there is a network failure or cloud server malfunction, the scenario terminal cannot receive control commands, affecting normal device operation. The handling of verification failures is also too simple, merely indicating failure without specifying the reason for the failure, and without setting reasonable permission restrictions and fault tolerance mechanisms. After multiple verification failures, there is a lack of effective risk interception methods. Additionally, no secondary verification channel is designed for situations with small biometric matching deviations, affecting both user experience and security risks, resulting in poor overall stability.
[0003] Therefore, those skilled in the art are dedicated to providing a multi-scenario intelligent control method and system for barcode scanning that can solve the above-mentioned technical problems. Summary of the Invention
[0004] In view of this, embodiments of this specification provide a multi-scenario intelligent control method for barcode scanning. One or more embodiments of this specification also relate to a multi-scenario intelligent control system for barcode scanning, a computing device, a computer-readable storage medium, and a computer program, to address the technical deficiencies existing in the prior art.
[0005] According to a first aspect of the embodiments of this specification, a multi-scenario intelligent control method for barcode scanning is provided, comprising the following steps: The cloud server receives scene attribute information uploaded by the scene terminal, and generates a scene-specific QR code containing dynamically encrypted fields based on the scene attribute information. The dynamically encrypted fields are updated in real time with scene environment parameters. Users scan the scene-specific QR code through their mobile terminals. The mobile terminals simultaneously collect the user's biometric information and current environmental perception data. The biometric information includes at least a combination of fingerprint and facial feature data, and the environmental perception data includes light intensity, geographical location, and network environment parameters. The cloud server receives QR code parsing data, biometric information and environmental perception data uploaded by the mobile terminal. First, it verifies the timeliness and integrity of the QR code through dynamically encrypted fields. Then, it calls the corresponding multimodal verification model based on the scene type to match the biometric information with the preset authorization library. At the same time, it verifies whether the environmental perception data meets the scene security threshold requirements to complete identity and scene verification. If the dual verification passes, the cloud server generates customized control instructions based on the scenario type, device control permission level, and user's historical operation preferences. The control instructions include device operation parameters and execution time limits. The scenario terminal receives the control instructions and executes the corresponding operations, synchronously collecting device operating status data and feeding it back to the cloud server. The cloud server then pushes the execution results to the mobile terminal. If the dual verification fails, the cloud server terminates the control command generation process and simultaneously pushes a verification failure message to the mobile terminal.
[0006] In one possible implementation, the scene attribute information includes scene type, device control permission level, environmental security threshold, device association list, operation priority sorting, encryption algorithm identifier, and key update strategy, wherein high-security-level scenes correspond to asymmetric encryption algorithms, and ordinary scenes correspond to symmetric encryption algorithms; the high-security-level scenes include scenes such as factories and banks, and the ordinary scenes include scenic spots and home scenes; The customized control commands are assigned to the device response order according to the operation priority. During the response process, the device execution progress is fed back in real time. If a high-priority device fails to execute, the execution pause mechanism of the low-priority device is automatically triggered, and an abnormal alarm is pushed to the mobile terminal and the scene management terminal simultaneously. The key update strategy clearly stipulates that when the dynamically encrypted field is updated, the network stability and data transmission integrity of the scene terminal must be verified. When the network is interrupted, a local cache encryption key temporary effect mechanism is triggered, and the cache time does not exceed 5 minutes. After the network is restored, the latest key is automatically synchronized to the cloud.
[0007] In one possible implementation, the asymmetric encryption algorithm includes: The scene terminal collects temperature, humidity, and equipment load in real time. The scene factor is S, and the expression for S is as follows: in , , ; In the formula Represents the scene factor, with a range of values. ; This indicates the temperature collected by the scene terminal; This indicates the humidity collected by the scene terminal; This indicates the device load collected by the scene terminal; Cloud servers are based on Build Vig ; Lattice basis matrix The elements of the lattice basis matrix are , The expression is as follows: In the formula Represents the lattice basis matrix of the first Line number Column elements; Indicates generation A function for generating random numbers within a range; This represents the modulo operation; This indicates the floor function; Represents the scene factor; Indicates the dimension of a lattice; , Represents the row and column numbers of the lattice basis matrix, with values ranging from 1 to 2. to ; Generate a key pair, private key For grid Shortest basis vector set The LLL algorithm is improved and scene parameter constraints are incorporated; public key ,in This is a snapshot of the scene factors corresponding to the current timestamp; Convert plaintext control commands into vectors The ciphertext is , The expression is as follows: In the formula Represents the ciphertext vector; This represents a vector after plaintext conversion; Represents the basis matrix; This represents the error vector, whose elements take values of... ; Indicates A diagonal matrix with diagonal elements; Represents the scene factor; The recipient uses the private key Restore plaintext vector , The expression is as follows: In the formula Represents a plaintext vector; This indicates the rounding operation; Represents the ciphertext vector; Represents the error vector; Indicates A diagonal matrix with diagonal elements; Representing the basis matrix The inverse matrix; Represents the scene factor. Will Convert to plaintext If decryption fails, the QR code verification is deemed invalid. Assuming the scene terminal collects , , ,but: Lattice matrix dimension Subsequent encryption and decryption processes are all performed based on the lattice structure corresponding to the scene factor.
[0008] In one possible implementation, the symmetric encryption algorithm includes: Mobile terminal collects light intensity Geographical location (longitude) ,in The key seed is , The expression is as follows: In the formula This represents the key seed, a 256-bit hash value. express Hash function; This indicates the floor function; This indicates the light intensity collected by the mobile terminal; Indicates the longitude of the geographical location collected by the mobile terminal; Combined with the 30-60 second key update, the real-time session key is , The expression is as follows: In the formula Indicates the real-time session key; Represents the AES key expansion function; Indicates the key seed; Represents the XOR operation; Indicates the current timestamp; This indicates rounding operations; Indicates light intensity; This represents the key expansion round number adjustment factor, with a value range of [1, 10]. plaintext Converted to a byte string using UTF-8 encoding, the ciphertext is... bytes , The expression is as follows: In the formula Indicates the ciphertext number byte; Indicates plaintext number byte; Key The byte; Represents the XOR operation; This represents the modulo operation; Indicates light intensity; Indicates the byte sequence number; The receiver uses a key Restore plaintext bytes , The expression is as follows: In the formula Indicates plaintext bytes; Indicates the ciphertext number byte; This represents the modulo operation; Indicates light intensity; Represents the XOR operation; Key The byte; This represents the byte sequence number. During decryption, the consistency of environmental parameters is verified. If the deviation exceeds a preset threshold, the environmental data is considered to be out of range. In one possible implementation, the collection and matching of biometric information further includes: fingerprint data collection resolution of not less than 500 dpi; facial feature collection containing at least 68 key feature points; biometric summary generated using the SHA-256 algorithm and storing only summary information without retaining the original biometric data; setting a similarity threshold during matching; if the fingerprint matching similarity is not less than 95% and the facial feature matching similarity is not less than 92%, the matching is considered successful; if the similarity is lower than the threshold but higher than 85%, a second biometric collection is triggered.
[0009] In one possible implementation, a user operation credit rating system is established via the cloud server, generating a credit score of 0-100 based on the user's historical verification pass rate, device operation compliance, and frequency of abnormal operation triggers; the credit score... Users with a credit score can unlock a fast verification channel, which specifically only requires verification of fingerprint or facial features; if the user's credit score is... If a score is exceeded, a manual review process by the scene administrator will be added. Control commands can only be executed after the review is approved. After the manual review is approved, the user's credit score will be automatically increased by 1-3 points at a time, and the daily cumulative increase will not exceed 5 points. The credit score will be automatically updated at midnight every day. At the same time, the corresponding points generated by abnormal operations on the day will be deducted, and the deduction will not exceed 5 points at a time.
[0010] In one possible implementation, the scenario terminal also includes an emergency control module. When communication with the cloud server is interrupted for more than 5 minutes, a local emergency control mode is activated. In the emergency mode, the system is encrypted with a preset local key and only supports basic device start-up and shutdown operations. The operation records are cached in the scenario terminal. After the network is restored, the scenario terminal automatically synchronizes the emergency operation logs to the cloud server. After verifying the integrity of the logs, the cloud server updates the user operation records and credit rating, and resets the local emergency key.
[0011] In one possible implementation, the step of solving the problem by improving the LLL algorithm and incorporating scene parameter constraints specifically includes: Define the core constraints and objective function, with scene factor adaptability as the core constraint, and the objective function consisting of the elements of the lattice basis matrix and the scene factor. Minimize the sum of the absolute values of the deviations, i.e. In the formula Represents the lattice basis matrix of the first Line number Column elements; Represents the scene factor, with a range of values. ; Indicates the dimension of a lattice; , Represents the row and column numbers of the lattice basis matrix, with values ranging from 1 to 2. to This ensures that the grid structure is strongly bound to the current scene environment; Dynamically adjust the reduction threshold based on scenario factors. Dynamically adjust the reduction threshold of the LLL algorithm , The expression is In the formula This represents the reduction threshold of the LLL algorithm; Represents the scene factor, with a range of values. This leads to an increase in the threshold under high scene factors, making lattice basis reduction more rigorous; During the iterative adaptation process, the adaptability is verified by reducing the basis vectors in each round of the LLL algorithm iteration, and then verifying the magnitude of each vector in the shortest basis vector set against the device load. The adaptability is determined by whether the vector magnitude is greater than 1. ; In the formula This indicates the device load for data collection at the scene terminal. Range of values ; This represents the scene factor; if this condition is met, local re-reduction is triggered. Embedding timeliness verification parameters, when solving for the shortest basis vector set, embedding the scene factor snapshot corresponding to the current timestamp. ,Will As a verification parameter for the basis vector set, if the shortest basis vector set is... If the correlation is less than 90%, the algorithm iteration is re-executed.
[0012] In one possible implementation, the improvement of the LLL algorithm and the incorporation of scene parameter constraints further includes setting dual termination conditions for the iteration: the iteration stops when both of the following conditions are met simultaneously, and the final private key is output.
[0013] Condition 1: The change in the shortest basis vector set in three consecutive iterations is less than The The change refers to the average of the differences in the magnitudes of the corresponding vectors in the shortest basis vector group in adjacent iterations; Condition 2: The basis vector set satisfies , In the formula Represents the shortest basis vector set. One vector; Indicates the dimension of a lattice; Represents the scene factor; Represents the vector index, with a value range of 1. to .
[0014] According to a second aspect of the embodiments of this specification, a multi-scenario barcode scanning intelligent control system is provided, the system comprising: The scene information acquisition module is used by the scene terminal to collect scene attribute information and upload it to the cloud server. The cloud server generates a scene-specific QR code containing a dynamically encrypted field based on the scene attribute information. The dynamically encrypted field is updated in real time with the scene environment parameters. The user information collection module is used to simultaneously collect user biometric information and current environmental perception data when a user scans a scene-specific QR code through a mobile terminal. The biometric information includes at least a combination of fingerprint and facial feature data, and the environmental perception data includes light intensity, geographical location, and network environment parameters. The dual verification module is used by the cloud server to receive QR code parsing data, biometric information and environmental perception data uploaded by the mobile terminal. First, it verifies the timeliness and integrity of the QR code through dynamically encrypted fields, and then calls the multimodal verification model to match the biometric information and verify whether the environmental perception data meets the scene security threshold, thus completing the dual verification of identity and scene. The control command execution module is used to generate customized control commands containing device operation parameters and execution time limits after successful dual verification. The cloud server generates these commands based on the scenario type, device control permission level, and user's historical operation preferences. The scenario terminal receives and executes the commands, and simultaneously collects device operating status data and feeds it back to the cloud server. The cloud server then pushes the execution results to the mobile terminal. If verification fails, the control command generation process is terminated, a verification failure message and reason are pushed, the failure record is uploaded and the log is retained, and if three failures are accumulated, the mobile terminal's QR code verification permission is temporarily restricted. The encryption processing module is used to select the corresponding encryption algorithm according to the security level of the scene. In high-security scenes, an asymmetric encryption algorithm is used, which generates key pairs based on the lattice structure constructed by scene factors and performs encryption and decryption operations. In ordinary scenes, a symmetric encryption algorithm is used, which generates key seeds and real-time session keys based on light intensity and geographical longitude to complete data encryption and decryption. The credit rating module is used by the cloud server to establish a credit rating system for user operations. It generates a credit score of 0-100 based on the user's historical verification pass rate, device operation compliance, and frequency of abnormal operation triggers. Based on the credit score, it configures a fast verification channel or adds a manual review process for the user and updates the credit score daily. The emergency control module is used to enable the local emergency control mode of the scene terminal when the communication with the cloud server is interrupted for more than 5 minutes. It supports the start and stop operations of basic equipment and caches operation records through preset local key encryption. After the network is restored, the emergency operation log is synchronized to the cloud server. After verification, the cloud server updates the user operation records and credit rating and resets the local emergency key.
[0015] As described above, the present invention provides a multi-scenario intelligent control method and system for barcode scanning, which has the following beneficial effects: On the one hand, this invention effectively avoids the risk of fixed QR code theft by dynamically encrypting fields and updating scene environment parameters in real time; at the same time, it adopts asymmetric and symmetric encryption algorithms according to different scenarios, effectively improving protection strength and usage efficiency, and avoids abnormal operation through dual verification of biometrics and environmental data; on the other hand, this invention generates customized control commands according to scene type and user preferences, and the device response is sorted by priority and provides real-time progress feedback; the credit rating system provides a fast verification channel for high-credit users and adds manual review for low-credit users, optimizing the user experience for high-credit users and improving adaptability and usability; furthermore, local emergency control is automatically activated after a 5-minute disconnection from the cloud; the reasons for verification failure are clearly identified, and a mechanism for limiting permissions after multiple failures and collecting secondary biometrics is set, which not only improves security but also makes it more convenient for users. Attached Figure Description
[0016] Fig. 1 This is a schematic block diagram illustrating the overall process of intelligent control for multi-scenario barcode scanning in this invention.
[0017] Fig. 2 This is a schematic block diagram of the multi-scenario barcode scanning intelligent control system in this invention.
[0018] Fig. 3 This is a schematic diagram of the encryption algorithm selection logic in this invention. Detailed Implementation
[0019] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0020] like Figs. 1 to 3 As shown, a multi-scenario intelligent control method for barcode scanning includes the following steps: The cloud server receives scene attribute information uploaded by the scene terminal, and generates a scene-specific QR code containing dynamically encrypted fields based on the scene attribute information. The dynamically encrypted fields are updated in real time with the scene environment parameters.
[0021] Users scan a scene-specific QR code with their mobile devices. The mobile devices simultaneously collect the user's biometric information and current environmental perception data. The biometric information includes at least a combination of fingerprint and facial features, and the environmental perception data includes light intensity, geographical location, and network environment parameters.
[0022] The cloud server receives QR code parsing data, biometric information, and environmental perception data uploaded by the mobile terminal. First, it verifies the timeliness and integrity of the QR code through dynamically encrypted fields. Then, based on the scene type, it calls the corresponding multimodal verification model to match the biometric information with the preset authorization library. At the same time, it verifies whether the environmental perception data meets the scene security threshold requirements, thus completing identity and scene verification.
[0023] If the dual verification passes, the cloud server generates customized control instructions based on the scenario type, device control permission level, and user's historical operation preferences. The control instructions include device operation parameters and execution time limits. The scenario terminal receives the control instructions and executes the corresponding operations, synchronously collecting device operating status data and feeding it back to the cloud server. The cloud server then pushes the execution results to the mobile terminal.
[0024] If the dual verification fails, the cloud server will terminate the control command generation process and simultaneously push a verification failure message to the mobile terminal. The reason for the verification failure can be clearly marked, such as biometric mismatch, environmental data exceeding the limit, QR code invalidation, etc., and the verification failure record will be uploaded to the scene management terminal to retain the verification log, including the collected biometric summary, environmental data, and verification timestamp. If the verification fails 3 times in 1 hour, the cloud server will temporarily restrict the mobile terminal's QR code verification permission for the current scene for 2-4 hours. During this period, it is necessary to unlock it through the scene management terminal or wait for the restriction period to end and try again.
[0025] Scene attribute information includes scene type, device control permission level, environmental security threshold, device association list, operation priority sorting, encryption algorithm identifier and key update strategy. High-security level scenes correspond to asymmetric encryption algorithms, while ordinary scenes correspond to symmetric encryption algorithms. High-security level scenes include factory and bank scenes, while ordinary scenes include scenic spots and home scenes.
[0026] Customized control commands are assigned to devices according to their operation priorities. During the response process, the execution progress of the devices is fed back in real time. If a high-priority device fails to execute, the execution of low-priority devices is automatically paused, and an error alarm is pushed to the mobile terminal and the scene management terminal simultaneously. The key update strategy clearly states that when updating dynamically encrypted fields, the network stability and data transmission integrity of the scene terminal must be verified. When the network is interrupted, a local cache encryption key temporary activation mechanism is triggered, with a caching time not exceeding 5 minutes. After the network is restored, the latest key is automatically synchronized to the cloud.
[0027] The asymmetric encryption algorithm includes: real-time collection of temperature, humidity, and device load by the scene terminal, with scene factor S, and the expression for S is as follows: ;in , , In the formula Represents the scene factor, with a range of values. ; This indicates the temperature collected by the scene terminal; This indicates the humidity collected by the scene terminal; This indicates the device load collected by the scene terminal; the cloud server is based on... Build Vig ; Lattice basis matrix The elements of the lattice basis matrix are , The expression is as follows: In the formula Represents the lattice basis matrix of the first Line number Column elements; Indicates generation A function for generating random numbers within a range; This represents the modulo operation; This indicates the floor function; Represents the scene factor; Indicates the dimension of a lattice; , Represents the row and column numbers of the lattice basis matrix, with values ranging from 1 to 2. to ; Generate a key pair, private key For grid Shortest basis vector set The LLL algorithm is improved and scene parameter constraints are incorporated; public key ,in This is a snapshot of the scene factors corresponding to the current timestamp; Convert plaintext control commands into vectors The ciphertext is , The expression is as follows: In the formula Represents the ciphertext vector; This represents a vector after plaintext conversion; Represents the basis matrix; This represents the error vector, whose elements take values of... ; Indicates A diagonal matrix with diagonal elements; Represents the scene factor; The recipient uses the private key Restore plaintext vector , The expression is as follows: In the formula Represents a plaintext vector; This indicates the rounding operation; Represents the ciphertext vector; Represents the error vector; Indicates A diagonal matrix with diagonal elements; Representing the basis matrix The inverse matrix; Representing the scene factor, Convert to plaintext If decryption fails, the QR code verification is deemed invalid. Assuming the scene terminal collects , , ,but: Dimension of the lattice basis matrix Subsequent encryption and decryption processes are all performed based on the lattice structure corresponding to the scene factor.
[0028] The symmetric encryption algorithm includes: mobile terminal collecting light intensity. Geographical location (longitude) ,in The key seed is , The expression is as follows: In the formula This represents the key seed, a 256-bit hash value. express Hash function; This indicates the floor function; This indicates the light intensity collected by the mobile terminal; This indicates the longitude and geographic location collected by the mobile terminal; combined with the 30-60 second key update, the real-time session key is... , The expression is as follows: In the formula Indicates the real-time session key; Represents the AES key expansion function; Indicates the key seed; Represents the XOR operation; Indicates the current timestamp; This indicates rounding operations; Indicates light intensity; This represents the key expansion round number adjustment factor, with a value range of [1, 10]. plaintext Converted to a byte string using UTF-8 encoding, the ciphertext is... bytes , The expression is as follows: In the formula Indicates the ciphertext number byte; Indicates plaintext number byte; Key The byte; Represents the XOR operation; This represents the modulo operation; Indicates light intensity; Indicates the byte sequence number; The receiver uses a key Restore plaintext bytes , The expression is as follows: In the formula Indicates plaintext bytes; Indicates the ciphertext number byte; This represents the modulo operation; Indicates light intensity; Represents the XOR operation; Key The byte; This represents the byte sequence number. During decryption, the consistency of environmental parameters is verified. If the deviation exceeds a preset threshold, the environmental data is deemed to be out of range.
[0029] The collection and matching of biometric information also includes: fingerprint data collection resolution of no less than 500 dpi, facial feature collection containing at least 68 key feature points, biometric summary generated using the SHA-256 algorithm and storing only summary information without retaining the original biometric data; during matching, a similarity threshold is set, and a match is considered successful if the fingerprint matching similarity is no less than 95% and the facial feature matching similarity is no less than 92%; if the similarity is lower than the threshold but higher than 85%, a second biometric collection is triggered.
[0030] The cloud server establishes a user operation credit rating system, generating a credit score from 0 to 100 based on the user's historical verification pass rate, device operation compliance, and frequency of abnormal operation triggers; credit score Users with a high credit score can unlock a fast verification channel, which requires only fingerprint or facial verification; if the user's credit score is high... If a score is exceeded, a manual review process by the scene administrator will be added. Control commands can only be executed after the review is approved. After the manual review is approved, the user's credit score will be automatically increased by 1-3 points at a time, and the daily cumulative increase will not exceed 5 points. The credit score will be automatically updated at midnight every day. At the same time, the corresponding points generated by abnormal operations on the day will be deducted, and the deduction will not exceed 5 points at a time.
[0031] The scenario terminal also includes an emergency control module. When the cloud server communication is interrupted for more than 5 minutes, the local emergency control mode is activated. In the emergency mode, the system is encrypted with a preset local key and only supports the start and stop of basic equipment. The operation records are cached in the scenario terminal. After the network is restored, the scenario terminal automatically synchronizes the emergency operation log to the cloud server. After the cloud server verifies the integrity of the log, it updates the user operation records and credit rating, and resets the local emergency key.
[0032] The improvement of the LLL algorithm by incorporating scene parameter constraints specifically includes: setting core constraints and an objective function, with scene factor adaptability as the core constraint, and the objective function being to minimize the sum of the absolute values of the deviations between the elements of the lattice basis matrix and the scene factor S / 2, i.e. In the formula Represents the lattice basis matrix of the first Line number Column elements; Represents the scene factor, with a range of values. ; Indicates the dimension of a lattice; , Represents the row and column numbers of the lattice basis matrix, with values ranging from 1 to 2. to This ensures the lattice structure is strongly bound to the current scene environment; the reduction threshold is dynamically adjusted based on scene factors. Dynamically adjust the reduction threshold of the LLL algorithm , The expression is In the formula This represents the reduction threshold of the LLL algorithm; Represents the scene factor, with a range of values. This leads to an increase in the threshold under high scene factors, making lattice basis reduction more rigorous; During the iterative adaptation process, the adaptability is verified by reducing the basis vectors in each round of the LLL algorithm iteration, and then verifying the magnitude of each vector in the shortest basis vector set against the device load. The adaptability is determined by whether the vector magnitude is greater than 1. In the formula This indicates the device load collected by the scene terminal, with a value range of... ; This represents the scene factor; if this condition is met, local re-reduction is triggered. Embedding timeliness verification parameters, when solving for the shortest basis vector set, embedding the scene factor snapshot corresponding to the current timestamp. ,Will As a verification parameter for the basis vector set, if the shortest basis vector set is... If the correlation is less than 90%, the algorithm iteration is re-executed.
[0033] The improved LLL algorithm, incorporating scenario parameter constraints, specifically includes setting dual termination conditions: iteration stops when both of the following conditions are met, and the final private key is output. Condition 1: The change in the shortest basis vector set in three consecutive iterations is less than... The The scene factor is represented by the change, which refers to the average difference in the magnitude of the corresponding vectors in the shortest basis vector set in adjacent iterations; Condition 2: The basis vector set satisfies In the formula Represents the shortest basis vector set. One vector; Indicates the dimension of a lattice; Represents the scene factor; Represents the vector index, with a value range of 1. to .
[0034] A multi-scenario barcode scanning intelligent control system, the system comprising: The scene information acquisition module is used by the scene terminal to collect scene attribute information and upload it to the cloud server. The cloud server generates a scene-specific QR code with dynamically encrypted fields based on the scene attribute information. The dynamically encrypted fields are updated in real time with the scene environment parameters.
[0035] The user information collection module is used to collect user biometric information and current environmental perception data simultaneously when a user scans a scene-specific QR code through a mobile terminal. The biometric information includes at least a combination of fingerprint and facial features, and the environmental perception data includes light intensity, geographical location, and network environment parameters.
[0036] The dual verification module is used by the cloud server to receive QR code parsing data, biometric information and environmental perception data uploaded by the mobile terminal. First, it verifies the timeliness and integrity of the QR code through dynamically encrypted fields, and then calls the multimodal verification model to match the biometric information and verify whether the environmental perception data meets the scene security threshold, thus completing the dual verification of identity and scene.
[0037] The control command execution module is used to generate customized control commands containing device operation parameters and execution time limits based on the scenario type, device control permission level, and user's historical operation preferences after successful dual verification. The scenario terminal receives and executes the commands, and at the same time collects device operating status data and feeds it back to the cloud server. The cloud server pushes the execution results to the mobile terminal. If the verification fails, the control command generation process is terminated, a verification failure prompt and reason are pushed, the failure record is uploaded and the log is retained, and the mobile terminal's QR code verification permission is temporarily restricted after three failures.
[0038] The encryption processing module is used to select the corresponding encryption algorithm according to the security level of the scene. In high-security scenes, an asymmetric encryption algorithm is used, which generates key pairs based on the lattice structure constructed by scene factors and performs encryption and decryption operations. In ordinary scenes, a symmetric encryption algorithm is used, which generates key seeds and real-time session keys based on light intensity and geographical location longitude to complete data encryption and decryption.
[0039] The credit rating module is used by the cloud server to establish a credit rating system for user operations. It generates a credit score of 0-100 based on the user's historical verification pass rate, device operation compliance, and frequency of abnormal operation triggers. Based on the credit score, it configures a fast verification channel or adds a manual review process for the user and updates the credit score daily.
[0040] The emergency control module is used to enable the local emergency control mode of the scene terminal when the communication with the cloud server is interrupted for more than 5 minutes. It supports the start and stop operations of basic equipment and caches operation records through preset local key encryption. After the network is restored, the emergency operation log is synchronized to the cloud server. After verification, the cloud server updates the user operation records and credit rating and resets the local emergency key.
[0041] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.
Claims
1. A multi-scenario intelligent control method for barcode scanning, characterized in that, Includes the following steps: The cloud server receives scene attribute information uploaded by the scene terminal, and generates a scene-specific QR code containing dynamically encrypted fields based on the scene attribute information. The dynamically encrypted fields are updated in real time with scene environment parameters. Users scan the scene-specific QR code through their mobile terminals. The mobile terminals simultaneously collect the user's biometric information and current environmental perception data. The biometric information includes at least a combination of fingerprint and facial feature data, and the environmental perception data includes light intensity, geographical location, and network environment parameters. The cloud server receives QR code parsing data, biometric information and environmental perception data uploaded by the mobile terminal. First, it verifies the timeliness and integrity of the QR code through dynamically encrypted fields. Then, it calls the corresponding multimodal verification model based on the scene type to match the biometric information with the preset authorization library. At the same time, it verifies whether the environmental perception data meets the scene security threshold requirements to complete identity and scene verification. If the dual verification passes, the cloud server generates customized control instructions based on the scenario type, device control permission level, and user's historical operation preferences. The control instructions include device operation parameters and execution time limits. The scenario terminal receives the control instructions and executes the corresponding operations, synchronously collecting device operating status data and feeding it back to the cloud server. The cloud server then pushes the execution results to the mobile terminal. If the dual verification fails, the cloud server terminates the control command generation process and simultaneously pushes a verification failure message to the mobile terminal.
2. The multi-scenario intelligent control method for barcode scanning according to claim 1, characterized in that, The scene attribute information includes scene type, device control permission level, environmental security threshold, device association list, operation priority sorting, encryption algorithm identifier and key update strategy. High-security-level scenes correspond to asymmetric encryption algorithms, while ordinary scenes correspond to symmetric encryption algorithms. High-security-level scenes include factory and bank scenes, while ordinary scenes include scenic spots and home scenes. The customized control commands are assigned to the device response order according to the operation priority. During the response process, the device execution progress is fed back in real time. If a high-priority device fails to execute, the execution pause mechanism of the low-priority device is automatically triggered, and an abnormal alarm is pushed to the mobile terminal and the scene management terminal simultaneously. The key update strategy clearly stipulates that when the dynamically encrypted field is updated, the network stability and data transmission integrity of the scene terminal must be verified. When the network is interrupted, a local cache encryption key temporary effect mechanism is triggered, and the cache time does not exceed 5 minutes. After the network is restored, the latest key is automatically synchronized to the cloud.
3. The multi-scenario intelligent control method for barcode scanning according to claim 2, characterized in that, The asymmetric encryption algorithm includes: The scene terminal collects temperature, humidity, and equipment load in real time. The scene factor is S, and the expression for S is as follows: in , , ; In the formula Represents the scene factor, with a range of values. ; This indicates the temperature collected by the scene terminal; This indicates the humidity collected by the scene terminal; This indicates the device load collected by the scene terminal; Cloud servers are based on Build Vig ; Lattice basis matrix The elements of the lattice basis matrix are , The expression is as follows: In the formula Represents the lattice basis matrix of the first Line number Column elements; Indicates generation A function for generating random numbers within a range; This represents the modulo operation; This indicates the floor function; Represents the scene factor; Indicates the dimension of a lattice; , Represents the row and column numbers of the lattice basis matrix, with values ranging from 1 to 2. to ; Generate a key pair, private key For grid Shortest basis vector set The LLL algorithm is improved and scene parameter constraints are incorporated; public key ,in This is a snapshot of the scene factors corresponding to the current timestamp; Convert plaintext control commands into vectors The ciphertext is , The expression is as follows: In the formula Represents the ciphertext vector; This represents a vector after plaintext conversion; Represents the basis matrix; This represents the error vector, whose elements take values of... ; Indicated by A diagonal matrix with diagonal elements; Represents the scene factor; The recipient uses the private key Restore plaintext vector , The expression is as follows: In the formula Represents a plaintext vector; This indicates the rounding operation; Represents the ciphertext vector; Represents the error vector; Indicated by A diagonal matrix with diagonal elements; Representing the basis matrix The inverse matrix; Represents the scene factor. Will Convert to plaintext If decryption fails, the QR code verification is deemed invalid. Assuming the scene terminal collects , , ,but: Lattice matrix dimension Subsequent encryption and decryption processes are all performed based on the lattice structure corresponding to the scene factor.
4. The multi-scenario intelligent control method for barcode scanning according to claim 2, characterized in that, The symmetric encryption algorithm includes: Mobile terminal collects light intensity Geographical location (longitude) ,in The key seed is , The expression is as follows: In the formula This represents the key seed, a 256-bit hash value. express Hash function; This indicates the floor function; This indicates the light intensity collected by the mobile terminal; This indicates the longitude of the geographical location collected by the mobile terminal; Combined with the 30-60 second key update, the real-time session key is , The expression is as follows: In the formula Indicates the real-time session key; Represents the AES key expansion function; Indicates the key seed; Represents the XOR operation; Indicates the current timestamp; This indicates rounding operations; Indicates light intensity; This represents the key expansion round number adjustment factor, with a value range of [1, 10]. plaintext Converted to a byte string using UTF-8 encoding, the ciphertext is... bytes , The expression is as follows: In the formula Indicates the ciphertext number byte; Indicates plaintext number byte; Key The byte; Represents the XOR operation; This represents the modulo operation; Indicates light intensity; Indicates the byte sequence number; The receiver uses a key Restore plaintext bytes , The expression is as follows: In the formula Indicates plaintext bytes; Indicates the ciphertext number byte; This represents the modulo operation; Indicates light intensity; Represents the XOR operation; Key The byte; This represents the byte sequence number. During decryption, the consistency of environmental parameters is verified. If the deviation exceeds a preset threshold, the environmental data is deemed to be out of range.
5. The multi-scenario intelligent control method for barcode scanning according to claim 4, characterized in that, The collection and matching of biometric information also includes fingerprint data collection with a resolution of not less than 500 dpi, facial feature collection including at least 68 key feature points, biometric summary generated using the SHA-256 algorithm and storing only summary information without retaining the original biometric data; during matching, a similarity threshold is set, and if the fingerprint matching similarity is not less than 95% and the facial feature matching similarity is not less than 92%, the matching is considered successful. If the similarity is lower than the threshold but higher than 85%, a second biometric collection is triggered.
6. The multi-scenario intelligent control method for barcode scanning according to claim 5, characterized in that, This also includes establishing a user operation credit rating system through the cloud server, generating a credit score of 0-100 points based on the user's historical verification pass rate, device operation compliance, and frequency of abnormal operation triggers; credit score Users with a credit score can unlock a fast verification channel, which specifically only requires verification of fingerprint or facial features; if the user's credit score is... If a score is exceeded, a manual review process by the scene administrator will be added. Control commands can only be executed after the review is approved. After the manual review is approved, the user's credit score will be automatically increased by 1-3 points at a time, and the daily cumulative increase will not exceed 5 points. The credit score will be automatically updated at midnight every day. At the same time, the corresponding points generated by abnormal operations on the day will be deducted, and the deduction will not exceed 5 points at a time.
7. The multi-scenario intelligent control method for barcode scanning according to claim 6, characterized in that, The scenario terminal also includes an emergency control module. When the cloud server communication is interrupted for more than 5 minutes, the local emergency control mode is activated. In the emergency mode, the system is encrypted with a preset local key and only supports the start and stop operations of basic equipment. The operation records are cached in the scenario terminal. After the network is restored, the terminal automatically synchronizes the emergency operation log to the cloud server. After verifying the integrity of the log, the cloud server updates the user's operation record and credit rating, and resets the local emergency key.
8. The multi-scenario intelligent control method for barcode scanning according to claim 7, characterized in that, The method of solving the LLL algorithm by incorporating scene parameter constraints specifically includes: Define the core constraints and objective function, with scene factor adaptability as the core constraint, and the objective function consisting of the elements of the lattice basis matrix and the scene factor. Minimize the sum of the absolute values of the deviations, i.e. In the formula Represents the lattice basis matrix of the first Line number Column elements; Represents the scene factor, with a range of values. ; Indicates the dimension of a lattice; , Represents the row and column numbers of the lattice basis matrix, with values ranging from 1 to 2. to This ensures that the grid structure is strongly bound to the current scene environment; Dynamically adjust the reduction threshold based on scenario factors. Dynamically adjust the reduction threshold of the LLL algorithm , The expression is In the formula This represents the reduction threshold of the LLL algorithm; Represents the scene factor, with a range of values. This leads to an increase in the threshold under high scene factors, making lattice basis reduction more rigorous; During the iterative adaptation process, the adaptability is verified by reducing the basis vectors in each round of the LLL algorithm iteration, and then verifying the magnitude of each vector in the shortest basis vector set against the device load. The adaptability is determined by whether the vector magnitude is greater than 1. ; In the formula This indicates the device load for data collection at the scene terminal. Range of values ; This represents the scene factor; if this condition is met, local re-reduction is triggered. Embedding timeliness verification parameters, when solving for the shortest basis vector set, embedding the scene factor snapshot corresponding to the current timestamp. ,Will As a verification parameter for the basis vector set, if the shortest basis vector set is... If the correlation is less than 90%, the algorithm iteration is re-executed.
9. The multi-scenario intelligent control method for barcode scanning according to claim 8, characterized in that, The improved LLL algorithm solution, incorporating scenario parameter constraints, specifically includes setting dual iteration termination conditions: iteration stops and the final private key is output when both of the following conditions are simultaneously met. Condition 1: The change in the shortest basis vector set in three consecutive iterations is less than The The change refers to the average of the differences in the magnitudes of the corresponding vectors in the shortest basis vector group in adjacent iterations; Condition 2: The basis vector set satisfies , In the formula Represents the shortest basis vector set. One vector; Indicates the dimension of a lattice; Represents the scene factor; Represents the vector index, with a value range of 1. to .
10. A multi-scenario intelligent barcode scanning control system, characterized in that, The system includes: The scene information acquisition module is used by the scene terminal to collect scene attribute information and upload it to the cloud server. The cloud server generates a scene-specific QR code containing a dynamically encrypted field based on the scene attribute information. The dynamically encrypted field is updated in real time with the scene environment parameters. The user information collection module is used to simultaneously collect user biometric information and current environmental perception data when a user scans a scene-specific QR code through a mobile terminal. The biometric information includes at least a combination of fingerprint and facial feature data, and the environmental perception data includes light intensity, geographical location, and network environment parameters. The dual verification module is used by the cloud server to receive QR code parsing data, biometric information and environmental perception data uploaded by the mobile terminal. First, it verifies the timeliness and integrity of the QR code through dynamically encrypted fields, and then calls the multimodal verification model to match the biometric information and verify whether the environmental perception data meets the scene security threshold, thus completing the dual verification of identity and scene. The control command execution module is used to generate customized control commands containing device operation parameters and execution time limits after successful dual verification. The cloud server generates these commands based on the scenario type, device control permission level, and user's historical operation preferences. The scenario terminal receives and executes the commands, and simultaneously collects device operating status data and feeds it back to the cloud server. The cloud server then pushes the execution results to the mobile terminal. If verification fails, the control command generation process is terminated, a verification failure message and reason are pushed, the failure record is uploaded and the log is retained, and if three failures are accumulated, the mobile terminal's QR code verification permission is temporarily restricted. The encryption processing module is used to select the corresponding encryption algorithm according to the security level of the scene. In high-security scenes, an asymmetric encryption algorithm is used, which generates key pairs based on the lattice structure constructed by scene factors and performs encryption and decryption operations. In ordinary scenes, a symmetric encryption algorithm is used, which generates key seeds and real-time session keys based on light intensity and geographical longitude to complete data encryption and decryption. The credit rating module is used by the cloud server to establish a credit rating system for user operations. It generates a credit score of 0-100 based on the user's historical verification pass rate, device operation compliance, and frequency of abnormal operation triggers. Based on the credit score, it configures a fast verification channel or adds a manual review process for the user and updates the credit score daily. The emergency control module is used to enable the local emergency control mode of the scene terminal when the communication with the cloud server is interrupted for more than 5 minutes. It supports the start and stop operations of basic equipment and caches operation records through preset local key encryption. After the network is restored, the emergency operation log is synchronized to the cloud server. After verification, the cloud server updates the user operation records and credit rating and resets the local emergency key.
