Goods information acquisition method and device based on two-dimensional code, and electronic equipment
By storing and performing dynamic multi-dimensional information encoding and visual steganography technology at edge nodes, the problems of high latency and insufficient security of data storage in traditional methods are solved, and fast and secure acquisition of goods information is achieved.
Patent Information
- Application Number
- CN202510431813.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-07-22
AI Technical Summary
In traditional methods, data storage in centralized servers results in high latency, low efficiency, insufficient security, inability to effectively carry complex data, and inefficient query efficiency, unable to provide fast response.
The method of obtaining goods information based on QR codes, by storing the target goods information to the edge node closest to its geographical location, dynamic multi-dimensional information encoding is performed, QR code patterns are generated, and secret keys are embedded using visual steganography technology to perform spatiotemporal verification to ensure data security and rapid acquisition.
Reduce data transmission delay, improve data access efficiency, enhance information security, improve data reading speed and response time, ensure data accuracy and prevent illegal access, and improve query response speed for large-scale data processing.
Smart Images

Figure CN120355326A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of information acquisition, and particularly relates to a method, device, and electronic device for acquiring goods information based on two-dimensional codes. Background Art
[0002] Traditional methods usually store data in a centralized server or a remote data center, resulting in data access requiring transmission through a long network path. Especially in cross-regional or cross-country cases, the latency of data transmission is relatively high, affecting the user experience. Especially in real-time data processing scenarios, the transmission speed is slow; and in traditional methods, the capacity of storing information and the transmission ability are limited. Usually, only simple goods information can be stored, and it is unable to effectively carry a large amount of complex data for application scenarios that require storing more data or more complex structured information; and traditional methods do not have an effective steganography technique to hide key information. The sensitive data stored in the two-dimensional code is usually publicly visible. If the two-dimensional code is tampered with or copied, attackers may directly access the sensitive information stored in the two-dimensional code, increasing the risk of information leakage. Traditional methods lack protection measures for keys or sensitive data, and the security is relatively low; and in traditional methods, data is usually centrally stored in a remote server or data center. The query process may require passing through a relatively large number of network hops, and the server load is large. Especially in large-scale data scenarios, the query efficiency is low, and the time for data acquisition is long, unable to provide a quick response, affecting the efficiency of big data processing and real-time query. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to overcome the above-mentioned disadvantages of the prior art and provide a method, device, and electronic device for acquiring goods information based on two-dimensional codes.
[0004] The technical solution adopted to solve the above technical problem is: A method for acquiring goods information based on two-dimensional codes, including:
[0005] Storing the target goods information into the edge node closest to its geographical location according to the geographical location of the target goods information, and the edge node generates a storage index for each stored data block
[0006] Performing dynamic multi-dimensional information encoding on the target goods information to obtain an initial two-dimensional code matrix, and generating a two-dimensional code pattern according to the initial two-dimensional code matrix and the storage index;
[0007] Embedding a preset generated secret key into the least significant bit of the two-dimensional code pattern according to the visual steganography technique;
[0008] The user terminal scans the two-dimensional code pattern through a smart device to obtain a two-dimensional code image, and performs hierarchical extraction on the two-dimensional code image to obtain explicit layer information and steganographic layer information;
[0009] Perform spatio-temporal verification on the explicit layer information and the steganographic layer information to determine whether the spatio-temporal consistency between the client and the edge node is consistent. If the spatio-temporal is inconsistent, generate spatio-temporal inconsistent exception information;
[0010] If the spatio-temporal is consistent, decrypt the storage index in the explicit layer information according to the secret key in the steganographic layer information to obtain the decrypted storage index. Initiate a parallel query request to multiple edge nodes according to the decrypted storage index, obtain a data block sequence, and obtain target cargo information according to the data block sequence.
[0011] Preferably, perform dynamic multi-dimensional information encoding on the target cargo information to obtain an initial two-dimensional code matrix, including:
[0012] Divide the target cargo information into a data block sequence, and calculate the Merkle tree root hash of each data block in the data block sequence;
[0013] Inject the dynamic parameter generated by the dynamic parameter injection technology into the data block, where the dynamic parameter is generated by combining a timestamp and a geographical location;
[0014] Perform Reed-Solomon encoding on the target cargo information in the data block sequence to obtain an error correction code for each data block in the data block sequence;
[0015] Generate an initial two-dimensional code matrix according to the data block, the dynamic parameter, and the error correction code.
[0016] Preferably, store the target cargo information to the edge node closest to its geographical location based on the geographical location of the target cargo information, including:
[0017] Minimize the geographical location difference between the data block and the edge node;
[0018] When the data block is stored to the edge node, calculate the hash value of the data block;
[0019] Create a transaction according to the hash value of the data block, and add the transaction to the consortium chain, where the blockchain transaction is used to record the unique identifier of the data block, the hash value of the data block, and the current timestamp.
[0020] Preferably, the client scans the two-dimensional code pattern through a smart device to obtain a two-dimensional code image, including:
[0021] The client scans the two-dimensional code pattern through a smart device to obtain a two-dimensional code image;
[0022] Obtain the attitude of the intelligent device according to the IMU sensor, and correct the perspective distortion of the two-dimensional code pattern according to the attitude of the intelligent device.
[0023] Preferably, perform hierarchical extraction on the two-dimensional code image to obtain the explicit layer information and the steganographic layer information, including:
[0024] Extract the explicit layer of the two-dimensional code image according to the pre-trained CNN model to obtain the explicit layer information, where the explicit layer information includes a storage index and dynamic parameters;
[0025] Extract the steganographic layer of the two-dimensional code image according to the pre-trained CNN model to obtain the steganographic layer information, where the steganographic layer information includes a secret key.
[0026] Preferably, perform spatio-temporal verification on the explicit layer information and the steganographic layer information to determine whether the spatio-temporal consistency between the user terminal and the edge node, including:
[0027] Calculate the time difference between the current time and the time stamp extracted from the explicit layer information, compare the time difference with a preset time threshold, if it is greater than the preset time threshold, it is determined that the time between the user terminal and the edge node is inconsistent;
[0028] Calculate the position difference between the current position and the geographical location extracted from the explicit layer information, compare the position difference with a preset position threshold, if it is greater than the preset position threshold, it is determined that the position between the user terminal and the edge node is inconsistent.
[0029] The technical solution adopted to solve the above technical problems is: A goods information acquisition device based on a two-dimensional code, which is applicable to the goods information acquisition method based on the two-dimensional code, including:
[0030] A storage matching unit, which is used to store the target goods information to the edge node closest to its geographical location according to the geographical location of the target goods information, and the edge node generates a storage index for each stored data block
[0031] A pattern generation unit, which is used to perform dynamic multi-dimensional information encoding on the target goods information to obtain an initial two-dimensional code matrix, and generate a two-dimensional code pattern according to the initial two-dimensional code matrix and the storage index;
[0032] A key embedding unit, which is used to embed a preset generated secret key into the least significant bit of the two-dimensional code pattern according to the visual steganography technology;
[0033] A hierarchical extraction unit, which is used for the user terminal to scan the QR code pattern through an intelligent device to obtain a QR code image, and perform hierarchical extraction on the QR code image to obtain explicit layer information and steganographic layer information;
[0034] A space-time verification unit, which is used to perform space-time verification on the explicit layer information and the steganographic layer information to determine whether the space-time between the user terminal and the edge node is consistent. If the space-time is inconsistent, space-time inconsistent exception information is generated;
[0035] An information acquisition unit, which is used to, if the space-time is consistent, decrypt the storage index in the explicit layer information according to the secret key in the steganographic layer information to obtain a decrypted storage index, initiate parallel query requests to multiple edge nodes according to the decrypted storage index, obtain a data block sequence, and obtain target cargo information according to the data block sequence.
[0036] The technical solution adopted to solve the above technical problems is: an electronic device, which is applicable to the above-mentioned method for obtaining cargo information based on a QR code, and includes: at least one processor and a memory;
[0037] The memory is used to store computer execution instructions;
[0038] The at least one processor is used to execute the computer execution instructions stored in the memory to implement the above-mentioned method for obtaining cargo information based on a QR code.
[0039] The beneficial effects of the present invention are as follows: (1) By storing the target goods information in the edge node closest to its geographical location, the present invention can reduce the latency of data transmission and improve the efficiency of data access. By storing data in an edge node closer to the user, the speed of data reading and response time can be significantly improved, optimizing the user experience. Moreover, through dynamic multi-dimensional information encoding, the density of two-dimensional code information can be increased, enabling it to carry more data. The two-dimensional code can not only store goods information but also improve the storage and transmission capabilities through effective encoding, ensuring that more complex information can be transmitted through a simple two-dimensional code; (2) By using visual steganography technology to embed the secret key into the least significant bit of the two-dimensional code, the key information can be effectively hidden. This method avoids directly exposing the key in the two-dimensional code, thereby improving the security of two-dimensional code information. Even if the two-dimensional code is tampered with or copied, the key in the steganographic layer can still provide protection, enhancing the security of information. Moreover, by performing spatio-temporal verification on the explicit layer information and steganographic layer information, the spatio-temporal consistency between the user terminal and the edge node can be effectively judged. If spatio-temporal inconsistency is found, abnormal information will be generated to prevent data from being tampered with or read at an inappropriate time. This helps to ensure the accuracy of data and prevent unauthorized access; (3) By initiating parallel query requests to multiple edge nodes through the decrypted storage index, the efficiency of data retrieval can be greatly improved, and the data acquisition time can be shortened. When multiple edge nodes work simultaneously, the query response speed is faster, especially in large-scale data processing scenarios, which has obvious advantages. Moreover, by hierarchically extracting the explicit layer and steganographic layer information of the two-dimensional code image, the visible and hidden data can be processed and verified respectively. This method not only improves the flexibility of information extraction but also effectively distinguishes important explicit data and security data (such as keys), enhancing the overall performance and security of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a schematic flowchart of the steps of the overall method in an embodiment proposed by the present invention;
[0041] Figure 2 It is a schematic diagram of the device architecture of the overall device in an embodiment proposed by the present invention;
[0042] Figure 3 It is a schematic diagram of the device architecture of an electronic device in an embodiment proposed by the present invention.
[0043] Reference numerals: 1, storage matching unit; 2, pattern generation unit; 3, key embedding unit; 4, hierarchical extraction unit; 5, spatio-temporal verification unit; 6, information acquisition unit; 7, memory; 8, processor; 9, bus. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0044] Embodiment 1, as Figure 1As shown, the method for obtaining cargo information based on two-dimensional codes proposed by the present invention includes:
[0045] S1. Store the target cargo information in the edge node closest to its geographical location according to the geographical location of the target cargo information. The edge node generates a storage index for each stored data block.
[0046] S2. Perform dynamic multi-dimensional information encoding on the target cargo information to obtain an initial two-dimensional code matrix, and generate a two-dimensional code pattern according to the initial two-dimensional code matrix and the storage index.
[0047] S3. Embed a preset generated secret key into the least significant bit of the two-dimensional code pattern according to the visual steganography technology.
[0048] S4. The user terminal scans the two-dimensional code pattern through an intelligent device to obtain a two-dimensional code image, and performs hierarchical extraction on the two-dimensional code image to obtain the explicit layer information and the steganographic layer information.
[0049] S5. Perform spatio-temporal verification on the explicit layer information and the steganographic layer information to determine whether the space-time between the user terminal and the edge node is consistent. If the space-time is inconsistent, generate a space-time inconsistent exception information.
[0050] S6. If the space-time is consistent, decrypt the storage index in the explicit layer information according to the secret key in the steganographic layer information to obtain a decrypted storage index, initiate a parallel query request to multiple edge nodes according to the decrypted storage index, obtain a data block sequence, and obtain the target cargo information according to the data block sequence.
[0051] In the present invention, the actual position coordinates of the target goods are usually provided by GPS, Radio Frequency Identification (RFID), or other positioning systems. It is used to determine the geographical location of the goods so that its information can be stored on the edge node closest to the goods location. In the edge computing architecture, an edge node refers to a computing unit or device close to the data source (such as goods). It is used to process, store, and manage data, and reduce the need to send data to a remote central server. Edge nodes help achieve low latency and fast response. Encode the information of the target goods (such as type, quantity, batch, production date, etc.) into a multi-dimensional format. Here, "multi-dimensional" means that the information may have multiple attributes (such as geographical location, time, variety, etc.), and these attributes will change with the status and environment of the goods. A two-dimensional code is a matrix pattern for storing information. The initial two-dimensional code matrix is a two-dimensional code graph generated according to the multi-dimensional information encoding of the target goods. The two-dimensional code matrix is composed of black and white modules, and each module represents a different bit of information. The two-dimensional code pattern is a visual graph generated based on the two-dimensional code matrix. It is designed as a 2D (two-dimensional) image, and the hidden or explicit information in it can be read by scanning. Visual Steganography is a technique for embedding information through an image. It uses the least significant bit (LSB) of the image to embed data into the pixel values of the image. This data is visually imperceptible but can be extracted through special techniques. The least significant bit is the lowest bit in the digital binary representation. Since the pixel data of an image is usually represented by multiple bits, the least significant bit is usually used to store secret information in steganography because it has the least impact on the visual effect of the image. The storage index is protected by encryption technology. Decryption refers to the operation of restoring the encrypted storage index using a secret key to recover its original value, thereby determining the location or content of the data block.
[0052] Embodiment 2. The method for obtaining goods information based on a two-dimensional code proposed by the present invention. Compared with Embodiment 1, this embodiment further includes: performing dynamic multi-dimensional information encoding on the target goods information to obtain an initial two-dimensional code matrix, including:
[0053] A1. Divide the target goods information into a data block sequence, and calculate the Merkle root hash of each data block in the data block sequence;
[0054] A2. Inject the dynamic parameter generated by the dynamic parameter injection technology into the data block, where the dynamic parameter is generated by combining a timestamp and a geographical location;
[0055] A3. Perform Reed-Solomon encoding on the target goods information in the data block sequence to obtain the error correction code of each data block in the data block sequence;
[0056] A4. Generate an initial QR code matrix based on data blocks, dynamic parameters, and error correction codes.
[0057] In this embodiment, the data block sequence refers to dividing all the information of the target goods into multiple small pieces (i.e., data blocks), and arranging these data blocks in a certain order to form a sequence. These data blocks can be stored and processed separately, facilitating subsequent data retrieval and operations; the Merkle tree is a binary tree structure, where each leaf node stores the hash value of a data block, and non-leaf nodes store the hash of the hash values of their child nodes. The Merkle root hash is the hash value of the top-level node of the tree, representing the unique identifier of the entire tree, which can effectively verify the integrity and consistency of the data blocks; the dynamic parameter injection technology enhances the security or uniqueness of information by adding dynamically changing parameters (such as timestamps, geographical locations, etc.) to certain data or information. It gives the data a unique identifier at a specific time and location through dynamic parameters; Reed-Solomon coding is a common error correction coding technology used to repair lost or damaged data; the error correction code refers to a set of additional data generated through coding technology for restoring the original information when data errors occur. Reed-Solomon coding is a commonly used error correction code that restores lost or damaged data blocks through redundant data blocks; the initial QR code matrix is the basic matrix of the QR code generated based on the target goods information, dynamic parameters, and error correction codes.
[0058] In an optional embodiment, storing the target goods information in the edge node closest to its geographical location based on the geographical location of the target goods information includes:
[0059] B1. Minimize the geographical location difference between the data block and the edge node;
[0060] B2. When the data block is stored in the edge node, calculate the hash value of the data block;
[0061] B3. Create a transaction based on the hash value of the data block and add the transaction to the consortium chain, where the blockchain transaction is used to record the unique identifier of the data block, the hash value of the data block, and the current timestamp.
[0062] It should be noted that a hash value is a fixed-length output value obtained by calculating input data through a hash algorithm. Hash values are unique, that is, the same input data will yield the same hash value after being calculated by the hash algorithm; different data will result in different hash values. Hash values are commonly used in scenarios such as data verification and integrity checking; in a blockchain, a transaction refers to the act of exchanging data, which records the transfer of information or the change of state. A blockchain transaction not only includes the transaction content but also information such as the initiator, recipient, and time. In this scenario, transactions are used to record the unique identifier, hash value, and timestamp of data blocks; a consortium blockchain is a blockchain network jointly maintained by multiple organizations. Different from a public blockchain, the participants in a consortium blockchain are limited and are usually jointly managed by multiple trusted parties. Consortium blockchains are suitable for scenarios of multi-party cooperation and information sharing.
[0063] In an optional embodiment, the client scans a two-dimensional code pattern through an intelligent device to obtain a two-dimensional code image, including:
[0064] C1. The client scans a two-dimensional code pattern through an intelligent device to obtain a two-dimensional code image;
[0065] C2. Obtain the attitude of the intelligent device according to the IMU sensor, and correct the perspective distortion of the two-dimensional code pattern according to the attitude of the intelligent device.
[0066] It should be noted that an intelligent device refers to a device integrated with computer technology, sensors, and communication functions, which can interact with users and perform tasks. Intelligent devices include smartphones, smart watches, smart home devices, etc.; a two-dimensional code image is a digital or visual representation of a two-dimensional code, which can be obtained by scanning with the camera of an intelligent device; an IMU sensor is a sensor used to detect the motion state of an object. It usually consists of an accelerometer, a gyroscope, and a magnetometer, and is used to measure the acceleration, angular velocity, and direction of the device. Through these data, the dynamic information of the intelligent device, such as the movement, speed, direction, and attitude of the device, can be obtained; perspective distortion is an image deformation phenomenon caused by changes in the viewing angle or incorrect camera position. The two-dimensional code pattern usually needs to face the camera directly to be correctly displayed, and any angular deviation will cause deformation of the pattern. Perspective distortion refers to the shape distortion or distortion of the two-dimensional code pattern due to different device angles.
[0067] In an optional embodiment, the two-dimensional code image is extracted in layers to obtain explicit layer information and steganographic layer information, including:
[0068] D1. Extract the explicit layer of the two-dimensional code image according to the pre-trained CNN model to obtain explicit layer information, where the explicit layer information includes a storage index and dynamic parameters;
[0069] D2. Extract the steganographic layer of the QR code image according to the pre-trained CNN model to obtain steganographic layer information, where the steganographic layer information includes a secret key.
[0070] It should be noted that the pre-trained CNN model is a deep learning model mainly used to process multi-dimensional data such as images and videos. The pre-trained CNN model refers to a model that has been trained on a large amount of data and can be used to process new image data, usually for tasks such as feature extraction and classification.
[0071] In an optional embodiment, perform spatio-temporal verification on the explicit layer information and the steganographic layer information to determine whether the space-time between the user terminal and the edge node is consistent, including:
[0072] E1. Calculate the time difference between the current time and the timestamp extracted from the explicit layer information, and compare the time difference with a preset time threshold. If it is greater than the preset time threshold, it is determined that the time between the user terminal and the edge node is inconsistent;
[0073] E2. Calculate the position difference between the current position and the geographical location extracted from the explicit layer information, and compare the position difference with a preset position threshold. If it is greater than the preset position threshold, it is determined that the position between the user terminal and the edge node is inconsistent.
[0074] Embodiment 3, as Figure 2 shown, the device for obtaining goods information based on QR codes proposed by the present invention is applicable to the method for obtaining goods information based on QR codes, and includes:
[0075] Storage matching unit 1, which is used to store the target goods information to the edge node closest to its geographical location according to the geographical location of the target goods information, and the edge node generates a storage index for each stored data block
[0076] Pattern generation unit 2, which is used to perform dynamic multi-dimensional information encoding on the target goods information to obtain an initial QR code matrix, and generate a QR code pattern according to the initial QR code matrix and the storage index;
[0077] Key embedding unit 3, which is used to embed the preset generated secret key into the least significant bit of the QR code pattern according to the visual steganography technology;
[0078] Hierarchical extraction unit 4, which is used for the user terminal to scan the QR code pattern through a smart device to obtain a QR code image, and perform hierarchical extraction on the QR code image to obtain explicit layer information and steganographic layer information;
[0079] A space-time verification unit 5 is configured to perform space-time verification on the explicit layer information and the steganographic layer information to determine whether the space-time between the user terminal and the edge node is consistent. If the space-time is inconsistent, space-time inconsistent exception information is generated.
[0080] An information acquisition unit 6 is configured to, if the space-time is consistent, decrypt the storage index in the explicit layer information according to the secret key in the steganographic layer information to obtain a decrypted storage index, initiate parallel query requests to multiple edge nodes according to the decrypted storage index, obtain a data block sequence, and obtain target cargo information according to the data block sequence.
[0081] Embodiment 4, as Figure 3 shown, the electronic device proposed by the present invention is applicable to the above-mentioned method for obtaining cargo information based on a two-dimensional code, and includes: at least one processor 8 and a memory 7;
[0082] The memory 7 is used to store computer execution instructions;
[0083] At least one processor 8 is configured to execute the computer execution instructions stored in the memory 7 to implement the method for obtaining cargo information based on a two-dimensional code.
[0084] In an optional embodiment, the memory 7 can be either independent or integrated with the processor 8. When the memory 7 is independently provided, the device further includes a bus 9 for connecting the memory 7 and the processor 8.
[0085] The embodiments of the present invention have been described in detail above in conjunction with the accompanying drawings. However, the present invention is not limited thereto. Various changes can be made without departing from the spirit of the present invention within the knowledge scope of those skilled in the art to which the present invention pertains.
Claims
1. A method for obtaining goods information based on a two-dimensional code, characterized in that Including: Storing the target cargo information to the edge node closest to its geographical location according to the geographical location of the target cargo information, and the edge node generates a storage index for each stored data block; Performing dynamic multi-dimensional information encoding on the target cargo information to obtain an initial two-dimensional code matrix, and generating a two-dimensional code pattern according to the initial two-dimensional code matrix and the storage index; Embedding a preset generated secret key into the least significant bit of the two-dimensional code pattern according to visual steganography technology; The client scans the two-dimensional code pattern through an intelligent device to obtain a two-dimensional code image, and performs hierarchical extraction on the two-dimensional code image to obtain explicit layer information and steganographic layer information; Performing spatio-temporal verification on the explicit layer information and the steganographic layer information to determine whether the space-time between the client and the edge node is consistent. If the space-time is inconsistent, spatio-temporal inconsistent exception information is generated; If the space-time is consistent, decrypt the storage index in the explicit layer information according to the secret key in the steganographic layer information to obtain a decrypted storage index, initiate a parallel query request to multiple edge nodes according to the decrypted storage index, obtain a data block sequence, and obtain the target cargo information according to the data block sequence.
2. The method for obtaining goods information based on a two-dimensional code according to claim 1, characterized in that Performing dynamic multi-dimensional information encoding on the target cargo information to obtain an initial two-dimensional code matrix, including: Dividing the target cargo information into a data block sequence, and calculating the Merkle root hash of each data block in the data block sequence; Injecting the dynamic parameter generated according to the dynamic parameter injection technology into the data block, where the dynamic parameter is generated by combining a time stamp and a geographical location; Performing Reed-Solomon encoding on the target cargo information in the data block sequence to obtain an error correction code for each data block in the data block sequence; Generating an initial two-dimensional code matrix according to the data block, the dynamic parameter, and the error correction code.
3. The method for obtaining goods information based on a two-dimensional code according to claim 2, wherein Storing the target cargo information to the edge node closest to its geographical location based on the geographical location of the target cargo information, including: Minimizing the geographical location difference between the data block and the edge node; When the data block is stored to the edge node, calculate the hash value of the data block; Create a transaction according to the hash value of the data block, and add the transaction to the consortium chain, where the blockchain transaction is used to record the unique identifier of the data block, the hash value of the data block, and the current time stamp.
4. The method for obtaining goods information based on a two-dimensional code according to claim 3, wherein The client scans the two-dimensional code pattern through an intelligent device to obtain a two-dimensional code image, including: The client scans the two-dimensional code pattern through an intelligent device to obtain a two-dimensional code image; Obtain the attitude of the intelligent device according to the IMU sensor, and correct the perspective distortion of the two-dimensional code pattern according to the attitude of the intelligent device.
5. The method for obtaining goods information based on a two-dimensional code according to claim 4, wherein Performing hierarchical extraction on the two-dimensional code image to obtain explicit layer information and steganographic layer information, including: Extracting the explicit layer of the two-dimensional code image according to a pre-trained CNN model to obtain explicit layer information, where the explicit layer information includes a storage index and a dynamic parameter; Extract the steganographic layer of the two-dimensional code image according to the pre-trained CNN model to obtain steganographic layer information, where the steganographic layer information includes a secret key.
6. The method for obtaining goods information based on a two-dimensional code according to claim 5, characterized in that, Perform spatio-temporal verification on the explicit layer information and the steganographic layer information to determine whether the space-time between the client and the edge node is consistent, including: Calculate the time difference between the current moment and the time stamp extracted from the explicit layer information, compare the time difference with a preset time threshold, and if it is greater than the preset time threshold, determine that the time between the client and the edge node is inconsistent; Calculate the position difference between the current position and the geographical location extracted from the explicit layer information, compare the position difference with a preset position threshold, and if it is greater than the preset position threshold, determine that the position between the client and the edge node is inconsistent.
7. A device for obtaining goods information based on a two-dimensional code, which is applicable to the method for obtaining goods information based on a two-dimensional code according to any one of claims 1-6, characterized in that, Include: A storage matching unit (1) for storing the target cargo information to the edge node closest to its geographical location according to the geographical location of the target cargo information, and the edge node generates a storage index for each stored data block A pattern generation unit (2) for performing dynamic multi-dimensional information encoding on the target cargo information to obtain an initial two-dimensional code matrix, and generating a two-dimensional code pattern according to the initial two-dimensional code matrix and the storage index; A key embedding unit (3) for embedding a preset generated secret key into the least significant bit of the two-dimensional code pattern according to visual steganography technology; A hierarchical extraction unit (4) for the client to scan the two-dimensional code pattern through a smart device to obtain a two-dimensional code image, and perform hierarchical extraction on the two-dimensional code image to obtain explicit layer information and steganographic layer information; A spatio-temporal verification unit (5) for performing spatio-temporal verification on the explicit layer information and the steganographic layer information to determine whether the space-time between the client and the edge node is consistent. If the space-time is inconsistent, generate spatio-temporal inconsistent abnormal information; An information acquisition unit (6) for, if the space-time is consistent, decrypting the storage index in the explicit layer information according to the secret key in the steganographic layer information to obtain a decrypted storage index, initiating a parallel query request to multiple edge nodes according to the decrypted storage index, obtaining a data block sequence, and obtaining target cargo information according to the data block sequence.
8. An electronic device, characterized in that, Include: At least one processor (8) and a memory (7); The memory (7) is used to store computer execution instructions; The at least one processor (8) is used to execute the computer execution instructions stored in the memory (7) to implement the method for obtaining cargo information based on two-dimensional codes according to any one of claims 1-6.